A method and system for predicting information popularity based on cascade relationship diversity

By using the multi-head self-attention mechanism of the Transformer model in information popularity prediction, combined with the cascade graph and time node sequence, the global spatiotemporal characteristics and node relationships of the cascade nodes are captured, and the problem of user preferences and inter-cascade relationships not considered is solved. problem, enabling more accurate popularity predictions.

CN116596025BActive Publication Date: 2024-09-10SUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310408150.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2024-09-10
Estimated Expiration
2043-04-17

AI Technical Summary

Technical Problem

The existing technology fails to effectively consider the preference attributes between users and the relationship between different information cascades, resulting in poor information popularity prediction results, especially in terms of the complexity of the potential relationships between cascade users and the capture of long sequences.

Method used

A multi-head self-attention mechanism based on the Transformer model is used to obtain the cascade graph and time node sequence, calculate the global spatiotemporal features and node relationship features, and build a prediction model to capture the diversity relationship of the cascade nodes, and consider it through the associated attention matrix Relationships between different cascade samples.

Benefits of technology

It achieves accurate prediction of information popularity, overcomes the problems of long sequence capture and relationship complexity, provides a more discriminative cascade representation, and improves the prediction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116596025B
    Figure CN116596025B
Patent Text Reader

Abstract

The present invention relates to a method and system for predicting the popularity of information based on cascade relationship diversity. The method comprises: obtaining an observed cascade C of each piece of information p. p , and according to the observed cascade C p Get the cascade graph g p and the time node sequence τ p ; The cascade graph g p and the time node sequence τ p The input encoding module generates global spatiotemporal features, relative spatiotemporal features of different nodes, and node relationship features between different node users, and integrates the global spatiotemporal features into the cascade graph g p The node feature matrix X is obtained from the node initial feature X; the observation cascade C is realized by the multiple interconnected self-attention models p Modeling is performed to obtain the cascade graph representation H c ; The cascade graph output by the prediction layer for multiple interconnected self-attention models represents H c The prediction is performed to obtain the popularity of the information p. The present invention considers the preference attributes between users and the relationship between the corresponding cascades of different information in the prediction of the popularity of information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of social network popularity prediction, and in particular to a method and system for predicting information popularity based on cascade relationship diversity. Background Art

[0002] Online social networks have gradually become an important channel for people to obtain information in their daily lives. Social platforms such as Weibo, Twitter, Facebook and WeChat have attracted a large number of users from all over the world. Usually, once social media information is released, it will gain constant attention from social users, and these users are not limited to online friends, but in most cases are "strangers". Therefore, commercial information such as advertisements can gain benefits for enterprises; and official government information can quickly convey policies to the public; but some false public opinion information often attracts a large number of users and has a negative impact on society. Popularity is used to quantify the degree of attention paid to social media information by users, and popularity prediction has become one of the important tasks of online social network mining. This task can help people discover popular information in advance, and has an important guiding role in business decision-making and rumor control.

[0003] The process of information propagation on social networks is represented by cascades, and propagation is usually described by the user's forwarding behavior, that is, the abstract representation of the process of information being forwarded by users within a period of time, such as Figure 1 As shown in , this is also the process of obtaining information popularity. Obviously, the cascade is different from the friend relationship network. The relationship between cascade users is only marked by forwarding, which cannot reflect the social relationship between users. Furthermore, the user's information and private social network are difficult to obtain due to privacy, so the cascade users are independent. The generation of user forwarding behavior is often determined by the potential relationship between cascade users. For example, the content posted by a user on Weibo is forwarded by other users or multi-hop forwarding. This may be due to the spatiotemporal location relationship or common preferences between the cascade users. The independence of users makes it extremely challenging to capture these potential relationships.

[0004] In addition, since each piece of information being forwarded will form a separate cascade, it is inevitable that some users will participate in different cascades. For example, a "big V" on Weibo participates in the forwarding of multiple pieces of information, making these pieces of information highly popular; or the cascades formed by information with similar content have similar structures, because similar content may attract similar user groups. The existence of these situations leads to potential correlations between cascades, making it more difficult to model cascades and predict popularity.

[0005] The existing disadvantages of using deep learning methods to predict the popularity of information cascades are:

[0006] First, the forwarding behavior of users in a cascade is affected by the potential relationships between users. Since the cascade has time, topological structure and user preference attributes, the relationships between cascade users are diverse. However, current methods focus on modeling node sequences and local topological structures, which can only capture some local relationships between users, but cannot fully capture the diverse user relationships (without considering the preference attributes between users).

[0007] Secondly, there will inevitably be common users between cascades. If the user is a core user, that is, a user with high influence, then these cascades may have potential interactions, which will have a greater impact on their final popularity. The current method only models one cascade and cannot consider the relationship between cascade samples.

[0008] Again, from a model perspective, current methods mostly prefer to use RNNs and GNNs to model node sequences and cascade topology structures. When the cascade sequence is long, RNNs cannot capture long sequences. Summary of the invention

