CN108564406A - A kind of method and apparatus of excitation push - Google Patents
A kind of method and apparatus of excitation push Download PDFInfo
- Publication number
- CN108564406A CN108564406A CN201810325354.1A CN201810325354A CN108564406A CN 108564406 A CN108564406 A CN 108564406A CN 201810325354 A CN201810325354 A CN 201810325354A CN 108564406 A CN108564406 A CN 108564406A
- Authority
- CN
- China
- Prior art keywords
- push
- item
- time
- random number
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0207—Discounts or incentives, e.g. coupons or rebates
- G06Q30/0212—Chance discounts or incentives
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0207—Discounts or incentives, e.g. coupons or rebates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0207—Discounts or incentives, e.g. coupons or rebates
- G06Q30/0225—Avoiding frauds
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Strategic Management (AREA)
- Finance (AREA)
- Game Theory and Decision Science (AREA)
- Entrepreneurship & Innovation (AREA)
- Economics (AREA)
- Marketing (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域technical field
本发明涉及计算机技术领域,尤其涉及一种激励推送的方法和装置。The present invention relates to the field of computer technology, in particular to a method and device for stimulating pushing.
背景技术Background technique
目前,网站为了吸引用户的注意力,提升用户的粘稠性,激励推送是一种必要的手段。就激励推送而言,通常是在服务端通过特定的计算方式来计算该次活动中用户是否能获得推送物品,获得了什么推送物品,然后告知前端展示层。其中主要有以下几种方式:预设物品推送率、逢“几”推送、基于时间轴推送。At present, in order to attract users' attention and increase user stickiness, incentive push is a necessary means for websites. As far as incentive push is concerned, it is usually calculated on the server side through a specific calculation method whether the user can get the push item in the event, what push item is obtained, and then inform the front-end display layer. There are mainly the following methods: preset item push rate, every "several" push, and time-based push.
在实现本发明过程中,发明人发现现有技术中至少存在如下问题:In the course of realizing the present invention, the inventor finds that there are at least the following problems in the prior art:
1)对于预设物品推送率方式:需要预估活动参与人数总量,根据预估人数总量和物品数量设置每种物品推送率,而由于难以准确估计活动参与总人数,该方式常出现活动未结束但是物品已被推送完毕的情况。1) For the preset item push rate method: it is necessary to estimate the total number of participants in the event, and set the push rate of each item according to the estimated total number of people and the number of items. However, because it is difficult to accurately estimate the total number of event participants, activities often occur in this method The case where it is not finished but the item has been pushed.
2)对于逢“几”推送方式:需要在活动开始之前按某种规律预设好推送序列,根据推送序列确定获得推送物品的用户,该方式很容易被观测到规律并被破解,同时也常出现活动结束但是物品没有被推送完毕的情况。2) For every "several" push method: It is necessary to preset the push sequence according to a certain rule before the event starts, and determine the users who get the pushed items according to the push sequence. This method is easy to observe the law and be cracked. There is a situation where the event is over but the item has not been pushed.
3)对于基于时间轴推送方式:需要在活动开始前,根据活动开始时间、结束时间以及物品总量,确定好每个物品的推送时间点,并将所有推送时间点存放于数据库或缓存中,导致大量的数据库或缓存空间被占用,使活动系统读写缓慢,效率低下。3) For the push method based on the time axis: before the event starts, the push time point of each item needs to be determined according to the event start time, end time and total amount of items, and all push time points should be stored in the database or cache. As a result, a large amount of database or cache space is occupied, making the active system read and write slowly and inefficient.
发明内容Contents of the invention
有鉴于此,本发明实施例提供一种激励推送的方法,通过结合物品的实时库存和活动的持续时间对物品进行实时推送,能够在活动持续时间内将物品均匀完全地推送出去,并且相比于传统的激励推送方式,计算效率有很大的提升。In view of this, the embodiment of the present invention provides a method of stimulating push, by combining the real-time inventory of the item and the duration of the event to push the item in real time, the item can be pushed out evenly and completely within the duration of the event, and compared to Compared with the traditional incentive push method, the calculation efficiency has been greatly improved.
为实现上述目的,根据本发明实施例的一个方面,提供了一种激励推送的方法,包括:To achieve the above purpose, according to an aspect of the embodiments of the present invention, a method for encouraging pushing is provided, including:
获取与用户的活动指令对应的活动信息;Obtain activity information corresponding to the user's activity instruction;
根据所述活动信息确定预推送时间和目标推送物品;Determine the pre-push time and target push items according to the activity information;
当所述预推送时间小于当前时间时,向用户推送所述目标推送物品。When the pre-push time is less than the current time, push the target push item to the user.
可选地,根据所述活动信息确定预推送时间,包括:Optionally, determining the pre-push time according to the activity information includes:
根据所述活动信息确定活动开始时间t1、活动结束时间t2、总物品量数据N1,以作为物品推送时间间隔Δt;Determine the activity start time t 1 , activity end time t 2 , and total item quantity data N 1 according to the activity information, so as to As the item push time interval Δt;
采用随机数生成函数确定第一随机数M1,其中M1为浮点数且M1∈(0,Δt];Using a random number generator function to determine the first random number M 1 , where M 1 is a floating point number and M 1 ∈(0,Δt];
根据所述活动信息确定剩余物品量数据N2,以[t1+(N1-N2)·Δt+M1]作为所述预推送时间。Determine the remaining item quantity data N 2 according to the activity information, and use [t 1 +(N 1 -N 2 )·Δt+M 1 ] as the pre-push time.
可选地,根据所述活动信息确定目标推送物品,包括:Optionally, determining the target push item according to the activity information includes:
根据所述活动信息确定剩余物品信息;determining remaining item information according to the activity information;
采用随机数生成函数确定第二随机数M2;Using a random number generating function to determine the second random number M 2 ;
根据所述剩余物品信息和所述第二随机数M2确定所述目标推送物品。The target push item is determined according to the remaining item information and the second random number M2 .
可选地,根据所述剩余物品信息和所述第二随机数M2确定所述目标推送物品,包括:Optionally, determining the target push item according to the remaining item information and the second random number M2 includes:
根据所述剩余物品信息确定剩余物品的标识值和剩余物品量数据;Determine the identification value of the remaining items and the quantity data of the remaining items according to the remaining item information;
根据所述剩余物品量数据确定与所述第二随机数M2对应的标识值,以所述对应的标识值所确定的剩余物品作为所述目标推送物品。An identification value corresponding to the second random number M2 is determined according to the remaining item quantity data, and the remaining item determined by the corresponding identification value is used as the target pushed item.
可选地,在向用户推送所述目标推送物品之后,还包括更新所述活动信息。Optionally, after pushing the target pushed item to the user, updating the activity information is further included.
根据本发明实施例的再一个方面,提供了一种激励推送的装置,包括:According to still another aspect of the embodiments of the present invention, there is provided a device for encouraging pushing, including:
信息获取模块,用于获取与用户的活动指令对应的活动信息;An information acquisition module, configured to acquire activity information corresponding to the user's activity instruction;
数据确定模块,用于根据所述活动信息确定预推送时间和目标推送物品;A data determination module, configured to determine a pre-push time and a target push item according to the activity information;
推送模块,用于当所述预推送时间小于当前时间时,向用户推送所述目标推送物品。A push module, configured to push the target push item to the user when the pre-push time is less than the current time.
可选地,所述数据确定模块根据所述活动信息确定预推送时间,包括:Optionally, the data determination module determines the pre-push time according to the activity information, including:
根据所述活动信息确定活动开始时间t1、活动结束时间t2、总物品量数据N1,以作为物品推送时间间隔Δt;Determine the activity start time t1, activity end time t2, and total item quantity data N1 according to the activity information, so as to As the item push time interval Δt;
采用随机数生成函数确定第一随机数M1,其中M1为浮点数且M1∈(0,Δt];Using a random number generator function to determine the first random number M 1 , where M 1 is a floating point number and M 1 ∈(0,Δt];
根据所述活动信息确定剩余物品量数据N2,以[t1+(N1-N2)·Δt+M1]作为所述预推送时间。Determine the remaining item quantity data N 2 according to the activity information, and use [t 1 +(N 1 -N 2 )·Δt+M 1 ] as the pre-push time.
可选地,所述数据确定模块根据所述活动信息确定目标推送物品,包括:Optionally, the data determination module determines the target push item according to the activity information, including:
根据所述活动信息确定剩余物品信息;determining remaining item information according to the activity information;
采用随机数生成函数确定第二随机数M2;Using a random number generating function to determine the second random number M 2 ;
根据所述剩余物品信息和所述第二随机数M2确定所述目标推送物品。The target push item is determined according to the remaining item information and the second random number M2 .
可选地,所述数据确定模块根据所述剩余物品信息和所述第二随机数M2确定所述目标推送物品,包括:Optionally, the data determination module determines the target push item according to the remaining item information and the second random number M2 , including:
根据所述剩余物品信息确定剩余物品的标识值和剩余物品量数据;Determine the identification value of the remaining items and the quantity data of the remaining items according to the remaining item information;
根据所述剩余物品量数据确定与所述第二随机数M2对应的标识值,以所述对应的标识值所确定的剩余物品作为所述目标推送物品。An identification value corresponding to the second random number M2 is determined according to the remaining item quantity data, and the remaining item determined by the corresponding identification value is used as the target pushed item.
可选地,所述推送模块在向用户推送所述目标推送物品之后,还包括更新所述活动信息。Optionally, after the push module pushes the target push item to the user, it further includes updating the activity information.
根据本发明实施例的另一个方面,提供了一种激励推送的电子设备,包括:According to another aspect of the embodiments of the present invention, there is provided an electronic device for stimulating push, including:
一个或多个处理器;one or more processors;
存储装置,用于存储一个或多个程序,storage means for storing one or more programs,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明提供的激励推送的方法。When the one or more programs are executed by the one or more processors, the one or more processors are made to implement the push push method provided by the present invention.
根据本发明实施例的还一个方面,提供了一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现本发明提供的激励推送的方法。According to still another aspect of the embodiments of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for stimulating push provided by the present invention is implemented.
上述发明中的一个实施例具有如下优点或有益效果:因为采用根据获取到的活动信息确定预推送时间和目标推送物品,当预推送时间小于当前时间时,则向用户推送所述目标推送物品的技术手段,所以克服了传统激励推送方式中出现的不能将物品均匀完全地推送出去、计算效率低下的技术问题,进而达到了高效且能均匀完全地推送物品的技术效果。An embodiment of the above invention has the following advantages or beneficial effects: because the pre-push time and the target push item are determined according to the acquired activity information, when the pre-push time is less than the current time, the user will be pushed the target push item Technical means, so it overcomes the technical problems of not being able to push items evenly and completely in the traditional incentive push method, and the calculation efficiency is low, and then achieves the technical effect of being able to push items evenly and completely efficiently.
上述的非惯用的可选方式所具有的进一步效果将在下文中结合具体实施方式加以说明。The further effects of the above-mentioned non-conventional alternatives will be described below in conjunction with specific embodiments.
附图说明Description of drawings
附图用于更好地理解本发明,不构成对本发明的不当限定。其中:The accompanying drawings are used to better understand the present invention, and do not constitute improper limitations to the present invention. in:
图1是根据本发明实施例的一种激励推送的方法的主要流程的示意图;FIG. 1 is a schematic diagram of the main flow of a method for stimulating push according to an embodiment of the present invention;
图2是根据本发明实施例的一种激励推送的方法的系统架构的示意图;FIG. 2 is a schematic diagram of a system architecture of a method for stimulating push according to an embodiment of the present invention;
图3是根据本发明实施例的一种激励推送的方法的主要数据结构的示意图;FIG. 3 is a schematic diagram of a main data structure of a method for stimulating push according to an embodiment of the present invention;
图4是根据本发明实施例的一种激励推送的方法的活动信息存储内容的示意图;Fig. 4 is a schematic diagram of storage content of activity information of a method for encouraging push according to an embodiment of the present invention;
图5是根据本发明实施例的一种激励推送的方法的主要步骤的示意图;Fig. 5 is a schematic diagram of main steps of a method for stimulating push according to an embodiment of the present invention;
图6是根据本发明实施例的一种激励推送的装置的主要模块的示意图;Fig. 6 is a schematic diagram of main modules of a device for stimulating and pushing according to an embodiment of the present invention;
图7是本发明实施例可以应用于其中的示例性系统架构图;Fig. 7 is an exemplary system architecture diagram to which the embodiment of the present invention can be applied;
图8是适于用来实现本发明实施例的终端设备或服务器的计算机系统的结构示意图。Fig. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
具体实施方式Detailed ways
以下结合附图对本发明的示范性实施例做出说明,其中包括本发明实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本发明的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
图1是根据本发明实施例的一种激励推送的方法的主要流程的示意图,如图1所示,包括:Fig. 1 is a schematic diagram of the main flow of a method for encouraging pushing according to an embodiment of the present invention, as shown in Fig. 1 , including:
步骤S101、获取与用户的活动指令对应的活动信息;Step S101, acquiring activity information corresponding to the user's activity instruction;
步骤S102、根据所述活动信息确定预推送时间和目标推送物品;Step S102. Determine the pre-push time and target push items according to the activity information;
步骤S103、当所述预推送时间小于当前时间时,向用户推送所述目标推送物品。Step S103, when the pre-push time is less than the current time, push the target push item to the user.
所述激励推送可以有各种展现形式,比如网站上的“砸金蛋”、“大转盘”、“刮刮乐”、“割绳子”等活动,可以是在服务端通过特定的计算方式来计算该次活动用户是否能获得推送物品以及具体能获得什么推送物品,然后告知前端展示层。The incentive push can be displayed in various forms, such as activities such as "smashing golden eggs", "big turntable", "scratch music", "cutting the rope" on the website, which can be calculated on the server side through a specific calculation method. Whether the user of the event can obtain the pushed items and what specific pushed items can be obtained, and then inform the front-end display layer.
所述活动指令是指能够表明用户参与活动的指令信息。The activity instruction refers to instruction information that can indicate that a user participates in an activity.
所述活动指令可以是系统所接收到的用户参与活动时与系统产生的有效交互行为,如“砸金蛋”活动中用户使用鼠标对预设的有效位置进行的“点击”行为,或者“割绳子”活动中用户按住鼠标左键在有效位置进行的移动行为。The activity instruction can be an effective interactive behavior received by the system when the user participates in the activity and the system, such as the "click" behavior of the user using the mouse to a preset valid position in the "Golden Egg" activity, or the "cutting" behavior. The movement behavior performed by the user holding down the left mouse button at a valid position in the "Rope" activity.
所述目标推送物品可以从数量巨大的奖券形式的物品中选择,也可以从实体形式的物品中选择。The target push item can be selected from a huge number of items in the form of lottery tickets, or can be selected from items in the form of entities.
本发明根据获取到的活动信息确定出预推送时间和目标推送物品,当所述预推送时间小于当前时间时,向用户推送所述目标推送物品。在实现将物品在活动持续时间内均匀完全地推送出去时,本发明摒弃了传统的基于时间轴推送方式中的提前将所有推送时间点存放于数据库中的方式,而是通过简单高效的方式实时确定出每一个用户参与活动时是否能获得推送物品,以及具体能获得哪一个物品,不仅均匀且完全地分配了活动中物品的推送时间,保障了物品的合理推送,还具有良好的时间复杂度和空间复杂度,且由于活动的实时性,本发明能够有效预防作弊行为。The present invention determines the pre-push time and the target push item according to the acquired activity information, and pushes the target push item to the user when the pre-push time is less than the current time. When the items are evenly and completely pushed out within the duration of the event, the present invention abandons the method of storing all push time points in the database in advance in the traditional time-based push method, but uses a simple and efficient method to real-time Determine whether each user can get the push item when participating in the activity, and which item can be obtained, not only distributes the push time of the item in the event evenly and completely, ensures the reasonable push of the item, but also has good time complexity and space complexity, and due to the real-time nature of the activity, the present invention can effectively prevent cheating.
在一些实施例中,根据所述活动信息确定预推送时间,包括:In some embodiments, determining the pre-push time according to the activity information includes:
根据所述活动信息确定活动开始时间t1、活动结束时间t2、总物品量数据N1,以作为物品推送时间间隔Δt;According to the activity information, determine the activity start time t1, the activity end time t 2 , and the total item quantity data N 1 , to As the item push time interval Δt;
采用随机数生成函数确定第一随机数M1,其中M1为浮点数且M1∈(0,Δt];Using a random number generator function to determine the first random number M 1 , where M 1 is a floating point number and M 1 ∈(0,Δt];
根据所述活动信息确定剩余物品量数据N2,以[t1+(N1-N2)·Δt+M1]作为所述预推送时间。Determine the remaining item quantity data N 2 according to the activity information, and use [t 1 +(N 1 -N 2 )·Δt+M 1 ] as the pre-push time.
该方法的意义是在活动持续的各个时间段内将所有物品均匀且完全地推送出去,即每Δt时间内都有一个物品被推送出去,且在活动结束时刚好所有物品被推送完;其中在每一个Δt时间内具体的推送时间点是随机的,其随机性由第一随机数M1来实现;The significance of this method is to push out all the items evenly and completely during the various time periods of the activity, that is, one item is pushed out every Δt time, and all items are just pushed out at the end of the activity; The specific push time point within each Δt time is random, and its randomness is realized by the first random number M 1 ;
由于所述预推送时间是用简单算法实时确定的,其时间复杂度和空间复杂度都很低,所以很大地提高的系统运行的效率,即使是高并发的情况也不会产生系统读写的瓶颈;并且由于第一随机数M1是实时随机确定的,所以对于每一个用户来说,所确定出来的预推送时间都不尽相同,其中规律无法确定,从而能够有效预防作弊行为。Since the pre-push time is determined in real time with a simple algorithm, its time complexity and space complexity are very low, so the efficiency of system operation is greatly improved, and even in the case of high concurrency, there will be no system read and write problems Bottleneck; and because the first random number M1 is determined randomly in real time, the determined pre-push time is different for each user, and the rules cannot be determined, so that cheating can be effectively prevented.
当用户参加活动时,会有以下几种情况:When a user participates in an event, the following situations occur:
若当前时间段内的物品还没有被推送出去,当用户来参与活动时,若确定出的预推送时间不小于当前时间,则不向该用户推送物品;若确定出的预推送时间小于当前时间,则向该用户推送物品;If the items in the current time period have not been pushed out, when the user comes to participate in the activity, if the determined pre-push time is not less than the current time, the item will not be pushed to the user; if the determined pre-push time is less than the current time , push items to the user;
若当前时间段内的物品已经被推送出去,用户参与活动时确定出来的预推送时间必定大于当前时间,则不会向该用户推送物品;If the items in the current time period have been pushed out, and the pre-push time determined when the user participates in the activity must be greater than the current time, the items will not be pushed to the user;
若长时间没有人参与活动,则活动剩余时间段内可推送的物品数增多,虽然总体中奖几率增大,但也是均匀分布,避免了活动时间结束时物品不能被全部推送出去的缺陷。If no one participates in the event for a long time, the number of items that can be pushed during the remaining time period of the event will increase. Although the overall chance of winning increases, it is also evenly distributed, avoiding the defect that all items cannot be pushed out when the event time ends.
在一些实施例中,根据所述活动信息确定目标推送物品,包括:In some embodiments, determining the target push item according to the activity information includes:
根据所述活动信息确定剩余物品信息;determining remaining item information according to the activity information;
采用随机数生成函数确定第二随机数M2;Using a random number generating function to determine the second random number M 2 ;
根据所述剩余物品信息和所述第二随机数M2确定所述目标推送物品。The target push item is determined according to the remaining item information and the second random number M2 .
在确定出所述预推送时间的同时也可以根据活动信息确定出目标推送物品:When the pre-push time is determined, the target push item can also be determined according to the activity information:
先根据活动信息确定剩余物品信息,所述剩余物品信息可以包括剩余物品的种类及各类物品的数量;如剩余物品的种类有:第一项物品为九折券、第二项物品为八折券、第三项物品为七折券,其中第一项物品还剩156件,第二项物品还剩90件,第三项物品还剩120件;所述剩余物品信息也可以包括每一件剩余物品及所有剩余物品的总数量;First determine the remaining item information according to the activity information, the remaining item information may include the type of remaining item and the quantity of each type of item; for example, the types of remaining items include: the first item is a 10% discount coupon, and the second item is a 20% discount Coupons and the third item are 30% discount coupons, of which there are 156 items left for the first item, 90 items for the second item, and 120 items for the third item; the remaining item information can also include each the remaining items and the total quantity of all remaining items;
由随机数生成函数确定第二随机数M2,M2可以是自然数;如222,如760;The second random number M 2 is determined by the random number generating function, and M 2 can be a natural number; such as 222, such as 760;
再根据所述剩余物品信息和第二随机数M2,在剩余物品中确定出目标推送物品;Then, according to the remaining item information and the second random number M 2 , determine the target push item among the remaining items;
如当前剩余物品的总数量为N2,将所有剩余物品以自增的方式从1开始编号,获得1到N2共N2个编号,再以预设方式确定出第二随机数M2对应到某一编号,则该编号所对应的剩余物品即为所述目标推送物品。If the current total number of remaining items is N 2 , all remaining items are numbered from 1 in an auto-incrementing manner to obtain a total of N 2 numbers from 1 to N 2 , and then the second random number M 2 corresponding to to a certain number, the remaining items corresponding to the number are the target pushed items.
根据实时随机确定的第二随机数M2在所有剩余物品中确定目标推送物品,易于实现且计算效率高,并且由于第二随机数M2的随机性,无法事先指定用户获得的推送物品,有效预防了作弊行为。According to the second random number M2 determined randomly in real time, the target push item is determined among all the remaining items, which is easy to implement and has high calculation efficiency, and due to the randomness of the second random number M2 , the push item obtained by the user cannot be specified in advance, which is effective Cheating is prevented.
在一些实施例中,根据所述剩余物品信息和所述第二随机数M2确定所述目标推送物品,包括:In some embodiments, determining the target push item according to the remaining item information and the second random number M2 includes:
根据所述剩余物品信息确定剩余物品的标识值和剩余物品量数据;Determine the identification value of the remaining items and the quantity data of the remaining items according to the remaining item information;
根据所述剩余物品量数据确定与所述第二随机数M2对应的标识值,以所述对应的标识值所确定的剩余物品作为所述目标推送物品。An identification value corresponding to the second random number M2 is determined according to the remaining item quantity data, and the remaining item determined by the corresponding identification value is used as the target pushed item.
所述剩余物品的标识值可以是每一类剩余物品的标识值;The identification value of the remaining items may be the identification value of each type of remaining items;
如根据所述活动信息确定第一项物品标识值为202011、第二项物品标识值为202012、第三项物品标识值为202013,其中所述剩余物品量数据为:第一项物品还剩156件,第二项物品还剩90件,第三项物品还剩120件;For example, according to the activity information, it is determined that the identification value of the first item is 202011, the identification value of the second item is 202012, and the identification value of the third item is 202013, wherein the remaining item quantity data is: the first item has 156 left pieces, there are 90 pieces left for the second item, and 120 pieces left for the third item;
当确定第二随机数M2为222时,在剩余物品中确定第222件物品是哪一类剩余物品,则以该剩余物品类别中的任一物品作为所述目标推送物品:根据标识值为202011的物品的剩余物品量数据156,使用M2-156=66,由于66>0,此时确定第一项物品不是目标推送物品;进一步根据标识值为202012的物品的剩余物品量数据90,使用M2-156-90=-24,由于-24≤0,此时确定与第二随机数M2=222对应的标识值为202012,即确定第二项物品为所述目标推送物品。When determining that the second random number M2 is 222, determine which type of remaining item the 222nd item is in the remaining items, then use any item in the remaining item category as the target push item: according to the identification value For the remaining item quantity data 156 of the item of 202011, use M 2 -156=66. Since 66>0, it is determined that the first item is not the target push item at this time; further according to the remaining item quantity data 90 of the item whose identification value is 202012, Using M 2 -156-90=-24, since -24≤0, at this time, it is determined that the identification value corresponding to the second random number M 2 =222 is 202012, that is, it is determined that the second item is the target pushed item.
所述剩余物品的标识值也可以是每一件剩余物品的标识值;The identification value of the remaining items may also be the identification value of each remaining item;
如根据所述活动信息为所有剩余物品从1开始编号,剩余物品量数据为366,那么所述剩余物品的标识值为1到366这366个自然数;If all remaining items are numbered from 1 according to the activity information, and the remaining item quantity data is 366, then the identification value of the remaining items is 366 natural numbers from 1 to 366;
当确定第二随机数M2为760时,根据剩余物品量数据366,使用760%366=28,此时确定与第二随机数M2=760对应的标识值为28,即确定编号为28的剩余物品为所述目标推送物品。When the second random number M 2 is determined to be 760, according to the remaining item quantity data 366, use 760%366=28, and at this time, determine that the identification value corresponding to the second random number M 2 =760 is 28, that is, determine the serial number as 28 The remaining items for the target push items.
在一些实施例中,在向用户推送所述目标推送物品之后,还包括更新所述活动信息。例如,将所述目标推送物品从所述剩余物品中删除。In some embodiments, after pushing the target pushed item to the user, updating the activity information is further included. For example, the target pushed item is deleted from the remaining items.
当所述预推送时间小于当前时间时,向用户推送所述目标推送物品,这之后还需要实时更新活动信息,将所述目标推送物品从当前数据库中的剩余物品中删除,以确保下一个用户参与活动时的数据库的剩余物品中没有当前用户所获得的目标推送物品,使活动系统正常运行;When the pre-push time is less than the current time, the target push item is pushed to the user, after which the activity information needs to be updated in real time, and the target push item is deleted from the remaining items in the current database to ensure that the next user There is no target push item obtained by the current user in the remaining items in the database when participating in the event, so that the event system can run normally;
更新所述活动信息还可以包括:记录下当前时间,作为最新推送时间。Updating the activity information may also include: recording the current time as the latest push time.
图2是根据本发明实施例的一种激励推送的方法的系统架构的示意图200;包括:Fig. 2 is a schematic diagram 200 of a system architecture of a method for stimulating pushing according to an embodiment of the present invention; including:
数据库201,可以用于存放激励推送的活动信息和活动推送的物品信息;The database 201 can be used to store the activity information pushed by the incentive and the item information pushed by the activity;
活动初始化服务202,可以是一个可预设定时启动的任务,例如可以设定每日凌晨2点扫描数据库中下一日即将开始的活动;如当前时间为2016-04-22 02:00:00,活动初始化服务202会扫描2016-04-23日即将开始的活动,生成下一日要用到的活动信息,并将该活动信息存放于缓存203中;The activity initialization service 202 can be a task that can be started at a preset time, for example, it can be set to scan the activities in the database that are about to start on the next day at 2 am every day; for example, the current time is 2016-04-22 02:00:00 , the activity initialization service 202 will scan the activities that will start on April 23, 2016, generate activity information to be used in the next day, and store the activity information in the cache 203;
缓存203,可以用于存放活动初始化服务202中生成的活动信息;The cache 203 can be used to store the activity information generated in the activity initialization service 202;
激励推送服务204,可以用于根据活动信息判断是否向用户推送物品;The incentive push service 204 can be used to judge whether to push items to the user according to the activity information;
用户205,可以是参与活动的对象。用户205参与活动时产生活动指令。A user 205 may be an object participating in an activity. The activity instruction is generated when the user 205 participates in the activity.
数据库201中预存好已有的激励推送的活动信息和活动推送的物品信息;由活动初始化服务202读取数据库中的活动配置,生成下一日要用到的活动信息,并将生成好的活动信息存放于缓存203中;当用户205参与活动时产生活动指令,由激励推送服务204读取缓存203中与活动指令对应的活动信息,实时判断是否向用户205推送物品。The database 201 pre-stores the existing incentive push activity information and the item information pushed by the activity; the activity initialization service 202 reads the activity configuration in the database, generates the activity information to be used in the next day, and generates a good activity The information is stored in the cache 203; when the user 205 participates in an activity, an activity instruction is generated, and the incentive push service 204 reads the activity information corresponding to the activity instruction in the cache 203, and judges whether to push an item to the user 205 in real time.
图3是根据本发明实施例的一种激励推送的方法的主要数据结构的示意图;包括:Fig. 3 is a schematic diagram of the main data structure of a method for stimulating pushing according to an embodiment of the present invention; including:
LotteryInstance(活动信息)301,LotteryAwardEntry(物品项信息)302。LotteryInstance (event information) 301, LotteryAwardEntry (item item information) 302.
所述LotteryInstance(活动信息)301,可以包括:activeID(活动ID)、activeName(活动名称)、beginTime(活动开始时间)、endTime(活动结束时间)、lotteryAwardMap(活动推送的物品信息);The LotteryInstance (activity information) 301 may include: activeID (activity ID), activeName (activity name), beginTime (activity start time), endTime (activity end time), lotteryAwardMap (item information pushed by the activity);
其中,lotteryAwardMap中每个元素是所述LotteryAwardEntry(物品项信息)302,具体可以包括:awardID(物品ID)、awardName(物品名称)、awardCoupoon(物品信息码)、awardTotalAmount(总物品量数据)、awardBalance(剩余物品量数据)、lastUpdateTime(最新推送时间)。Wherein, each element in the lotteryAwardMap is the LotteryAwardEntry (item item information) 302, which may specifically include: awardID (item ID), awardName (item name), awardCoupoon (item information code), awardTotalAmount (total item quantity data), awardBalance (remaining item quantity data), lastUpdateTime (latest push time).
图4是根据本发明实施例的一种激励推送的方法的活动信息存储内容的示意图;包括:Fig. 4 is a schematic diagram of activity information storage content of a method for encouraging push according to an embodiment of the present invention; including:
活动信息401,物品项信息402。Activity information 401, item information 402.
所述活动信息401可以包括:活动ID,如:102020;The activity information 401 may include: activity ID, such as: 102020;
活动名称,如:割绳子;Activity name, such as: cut the rope;
活动开始时间,如:2016-04-22 10:00:00;Event start time, such as: 2016-04-22 10:00:00;
活动结束时间,如:2016-04-24 24:00:00;Event end time, such as: 2016-04-24 24:00:00;
活动推送的物品信息,如:物品list;Item information pushed by the event, such as: item list;
其中,活动推送的物品信息中每一个元素是所述物品项信息402,具体可以包括:Wherein, each element in the item information pushed by the activity is the item item information 402, which may specifically include:
物品ID,如:202011;Item ID, such as: 202011;
物品名称,如:九折券;Item name, such as: 10% discount coupon;
物品信息码,如:SKJLKJFHUI2342;Item information code, such as: SKJLKJFHUI2342;
总物品量数据,如:6000;Total item quantity data, such as: 6000;
剩余物品量数据,如:6000;Remaining item quantity data, such as: 6000;
最新推送时间,如:NULL。The latest push time, such as: NULL.
图5是根据本发明实施例的一种激励推送的方法的主要步骤的示意图;包括:Fig. 5 is a schematic diagram of main steps of a method for stimulating push according to an embodiment of the present invention; including:
用户参与活动;user participation in activities;
获取活动信息,包括:活动开始时间t1、活动结束时间t2、总物品量数据N1、剩余物品量数据N2、剩余物品信息;Obtain event information, including: event start time t 1 , event end time t 2 , total item quantity data N 1 , remaining item quantity data N 2 , remaining item information;
判断剩余物品量数据N2是否大于0:若N2=0,则不向用户推送物品,用户参与活动结束;若N2>0,用户继续参与活动;Determine whether the remaining item quantity data N 2 is greater than 0: if N 2 = 0, the item will not be pushed to the user, and the user's participation in the activity ends; if N 2 > 0, the user will continue to participate in the activity;
确定物品推送时间间隔Δt、第一随机数M1、第二随机数M2:以作为物品推送时间间隔Δt,采用随机数生成函数确定第一随机数M1、第二随机数M2;Determine the item push time interval Δt, the first random number M 1 , and the second random number M 2 : As the item push time interval Δt, the first random number M 1 and the second random number M 2 are determined using a random number generation function;
确定预推送时间、目标推送物品:以[t1+(N1-N2)·Δt+M1]作为所述预推送时间,根据所述剩余物品信息和第二随机数M2确定所述目标推送物品;Determining the pre-push time and target push items: take [t 1 +(N 1 -N 2 )·Δt+M 1 ] as the pre-push time, and determine the target push item;
判断预推送时间是否小于当前时间:若预推送时间不小于当前时间,则不向用户推送物品,用户参与活动结束;若预推送时间小于当前时间,用户继续参与活动;Determine whether the pre-push time is less than the current time: if the pre-push time is not less than the current time, the user will not push the item and the user's participation in the activity ends; if the pre-push time is less than the current time, the user will continue to participate in the activity;
向用户推送所述目标推送物品;push the target push item to the user;
更新活动信息:将所述目标推送物品从剩余物品中删除,记录当前时间作为最新推送时间;Update activity information: delete the target push item from the remaining items, and record the current time as the latest push time;
用户参与活动结束。The user participation activity ends.
图6是根据本发明实施例的一种激励推送的装置的主要模块的示意图,如图6所示,激励推送的装置600包括:Fig. 6 is a schematic diagram of the main modules of a device for stimulating and pushing according to an embodiment of the present invention. As shown in Fig. 6, the device for stimulating and pushing 600 includes:
信息获取模块601,用于获取与用户的活动指令对应的活动信息;An information acquisition module 601, configured to acquire activity information corresponding to the user's activity instruction;
数据确定模块602,用于根据所述活动信息确定预推送时间和目标推送物品;A data determination module 602, configured to determine a pre-push time and a target push item according to the activity information;
推送模块603,用于当所述预推送时间小于当前时间时,向用户推送所述目标推送物品。A push module 603, configured to push the target push item to the user when the pre-push time is less than the current time.
所述激励推送可以有各种展现形式,比如网站上的“砸金蛋”、“大转盘”、“刮刮乐”、“割绳子”等活动,可以是在服务端通过特定的计算方式来计算该次活动用户是否能获得推送物品以及具体能获得什么推送物品,然后告知前端展示层。The incentive push can be displayed in various forms, such as activities such as "smashing golden eggs", "big turntable", "scratch music", "cutting the rope" on the website, which can be calculated on the server side through a specific calculation method. Whether the user of the event can obtain the pushed items and what specific pushed items can be obtained, and then inform the front-end display layer.
所述活动指令是指能够表明用户参与活动的指令信息。The activity instruction refers to instruction information that can indicate that a user participates in an activity.
所述活动指令可以是系统所接收到的用户参与活动时与系统产生的有效交互行为,如“砸金蛋”活动中用户使用鼠标对预设的有效位置进行的“点击”行为,或者“割绳子”活动中用户按住鼠标左键在有效位置进行的移动行为。The activity instruction can be an effective interactive behavior received by the system when the user participates in the activity and the system, such as the "click" behavior of the user using the mouse to a preset valid position in the "Golden Egg" activity, or the "cutting" behavior. The movement behavior performed by the user holding down the left mouse button at a valid position in the "Rope" activity.
所述目标推送物品可以从数量巨大的奖券形式的物品中选择,也可以从实体形式的物品中选择。The target push item can be selected from a huge number of items in the form of lottery tickets, or can be selected from items in the form of entities.
本发明根据获取到的活动信息确定出预推送时间和目标推送物品,当所述预推送时间小于当前时间时,向用户推送所述目标推送物品。在实现将物品在活动持续时间内均匀完全地推送出去时,本发明摒弃了传统的基于时间轴推送方式中的提前将所有推送时间点存放于数据库中的方式,而是通过简单高效的方式实时确定出每一个用户参与活动时是否能获得推送物品,以及具体能获得哪一个物品,不仅均匀且完全地分配了活动中物品的推送时间,保障了物品的合理推送,还具有良好的时间复杂度和空间复杂度,且由于活动的实时性,本发明能够有效预防作弊行为。The present invention determines the pre-push time and the target push item according to the acquired activity information, and pushes the target push item to the user when the pre-push time is less than the current time. When the items are evenly and completely pushed out within the duration of the event, the present invention abandons the method of storing all push time points in the database in advance in the traditional time-based push method, but uses a simple and efficient method to real-time Determine whether each user can get the push item when participating in the activity, and which item can be obtained, not only distributes the push time of the item in the event evenly and completely, ensures the reasonable push of the item, but also has good time complexity and space complexity, and due to the real-time nature of the activity, the present invention can effectively prevent cheating.
在一些实施例中,所述数据确定模块602根据所述活动信息确定预推送时间,包括:In some embodiments, the data determination module 602 determines the pre-push time according to the activity information, including:
根据所述活动信息确定活动开始时间t1、活动结束时间t2、总物品量数据N1,以作为物品推送时间间隔Δt;Determine the activity start time t 1 , activity end time t 2 , and total item quantity data N 1 according to the activity information, so as to As the item push time interval Δt;
采用随机数生成函数确定第一随机数M1,其中M1为浮点数且M1∈(0,Δt];Using a random number generator function to determine the first random number M 1 , where M 1 is a floating point number and M 1 ∈(0,Δt];
根据所述活动信息确定剩余物品量数据N2,以[t1+(N1-N2)·Δt+M1]作为所述预推送时间。Determine the remaining item quantity data N 2 according to the activity information, and use [t 1 +(N 1 -N 2 )·Δt+M 1 ] as the pre-push time.
该方法的意义是在活动持续的各个时间段内将所有物品均匀且完全地推送出去,即每Δt时间内都有一个物品被推送出去,且在活动结束时刚好所有物品被推送完;其中在每一个Δt时间内具体的推送时间点是随机的,其随机性由第一随机数M1来实现;The significance of this method is to push out all the items evenly and completely during the various time periods of the activity, that is, one item is pushed out every Δt time, and all items are just pushed out at the end of the activity; The specific push time point within each Δt time is random, and its randomness is realized by the first random number M 1 ;
由于所述预推送时间是用简单算法实时确定的,其时间复杂度和空间复杂度都很低,所以很大地提高的系统运行的效率,即使是高并发的情况也不会产生系统读写的瓶颈;并且由于第一随机数M1是实时随机确定的,所以对于每一个用户来说,所确定出来的预推送时间都不尽相同,其中规律无法确定,从而能够有效预防作弊行为。Since the pre-push time is determined in real time with a simple algorithm, its time complexity and space complexity are very low, so the efficiency of system operation is greatly improved, and even in the case of high concurrency, there will be no system read and write problems Bottleneck; and because the first random number M1 is determined randomly in real time, the determined pre-push time is different for each user, and the rules cannot be determined, so that cheating can be effectively prevented.
当用户参加活动时,会有以下几种情况:When a user participates in an event, the following situations occur:
若当前时间段内的物品还没有被推送出去,当用户来参与活动时,若确定出的预推送时间不小于当前时间,则不向该用户推送物品;若确定出的预推送时间小于当前时间,则向该用户推送物品;If the items in the current time period have not been pushed out, when the user comes to participate in the activity, if the determined pre-push time is not less than the current time, the item will not be pushed to the user; if the determined pre-push time is less than the current time , push items to the user;
若当前时间段内的物品已经被推送出去,用户参与活动时确定出来的预推送时间必定大于当前时间,则不会向该用户推送物品;If the items in the current time period have been pushed out, and the pre-push time determined when the user participates in the activity must be greater than the current time, the items will not be pushed to the user;
若长时间没有人参与活动,则活动剩余时间段内可推送的物品数增多,虽然总体中奖几率增大,但也是均匀分布,避免了活动时间结束时物品不能被全部推送出去的缺陷。If no one participates in the event for a long time, the number of items that can be pushed during the remaining time period of the event will increase. Although the overall chance of winning increases, it is also evenly distributed, avoiding the defect that all items cannot be pushed out when the event time ends.
在一些实施例中,所述数据确定模块602根据所述活动信息确定目标推送物品,包括:In some embodiments, the data determination module 602 determines the target push item according to the activity information, including:
根据所述活动信息确定剩余物品信息;determining remaining item information according to the activity information;
采用随机数生成函数确定第二随机数M2;Using a random number generating function to determine the second random number M 2 ;
根据所述剩余物品信息和所述第二随机数M2确定所述目标推送物品。The target push item is determined according to the remaining item information and the second random number M2 .
在确定出所述预推送时间的同时也可以根据活动信息确定出目标推送物品:When the pre-push time is determined, the target push item can also be determined according to the activity information:
先根据活动信息确定剩余物品信息,所述剩余物品信息可以包括剩余物品的种类及各类物品的数量;如剩余物品的种类有:第一项物品为九折券、第二项物品为八折券、第三项物品为七折券,其中第一项物品还剩156件,第二项物品还剩90件,第三项物品还剩120件;First determine the remaining item information according to the activity information, the remaining item information may include the type of remaining item and the quantity of each type of item; for example, the types of remaining items include: the first item is a 10% discount coupon, and the second item is a 20% discount Coupons and the third item are 30% off coupons, of which there are 156 left for the first item, 90 left for the second item, and 120 left for the third item;
所述剩余物品信息也可以包括每一件剩余物品及所有剩余物品的总数量;The remaining item information may also include the total quantity of each remaining item and all remaining items;
由随机数生成函数确定第二随机数M2,M2可以是自然数;如222,如760;The second random number M 2 is determined by the random number generating function, and M 2 can be a natural number; such as 222, such as 760;
再根据所述剩余物品信息和第二随机数M2,在剩余物品中确定出目标推送物品;Then, according to the remaining item information and the second random number M 2 , determine the target push item among the remaining items;
如当前剩余物品的总数量为N2,将所有剩余物品以自增的方式从开始编号,获得1到N2共N2个编号,再以预设方式确定出第二随机数M对应到某一编号,则该编号所对应的剩余物品即为所述目标推送物品。If the current total number of remaining items is N 2 , all remaining items are numbered from the beginning in a self-incrementing manner to obtain a total of N 2 numbers from 1 to N 2 , and then determine the second random number M corresponding to a certain If there is a serial number, the remaining items corresponding to the serial number are the target push items.
根据实时随机确定的第二随机数M2在所有剩余物品中确定目标推送物品,易于实现且计算效率高,并且由于第二随机数M2的随机性,无法事先指定用户获得的推送物品,有效预防了作弊行为。According to the second random number M2 determined randomly in real time, the target push item is determined among all the remaining items, which is easy to implement and has high calculation efficiency, and due to the randomness of the second random number M2 , the push item obtained by the user cannot be specified in advance, which is effective Cheating is prevented.
在一些实施例中,所述数据确定模块602根据所述剩余物品信息和所述第二随机数M2确定所述目标推送物品,包括:In some embodiments, the data determination module 602 determines the target push item according to the remaining item information and the second random number M2 , including:
根据所述剩余物品信息确定剩余物品的标识值和剩余物品量数据;Determine the identification value of the remaining items and the quantity data of the remaining items according to the remaining item information;
根据所述剩余物品量数据确定与所述第二随机数M2对应的标识值,以所述对应的标识值所确定的剩余物品作为所述目标推送物品。An identification value corresponding to the second random number M2 is determined according to the remaining item quantity data, and the remaining item determined by the corresponding identification value is used as the target pushed item.
所述剩余物品的标识值可以是每一类剩余物品的标识值;如根据所述活动信息确定第一项物品标识值为202011、第二项物品标识值为202012、第三项物品标识值为202013,其中所述剩余物品量数据为:第一项物品还剩156件,第二项物品还剩90件,第三项物品还剩120件;The identification value of the remaining items may be the identification value of each type of remaining items; for example, according to the activity information, it is determined that the identification value of the first item is 202011, the identification value of the second item is 202012, and the identification value of the third item is 202013, wherein the data of remaining items is: 156 items left for the first item, 90 items left for the second item, and 120 items left for the third item;
当确定第二随机数M2为222时,在剩余物品中确定第222件物品是哪一类剩余物品,则以该剩余物品类别中的任一物品作为所述目标推送物品:根据标识值为202011的物品的剩余物品量数据156,使用M2-156=66,由于66>0,此时确定第一项物品不是目标推送物品;进一步根据标识值为202012的物品的剩余物品量数据90,使用M2-156-90=-24,由于-24≤0,此时确定与第二随机数M2=22对应的标识值为202012,即确定第二项物品为所述目标推送物品。When determining that the second random number M2 is 222, determine which type of remaining item the 222nd item is in the remaining items, then use any item in the remaining item category as the target push item: according to the identification value For the remaining item quantity data 156 of the item of 202011, use M 2 -156=66. Since 66>0, it is determined that the first item is not the target push item at this time; further according to the remaining item quantity data 90 of the item whose identification value is 202012, Using M 2 -156-90=-24, since -24≤0, at this time, it is determined that the identification value corresponding to the second random number M 2 =22 is 202012, that is, it is determined that the second item is the target pushed item.
所述剩余物品的标识值也可以是每一件剩余物品的标识值;如根据所述活动信息为所有剩余物品从1开始编号,剩余物品量数据为366,那么所述剩余物品的标识值为1到366这366个自然数;The identification value of the remaining items may also be the identification value of each remaining item; if all remaining items are numbered from 1 according to the activity information, and the quantity data of the remaining items is 366, then the identification value of the remaining items is 366 natural numbers from 1 to 366;
当确定第二随机数M2为760时,根据剩余物品量数据366,使用760%366=28,此时确定与第二随机数M2=760对应的标识值为28,即确定编号为28的剩余物品为所述目标推送物品。When the second random number M 2 is determined to be 760, according to the remaining item quantity data 366, use 760%366=28, and at this time, determine that the identification value corresponding to the second random number M 2 =760 is 28, that is, determine the serial number as 28 The remaining items for the target push items.
在一些实施例中,所述推送模块603在向用户推送所述目标推送物品之后,还包括更新所述活动信息。例如,将所述目标推送物品从所述剩余物品中删除。In some embodiments, after the push module 603 pushes the target push item to the user, it further includes updating the activity information. For example, the target pushed item is deleted from the remaining items.
当所述预推送时间小于当前时间时,向用户推送所述目标推送物品,这之后还需要实时更新活动信息,将所述目标推送物品从当前数据库中的剩余物品中删除,以确保下一个用户参与活动时的数据库的剩余物品中没有当前用户所获得的目标推送物品,使活动系统正常运行;When the pre-push time is less than the current time, the target push item is pushed to the user, after which the activity information needs to be updated in real time, and the target push item is deleted from the remaining items in the current database to ensure that the next user There is no target push item obtained by the current user in the remaining items in the database when participating in the event, so that the event system can run normally;
更新所述活动信息还可以包括:记录下当前时间,作为最新推送时间。Updating the activity information may also include: recording the current time as the latest push time.
图7示出了可以应用本发明实施例的激励推送的方法或激励推送的装置的示例性系统架构700。FIG. 7 shows an exemplary system architecture 700 to which the method or apparatus for stimulating push according to an embodiment of the present invention can be applied.
如图7所示,系统架构700可以包括终端设备701、702、703,网络704和服务器705。网络704用以在终端设备701、702、703和服务器705之间提供通信链路的介质。网络704可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 7 , a system architecture 700 may include terminal devices 701 , 702 , and 703 , a network 704 and a server 705 . The network 704 is used as a medium for providing communication links between the terminal devices 701 , 702 , 703 and the server 705 . Network 704 may include various connection types, such as wires, wireless communication links, or fiber optic cables, among others.
用户可以使用终端设备701、702、703通过网络704与服务器705交互,以接收或发送消息等。终端设备701、702、703上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等(仅为示例)。Users can use terminal devices 701, 702, 703 to interact with server 705 through network 704 to receive or send messages and the like. Various communication client applications can be installed on the terminal devices 701, 702, and 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (just for example).
终端设备701、702、703可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The terminal devices 701, 702, and 703 may be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
服务器705可以是提供各种服务的服务器,例如对用户利用终端设备701、702、703所浏览的购物类网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的产品信息查询请求等数据进行分析等处理,并将处理结果(例如目标推送信息、产品信息--仅为示例)反馈给终端设备。The server 705 may be a server that provides various services, such as a background management server that provides support for shopping websites browsed by users using the terminal devices 701 , 702 , and 703 (just an example). The background management server can analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information—just an example) to the terminal device.
需要说明的是,本发明实施例所提供的激励推送的方法一般由服务器705执行,相应地,激励推送的装置一般设置于服务器705中。It should be noted that the push push method provided by the embodiment of the present invention is generally executed by the server 705 , and correspondingly, the device for push push is generally set in the server 705 .
应该理解,图7中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 7 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
下面参考图8,其示出了适于用来实现本发明实施例的终端设备的计算机系统800的结构示意图。图8示出的终端设备仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。Referring now to FIG. 8 , it shows a schematic structural diagram of a computer system 800 suitable for implementing a terminal device according to an embodiment of the present invention. The terminal device shown in FIG. 8 is only an example, and should not limit the functions and scope of use of this embodiment of the present invention.
如图8所示,计算机系统800包括中央处理单元(CPU)801,其可以根据存储在只读存储器(ROM)802中的程序或者从存储部分808加载到随机访问存储器(RAM)803中的程序而执行各种适当的动作和处理。在RAM 803中,还存储有系统800操作所需的各种程序和数据。CPU 801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。As shown in FIG. 8 , a computer system 800 includes a central processing unit (CPU) 801 that can be programmed according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage section 808 into a random-access memory (RAM) 803 Instead, various appropriate actions and processes are performed. In the RAM 803, various programs and data necessary for the operation of the system 800 are also stored. The CPU 801 , ROM 802 , and RAM 803 are connected to each other via a bus 804 . An input/output (I/O) interface 805 is also connected to the bus 804 .
以下部件连接至I/O接口805:包括键盘、鼠标等的输入部分806;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分807;包括硬盘等的存储部分808;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分809。通信部分809经由诸如因特网的网络执行通信处理。驱动器810也根据需要连接至I/O接口805。可拆卸介质811,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器810上,以便于从其上读出的计算机程序根据需要被安装入存储部分808。The following components are connected to the I/O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 808 including a hard disk, etc. and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 810 as necessary so that a computer program read therefrom is installed into the storage section 808 as necessary.
特别地,根据本发明公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分809从网络上被下载和安装,和/或从可拆卸介质811被安装。在该计算机程序被中央处理单元(CPU)801执行时,执行本发明的系统中限定的上述功能。In particular, according to the disclosed embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the disclosed embodiments of the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication portion 809 and/or installed from removable media 811 . When this computer program is executed by a central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are performed.
需要说明的是,本发明所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本发明中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本发明中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, in which computer-readable program codes are carried. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. . Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that includes one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block in the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a A combination of dedicated hardware and computer instructions.
描述于本发明实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块也可以设置在处理器中,例如,可以描述为:一种处理器包括发送模块、获取模块、确定模块和第一处理模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定,例如,发送模块还可以被描述为“向所连接的服务端发送图片获取请求的模块”。The modules involved in the embodiments described in the present invention may be implemented by software or by hardware. The described modules may also be set in a processor. For example, it may be described as: a processor includes a sending module, an acquiring module, a determining module, and a first processing module. Wherein, the names of these modules do not limit the module itself under certain circumstances, for example, the sending module can also be described as "a module that sends a picture acquisition request to the connected server".
作为另一方面,本发明还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:步骤S101、获取与用户的活动指令对应的活动信息;步骤S102、根据所述活动信息确定预推送时间和目标推送物品;步骤S103、当所述预推送时间小于当前时间时,向用户推送所述目标推送物品。As another aspect, the present invention also provides a computer-readable medium. The computer-readable medium may be contained in the device described in the above embodiments, or it may exist independently without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by one device, the device includes: step S101, acquiring activity information corresponding to the user's activity instruction; step S102, according to The activity information determines the pre-push time and the target push item; step S103, when the pre-push time is less than the current time, push the target push item to the user.
根据本发明实施例的技术方案,因为采用根据获取到的活动信息确定预推送时间和目标推送物品,当预推送时间小于当前时间时,确定所述用户获得所述目标推送物品的技术手段,所以克服了传统激励推送方式中出现的不能将物品均匀完全地推送出去、计算效率低下的技术问题,进而达到了高效且能均匀完全地推送物品的技术效果。According to the technical solution of the embodiment of the present invention, because the pre-push time and the target push item are determined according to the acquired activity information, and when the pre-push time is less than the current time, the technical means of determining that the user obtains the target push item is adopted, so It overcomes the technical problems of not being able to push items evenly and completely in the traditional incentive push method, and the calculation efficiency is low, and then achieves the technical effect of being able to push items evenly and completely efficiently.
上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,取决于设计要求和其他因素,可以发生各种各样的修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above specific implementation methods do not constitute a limitation to the protection scope of the present invention. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810325354.1A CN108564406B (en) | 2018-04-12 | 2018-04-12 | A kind of method and device for stimulating push |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810325354.1A CN108564406B (en) | 2018-04-12 | 2018-04-12 | A kind of method and device for stimulating push |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108564406A true CN108564406A (en) | 2018-09-21 |
| CN108564406B CN108564406B (en) | 2021-05-25 |
Family
ID=63534831
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810325354.1A Active CN108564406B (en) | 2018-04-12 | 2018-04-12 | A kind of method and device for stimulating push |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108564406B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110458996A (en) * | 2019-07-05 | 2019-11-15 | 平安国际智慧城市科技股份有限公司 | Probability adjustment method, device, equipment and storage medium based on social platform lottery |
| CN114915652A (en) * | 2022-03-30 | 2022-08-16 | 北京奇艺世纪科技有限公司 | Message pushing method and device, electronic equipment and storage medium |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105023169A (en) * | 2015-06-19 | 2015-11-04 | 默科资讯股份有限公司 | Method and system for sending and pushing electronic information |
| CN105761104A (en) * | 2016-02-05 | 2016-07-13 | 腾讯科技(深圳)有限公司 | Information processing method and server |
| CN105869018A (en) * | 2016-04-01 | 2016-08-17 | 赵忠义 | Reward push method and system thereof |
| US20170039583A1 (en) * | 2011-06-24 | 2017-02-09 | Nebil Ben Aissa | Social Network Driven Real-Time Multi-Payer, Multi-Merchant, Multi-Bucket Discounting Social Commerce System With Value Tracking, Multi-Layer Commission Forwarding And Discount Processing Systems And Related Methods |
| CN107818479A (en) * | 2017-10-27 | 2018-03-20 | 携程旅游网络技术(上海)有限公司 | Favor information method for pushing, system, storage medium and electronic equipment |
| CN107846478A (en) * | 2017-12-21 | 2018-03-27 | 知而行(上海)营销咨询有限公司 | Information-pushing method |
-
2018
- 2018-04-12 CN CN201810325354.1A patent/CN108564406B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20170039583A1 (en) * | 2011-06-24 | 2017-02-09 | Nebil Ben Aissa | Social Network Driven Real-Time Multi-Payer, Multi-Merchant, Multi-Bucket Discounting Social Commerce System With Value Tracking, Multi-Layer Commission Forwarding And Discount Processing Systems And Related Methods |
| CN105023169A (en) * | 2015-06-19 | 2015-11-04 | 默科资讯股份有限公司 | Method and system for sending and pushing electronic information |
| CN105761104A (en) * | 2016-02-05 | 2016-07-13 | 腾讯科技(深圳)有限公司 | Information processing method and server |
| CN105869018A (en) * | 2016-04-01 | 2016-08-17 | 赵忠义 | Reward push method and system thereof |
| CN107818479A (en) * | 2017-10-27 | 2018-03-20 | 携程旅游网络技术(上海)有限公司 | Favor information method for pushing, system, storage medium and electronic equipment |
| CN107846478A (en) * | 2017-12-21 | 2018-03-27 | 知而行(上海)营销咨询有限公司 | Information-pushing method |
Non-Patent Citations (2)
| Title |
|---|
| 邹翔: ""基于地理定向的移动优惠券策略"", 《系统管理学报》 * |
| 陈云: ""网易有钱电子优惠券系统的设计与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110458996A (en) * | 2019-07-05 | 2019-11-15 | 平安国际智慧城市科技股份有限公司 | Probability adjustment method, device, equipment and storage medium based on social platform lottery |
| CN114915652A (en) * | 2022-03-30 | 2022-08-16 | 北京奇艺世纪科技有限公司 | Message pushing method and device, electronic equipment and storage medium |
| CN114915652B (en) * | 2022-03-30 | 2024-03-15 | 北京奇艺世纪科技有限公司 | Message pushing method and device, electronic equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108564406B (en) | 2021-05-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109840734A (en) | Information output method and device | |
| CN110096344A (en) | Task management method, system, server cluster and computer-readable medium | |
| CN109960487A (en) | A method and apparatus for extracting objects | |
| CN108335208B (en) | Method and apparatus for processing information | |
| CN107784076A (en) | The method and apparatus of visualization structure user behavior data | |
| CN114119153A (en) | A method and device for displaying a page | |
| CN107249041B (en) | Information push method and device | |
| CN108874836B (en) | Method and device for transferring electronic coupons | |
| CN108564406A (en) | A kind of method and apparatus of excitation push | |
| CN110648032A (en) | Information updating method and device | |
| US20230053859A1 (en) | Method and apparatus for outputting information | |
| CN114528303A (en) | Method and device for processing service data | |
| CN112348612B (en) | Order generation method and device | |
| CN113256280A (en) | Red packet issuing method and device | |
| CN107045452B (en) | Virtual machine scheduling method and device | |
| CN115665075B (en) | Data push method, system, electronic device and medium for message queue | |
| CN112968769B (en) | Method and device for generating random number in block chain | |
| CN110069642A (en) | A kind of method and apparatus of public place media play | |
| CN119941319A (en) | A method and device for managing rights and interests | |
| CN111290761A (en) | Grayscale publishing method, device, medium and electronic device | |
| CN113971245A (en) | Information pushing method, device and system | |
| CN113762581A (en) | Method and device for generating activity population prediction model, electronic equipment and medium | |
| CN109033343B (en) | Method and apparatus for generating information | |
| CN112347385A (en) | Link sharing method and device and electronic equipment | |
| CN115396434B (en) | A message processing method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |