Real-time delivery method, device, electronic device and storage medium
By using a real-time delivery method and employing delivery strategies to control offset duration, sampling duration, and delivery frequency, the real-time performance and resource consumption issues of data statistics and information delivery in internet services are resolved, enabling rapid response and system optimization.
Patent Information
- Application Number
- CN202111202943.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-15
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2041-10-15
AI Technical Summary
Existing internet services often employ methods for data statistics or information delivery that lack real-time performance and require significant computing and coordination resources, resulting in complex and large systems.
A real-time delivery method is provided, which obtains the configured delivery strategy, receives the reported information from the client, and sends delivery information to the client according to the strategy processing results, including the control of offset duration, sampling duration and delivery number, so as to achieve real-time processing and fast response.
It enables real-time processing of user actions, optimizes system processes, reduces service component dependencies, improves computing response speed, simplifies system architecture, and reduces hardware and development costs.
Smart Images

Figure CN113949736B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and more specifically, to a real-time delivery method, device, electronic device and storage medium. Background Art
[0002] Internet services generally use log analysis to conduct data statistics or information delivery. This means recording all logs, performing data calculations using offline log calculations or quasi-real-time log stream processing, processing user actions based on strategies, and then guiding future operations on this user.
[0003] This method is not very real-time, and requires a lot of computing resources and coordination of many related development resources, resulting in a large and complex system. Summary of the invention
[0004] In view of this, in order to solve the above problems, the present invention provides a real-time delivery method, device, electronic device and storage medium, and the technical solution is as follows:
[0005] One aspect of the present invention provides a real-time delivery method, the method comprising:
[0006] Get the delivery strategy of the configured target action;
[0007] Receiving reporting information of the client for the target action;
[0008] The reported information is processed according to the delivery strategy, and delivery information is sent to the client based on the processing result of the reported information.
[0009] Preferably, the delivery strategy includes an offset duration, a sampling duration, and a number of issuances, and the number of issuances corresponds to the number of samples;
[0010] The processing of the reported information according to the delivery strategy, and sending the delivery information to the client based on the processing result of the reported information, includes:
[0011] Determining a processing period according to the offset duration;
[0012] Sampling the reported information within the processing period according to the sampling duration to obtain a target sampling quantity;
[0013] A target delivery number corresponding to the target sampling number is determined, and delivery information matching the target delivery number is delivered to the client.
[0014] Preferably, sampling the reported information within the processing period according to the sampling duration includes:
[0015] Deduplication of the reported information within the processing period;
[0016] The deduplication result of the reported information is sampled according to the sampling duration.
[0017] Preferably, the method further comprises:
[0018] A strategy name of the delivery strategy is calculated according to the target action and the offset duration, and the strategy name can uniquely mark the delivery strategy.
[0019] Another aspect of the present invention provides a real-time delivery device, the device comprising:
[0020] The strategy acquisition module is used to obtain the delivery strategy of the configured target action;
[0021] The real-time delivery module is used to receive the reported information of the client for the target action; process the reported information according to the delivery strategy, and send the delivery information to the client based on the processing result of the reported information.
[0022] Preferably, the delivery strategy includes an offset duration, a sampling duration, and a number of issuances, and the number of issuances corresponds to the number of samples;
[0023] The real-time delivery module for processing the reported information according to the delivery strategy and sending the delivery information to the client based on the processing result of the reported information is specifically used for:
[0024] Determine a processing period according to the offset duration; sample the reported information within the processing period according to the sampling duration to obtain a target sampling quantity; determine a target number of delivery times corresponding to the target sampling quantity, and deliver delivery information matching the target number of delivery times to the client.
[0025] Preferably, the real-time delivery module for sampling the reported information within the processing period according to the sampling duration is specifically used for:
[0026] Deduplication is performed on the reported information within the processing time period; and deduplication results of the reported information are sampled according to the sampling duration.
[0027] Preferably, the real-time delivery module is also used for:
[0028] A strategy name of the delivery strategy is calculated according to the target action and the offset duration, and the strategy name can uniquely mark the delivery strategy.
[0029] Another aspect of the present invention provides an electronic device, comprising: at least one memory and at least one processor; the memory stores a program, the processor calls the program stored in the memory, and the program is used to implement the real-time delivery method.
[0030] Another aspect of the present invention provides a storage medium, wherein the storage medium stores computer executable instructions, and the computer executable instructions are used to execute the real-time delivery method.
[0031] Compared with the prior art, the present invention has the following beneficial effects:
[0032] The present invention provides a real-time delivery method, device, electronic device and storage medium. For the target action of the client, once the client's reported information is received, it can be processed according to the configured delivery strategy, so as to send the delivery information to the client based on the processing result. Based on the present invention, the user's action can be processed in real time, so as to quickly send the relevant delivery information, thereby achieving the purpose of optimizing the system process, reducing the dependence of a large number of service components, and improving the calculation response. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0034] Figure 1 A method flow chart of a real-time delivery method provided by an embodiment of the present invention;
[0035] Figure 2 A partial method flow chart of the real-time delivery method provided by an embodiment of the present invention;
[0036] Figure 3 Another part of the method flow chart of the real-time delivery method provided by the embodiment of the present invention;
[0037] Figure 4 A schematic diagram of the structure of a real-time delivery device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0040] The embodiment of the present invention provides a real-time delivery method, which can be applied to the fields of data statistics and information delivery. The method is specifically applied to the server. The method flow chart is as follows: Figure 1 As shown, the following steps are included:
[0041] S10, obtaining the configured delivery strategy of the target action.
[0042] In the embodiment of the present invention, the target action is an action specified by the administrator, which may be a click operation, a statistically countable gesture, or a motion trajectory, such as a login action, a registration action, etc. The embodiment of the present invention does not limit this.
[0043] In addition, the administrator can configure at least one delivery strategy for the target action by configuring the strategy parameters, and the strategy parameters of the delivery strategy are stored in a certain format in the storage medium of the server. For example, for the login action, different delivery strategies can be configured for clients in different geographical areas.
[0044] Specifically, according to business needs, the administrator configures relevant policy parameters for a delivery strategy of the target action, which include but are not limited to the offset duration, sampling duration and number of deliveries, and the number of deliveries corresponds to the number of samples. Among them, the offset duration represents the time interval between two samples of the server, the sampling duration represents the duration of each sampling of the server, the number of deliveries represents the number of deliveries of the delivery information, and the number of samples is the number of samples sampled by the server within the sampling duration.
[0045] Of course, a delivery strategy may correspond to at least one delivery information, and the delivery information is the content resource sent to the client, such as advertising information.
[0046] S20, receiving reporting information of the client regarding the target action.
[0047] In the embodiment of the present invention, the client can obtain actions corresponding to different delivery strategies from the server, that is, the client and the server determine the actions they monitor through communication interaction. For the target action, once the client monitors the occurrence of the target action during operation, it will immediately report to the server.
[0048] The client's reporting information includes at least an action tag representing the target action and an identity tag representing the client. Based on the action tag and identity tag in the reporting information, the server can determine that the client has the target action, and if the communication delay is ignored, the server can use the client's reporting time as the occurrence time of the target action. Of course, if the communication delay is not ignored, the client's reporting information can include the occurrence time of the target action, and the embodiment of the present invention does not limit this. After reporting to the server, the client can wait for the delivery information sent by the server. After obtaining the delivery information, the client completes the broadcast.
[0049] In addition, the server can set up an API interface for communicating with the client. Through the API interface, the client can determine the target action and report it to the server, and the server sends the delivery information to the client.
[0050] S30, processing the reported information according to the delivery strategy, and sending the delivery information to the client based on the processing result of the reported information.
[0051] In the embodiment of the present invention, for the client's reported information, the server, on the one hand, screens the reported information according to the target action, and on the other hand, performs real-time statistics on the reported information under the target action. Specifically, the target action and the client generating the target action can be classified according to the action tag and identity tag in the reported information, and the classified clients can be counted according to the occurrence time of their target actions to determine the number of clients generating the target action at different times, thereby completing information delivery.
[0052] In the specific implementation process, step S30 "processing the reported information according to the delivery strategy, and sending the delivery information to the client based on the processing result of the reported information" can adopt the following steps, and the method flow chart is as follows: Figure 2 As shown:
[0053] S301, determining a processing period according to the offset duration.
[0054] In the embodiment of the present invention, since the offset duration represents the time interval between two samplings of the server, the corresponding processing period can be determined based on the offset duration, and the duration of each processing period is the same as the time interval.
[0055] S302: Sample the reported information within the processing period according to the sampling duration to obtain a target sampling quantity.
[0056] In the embodiment of the present invention, for the reporting information of the client, the server can determine the occurrence time of the corresponding target action, and classify the reporting information into the processing time period based on the occurrence time.
[0057] Furthermore, the server samples the reported information within the processing period for a corresponding period of time according to the sampling duration. Since a reported information contains at least one action tag and one identity tag, for a reported information of a client, the action that occurred can be determined by identifying the action tag therein, and then the identity tags of all clients under the same action are sampled. The number of identity tags sampled by the server under the target action is the target sampling number for this sampling.
[0058] The server can store the target sampling quantity according to the action dimension and the time dimension, that is, the corresponding target sampling quantity is stored for each processing period under the target action.
[0059] In some other embodiments, in order to avoid the impact of repeated target actions on the delivery caused by the client due to its own reasons, in the embodiment of the present invention, the target actions of the client are extracted for the first time. Figure 3 In the method flow chart shown in FIG. 1 , step S302 “sampling the reported information within the processing period according to the sampling duration” can adopt the following steps:
[0060] S3021, deduplicate the reported information within the processing period.
[0061] In the embodiment of the present invention, for a processing period, the target action that occurs in the client during the processing period is extracted for the first time. That is, during the processing period, a client takes a target action once, which can be achieved by removing duplicates from the sampled identity tags. Specifically, a set can be set according to the target action and the processing period. Specifically, the identity tag under the target action can be determined according to the action tag in the reported information, and the identity tags in the processing period are stored in a set, and the characteristics of the set are used to automatically remove duplicates.
[0062] S3022: Sample the deduplication results of the reported information according to the sampling duration.
[0063] In the embodiment of the present invention, for a processing period, the deduplication result is sampled according to the sampling duration to obtain the corresponding target sampling quantity.
[0064] S303, determining a target delivery number corresponding to the target sampling number, and delivering delivery information matching the target delivery number to the client.
[0065] In the embodiment of the present invention, since the number of transmissions corresponds to the number of samples, the corresponding target number of transmissions can be determined according to the target number of samples. Take the scenario of deduplication of reported information as an example. For example, there are 100 clients logging in during a processing period, and one client logs in once. The server samples the identity tags in the information reported by the 100 clients according to the sampling duration. Assuming that the target number of samples is 10 and the corresponding target number of transmissions is 5, the server transmits the delivery information to 5 of the 10 sampled clients. Of course, the actual effect is that the server transmits the delivery information to 5 of the 100 clients.
[0066] In some other embodiments, in order to facilitate managers to screen and manage delivery strategies, embodiments of the present invention can set a policy name for the delivery strategy based on policy parameters, and the policy name can uniquely mark the delivery strategy. Specifically, the policy name of the delivery strategy can be calculated based on the target action and the offset duration, that is, the processing time period is determined based on the offset duration, and the policy name is in the form of "target action + processing time period". In addition, the target action and the processing time period can be encoded in an encoding manner (such as hash encoding), and the encoding result is used as the policy name of the delivery strategy. The policy name can be used as the name of the set corresponding to the corresponding processing time period. By matching the processing time period and the policy name, the identity tag of the information reported in the processing time period can be placed in the corresponding set.
[0067] The real-time delivery method provided by the embodiment of the present invention can process the user's actions in real time, so as to quickly send down the relevant delivery information, thereby achieving the purpose of optimizing the system process, reducing the dependence of a large number of service components, and improving the calculation response. In addition, the statistical screening of the present invention is carried out in real time, which improves the response time and production efficiency compared to the offline calculation and quasi-real-time calculation screening in the log mode, simplifies the system architecture, reduces the system's dependence on external series components, reduces hardware costs, and facilitates development, reduces development costs, and improves production efficiency.
[0068] Based on the real-time delivery method provided in the above embodiment, an embodiment of the present invention provides a device for executing the real-time delivery method. The structural diagram of the device is shown in FIG. Figure 4 As shown, including:
[0069] A strategy acquisition module 10 is used to acquire the delivery strategy of the configured target action;
[0070] The real-time delivery module 20 is used to receive the reported information of the client for the target action; process the reported information according to the delivery strategy, and send the delivery information to the client based on the processing result of the reported information.
[0071] Optionally, the delivery strategy includes an offset duration, a sampling duration, and a number of delivery times, where the number of delivery times corresponds to the number of samples;
[0072] The real-time delivery module 20 is used to process the reported information according to the delivery strategy and send the delivery information to the client based on the processing result of the reported information, specifically used for:
[0073] Determine the processing period according to the offset duration; sample the reported information within the processing period according to the sampling duration to obtain the target sampling number; determine the target number of delivery times corresponding to the target sampling number, and deliver delivery information matching the target number of delivery times to the client.
[0074] Optionally, the real-time delivery module 20 for sampling the reported information within the processing period according to the sampling duration is specifically used for:
[0075] De-duplicate the reported information within the processing period; and sample the de-duplicated results of the reported information according to the sampling duration.
[0076] Optionally, the real-time delivery module 20 is further used for:
[0077] The strategy name of the delivery strategy is calculated based on the target action and offset duration. The strategy name can uniquely identify the delivery strategy.
[0078] It should be noted that the detailed functions of each module in the embodiment of the present invention can be found in the corresponding disclosed part of the above-mentioned real-time delivery method embodiment, and will not be repeated here.
[0079] Based on the real-time delivery method provided in the above embodiment, an embodiment of the present invention provides an electronic device, which includes: at least one memory and at least one processor; the memory stores a program, the processor calls the program stored in the memory, and the program is used to implement the real-time delivery method.
[0080] Based on the real-time delivery method provided in the above embodiment, an embodiment of the present invention provides a storage medium correspondingly, in which computer executable instructions are stored, and the computer executable instructions are used to execute the real-time delivery method.
[0081] The above is a detailed introduction to a real-time delivery method, device, electronic device and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
[0082] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0083] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device that includes a series of elements is inherent to the elements, or also includes elements inherent to these processes, methods, articles or devices. In the absence of further restrictions, the elements defined by the sentence "including a..." do not exclude the presence of other identical elements in the process, method, article or device that includes the elements.
[0084] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A real-time delivery method, characterized in that: The method comprises: Get the delivery strategy of the configured target action; Receiving reporting information of the client for the target action; Processing the reported information according to the delivery strategy, and sending the delivery information to the client based on the processing result of the reported information; The delivery strategy includes an offset duration, a sampling duration, and a number of issuances, and the number of issuances corresponds to the number of samples; The processing of the reported information according to the delivery strategy, and sending the delivery information to the client based on the processing result of the reported information, includes: Determining a processing period according to the offset duration; Sampling the reported information within the processing period according to the sampling duration to obtain a target sampling quantity; A target delivery number corresponding to the target sampling number is determined, and delivery information matching the target delivery number is delivered to the client.
2. The method according to claim 1, characterized in that The sampling of the reported information within the processing period according to the sampling duration includes: Deduplication of the reported information within the processing period; The deduplication result of the reported information is sampled according to the sampling duration.
3. The method according to claim 1, characterized in that The method further comprises: A strategy name of the delivery strategy is calculated according to the target action and the offset duration, and the strategy name can uniquely mark the delivery strategy.
4. A real-time delivery device, characterized in that: The device comprises: The strategy acquisition module is used to obtain the delivery strategy of the configured target action; A real-time delivery module, configured to receive the reported information of the client for the target action; process the reported information according to the delivery strategy, and send the delivery information to the client based on the processing result of the reported information; The delivery strategy includes an offset duration, a sampling duration, and a number of issuances, and the number of issuances corresponds to the number of samples; The real-time delivery module for processing the reported information according to the delivery strategy and sending the delivery information to the client based on the processing result of the reported information is specifically used for: Determine a processing period according to the offset duration; sample the reported information within the processing period according to the sampling duration to obtain a target sampling quantity; determine a target number of delivery times corresponding to the target sampling quantity, and deliver delivery information matching the target number of delivery times to the client.
5. The device according to claim 4, characterized in that The real-time delivery module for sampling the reported information within the processing period according to the sampling duration is specifically used to: Deduplication is performed on the reported information within the processing time period; and deduplication results of the reported information are sampled according to the sampling duration.
6. The device according to claim 4, characterized in that The real-time delivery module is also used for: A strategy name of the delivery strategy is calculated according to the target action and the offset duration, and the strategy name can uniquely mark the delivery strategy.
7. An electronic device, characterized in that: The electronic device includes: at least one memory and at least one processor; the memory stores a program, the processor calls the program stored in the memory, and the program is used to implement the real-time delivery method described in any one of claims 1-3.
8. A storage medium, characterized in that: The storage medium stores computer executable instructions, and the computer executable instructions are used to execute the real-time delivery method described in any one of claims 1-3.
Citation Information
Patent Citations
Method and apparatus for building advertisement index
CN106227796A
Classification model training method, classification method, related equipment and classification system
CN110704706A