[0009] Therefore, the technical problem to be solved by the present invention is to overcome the problem in the prior art that information popularity prediction does not consider the preference attributes between users and does not consider the relationship between the corresponding cascades of different information.

[0010] In order to solve the above technical problems, the present invention provides an information popularity prediction method based on cascade relationship diversity, comprising:

[0011] Step S1: Get the observation cascade C for each piece of information p p , and according to the observed cascade C p Get the cascade graph g p and the time node sequence τ p , where the observation cascade C p is the propagation process formed by forwarding information p during the observation time;

[0012] Step S2: The cascade graph g p and the time node sequence τ p The input encoding module generates global spatiotemporal features, calculates the relative spatiotemporal features of different nodes and the node relationship features between different node users, and integrates the global spatiotemporal features into the cascade graph g p The node feature matrix is ​​obtained from the node initial feature X

[0013] Step S3: constructing a prediction model, wherein the prediction model includes a plurality of interconnected self-attention models and prediction layers connected in sequence;

[0014] The node feature matrix Input the multiple interconnected self-attention models to realize the observation cascade C p Modeling is performed to obtain the cascade graph representation H c , where the node feature matrix It is used to input the first self-attention model, and the output of each self-attention model must incorporate relative spatiotemporal features and node relationship features between different node users;

[0015] Step S4: The cascade graph representation H of the outputs of the multiple interconnected self-attention models through the prediction layer c Make a prediction and get the popularity of information p.

[0016] In one embodiment of the present invention, in step S2, the cascade graph g p and the time node sequence τ p The input encoding module generates global spatiotemporal features and converts the cascade graph g p and the time node sequence τ p The input encoding module calculates the relative spatiotemporal features of different nodes and the node relationship features between different node users, and the method includes:

[0017] Calculate the cascade graph g p A standardized Laplace matrix, extracting eigenvectors corresponding to the smallest m eigenvalues ​​of the standardized Laplace matrix, and performing a linear transformation on the eigenvectors to generate a global spatial position encoding LPE;

[0018] Based on the cascade graph g p The relative spatial relationship matrix RDM is calculated, and each element in the relative spatial relationship matrix RDM represents the corresponding node pair in the cascade graph g p The shortest path in

[0019] Based on the time node sequence τ p , by using linear and periodic functions on the forwarding time t of information p to generate a global temporal position encoding TPE;

[0020] Based on the time node sequence τ p A relative time position matrix RTM is obtained by calculation, wherein each element in the relative time position matrix RTM represents a difference between a pair of forwarding time nodes;

[0021] Based on the cascade graph g p The relative interpersonal influence relationship matrix LCA is calculated;

[0022] Among them, the global spatial position code LPE and the global temporal position code TPE constitute the global spatiotemporal characteristics; the relative spatial position matrix RDM and the relative temporal position matrix RTM between the nodes constitute the relative spatiotemporal characteristics of different nodes; the interpersonal influence relationship matrix LCA is the node relationship feature between users of different nodes.

[0023] In one embodiment of the present invention, the time node sequence τ p , by using linear and periodic functions on the forwarding time t of information p to generate the global time position encoding TPE, the formula is:

[0024] TPE=concatenate(w1t+b1,cos(w2t+b2))

[0025] Wherein, concatenate(·) represents a concatenation operation, w1 and w2 represent a first weight parameter and a second weight parameter, respectively, and b1 and b2 represent a first bias parameter and a second bias parameter, respectively.

[0026] In one embodiment of the present invention, the node pair (v i ,v j ) and the most recent common ancestor v r Methods for calculating the relative interpersonal influence relationship matrix LCA include:

[0027] Based on the cascade graph g p Construct an N×N matrix from all nodes in;

[0028] Calculate the cascade graph g p Each node pair (v i ,v j ) and its most recent common ancestor v r The relationship score is: KL(v i ,v r )+KL(v r ,v j ), where KL is the relative entropy;

[0029] The node pair (v i ,v j ) are filled into the corresponding positions of the N×N matrix to generate the relative interpersonal influence relationship matrix LCA.

[0030] In one embodiment of the present invention, the node feature matrix in step S3 It is used to input the first self-attention model, and the output results of each self-attention model must incorporate relative spatiotemporal features and node relationship features between different node users. The formula is:

[0031]

[0032] Among them, Attention represents the attention score matrix of the self-attention model, W q represents the first weight matrix, W k represents the second weight matrix, softmax(·) represents the exponential normalization operation, d represents the node feature dimension, RDM is the relative spatial relationship matrix, RTM is the relative temporal position matrix, LCA is the interpersonal influence relationship matrix, the relative spatial position matrix RDM and the relative temporal position matrix RTM between the nodes constitute the relative spatiotemporal characteristics of different nodes; the interpersonal influence relationship matrix LCA is the node relationship feature between users of different nodes.

