A social network event prediction method and device
By combining neural stochastic differential equations and latent graphs, the shortcomings of social network event prediction models in dynamic expression and relationship characterization are addressed, achieving more accurate prediction of event types and times.
Patent Information
- Application Number
- CN202510934256.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-07-08
AI Technical Summary
Existing social network event prediction models are inadequate in characterizing the complex dynamic changes and potential relationships between event types, leading to the amplification of the impact of unrelated events and limitations in the model's expressive power.
We employ neural stochastic differential equations to model dynamic latent states, combine latent graphs to capture implicit influences between events, and optimize parameters through a loss function to construct a social network event prediction model.
It improves the accuracy and dynamic expressiveness of event prediction, explicitly characterizes the potential relationships between event types, reduces interference from irrelevant events, and enhances the interpretability and representational ability of the model.
Smart Images

Figure CN120430882B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of artificial intelligence and event sequence prediction, and particularly relates to a social network event prediction method and device. BACKGROUND
[0002] In modern society, event data is usually composed of a large number of asynchronous event sequences, which plays a crucial role in various fields from scientific research to industrial applications, highlighting its undeniable importance. Each event in these sequences has a time of occurrence and a type label, indicating the time and nature of the event. On social media platforms, user behavior generates a large number of complex and rich event sequences, including likes, comments, forwards, follows, content publishing, and other interactive behaviors. These event sequences contain important information such as user behavior patterns, information dissemination dynamics, and interest evolution trends. Accurate modeling and prediction of these event sequences can be widely applied to user interaction behavior prediction, information dissemination process modeling, and user interest evolution analysis in key scenarios. To effectively capture the temporal dynamic characteristics and dependencies between events, existing research usually introduces temporal point processes (TPPs) to model this dependency. TPPs can describe the occurrence of events on the time axis, capture the mutual influence and dynamic evolution characteristics between events, and help social platforms achieve more intelligent content recommendation, more efficient information dissemination strategies, and more conversion-oriented personalized marketing, directly improving the commercial benefits of social platforms.
[0003] Traditional TPPs usually rely on certain assumptions when defining the intensity function, which limits the model's ability to express complex event dependencies and nonlinear dynamics. For example, the Hawkes process defines a self-exciting process, indicating that past events increase the probability of future events. The self-correcting point process assumes that past events inhibit future events. In the Poisson point process, the probability of an event occurring at each time is constant and independent of past events. With the development of deep learning, neural point processes (NPPs) have received significant attention for their ability to model complex dynamics in asynchronous event sequences using neural networks. For example, Omi et al. introduced a fully neural network-based method to model the integral of the intensity function and its derivative as the intensity function. Shchur et al. proposed a strength-free method that does not require explicit modeling of the intensity function, reducing dependence on specific forms. Subsequently, transformer-based methods were proposed, and scholars began to use attention mechanisms to model MTPPs (Multivariate Temporal Point Processes). With the development of neural ordinary differential equations (ODEs) and stochastic differential equations (SDEs), methods based on modeling continuous systems rather than other architectures (such as recurrent neural networks, RNNs) can explicitly simulate smooth transitions between intensity function states. Jia and Benson proposed the NJSDE (Neural Jump Stochastic Differential Equation) model, which represents the underlying dynamics in temporal point processes by modeling the continuous state evolution during event intervals and the discrete state jump at event occurrence times. Song et al. introduced the Dec-ODE (Decoupled Ordinary Differential Equation), which decouples the hidden state dynamics through neural ODEs. Zhang et al. proposed the NJDTPP (Neural Jump Diffusion Temporal Point Process), in which the intensity process is designed by neural jump diffusion SDEs.However, these methods ignore the potential correlation between event types, leading to the introduction of noise interference of irrelevant events when modeling the interaction of events. In addition, NJSDE uses ODEs to simulate the entire system rather than each event type, while NJDTPP adopts one-dimensional SDEs for each event type, resulting in certain limitations in handling complex dependencies between event types.
[0004] In summary, the problems and defects of the prior art are: (1) the existing continuous system modeling method based on ODEs / SDEs mostly only targets a single dimension or the entire system, and cannot effectively depict the complex dynamic changes of each event type; (2) the existing neural point process does not further consider the potential relationship between event types, and ignores that the potential relationship may lead to amplification of the influence between irrelevant events; (3) the existing neural point process modeling potential graph has been developed, but it has not yet been combined with the SDEs-based model, limiting the ability of the model in expressing complex temporal dynamics and structural dependencies. SUMMARY
[0005] In view of the problems of the prior art, the embodiments of the present application provide a social network event prediction method and device.
[0006] The embodiments of the present application provide a social network event prediction method, comprising:
[0007] Obtaining user interaction event sequence data with occurrence time in a social network, and assigning an initial latent state to each event type, wherein the latent state comprises the initial latent state and a plurality of dynamic latent states, and the initial latent state is a starting condition of the plurality of dynamic latent states;
[0008] In a continuous time interval, determining the evolution process of the dynamic latent state with respect to the continuous time variable based on a neural stochastic differential equation; when a first user interaction event occurs, constructing a jump term combined with a latent graph based on the implicit influence weight between event types, and updating the dynamic latent state of the first user interaction event;
[0009] Using the dynamic latent state of each event type and the user interaction event sequence data set to construct a loss function and optimizing the parameters of the social network event prediction model using the user interaction event sequence data;
[0010] Using the dynamic latent state of the event type to calculate an event intensity function to obtain the type of the next event and the predicted occurrence time of the next event.
[0011] The embodiments of the present application provide a social network event prediction device, comprising:
[0012] An assignment unit is configured to obtain user interaction event sequence data with occurrence time in a social network, and assign an initial latent state to each event type, wherein the latent state comprises the initial latent state and a plurality of dynamic latent states, and the initial latent state is a starting condition of the plurality of dynamic latent states.
[0013] An updating unit is configured to determine an evolution process of the dynamic latent state with respect to a continuous time variable based on a neural stochastic differential equation in a continuous time interval, construct a jump term of a combined latent graph based on an implicit influence weight between event types when a first user interaction event occurs, and update a dynamic latent state of the first user interaction event.
[0014] A constructing unit is configured to construct a loss function by using the dynamic latent state of each event type and the user interaction event sequence data set, and optimize parameters of a social network event prediction model by using the user interaction event sequence data.
[0015] A obtaining unit is configured to calculate an event intensity function by using the dynamic latent state of the event type, and obtain a type of a next event and a predicted occurrence time of the next event.
[0016] The embodiments of the present application provide a computer device, which comprises a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the social network event prediction method.
[0017] The embodiments of the present application provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to make the processor execute the social network event prediction method.
[0018] In summary, the social network event prediction method and device provided by the embodiment of the present application, the method cooperates multiple modules through neural stochastic differential equation modeling dynamic potential state, potential graph capturing implicit influence between events, loss function optimizing parameters and event intensity predicting event type and time, forming a complete social network event sequence prediction framework. The core advantages are as follows: dynamic modeling capability: neural stochastic differential equation effectively describes the time evolution law of the potential state of the event, solving the problem of insufficient dynamic expression of the traditional social network event prediction model; relationship perception capability: the potential graph and the jump mechanism automatically learn the implicit influence weight between event types, avoiding irrelevant event interference and improving relationship modeling accuracy; prediction accuracy: learning the optimal parameters from the data and combining the event intensity function to realize accurate prediction of the event type and the occurrence time, suitable for various application scenarios in the social network. The method not only models the state evolution process of the event itself through neural stochastic differential equation, but also models the potential relationship between events and its influence, which not only improves the interpretability of the social network event prediction model, but also enhances the representation capability and accuracy of the social network event prediction model. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced as follows. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0020] Figure 1 A social network event prediction method flowchart is provided for the embodiment of the present application.
[0021] Figure 2 A ROC comparison diagram of the social network event prediction model learning edge probability and the real graph structure in the synthetic network scenario is provided for the embodiment of the present application.
[0022] Figure 3 A social network event prediction device structure diagram is provided for the embodiment of the present application. DETAILED DESCRIPTION
[0023] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0024] The definition of time in the application file:
[0025] 1、 This represents any point in time on a continuous time axis, i.e., a continuous time variable, with a range of values []. ), used to describe the continuous evolution of potential states, within an interval Inside, Represents a continuous time variable within an event interval, or an interval. It represents the continuous time interval from the time an event is updated until the next event occurs.
[0026] 2. Indicates the first The time of occurrence of each event ; These are discrete event trigger points, and adjacent events satisfy... ; and continuous time Relationship: yes Discrete subsets on the axis.
[0027] 3. This represents the instant after the occurrence of the i-th event, at which point the latent state completes the jump update. and The time difference is close to 0, but logically it is the moment that is updated immediately after the event occurs.
[0028] 4. Indicates the first The time of occurrence of each event, and Formation time interval No events occurred within the interval.
[0029] 5. It represents the time when the most recent event occurred before a continuous time variable.
[0030] 6. Indicates the current prediction time; if it is after the event occurs, If in continuous evolution, For interval At any time within.
[0031] 7. Represents the start time of the event sequence, satisfying , Indicates the time when the first event occurred.
[0032] 8. It indicates that it is in the first The event to the The time interval between events [ Within ], the interval is divided into equal parts. The first sub-interval after the first At which time point, among which .
[0033] 9、 predicted occurrence time of next event.
[0034] As Figure 1 shown, the social network event prediction method provided by the embodiment of the application mainly comprises the following steps:
[0035] Step 101, acquiring user interaction event sequence data with occurrence time in a social network, and assigning an initial latent state to each event type, wherein the latent state comprises the initial latent state and a plurality of dynamic latent states, and the initial latent state is a starting condition of the plurality of dynamic latent states;
[0036] Step 102, determining an evolution process of the dynamic latent state with respect to a continuous time variable based on a neural stochastic differential equation in a continuous time interval; when a first user interaction event occurs, constructing a jump term of a combined latent graph based on an implicit influence weight between event types, and updating a dynamic latent state of the first user interaction event;
[0037] Step 103, constructing a loss function for a user interaction event sequence data set by using the dynamic latent state of each event type, and optimizing parameters of a social network event prediction model by using the user interaction event sequence data;
[0038] Step 104, calculating an event intensity function by using the dynamic latent state of the event type, and obtaining a type of a next event and a predicted occurrence time of the next event.
[0039] Step 101 is mainly used for data collection and preprocessing of data. Specifically, user interaction event sequence data with occurrence time in a social network is collected. In the embodiment of the application, the time sequence can be represented by the following formula:
[0040] (1)
[0041] wherein, represents the i-th user interaction event sequence data, , , represents the total number of user interaction event sequence data sets, represents the event type of the i-th event, and belongs to an event type set , represents the occurrence time of the event, represents the length of the i-th event sequence.
[0042] For example, the behavior data of a user on an e-commerce platform (such as browsing, adding to cart, ordering, commenting, etc.) can be collected to form user interaction event sequence data in chronological order. The behavior record of a user within 24 hours is as follows: wherein the numbers represent event types (1 = browsing, 2 = adding to cart, 3 = ordering, and 4 = commenting), and the time represents the occurrence time of the behavior.
[0043] Further, an initial latent state vector is assigned to each event type (such as browsing and adding to cart), for example, the initial state of browsing is , which represents the initial behavior tendency. In an embodiment of the present application, the latent state includes the initial latent state and a plurality of dynamic latent states, and the initial latent state is the starting condition of the plurality of dynamic latent states. The initial latent state can be shown by the following formula:
[0044] (2)
[0045] wherein represents the initial latent state of the event type , , represents the initial time, represents the initial latent state of the event type at the initial time .
[0046] In actual application, by setting the initial latent state for each event type, a starting point can be provided for the dynamic evolution of the subsequent dynamic latent state, and the vector dimension can encode multi-dimensional features (such as behavior intensity and duration, etc.), so that the social network event prediction model can capture behavior features from a reasonable starting point through the learnable initial vector.
[0047] In the above example, let , then the initial latent states of the browsing event and the adding-to-cart event in the above four event types can be as follows:
[0048] The initial latent state of the browsing event is: , and the initial latent state of the adding-to-cart event is: .
[0049] In step 102, the dynamic evolution of the dynamic latent state can be performed using the initial latent state in a continuous time interval, that is, the dynamic evolution process of the dynamic latent state is determined using a neural stochastic differential equation. In an embodiment of the present application, the dynamic change process of the dynamic latent state in the time interval from the occurrence of the th event to the occurrence of the th event can be determined by the drift-diffusion method as shown below:
[0050] (3)
[0051] wherein, denotes a small change amount of the dynamic latent state vector in the continuous time variable , denotes the dynamic latent state vector in the continuous time variable , denotes the occurrence time of the last event before the continuous time variable denotes the time interval of the continuous time variable and the occurrence time of the last event before the continuous time variable denotes Brown motion, denotes a drift term, denotes a diffusion term.
[0052] In the embodiments of the present application, the neural stochastic differential equation refers to a model combining a neural network with SDEs, which parameterizes the drift term and diffusion term of the SDEs through the neural network, and realizes data-driven dynamic system modeling. Wherein, the function is a drift term, which is used to describe the "deterministic" evolution process of the latent state, which not only depends on the current dynamic latent state vector , but also considers the time interval between the last event, for example, to model the decay or accumulation of the influence of the event over time; the function is a diffusion term, which represents the "random" disturbance of the latent state, mainly reflecting the uncertainty of the occurrence of the event type, external environmental fluctuations, etc., and its change only depends on the dynamic latent state vector .
[0053] According to the above example, if the drift term is , and the diffusion term is ; then when the user places an order at 9:00, the dynamic latent state of the add-to-cart event starts to evolve from: to 14:30, hours, the drift term makes decay by , and the diffusion term adds random disturbance .
[0054] According to the above, the influence of behavior usually decreases over time, such as the user's tendency to add to cart again after placing an order in the short term, and the drift term quantifies this decay law through the time interval; user behavior is affected by random factors (such as recommendation algorithms, sudden messages), and the diffusion term represents these unpredictable external disturbances.
[0055] In the embodiments of the present application, by introducing the drift term and the diffusion term, the social network event prediction model can capture the trend of behavior tendency over time, solve the problem of behavior uncertainty modeling, avoid over-determination of the social network event prediction model, and be closer to the real scene.
[0056] In actual application, the information interaction between event types does not continue in continuous time, but is triggered by a jump process only at the moment when the event type occurs. For this purpose, the embodiments of the present application introduce a latent graph to depict the potential influence relationship between event types and guide the propagation path of information at the event trigger, and then perform jump correction on the event potential state. Specifically, at the continuous time variable , the influence of a certain event type on all other event types can be modeled by a jump amount, and the specific process is as follows:
[0057] (4-1)
[0058] At the same time, for extension to all event types, the jump update form is generalized as:
[0059] (4-2)
[0060] wherein, represents the jump change amount of the dynamic potential state vector of the event type at the continuous time variable , represents the dynamic potential state vector of the event type at the continuous time variable , represents the dynamic potential state vector of the event type at the continuous time variable , represents the indication function of whether the event type occurs at the continuous time variable , represents the aggregated jump function, represents the total number of event types, represents the index of the event type.
[0061] Further, to avoid modeling invalid jumps between events that are irrelevant to each other, a latent graph is introduced to control information flow. The adjacency matrix of the graph is constructed by a set of trainable parameters, and the specific process is as follows:
[0062] (5)
[0063] wherein, represents the event type to the event type Influence weight, Indicates the type of edge. In this embodiment of the invention, the number of types is set to 2, where 0 indicates the existence of an actual relationship and 1 indicates the absence of an actual relationship. The type definition of this neighbor matrix can be extended according to data types to achieve flexible representation of different meanings and different numbers of relationships. This represents the learnable parameter matrix. This represents the temperature parameter.
[0064] In this embodiment of the invention, this method is used instead of the initial state. This is used to generate graph structures to avoid the potential graph being affected by initial conditions during long-sequence training, thereby improving training stability.
[0065] Furthermore, by utilizing the influence weighted interaction function of the latent graph, the event type can be obtained. For event types The interactive items are as follows:
[0066] (6)
[0067] By combining self-jump items and interactive jump items, the total number of jumps can be obtained, as shown below:
[0068] (7)
[0069] in, Indicates event type For event types Interactive items, Representing edge type Weighted interaction function, Indicates event type In continuous time variables The dynamic latent state vector,
[0070] Indicates event type In continuous time variables The dynamic potential state vector; Represents variables in continuous time Event type The jump amount of the dynamic latent state vector. Indicates a single-point jump item. This indicates an aggregation interaction jump function. Indicates event type In continuous time variables Indicator function for whether it has occurred Indicates event type In continuous time variable an indicator function of whether the event has occurred.
[0071] Further, after the occurrence of the th event, the latent state of the corresponding type is updated by the following formula:
[0072] (8)
[0073] where, represents the dynamic latent state vector of the event type at the instant time after the occurrence of the th event, represents the dynamic latent state vector of the event type at the occurrence of the th event, represents the jump amount of the dynamic latent state vector of the event type at the occurrence of the th event.
[0074] It should be noted that the weighted aggregation of the interaction term not only encodes the representation of the event type, but also integrates the structural information of the latent graph, thereby explicitly modeling the interaction and influence between event types in the jump update, making the dynamic latent state change triggered by each event more consistent with the latent influence relationship. Overall, this jump propagation mechanism based on latent graphs balances modeling accuracy and computational efficiency, and has certain advantages in describing the heterogeneous and sparse interaction in the process of complex event sequences.
[0075] Continuing with the above example: let , (the interaction weight of the add-to-cart event on the order event), then: , so the influence weight of the add-to-cart event to the order event in the latent graph is (the weight of edge type 0), (the weight of edge type 1).
[0076] Further, the jump amount of the add-to-cart event to the order event at 8:20 can be as follows, assuming , \ (element product), then: .
[0077] If , and , then: ; that is , which embodies the promoting effect of the add-to-cart event on the order event.
[0078] In step 103, for each event type , the event intensity function of event type k at time is calculated by activating a function to realize the nonlinear mapping of latent state to event intensity, and the formula is:
[0079] (9)
[0080] wherein, represents the event intensity of event type k at continuous time variable , represents the activation function, and represents the neural network mapping function.
[0081] In practical applications, the activation function is defined as: .
[0082] Further, the dynamic latent state vector is calculated by the numerical simulation method of stochastic differential equation, and the calculated event intensity function is obtained at each discrete time , and the negative log-likelihood loss function is constructed for the user interaction event sequence data set , and the specific steps include:
[0083] (10)
[0084] wherein, represents the negative log-likelihood loss function, represents the event type of the i-th event, represents the occurrence time of the i-th event, represents the i-th discrete time point after dividing the time interval [t ] from the i-th event to the j-th event into sub-intervals, represents the i-th discrete time point after dividing the time interval [t ] from the i-th event to the j-th event into sub-intervals, and , denotes the total number of discrete time points, denotes the total number of event types, denotes the index of event type, denotes the index of the discrete time point, denotes the index of the discrete time point, denotes the index of the discrete time point, after evenly dividing the interval into sub-intervals, denotes the index of the discrete time point, denotes the event type, denotes the event intensity at continuous time variable , denotes the index of the discrete time point, denotes the index of the discrete time point, denotes the index of the discrete time point, after evenly dividing the interval into sub-intervals, denotes the index of the discrete time point, denotes the event type, denotes the event intensity at continuous time variable , denotes the event type, denotes the event intensity at time .
[0085] It is to be noted that the first term is used to maximize the probability of the event type occurring at , and the second integral term is approximated by the trapezoidal numerical integration to estimate the background intensity contribution during the period when the event does not occur, thereby improving the dynamic modeling capability of the social network event prediction model on the entire time axis. Finally, the gradient information of the negative log-likelihood loss function is calculated by the backpropagation algorithm to obtain the gradient information of the parameters (including , , , etc.) of the social network event prediction model, and the parameters of the social network event prediction model are iteratively updated by using an optimization algorithm (such as the Adam optimizer), so as to gradually improve the fitting capability of the social network event prediction model on the training data and realize the effective training of the social network event prediction model.
[0086] In the above example, if the dynamic potential state vector at 14:30 is , and is assumed, then: denotes that the probability density of the occurrence of browsing per minute is 2.3.
[0087] In step 104, the dynamic potential state vector is determined according to the event type. And the parameters of the trained social network event prediction model This yields the dynamic latent state vector of the continuous-time variables. The event intensity function for each event type at the current time is calculated using the Softplus activation function. Based on the intensity function, the conditional probability of each event type occurring is determined.
[0088] (11)
[0089] Furthermore, based on the determined conditional probabilities of each event type, the type of the next event is obtained, and then the time of occurrence of the next event is predicted. This invention, based on neural point process modeling theory, utilizes the total intensity function of the event type to construct a conditional probability density function for the event occurrence time. The expected value of the conditional density function is determined based on this function, and then the predicted occurrence time of the next event is obtained.
[0090] (12)
[0091] (13)
[0092] in, Indicates the current forecast time The event type is The conditional probability, Indicates event type Current forecast time The intensity of the event, Indicates event type At the current forecast time The intensity of the event, Indicates the total number of event types. Indicates the predicted time of the next event. The conditional probability density function, This represents the total intensity of all event types. Represents the integral variable. This indicates the predicted time of the next event.
[0093] Following the example above, the event intensity for each event type is calculated as follows: At the current time 15:00 (the time the user has just placed an order): , Then it can be done through the formula The probability of a browsing event occurring is 51%.
[0094] If the total intensity of the event type Assuming constant strength, using the formula This allows us to determine that the predicted time for the next event is 15:17, or 17 minutes from now. In this example, the next event is ultimately determined to be a browsing event, with a predicted time of 15:17.
[0095] It should be noted that the core formula of the social network event prediction model in this embodiment of the invention includes:
[0096] 1. Dynamic latent state evolution equation:
[0097] (3)
[0098] Among them, the drift term From parameters Control (such as weights and biases in neural networks) is used to model the deterministic evolution of latent states (such as time decay); diffusion term From parameters Control refers to the random perturbation of a potential state (such as fluctuations in the external environment).
[0099] 2. Jumping items in conjunction with the potential map:
[0100] (7)
[0101] (6)
[0102] (8)
[0103] in, Indicates event type In continuous time variables The jump change of the dynamic latent state vector. Represents the aggregate jump function. Indicates event type In continuous time variables Whether it happens, Indicates event type In continuous time variables Whether it happens, This represents a single-point jump function. Indicates event type In continuous time variables The dynamic latent state vector, Indicates event type In continuous time variables The dynamic latent state vector, Indicates event type For event types Interactive items, Representing edge type the jump interaction function. updating the event type after the event occurrence in continuous time variable the dynamic latent state vector.
[0104] 3, the event intensity function:
[0105] (9)
[0106] where the neural network mapping function is controlled by parameters (such as the layer structure of the neural network, the weight), which maps the latent state to the logarithmic space of the event intensity; is the activation function, which ensures that the event intensity is non-negative; represents the event type in continuous time variable the event intensity (probability density).
[0107] 4, the negative log-likelihood loss function:
[0108] (10)
[0109] The gradient of , , , is calculated by the back propagation algorithm, and the parameters are updated iteratively by using the Adam optimizer, so as to minimize the negative log-likelihood loss function and improve the fitting ability of the social network event prediction model to the event sequence.
[0110] The first term is the log-likelihood of the event occurrence time, and the second term is the integral (trapezoidal method approximation) of the background intensity during the event occurrence.
[0111] Table 1. Association of social network event prediction model parameters and formula modules
[0112] The social network event prediction model provided by the embodiment of the application is summarized as follows:
[0113] 1, initialization: allocate initial latent state for each event type .
[0114] 2, dynamic evolution: calculate the continuous change of the latent state , by using the neural stochastic differential equation (including .
[0115] 3, jump update: when the event occurs, the latent graph and the jump term are used to correct (including , , ).
[0116] 4. Strength calculation: through ( The Softplus function generates event intensity. .
[0117] 5. Parameter optimization: Based on the negative log-likelihood loss function Backpropagation update ( , , , , , The social network event prediction model is iteratively optimized.
[0118] In summary, the social network event prediction method provided by this invention introduces neural stochastic differential equations to dynamically model the dynamic latent state of each event type. This explicitly characterizes the changes in the dynamic latent state of each event type over time, effectively solving the problem of insufficient expression of dynamic latent states caused by using single-dimensional or holistic modeling. This improves the accuracy and adaptability of event type prediction, making this invention applicable to application scenarios such as user interaction prediction, behavior analysis, and event propagation prediction on social networks. Furthermore, this invention introduces a method for constructing a latent graph adjacency matrix using trainable parameters, which can automatically generate implicit influence weights between event types and use them as structural priors in social network event prediction. The jump update process modeling of the event prediction model realizes the perception and modeling of potential relationships between event types without the need for manual setting or reliance on domain knowledge, further improving the accuracy of the present invention in predicting social network events. Furthermore, the embodiments of the present invention design a jump interaction function between event types, which can use the generated latent graph adjacency matrix to correct the dynamic latent state of event types during the jump update process, thereby capturing the dynamic interaction relationship between different event types. This solves the problem that existing neural point process social network event prediction models ignore event type relationships and easily amplify irrelevant influences, effectively improving the prediction stability and generalization ability of the social network event prediction model in multi-event systems.
[0119] To demonstrate the inventiveness and technical value of the technical solutions provided in the embodiments of the present invention, this part describes the application of the technical solutions provided in the embodiments of the present invention to specific products or related technologies.
[0120] Figure 2The ROC (Receiver Operating Characteristic Curve) comparison diagram of the edge probability learned by the social network event prediction model and the real graph structure in the synthetic network scenario of the embodiment of the present application is shown. The test data is derived from a directed graph network with 20 nodes, and 100 groups of event sequences are generated by simulating a multivariate Hawkes process; the edge probability output by the model after training is used to compare and verify with the "edge existence" in the real graph.
[0121] Figure 2 The true positive rate (vertical axis, reflecting the proportion of correctly identified "real existing edges" by the model) and the false positive rate (horizontal axis, reflecting the proportion of misjudged "real non-existing edges" by the model) are taken as coordinates to draw two method curves: curve 1 corresponds to the prediction method constructed by the SDEs in the embodiment of the present application, and the area under the curve (AUC) of the curve is 0.829, which reflects the recognition ability of the real potential dependency relationship (edge existence); curve 2 corresponds to the existing VAETPP (Variational AutoEncoder for neural Temporal Point Processes with dynamic latent graphs, neural temporal point process variational autoencoder combined with dynamic latent graph) method, and the area under the curve (AUC) of the curve is 0.603, which is used as a performance reference.
[0122] The larger the area under the curve (AUC), the stronger the ability of the social network event prediction model to identify the real potential dependency relationship. By comparison, it can be seen that the method provided by the embodiment of the present application (curve 1) has better recognition effect on edge existence than the existing VAETPP method (curve 2) in this task.
[0123] Table 2. User interaction event sequence data for testing
[0124]
[0125] Table 2 is a real-world dataset used for testing and its user interaction event sequence data provided by the embodiments of the present application. MathOF (mathematical forum) and AskUbuntu (Ubuntu technology forum) are mathematical and Ubuntu technology forum data in Stack Exchange (stack exchange Q&A community), which reflect the interaction behavior of users with aggregation and periodicity, and can effectively test the modeling performance of the social network event prediction model on the multi-user complex interaction behavior sequence; Taobao is an e-commerce platform user behavior dataset, which is from the 2018 Tianchi Big Data Competition and contains user browsing, purchasing and other behavior events, which embodies the complex user behavior sequence characteristics and can be used to test the prediction ability of the social network event prediction model on high-frequency and multi-category user behavior sequences. Among them, THP (Temporal Hawkes Process), AttNHP (Attention-based Neural Hawkes Process).
[0126] Tables 3, 4, 5 and 6 show the prediction performance of the social network event prediction method (NJSDELG, Learning Neural Jump Stochastic Differential Equations with Latent Graph) provided by the embodiments of the present application and other comparative algorithms on the test dataset.
[0127] Table 3. F1 performance of the existing method and the method provided by the embodiments of the present application on the test dataset
[0128]
[0129] Table 3 shows the event prediction performance of various comparative methods and the social network event prediction method provided by the embodiments of the present application on the test dataset. The embodiments of the present application use the weighted F1 score (F1-Score) as the measurement standard, and the higher the F1 value indicates the stronger the prediction ability of the social network event prediction model on the class-imbalance event sequence. The bolded item in each row indicates that the method is the best on the corresponding dataset. It can be seen that the method proposed by the present application is superior to other methods in terms of event prediction accuracy in social networks. In addition, the method of the present application also exhibits excellent event type prediction performance in typical class-imbalance application scenarios (such as e-commerce user behavior, social network interaction, etc.), and has high industrial application value and promotion prospects.
[0130] Table 4. Accuracy of the existing method and the method provided by the embodiments of the present application on the test dataset
[0131]
[0132] Table 4 shows the event type prediction accuracy performance of various comparative methods and the social network event prediction method provided by the embodiments of the present application on real social network datasets. The accuracy index measures the correct prediction proportion of the social network event prediction model for user behavior categories (such as likes, comments, and forwards) in the social network, and the higher the value, the stronger the prediction ability of the social network event prediction model. The bolded items in the table represent the best accuracy performance of the method on the corresponding dataset. The results show that the method of the embodiments of the present application performs outstandingly in social network event type prediction, is superior to the most advanced existing method, and is particularly suitable for social network event analysis and complex scenarios of e-commerce recommendation systems.
[0133] Table 5. NLL performance of existing methods and the method provided by the embodiments of the present application on the test dataset
[0134] Table 5 shows the event sequence modeling capability performance of various comparative methods and the social network event prediction method provided by the embodiments of the present application on real social network datasets. The evaluation index uses negative log likelihood (NLL), and the lower the NLL value, the stronger the fitting capability of the social network event prediction model for complex event sequences in the social network. The bolded items in the table represent the best performance of the method on the corresponding dataset. The results show that the method of the embodiments of the present application exhibits excellent event modeling capability in various social network datasets, can accurately capture user behavior dynamics and information dissemination patterns, and is suitable for complex event prediction tasks in large-scale social platforms
[0135] Table 6. RMSE performance of existing methods and the method provided by the embodiments of the present application on the test dataset
[0136]
[0137] Table 6 shows the event time prediction performance of various comparative methods and the social network event prediction method provided by the embodiments of the present application on real social network datasets. The evaluation index uses the root mean squared error (RMSE) of event time prediction, and the lower the RMSE value, the higher the prediction accuracy of the social network event prediction model for user behavior time dynamics in the social network. The bolded items in the table represent the best time prediction effect of the method on the corresponding dataset. The results show that the method of the embodiments of the present application achieves leading time prediction performance in the social network scenario, effectively assists social platforms in optimizing content recommendation timing strategies and user behavior prediction, and has good practical application value.
[0138] Based on the same inventive concept, the embodiment of the present application provides a social network event prediction device. Since the principle of solving the technical problem of the device is similar to that of the social network event prediction method, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described here.
[0139] As shown in Figure 3 , the device comprises an allocation unit 301, an updating unit 302, a construction unit 303 and an obtaining unit 304.
[0140] The allocation unit 301 is configured to obtain user interaction event sequence data with occurrence time in a social network, and allocate an initial latent state to each event type, wherein the latent state comprises the initial latent state and a plurality of dynamic latent states, and the initial latent state is a starting condition of the plurality of dynamic latent states.
[0141] The updating unit 302 is configured to determine an evolution process of the dynamic latent state with respect to a continuous time variable based on a neural stochastic differential equation in a continuous time interval; when a first user interaction event occurs, a jump term of a combined latent graph is constructed based on an implicit influence weight between event types, and the dynamic latent state of the first user interaction event is updated.
[0142] The construction unit 303 is configured to construct a loss function by using the dynamic latent state of each event type and the user interaction event sequence data set, and optimize the parameters of the social network event prediction model by using the user interaction event sequence data.
[0143] The obtaining unit 304 is configured to calculate an event intensity function by using the dynamic latent state of the event type, and obtain the type of the next event and the predicted occurrence time of the next event.
[0144] It should be understood that the above-mentioned social network event prediction device comprises units only for logical division according to the functions realized by the device, and in actual application, the above-mentioned units can be stacked or split. And the functions realized by the social network event prediction device provided in the embodiment correspond one by one to the functions realized by the social network event prediction method provided in the above-mentioned embodiment. For more detailed processing flow realized by the device, it has been described in detail in the above-mentioned method embodiment one, and will not be described in detail here.
[0145] Another embodiment of the present application also provides a computer device, which comprises a processor and a memory; the memory is used to store computer program code, the computer program code comprises computer instructions; when the processor executes the computer instructions, the electronic device executes each step in the social network event prediction method flow shown in the above-mentioned method embodiment.
[0146] Another embodiment of the present application also provides a computer readable storage medium, wherein computer instructions are stored in the computer readable storage medium, and when the computer instructions are run on a computer device, the computer device is caused to perform each step in the social network event prediction method flow shown in the method embodiment.
[0147] Obviously, various modifications and changes can be made to the present application by those skilled in the art without departing from the spirit and scope of the present application. Thus, it is intended that the present application cover the modifications and changes as long as they come within the scope of the claims of the present application and their equivalents.
Claims
1. A social network event prediction method, characterized in that, The method comprises the following steps: obtaining event sequence data with occurrence time in a social network, the event sequence data being behavior data of a user on an e-commerce platform, and assigning an initial latent state to each event type, wherein the latent state comprises the initial latent state and a plurality of dynamic latent states, and the initial latent state is a starting condition of the plurality of dynamic latent states; in a continuous time interval, determining an evolution process of the dynamic latent state with respect to a continuous time variable based on a neural stochastic differential equation; when a first event occurs, constructing a jump term based on an implicit influence weight between event types and updating the dynamic latent state of the first event; constructing a loss function using the dynamic latent state of each event type and the event sequence data set, and optimizing the parameters of the social network event prediction model using the event sequence data; calculating an event intensity function using the dynamic latent state of the event type to obtain the type of the next event and the predicted occurrence time of the next event; wherein when the first event occurs, the jump term based on the implicit influence weight between event types is constructed, and the dynamic latent state of the first event is updated, specifically comprising: when the first event occurs, the jump term based on the implicit influence weight between event types generated based on the latent graph adjacency matrix is constructed, and the dynamic latent state of the first event corresponding type is updated based on the jump term; the dynamic latent state of the first event corresponding type is updated by the following formula: wherein, represents the dynamic latent state vector of event type at the instant time after the occurrence of the th event, represents the dynamic latent state vector of event type at the occurrence of the th event, represents the jump amount of the dynamic latent state vector of event type at the occurrence of the th event, represents the jump amount of the dynamic latent state vector of event type at the continuous time variable , represents an aggregated jump function, represents an indicator function of whether event type occurs at the continuous time variable , represents an indicator function of whether event type occurs at the continuous time variable , represents a single-point jump function, represents an interaction term of event type to event type , represents a jump interaction function of edge type , represents an influence weight of event type to event type in the latent graph, represents a type of edge, represents a learnable parameter matrix, represents a temperature parameter, represents a dynamic latent state vector of event type at the continuous time variable .
2. The method of claim 1, wherein, the event sequence data with occurrence time in a social network is obtained, and an initial latent state is assigned to each event type, specifically comprising: the event sequence data with occurrence time in a social network is obtained to obtain an event sequence data set, and the event type and the occurrence time of each event are determined according to the event sequence data included in the event sequence data set; an initial latent state is assigned to each event type according to the event sequence data, the event type and the occurrence time of each event; the event sequence data set is determined by the following formula: the initial latent state assigned to each event type is determined by the following formula: wherein, represents the th event sequence data, , represents the event sequence index, represents the total number of event sequence data sets, represents the event type of the th event, represents the occurrence time of the th event, represents the length of the th event sequence, represents the initial latent state vector of the event type , represents the start time of the event sequence, represents the initial latent state vector of the event type at the start time of the event sequence .
3. The method of claim 1, wherein, the evolution process of the dynamic latent state with respect to a continuous time variable is as follows: wherein, denotes a small change amount of the dynamic latent state vector in a continuous time variable , denotes a dynamic latent state vector in a continuous time variable , denotes a time of occurrence of the most recent event before the continuous time variable denotes a time interval of the continuous time variable from the time of occurrence of the most recent event before the continuous time variable, denotes a Brownian motion, denotes a drift term, denotes a diffusion term.
4. The method of claim 1, wherein, the loss function is constructed using the dynamic latent state of each event type and the event sequence data set, specifically comprising: By an activation function, mapping the dynamic latent state of the event type to a non-linear representation of event intensity; constructing a negative log-likelihood loss function for the set of event sequence data over discrete time based on the event intensity function; the event intensity is determined by the following formula: the negative log-likelihood loss function is determined by the following formula: wherein, denotes an event type in a continuous time variable , denotes an activation function, denotes a neural network mapping function, denotes an event type in a continuous time variable , denotes a negative log-likelihood loss function, denotes an event type of the th event, denotes a time of occurrence of the th event, denotes the th discrete time point after evenly dividing the time interval from the th event to the th event into sub-intervals, denotes the th discrete time point after evenly dividing the time interval from the th event to the th event into sub-intervals, , denotes a total number of discrete time points, denotes a total number of event types, denotes an index of an event type, denotes the th discrete time point after evenly dividing the time interval from the th event to the th event into sub-intervals, event type in a continuous time variable , denotes the th discrete time point after evenly dividing the time interval from the th event to the th event into sub-intervals, event type in a continuous time variable , denotes the th discrete time point after evenly dividing the time interval from the th event to the th event into sub-intervals, denotes an event type corresponding to the th event at time event intensity, represents the total number of event sequence data sets.
5. The method of claim 1, wherein, the event intensity function is calculated using the dynamic latent state of the event type to obtain the type of the next event and the predicted occurrence time of the next event, specifically comprising: According to the dynamic potential state of the event type and the parameters of the trained social network event prediction model, the event intensity function of each event type at the current time is calculated, and the conditional probability of occurrence of each event type and the type of the next event are determined according to the intensity function. The activation function calculates the event intensity function of each event type at the current time, and determines the conditional probability of occurrence of each event type and the type of the next event according to the intensity function. based on the total intensity function of the event type, a conditional probability density function of the event occurrence time is constructed, and the mathematical expectation of the conditional probability density function is determined according to the conditional probability density function to obtain the predicted occurrence time of the next event.
6. The method of claim 5, wherein, the conditional probability of each event type is determined by the following formula: the predicted occurrence time of the next event is determined by the following formula: wherein, denotes the current prediction time , the conditional probability of the event type denotes the event type the event intensity at the current prediction time denotes the event type the event intensity at the current prediction time denotes the total number of event types, denotes the conditional probability density function of the predicted occurrence time of the next event, denotes the total intensity of all event types, denotes the integration variable, denotes the predicted occurrence time of the next event. 7. A social network event prediction apparatus, characterized by, The allocation unit is used for obtaining event sequence data with occurrence time in a social network, the event sequence data being behavior data of a user on an e-commerce platform, and allocating an initial latent state to each event type, wherein the latent state comprises the initial latent state and a plurality of dynamic latent states, and the initial latent state is a starting condition of the plurality of dynamic latent states; The updating unit is used for determining an evolution process of the dynamic latent state with a continuous time variable based on a neural random differential equation in a continuous time interval; when a first event occurs, constructing a jump term combined with a latent graph based on implicit influence weights between event types, and updating a dynamic latent state of the first event; The construction unit is used for constructing a loss function by using the dynamic latent state of each event type and the event sequence data set, and optimizing parameters of a social network event prediction model by using the event sequence data; The obtaining unit is used for calculating an event intensity function by using the dynamic latent state of the event type, and obtaining a type of a next event and a predicted occurrence time of the next event; The updating unit is specifically used for: when the first event occurs, constructing a jump term combined with a latent graph based on implicit influence weights between event types generated based on a latent graph adjacency matrix, and updating a dynamic latent state of a type corresponding to the first event based on the jump term; The dynamic latent state of the type corresponding to the first event is updated by the following formula: wherein, represents the dynamic latent state vector of event type at the instant time after the occurrence of the th event, represents the dynamic latent state vector of event type at the occurrence of the th event, represents the jump amount of the dynamic latent state vector of event type at the occurrence of the th event, represents the jump amount of the dynamic latent state vector of event type at the continuous time variable , represents an aggregated jump function, represents an indicator function of whether event type occurs at the continuous time variable , represents an indicator function of whether event type occurs at the continuous time variable , represents a single-point jump function, represents an interaction term of event type to event type , represents a jump interaction function of edge type , represents an influence weight of event type to event type in the latent graph, represents a type of edge, represents a learnable parameter matrix, represents a temperature parameter, represents a dynamic latent state vector of event type at the continuous time variable .
8. A computer device, comprising: The computer device comprises a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to enable the processor to execute the social network event prediction method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer program is executed by the processor to enable the processor to execute the social network event prediction method according to any one of claims 1-6.
Citation Information
Patent Citations
Traffic flow prediction method based on graph self-attention mechanism and Horkes process
CN115358485A
Event prediction method based on survival analysis and neural point process
CN118520409A