Event processing based on multiple time windows
By using multiple time windows in event processing, combining long-term and short-term data to train event models, the problem of difficult balance between immediacy and accuracy in the existing technology is solved, and more accurate and real-time are achieved event prediction.
Patent Information
- Application Number
- CN202380037041.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-04-28
- Filing Date
- 2023-04-25
- Publication Date
- 2024-12-06
AI Technical Summary
Existing event processing methods are difficult to balance between immediacy and accuracy. The training data sets within a fixed time window can only reflect event trends within a specific time period and cannot make accurate predictions for long-term or short-term.
Using an event processing method based on multiple time windows, by obtaining data associated with long-term windows and short-term windows, the event model is trained to describe the association relationship between objects and events, combining long-term data to increase accuracy and short-term data to increase immediacy , generate long-term and short-term samples for training the initial model, optimizing the event model to provide more accurate predictions.
It significantly improves the accuracy and immediacy of the event model, can show better performance in both long-term and short-term predictions, and achieves more comprehensive and accurate predictions of event trends.
Smart Images

Figure CN119096238A_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to U.S. patent application No. 17 / 731,939, filed on April 28, 2022, entitled “Event Processing Based on Multiple Time Windows,” the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates generally to event processing and, more particularly, to methods, apparatus, and computer program products for event processing based on multiple time windows. Background Art
[0004] Nowadays, machine learning technology has been widely used in data processing. For example, in a recommendation environment, data such as messages, advertisements, etc. can be provided to users. Then, users can subscribe to the channel that provides the data, purchase the products recommended in the data, and so on. At this time, events related to the channel, product, etc. can be received. Solutions for predicting future event trends have been proposed. However, these solutions cannot strike a balance between immediacy and accuracy. At this time, how to process events in a more efficient way has become a hot topic. Summary of the invention
[0005] In a first aspect of the present disclosure, a method for event processing is provided. In the method, first data associated with a first time window is obtained, the first data includes a first object and a first group of events, and the first group of events is related to the first object. Second data associated with a second time window is obtained, the second data includes a second object and a second group of events, the second group of events is related to the second object, and the second time window is different from the first time window. An event model is determined based on the first data and the second data, the event model describes the association relationship between the object and the event, and the event is related to the object.
[0006] In a second aspect of the present disclosure, an electronic device is provided, comprising: a computer processor coupled to a computer readable storage unit, the storage unit comprising instructions, which implement the method according to the first aspect of the present disclosure when executed by the computer processor.
[0007] In a third aspect of the present disclosure, a computer program product is provided, which includes a computer-readable storage medium having program instructions implemented therewith, and the program instructions can be executed by an electronic device to enable the electronic device to perform the method according to the first aspect of the present disclosure.
[0008] The present invention summary is provided to introduce alternative concepts in a simplified form, which are further described in the detailed description below. The present invention summary is not intended to identify the key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed technical solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of some implementations of the present disclosure in the accompanying drawings, in which like reference numerals generally refer to like parts throughout the implementations of the present disclosure.
[0010] Figure 1 illustrates an example environment for event processing based on machine learning techniques;
[0011] Figure 2 illustrates an example diagram of events received at different points in time according to an implementation of the present disclosure;
[0012] Figure 3 An example diagram illustrating an event model based on multiple time windows according to an implementation of the present disclosure is illustrated;
[0013] Figure 4A An example diagram illustrating long-term samples based on a long-term window according to an implementation of the present disclosure is illustrated;
[0014] Figure 4B An example diagram illustrating short-term samples based on a short-term window according to an implementation of the present disclosure is illustrated;
[0015] Figure 5 An example diagram illustrating a performance comparison between an event model according to an implementation of the present disclosure and a traditional event model;
[0016] Figure 6 An example diagram illustrating an event model based on multiple time windows according to an implementation of the present disclosure is illustrated;
[0017] Figure 7 An example diagram illustrating a performance comparison between an event model according to an implementation of the present disclosure and a traditional event model;
[0018] Figure 8 An example flow chart illustrating a method for event processing based on multiple time windows according to an implementation of the present disclosure; and
[0019] Fig. 9 Illustrated is a block diagram of a computing device in which various implementations of the present disclosure may be implemented. DETAILED DESCRIPTION
[0020] The principle of the present disclosure will now be described in conjunction with some implementations. It should be understood that describing these implementations is only for illustrative purposes, and helps those skilled in the art to understand and implement the present disclosure, rather than constituting any limitation to the scope of the present disclosure. The disclosure described herein can be implemented in various ways except for the way described below.
[0021] In the following description and claims, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.
[0022] References in this disclosure to "one implementation," "an implementation," "an example implementation," etc. indicate that the implementation being described may include a particular feature, structure, or characteristic, but not every implementation necessarily includes the particular feature, structure, or characteristic. Furthermore, such phrases do not necessarily refer to the same implementation. Additionally, when a particular feature, structure, or characteristic is described in conjunction with an example implementation, it is considered to be within the knowledge of those skilled in the art to affect such feature, structure, or characteristic in relation to other implementations, whether or not explicitly described.
[0023] It should be understood that although the terms "first" and "second" etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element without departing from the scope of example implementations. As used herein, the term "and / or" includes any and all combinations of one or more of the listed terms.
[0024] The terms used herein are for the purpose of describing particular implementations only and are not intended to limit example implementations. As used herein, the singular forms "a", "an", and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "including", "having", when used herein, specify the presence of stated features, elements, and / or components, etc., but do not exclude the presence or addition of one or more other features, elements, components, and / or combinations thereof.
[0025] The principle of the present disclosure will now be described in conjunction with some implementations. It should be understood that describing these implementations is only for illustrative purposes, and helps those skilled in the art to understand and implement the present disclosure, and is not intended to constitute any limitation to the scope of the present disclosure. The disclosure described herein can be implemented in a variety of ways except for the manner described below. In the following description and claims, unless otherwise defined, all technical and scientific terms used herein have the same meanings as those of ordinary skill in the art to which the present disclosure belongs.
[0026] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant rules.
[0027] It is understandable that before using the technical solutions disclosed in various implementations of this disclosure, users should be informed of the type, scope of use and usage scenarios of the personal information involved in this disclosure in an appropriate manner. In accordance with the provisions of relevant laws and regulations, the user's authorization should be obtained.
[0028] For example, in response to receiving an active request from a user, a prompt message is sent to the user, clearly informing the user that the requested operation requires obtaining and using the user's personal information. Therefore, the user can independently choose whether to provide personal information to the electronic device, application, server, storage medium or other software or hardware that executes the operation of the technical solution of the present disclosure according to the prompt message.
[0029] As an optional but non-limiting implementation, in response to receiving an active request from the user, the method of sending the prompt information to the user may include, for example, a pop-up window, and the prompt information may be presented in the form of text in the pop-up window. In addition, the pop-up window may also have a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0030] It is understandable that the above process of notifying and obtaining user authorization is only exemplary and does not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations are also applicable to the implementation of the present disclosure.
[0031] For the purpose of description, more details will be provided below by taking a recommendation system as an example environment. In a recommendation system, various objects can be sent to users. Sometimes, a user is interested in an object and then performs a subscription or order. If the user is not interested in the object, he / she can pass the object and do nothing. So far, solutions for generating event models to predict future events related to an object have been provided. In the following, reference will be made to Figure 1 For more details about the event model, see Figure 1 An example environment 100 for event processing based on machine learning techniques is illustrated.
[0032] exist Figure 1 In the example, the event model 130 can be provided for event processing. Here, the environment 100 includes a training system 150 and an application system 152 . Figure 1The upper part of shows the training phase, and the lower part shows the application phase. Before the training phase, the event model 130 can be configured with untrained or partially trained parameters (such as initial parameters, or pre-trained parameters). In the training phase, based on a training data set 110 including a plurality of training data 112, the event model 130 can be trained in a training system 150. Here, each training data 112 can have a two-tuple format and can include data 120 (e.g., data associated with an object and an event related to the object) and a label 122 for the event. Specifically, a large amount of training data 112 can be used to iteratively implement the training phase. After the training phase, the parameters of the event model 130 can be updated and optimized, and an event model 130' with trained parameters can be obtained. At this point, in the application phase, the event model 130' can be used to implement the prediction task. For example, the data to be processed 140 can be input into the application system 152, and then the corresponding prediction 144 can be output.
[0033] exist Figure 1 In the present invention, the model training system 150 and the model application system 152 may include any computing system with computing capabilities, such as various computing devices / systems, terminal devices, servers, etc. The terminal device may involve any type of mobile device, fixed terminal or portable device, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet computer, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. The server may include but is not limited to a mainframe, an edge computing node, a computing device in a cloud environment, etc. It should be understood that Figure 1 The components and devices in the environment 100 are only examples, and a computing system suitable for implementing the example implementations described in the present disclosure may include one or more different components and other components. For example, the training system 150 and the application system 152 can be integrated in the same system or device.
[0034] like Figure 1 As shown in FIG. 1 , the training data set 110 may include historical training data 112, which is collected from data logs of the recommendation system according to the requirements of the corresponding laws and regulations and related rules. However, the performance of the event model 130 ′ is closely related to the time span of the historical training data 112. The events received in the data recommendation system will refer to Figure 2 ,here Figure 2 An example diagram 200 of events received at different points in time is illustrated in accordance with an implementation of the present disclosure.
[0035] During the operation of the recommendation system, many objects may be provided to the user. Taking object 210 (such as a message, advertisement, etc.) as an example, object 210 may be provided to the user at time point T0, for example, object 210 may be displayed on the user's terminal device. Then, multiple events related to object 210 and the user may be received. For example, a start event 212 (e.g., an event indicating that the user opens object 210) may be received at time point T1. Further, after the start event 212, more in-depth events may be received. Figure 2 , at subsequent time points T2 and Tn-1, another event 214 and another event 216 related to object 210 may be received, respectively. It should be understood that the data about users, objects, and events may not include any sensitive information. For example, all data may be collected according to the requirements of the corresponding laws and regulations and related rules, and then may be converted into an invisible format (such as embedded) for protection purposes.
[0036] In the context of the present disclosure, events 214 and 216 may be referred to as conversion events, and the conversion events here indicate that user behavior is converted into deeper interaction with the recommendation system. Generally, conversion rate is a key factor for measuring whether an object attracts the user's attention, so event processing has recently become a hot topic.
[0037] Based on training data sets within a specific time window, a number of solutions for event processing have been proposed. However, training data sets within a fixed time window can only reflect the trend of events received within a fixed time period. For example, data within a day (or another time period) can be used to train a Figure 1 . Since the time window only includes one day, although the event model 130' can describe the trend of whether a specific event is received within one day, it cannot make long-term predictions. In other words, although the event model 130' increases the immediacy in the prediction, the long-term accuracy level of the event model 130' is not satisfactory. In another example, if the time window includes a longer period of time, such as 7 days, although the event model 130' can provide long-term trends, it cannot achieve short-term predictions. At this time, it is expected that the event model 130' can have better performance in both long-term / short-term predictions.
[0038] In view of this, the present disclosure proposes an event processing solution based on multiple time windows. Figure 2As illustrated in , the timeline can be divided into a long-term window 230 (also referred to as a first time window) and a short-term window 220 (also referred to as a second time window), so that data associated with multiple time windows can be used to train the event model. In an implementation of the present disclosure, the short-term window 220 and the long-term window 230 can cover different time periods, and the data within the multiple time windows are considered during the training phase. Therefore, the trained event model can provide more accurate predictions for the short-term window 220 as well as the long-term window 230.
[0039] In the following, reference Figure 3 to learn more details about event handling. Figure 3 An example diagram 300 of an event model 370 based on multiple time windows according to an implementation of the present disclosure is illustrated. Figure 3 In the example, the long-term data 310 (also referred to as first data) associated with the long-term window 230 and the short-term data 320 (also referred to as second data) associated with the short-term window 220 can be obtained from the data log in the recommendation system. Taking the long-term window 230 as an example, the long-term data 310 may include a first object and a first group of events related to the first object within the long-term window. Figure 2 For the object 210 in the long-term window 230, the long-term data 310 may include the identification of the object 210 and the first group of events 212, 214 and 216 within the long-term window 230. Similarly, for the short-term window 220, the short-term data 320 may include the identification of the object 210 and the second group of events 212 and 214 within the short-term window 220.
[0040] Further, based on the long-term data 310 and the short-term data 320, the event model 370 can be trained so that the event model 370 can describe the association relationship between the object and the event related to the object. In the data recommendation system, the event model 370 can be trained by historical data, which is collected during the previous operation of the recommendation system, and then the event model 370 can be used to predict whether a specific event (such as an event related to a subscription or order from the user) will be received when the target object is displayed to the user. Here, the long-term data 310 can increase the accuracy level of the event model 370, and the short-term data 320 can increase the immediacy level of the event model 370.
[0041] In the implementation of the present disclosure, the short-term window 220 and the long-term window 230 may have different time periods. Here, the length of the window may have a predetermined value. For example, the short-term window 220 may be set to one day (or another value), and the long-term window 230 may have another length (such as 7 days) longer than the short-term window 230. Alternatively and / or additionally, the length may be determined based on statistical data associated with different events. For example, if statistics show that simple events (such as events related to subscriptions) are typically received within 12 hours after the start event for the object, the short-term window 220 may be set to 12 hours. If statistics show that deeper events (such as events related to subscriptions) are typically received within 7 days, the long-term window 230 may be set to 24*7=168 hours.
[0042] Once the short-term window 220 and the long-term window 230 are determined, the respective data of the above two windows can be obtained. The following will take the long-term window 230 as an example to provide more details about data acquisition. At the same time, similar steps for the short-term window 220 can be implemented. In an implementation of the present disclosure, the data log in the recommendation system can be analyzed to extract long-term data 310. Table 1 shows an example data structure of the data log.
[0043] Table 1 Example data structure of data log
[0044] Serial number Object ID Send time event Event time 1 Subject 1 T11 Start Event T21 2 Subject 1 T12 Conversion events T22 3 Subject 2 T13 Start Event T23 …… …… …… …… …… N Object k T14 Conversion events T24
[0045] In Table 1, "Sequence Number" represents the number of the log, "Object ID" represents the ID of the object sent to the user, "Send Time" represents the time point when the object is sent to the user, "Event" represents the event type event of the event, and "Event Time" represents the time point when the event related to the object is received. It should be understood that the "Send Time" and "Event Time" in Table 1 can be measured by the system timestamp of the recommendation system and then represented by embedding to remove sensitive information. For example, "T11" indicates that "Object 1" was sent at time point T11. The data log shown in Table 1 can be updated in real time during the operation of the recommendation system, and the training phase can be implemented in an iterative manner. In order to obtain long-term data 310, objects sent within the long-term window 230 can be identified. Assume that the long-term window 230 is set to 7 days and the current time is represented as T current , then the logs with "sending time" within 7 days can be retrieved. current -7*24*60*60 (i.e. 7 days ago) and T currentThe logs with "sent time" between can be retrieved from Table 1. Alternatively and / or additionally, to ensure that the event is indeed associated with the long-term window 230, a rule can be defined: "sent time" should be within the range starting from 7 days. For example, in T current -7*24*60*60 (i.e. 7 days ago) and T current - Logs with "sending time" between 6*24*60*60 (ie, 6 days ago) can be retrieved from Table 1.
[0046] Table 2 Example log
[0047] Serial number Object ID Send time event Event time 1 Subject 1 T11 Start Event T21 2 Subject 1 T12 Conversion events T22 …… …… …… …… ……
[0048] Table 2 shows the logs that satisfy the above rules. As shown in Table 2, the object "object 1" is sent between the required time periods, then the events related to the object "object 1" are within the long-term window 230 and can be regarded as a set of events for the object "object 1". In Table 2, the start event with an "event time" of "T21" and the transition event with an "event time" of "T22" can be obtained. Further, similar steps for the short-term window 220 can be implemented to obtain short-term data 320. Utilizing the implementation method of the present disclosure, by filtering the data logs in the recommendation system, long-term data 310 and short-term data 320 can be easily and effectively obtained. In addition, the long-term data 310 and the short-term data 320 can increase the immediacy and accuracy level of the event model 370.
[0049] In an implementation of the present disclosure, long-term data 310 and short-term data 320 may be processed to generate corresponding training samples of two time windows. Specifically, long-term samples may be generated from long-term data 310, and short-term samples may be generated from short-term data 320. Further, by training an initial model using long-term samples and short-term samples, an event model 370 may be obtained. Figure 4A An example diagram 400A of a long-term sample 410A based on a long-term window 230 according to an implementation of the present disclosure is illustrated. Here, the long-term sample 410A may include: an object ID 420A for indicating the identification of an object related to an event; a sending time 422A for indicating a point in time when the object is sent; an event 424A for indicating an event type of the event; and an event time 426A for indicating a point in time when the event is received. In addition, the long-term sample 410A may include a tag 428A for indicating whether the retrieved event group includes a conversion event.
[0050] In an implementation of the present disclosure, a long-term sample 410A may be generated based on the long-term data 310, wherein the object ID 420A, the transmission time 422A, the event 424A, and the event time 426A may be read directly from Table 2. With regard to the tag 428A, it may be determined from the long-term data 310 by checking whether a conversion event for an object is included in Table 2. Initially, for a particular object, when a start event related thereto is received, the tag 428A may be set to negative. As shown in Table 2, for the object "object 1", the start event is received at time point "T21", and therefore the tag 428A may be set to a negative value (such as -1 or other values). In addition, the tag 428A may be updated to a positive value (such as 1 or other values) because the conversion event is received at time point "T22" after the start event. Therefore, the long-term sample 410A may be represented as a vector of (object 1, T21, open, T22, 1). It should be understood that all data in long-term sample 410A is represented in an invisible format and does not include sensitive information.
[0051] It should be understood that the above only provides a simple case of generating a long-term sample 410A for the object "object 1". In general, more than one object can be found from the data log, and thus each object can be processed in a similar manner to generate a corresponding sample. For example, in T current -7*24*60*60 and T current -6*24*60*60 can retrieve multiple objects with "sending time", and then a separate sample can be generated from each of the multiple objects.
[0052] Details for generating the long-term sample 410A have been provided above. In addition, this step may be repeated for all short-term data 320 to generate short-term samples in a similar manner. Figure 4B An example diagram 400B of a short-term sample 410B based on a short-term window 220 according to an implementation of the present disclosure is illustrated. Similarly, the short-term sample 410B may include: an object ID 420B, a sending time 422B, an event 424B, an event time 426B, and a label 428B. Assume that the object "object 3" is extracted from the short-term data 320, and an event related to the object "object 3" can be determined. Within the short-term window 220, if no conversion event is detected after the start event, the short-term sample 410B can be represented as a vector of (object 3, time 1, open, time 2, -1). If a conversion event is detected, the short-term sample 410B can be represented as a vector of (object 3, time 1, conversion, time 3, -1). Here, "time" represents the sending time for the object "object 3", "time 2" represents the event time for the start event, and "time" represents the event time for the conversion event.
[0053] With these implementations, long-term data 310 and short-term data 320 may be processed in a similar manner, and thus long-term samples 410A and short-term samples 410B may be generated in an easy and efficient manner.
[0054] return Figure 3 , the event model 370 may include: a long-term model 340 (also referred to as a first model) between an object and a first prediction, the first prediction indicating whether a conversion event is received within a first time window; a short-term model 342 (also referred to as a second model) between an object and a second prediction, the second prediction indicating whether a conversion event is received within a second time window. Therefore, the two models may describe corresponding event trends for the long-term window 230 and the short-term window 220. Further, the shared model 330 represents a model shared by the long-term model 340 and the short-term model 342. Each model may include more than one layer and may be implemented by an existing machine learning model.
[0055] In an implementation of the present disclosure, a long-term model 340 and a short-term model 342 may be obtained by training corresponding parts of the initial model using long-term samples 410A and short-term samples 420B, respectively. The training phase will be described below by taking the long-term window 230 as an example. For example, the initial model may include an initial long-term model, and then the initial long-term model may be trained by the long-term sample 410A. Specifically, data other than the label 428A in the long-term sample 410A may be input, and then a prediction may be output from the initial long-term model, and then output at the label 360 from the event model 370. Further, the prediction may be compared with the label 428A in the long-term sample 410A to determine the loss, and then the parameters in the initial long-term model may be optimized in the direction of minimizing the loss.
[0056] In the implementation of the present disclosure, the initial long-term model can be iteratively trained using multiple long-term samples so that the long-term model 340 can be well trained. Based on the short-term sample 420B, the initial short-term model can be processed in a similar manner, and then a well-trained short-term model 342 can be obtained. Using these implementations of the present disclosure, once the long-term model 340 and the short-term model 342 are obtained, the event model 370 including the two models 340 and 342 can be run together to provide a final prediction. Using these implementations of the present disclosure, the long-term / short-term aspects of event trends are taken into account in the event model 370, and then the accuracy and immediacy level of the event model 370 can be significantly improved.
[0057] Further, data associated with the target object can be input into the event model 370 for prediction. For example, the input data can be represented in a vector of (object ID, send time, event, event time). Here, the object ID represents the object sent to the user, and the send time represents the time point when the object is sent. The event represents the start event, that is, it indicates that the object is opened by the user, and the event time represents the time point when the object is opened by the user. In this example, if the object "object 4" is sent at the time point of "time 4" and is opened by the user at the time point of "time 5", the vector can be represented as (object 4, time, open, time 5).
[0058] The vector may be input into event model 370, and then long-term model 340 may output long-term prediction 352, which indicates the probability of a conversion event being received within 7 days for object "object 4". Meanwhile, short-term model 342 may output short-term prediction 354, which indicates the probability of a conversion event related to object "object 4" being received within one day. Further, based on the following formula 1, event model 370 may output a final prediction, which indicates whether the conversion event is to be received.
[0059] pre final =(pre long +pre short ) / 2
[0060] Formula 1
[0061] In formula 1, pre final Represents the final prediction for event prediction, pre long Indicates long-term forecast 352, pre short Denotes short-term prediction 354. In Formula 1, long-term prediction 352 and short-term prediction 354 provide equal contributions to the final prediction. Since event model 370 considers both immediacy and accuracy for events, future predictions can be based on the advantages of immediacy and accuracy, and thus predictions can be achieved in a more efficient manner.
[0062] Figure 5 An example diagram 500 is shown comparing the performance of an event model according to an implementation of the present disclosure with a traditional event model. In general, the area under the line (AUC) represents the performance of a prediction model, and the closer the prediction is to 1, the more accurate the prediction model is. Figure 5 , curve 510 indicates the AUC value of the traditional event model trained based on a single time window, and curve 520 indicates the AUC value of the event model 370 based on multiple time windows. Obviously, curve 520 is closer to 1 than curve 510, which indicates that event model 370 has better performance than the traditional event model.
[0063] In the implementation of the present disclosure, the contributions of the long-term window 230 and the short-term window 220 are not always the same, so corresponding weights can be assigned to the two time windows. Figure 6 For more details, here Figure 6 An example diagram 600 of an event model 630 based on multiple time windows according to an implementation of the present disclosure is illustrated. Figure 3 Compared with the event model 370 in FIG. 3 , the event model 630 may further include a weight model 610, which describes the association between the long-term weight 620 (also referred to as the first weight) for the long-term window 230 and the short-term weight 622 (also referred to as the second weight) for the short-term window 220. At this time, the weight model 610 may be determined by training an initial weight model using the long-term sample 410A and the short-term sample 410B.
[0064] Specifically, data in long-term sample 410A (except label 428A) and data in short-term sample 410B (except label 428B) can be input. Then, the corresponding loss can be determined, and the parameters in the initial weight model can be optimized in the direction of minimizing the loss. Using these implementations of the present disclosure, the contribution levels for long-term window 230 and short-term window 220 can be considered separately. Therefore, the accuracy and immediacy level of event model 630 can be further improved.
[0065] In an implementation of the present disclosure, if a start event for a target object is received, the event model 630 may be used to provide a prediction of whether a conversion event for the target object is to be received. Continuing with the above example, a vector of (object 4, time 4, open, time 5) may be input into the event model 630. At this point, the long-term model 340 may output a long-term prediction 352, the short-term model 342 may output a short-term prediction 354, and the weight model 610 may output a long-term weight 620 and a short-term weight 622. Further, based on the following formula 2, the event model 630 may output a final prediction indicating whether a conversion event is to be received.
[0066] pre final =pre long *weight long +pre shprt *weight short
[0067] Formula 2
[0068] In formula 2, pre final Represents the final prediction for event prediction, pre longIndicates long-term forecast 352, pre short Indicates short-term prediction 354, weight long Indicates long-term weight 620, weight short Denotes the short-term weight 622. In Formula 2, constraints as provided in Formula 3 may be applied.
[0069] weight long +weight short =1
[0070] Formula 3
[0071] In Formula 2, long-term prediction 352 and short-term prediction 354 may provide different contributions to the final prediction. For example, if the data log used to train event model 630 indicates that more conversion events are received within the long-term window 230, then long-term weight 620 may be greater than short-term weight 622. long =0.8, and weight short = 0.2. Using these implementations of the present disclosure, the long-term weight 620 and the short-term weight 622 can be determined in a dynamic manner, and then the final prediction can be obtained in a more reliable manner.
[0072] Figure 7 An example diagram 700 is shown that compares the performance of an event model according to an implementation of the present disclosure with a traditional event model. Figure 7 , curve 510 indicates the AUC value for the traditional event model based on a single time window training, curve 520 indicates the AUC value for the event model 370 (without weights for multiple time windows), and curve 710 indicates the AUC value for the event model 630 (with weights for multiple time windows). Obviously, curve 710 is closer to 1 than curve 520, which indicates that event model 630 has better performance than event model 370.
[0073] Although the above provides an implementation involving two time windows in event models 370 and 630, more time windows can be used in the event model. For example, in addition to the long-term window 230 and the short-term window 220, another medium-term window (such as four days) can be provided in the training phase. At this time, event models 370 and 630 can include a long-term model 340, a short-term model 342, and a medium-term model. Therefore, the event model can make full use of the data in each time window, so that the performance of the event model can be further improved.
[0074] The details for event processing have been described above. According to the implementation of the present disclosure, a method for event processing is provided. For more details about the method, please refer to Figure 8 , Figure 8 An example flow chart of a method 800 for event processing based on multiple time windows according to an implementation of the present disclosure is illustrated. In box 810, first data associated with a first time window is obtained, the first data includes a first object and a first group of events, and the first group of events is related to the first object. In box 820, second data associated with a second time window is obtained, the second data includes a second object and a second group of events, the second group of events is related to the second object, and the second time window is different from the first time window. In box 830, an event model is determined based on the first data and the second data, the event model describes the association relationship between objects and events, and the events are related to the objects.
[0075] In an implementation of the present disclosure, acquiring the first data includes: in response to determining that the first object is sent within a first time window, identifying the first object. In response to determining that the first group of events is received within the first time window, selecting the first group of events.
[0076] In an implementation of the present disclosure, determining the event model includes: generating a first sample and a second sample for determining the event model based on the first data and the second data, respectively, and determining the event model by training an initial model using the first sample and the second sample.
[0077] In an implementation of the present disclosure, generating the first sample includes: determining a first label, the first label is used to indicate whether the first group of events includes a conversion event after the start event; and generating the first sample based on the first data and the first label.
[0078] In an implementation of the present disclosure, determining the first label includes: in response to determining that the first group of events includes a start event, setting the first label to negative; and in response to determining that the first group of events includes a conversion event after the start event, updating the first label to positive.
[0079] In an implementation of the present disclosure, the event model includes: a first model between an object and a first prediction, the first prediction indicating whether a conversion event related to the object is received within a first time window; and a second model between the object and a second prediction, the second prediction indicating whether a conversion event related to the object is received within a second time window.
[0080] In an implementation of the present disclosure, determining an event model by training an initial model using a first sample and a second sample includes: determining the first model by training a first part of the initial model using the first sample; and determining the second model by training a second part of the initial model using the second sample.
[0081] In an implementation of the present disclosure, the event model also includes: a weight model, which describes the association between a first weight for a first time window and a second weight for a second time window; and determining the event model also includes: determining the weight model based on the first sample and the second sample.
[0082] In an implementation of the present disclosure, method 800 further includes: in response to determining that the start event is related to the target object, determining whether a prediction of a conversion event related to the target object is received based on the event model.
[0083] In an implementation of the present disclosure, determining the prediction includes: based on the target object and the start event, receiving a first prediction from a first model, a second prediction from a second model, and a weight from a weight model, respectively, and determining the prediction based on the first prediction, the second prediction, and the weight.
[0084] According to an implementation of the present disclosure, a device for event processing is provided. The device includes: a first acquisition unit, configured to acquire first data associated with a first time window, the first data including a first object and a first group of events, the first group of events being related to the first object; a second unit, configured to acquire second data associated with a second time window, the second data including a second object and a second group of events, the second group of events being related to the second object, the second time window being different from the first time window; and a determination unit, configured to determine an event model based on the first data and the second data, the event model describing an association relationship between an object and an event, the event being related to the object. In addition, the device may include other units for implementing other steps in method 800.
[0085] According to an implementation of the present disclosure, an electronic device for implementing method 800 is provided. The electronic device includes: a computer processor, the computer processor is coupled to a computer-readable storage unit, the storage unit includes instructions, and the instructions implement a method for event processing when executed by the computer processor. The method includes: obtaining first data associated with a first time window, the first data includes a first object and a first group of events, and the first group of events is related to the first object; obtaining second data associated with a second time window, the second data includes a second object and a second group of events, the second group of events is related to the second object, and the second time window is different from the first time window; and determining an event model based on the first data and the second data, the event model describes the association relationship between objects and events, and the events are related to objects.
[0086] In an implementation example of the present disclosure, obtaining the first data includes: in response to determining that the first object is sent within a first time window, identifying the first object; and in response to determining that the first group of events is received within the first time window, selecting the first group of events.
[0087] In an implementation of the present disclosure, determining the event model includes: generating a first sample and a second sample for determining the event model based on the first data and the second data, respectively; and determining the event model by training an initial model using the first sample and the second sample.
[0088] In an implementation of the present disclosure, generating the first sample includes: determining a first label, where the first label is used to indicate whether a first group of events includes a conversion event after a start event; and generating the first sample based on first data and the first label.
[0089] In an implementation of the present disclosure, determining the first label includes: in response to determining that the first group of events includes a start event, setting the first label to negative; and in response to determining that the first group of events includes a conversion event after the start event, updating the first label to positive.
[0090] In an implementation of the present disclosure, the event model includes: a first model between an object and a first prediction, the first prediction indicating whether a conversion event related to the object is received within a first time window; and a second model between the object and a second prediction, the second prediction indicating whether a conversion event related to the object is received within a second time window.
[0091] In an implementation of the present disclosure, determining an event model by training an initial model using a first sample and a second sample includes: determining the first model by training a first part of the initial model using the first sample; and determining the second model by training a second part of the initial model using the second sample.
[0092] In an implementation of the present disclosure, the event model also includes: a weight model, which describes the association between a first weight for a first time window and a second weight for a second time window; and determining the event model also includes: determining the weight model based on the first sample and the second sample.
[0093] In an implementation of the present disclosure, method 800 further includes: in response to determining that the start event is related to the target object, determining whether a prediction of a conversion event related to the target object is received based on the event model.
[0094] In an implementation of the present disclosure, determining a prediction includes: based on a target object and a start event, receiving a first prediction from a first model, a second prediction from a second model, and a weight from a weight model, respectively.
[0095] According to an implementation of the present disclosure, a computer program product is provided. The computer program product includes a computer-readable storage medium having program instructions implemented therewith. The program instructions can be executed by an electronic device to enable the electronic device to perform method 800.
[0096] Fig. 9 9 illustrates a block diagram of a computing device 900 in which various implementations of the present disclosure may be implemented. It should be understood that Fig. 9 The computing device 900 shown is for illustration purposes only and does not in any way imply any limitation on the functionality and scope of the present disclosure. The computing device 900 may be used to implement the above method 800 in the implementation of the present disclosure. Fig. 9 As shown, the computing device 900 may be a general computing device and may include at least one or more processors or processing units 910 , a memory 920 , a storage unit 930 , one or more communication units 940 , one or more input devices 950 , and one or more output devices 960 .
[0097] The processing unit 910 may be a physical or virtual processor and may implement various processes based on a program stored in the memory 920. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to increase the parallel processing capability of the computing device 900. The processing unit 910 may also be referred to as a central processing unit (CPU), a microprocessor, a controller, or a microcontroller.
[0098] The computing device 900 typically includes various computer storage media. Such media can be any media accessible to the computing device 900, including but not limited to volatile and non-volatile media, or removable and non-removable media. The memory 920 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory), or any combination thereof. The storage unit 930 can be any removable or non-removable medium, and can include a machine-readable medium, such as a memory, a flash drive, a disk, or other media, which can be used to store information and / or data and can be accessed in the computing device 900.
[0099] The computing device 900 may also include additional removable / non-removable, volatile / non-volatile storage media. Fig. 9 Not shown in the figure, but a disk drive for reading and / or writing from a removable and non-volatile disk and an optical drive for reading and / or writing from a removable non-volatile disk may be provided. In this case, each drive may be connected to a bus (not shown) via one or more data medium interfaces.
[0100] The communication unit 940 communicates with another computing device via a communication medium. In addition, the functionality of the components in the computing device 900 can be implemented by a single computing cluster or multiple computing machines that can communicate via a communication connection. Therefore, the computing device 900 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or other general-purpose network nodes.
[0101] Input device 950 may be one or more of a variety of input devices, such as a mouse, keyboard, trackball, voice input device, etc. Output device 960 may be one or more of a variety of output devices, such as a display, speaker, printer, etc. With the aid of communication unit 940, computing device 900 may also communicate 980 with one or more external devices (not shown), such as storage devices and display devices, one or more of which enable a user to interact 970 with computing device 900, if desired, or with any device that enables computing device 900 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0102] In some implementations, some or all of the components of the computing device 900 may also be arranged in a cloud computing architecture rather than being integrated in a single device. In a cloud computing architecture, the components may be provided remotely and work together to implement the functions described in the present disclosure. In some implementations, cloud computing provides computing, software, data access, and storage services, which will not require the end user to know the physical location or configuration of the system or hardware that provides these services. In various implementations, cloud computing uses a suitable protocol to provide services via a wide area network (e.g., the Internet). For example, a cloud computing provider provides an application via a wide area network, which can be accessed through a web browser or any other computing component. The software or components of the cloud computing architecture and the corresponding data may be stored on a server at a remote location. The computing resources in a cloud computing environment may be merged or distributed at the location of a remote data center. Cloud computing infrastructure may provide services through a shared data center, although they act as a single access point for users. Therefore, cloud computing architectures may be used to provide the components and functions described herein from a service provider at a remote location. Alternatively, they may be provided from a traditional server or installed directly or otherwise on a client device.
[0103] The functions described herein may be performed at least in part by one or more hardware logic components. For example, but not limited to, illustrative types of hardware logic components that may be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc.
[0104] The program code for executing the technical solution described herein can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, and when executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed in whole or in part on the machine, in part on the machine as an independent software package, in part on a remote machine, or in whole on a remote machine or server.
[0105] In the context of the present disclosure, a machine-readable medium may be any tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include an electrical connection with one or more wires, a portable computer floppy disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable memory, a programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0106] In addition, although operations are shown in a particular order, this should not be understood as requiring such operations to be performed in the particular order shown or in a continuous order, or performing all of the operations shown to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the discussion above, these should not be interpreted as limitations on the scope of the technical solutions described herein, but should be interpreted as descriptions of features that may be specific to a particular implementation. Certain features described in the context of a separate implementation may also be implemented in combination in a single implementation. On the contrary, the various features described in a single implementation may also be implemented individually in multiple implementations or in any suitable sub-combination.
[0107] Although the technical solution has been described in language specific to structural features and / or method behaviors, it should be understood that the technical solution specified in the appended claims is not necessarily limited to the above-mentioned specific features or behaviors. Instead, the above-mentioned specific features and actions are disclosed as example forms of implementing the claims.
[0108] From the foregoing, it should be understood that the specific implementation of the currently disclosed technology is described herein for illustrative purposes, but various modifications can be made without departing from the scope of the present disclosure. Therefore, the currently disclosed technology is not limited by the attached claims.
[0109] The implementation of the technical solutions and functional operations described in the present disclosure can be implemented in various systems, digital electronic circuits, or computer software, firmware or hardware, including the structures disclosed in this specification and their structural equivalents, or one or more of them can be implemented in a combined form. The implementation of the technical solutions described in this specification can be implemented as one or more computer program products, that is, one or more computer program instruction modules data processing devices encoded on a tangible and non-temporary computer-readable medium for execution or control operations. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a storage device, a material composition that affects a machine-readable propagation signal, or a combination of one or more of them. The term "data processing unit" or "data processing device" covers all devices, equipment and machines for processing data, including, for example, a programmable processor, a computer or multiple processors or computers. In addition to hardware, the device may also include code to create an execution environment for the computer program in question, such as code constituting a processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
[0110] A computer program (also referred to as a program, software, software application, script, or code) may be written in any form of programming language (including compiled or interpreted languages) and may be deployed in any form, including as a stand-alone form, a separate program, or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or portions of code). A computer program may be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communications network.
[0111] For example, processors suitable for executing computer programs include general and special purpose microprocessors, and any one or more processors of any type of digital computer. Typically, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Generally speaking, a computer will also include or be operably coupled to receive data from or transmit data to one or more large-capacity storage devices for storing data, or both, such as magnetic disks, magneto-optical disks, or optical disks. However, a computer does not need to have such a device. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and storage devices, including, for example, semiconductor storage devices, such as EPROM, EEPROM, and flash memory devices. The processor and memory can be supplemented by or incorporated into a dedicated logic circuit.
[0112] This manual and the attached Figure 1 The foregoing are to be considered exemplary only, where exemplary means example. As used herein, the use of "or" is intended to include "and / or" unless the context clearly dictates otherwise.
[0113] Although the present disclosure contains many details, these should not be interpreted as limitations on the scope of any disclosure or the scope of what may be claimed, but rather as descriptions of features that may be specific to a particular implementation disclosed in particular. Certain features described in the present disclosure in the context of separate implementations may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually in multiple implementations or in any suitable sub-combination. In addition, although features may be described above as functioning in certain combinations and even initially claimed as such, one or more features from the claimed combination may be deleted from the claimed combination in some cases, and the claimed combination may be directed to a sub-combination or a variation of a sub-combination.
[0114] Similarly, although operations are shown in a particular order in the accompanying drawings, this should not be understood as requiring that the operations be performed in the particular order shown or in a sequential order, or that all of the operations shown be performed, to achieve the desired results. In addition, the separation of various system components in the implementations described in this disclosure should not be understood as requiring such separation in all implementations. Only some implementations and examples are described, and other implementations, enhancements, and variations may be made based on what is described and illustrated in this disclosure.
Claims
1. A method for event processing, comprising: Acquire first data associated with a first time window, the first data comprising a first object and a first group of events, the first group of events being related to the first object; Acquire second data associated with a second time window, the second data including a second object and a second group of events, the second group of events being related to the second object, and the second time window being different from the first time window; as well as An event model is determined based on the first data and the second data, wherein the event model describes an association relationship between an object and an event, and the event is related to the object.
2. The method according to claim 1, wherein obtaining the first data comprises: In response to determining that the first object is sent within the first time window, identifying the first object; as well as In response to determining that the first set of events is received within the first time window, the first set of events is selected.
3. The method of claim 1 , wherein determining the event model comprises: generating a first sample and a second sample for determining the event model based on the first data and the second data respectively; as well as The event model is determined by training an initial model using the first sample and the second sample.
4. The method of claim 3, wherein generating the first sample comprises: determining a first tag, the first tag being used to indicate whether the first set of events includes a conversion event after a start event; as well as The first sample is generated based on the first data and the first label.
5. The method of claim 4, wherein determining the first tag comprises: In response to determining that the first set of events includes the start event, setting the first tag to negative; as well as In response to determining that the first set of events includes the conversion event after the start event, the first flag is updated to positive.
6. The method according to claim 4, wherein the event model comprises: a first model between an object and a first prediction indicating whether a conversion event related to the object is received within the first time window; as well as A second model between the object and a second prediction indicating whether a conversion event related to the object is received within the second time window.
7. The method according to claim 6, wherein determining the event model by training the initial model using the first sample and the second sample comprises: Determine the first model by training a first part of the initial model using the first sample; as well as The second model is determined by training a second part of the initial model using the second sample.
8. The method according to claim 7, wherein the event model further comprises: A weight model, wherein the weight model describes an association relationship between a first weight for the first time window and a second weight for the second time window, and determining the event model further comprises: determining the weight model based on the first sample and the second sample.
9. The method according to claim 8, further comprising: In response to determining that the initiating event is related to the target object, a determination is made based on the event model whether a prediction of a conversion event related to the target object has been received.
10. The method of claim 9, wherein determining the prediction comprises: Based on the target object and the start event, receiving a first prediction from the first model, a second prediction from the second model, and a weight from the weight model respectively; as well as Based on the first prediction and the second prediction and the weight, the prediction is determined.
11. An electronic device comprising a processor coupled to a computer readable storage unit, the storage unit comprising instructions which, when executed by the computer processor, implement a method for event processing comprising: Acquire first data associated with a first time window, the first data comprising a first object and a first group of events, the first group of events being related to the first object; Acquire second data associated with a second time window, the second data including a second object and a second group of events, the second group of events being related to the second object, and the second time window being different from the first time window; as well as An event model is determined based on the first data and the second data, wherein the event model describes an association relationship between an object and an event, and the event is related to the object.
12. The device according to claim 11, wherein obtaining the first data comprises: In response to determining that the first object is sent within the first time window, identifying the first object; as well as In response to determining that the first set of events is received within the first time window, the first set of events is selected.
13. The apparatus of claim 11, wherein determining the event model comprises: generating a first sample and a second sample for determining the event model based on the first data and the second data respectively; as well as The event model is determined by training an initial model using the first sample and the second sample.
14. The apparatus of claim 13, wherein generating the first sample comprises: determining a first tag, the first tag being used to indicate whether the first set of events includes a conversion event after a start event; as well as The first sample is generated based on the first data and the first label.
15. The apparatus of claim 14, wherein determining the first tag comprises: In response to determining that the first set of events includes the start event, setting the first tag to negative; and In response to determining that the first set of events includes the conversion event after the start event, the first flag is updated to positive.
16. The apparatus according to claim 14, wherein: The event model includes: a first model between an object and a first prediction indicating whether a conversion event related to the object is received within the first time window; and A second model between the object and a second prediction indicating whether a conversion event related to the object is received within the second time window.
17. The apparatus of claim 16, wherein determining the event model by training the initial model using the first sample and the second sample comprises: Determine the first model by training a first part of the initial model using the first sample; as well as The second model is determined by training a second part of the initial model using the second sample.
18. The apparatus of claim 17, wherein the event model further comprises: A weight model, wherein the weight model describes an association relationship between a first weight for the first time window and a second weight for the second time window, and determining the event model further comprises: determining the weight model based on the first sample and the second sample.
19. The apparatus according to claim 18, further comprising: In response to determining that the start event is related to the target object, determining based on the event model whether a prediction of a conversion event related to the target object has been received includes: Based on the target object and the start event, receiving a first prediction from the first model, a second prediction from the second model, and a weight from the weight model respectively; as well as Based on the first prediction and the second prediction and the weight, the prediction is determined.
20. A computer program product, the computer program product comprising a computer-readable storage medium having program instructions implemented therewith, the program instructions being executable by an electronic device to cause the electronic device to perform a method for event processing, the method comprising: Acquire first data associated with a first time window, the first data comprising a first object and a first group of events, the first group of events being related to the first object; Acquire second data associated with a second time window, the second data including a second object and a second group of events, the second group of events being related to the second object, and the second time window being different from the first time window; as well as An event model is determined based on the first data and the second data, wherein the event model describes an association relationship between an object and an event, and the event is related to the object.