[0033] In one embodiment of the present invention, when training the encoding module and the prediction model, the loss function generated by the encoding module and the prediction model is added to the loss of the attention score matrix SDA and the loss of the associated attention matrix SDB to obtain a total loss, and the encoding module and the prediction model are optimized by the total loss, wherein the attention score matrix SDA is constructed by the attention score matrix in each of the self-attention models, and the associated attention matrix SDB is constructed by different information p.

[0034] In one embodiment of the present invention, the method for constructing the association attention matrix SDB includes:

[0035] For different information p, the observation cascade C p , obtain the same number of observation cascades as the information p;

[0036] Mapping the same number of observation cascades as the information p into a matrix of a preset dimension;

[0037] The inner products of matrices of preset dimensions are calculated pairwise to obtain the associated attention matrix SDB.

[0038] In one embodiment of the present invention, the total loss is expressed as:

[0039] loss+loss sda +loss sdb

[0040] Among them, loss is the loss function generated by the encoding module and the prediction model during training and y is the actual popularity value, is the popularity value predicted during training, loss sda is the loss of the attention score matrix SDA between different self-attention models, loss sdbis the loss of the associated attention matrix SDB between different self-attention models.

[0041] In one embodiment of the present invention, the loss sda The formula is: Among them, SDA (i+1) and SDA (i) Respectively represent the attention score matrix Attention output of the i+1th self-attention model and the i-th self-attention model, the loss sdb The formula is: Among them, SDB (i+1) and SDB (i) They represent the SDB matrices of the i+1th self-attention model and the i-th self-attention model respectively.

[0042] In order to solve the above technical problems, the present invention provides an information popularity prediction system based on cascade relationship diversity, comprising:

[0043] Acquisition module: used to obtain the observation cascade C for each piece of information p p , and according to the observed cascade C p Get the cascade graph g p and the time node sequence τ p , where the observation cascade C p is the propagation process formed by forwarding information p during the observation time;

[0044] Encoding module: used to encode the cascade graph g p and the time node sequence τ p The input encoding module generates global spatiotemporal features and converts the cascade graph g p and the time node sequence τ p The input encoding module calculates the relative spatiotemporal features of different nodes and the node relationship features between different node users, and integrates the global spatiotemporal features into the cascade graph g p The node feature matrix is ​​obtained from the node initial feature X

[0045] Modeling and running module: used to build a prediction model, which includes a plurality of interconnected self-attention models and prediction layers connected in sequence;

[0046] For the node feature matrix Input the multiple interconnected self-attention models to realize the observation cascade C p Modeling is performed to obtain the cascade graph representation H c , where the node feature matrix It is used to input the first self-attention model, and the output of each self-attention model must incorporate relative spatiotemporal features and node relationship features between different node users;

[0047] Prediction module: A cascade graph representation H of the output of multiple interconnected self-attention models through the prediction layer c Make a prediction and get the popularity of information p.

[0048] The above technical solution of the present invention has the following advantages compared with the prior art:

[0049] The present invention captures the global spatiotemporal characteristics of cascade nodes, the relative spatiotemporal characteristics of different nodes, and the node relationship characteristics between different node users through the constructed prediction model (mainly the multi-head self-attention mechanism of the Transformer model); the present invention extracts all the intricate node relationships existing in the observation cascade, and can provide important data support for the prediction of information popularity; the self-attention model of the present invention (i.e., the CTformer layer) is constructed based on the Transformer model, which can capture long sequences and overcome the over-smoothing problem;

[0050] When training the prediction model, the present invention constructs an SDB matrix and integrates it into the loss of the prediction model, so that the trained prediction model can take into account the relationship between different cascade samples, thereby assisting the model to generate a more discriminative cascade representation to accurately predict popularity. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to make the contents of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments of the present invention in conjunction with the accompanying drawings.

[0052] Figure 1 It is a cascade example diagram of the prior art;

[0053] Figure 2 is a flow chart of the method of the present invention;

[0054] Figure 3 It is a schematic diagram of the overall architecture of the encoding module and the prediction model in an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.

[0056] Reference Figure 1 As shown, the present invention relates to a method for predicting information popularity, comprising:

[0057] Step S1: Get the observation cascade C for each piece of information p p , and according to the observed cascade C p Get the cascade graph g p and the time node sequence τ p , where the observation cascade C p is the propagation process formed by forwarding information p during the observation time;

[0058] At the same time, a prediction model is constructed, wherein the prediction model includes a sequentially connected encoding module, a plurality of connected CTformer layers and a prediction layer, wherein the structure of each CTformer layer is the same and is constructed based on the Transformer model;

[0059] Step S2: The cascade graph g p and the time node sequence τ p The input encoding module generates global spatiotemporal features and converts the cascade graph g p and the time node sequence τ p The input encoding module calculates the relative spatiotemporal features of different nodes and the node relationship features between different node users, and integrates the global spatiotemporal features into the cascade graph g p The node feature matrix is ​​obtained from the node initial feature X

