Node virus correlation prediction method based on SEAL thought
Through the SEAL idea and DGCNN model, combined with time series analysis and graph convolution operations, the accuracy and stability problems of virus spread prediction in the existing technology are solved, and high-accuracy prediction and model stability of urban node epidemic risks are achieved. , suitable for applications in many fields.
Patent Information
- Application Number
- CN202410853072.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
AI Technical Summary
Existing virus spread prediction methods are difficult to accurately identify the epidemic correlation and propagation paths between urban nodes, have high requirements on data quality and feature engineering, and cannot effectively handle network sparsity and noise.
Adopt the node virus correlation prediction method based on SEAL idea, conduct node embedding learning through time series analysis, correlation matrix calculation, Euclidean distance conversion, DeepWalk algorithm and Skip-gram model, and combine it with the DGCNN model to perform graph convolution operation to construct a pole For large plane subgraphs, k-hop subgraphs and DRNL labels are extracted, and node features are dynamically updated.
It improves the accuracy and model stability of urban epidemic risk prediction, has strong generalization capabilities, can effectively handle sparse network data, dynamically captures node dependencies and global structure information, simplifies calculation complexity, and improves link prediction efficiency.
Smart Images

Figure CN118737489A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and more specifically, to a node virus correlation prediction method based on the SEAL concept. Background Art
[0002] In order to better understand and control the spread of the virus, and understand the interrelationships, changing trends, and synchronization of the epidemics between different urban areas, it is necessary not only to conduct more research and exploration, actively study the transmission pathways and laws of the virus, but also to formulate more scientific and effective prevention and control measures. It has become particularly important to use data analysis and link prediction methods to establish a virus transmission model and predict the trend of virus transmission and possible outbreak locations.
[0003] By predicting the epidemic transmission links, we can better understand the speed of virus transmission in the geographical structure, analyze the connection and relationship between urban nodes, and thus predict areas where the epidemic may occur in the future and avoid the spread of the epidemic. This makes it possible to provide more accurate predictions and decision-making basis.
[0004] Currently, the commonly used methods and algorithms for understanding and analyzing the changes in urban viral synchronization include the following:
[0005] 1. Correlation Analysis:
[0006] Correlation analysis can use correlation coefficients (such as Pearson's correlation coefficient or Spearman's correlation coefficient) to measure the correlation of virus prevalence between different cities. A high correlation means that the virus is prevalent in different cities and can help discover the interdependence between variables. However, correlation analysis cannot determine causality, but can only indicate the correlation between variables. The existence of correlation does not necessarily mean causality.
[0007] 2. Time Series Analysis:
[0008] Time series analysis can analyze the time series data of virus epidemics in each city to find common trends and cycles. Common time series analysis methods include autoregressive moving average model (ARMA), autoregressive integrated moving average model (ARIMA), seasonal decomposition, etc. However, time series analysis has high requirements on data and requires certain statistical knowledge and skills.
[0009] 3. Spatial Statistics Analysis:
[0010] Spatial statistical analysis can consider the spatial correlation between cities and measure the mutual influence between cities by calculating the spatial weight matrix (such as the proximity matrix). Spatial statistical analysis can help understand the spatial patterns and trends of geospatial data and provide support for geospatial decision-making. Commonly used spatial statistical analysis methods include spatial autocorrelation analysis and diffusion process models. However, spatial statistical analysis has high requirements on the spatial distribution and spatial correlation of data, and it is necessary to consider the spatial autocorrelation of data.
[0011] 4. Network Analysis:
[0012] Network analysis can construct a network model of virus transmission between cities and reveal the synergy between cities by analyzing indicators such as network topology and node degree centrality. Common network analysis methods include complex network analysis and propagation models. However, network analysis has high requirements for the acquisition and processing of network data, and needs to consider the sparsity and noise of network data.
[0013] 5. Machine Learning Methods:
[0014] Machine learning methods can use a variety of algorithms to model and predict the synchronous changes of urban viruses. This includes regression-based methods (such as linear regression, ridge regression), tree-based methods (such as decision trees, random forests), neural network-based methods, etc. Machine learning methods have strong generalization and automatic learning capabilities for processing large-scale data and complex patterns. However, these methods have high requirements on data quality and feature engineering, and require model selection and parameter tuning.
[0015] The present invention is proposed based on the above background, and aims to more accurately predict the epidemic risk possibility of urban nodes by constructing a correlation network and combining graph neural network technology, using a link prediction algorithm, and providing better epidemic prevention and control guidance. Summary of the invention
[0016] In order to improve the accuracy of predicting the synchronization of urban epidemics, the present invention provides a node virus correlation prediction method based on the SEAL concept.
[0017] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0018] A node virus correlation prediction method based on the SEAL concept includes the following steps:
[0019] Obtain virus infection data from each city and conduct time series analysis. Analyze the growth of the virus-infected population by calculating the first-order difference sequence to obtain time series data for each city.
[0020] Calculate the correlation of the time series data of each city node, generate a correlation coefficient matrix, and determine the degree of association between each city node by calculating the correlation;
[0021] The correlation coefficient is converted into Euclidean distance to more intuitively reflect the degree of association between nodes, and the connection order of each city node is arranged by the converted Euclidean distance;
[0022] According to the Euclidean distance, the top three strongest connected edges are selected for each city node and added to the planar maximum filter graph to ensure the sparsity and representativeness of the network;
[0023] The DeepWalk algorithm is applied to randomly walk the city nodes, generate node sequences from the starting node, and use the Skip-gram model to learn node embedding to generate node embedding representations for subsequent feature extraction and analysis.
[0024] Extract the k-hop subgraph, measure the degree of connection between nodes, and calculate the DRNL label to reflect the position and relative distance of the node in the graph, and assign a unique label to each node to facilitate subsequent feature representation and model input;
[0025] The extracted feature information is spliced into a node feature matrix and input into the DGCNN model. The node feature vector is updated through a 1D convolutional neural network, and a graph convolution operation is performed to further optimize the node representation.
[0026] A very large planar subgraph is constructed, and the node status is updated using a graph convolution layer. After multiple rounds of graph convolution, the feature vector is updated to reflect the importance and propagation potential of the node in the network.
[0027] Furthermore, by calculating the first-order difference sequence Δy t =y t+1 -y t First, we use time series analysis to analyze the growth of the population infected with the virus, and then calculate the correlation for the discrete sequence data of each city node, that is:
[0028]
[0029] In the formula, X and Y represent the value sequence after the first-order difference calculation, that is, the growth of the virus-infected population at different times, and finally the correlation coefficient ρ of the growth rate of the number of infected population in different cities is obtained XY , which is constructed into a coefficient matrix.
[0030] Furthermore, we construct a graph data and use the correlation coefficient value to convert it into the Euclidean distance metric formula:
[0031]
[0032] The correlation coefficient is converted into a Euclidean distance value d to reflect the degree of association; then, the values are sorted from small to large, and the top three edges with the strongest connection are selected for each node and added to the planar maximum filter graph.
[0033] Further, for each node i, from 1 to N: let E i represents the set of all edges connected to node i; for each edge e ij ∈E i , where j represents another node connected to the node; w ij Represents edge e ij The weight of
[0034] Select the edge with a threshold greater than 0.6 and add it to the planar maximum filter graph, i.e. PMFG i ={e ij1 ,e ij2 ,...,e ijk}, where j1, j2, j k The node that represents the strongest connection to the node.
[0035] Furthermore, the DeepWalk algorithm is applied to perform random walks on city nodes. When the walk length is L, the DeepWalk algorithm starts from node v and performs random walks, which is represented as a node sequence S = [v, n1, n2, ..., n L ], where v is the starting node, n1, n2, ..., n L It is the node passed during the walk.
[0036] Furthermore, the Skip-gram model is used for node embedding learning to predict the target node, which is expressed as the following conditional probability:
[0037]
[0038] Where v is the embedding vector of the starting node, n j is the embedding vector of the target node, V is the set of all nodes;
[0039] The node embedding vector is learned by training the Skip-gram model; for each node v, its learned embedding vector is represented as the feature vector v = [v1, v2, ..., V d ], where v i represents the i-th dimension of the input vector, and d is the dimension of the embedding.
[0040] Furthermore, negative sampling is used to select some non-target nodes as negative examples. The goal of negative sampling is to maximize the difference between the target node and the negative sample, and the sigmoid function is used to calculate the probability:
[0041] P(n k |v)=σ(-v*n k ) (4)
[0042] Among them, σ(z)=1 / (1+exp(-z)) is the sigmoid function.
[0043] Furthermore, the method of extracting k-hop subgraphs and calculating DRNL labels in the SEAL algorithm is introduced to calculate the position and relative distance of nodes in the graph;
[0044] Among them, the k-hop metric is used to measure the degree of direct connection between nodes and the local neighbor relationship between nodes, indicating the number of paths with the shortest path length k between node u and node v;
[0045] Given an undirected graph G = (V, E), where V represents the node set and E represents the edge set;
[0046] For two nodes u and v in a graph G, the k-hop metric represents the number of paths between node u and node v whose shortest path length is k;
[0047] In the set of paths with the shortest path length k from node u to node v in graph G, the formula for calculating the number of paths is:
[0048] k-hop(u,v,k)={(p1,p2,...,p k+1 )|p1=u,p k+1 =v,(p i ,p i+1 )∈E,1≤i≤k} (5)
[0050] Given an undirected graph G = (V, E), where V represents a node set and E represents an edge set; for two nodes u and v in graph G, DRNL calculates the distance between node u and node v.
[0051] Furthermore, the specific steps for DRNL to calculate the distance label z between node u and node v are as follows:
[0052] S601, calculate the distance dist2src to the target node u;
[0053] dist2src(x)=shortest_path(G w0_dst ,dst,x) (6)
[0054] Among them, shortest_path((G w0_dst ,dst,x) represents the graph G after removing the target node dst w0_dst , the shortest path distance from node x to node dst;
[0055] S602, calculating the distance dist2dst to the target node v;
[0056] dist2dst(x)=shortest_path(G w0_src ,src,x) (7)
[0057] Among them, shortest_path(G w0_src ,src,x) represents the graph G after removing the target node src w0_src The shortest path distance from node x to node src;
[0058] S603, calculating the DRNL node label z;
[0059] z(x)=
[0060] 1+min(dist2src(x),dist2dist(x))+dist_over_2(x)*(dist_over_2(x)+dist_mod_2(x)-1) (8)
[0061] Among them, dist_over_2(x)=dist2src(x) / / 2, which represents the integer part of the distance to the target node divided by 2, and dist_mod_2(x)=dist2src(x)%2, which represents the remainder part of the distance to the target node divided by 2.
[0062] Furthermore, the convolution operation can be expressed as:
[0063]
[0064] Among them, y i represents the i-th element of the updated feature vector, x i represents the i-th element of the original eigenvector, w j is the weight of the convolution kernel, b is the bias term, and f is the activation function;
[0065] After the maximal planar subgraph formed by G, a γ-decaying heuristic decay is given:
[0066]
[0067] If f(x,y,l) satisfies: f(x,y,l)≤λl , where λ<1 / γ, then f(x,y,l) is given by Compute, where l = 1, 2, ..., g(h), g(h) = ah + b (a, b∈N, a>0); H(x, y) is approximated by G, and the approximation error decreases at least exponentially with h, and generate a subgraph x;
[0068] GNN is used to aggregate features, transfer information, capture dependencies and global structures; then the pooled aggregated feature vector is sent to the classifier to output the predicted classification; a deep graph convolutional neural network is used as the engine of SEAL, given the adjacency matrix A∈{1,0} n*n And the node information matrix X∈R of the closed subgraph n*c ;
[0069] DGCNN uses the following graph convolutional layers:
[0070]
[0071] is a diagonal matrix Z∈R n*c ′ as the new node state; W∈R c*c′ is a parameter matrix that can train graph convolution. f is a nonlinear activation function;
[0072] The initial node X is first multiplied by W for linear transformation, and then the next step is to propagate the matrix Enables transmission information to propagate to adjacent nodes;
[0073] After multiple rounds of graph convolution:
[0074]
[0075] The present invention introduces the SEAL (Subgraph Embedding and Attributed Learning) algorithm and the dynamic graph convolutional neural network (DGCNN) to propose a prediction method based on node virus correlation, which has the following beneficial effects:
[0076] 1. High accuracy:
[0077] The method of the present invention considers the time series virus infection data of each city, calculates the correlation matrix and converts it into Euclidean distance, so as to accurately identify the epidemic correlation and transmission path between cities. Compared with traditional methods, SEAL-DGCNN can more effectively capture the complex relationship between nodes and improve the accuracy of urban epidemic risk prediction.
[0078] 2. Strong generalization ability:
[0079] The SEAL-DGCNN method is not only applicable to epidemic risk prediction, but also has strong application generalization capabilities and can be applied to other fields, such as commodity sales forecasting, manufacturing inventory stocking issues, epidemic prevention material scheduling during the epidemic period, and user behavior prediction. This makes the method have broad application prospects in practical applications.
[0080] 3. Processing sparse network data:
[0081] By constructing a maximum planar subgraph (PMFG) and using the DeepWalk algorithm for node embedding learning, the present invention can effectively deal with the network sparsity problem and ensure the representativeness and computational efficiency of the network. This technology can accurately reflect the correlation between city nodes while maintaining network sparsity.
[0082] 4. Dynamic feature capture:
[0083] By adopting the dynamic graph convolutional neural network (DGCNN), through k-hop subgraph extraction and double-bow radius node calculation, the present invention can dynamically update node features, capture the dependencies and global structural information between nodes, reflect the importance and propagation potential of nodes in the network, and further improve the prediction performance.
[0084] 5. Low-dimensional representation learning:
[0085] The high-dimensional city node data is mapped to a low-dimensional space through graph convolution operations, which simplifies the computational complexity. At the same time, the node feature vector is updated using a 1D convolutional neural network to ensure the efficiency and scalability of the model. This low-dimensional representation learning can simplify the computational process and improve the efficiency of link prediction.
[0086] 6. Improve model stability:
[0087] SEAL-DGCNN is more stable in capturing complex network features than traditional algorithms such as SIR model, DeepWalk, Node2vec, etc. By utilizing dynamic matrix and local subgraph structure information, it can avoid the overfitting or underfitting problems of traditional models and improve the prediction stability of the overall model.
[0088] In summary, the present invention successfully solves important problems in epidemic spread modeling and prediction by combining graph neural networks and SEAL algorithm, as well as efficient link prediction strategies. It not only improves the prediction accuracy and model stability, but also shows significant advantages in time and space efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0090] Figure 1 The flowchart of the node virus correlation prediction method based on SEAL concept of the present invention. DETAILED DESCRIPTION
[0091] In order to better understand the purpose, structure and function of the present invention, the technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific preferred embodiments.
[0092] In the description of the present invention, it should be understood that the terms "left side", "right side", "upper part", "lower part", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. "First", "second", etc. do not indicate the importance of the parts, and therefore cannot be understood as a limitation on the present invention. The specific dimensions used in the embodiments are only for illustrating the technical solution and do not limit the scope of protection of the present invention. It is understandable to those skilled in the art that some well-known structures and their descriptions in the drawings may be omitted.
[0093] Unless otherwise clearly specified and limited, the terms "install", "set", "connect", "fix" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0094] Embodiment 1:
[0095] like Figure 1 As shown, the present invention provides a technical solution:
[0096] A node virus correlation prediction method based on the SEAL concept includes the following steps:
[0097] Obtain virus infection data from each city and conduct time series analysis. Analyze the growth of the virus-infected population by calculating the first-order difference sequence to obtain time series data for each city.
[0098] Calculate the correlation of the time series data of each city node, generate a correlation coefficient matrix, and determine the degree of association between each city node by calculating the correlation;
[0099] The correlation coefficient is converted into Euclidean distance to more intuitively reflect the degree of association between nodes, and the connection order of each city node is arranged by the converted Euclidean distance;
[0100] According to the Euclidean distance, the top three strongest connected edges are selected for each city node and added to the planar maximum filter graph to ensure the sparsity and representativeness of the network;
[0101] The DeepWalk algorithm is applied to randomly walk the city nodes, generate node sequences from the starting node, and use the Skip-gram model to learn node embedding to generate node embedding representations for subsequent feature extraction and analysis.
[0102] Extract the k-hop subgraph, measure the degree of connection between nodes, and calculate the DRNL label to reflect the position and relative distance of the node in the graph, and assign a unique label to each node to facilitate subsequent feature representation and model input;
[0103] The extracted feature information is spliced into a node feature matrix and input into the DGCNN model. The node feature vector is updated through a 1D convolutional neural network, and a graph convolution operation is performed to further optimize the node representation.
[0104] A very large planar subgraph is constructed, and the node status is updated using a graph convolution layer. After multiple rounds of graph convolution, the feature vector is updated to reflect the importance and propagation potential of the node in the network.
[0105] The present invention aims to predict the epidemic risk possibility of urban nodes, which is based on the construction of urban networks and the consideration of the number of virus epidemics. The construction and processing of the correlation network involves the following main steps: calculation of the first-order variance, calculation of the correlation matrix, conversion of the correlation coefficient into the Euclidean distance, and construction of the maximum plane subgraph technology. The SEAL-DGCNN part mainly uses the generated maximum plane subgraph to perform k-hop node extraction and double-bow radius node calculation, which is then used as the input of the feature matrix and combined with the dynamic graph convolutional neural network for link prediction algorithm. This technology is not only suitable for epidemic quantity prediction, but also can be applied to other fields, such as predicting the sales of other commodities through certain commodities, inventory stocking problems in the manufacturing industry, epidemic prevention material scheduling problems during the epidemic period, and user behavior prediction. In essence, this technology is a technical problem based on correlation networks and graph neural networks for prediction.
[0106] Embodiment 2:
[0107] Based on Example 1, the overall technical implementation includes two parts:
[0108] The first part is the construction of the city node correlation network. This method innovatively uses the calculation of infection rate and the construction of correlation matrix by infection rate changes to construct graph data. The specific steps are as follows:
[0109] First, by calculating the first-order difference sequence: Δy t =y t+1 -y t , that is, first use time series analysis to study the growth of the population infected with the virus, and then calculate the correlation for the discrete sequence data of each city node, that is,
[0110]
[0111] x and y represent the value sequence after the first-order difference calculation, that is, the growth of the virus-infected population at different times, and finally the correlation coefficient ρ of the growth rate of the number of infected people in different cities is obtained XY , which is constructed into a coefficient matrix.
[0112] Secondly, since a graph data needs to be constructed, the correlation coefficient value is converted into the Euclidean distance metric formula:
[0113]
[0114] The correlation coefficient is converted into the Euclidean distance value d to reflect the degree of association.
[0115] Then, sort the values from small to large, select the first three strongest connected edges for each node, and add them to the PMFG. For each node i, from 1 to N: Let E i represents the set of all edges connected to node i; for each edge e ij ∈E i , where j represents another node connected to the node; w ij Represents edge e ij The weight of the edge is selected as the edge with a threshold greater than 0.6 and added to PMFG, that is, PMFG i ={e ij1 ,e ij2 ,...,e ijk}, where j1, j2, j k The node that represents the strongest connection to the node.
[0116] The second part is to solve the node propagation problem. The existing algorithms are DeepWalk and Node2vec. When the walk length is L, the DeepWalk algorithm starts a random walk from node v, which can be expressed as a node sequence S = [v, n1, n2, .., n L ], where v is the starting node, n1,n2,..,n L It is the node passed during the walk.
[0117] The second step uses the Skip-gram model (a Word2Vec model) to learn node embeddings. The goal of the Skip-gram model is to predict the target node based on the given context, which can be expressed as the following conditional probability:
[0118]
[0119] Where v is the embedding vector of the starting node, n j is the embedding vector of the target node and V is the set of all nodes.
[0120] In order to speed up training and reduce computational overhead, negative sampling is usually used to select a small number of negative samples (i.e., non-target nodes) as negative examples. The goal of negative sampling is to maximize the difference between the target node and the negative sample, and the sigmoid function is usually used to calculate the probability:
[0121] P(n k |v)=σ(-v*n k ) (4)
[0122] Among them, σ(z)=1 / (1+exp(-z)) is the sigmoid function.
[0123] The third step is to learn the node embedding vector by training the Skip-gram model. For each node v, the learned embedding vector can be represented as the feature vector v = [v1, v2, ..., Vd ], where vi represents the i-th dimension of the input vector and d is the dimension of the embedding.
[0124] Experiments have shown that the algorithm does not capture information clearly during the propagation process, which is not conducive to the assessment of cities where epidemics may occur. Its accuracy rate dropped by 11.6% and AUC dropped by 22.4% compared to SEAL-DGCNN.
[0125] The SEAL-DGCNN proposed in this paper first introduces the method of extracting k-hop subgraphs and calculating DRNL labels in the SEAL algorithm to calculate the position and relative distance of nodes in the graph. Compared with directly using DGCNN, its accuracy is improved by 14.3% and AUC is improved by 16.45%.
[0126] First, extract the k-hop subgraph: The k-hop metric can be used to measure the degree of direct connection between nodes and the local neighbor relationship between nodes, indicating the number of paths with the shortest path length k between node u and node v. The following is the formula for k-hop:
[0127] Assume that an undirected graph G = (V, E) is given, where V represents a node set and E represents an edge set. For two nodes u and v in graph G, the k-hop metric represents the number of paths with the shortest path length k between node u and node v.
[0128] The formula for calculating the number of paths in the path set with the shortest path length k from node u to node v in graph G is:
[0129] k-hop(u,v,k)={(p1,p2,...,p k+1 )|p1=u,p k+1 =v,(p i ,p i+1 )∈E,1≤i≤k}(5)
[0130] The formula of DRNL is:
[0131] Assume that given an undirected graph G = (V, E), where V represents a node set and E represents an edge set. For two nodes u and v in graph G, DRNL calculates the distance between node u and node v.
[0132] The first step is to calculate the distance to the target node u (dist2src):
[0133] dist2src(x)=shortest_path(G w0_dst ,dst,x) (6)
[0134] Where shortest_path(G w0_dst ,dst,x) represents the graph G after removing the target node dst w0_dst , the shortest path distance from node x to node dst.
[0135] The second step is to calculate the distance to the target node v (dist2dst):
[0136] dist2dst(x)=shortest_path(G w0_src ,src,x) (7)
[0137] Where shortest_path((G w0_src ,src,x) represents the graph G after removing the target node src w0_srcThe shortest path distance from node x to node src.
[0138] The third step is to calculate the DRNL node label (z):
[0139] z(x)=
[0140] 1+min(dist2src(x),dist2dst(x))+dist_over_2(x)*(dist_over_2(x)+dist_mod_2(x)-1) (8)
[0141] Among them, dist_over_2(x)=dist2src(x) / / 2, which represents the integer part of the distance to the target node divided by 2, and dist_mod_2(x)=dist2src(x)%2, which represents the remainder part of the distance to the target node divided by 2.
[0142] Through the above formula, DRNL calculates the distance label z between node u and node v. The node label z reflects the position and relative distance of the nodes in the graph.
[0143] The above feature information is extracted from the graph data - the feature information reflects the original features and the hot unique encoding constructed by the label. After the concatenation is completed, the node feature matrix is obtained, which is used as the input of DGCNN, and then the node feature vector is updated using 1D CNN. Given the input feature vector sequence of the node is X = [x, x, ..., xn], a convolution operation is performed using a convolution kernel of size k, and the updated feature vector sequence Y = [y, y, ..., yn] can be obtained.
[0144] The convolution operation can be expressed as:
[0145]
[0146] Among them, yi represents the i-th element of the updated feature vector, xi represents the i-th element of the original feature vector, wj is the weight of the convolution kernel, b is the bias term, and f is the activation function.
[0147] After the maximal planar subgraph formed by G, a γ-decaying heuristic decay is given:
[0148]
[0149] If f(x,y,l) satisfies:f(x,y,l)≤λ l , where λ<1 / γ, then f(x,y,l) can be obtained by Compute, where l = 1, 2, ..., g(h)), g(h) = ah + b (a, b∈N, a>0). H(x, y) can be approximated by G, and the approximation error decreases at least exponentially with h, and generate a subgraph x.
[0150] GNN is used to aggregate features, transfer information, capture dependencies and global structures; then the aggregated feature vectors are pooled and sent to the classifier to output the predicted classification. A deep graph convolutional neural network is used as the engine of SEAL. Given an adjacency matrix A∈{1,0} n*n And the node information matrix X∈R of the closed subgraph n*c .
[0151] DGCNN uses the following graph convolutional layers:
[0152]
[0153] is an angle matrix Z∈R n*c ′ as the new node state. W∈R c*c′ Is a parameter matrix that can train graph convolution. f is a nonlinear activation function. The initial node X is first multiplied by W for linear transformation, and then the next step is to propagate the matrix This enables the transmission information to propagate to adjacent nodes.
[0154] After multiple rounds of graph convolution:
[0155]
[0156] In the prior art, the SIR algorithm only targets idealized population distribution in the field of virus transmission, and the transmission rate is constant. In the actual research, it considers fewer complex conditions. The method is extremely dependent on parameters such as infection rate and recovery rate, and these parameters need to be determined before the transmission situation can be evaluated. There may be uncertainty in the estimation of parameters, and they may change due to different regions and population conditions, thus affecting the prediction accuracy of the model. For regression methods with time series analysis, the prediction results of statistical models are limited by the available historical data, and the controllability of the statistics of the number of people in the outbreak is poor, and it is impossible to achieve the prediction of the synchronous infection population in the region. DGCNN based on network models and graph theory learns the structural information of the network through low-dimensional representation, but the learning information is insufficient and cannot effectively capture the relationship between network nodes. Therefore, it is impossible to predict the epidemic in the spreading city, and it is difficult to improve the accuracy and extensiveness of the synchronous observation of cities.
[0157] In response to the above problems, the present invention proposes a more effective link prediction SEAL-DGCNN method, which enhances the ability to capture node information, with the ultimate goal of improving the accuracy of predicting the synchronization of urban epidemics.
[0158] Embodiment 3:
[0159] Based on Example 1, the training experimental data used in the present invention is the number of virus infections in cities in different countries from January 2020 to December 2020, with a data volume of 13,528 items.
[0160] The SEAL-DGCNN training layer number is 3, the number of channels in the hidden layer is 32, the batch size is 2, the learning rate is 0.0001, the number of training rounds is 1, and the number of parallel working processes is 1.
[0161] SEAL-DGCNN is an algorithm for link prediction in graphs, which captures more comprehensive information than traditional heuristic link prediction. This paper first defines a function for predicting future links based on the characteristics of the graph, and calculates some graph features for each pair of nodes, including the number of common neighbors, Jaccard coefficient, resource allocation index, priority connectivity, and Adamic-Adar index. These output features, construct feature vectors that will be used as input for predicting links. On the training set, the function uses a Logistic regression model to fit features and target values. Finally, the model is used to predict the prediction set and return a sequence containing the probability values of the prediction results.
[0162] Assume that there are two nodes u and v, the number of common neighbors between them is CommonNeighbors(u,v), the Jaccard coefficient is Jaccard(u,v), the resource allocation index is Resource(u,v), the preferential connectivity is Preferential(u,v), and the Adamic-Adar index is Adamic(u,v). We can use these indicators as input for logistic regression.
[0163] The mathematical formula is as follows:
[0164] Let X be the input feature vector containing these five indices:
[0165] X=[CommonNeighbors(u,v),Jaccard(u,v),Resource(u,v),Preferential(u,v),Adamic(u,v)]
[0166] The mathematical formula for the logistic regression model is:
[0167] z=w^T*X+b
[0168] y_hat = g(z) = 1 / (1+e^(-z))
[0169] Among them, w is the weight vector and b is the bias term.
[0170] The weight vector and bias term can be expressed as:
[0171] w=[w1,w2,w3,w4,w5]
[0172] b=b
[0173] Substituting X into the mathematical formula of the logistic regression model, we can get the predicted probability value yhat:
[0174] yhat=g(w1*CommonNeighbors(u,v)+w2*Jaccard(u,v)+w3*Resource(u,v)+w4*Preferential(u,v)+w5*Adamic(u,v)+b)
[0175] Finally, by setting the threshold, we can make a binary classification decision based on the value of yhat. When yhat>=0.5, the sample is classified as positive, and when y_hat<0.5, the sample is classified as negative.
[0176] Compared with graph-embedded DeepWalk and node2vec algorithms, it can make better use of node features for prediction.
[0177] The F1-score, precision, and recall indicators are used to evaluate the accuracy of the prediction. The results are shown in the following table:
[0178]
[0179] The F1-score indicator shows that the accuracy of the heuristic indicator algorithm is 0.7465. Heuristic algorithms are usually based on some empirical rules and intuition in the problem domain, but may not be able to capture complex patterns. In this experiment, the F1-score performance of the heuristic indicator is relatively poor.
[0180] DGCNN is a graph-based deep learning method suitable for unstructured data. DGCNN can capture complex patterns in graphs, so it performs better than heuristic indicators here.
[0181] DeepWalk and Node2vec are both random walk-based network embedding methods that learn the structural information of the network through low-dimensional representation. However, in this experiment, the F1-score of DeepWalk is slightly lower than that of SEAL-DGCNN, probably because it fails to fully capture the useful information in the network structure or the problem scenario is not suitable for network embedding methods.
[0182] SEAL-DGCNN, or Subgraph Embedding and Learning, is a graph-based deep learning method that learns local subgraph representations for prediction. SEAL has a high F1-score, indicating that it outperforms other algorithms in this example. SEAL overcomes the shortcomings of the heuristic metric and DeepWalk metric algorithms, captures more complex patterns, and more effectively utilizes graph structure information.
[0183] According to these F1-score metrics, the SEAL-DGCNN algorithm performs best on this problem, overcoming the shortcomings of other algorithms in capturing complex patterns and utilizing graph structural information.
[0184] According to the accuracy and AUC indicators, SEAL uses a dynamic similarity measurement matrix. Compared with traditional heuristic-based link prediction methods (such as using similarity to predict the possibility of edge existence or preferential links), SEAL can better capture potential connections and adapt to changes in similarity between nodes in different time periods. In addition, the local graph and dynamic graph structure in SEAL are better at capturing small changes between nodes, which helps to better identify the likelihood of link existence.
[0185] At the same time, compared with the Embedding method, SEAL has strong scalability and can make full use of cluster computing resources to process large-scale graphs: by processing the sparse matrix representation of the graph without loading the entire graph; in addition, SEAL has better stability: SEAL is more stable than the Embedding method, and rarely has overfitting or underfitting phenomena like the Embedding method.
[0186] Compared with MF, it is often easy to ignore the relationship between the retained nodes of the graph features and Node2Vec and the structural information of the similarity method, resulting in the final embedding result may not be accurate enough. SEAL strengthens the adjustment of local information structure and similarity by adding labels and local isomorphism, making the embedding result more in line with the actual situation.
[0187] Compared with using DGCNN for link prediction, SEAL generates a local subgraph for each pair of nodes. These subgraphs contain rich contextual information between nodes, which is conducive to capturing complex relationships between nodes and improving performance. The method using SEAL allows the fusion of multiple types of topological relationship information, allowing SEAL to consider multiple different features at the same time, thereby improving the effect of link prediction. In addition, SEAL uses a neural network model to encode the subgraph and can directly learn the feature representation required for the link prediction task. Using a general framework like SEAL, it can be used in combination with different graph neural networks, and has good flexibility for different types of graph data and prediction tasks.
[0188] Embodiment 4:
[0189] Based on Example 1, according to the correlation matrix construction process in the technical solution, we summarize it as Algorithm 1:
[0190] Algorithm 1
[0191] Input: Number of deaths and infections in different cities with time
[0192] Output: Correlation coefficient of infected population
[0193]
[0194] The correlation matrix proposed in the present invention is converted into the Euclidean distance value, and the maximum planar subgraph PMFG is constructed and summarized as the following algorithm 2:
[0195] Algorithm 2
[0196] Input: Correlation Matrix
[0197] Output: maximal planar subgraph
[0198]
[0199] The PMFG graph constructed in this patent uses the SEAL algorithm for feature extraction and is finally summarized as the input of DGCNN as follows: Algorithm 3:
[0200] Algorithm 3
[0201] Input: maximal planar subgraph
[0202] Output: k-hop subgraph and DRNL labels
[0203]
[0204] train_data[i].x=torch.nn.functional.one_hot(train_data[i].y,num_classes=self.num_classes).float()
[0205] train_pos_data_list.append(train_data[i])
[0206] end
[0207] for i=0tolen(val_data)-1:
[0208] val_data[i].x=torch.nn.functional.one_hot(val_data[i].y,num_classes=self.num_classes).float()
[0209] val_pos_data_list.append(val_data[i])
[0210] end
[0211] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. 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 embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A node virus correlation prediction method based on SEAL concept, characterized in that: The following steps are involved: Obtain virus infection data from each city and conduct time series analysis. Analyze the growth of the virus-infected population by calculating the first-order difference sequence to obtain time series data for each city. Calculate the correlation of the time series data of each city node, generate a correlation coefficient matrix, and determine the degree of association between each city node by calculating the correlation; The correlation coefficient is converted into Euclidean distance to reflect the degree of association between nodes, and the connection order of each city node is arranged by the converted Euclidean distance; According to the Euclidean distance, the top three strongest connected edges are selected for each city node and added to the planar maximum filter graph to ensure the sparsity and representativeness of the network; The DeepWalk algorithm is applied to randomly walk the city nodes, generate node sequences from the starting node, and use the Skip-gram model to learn node embedding to generate node embedding representations for subsequent feature extraction and analysis. Extract the k-hop subgraph, measure the degree of connection between nodes, and calculate the DRNL label, which reflects the position and relative distance of the nodes in the graph, and assign a unique label to each node to facilitate subsequent feature representation and model input; The extracted feature information is spliced into a node feature matrix and input into the DGCNN model. The node feature vector is updated through a 1D convolutional neural network, and a graph convolution operation is performed to further optimize the node representation. A very large planar subgraph is constructed, and the node status is updated using a graph convolution layer. After multiple rounds of graph convolution, the feature vector is updated to reflect the node's propagation potential in the network.
2. The node virus correlation prediction method based on SEAL concept according to claim 1 is characterized in that: By calculating the first-order difference sequence Δy t =y t+1 -y t First, we use time series analysis to analyze the growth of the population infected with the virus, and then calculate the correlation for the discrete sequence data of each city node, that is: In the formula, X and Y represent the value sequence after the first-order difference calculation, that is, the growth of the virus-infected population at different times, and finally the correlation coefficient ρ of the growth rate of the number of infected population in different cities is obtained XY , which is constructed into a coefficient matrix.
3. The node virus correlation prediction method based on SEAL concept according to claim 1 is characterized in that: Construct a graph data and convert the correlation coefficient value into the Euclidean distance metric formula: The correlation coefficient is converted into a Euclidean distance value d to reflect the degree of association; then, the values are sorted from small to large, and the top three edges with the strongest connection are selected for each node and added to the planar maximum filter graph.
4. The node virus correlation prediction method based on SEAL concept according to claim 3 is characterized in that: For each node i, from 1 to N: Let E i represents the set of all edges connected to node i; for each edge e ij ∈E i , where j represents another node connected to the node; w ij Represents edge e ij The weight of Select the edge with a threshold greater than 0.6 and add it to the planar maximum filter graph, i.e. PMFG i ={e ij1 ,e ij2 ,...,e ijk }, where j1, j2, j k The node that represents the strongest connection to the node.
5. The node virus correlation prediction method based on SEAL concept according to claim 1 is characterized in that: The DeepWalk algorithm is applied to perform random walks on city nodes. When the walk length is L, the DeepWalk algorithm starts from node v and performs random walks, which is represented as a node sequence S = [v, n1, n2, ..., n L ], where v is the starting node, n1, n2, ..., n L It is the node passed during the walk.
6. The node virus correlation prediction method based on SEAL concept according to claim 1 is characterized in that: The Skip-gram model is used for node embedding learning to predict the target node, expressed as the following conditional probability: Where v is the embedding vector of the starting node, n j is the embedding vector of the target node, V is the set of all nodes; The node embedding vector is learned by training the Skip-gram model; for each node v, its learned embedding vector is represented as the feature vector v = [v1, v2, ..., V d ], where v i represents the i-th dimension of the input vector, and d is the dimension of the embedding.
7. The node virus correlation prediction method based on SEAL concept according to claim 1 is characterized in that: Negative sampling is used to select some non-target nodes as negative examples. The goal of negative sampling is to maximize the difference between the target node and the negative sample, and the sigmoid function is used to calculate the probability: P(n k |v)=σ(-v*n k ) (4) Among them, σ(z)=1 / (1+exp(-z)) is the sigmoid function.
8. The node virus correlation prediction method based on SEAL concept according to claim 1 is characterized in that: The method of extracting k-hop subgraphs and calculating DRNL labels in the SEAL algorithm is introduced to calculate the position and relative distance of nodes in the graph; Among them, the k-hop metric is used to measure the degree of direct connection between nodes and the local neighbor relationship between nodes, indicating the number of paths with the shortest path length k between node u and node v; Given an undirected graph G = (V, E), where V represents the node set and E represents the edge set; For two nodes u and v in a graph G, the k-hop metric represents the number of paths between node u and node v whose shortest path length is k; In the set of paths with the shortest path length k from node u to node v in graph G, the formula for calculating the number of paths is: k-hop(u,v,k)={(p1,p2,...,p k+1 )|p1=u,p k+1 =v,(p i ,p i+1 )∈E,1≤i≤k} (5) Given an undirected graph G = (V, E), where V represents a node set and E represents an edge set; for two nodes u and v in graph G, DRNL calculates the distance between node u and node v.
9. The node virus correlation prediction method based on SEAL concept according to claim 8 is characterized in that: The specific steps for DRNL to calculate the distance label z between node u and node v are as follows: S601, calculate the distance dist2src to the target node u; dist2src(x)=shortest_path(G w0_dst ,dst,x) (6) Among them, shortest_path(G w0_dst ,dst,x) represents the graph G after removing the target node dst w0_dst , the shortest path distance from node x to node dst; S602, calculating the distance dist2dst to the target node v; dist2dst(x)=shortest_path(G w0_src ,src,x) (7) Among them, shortest_path(G w0_src ,src,x) represents the graph G after removing the target node src w0_src The shortest path distance from node x to node src; S603, calculating the DRNL node label z; z(x)= 1+min(dist2src(x),dist2dst(x))+dist_over_2(x)*(dist_over_2(x)+dist_mod_2(x)-1)(8) Among them, dist_over_2(x)=dist2src(x) / / 2, which represents the integer part of the distance to the target node divided by 2, and dist_mod_2(x)=dist2src(x)%2, which represents the remainder part of the distance to the target node divided by 2.
10. The node virus correlation prediction method based on SEAL concept according to claim 1 is characterized in that: The convolution operation is expressed as: Among them, y i represents the i-th element of the updated feature vector, x i represents the i-th element of the original eigenvector, w j is the weight of the convolution kernel, b is the bias term, and f is the activation function; After the maximal planar subgraph formed by G, a γ-decaying heuristic decay is given: If f(x,y,l) satisfies: f(x,y,l)≤λ l , where λ<1 / γ, then f(x,y,l) is given by Compute, where l = 1, 2, ..., g(h), g(h) = ah + b (a, b∈N, a>0); H(x, y) is approximated by G, and the approximation error decreases at least exponentially with h, and generate a subgraph x; GNN is used to aggregate features, transfer information, capture dependencies and global structures; then the pooled aggregated feature vector is sent to the classifier to output the predicted classification; a deep graph convolutional neural network is used as the engine of SEAL, given the adjacency matrix A∈{1,0} n*n And the node information matrix X∈R of the closed subgraph n*c ; DGCNN uses the following graph convolutional layers: is a diagonal matrix Z∈R n*c ′ as the new node state; W∈R c*c′ is a parameter matrix that can train graph convolution. f is a nonlinear activation function; The initial node X is first multiplied by W for linear transformation, and then the next step is to propagate the matrix Enables transmission information to propagate to adjacent nodes; After multiple rounds of graph convolution:
Citation Information
Cited By
Method for enhancing epidemic prevention management of infectious diseases through network modeling
CN119541893A
