Multi-label event prediction method and related equipment based on time series point process
By processing the event similarity and time domain similarity of historical event records, extracting feature vectors and predicting the probability of occurrence of target events, the problem of insufficient prediction accuracy of multi-label events is solved and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202211305009.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-24
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-10-24
AI Technical Summary
When existing technologies use time point processes to predict multi-label events, the prediction accuracy is poor.
By obtaining the historical event record sequence, event similarity and time domain similarity processing are performed, feature vector representation is extracted, and the intensity function is used to predict the probability of occurrence of the target event.
Improved the accuracy of multi-label event prediction, taking into account global effects in continuous time.
Smart Images

Figure CN117009406B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a multi-label event prediction method based on a time sequence process and related equipment. Background Art
[0002] In a process consisting of multiple events occurring over a continuous time domain, these events are often intrinsically linked, with the occurrence of one event either promoting or inhibiting the occurrence of others. A continuous temporal point process is a random process consisting of a series of events over a continuous time domain. This process can be used to model events over a continuous time domain and predict their potential probability over time.
[0003] A multi-label event is a variable number of pre-set events that occur at the same time. In related art, when using time point processes to predict the potential probability of multi-label events in the time domain, the prediction accuracy is poor. Summary of the Invention
[0004] To solve the problems of the prior art, the present invention provides a multi-label event prediction method and related equipment based on a time sequence process. The technical solution is as follows:
[0005] In one aspect, a multi-label event prediction method based on a time series point process is provided, the method comprising:
[0006] Obtain a sequence of historical event records corresponding to the object to be predicted at the prediction time, where each historical event record includes a recording time and event information, and the event information includes at least one preset event that occurs concurrently with the recording time;
[0007] performing event similarity processing based on the event information of each historical event record in the historical event record sequence to obtain event similarity information corresponding to each historical event record; the event similarity information represents the event similarity between the corresponding historical event record and each historical event record in the historical event record sequence;
[0008] Performing time domain similarity processing based on the recording time of each historical event record in the historical event record sequence to obtain time domain similarity information corresponding to each historical event record; the time domain similarity information represents the time domain similarity between the corresponding historical event record and each historical event record in the historical event record sequence;
[0009] Performing comprehensive feature extraction based on event similarity information and time domain similarity information corresponding to each of the historical event records to obtain a feature vector representation of each of the historical event records;
[0010] An intensity function prediction is performed based on the characteristic vector representation of each of the historical event records to obtain a target event occurrence intensity function corresponding to the target preset event, and the probability of occurrence of the target preset event at the predicted time is determined based on the target event occurrence intensity function; the target preset event is any of the preset events.
[0011] On the other hand, a multi-label event prediction device based on a time sequence process is provided, the device comprising:
[0012] A historical record acquisition module is used to acquire a sequence of historical event records corresponding to the object to be predicted at the prediction time, each historical event record includes a recording time and event information, and the event information includes at least one preset event that occurs in parallel with the recording time;
[0013] an event similarity processing module, configured to perform event similarity processing based on the event information of each historical event record in the historical event record sequence to obtain event similarity information corresponding to each historical event record; the event similarity information represents the event similarity between the corresponding historical event record and each historical event record in the historical event record sequence;
[0014] a time domain similarity processing module, configured to perform time domain similarity processing based on the recording time of each historical event record in the historical event record sequence to obtain time domain similarity information corresponding to each historical event record; the time domain similarity information represents the time domain similarity between the corresponding historical event record and each historical event record in the historical event record sequence;
[0015] A comprehensive feature extraction module, configured to perform comprehensive feature extraction based on the event similarity information and the time domain similarity information corresponding to each of the historical event records, to obtain a feature vector representation of each of the historical event records;
[0016] An occurrence probability prediction module is used to perform intensity function prediction based on the feature vector representation of each of the historical event records, obtain a target event occurrence intensity function corresponding to the target preset event, and determine the probability of occurrence of the target preset event at the predicted time based on the target event occurrence intensity function; the target preset event is any of the preset events.
[0017] In an exemplary embodiment, the time-domain similarity processing module includes:
[0018] A time embedding module, configured to perform vector embedding processing on the recording time of each historical event record in the historical event record sequence to obtain a time embedding vector sequence;
[0019] A first attention weight determination module is used to determine the attention weight information corresponding to each time embedding vector in the time embedding vector sequence based on the attention mechanism;
[0020] The time domain similarity information determination submodule uses the attention weight information corresponding to each time embedding vector as the time domain similarity information of the historical event record corresponding to the corresponding time embedding vector.
[0021] In an exemplary embodiment, the event similarity processing module includes:
[0022] an encoding module, configured to encode the event information of each historical event record in the historical event record sequence to obtain an event encoding vector sequence;
[0023] A second attention weight determination module is used to determine the attention weight information corresponding to each event encoding vector in the event encoding vector sequence based on the attention mechanism;
[0024] The event similarity information determination submodule uses the attention weight information corresponding to each event encoding vector as the event similarity information of the historical event record corresponding to the corresponding event encoding vector.
[0025] In an exemplary embodiment, the comprehensive feature extraction module includes:
[0026] a comprehensive similarity determination module, configured to determine, for each of the event similarity information and the time domain similarity information corresponding to the historical event record, a product of the event similarity and the time domain similarity corresponding to the same historical event record, to obtain a comprehensive similarity between the historical event record and the same historical event record;
[0027] The feature vector representation determination submodule is used to perform weighted summation based on the event encoding vector of each historical event record and the comprehensive similarity of the corresponding historical event record to obtain the feature vector representation of the historical event record.
[0028] In an exemplary embodiment, the encoding module includes:
[0029] A search module, used to search for valid attribute information corresponding to the historical event record sequence;
[0030] a normalization module, configured to normalize the valid attribute information when the valid attribute information is found, to obtain normalized information;
[0031] a weighting module, configured to perform a weighted summation of the event embedding vectors in the event embedding vector set corresponding to each historical event record based on the normalization information to obtain an event vector representation corresponding to each historical event record;
[0032] A first encoding submodule is configured to encode an event vector representation sequence based on a recurrent neural network to obtain the event encoding vector sequence; the event vector representation sequence includes an event vector representation corresponding to each historical event record in the historical event record sequence;
[0033] The event embedding vector set corresponding to each historical event record is obtained based on vector embedding processing of the event information of the corresponding historical event record.
[0034] In an exemplary embodiment, the encoding module further includes:
[0035] The second encoding submodule is used to encode the event embedding vector set corresponding to each historical event record based on the reverse recurrent neural network when the valid attribute information is not found, so as to obtain the event encoding vector corresponding to each historical event record in the event encoding vector sequence.
[0036] In an exemplary embodiment, the occurrence probability prediction module includes:
[0037] a parameter information matrix determination module configured to perform a mapping process on a feature vector representation of each historical event record based on a plurality of preset activation functions corresponding to a plurality of preset intensity influence parameters, thereby obtaining a parameter information matrix corresponding to each of the preset intensity influence parameters of the historical event record; wherein the preset dimensions correspond one-to-one to the preset events;
[0038] a target parameter information determining module, configured to determine target parameter information of each preset intensity influencing parameter corresponding to the target preset event based on a parameter information matrix of each preset intensity influencing parameter corresponding to each historical event record;
[0039] The target event occurrence intensity function determination module is used to substitute the target parameter information of each preset intensity influence parameter corresponding to the target preset event into the preset event occurrence intensity function to obtain the target event occurrence intensity function corresponding to the target preset event; the preset event occurrence intensity function includes the multiple preset intensity influence parameters.
[0040] In an exemplary embodiment, the occurrence probability prediction module further includes:
[0041] An event occurrence intensity determination module is used to substitute the predicted time into the target event occurrence intensity function to perform intensity calculation to obtain the event occurrence intensity of the target preset event at the predicted time;
[0042] a cumulative intensity determination module, configured to calculate the cumulative intensity of the target preset event in a target time interval based on the target event occurrence intensity function, to obtain the cumulative intensity of the target preset event in the target time interval; the target time interval is the time period between the predicted time and the recorded time closest to the predicted time;
[0043] a survival coefficient determination module, configured to determine the survival coefficient of the target preset event at the predicted time based on the cumulative intensity;
[0044] The occurrence probability determination module is used to determine the product of the event occurrence intensity of the target preset event at the predicted time and the survival coefficient as the occurrence probability of the target preset event at the predicted time.
[0045] In an exemplary embodiment, the apparatus further includes a model training module, wherein the model training module includes:
[0046] A training data acquisition module is used to obtain a sample historical event record sequence corresponding to the sample object at the sample prediction time, and a reference label corresponding to each of the preset events at the sample prediction time; the reference label indicates whether the corresponding preset event occurs at the sample prediction time;
[0047] a vector sequence determination module, configured to determine a sample time embedding vector sequence and a sample event encoding vector sequence based on the sample historical event record sequence;
[0048] a temporal attention processing module, configured to utilize the temporal attention layer of the initial event prediction model to determine, based on the attention mechanism and the sample time embedding vector sequence, sample temporal similarity information corresponding to each sample historical event record; determine, based on the attention mechanism and the sample event encoding vector sequence, sample event similarity information corresponding to each sample historical event record; and perform comprehensive feature extraction based on the sample event similarity information and sample temporal similarity information corresponding to each sample historical event record to obtain a sample feature vector representation of each sample historical event record;
[0049] A prediction module, configured to perform intensity function prediction based on the sample feature vector representation of each sample historical event record to obtain a target sample event occurrence intensity function corresponding to each preset event, and determine the probability of occurrence of each preset event at the sample prediction time based on the target sample event occurrence intensity function corresponding to each preset event;
[0050] A parameter adjustment module is used to determine a loss value based on the probability of occurrence of each preset event at the sample prediction time and the reference label of the corresponding preset event at the sample prediction time, and adjust the model parameters of the initial event prediction model based on the loss value until the preset training end conditions are met to obtain the event prediction model.
[0051] In an exemplary embodiment, the prediction module includes:
[0052] a sample event occurrence intensity determination module, configured to, for each of the preset events, substitute the sample prediction time into a target sample event occurrence intensity function corresponding to the preset event to obtain the sample event occurrence intensity of the preset event at the sample prediction time;
[0053] a sample cumulative intensity determination module, configured to calculate the cumulative intensity of the target event in a target sample time interval based on the target sample event occurrence intensity function, and obtain the sample cumulative intensity of the preset event in the target sample time interval; the target sample time interval is the time period between the sample prediction time and the sample recording time closest to the sample prediction time;
[0054] A sample survival coefficient determination module, configured to determine the sample survival coefficient of the preset event at the sample prediction time based on the sample cumulative intensity;
[0055] The prediction submodule is used to determine the product of the sample event occurrence intensity of the preset event and the sample survival coefficient as the occurrence probability of the preset event at the sample prediction time.
[0056] In an exemplary embodiment, the parameter adjustment module includes:
[0057] An interval probability determination module is configured to integrate the target sample event occurrence intensity function corresponding to each preset event within the target sample time interval to obtain an interval probability of the corresponding preset event within the target sample time interval;
[0058] The loss value determination module is used to determine the loss value based on the occurrence probability, the interval probability and the reference label of each preset event by using a likelihood function.
[0059] On the other hand, an electronic device is provided, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement any of the above-mentioned multi-label event prediction methods based on time series processes.
[0060] On the other hand, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by a processor to implement a multi-label event prediction method based on a time series process as described in any of the above aspects.
[0061] In another aspect, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the multi-label event prediction method based on a time series process according to any of the above aspects.
[0062] The embodiment of the present application obtains event similarity information corresponding to each historical event record by performing event similarity processing based on the event information of each historical event record in the historical event record sequence, and obtains time domain similarity information corresponding to each historical event record by performing time domain similarity processing based on the recording time of the event information of each historical event record in the historical event record sequence, and then performs comprehensive feature extraction based on the event similarity information and time domain similarity information corresponding to each historical event record to obtain a feature vector representation of each historical event record, performs intensity function prediction based on the feature vector representation of each historical event record to obtain a target event occurrence intensity function corresponding to the target preset event, and determines the probability of occurrence of the target preset event at the predicted time based on the target event occurrence intensity function, thereby taking into account the global influence of continuous time, and greatly improving the accuracy of multi-label event prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0064] Figure 1 This is an example of a game behavior converted into an event sequence in a game application scenario provided by an embodiment of the present application;
[0065] Figure 2 This is a flow chart of a multi-label event prediction method based on a time sequence process provided by an embodiment of the present application;
[0066] Figure 3 This is a flow chart of another multi-label event prediction method based on a time sequence process provided by an embodiment of the present application;
[0067] Figure 4 This is a flow chart of another multi-label event prediction method based on a time sequence process provided by an embodiment of the present application;
[0068] Figure 5 This is a schematic diagram of the structure of the multi-label event prediction model provided in the embodiment of the present application;
[0069] Figure 6 This is a structural block diagram of a multi-label event prediction device based on a time sequence process provided by an embodiment of the present application;
[0070] Figure 7 This is a hardware structure block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0071] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0072] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0073] It is understood that in the specific implementation of this application, when user information and other related data are involved, when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. The following explains the terms involved in the embodiments of this application.
[0074] Event occurrence intensity λ: During a time series process, the instantaneous probability of an event occurring at a specified time is represented by the event occurrence intensity λ. The instantaneous probability of event v occurring at time t can be expressed as:
[0075] (Event v occurs at [t, t+dt))
[0076] The multi-label event prediction method based on the sequential point process of the embodiment of the present application can be applied to a multi-label event prediction device based on the sequential point process, and the multi-label event prediction device based on the sequential point process can be configured in an electronic device, which can be a terminal or a server. Among them, the terminal includes but is not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc. Client software with data processing functions such as applications (Application, referred to as App) is installed in the terminal. The application can be an independent application or a subroutine in the application. In the embodiment of the present application, the data processing function can include predicting the potential probability of occurrence of a preset event in a continuous time domain.
[0077] The server can provide background services for applications in the terminal, which can specifically include providing historical event record data for event prediction. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0078] In one exemplary embodiment, both the terminal and the server can be node devices in a blockchain system, capable of sharing acquired and generated information with other node devices in the blockchain system, enabling information sharing among multiple node devices. Multiple node devices in a blockchain system can be configured with the same blockchain, which consists of multiple blocks, with adjacent blocks having an associated relationship. This allows any tampering of data in any block to be detected by the next block, thereby preventing tampering of the blockchain data and ensuring the security and reliability of the blockchain data.
[0079] The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.
[0080] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive field within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making. AI technology is an interdisciplinary discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, machine learning / deep learning, autonomous driving, and smart transportation.
[0081] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.
[0082] The multi-label event prediction method based on the time series process of the embodiment of the present application can be applied to a variety of scenarios, such as weather forecasting, financial transaction forecasting, object behavior forecasting, and medical disease forecasting. Among them, object behavior prediction can include player behavior prediction in game scenarios, social media post popularity prediction in social scenarios, and so on.
[0083] Take the prediction of player behavior in the game scenario as an example: In the game, a player's behavior can be converted into an event sequence, such as purchasing game coins, completing the main task, adding friends, upgrading, calling the world, forming a team, etc. Figure 1 The following example shows a game behavior converted into an event sequence. By using this event sequence to predict the player's next action, we can provide customized services and optimize the player's gaming experience. For example, if we predict that the player is likely to purchase game coins, we can offer a top-up discount. If we predict that the player will enter a certain map, we can preload the map to reduce the waiting time for the map to load.
[0084] Take the prediction of social media post popularity as an example: In social media, post interactions typically include forwarding, liking, and commenting. By classifying different interactive behaviors and the fan base of the interacting person, interactive behaviors can be converted into multiple events. Table 1 below shows an example of converting interactive behaviors into multiple events based on fan base. The present application embodiment can predict possible future interactions and popularity based on the corresponding historical interaction records of a post. The future popularity of social media posts can be used to manage potential risks, allocate network resources in real time, and adjust exposure within the community in real time.
[0085] Table 1
[0086] Interactive behavior Fan level Event Number Forward Small <![CDATA[v1]]> Forward big <![CDATA[v2]]> Like Small <![CDATA[v3]]> Like big <![CDATA[v4]]> Comment Small <![CDATA[v5]]> Comment big <![CDATA[v6]]>
[0087] See also Figure 2 , which shows a flow chart of a multi-label event prediction method based on a time point process provided by an embodiment of the present application, which can be applied to electronic devices. It should be noted that this specification provides method operation steps as described in the embodiment or flow chart, but based on conventional or non-creative labor, more or fewer operation steps may be included. The order of steps listed in the embodiment is only one way of executing the steps among many, and does not represent the only execution order. When the system or product is actually executed, it can be executed sequentially or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, in a parallel processor or multi-threaded processing environment). Specifically, Figure 2 As shown, the method may include:
[0088] S201, obtaining a historical event record sequence corresponding to the object to be predicted at the prediction time.
[0089] Each historical event record in the historical event record sequence includes a recording time and event information, and the event information includes at least one preset event that occurs in parallel with the corresponding recording time.
[0090] The object to be predicted can be set based on the actual prediction scenario. For example, in a game scenario, the object to be predicted can be a player; in a disease prediction scenario, the object to be predicted can be a specific patient; in social media post popularity prediction, the object to be predicted can be a published post.
[0091] The prediction time can be a certain moment in the future. For example, if the current date is September 30, 2022, the prediction time can be any moment after September 20, 2022, such as December 20, 2022.
[0092] Each historical event record in the historical event record sequence is arranged in chronological order based on the time of recording, usually from the beginning of the sequence to the end in the order of the recording time being closer to the current time. Each historical event record involves two aspects of information: time information and event information. The event information includes one or more preset events that occurred in parallel (i.e., simultaneously) at the same historical time, and the corresponding time information is the time of occurrence of the one or more preset events that occurred simultaneously, which is referred to as the recording time in this embodiment of the application.
[0093] It can be understood that the historical event record sequence represents a historical process, and the historical process, i.e., the historical event record sequence, can be expressed as Among them, i represents the i-th historical event record, t i is the recording time of the i-th historical event record, V i Represents the event information of the i-th historical event record. Specifically, V i It can be represented as an event set {v ij}, v ij It represents the jth parallel preset event that occurs in the i-th historical event record; t represents the predicted time.
[0094] S203: Perform event similarity processing based on the event information of each historical event record in the historical event record sequence to obtain event similarity information corresponding to each historical event record.
[0095] The event similarity information represents the event similarity between the corresponding historical event record and each historical event record in the historical event record sequence.
[0096] Taking the i-th historical event record as an example, its event similarity information can be expressed as Among them, m includes each historical event record in the historical event record sequence, Represents the event similarity between the i-th historical event record and the m-th historical event record. Assume that the historical event record sequence is Then the event similarity information of the first historical event record is The event similarity information of the second historical event record is The event similarity information of the third historical event record is
[0097] In an exemplary embodiment, Figure 3 As shown, the above step S203 may include the following steps when implemented:
[0098] S2031, encoding the event information of each historical event record in the historical event record sequence to obtain an event encoding vector sequence;
[0099] S2033, based on the attention mechanism, determining the attention weight information corresponding to each event encoding vector in the event encoding vector sequence;
[0100] S2035, using the attention weight information corresponding to each event encoding vector as the event similarity information of the historical event record corresponding to the corresponding event encoding vector.
[0101] Specifically, the event encoding vectors in the event encoding vector sequence correspond one-to-one to the historical event records in the historical event record sequence.
[0102] For a given input, the attention mechanism uses three weight matrices W key ,W query ,W value They are linearly mapped to q, k, V, as shown in the following formula (1):
[0103] q=x q W query ,k=x k W key ,V=x V W value (1)
[0104] Here, q represents a query to obtain the part of V that is useful to q; k and V constitute a key-value pair, where k represents the key of each position in V, and is used to calculate the similarity with q on behalf of V.
[0105] In the embodiment of the present application, the event encoding vector h corresponding to the i-th historical event record is i , based on the above description of the self-attention mechanism through the weight matrix Perform linear mapping to obtain Then the event similarity information of the i-th historical event record can be calculated by the following formula (2):
[0106]
[0107] in, represents the event similarity between the i-th historical event record and the m-th historical event record; d emb Indicates h i dimension.
[0108] In the above implementation, by determining the attention weight information corresponding to each event encoding vector based on the attention mechanism, the event similarity information of historical event records can be accurately calculated, which is beneficial to improving the accuracy of subsequent event predictions.
[0109] S205 , performing time domain similarity processing based on the recording time of each historical event record in the historical event record sequence to obtain time domain similarity information corresponding to each historical event record.
[0110] The time-domain similarity information represents the time-domain similarity between the corresponding historical event record and each historical event record in the historical event record sequence.
[0111] Taking the i-th historical event record as an example, its time domain similarity information can be expressed as Among them, m includes each historical event record in the historical event record sequence, Represents the time domain similarity between the i-th historical event record and the m-th historical event record. Assume that the historical event record sequence is Then the time domain similarity information of the first historical event record is The time domain similarity information of the second historical event record is The time domain similarity information of the third historical event record is
[0112] In an exemplary embodiment, see Figure 3 , the above step S205 may include the following steps when implemented:
[0113] S2051, performing vector embedding processing on the recording time of each historical event record in the historical event record sequence to obtain a time embedding vector sequence;
[0114] S2053, based on the attention mechanism, determining the attention weight information corresponding to each time embedding vector in the time embedding vector sequence;
[0115] S2055, using the attention weight information corresponding to each time embedding vector as the time domain similarity information of the historical event record corresponding to the corresponding time embedding vector.
[0116] Specifically, when performing vector embedding processing on the recording time of each historical event record in the historical event record sequence, the recording time t i The position embedding is converted into an embedding representation, which records the time t i Convert to h i The time embedding vector p of the same dimension i In the specific implementation, the time embedding vector It can be expressed by the following formula (3):
[0117]
[0118] Then for the time embedding vector p corresponding to the i-th historical event record i, based on the above description of the self-attention mechanism through the weight matrix and Perform linear mapping to obtain Then the time domain similarity information of the i-th historical event record can be calculated by the following formula (4):
[0119]
[0120] in, Represents the time domain similarity between the i-th historical event record and the m-th historical event record.
[0121] In the above implementation, by determining the attention weight information corresponding to each time embedding vector based on the attention mechanism, the time domain similarity information of historical event records can be accurately calculated, which is conducive to improving the accuracy of subsequent event predictions.
[0122] S207 , performing comprehensive feature extraction based on the event similarity information and the time domain similarity information corresponding to each historical event record to obtain a feature vector representation of each historical event record.
[0123] Specifically, for the event similarity information and time domain similarity information of each historical event record, the product of the event similarity and time domain similarity corresponding to the same historical event record can be determined to obtain the comprehensive similarity between the historical event record and the same historical event record; and then a weighted sum is performed based on the event coding vector of each historical event record and the comprehensive similarity of the corresponding historical event record to obtain the feature vector representation of the historical event record.
[0124] In a specific implementation, for the i-th historical event record, the comprehensive similarity between the i-th historical event record and the m-th historical event record can be calculated based on the following formula (5):
[0125]
[0126] Then the feature vector of the i-th historical event record represents a i It can be obtained by formula (6):
[0127] a i =∑score i,m *V m (6)
[0128] in, h m is the event encoding vector corresponding to the mth historical event record.
[0129] In the above implementation, the corresponding comprehensive similarity is determined by using the time domain similarity information and the event similarity information, and then the feature vector representation of the corresponding historical event record is determined based on the comprehensive similarity. This can improve the accuracy of the feature vector representation and is conducive to improving the accuracy of subsequent predictions based on the feature vector representation.
[0130] Considering that the feature vector representation of historical event records is closely related to the event encoding vector of historical event records, that is, the accuracy of encoding the historical event record sequence is conducive to improving the accuracy of the feature vector representation corresponding to the historical event record, and thus is conducive to improving the accuracy of subsequent event prediction. Based on this, in an exemplary embodiment, in order to improve the accuracy of the event encoding vector sequence, such as Figure 3 As shown, when encoding the event information of each historical event record in the historical event record sequence to obtain an event encoding vector sequence, the following steps may be included:
[0131] S301: Search for valid attribute information corresponding to a historical event record sequence.
[0132] Valid attribute information refers to the attribute information associated with the preset event within the attribute information corresponding to the historical event record sequence. The corresponding attribute information can vary in different event prediction scenarios. For example, in the scenario of predicting game player behavior, a player's social network number and krypton gold number do not affect the frequency of entering the map, meaning that information such as social network number and krypton gold number are not valid attribute information. For another example, in the scenario of disease prediction, the patient's gender and age are valid attribute information, while region is generally not.
[0133] Specifically, if valid attribute information corresponding to the historical event record is found, the following steps S303 to S307 may be executed; otherwise, if valid attribute information corresponding to the historical event record is not found, step S309 may be executed.
[0134] S303: Normalize the valid attribute information to obtain normalized information.
[0135] Among them, the normalization process can use the sigmoid function, with I seq Represents valid attribute information, then the normalized information can be expressed as query seq =f sigmoid (I seq ),in,
[0136] S305 , for each historical event record corresponding to the event embedding vector set, perform weighted summation on the event embedding vectors in the event embedding vector set based on the normalization information to obtain the event vector representation corresponding to each historical event record.
[0137] It can be understood that the event vector representation corresponding to each historical event record can be sorted according to the historical event record sequence to form an event vector representation sequence.
[0138] Specifically, taking the i-th historical event record as an example, its corresponding event vector represents E i ∑ j input i,j , where input i,j =query seq *embedding i,j , embedding i,j is the event embedding vector of the jth preset event recorded in the i-th historical event. Then we can get the event vector representation sequence {E i}.
[0139] S307, encoding the event vector representation sequence based on the recurrent neural network to obtain an event encoding vector sequence.
[0140] The recurrent neural network may be a conventional gated recurrent unit (GRU), which is encoded by inputting an event vector representation sequence into the recurrent neural network, and obtaining an event encoding vector sequence using the hidden state output by the last hidden layer.
[0141] S309 , encoding the event embedding vector set corresponding to each historical event record based on the reverse recurrent neural network to obtain the event encoding vector corresponding to each historical event record in the event encoding vector sequence.
[0142] Specifically, the inverse recurrent neural network can be an inverse GRU. The inverse GRU is similar to a conventional GRU, but differs in that it can handle situations where parallel events have different weights. When events within an event set within the same historical event record have different weights, they are input into the inverse GRU in ascending order of weight. The output of the last hidden layer of the inverse GRU captures all valid information about the event set within a single historical event record. By individually encoding the set of event embedding vectors corresponding to each historical event record through the inverse GRU, the output event encoding vector can contain all valid information about the event information corresponding to that historical event record.
[0143] It is understandable that the recurrent neural network in the embodiment of the present application can also be the structure of other recurrent neural networks, such as LSTM (Long short-term memory, long short-term memory network), bidirectional LSTM, etc.
[0144] In the above embodiment, when valid attribute information can be found, the valid attribute information is first integrated into each historical event record to obtain the corresponding event vector representation, and then the event vector representation sequence is encoded using a recurrent neural network. When no valid attribute information is found, the event embedding vector set of each historical event record is encoded separately based on the inverse recurrent neural network. This can improve the accuracy of the final event encoding vector while ensuring coding efficiency.
[0145] S209 , performing intensity function prediction based on the feature vector representation of each historical event record, obtaining a target event occurrence intensity function corresponding to the target preset event, and determining the probability of occurrence of the target preset event at the predicted time based on the target event occurrence intensity function.
[0146] The target preset event is any of the preset events.
[0147] In the process of time sequence, the event intensity function quantitatively reflects the historical process The influence of the preset event v over time. In order to make the event intensity function more flexible to describe the complex influence relationship between various events, the embodiment of the present application uses the Weibull function to describe the above influence. Assume that each historical event record (t i ,V i ) will have an impact on the preset event v at the future time t, then the event occurrence intensity function corresponding to the preset event v at the future time t can be expressed as the following formula (7):
[0148]
[0149] in:
[0150] θ v Represents a set of unknown parameters, which can be expressed as V represents a set of preset events;
[0151] f weibull () represents the Weibull function, specifically f in the above formula (7) weibull (t;k v,i ,β v,i ) can be expressed as
[0152] f + (x)=max(x,0).
[0153] In the embodiment of the present application, based on the feature vector representation of each historical event record, it can be determined that the target preset event v corresponds to the above unknown parameter set θ v, and then combined with the above formula (7), we can get the target event occurrence intensity function corresponding to the target preset event v at the predicted time t.
[0154] In an exemplary embodiment, in order to improve the accuracy of the target event occurrence intensity function, the above step S209, when performing intensity function prediction based on the feature vector representation of each historical event record to obtain the target event occurrence intensity function corresponding to the target preset event, may include:
[0155] For each historical event record, a feature vector representation is mapped to a preset dimension based on a plurality of preset activation functions corresponding to a plurality of preset intensity impact parameters, thereby obtaining a parameter information matrix corresponding to each preset intensity impact parameter of the historical event record; wherein the preset dimensions correspond to the preset events one-to-one;
[0156] Determine target parameter information corresponding to each preset intensity impact parameter of the target preset event based on the parameter information matrix of each preset intensity impact parameter corresponding to each historical event record;
[0157] The target parameter information of each preset intensity influencing parameter corresponding to the target preset event is substituted into the preset event occurrence intensity function to obtain the target event occurrence intensity function corresponding to the target preset event.
[0158] Specifically, the preset event occurrence intensity function may be the event occurrence intensity function shown in the aforementioned formula (7), and the plurality of preset intensity influencing parameters are the unknown parameter set in formula (7):
[0159] In the embodiment of the present application, a corresponding preset activation function is set for each preset intensity influencing parameter, and the feature vector representation is mapped to the preset dimensions by multiple preset activation functions to obtain the parameter information matrix of the historical event record corresponding to each preset intensity influencing parameter corresponding to the feature vector representation. In a specific implementation, the i-th historical event record corresponds to the above unknown parameter set θ v The parameter information matrix is {Ω i ,K i ,Β i}, where the elements in the parameter information matrix are the parameter values of the corresponding parameters, for example, Ω i =f tanh (a i )={ω vn,i};K i =f + (a i )={k vn,i};Β i =f + (ai )={β vn,i};f tanh (),f + () is the corresponding preset activation function, n represents the number of preset events, a i is the feature vector representation of the i-th historical event record;
[0160] After obtaining the parameter information matrix of each historical event record corresponding to each preset intensity impact parameter, the parameter information corresponding to the target preset event is extracted from each parameter information matrix, thereby obtaining the target parameter information corresponding to each preset intensity impact parameter of the target preset event v. Then the target parameter information Substituting the preset event occurrence intensity function into formula (7), the target event occurrence intensity function corresponding to the target preset event v can be obtained. That is to say, in the embodiment of the present application, each preset event can obtain the target event occurrence intensity function corresponding to the preset event.
[0161] In the above embodiment, a corresponding preset activation function is set for each preset intensity influence parameter in the preset event occurrence intensity function, and the feature vector representation of the historical event record is mapped to a preset dimension based on the corresponding preset activation function, so that the parameter information of each preset intensity influence parameter is an information value that matches the current historical event record sequence, which greatly improves the accuracy of the target event occurrence intensity function corresponding to the target preset event, and is conducive to improving the accuracy of subsequent event predictions.
[0162] In an embodiment of the present application, the probability of occurrence of the target preset event at the predicted time determined based on the target event occurrence intensity function can be the event occurrence intensity (i.e., the instantaneous probability), that is, the value obtained by substituting the predicted time into the target event occurrence intensity function.
[0163] In order to improve the accuracy of event prediction, the probability of occurrence of the target preset event at the predicted time can be the joint probability density of the target time interval, which is the time period between the predicted time and the recorded time closest to the predicted time. Based on this, in an exemplary embodiment, when determining the probability of occurrence of the target preset event at the predicted time based on the target event occurrence intensity function, the above step S209 can include: Figure 4 The following steps:
[0164] S401: Substitute the predicted time into the target event occurrence intensity function to perform intensity calculation to obtain the event occurrence intensity of the target preset event at the predicted time.
[0165] Specifically, the predicted time may be substituted into the target event occurrence intensity function, thereby calculating the event occurrence intensity of the target preset event at the predicted time.
[0166] S403: performing cumulative intensity calculation in a target time interval based on the target event occurrence intensity function to obtain the cumulative intensity of the target preset event in the target time interval.
[0167] The target time interval is the time period between the predicted time and the nearest recorded time. Assuming that the i-th historical event record is the last historical event record, then t i is the recorded time closest to the predicted time t, then the target time interval is [t i ,t], the cumulative intensity of the target preset event v in the target time interval is
[0168] S405: Based on the cumulative intensity, determine the survival coefficient of the target preset event at the predicted time.
[0169] Specifically, the survival coefficient S of the target preset event v at the predicted time t v (t) can be expressed as S v (t) = exp(-Λ v (t)), the survival coefficient represents the probability that the target preset event v will not occur in the target time interval.
[0170] S407: Determine the product of the event occurrence intensity of the target preset event at the predicted time and the survival coefficient as the occurrence probability of the target preset event at the predicted time.
[0171] Specifically, the probability of the target preset event v occurring at the predicted time t is P(v,t) = λ v (t)S v (t).
[0172] It can be seen from the above technical solutions of the embodiments of the present application that the embodiments of the present application calculate the time domain similarity information and the event similarity information respectively, and then perform feature extraction based on the time domain similarity information and the event similarity information to determine the feature vector representation of each historical event record, and then predict the target event occurrence intensity function corresponding to the target preset event based on the feature vector representation of each historical event record, and determine the probability of occurrence of the target preset event at the predicted time based on the target event occurrence intensity function, flexibly considering the global impact of continuous time, and greatly improving the accuracy of multi-label event prediction.
[0173] In an exemplary embodiment, the multi-label event prediction method based on the time sequence process of the embodiment of the present application can be implemented based on the multi-label event prediction model, such as Figure 5The figure shows the structure of the multi-label event prediction model, which can include an embedding layer, an encoding layer, a temporal attention layer, a fully connected layer, an intensity function determination module, and an occurrence probability determination module, where:
[0174] The embedding layer can be used to perform vector embedding processing, including event information of historical event records (such as Figure 5 As shown in {v 1M ,…,v i3 ,v i2 ,v i1}) and the vector embedding processing of the recording time of historical event records.
[0175] The encoding layer can be used to encode the event information of each historical event record in the historical event record sequence to output an event encoding vector sequence.
[0176] The time-domain attention layer can be used to determine the feature vector representation of each historical event record. Specifically, the event similarity information corresponding to each historical event record can be determined based on the attention mechanism, and the time-domain similarity information corresponding to each historical event record can be determined based on the attention mechanism. Then, based on the event similarity information and time-domain similarity information corresponding to each historical event record, comprehensive feature extraction is performed to obtain the feature vector representation of each historical event record.
[0177] The fully connected layer can be used to output the parameter information matrix of each preset intensity influencing parameter corresponding to each predicted historical event record.
[0178] The intensity function determination module may be configured to determine a target event occurrence intensity function of a target preset event based on a parameter information matrix corresponding to each preset intensity impact parameter of each historical event record.
[0179] The occurrence probability determination module can be used to determine the probability of occurrence of a target preset event at a predicted time.
[0180] Based on this, in an exemplary embodiment, the embodiment of the present application may further include the step of training a multi-label event prediction model. Specifically, training a multi-label event prediction model may include the following steps:
[0181] (1) Obtain the sample historical event record sequence corresponding to the sample object at the sample prediction time, as well as the reference label corresponding to each preset event at the sample prediction time.
[0182] The reference tag represents whether the corresponding preset event occurs at the sample prediction time.
[0183] Specifically, each training data in the training data set is a sample historical event record sequence corresponding to the sample object at the sample prediction time. The sample objects corresponding to each training data can be the same or different, and each training data is a sequence for the same sample prediction time.
[0184] (2) Based on the sample historical event record sequence, determine the sample time embedding vector sequence and the sample event encoding vector sequence.
[0185] In a specific implementation, the sample historical event record sequence can be input into the embedding layer of the initial event prediction model, and the sample historical event record sequence can be vector embedded through the embedding layer.
[0186] The model structure of the initial event prediction model can be found in Figure 5 , by training the initial event prediction model to determine the model parameters, we can get Figure 5 The event prediction model shown.
[0187] Specifically, vector embedding processing is performed on the sample record time and sample event information in each sample historical event record, thereby obtaining a sample time embedding vector and a set of sample event embedding vectors corresponding to each sample historical event record. The sample time embedding vectors corresponding to each sample historical event record constitute a sample time embedding vector sequence.
[0188] Then, by encoding the sample event embedding vector set corresponding to each sample historical event record, a sample event encoding vector sequence corresponding to the sample historical event record sequence can be obtained.
[0189] In a specific implementation, the sample event encoding vector sequence corresponding to the sample historical event record sequence can be determined by:
[0190] Find the sample valid attribute information corresponding to the sample historical event record sequence;
[0191] When valid attribute information of the sample is found, normalization processing is performed on the valid attribute information of the sample to obtain sample normalization information;
[0192] For each sample historical event record, a set of sample event embedding vectors corresponding to the sample historical event record is weighted and summed based on the above sample normalization information to obtain a sample event vector representation corresponding to each sample historical event record;
[0193] The sample event vector representation sequence is input into the recurrent neural network of the encoding layer in the initial event prediction model for encoding processing to obtain the sample event encoding vector sequence;
[0194] When no valid attribute information of the sample is found, the sample event embedding vector sets corresponding to each sample historical event record are input into the reverse recurrent neural network of the encoding layer in the initial event prediction model for encoding processing, and the sample event encoding vector corresponding to each sample historical event record in the sample event encoding vector sequence is obtained.
[0195] (3) Utilizing the time-domain attention layer of the initial event prediction model, the sample time-domain similarity information corresponding to each sample historical event record is determined based on the attention mechanism and the sample time embedding vector sequence; the sample event similarity information corresponding to each sample historical event record is determined based on the attention mechanism and the sample event encoding vector sequence; and based on the sample event similarity information and the sample time-domain similarity information corresponding to each sample historical event record, comprehensive feature extraction is performed to obtain the sample feature vector representation of each sample historical event record.
[0196] (4) Based on the sample feature vector representation of each sample historical event record, an intensity function prediction is performed to obtain the target sample event occurrence intensity function corresponding to each preset event, and based on the target sample event occurrence intensity function corresponding to each preset event, the probability of occurrence of each preset event at the sample prediction time is determined.
[0197] The intensity function prediction based on the sample feature vector representation of each sample historical event record to obtain the target sample event occurrence intensity function corresponding to each preset event may include:
[0198] For each sample historical event record, the sample feature vector representation of the sample historical event record is input into multiple fully connected layers of the initial event prediction model to obtain an output result of each of the multiple fully connected layers; wherein the multiple fully connected layers correspond one-to-one to multiple preset intensity influence parameters included in the preset event occurrence intensity function, and the number of neurons in each fully connected layer matches the number of preset events;
[0199] Obtaining an output result corresponding to each preset event from the output results of the multiple fully connected layers; wherein the output result corresponding to each preset event represents parameter information of each preset intensity impact parameter corresponding to the preset event;
[0200] Based on the output result corresponding to each preset event and the preset event occurrence intensity function, a target sample event occurrence intensity function corresponding to each preset event is determined.
[0201] Among them, the preset event occurrence intensity function can be the event occurrence intensity function shown in the above formula (7), then the initial event prediction model corresponds to three fully connected layers, and a sample feature vector can be mapped into the parameter information matrix {Ω corresponding to the three preset intensity influence parameters. i ,Ki ,Β i}, please refer to the above-mentioned relevant description of the embodiments of this application for details, which will not be repeated here.
[0202] In a specific implementation, performing intensity function prediction based on the target sample event occurrence intensity function corresponding to each preset event to obtain the occurrence probability of each preset event at the sample prediction time may include:
[0203] For each preset event, the sample prediction time is substituted into the target sample event occurrence intensity function corresponding to the preset event to perform intensity calculation to obtain the sample event occurrence intensity of the preset event at the sample prediction time;
[0204] Based on the target sample event occurrence intensity function, cumulative intensity calculation is performed in the target sample time interval to obtain the sample cumulative intensity of the preset event in the target sample time interval; wherein the target sample time interval is the time period between the sample prediction time and the sample recording time closest to the sample prediction time;
[0205] Based on the above sample cumulative intensity, determine the sample survival coefficient of the preset event at the sample prediction time;
[0206] The product of the sample event occurrence intensity of the preset event and the sample survival coefficient is determined as the probability of occurrence of the preset event at the sample prediction time.
[0207] For the specific content of the above steps, please refer to the aforementioned relevant description of the embodiments of the present application, which will not be repeated here.
[0208] (5) Determine a loss value based on the probability of occurrence of each preset event at the sample prediction time and the reference label of the corresponding preset event at the sample prediction time, and adjust the model parameters of the initial event prediction model based on the loss value until the preset training end condition is met, thereby obtaining the event prediction model.
[0209] The preset training end condition may be that the number of iterations reaches a preset number of iterations, the loss value reaches a preset minimum loss value, or the difference between two adjacent loss values reaches a preset minimum difference.
[0210] In order to improve the prediction accuracy of the trained event prediction model, the embodiment of the present application believes that there is no competition risk between the preset events in the multi-label multivariate point process, and the loss function is based on the probability of occurrence of the preset event and the preset event in P(t i ,t′) time interval probability determination, where the preset event v is in P(t i The interval probability of occurrence at time t′ can be obtained by the following formula (8):
[0211]
[0212] Among them, t′ is the sample prediction time; t′ i The sample record time closest to the sample prediction time in the sample historical event record sequence; p v (t) = λ v (t), λ v (t) represents the sample event occurrence intensity of the preset event v at the sample prediction time.
[0213] Based on this, in an exemplary embodiment, determining the loss value based on the occurrence probability of each preset event at the sample prediction time and the reference label of the corresponding preset event at the sample prediction time may include:
[0214] For each target sample event occurrence intensity function corresponding to a preset event, the target sample event occurrence intensity function is integrated in the target sample time interval to obtain the interval probability of the corresponding preset event in the target sample time interval;
[0215] Using the likelihood function, the loss value is determined based on the above-mentioned occurrence probability, interval probability and reference label of each preset event.
[0216] Specifically, the loss value can be expressed as the following formula (9):
[0217]
[0218] Among them, "1 v " represents the reference label of the preset event v at the sample prediction time; K represents the number of preset events; N represents the number of training data in the training dataset; P(v,t′) represents the probability of occurrence of the preset event v at the sample prediction time t′; P v (t∈[t′ i ,t′]) represents the interval probability of the preset event v at the sample prediction time t′.
[0219] The loss value calculation method of the above embodiment improves the training effect of the multi-label event prediction model, thereby improving the prediction accuracy of the multi-label event prediction model and making the simulated timing point process more reasonable.
[0220] Corresponding to the event prediction methods provided in the above-mentioned embodiments, an embodiment of the present application also provides a multi-label event prediction device based on a timing point process. Since the multi-label event prediction device based on a timing point process provided in the embodiment of the present application corresponds to the multi-label event prediction method based on a timing point process provided in the above-mentioned embodiments, the implementation method of the aforementioned multi-label event prediction method based on a timing point process is also applicable to the multi-label event prediction device based on a timing point process provided in this embodiment, and will not be described in detail in this embodiment.
[0221] See also Figure 6 , which shows a schematic diagram of the structure of a multi-label event prediction device based on a sequential point process provided by an embodiment of the present application. The device has the function of implementing the multi-label event prediction method based on a sequential point process in the above method embodiment. The function can be implemented by hardware or by hardware executing corresponding software. Figure 6 As shown, the multi-label event prediction device 600 based on the time sequence process may include:
[0222] A historical record acquisition module 610 is configured to acquire a sequence of historical event records corresponding to the object to be predicted at the prediction time, wherein each historical event record includes a recording time and event information, and the event information includes at least one preset event that occurred concurrently with the recording time;
[0223] An event similarity processing module 620 is configured to perform event similarity processing based on the event information of each historical event record in the historical event record sequence to obtain event similarity information corresponding to each historical event record; the event similarity information represents the event similarity between the corresponding historical event record and each historical event record in the historical event record sequence;
[0224] A time domain similarity processing module 630 is configured to perform time domain similarity processing based on the recording time of each historical event record in the historical event record sequence to obtain time domain similarity information corresponding to each historical event record; the time domain similarity information represents the time domain similarity between the corresponding historical event record and each historical event record in the historical event record sequence;
[0225] A comprehensive feature extraction module 640 is configured to perform comprehensive feature extraction based on the event similarity information and the time domain similarity information corresponding to each historical event record to obtain a feature vector representation of each historical event record;
[0226] The occurrence probability prediction module 650 is used to perform intensity function prediction based on the feature vector representation of each historical event record, obtain the target event occurrence intensity function corresponding to the target preset event, and determine the probability of occurrence of the target preset event at the predicted time based on the target event occurrence intensity function; the target preset event is any of the preset events.
[0227] In an exemplary embodiment, the time domain similarity processing module 630 includes:
[0228] A time embedding module is used to perform vector embedding processing on the recording time of each historical event record in the historical event record sequence to obtain a time embedding vector sequence;
[0229] A first attention weight determination module is used to determine the attention weight information corresponding to each time embedding vector in the time embedding vector sequence based on the attention mechanism;
[0230] The time domain similarity information determination submodule uses the attention weight information corresponding to each time embedding vector as the time domain similarity information of the historical event record corresponding to the corresponding time embedding vector.
[0231] In an exemplary embodiment, the event similarity processing module 620 includes:
[0232] An encoding module, configured to encode the event information of each historical event record in the historical event record sequence to obtain an event encoding vector sequence;
[0233] A second attention weight determination module is used to determine the attention weight information corresponding to each event encoding vector in the event encoding vector sequence based on the attention mechanism;
[0234] The event similarity information determination submodule uses the attention weight information corresponding to each event encoding vector as the event similarity information of the historical event record corresponding to the corresponding event encoding vector.
[0235] In an exemplary embodiment, the comprehensive feature extraction module 640 includes:
[0236] a comprehensive similarity determination module, configured to determine, for each of the event similarity information and the time domain similarity information corresponding to the historical event record, the product of the event similarity and the time domain similarity corresponding to the same historical event record, to obtain the comprehensive similarity between the historical event record and the same historical event record;
[0237] The feature vector representation determination submodule is used to perform weighted summation based on the event encoding vector of each historical event record and the comprehensive similarity of the corresponding historical event record to obtain the feature vector representation of the historical event record.
[0238] In an exemplary embodiment, the encoding module includes:
[0239] A search module is used to search for valid attribute information corresponding to the historical event record sequence;
[0240] A normalization module, configured to perform normalization processing on the valid attribute information when the valid attribute information is found, to obtain normalized information;
[0241] a weighting module configured to perform a weighted summation of the event embedding vectors in the event embedding vector set corresponding to each historical event record based on the normalization information to obtain an event vector representation corresponding to each historical event record;
[0242] A first encoding submodule is configured to encode an event vector representation sequence based on a recurrent neural network to obtain the event encoding vector sequence; the event vector representation sequence includes an event vector representation corresponding to each historical event record in the historical event record sequence;
[0243] The event embedding vector set corresponding to each historical event record is obtained based on vector embedding processing of the event information of the corresponding historical event record.
[0244] In an exemplary embodiment, the encoding module further includes:
[0245] The second encoding submodule is used to encode the event embedding vector set corresponding to each historical event record based on the reverse recurrent neural network when the valid attribute information is not found, so as to obtain the event encoding vector corresponding to each historical event record in the event encoding vector sequence.
[0246] In an exemplary embodiment, the occurrence probability prediction module 650 includes:
[0247] a parameter information matrix determination module configured to perform a mapping process on a feature vector representation of each historical event record based on a plurality of preset activation functions corresponding to a plurality of preset intensity impact parameters, thereby obtaining a parameter information matrix corresponding to each of the preset intensity impact parameters of the historical event record; wherein the preset dimensions correspond one-to-one to the preset event;
[0248] a target parameter information determining module, configured to determine target parameter information of each preset intensity influencing parameter corresponding to the target preset event based on a parameter information matrix of each preset intensity influencing parameter corresponding to each historical event record;
[0249] The target event occurrence intensity function determination module is used to substitute the target parameter information of each preset intensity influence parameter corresponding to the target preset event into the preset event occurrence intensity function to obtain the target event occurrence intensity function corresponding to the target preset event; the preset event occurrence intensity function includes the multiple preset intensity influence parameters.
[0250] In an exemplary embodiment, the occurrence probability prediction module 650 further includes:
[0251] An event occurrence intensity determination module is used to substitute the predicted time into the target event occurrence intensity function to perform intensity calculation to obtain the event occurrence intensity of the target preset event at the predicted time;
[0252] a cumulative intensity determination module, configured to calculate the cumulative intensity of the target event in a target time interval based on the target event occurrence intensity function, and obtain the cumulative intensity of the target preset event in the target time interval; the target time interval is the time period between the predicted time and the recorded time closest to the predicted time;
[0253] a survival coefficient determination module, configured to determine the survival coefficient of the target preset event at the predicted time based on the cumulative intensity;
[0254] The occurrence probability determination module is used to determine the product of the event occurrence intensity of the target preset event at the predicted time and the survival coefficient as the occurrence probability of the target preset event at the predicted time.
[0255] In an exemplary embodiment, the apparatus further includes a model training module, the model training module including:
[0256] A training data acquisition module is used to obtain a sample historical event record sequence corresponding to the sample object at the sample prediction time, and a reference label corresponding to each preset event at the sample prediction time; the reference label indicates whether the corresponding preset event occurs at the sample prediction time;
[0257] A vector sequence determination module is used to determine a sample time embedding vector sequence and a sample event encoding vector sequence based on the sample historical event record sequence;
[0258] a temporal attention processing module, configured to utilize the temporal attention layer of the initial event prediction model to determine, based on the attention mechanism and the sample time embedding vector sequence, sample temporal similarity information corresponding to each sample historical event record; determine, based on the attention mechanism and the sample event encoding vector sequence, sample event similarity information corresponding to each sample historical event record; and perform comprehensive feature extraction based on the sample event similarity information and sample temporal similarity information corresponding to each sample historical event record to obtain a sample feature vector representation of each sample historical event record;
[0259] A prediction module is configured to perform intensity function prediction based on the sample feature vector representation of each sample historical event record to obtain the target sample event occurrence intensity function corresponding to each preset event, and determine the probability of occurrence of each preset event at the sample prediction time based on the target sample event occurrence intensity function corresponding to each preset event;
[0260] The parameter adjustment module is used to determine the loss value based on the probability of occurrence of each preset event at the sample prediction time and the reference label of the corresponding preset event at the sample prediction time, and adjust the model parameters of the initial event prediction model based on the loss value until the preset training end conditions are met to obtain the event prediction model.
[0261] In an exemplary embodiment, the prediction module includes:
[0262] a sample event occurrence intensity determination module, configured to, for each of the preset events, substitute the sample prediction time into the target sample event occurrence intensity function corresponding to the preset event, and determine the sample event occurrence intensity of the preset event at the sample prediction time;
[0263] A sample cumulative intensity determination module is configured to calculate the cumulative intensity of the target event in a target sample time interval based on the target sample event occurrence intensity function, and obtain the sample cumulative intensity of the preset event in the target sample time interval; the target sample time interval is the time period between the sample prediction time and the sample recording time closest to the sample prediction time;
[0264] A sample survival coefficient determination module is used to determine the sample survival coefficient of the preset event at the sample prediction time based on the sample cumulative intensity;
[0265] The prediction submodule is used to determine the product of the sample event occurrence intensity of the preset event and the sample survival coefficient as the probability of occurrence of the preset event at the sample prediction time.
[0266] In an exemplary embodiment, the parameter adjustment module includes:
[0267] An interval probability determination module is used to integrate the target sample event occurrence intensity function corresponding to each preset event in the target sample time interval to obtain the interval probability of the corresponding preset event in the target sample time interval;
[0268] The loss value determination module is used to determine the loss value based on the occurrence probability, the interval probability and the reference label of each preset event by using a likelihood function.
[0269] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0270] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement any one of the multi-label event prediction methods based on a time point process provided in the above method embodiments.
[0271] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for the functions, etc.; the data storage area can store data created based on the use of the device, etc. In addition, the memory can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.
[0272] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal, a server or a similar computing device, that is, the above-mentioned electronic device can include a computer terminal, a server or a similar computing device. Figure 7 This is a hardware structure diagram of an electronic device that runs a multi-label event prediction method based on a time sequence process provided by an embodiment of the present application. The electronic device can participate in or include the event prediction device provided by the embodiment of the present application. Figure 7 As shown, the electronic device 70 may include one or more (shown as 702a, 702b, ..., 702n in the figure) processors 702 (the processor 702 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 704 for storing data, and a transmission device 706 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 7 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 7 More or fewer components than shown, or with Figure 7 Different configurations shown.
[0273] It should be noted that the one or more processors 702 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the electronic device 70 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0274] The memory 704 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the event prediction method in the embodiment of the present application. The processor 702 executes various functional applications and data processing by running the software programs and modules stored in the memory 74, that is, implementing the above-mentioned event prediction method. The memory 704 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 704 may further include a memory remotely arranged relative to the processor 702, and these remote memories can be connected to the electronic device 70 via a network. Examples of the above-mentioned network include but are not limited to the Internet, corporate intranet, local area network, mobile communication network and combinations thereof.
[0275] The transmission device 706 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by the communication provider of the electronic device 70. In one embodiment, the transmission device 706 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, the transmission device 706 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0276] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 70 (or mobile device).
[0277] An embodiment of the present application also provides a computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a multi-label event prediction method based on a time point process. The at least one instruction or the at least one program is loaded and executed by the processor to implement any one of the multi-label event prediction methods based on a time point process provided in the above method embodiments.
[0278] Embodiments of the present application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform any of the multi-label event prediction methods based on a time series process provided in the above method embodiments.
[0279] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0280] It should be noted that the order of the embodiments of the present application described above is for descriptive purposes only and does not represent the superiority or inferiority of the embodiments. The above description is of specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0281] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0282] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0283] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A multi-label event prediction method based on time series point process, characterized in that: The method comprises: Obtain a sequence of historical event records corresponding to the object to be predicted at the prediction time, where each historical event record includes a recording time and event information, and the event information includes at least one preset event that occurs concurrently with the recording time; performing event similarity processing based on the event information of each historical event record in the historical event record sequence to obtain event similarity information corresponding to each historical event record; the event similarity information represents the event similarity between the corresponding historical event record and each historical event record in the historical event record sequence; Performing time domain similarity processing based on the recording time of each historical event record in the historical event record sequence to obtain time domain similarity information corresponding to each historical event record; the time domain similarity information represents the time domain similarity between the corresponding historical event record and each historical event record in the historical event record sequence; Performing comprehensive feature extraction based on event similarity information and time domain similarity information corresponding to each of the historical event records to obtain a feature vector representation of each of the historical event records; An intensity function prediction is performed based on the characteristic vector representation of each of the historical event records to obtain a target event occurrence intensity function corresponding to the target preset event, and the probability of occurrence of the target preset event at the predicted time is determined based on the target event occurrence intensity function; the target preset event is any of the preset events.
2. The method according to claim 1, characterized in that The performing time domain similarity processing based on the recording time of each historical event record in the historical event record sequence to obtain time domain similarity information corresponding to each historical event record includes: Performing vector embedding processing on the recording time of each historical event record in the historical event record sequence to obtain a time embedding vector sequence; Determining attention weight information corresponding to each time embedding vector in the time embedding vector sequence based on an attention mechanism; The attention weight information corresponding to each time embedding vector is used as the time domain similarity information of the historical event record corresponding to the corresponding time embedding vector.
3. The method according to claim 1, characterized in that The performing event similarity processing based on the event information of each historical event record in the historical event record sequence to obtain event similarity information corresponding to each historical event record includes: Encoding the event information of each historical event record in the historical event record sequence to obtain an event encoding vector sequence; Determining attention weight information corresponding to each event encoding vector in the event encoding vector sequence based on an attention mechanism; The attention weight information corresponding to each event encoding vector is used as the event similarity information of the historical event record corresponding to the corresponding event encoding vector.
4. The method according to claim 3, characterized in that The comprehensive feature extraction based on the event similarity information and the time domain similarity information corresponding to each of the historical event records to obtain a feature vector representation of each of the historical event records includes: For each of the event similarity information and time domain similarity information corresponding to the historical event record, determine the product of the event similarity and time domain similarity corresponding to the same historical event record to obtain the comprehensive similarity between the historical event record and the same historical event record; A weighted sum is performed based on the event coding vector of each of the historical event records and the comprehensive similarity of the corresponding historical event records to obtain a feature vector representation of the historical event record.
5. The method according to claim 3, characterized in that The encoding process is performed on the event information of each historical event record in the historical event record sequence to obtain an event encoding vector sequence, including: Searching for valid attribute information corresponding to the historical event record sequence; When the valid attribute information is found, normalizing the valid attribute information to obtain normalized information; For each historical event record corresponding to an event embedding vector set, performing weighted summation on the event embedding vectors in the event embedding vector set based on the normalization information to obtain an event vector representation corresponding to each historical event record; encoding an event vector representation sequence based on a recurrent neural network to obtain the event encoding vector sequence; the event vector representation sequence includes an event vector representation corresponding to each historical event record in the historical event record sequence; The event embedding vector set corresponding to each historical event record is obtained based on vector embedding processing of the event information of the corresponding historical event record.
6. The method according to claim 5, characterized in that The method further comprises: In the case that the valid attribute information is not found, the event embedding vector set corresponding to each historical event record is encoded based on the reverse recurrent neural network to obtain the event encoding vector corresponding to each historical event record in the event encoding vector sequence.
7. The method according to claim 1, characterized in that The intensity function prediction is performed based on the feature vector representation of each of the historical event records to obtain the target event occurrence intensity function corresponding to the target preset event, including: For each historical event record, a feature vector representation is mapped to a preset dimension based on a plurality of preset activation functions corresponding to a plurality of preset intensity influence parameters, thereby obtaining a parameter information matrix corresponding to each of the preset intensity influence parameters of the historical event record; the preset dimensions correspond one-to-one to the preset events; Determining target parameter information of each preset intensity impact parameter corresponding to the target preset event based on a parameter information matrix of each preset intensity impact parameter corresponding to each historical event record; Substitute the target parameter information of each preset intensity influence parameter corresponding to the target preset event into the preset event occurrence intensity function to obtain the target event occurrence intensity function corresponding to the target preset event; the preset event occurrence intensity function includes the multiple preset intensity influence parameters.
8. The method according to claim 1, characterized in that The determining, based on the target event occurrence intensity function, the probability of occurrence of the target preset event at the predicted time includes: Substituting the predicted time into the target event occurrence intensity function to perform intensity calculation to obtain the event occurrence intensity of the target preset event at the predicted time; Performing cumulative intensity calculation in a target time interval based on the target event occurrence intensity function to obtain the cumulative intensity of the target preset event in the target time interval; the target time interval is the time period between the predicted time and the recorded time closest to the predicted time; Determining a survival coefficient of the target preset event at the predicted time based on the cumulative intensity; The product of the event occurrence intensity of the target preset event at the predicted time and the survival coefficient is determined as the occurrence probability of the target preset event at the predicted time.
9. The method according to any one of claims 1 to 8, characterized in that The method is implemented based on a multi-label event prediction model, and the method further includes training the multi-label event prediction model, wherein the training of the multi-label event prediction model includes: Obtaining a sample historical event record sequence corresponding to the sample object at the sample prediction time, and a reference tag corresponding to each of the preset events at the sample prediction time; the reference tag indicates whether the corresponding preset event occurs at the sample prediction time; Determining a sample time embedding vector sequence and a sample event encoding vector sequence based on the sample historical event record sequence; Utilizing the temporal attention layer of the initial event prediction model, determining the sample temporal similarity information corresponding to each sample historical event record based on the attention mechanism and the sample time embedding vector sequence; determining the sample event similarity information corresponding to each sample historical event record based on the attention mechanism and the sample event encoding vector sequence; and performing comprehensive feature extraction based on the sample event similarity information and the sample temporal similarity information corresponding to each sample historical event record to obtain a sample feature vector representation of each sample historical event record; Performing intensity function prediction based on the sample feature vector representation of each sample historical event record to obtain a target sample event occurrence intensity function corresponding to each preset event, and determining the probability of occurrence of each preset event at the sample prediction time based on the target sample event occurrence intensity function corresponding to each preset event; The loss value is determined based on the probability of occurrence of each preset event at the sample prediction time and the reference label of the corresponding preset event at the sample prediction time, and the model parameters of the initial event prediction model are adjusted based on the loss value until the preset training end conditions are met, thereby obtaining the multi-label event prediction model.
10. The method according to claim 9, characterized in that The performing intensity function prediction based on the target sample event occurrence intensity function corresponding to each of the preset events to obtain the occurrence probability of each of the preset events at the sample prediction time includes: For each of the preset events, the sample prediction time is substituted into the target sample event occurrence intensity function corresponding to the preset event to perform intensity calculation to obtain the sample event occurrence intensity of the preset event at the sample prediction time; Based on the target sample event occurrence intensity function, cumulative intensity calculation is performed in a target sample time interval to obtain the sample cumulative intensity of the preset event in the target sample time interval; the target sample time interval is the time period between the sample prediction time and the sample recording time closest to the sample prediction time; Determining the sample survival coefficient of the preset event at the sample prediction time based on the sample cumulative intensity; The product of the sample event occurrence intensity of the preset event and the sample survival coefficient is determined as the occurrence probability of the preset event at the sample prediction time.
11. The method according to claim 10, characterized in that The determining of the loss value based on the occurrence probability of each of the preset events at the sample prediction time and the reference label of the corresponding preset event at the sample prediction time includes: For each target sample event occurrence intensity function corresponding to the preset event, integrating the target sample event occurrence intensity function in the target sample time interval to obtain the interval probability of the corresponding preset event in the target sample time interval; A likelihood function is used to determine a loss value based on the occurrence probability, the interval probability, and the reference label of each of the preset events.
12. A multi-label event prediction device based on a time sequence process, characterized in that: The device comprises: A historical record acquisition module is used to acquire a sequence of historical event records corresponding to the object to be predicted at the prediction time, each historical event record includes a recording time and event information, and the event information includes at least one preset event that occurs in parallel with the recording time; an event similarity processing module, configured to perform event similarity processing based on the event information of each historical event record in the historical event record sequence to obtain event similarity information corresponding to each historical event record; the event similarity information represents the event similarity between the corresponding historical event record and each historical event record in the historical event record sequence; a time domain similarity processing module, configured to perform time domain similarity processing based on the recording time of each historical event record in the historical event record sequence to obtain time domain similarity information corresponding to each historical event record; the time domain similarity information represents the time domain similarity between the corresponding historical event record and each historical event record in the historical event record sequence; A comprehensive feature extraction module, configured to perform comprehensive feature extraction based on the event similarity information and the time domain similarity information corresponding to each of the historical event records, to obtain a feature vector representation of each of the historical event records; An occurrence probability prediction module is used to perform intensity function prediction based on the feature vector representation of each of the historical event records, obtain a target event occurrence intensity function corresponding to the target preset event, and determine the probability of occurrence of the target preset event at the predicted time based on the target event occurrence intensity function; the target preset event is any of the preset events.
13. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the multi-label event prediction method based on a time series process according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the multi-label event prediction method based on the time series process as described in any one of claims 1 to 11.
15. A computer program, characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor, the method realizes the multi-label event prediction method based on a time sequence point process according to any one of claims 1 to 11.
Citation Information
Patent Citations
Content recommendation method and device, electronic equipment and storage medium
CN114817733A
User event pattern prediction and presentation
US20190373101A1