[0060] Step S3: constructing a prediction model, wherein the prediction model includes a plurality of interconnected self-attention models (i.e., CTformer layers) and prediction layers connected in sequence; wherein the structure of each CTformer layer is the same and is constructed based on the Transformer model;

[0061] The node feature matrix Input the multiple interconnected self-attention models to realize the observation cascade C p Modeling is performed to obtain the cascade graph representation H c , where the node feature matrix It is used to input the first self-attention model, and the output results of each self-attention model must be integrated with the relative spatiotemporal features and the node relationship features between different node users (specifically, it is integrated into the attention score matrix Attention of the Transformer model to form the CTformer layer);

[0062] Specifically, the node feature matrix Used to input into the first self-attention model, and at the same time, the relative spatiotemporal features and the node relationship features between different node users are integrated into the output result of the first self-attention model; starting from the second self-attention model, the output of the previous self-attention model is used as the input of the next self-attention model, and each time the self-attention model is used, the relative spatiotemporal features and the node relationship features between different node users are integrated;

[0063] Step S4: The cascade graph representation H of the outputs of the multiple interconnected self-attention models through the prediction layer c Make a prediction and get the popularity of information p.

[0064] It is worth mentioning that, when training the encoding module and the prediction model, the loss function generated by the encoding module and the prediction model is added to the loss of the attention score matrix SDA and the loss of the associated attention matrix SDB to obtain a total loss, and the prediction model is optimized by the total loss, wherein the attention score matrix SDA is constructed by the attention score matrix in each self-attention model, and the associated attention matrix SDB is constructed by different information p. The purpose of designing the associated attention matrix SDB in this embodiment is to consider the relationship between the observation cascades corresponding to different information.

[0065] The following is a detailed introduction to this embodiment:

[0066] The prediction model for capturing cascade relationship diversity and cascade association in this embodiment (mainly embodied in the CTformer layer obtained by improving the Transformer model) can be easily extended to various application prediction scenarios of information dissemination, such as popularity prediction of advertisements or public opinion in social network platforms; or scientific quantitative evaluation of papers or authors in scientific citation platforms. The overall architecture of the encoding module and the prediction model is as follows: Figure 2 shown.

[0067] Specifically, the information popularity prediction method implemented in this embodiment includes:

[0068] Step S1: For a piece of information p, its observation time window [t0,t b ) is forwarded, and this propagation process forms an observation cascade C p ={(v i ,v j ,t)|0≤i≤j<n},v i is the source node, v j is the target node, t is the forwarding time, n=|C p | is the number of nodes in the observation cascade. In this embodiment, from the observation cascade C p Extract the cascade graph g p and the observation time node sequence τp .

[0069] This embodiment also constructs a prediction model, which includes multiple connected self-attention models (i.e., CTformer layers) and prediction layers (MLPs) connected in sequence, see Figure 2 .

[0070] Step S2: According to the cascade graph g obtained in step S1 p and the time node sequence τ p , and input the encoding module to generate the global spatial position encoding LPE and global temporal position encoding TPE of the cascade nodes, the relative spatial position matrix RDM and relative temporal position matrix RTM between nodes, and the relative interpersonal influence relationship matrix LCA.

[0071] Furthermore, the global spatial position code LPE and the global temporal position code TPE constitute global spatiotemporal features; the relative spatial position matrix RDM and the relative temporal position matrix RTM between the nodes constitute relative spatiotemporal features of different nodes; and the interpersonal influence relationship matrix LCA is the node relationship feature between users of different nodes.

[0072] Step S3: Integrate the global spatial position encoding LPE and the global temporal position encoding TPE obtained in step S2 into the Transformer model to form a CTformer layer to model the cascade graph, so as to encode the diversity of the cascade relationship.

[0073] Step S4: extract the attention score matrix SDA of different CTformer layers in step S3 and calculate the associated attention matrix SDB between each CTformer layer sample, integrate these two matrices into the loss function obtained during the prediction model training, and then perform reverse parameter optimization on the prediction model.

[0074] Step S5: The cascade graph output by the last CTformer layer is represented as H c Input to the prediction layer (MLPs) to predict the popularity of information p Then, the loss is calculated by comparing it with the actual popularity value y, and the loss is added to the loss of the attention score matrix SDA and the loss of the associated attention matrix SDB to obtain the total loss. All parameters of the encoding module and the prediction model are updated by back propagation based on the total loss.

[0075] Step S6: Predict the popularity of the information to be predicted using the trained prediction model.

[0076] Furthermore, the processing method of step S1 is:

[0077] For multiple pieces of information on any type of social network, the cascade data of these pieces of information can be collected to form a data set. This embodiment requires extracting the observed cascade C for each piece of information p. p The observation time window [t0,t b ) Set different value intervals according to different data sets. In addition, it is also necessary to set a prediction time, that is, the forwarding end time t e , ensure t e >>t b Then this embodiment observes cascade C p Get the cascade graph g p and the time node sequence τ p , which is used as the basic data information for modeling; this embodiment defines the research task as predicting the future growth popularity of information |·| represents the number of elements in a set, |C p | indicates the observed popularity, Indicates the popularity at the end of the spread.

[0078] Furthermore, the processing method of step S2 is:

[0079] First, for the cascade graph g p , whose adjacency matrix is ​​A p , the degree matrix is ​​D p , this embodiment calculates its standardized Laplace matrix Then, the eigenvectors corresponding to the smallest m eigenvalues ​​are selected, and a linear transformation is applied to the eigenvectors to map them to d dimensions. Assume that they are represented by LPE, which is the global spatial position encoding of the nodes in the cascade. p Calculate the relative spatial relationship matrix RDM. Each element in the relative spatial relationship matrix RDM represents the corresponding node pair in the cascade graph g. p The shortest path in . Secondly, for the global time position encoding TPE, this embodiment generates it by using linear and periodic functions on the forwarding time t, that is, TPE=concatenate(w1t+b1,cos(w2t+b2)), where concatenate(·) represents a concatenation operation, w1 and w2 represent the first weight parameter and the second weight parameter, respectively, and b1 and b2 represent the first bias parameter and the second bias parameter, respectively. Next, this embodiment calculates the relative time position matrix RTM, and each element in the relative time position matrix RTM represents the difference between the forwarding time node pairs. Finally, for the interpersonal influence relationship, this embodiment is based on the cascade graph g p First, find the node pair (v i ,v j )'s most recent common ancestor v r , and then calculate its relationship score as KL(vi ,v r )+KL(v r ,v j ), KL is the relative entropy, and then the interpersonal influence relationship matrix LCA is generated. Assuming that the initial feature matrix of the cascade node is X, this embodiment injects the global spatial position encoding LPE and the global temporal position encoding TPE into the node feature X, that is,

[0080]

[0081] Specifically, the method for generating the interpersonal influence relationship matrix LCA includes: based on the cascade graph g p Construct an N×N matrix for all nodes in; Calculate the cascade graph g p Each node pair (v i ,v j ) and its most recent common ancestor v r The relationship score is: KL(v i ,v r )+KL(v r ,v j ), where KL is the relative entropy; the node pair (v i ,v j ) is filled into the corresponding position of the N×N matrix, and the same node pairs in the N×N matrix (such as (v i ,v i )) is filled with 0 to generate the interpersonal influence relationship matrix LCA.

[0082] Furthermore, the processing method of step S3 is:

[0083] In this embodiment, multiple connected CTformer layers are represented by a cascade graph modeled using a Transformer model. Figure 2 , MHA in the CTformer layer represents the multi-head self-attention module, which is used to calculate the attention score; Bias is equivalent to the integration of the relative spatial position matrix RDM, the relative temporal position matrix RTM, and the interpersonal influence relationship matrix LCA, which is used as the bias term of the attention module MHA to adjust the attention score. Assume that the input of the Transformer model in the first CTformer layer is The core part is the calculation of self-attention score, namely Among them, W q represents the first weight matrix, W k represents the second weight matrix, W v represents the third weight matrix, d represents the node feature dimension, and then calculates the inner product The inner product reflects the relationship score between the node pairs. In this embodiment, the relative relationship matrix (RDM, RTM, LCA) obtained previously is added after the inner product term, thereby affecting the distribution of the attention score, so that the calculation of the attention score between the node pairs takes into account the relative spatiotemporal relationship and the interpersonal influence relationship. Therefore, the calculation formula of the attention score of the first CTformer layer is: Softmax(·) represents an exponential normalization operation. It should be noted that, starting from the second CTformer layer, this embodiment uses the output of the previous CTformer layer as the input of the next CTformer layer, and each time the CTformer layer is used, the relative spatiotemporal features (RDM, RTM) and the features between different observation cascades (LCA) are incorporated. Finally, this embodiment generates a cascade graph representation H by stacking multiple CTformer layers. c , that is, H is obtained by multiplying the attention score Attention of the last CTformer layer with its corresponding V c (H c =Attention·V).

[0084] Furthermore, the processing method of step S4 is:

[0085] This embodiment introduces two matrices between CTformer layers (for subsequent construction of total loss). The first is the self-attention score matrix, denoted as SDA; the other is the relationship matrix SDB reflecting the cascade samples, which is generated by calculating the inner product of each pair of cascade sample representations of a batch. Then the sum of squares of the differences in knowledge sources between CTformer layers is calculated, i.e. SDA (i+1) and SDA (i) They represent the Attention outputs of the i+1th CTformer layer and the ith CTformer layer respectively. SDB (i+1) and SDB (i) They represent the SDB matrices of the i+1th CTformer layer and the i-th CTformer layer respectively.

[0086] Specifically, the self-attention score matrix SDA is the Attention (i.e., attention score matrix) of each CTformer layer.

[0087] Specifically, the calculation method of the associated attention matrix SDB includes: for different information p observation cascade C p , obtain the same number of observation cascades as the information p; map the same number of observation cascades as the information p into matrices of preset dimensions; calculate the inner product of the matrices of preset dimensions pairwise to obtain the associated attention matrix SDB.

[0088] Furthermore, the processing method of step S5 is:

[0089] In this embodiment, the obtained cascade diagram is represented by H c Represents the popularity value of the prediction information input to the prediction layer (MLPs). Assuming that the true value of a batch cascade sample corresponding to the future popularity is y, the model prediction value is The loss function of the model is MSLE, that is Then add the distilled loss, that is, loss+loss sda +loss sdb , optimize the loss function and back-propagate to update the model parameters until the loss no longer decreases significantly.

[0090] Comparison of experimental results:

[0091] In order to verify the effectiveness of this embodiment, this embodiment selects four public data sets for experiments as specific embodiments, which are social media data sets Weibo and Twitter, and scientific citation data set APS. The experimental settings are as follows:

[0092] The Weibo dataset collects some Weibo information published on June 1, 2016, totaling 119,313 pieces. The process of each Weibo being forwarded on that day forms a cascade. All cascades involve 6,738,040 user nodes and 15,311,973 forwarding edges. The average cascade size is 174.02, the average forwarding path length is 2.34, and the average forwarding time is 0.09 hours. This embodiment only retains the Weibo cascades published between 8 am and 6 pm, ensuring that each cascade has 6 hours of forwarding time. This embodiment sets the observation time to 0.5 hours to predict the growth popularity in the next 24 hours.

[0093] The Twitter dataset contains topic cascade data published on the Twitter platform from March 24 to April 25, 2012. The dataset contains 88,440 topic data samples, 578,913 user nodes, 7,998,380 interaction edges, an average cascade size of 141.58, an average path length of 2.21, and an average interaction time of 0.16 days. Each topic contains multiple types of interaction methods, such as adoption, forwarding, and mentioning. This embodiment considers them all as forwarding methods, and then uses a virtual node to connect all paths under the topic into a cascade. The observation time of the Twitter dataset is 2 days, and the prediction time is 30 days.

[0094] The APS dataset contains a large number of scientific papers published in the American Physical Society journals from 1893 to 2017. The citation path of each paper forms a cascade. The data will have a total of 616,316 cascades, 3,304,400 citation edges, an average cascade size of 14.03, an average citation path length of 4.13, and an average citation time of 0.89 years. This embodiment only retains data samples published before 1997 to ensure that each paper has at least 20 years to be cited. The observation time is 3 years and the prediction time is 20 years.

[0095] Table 1 Comparative experimental results of CTformer layer and existing methods

[0096]

[0097] This example selects three existing representative popularity prediction methods DeepCas (DC, 2017), DeepHawkes (DH, 2017), and CasCN (CC, 2019) as the benchmarks for comparison, and the evaluation indicators are MSLE, MAE, and Rsquare. The comparison results are shown in Table 1, and the results show that:

[0098] The prediction model of this embodiment (mainly embodied in the improved CTformer layer) achieved the best prediction performance on all three datasets. Since the CTformer layer can fully capture the temporal, spatial and interpersonal influence relationships, it outperforms the best performing benchmark DeepHawkes on both the social media dataset and the scientific citation dataset.

[0099] Furthermore, in order to verify the effectiveness of the cascade relationship capture module and the self-knowledge distillation module of the CTformer layer, this embodiment conducts ablation experiments on these two modules respectively. The results in Table 2 show that the CTformer layer adapts to data sets that are sensitive to different features by fully capturing the diversity of cascade relationships. For example, the social media data sets Weibo and Twitter are sensitive to temporal features, while APS is sensitive to spatial features.

[0100] Table 2 Ablation experiment results of CTformer layer cascade relationship capture module

[0101]

[0102] Embodiment 2

[0103] This embodiment provides an information popularity prediction system based on cascade relationship diversity, including:

[0104] Acquisition module: used to obtain the observation cascade C for each piece of information p p , and according to the observed cascade C pGet the cascade graph g p and the time node sequence τ p , where the observation cascade C p is the propagation process formed by forwarding information p during the observation time;

[0105] Encoding module: used to encode the cascade graph g p and the time node sequence τ p The input encoding module generates global spatiotemporal features and converts the cascade graph g p and the time node sequence τ p The input encoding module calculates the relative spatiotemporal features of different nodes and the node relationship features between different node users, and integrates the global spatiotemporal features into the cascade graph g p The node feature matrix is ​​obtained from the node initial feature X

[0106] Modeling and running module: used to build a prediction model, which includes a plurality of interconnected self-attention models and prediction layers connected in sequence;

[0107] For the node feature matrix Input the multiple interconnected self-attention models to realize the observation cascade C p Modeling is performed to obtain the cascade graph representation H c , where the node feature matrix It is used to input the first self-attention model, and the output of each self-attention model must incorporate relative spatiotemporal features and node relationship features between different node users;

[0108] Prediction module: A cascade graph representation H of the output of multiple interconnected self-attention models through the prediction layer c Make a prediction and get the popularity of information p.

[0109] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0110] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.

Claims

1. A method for predicting information popularity based on cascade relationship diversity, characterized by: include: Step S1: Get the observation cascade C for each piece of information p p , and according to the observed cascade C p Get the cascade graph g p and the time node sequence τ p , where the observation cascade C p is the propagation process formed by forwarding information p during the observation time; Step S2: The cascade graph g p and the time node sequence τ p The input encoding module generates global spatiotemporal features, calculates the relative spatiotemporal features of different nodes and the node relationship features between different node users, and integrates the global spatiotemporal features into the cascade graph g p The node feature matrix is ​​obtained from the node initial feature X Step S3: constructing a prediction model, wherein the prediction model includes a plurality of interconnected self-attention models and prediction layers connected in sequence; The node feature matrix Input the multiple interconnected self-attention models to realize the observation cascade C p Modeling is performed to obtain the cascade graph representation H c , where the node feature matrix It is used to input the first self-attention model, and the output of each self-attention model must incorporate relative spatiotemporal features and node relationship features between different node users; Step S4: The cascade graph representation H of the outputs of the multiple interconnected self-attention models through the prediction layer c Make a prediction and get the popularity of information p; In step S2, the cascade graph g p and the time node sequence τ p The input encoding module generates global spatiotemporal features and converts the cascade graph g p and the time node sequence τ p The input encoding module calculates the relative spatiotemporal features of different nodes and the node relationship features between different node users, and the method includes: Calculate the cascade graph g p A standardized Laplace matrix, extracting eigenvectors corresponding to the smallest m eigenvalues ​​of the standardized Laplace matrix, and performing a linear transformation on the eigenvectors to generate a global spatial position encoding LPE; Based on the cascade graph g p The relative spatial relationship matrix RDM is calculated, and each element in the relative spatial relationship matrix RDM represents the corresponding node pair in the cascade graph g p The shortest path in Based on the time node sequence τ p , by using linear and periodic functions on the forwarding time t of information p to generate a global temporal position encoding TPE; Based on the time node sequence τ p A relative time position matrix RTM is obtained by calculation, wherein each element in the relative time position matrix RTM represents a difference between a pair of forwarding time nodes; Based on the cascade graph g p The relative interpersonal influence relationship matrix LCA is calculated; Among them, the global spatial position code LPE and the global temporal position code TPE constitute the global spatiotemporal features; the relative spatial position matrix RDM and the relative temporal position matrix RTM between the nodes constitute the relative spatiotemporal features of different nodes; the interpersonal influence relationship matrix LCA is the node relationship feature between users of different nodes; The time node sequence τ based on p , by using linear and periodic functions on the forwarding time t of information p to generate the global time position encoding TPE, the formula is: TPE=concatenate(w1t+b1,cos(w2t+b2)) Wherein, concatenate(·) represents a concatenation operation, w1 and w2 represent the first weight parameter and the second weight parameter, respectively, and b1 and b2 represent the first bias parameter and the second bias parameter, respectively; Based on the node pair (v i ,v j ) and the most recent common ancestor v r Methods for calculating the relative interpersonal influence relationship matrix LCA include: Based on the cascade graph g p Construct an N×N matrix from all nodes in; Calculate the cascade graph g p Each node pair (v i ,v j ) and its most recent common ancestor v r The relationship score is: KL(v i ,v r )+KL(v r ,v j ), where KL is the relative entropy; The node pair (v i ,v j ) are filled into the corresponding positions of the N×N matrix to generate the relative interpersonal influence relationship matrix LCA.

2. The information popularity prediction method based on cascade relationship diversity according to claim 1 is characterized by: The node feature matrix in step S3 It is used to input the first self-attention model, and the output results of each self-attention model must incorporate relative spatiotemporal features and node relationship features between different node users. The formula is: Among them, Attention represents the attention score matrix of the self-attention model, W q represents the first weight matrix, W k represents the second weight matrix, softmax(·) represents the exponential normalization operation, d represents the node feature dimension, RDM is the relative spatial relationship matrix, RTM is the relative temporal position matrix, LCA is the interpersonal influence relationship matrix, the relative spatial position matrix RDM and the relative temporal position matrix RTM between the nodes constitute the relative spatiotemporal characteristics of different nodes; the interpersonal influence relationship matrix LCA is the node relationship feature between users of different nodes.

3. The information popularity prediction method based on cascade relationship diversity according to claim 1 is characterized in that: When training the encoding module and the prediction model, the loss function generated by the encoding module and the prediction model is added to the loss of the attention score matrix SDA and the loss of the associated attention matrix SDB to obtain a total loss, and the encoding module and the prediction model are optimized by the total loss, wherein the attention score matrix SDA is constructed by the attention score matrix in each of the self-attention models, and the associated attention matrix SDB is constructed by different information p.

4. The information popularity prediction method based on cascade relationship diversity according to claim 3 is characterized by: The method for constructing the association attention matrix SDB includes: For different information p, the observation cascade C p , obtain the same number of observation cascades as the information p; Mapping the same number of observation cascades as the information p into a matrix of a preset dimension; The inner products of matrices of preset dimensions are calculated pairwise to obtain the associated attention matrix SDB.

5. The information popularity prediction method based on cascade relationship diversity according to claim 3 is characterized by: The total loss formula is: loss+loss sda +loss sdb Among them, loss is the loss function generated by the encoding module and the prediction model during training and y is the actual popularity value, is the popularity value predicted during training, loss sda is the loss of the attention score matrix SDA between different self-attention models, loss sdb is the loss of the associated attention matrix SDB between different self-attention models.

6. The information popularity prediction method based on cascade relationship diversity according to claim 5 is characterized by: The loss sda The formula is: Among them, SDA (i+1) and SDA (i) Respectively represent the attention score matrix Attention output of the i+1th self-attention model and the i-th self-attention model, the loss sdb The formula is: Among them, SDB (i+1) and SDB (i) They represent the SDB matrices of the i+1th self-attention model and the i-th self-attention model respectively.

7. An information popularity prediction system based on cascade relationship diversity, characterized by: include: Acquisition module: used to obtain the observation cascade C for each piece of information p p , and according to the observed cascade C p Get the cascade graph g p and the time node sequence τ p , where the observation cascade C p is the propagation process formed by forwarding information p during the observation time; Encoding module: used to encode the cascade graph g p and the time node sequence τ p The input encoding module generates global spatiotemporal features and converts the cascade graph g p and the time node sequence τ p The input encoding module calculates the relative spatiotemporal features of different nodes and the node relationship features between different node users, and integrates the global spatiotemporal features into the cascade graph g p The node feature matrix is ​​obtained from the node initial feature X Modeling and running module: used to build a prediction model, which includes a plurality of interconnected self-attention models and prediction layers connected in sequence; For the node feature matrix Input the multiple interconnected self-attention models to realize the observation cascade C p Modeling is performed to obtain the cascade graph representation H c , where the node feature matrix It is used to input the first self-attention model, and the output of each self-attention model must incorporate relative spatiotemporal features and node relationship features between different node users; Prediction module: A cascade graph representation H of the output of multiple interconnected self-attention models through the prediction layer c Make a prediction and get the popularity of information p; The encoding module converts the cascade graph g p and the time node sequence τ p The input encoding module generates global spatiotemporal features and converts the cascade graph g p and the time node sequence τ p The input encoding module calculates the relative spatiotemporal features of different nodes and the node relationship features between different node users, including: Calculate the cascade graph g p A standardized Laplace matrix, extracting eigenvectors corresponding to the smallest m eigenvalues ​​of the standardized Laplace matrix, and performing a linear transformation on the eigenvectors to generate a global spatial position encoding LPE; Based on the cascade graph g p The relative spatial relationship matrix RDM is calculated, and each element in the relative spatial relationship matrix RDM represents the corresponding node pair in the cascade graph g p The shortest path in Based on the time node sequence τ p , by using linear and periodic functions on the forwarding time t of information p to generate a global temporal position encoding TPE; Based on the time node sequence τ p A relative time position matrix RTM is obtained by calculation, wherein each element in the relative time position matrix RTM represents a difference between a pair of forwarding time nodes; Based on the cascade graph g p The relative interpersonal influence relationship matrix LCA is calculated; Among them, the global spatial position code LPE and the global temporal position code TPE constitute the global spatiotemporal features; the relative spatial position matrix RDM and the relative temporal position matrix RTM between the nodes constitute the relative spatiotemporal features of different nodes; the interpersonal influence relationship matrix LCA is the node relationship feature between users of different nodes; The time node sequence τ based on p , by using linear and periodic functions on the forwarding time t of information p to generate the global time position encoding TPE, the formula is: TPE=concatenate(w1t+b1,cos(w2t+b2)) Wherein, concatenate(·) represents a concatenation operation, w1 and w2 represent the first weight parameter and the second weight parameter, respectively, and b1 and b2 represent the first bias parameter and the second bias parameter, respectively; Based on the node pair (v i ,v j ) and the most recent common ancestor v r Methods for calculating the relative interpersonal influence relationship matrix LCA include: Based on the cascade graph g p Construct an N×N matrix from all nodes in; Calculate the cascade graph g p Each node pair (v i ,v j ) and its most recent common ancestor v r The relationship score is: KL(v i ,v r )+KL(v r ,v j ), where KL is the relative entropy; The node pair (v i ,v j ) are filled into the corresponding positions of the N×N matrix to generate the relative interpersonal influence relationship matrix LCA.