Multi-scale based spatial disease prediction method and device, and electronic device
By combining macro-level population flow and micro-level user contact data, and utilizing multi-layer graph neural networks and graph attention networks for disease prediction, this approach addresses the shortcomings of traditional models in predicting diseases in complex environments, achieving high-precision disease transmission prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2026-01-29
- Publication Date
- 2026-06-19
AI Technical Summary
Traditional epidemiological dynamics models struggle to accurately predict disease transmission in complex real-world scenarios and fail to effectively incorporate the dynamic changes in human movement and contact patterns.
By combining macro-level inter-regional population flow data and micro-level intra-regional user contact data, a multi-layer graph neural network and a graph attention network are used to extract micro-level feature vectors through a pooling module, and then combined with a recurrent neural network for disease trend prediction.
It enables accurate prediction of disease transmission trends in complex environments, captures macro trends and takes into account individual heterogeneity, thus improving prediction accuracy.
Smart Images

Figure CN122245797A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of disease transmission prediction technology, and in particular to a multi-scale spatial disease prediction method, device, and electronic device. Background Technology
[0002] With the frequent outbreaks of infectious diseases and the increased mobility of people in the context of globalization, accurate prediction of their transmission dynamics has become a core requirement for public health management and disease prevention and control.
[0003] According to relevant technologies, traditional epidemiological dynamic models, such as compartmental models like SIS, describe the transitions between coexisting states in a population through a set of differential equations. These models are conceptually clear and facilitate the analysis of theoretical issues such as transmission thresholds. However, they are usually based on simplistic assumptions such as homogeneous mixing and constant parameters, making it difficult to incorporate real, complex, and dynamically changing human movement and contact patterns, thus limiting their predictive ability in complex real-world scenarios.
[0004] Therefore, finding an accurate and efficient method to predict diseases has become a current research hotspot. Summary of the Invention
[0005] This invention provides a multi-scale spatial disease prediction method, device, and electronic device that combines macro-level inter-regional population flow data and micro-level intra-regional user contact data to predict disease trends. This achieves both the ability to capture macro-level trends and the consideration of individual heterogeneity, thereby improving prediction accuracy.
[0006] This invention provides a multi-scale spatial disease prediction method, comprising: acquiring macroscopic and microscopic graph structures of various regions within a region to be predicted, wherein the macroscopic graph structure is used to characterize population flow relationships between regions; the microscopic graph structure is used to characterize contact relationships between users within a region; invoking a pre-trained disease prediction model, wherein the disease prediction model includes at least a pooling module and a prediction module, the pooling module being used to obtain microscopic feature vectors within the region corresponding to the microscopic graph structure; the prediction module being used to obtain disease prediction results for the region to be predicted within a future preset time period based on the macroscopic graph structure and the microscopic feature vectors within the region; inputting the macroscopic graph structure and the microscopic graph structure into the pre-trained disease prediction model to obtain the disease prediction results for the region to be predicted within the future preset time period output by the disease prediction model, wherein the disease prediction results include at least the number of infected individuals, the disease transmission rate, and the disease recovery rate.
[0007] According to a multi-scale spatial disease prediction method provided by the present invention, the step of inputting the macroscopic graph structure and the microscopic graph structure into a pre-trained disease prediction model to obtain the disease prediction result of the region to be predicted within a future preset time period output by the disease prediction model includes: inputting the microscopic graph structure into the pooling module in the disease prediction model to obtain the microscopic feature vector within the region corresponding to the microscopic graph structure output by the pooling module; and inputting the microscopic feature vector within the region and the macroscopic graph structure into the prediction module in the disease prediction model to obtain the disease prediction result of the region to be predicted within a future preset time period output by the prediction module.
[0008] According to a multi-scale spatial disease prediction method provided by the present invention, the pooling module includes a multi-layer graph neural network; the step of inputting the micro-graph structure into the pooling module in the disease prediction model to obtain the micro-feature vector within the region corresponding to the micro-graph structure output by the pooling module includes: inputting the micro-graph structure into the pooling module in the disease prediction model, and sequentially coarsening the micro-graph structure through the multi-layer graph neural network to extract the micro-feature vector within the region corresponding to the micro-graph structure, wherein the input of the first layer of the multi-layer graph neural network is the micro-graph structure; for other layers of the graph neural network besides the first layer, the output of the previous layer is used as the input of the next layer.
[0009] According to a multi-scale spatial disease prediction method provided by the present invention, the prediction module includes a graph attention network and a recurrent neural network. The step of inputting the micro-feature vectors and the macro-graph structure within the region into the prediction module of the disease prediction model to obtain the disease prediction result of the region to be predicted within a future preset time period output by the prediction module includes: inputting the micro-feature vectors and the macro-graph structure within the region into the prediction module of the disease prediction model, and fusing the macro-graph structure and the micro-feature vectors within the region to obtain a fused vector; inputting the fused vector into the graph attention network to obtain the spatial features of the region to be predicted output by the graph attention network, wherein the graph attention network is used to extract the spatial features of the region to be predicted based on the fused vector; and inputting the spatial features of the region to be predicted into the recurrent neural network to obtain the disease prediction result of the region to be predicted within a future preset time period output by the recurrent neural network, wherein the recurrent neural network is used to extract the disease prediction result of the region to be predicted within a future preset time period based on the spatial features.
[0010] According to a multi-scale spatial disease prediction method provided by the present invention, the graph attention network includes a graph attention network under a multi-head attention mechanism. The step of inputting the fusion vector into the graph attention network to obtain the spatial features of the region to be predicted output by the graph attention network includes: inputting the fusion vector into the graph attention network under the multi-head attention mechanism to obtain the attention weights of nodes in the fusion vector under each attention mechanism head, and the node representations of nodes under each attention mechanism head, wherein the nodes in the fusion vector are used to characterize the fusion information of macroscopic and microscopic graph features of the region; for each node in the fusion vector, the node representations and attention weights of the node under each attention mechanism head are aggregated to obtain the spatial feature representation of the node; based on the spatial feature representations of all nodes, the spatial features of the region to be predicted output by the graph attention network are obtained.
[0011] According to a multi-scale spatial disease prediction method provided by the present invention, the step of obtaining the spatial features of the region to be predicted output by the graph attention network based on the spatial feature representations of all nodes includes: performing a max pooling operation on the spatial feature representations of all nodes to obtain a max pooling spatial feature representation; and obtaining the spatial features of the region to be predicted output by the graph attention network based on the max pooling spatial feature representation.
[0012] According to a multi-scale spatial disease prediction method provided by the present invention, the disease prediction model is pre-trained in the following manner: A training dataset is constructed, comprising multiple training data, including macroscopic and microscopic graph structure samples of each region within the training sample area, and disease prediction result labels corresponding to the training sample area; a target loss function is constructed, comprising a trend prediction loss term, a propagation dynamic constraint loss term, and a human mobility loss term. The trend prediction loss term is used to construct the error between the predicted increase in the number of infected persons and the actual increase based on the disease prediction model; the propagation dynamic constraint loss term is used to construct the error between the calculated increase in the number of infected persons and the actual increase based on the disease transmission rate and recovery rate predicted by the disease prediction model; the human mobility loss term is used to constrain the relationship between the disease transmission rate and recovery rate and characteristics reflecting human movement; the disease prediction model is iteratively trained based on the target loss function and the training dataset to obtain a trained disease prediction model.
[0013] This invention also provides a multi-scale spatial disease prediction device, comprising: an acquisition module for acquiring macroscopic and microscopic graph structures of various regions within a region to be predicted, wherein the macroscopic graph structure represents population flow relationships between regions; and the microscopic graph structure represents contact relationships between users within a region; an invocation module for invoking a pre-trained disease prediction model, wherein the disease prediction model includes at least a pooling module and a prediction module, the pooling module obtaining microscopic feature vectors within the region corresponding to the microscopic graph structure based on the microscopic graph structure; the prediction module obtaining disease prediction results for the region to be predicted within a future preset time period based on the macroscopic graph structure and the microscopic feature vectors within the region; and a prediction module for inputting the macroscopic graph structure and the microscopic graph structure into the pre-trained disease prediction model to obtain disease prediction results for the region to be predicted within a future preset time period output by the disease prediction model, wherein the disease prediction results include at least the number of infected individuals, the disease transmission rate, and the disease recovery rate.
[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the multi-scale spatial disease prediction method described above.
[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the multi-scale spatial disease prediction method as described above.
[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the multi-scale spatial disease prediction method as described above.
[0017] This invention provides a multi-scale spatial disease prediction method, device, and electronic device. The method includes: acquiring the macroscopic and microscopic graph structures of each region within the region to be predicted; calling a pre-trained disease prediction model, wherein the disease prediction model includes at least a pooling module and a prediction module, the pooling module being used to obtain microscopic feature vectors within the region corresponding to the microscopic graph structure; the prediction module being used to obtain disease prediction results for the region to be predicted within a future preset time period based on the macroscopic graph structure and the microscopic feature vectors within the region; inputting the macroscopic and microscopic graph structures into the pre-trained disease prediction model to obtain the disease prediction results for the region to be predicted within the future preset time period output by the disease prediction model, wherein the disease prediction results include at least the number of infected people, the disease transmission rate, and the disease recovery rate. This invention combines macroscopic inter-regional population flow data and microscopic intra-regional user contact data for disease trend prediction, achieving both the capture of macroscopic trends and consideration of individual heterogeneity, thus improving prediction accuracy. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the multi-scale spatial disease prediction method provided by the present invention.
[0020] Figure 2 This invention provides a flowchart illustrating the process of inputting microscopic feature vectors and macroscopic graph structures within a region into a prediction module of a disease prediction model to obtain the disease prediction results for the region to be predicted within a preset time period.
[0021] Figure 3 This is a schematic diagram of the process of training a disease prediction model provided by the present invention.
[0022] Figure 4 This is a schematic diagram of the structure of the multi-scale spatial disease prediction device provided by the present invention.
[0023] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0025] This invention provides a multi-scale spatial disease prediction method that combines macro-level population flow map information and micro-level user contact map information, employing a macro-micro collaborative approach to predict the spread of infectious diseases. The combination of macro-level population flow map information (corresponding to the macro-map structure) and micro-level user contact map information (corresponding to the micro-map structure) can be considered the multi-scale information referred to in this paper. The objective of this invention is to provide a given... Time before Macro chart of the sky and a series of microscopic maps Predict the number of infections in each region in the future based on human movement behavior and infectious disease parameters. .
[0026] Figure 1 This is a flowchart illustrating the multi-scale spatial disease prediction method provided by the present invention.
[0027] The following will combine Figure 1 The process of the multi-scale spatial disease prediction method provided by this invention will be described.
[0028] In an exemplary embodiment of the present invention, combined with Figure 1 As can be seen, the multi-scale spatial disease prediction method may include steps 110 to 130, which will be described in detail below.
[0029] In step 110, the macroscopic graph structure and microscopic graph structure of each region within the region to be predicted are obtained, wherein the macroscopic graph structure is used to characterize the population flow relationship between regions; and the microscopic graph structure is used to characterize the contact relationship between users within the region.
[0030] In one embodiment, the region to be predicted may include multiple regions, and the macroscopic graph structure (also known as the macroscopic graph) and microscopic graph structure (also known as the micro-macroscopic graph) of each region can be obtained. The macroscopic graph... This is a graph representing population movement between regions, where It is a collection of regions. It is a set of edges representing population flows between regions. For each node, it has a size of... static features and a size of The dynamic characteristics.
[0031] In the macroscopic diagram, each node represents a region with both static and dynamic characteristics. The static characteristic is the proportion of the region's population to the total population of all regions, which remains constant across all time steps. The dynamic characteristic consists of a matrix containing information on the number of existing infections, new infections, existing susceptible individuals, and new susceptible individuals across all time steps, where disease transmission is represented by... Representation. Edges represent population flows between regions. Specifically, nodes... and nodes Edge weights between Define the following formula (1): (1) in, It is defined by the following formula The normalized value of can be expressed as formula (2): (2) in, Indicates the area Users in the region Travel to the region The time spent. Therefore, Indicates the area To the area The ratio of all users' trips to their travel time, divided by region. The ratio of trips to times for all users across all regions. Intuitively, this definition suggests that regions with higher population mobility densities are more similar in terms of infectious disease transmission patterns and dependencies. On the other hand, micro-level information on human mobility patterns in each region can be represented by a regional micromap as defined below.
[0032] In the Time step, for the region The regional microstructure can be described as ,in It belongs to the region The user set, It is the current time step region. The set of interactions between users within a region. In a regional micrograph, nodes represent regions. The set of users within a region, where the edges between nodes represent two users in the region. Other contact scenarios. That is, if two users are located in the same area. In addition, there is an edge between them. Specifically, the microscopic information feature matrix (a representation of the microscopic graph structure) The size is The size of the macroscopic information feature matrix (a representation of the macroscopic graph structure) is Macro-micro collaborative information feature matrix The size is .also, It is the static feature size of each region. It is the dynamic feature size of each region. It is the feature size extracted from the region micromap. Defined as the length (in days) of the historical window for each region. It represents the total number of all regions.
[0033] In step 120, a pre-trained disease prediction model is invoked. The disease prediction model includes at least a pooling module and a prediction module. The pooling module is used to obtain micro-feature vectors within the region corresponding to the micro-graph structure based on the micro-graph structure. The prediction module is used to obtain disease prediction results for the region to be predicted within a future preset time period based on the macro-graph structure and the micro-feature vectors within the region.
[0034] In one embodiment, the disease prediction model may be pre-trained on historical epidemic data and corresponding human movement data, wherein the disease prediction model may include a pooling module and a prediction module.
[0035] The pooling module can be composed of a hierarchical graph neural network, designed to handle high-dimensional, sparse micrograph structures. It receives the micrograph structure of a region as input and, through learnable, multi-level graph coarsening (pooling) operations, progressively clusters and abstracts fine-grained user nodes, ultimately outputting a fixed-dimensional, dense micrograph feature vector within the region. This vector encodes the overall statistical characteristics and structural information of user contact patterns within that region.
[0036] The prediction module receives two inputs: the acquired macroscopic graph structure and a set of microscopic feature vectors extracted for all regions by the pooling module. First, the module fuses the macroscopic features of each region (such as static population attributes and historical case dynamics) with their corresponding microscopic feature vectors to form macroscopic-microscopic co-features for each region. Then, the module uses a graph attention network to analyze the macroscopic graph structure, capturing spatial dependencies based on population flow; and uses a recurrent neural network to process the time series of co-features, capturing the temporal dynamics of the epidemic's development. Finally, the module's output layer is configured to predict multiple indicators simultaneously.
[0037] In step 130, the macroscopic graph structure and the microscopic graph structure are input into a pre-trained disease prediction model to obtain the disease prediction results of the region to be predicted within a future preset time period output by the disease prediction model. The disease prediction results include at least the number of people infected with the disease, the disease transmission rate, and the disease recovery rate.
[0038] In one embodiment, the macroscopic graph structure of the region to be predicted within the most recent historical time period and the microscopic graph structure of each region can be input together into a trained disease prediction model. During application, the pooling module processes the microscopic graphs of each region in parallel, generating microscopic feature vectors (also known as intra-regional microscopic feature vectors) for each region. The prediction module fuses the macroscopic structure and microscopic features for spatiotemporal computation to obtain the prediction result. The model output can provide disease prediction results for a preset future time period (e.g., the next 7 or 14 days), wherein the disease prediction results can at least include the number of people infected with the disease. Disease transmission rate and disease recovery rate Among them, the number of people infected with the disease This indicates the projected daily number of new or cumulative infections in each region; disease transmission rate. A parameter representing the predicted ability of a disease to spread in a population over a future period; disease recovery rate. This represents the predicted rate of recovery for infected individuals within a future timeframe.
[0039] In this embodiment, the inherent limitations of single-scale models are overcome by simultaneously acquiring and utilizing both macroscopic and microscopic graph structures. The macroscopic graph structure ensures that the model can grasp the large-scale disease spread trends based on population movement; while the microscopic feature vectors within the region extracted from the microscopic graph structure through the pooling module introduce heterogeneous information reflecting differentiated contact behaviors between individuals. This fusion of multi-scale information enables the model to predict both the mainstream direction of cross-regional transmission and to simulate the outbreak risk within a region more precisely, thereby significantly improving the overall accuracy of spatial disease prediction.
[0040] This invention provides a multi-scale spatial disease prediction method. The method includes: acquiring the macroscopic and microscopic graph structures of each region within the region to be predicted; calling a pre-trained disease prediction model, wherein the disease prediction model includes at least a pooling module and a prediction module, the pooling module being used to obtain microscopic feature vectors within the region corresponding to the microscopic graph structure; the prediction module being used to obtain disease prediction results for the region to be predicted within a future preset time period based on the macroscopic graph structure and the microscopic feature vectors within the region; inputting the macroscopic and microscopic graph structures into the pre-trained disease prediction model to obtain the disease prediction results for the region to be predicted within the future preset time period output by the disease prediction model, wherein the disease prediction results include at least the number of infected people, the disease transmission rate, and the disease recovery rate. This invention combines macroscopic inter-regional population flow data and microscopic intra-regional user contact data for disease trend prediction, achieving both the capture of macroscopic trends and consideration of individual heterogeneity, thus improving prediction accuracy.
[0041] In an exemplary embodiment of the present invention, continuing from the preceding text... Figure 1 The above embodiment is used as an example for illustration. Inputting the macroscopic graph structure and the microscopic graph structure into a pre-trained disease prediction model to obtain the disease prediction results of the region to be predicted within a preset time period (corresponding to step 130) can be achieved in the following way: The micrograph structure is input into the pooling module in the disease prediction model to obtain the micro-feature vector within the region corresponding to the micrograph structure, which is output by the pooling module. The micro-feature vectors and macro-graph structures within the region are input into the prediction module of the disease prediction model to obtain the disease prediction results for the region to be predicted within a preset time period.
[0042] In one embodiment, the micrograph structure of each region within the area to be predicted can be input into a pre-trained pooling module in the disease prediction model. This pooling module, as an independent sub-network of the model, is specifically responsible for processing high-dimensional, sparse micro-contact graphs. For each input micrograph structure, the pooling module performs a learnable graph coarsening (pooling) operation through its built-in hierarchical graph neural network, progressively clustering and abstracting the nodes representing individual users, ultimately outputting a fixed-dimensional, low-dimensional, dense numerical vector for each region—the micro-feature vector within that region. This step of processing micrographs across multiple regions can be performed in parallel or sequentially, ultimately yielding a set composed of micro-feature vectors from all regions.
[0043] Furthermore, the set of micro-feature vectors of all regions output by the pooling module, along with the macro-graph structure of the entire region to be predicted, can be input into the prediction module of the disease prediction model. In application, the prediction module first concatenates or weights the macro-level features of each region (such as the static and dynamic attributes of the node in the macro-graph) with the corresponding micro-feature vectors provided by the pooling module, forming an enhanced regional feature that simultaneously reflects inter-regional flow and intra-regional contact—the "fusion vector" below. Based on the fused enhanced features and the inter-regional connectivity defined by the macro-graph structure, the prediction module uses its internal Graph Attention Network (GAT) component to capture spatial dependencies and a recurrent neural network (GRU or LSTM) component to model time-series trends. After a series of neural network layers, the final output layer of the prediction module generates prediction results for a preset future time period (e.g., the next 7 days), which at least includes the number of infected individuals, the disease transmission rate, and the disease recovery rate in each region.
[0044] In yet another exemplary embodiment of the present invention, continuing with the previously described embodiments, the pooling module may include a multi-layer graph neural network; inputting the micro-graph structure into the pooling module in the disease prediction model to obtain the micro-feature vector within the region corresponding to the micro-graph structure output by the pooling module can be achieved in the following manner: The micrograph structure is input into the pooling module of the disease prediction model, and then coarsened sequentially through a multi-layer graph neural network to extract micro-feature vectors within the corresponding regions of the micrograph structure. In a multilayer graph neural network, the input to the first layer is a micrograph structure; for other layers besides the first layer, the output of the previous layer is used as the input to the next layer.
[0045] In one embodiment, the core of the pooling module is a hierarchical (multi-layer) graph neural network architecture. This architecture consists of L layers (L being an integer greater than 1) of graph neural networks connected sequentially. Each layer performs feature extraction and graph structure coarsening functions, but the scale and abstraction level of the "graph" it operates on increase layer by layer.
[0046] In the application process, the original microscopic graph structure representing the contact relationships between users within the region (denoted as the 0th layer graph G) can be used. (0)The user nodes (representing users, with edges representing interactions between users) are input into the first layer of the multi-layer graph neural network (GNN Layer 1). This layer receives the original node features and adjacency relationships, learns a preliminary embedding representation for each user node, and based on this, learns a soft assignment matrix to cluster the original user nodes into a smaller series of "clusters." The output of this layer can be the node (cluster) embedding matrix Z of the first layer. (1) The first layer corresponds to the coarsened graph structure G. (1) Its nodes are "clusters" generated in the first layer, and the edge weights represent the connection strength between clusters.
[0047] For the l-th layer (l=1,2,...L-1), its input is the coarsened graph structure G output from the previous layer (the (l-1)-th layer). (l-1) and its node embedding Z (l-1) That is, the output of the previous layer of the graph neural network serves as the input of the next layer. The l-th layer of the graph neural network takes the input graph G as its input. (l-1) Repeat the similar embedding learning and clustering assignment operations to further aggregate its nodes (i.e., the clusters of layer l-1) into fewer, higher-level clusters, thereby outputting a coarser graph structure G. (l) and its embedded Z (l) In this way, the size of the graph decreases layer by layer, while the level of abstraction increases layer by layer.
[0048] After L layers of hierarchical coarsening, the original, fine-grained microscopic graph structure is gradually abstracted. Finally, the graph-level representation output by the last layer (Lth layer) of the graph neural network (such as the global pooling features of all nodes in the image) or the representative embedding output by the penultimate layer (L-1th layer) is determined as the microscopic feature vector within the corresponding region. This vector is a fixed-dimensional dense vector that encodes the core structural information and statistical patterns of the original microscopic contact graph after multi-level abstraction.
[0049] To further illustrate the process provided by this invention of inputting the micrograph structure into the pooling module of the disease prediction model to obtain the micro-feature vector within the region corresponding to the micrograph structure output by the pooling module, the following embodiments will be used for explanation.
[0050] In one embodiment, the pooling module may be a stacked L-layer GNN module, where the l-th layer uses the pooling embeddings generated in the (l-1)-th layers and learns to group nodes into clusters in the l-th layer. The GNN is used to extract node embeddings useful for graph regression and node embeddings useful for hierarchical pooling. In this embodiment, the cluster assignment matrix learned in the l-th layer is represented as follows: ,in, Each row in the table corresponds to a node or cluster in layer l, and each column corresponds to a cluster in layer l+1. The features of each cluster in layer l can be generated using the following formula (3): (3) A coarsened adjacency matrix is generated to represent the connection strength between each pair of clusters, which can be expressed as formula (4): (4) in It is an allocation matrix. It is an adjacency matrix. is the feature matrix, R represents the real number field; b represents the number of clusters in the Lth layer; d represents the embedding dimension.
[0051] In another embodiment, the GNN embedding of the l-th layer can be represented using formula (5): (5) in, This represents the GNN embedding operation at layer l; that is, the adjacency matrix between cluster nodes at layer l and the cluster features are input into the GNN to obtain new embeddings of cluster nodes. The assignment matrix can be generated using the input cluster features and adjacency matrix, which can be expressed as formula (6): (6) in, This indicates the operation and processing of the softmax function (also known as the soft maximization function); This indicates the GNN pooling operation in layer l.
[0052] This can generate the probability assignment of the input node to the (l+1)th layer cluster.
[0053] The final graph embedding is obtained by coarsening the L layer of the region micromap.
[0054] In this embodiment, the pooling module is pre-trained using the micrograph input of the region at a certain time step, and then the average external connection degree of each individual in the region is output to obtain the final embedding vector of the entire graph. This embedding vector captures the contact information of all users in the region within the current time step, thereby extracting microscopic information.
[0055] In another example, since the output of the last dimension is low-dimensional and the data is highly compressed after pooling in layer L, this invention extracts the penultimate embedding vector (layer L-1) as the output of the pooling module to ensure the integrity of the information and balance the computational difficulty.
[0056] In this embodiment, a pooling module is used to extract necessary microscopic information, thereby abstracting the regional microscopic map. The proposed method improves the accuracy of the prediction model and enables the analysis of the dynamics of complex infectious disease transmission.
[0057] Figure 2 This invention provides a flowchart illustrating the process of inputting microscopic feature vectors and macroscopic graph structures within a region into a prediction module of a disease prediction model to obtain the disease prediction results for the region to be predicted within a preset time period.
[0058] The following will combine Figure 2 The present invention describes the process by which a prediction module in a disease prediction model inputs microscopic feature vectors and macroscopic graph structures within a region into the prediction module, and obtains the disease prediction results for the region to be predicted within a preset time period.
[0059] In an exemplary embodiment of the present invention, the prediction module may include a graph attention network and a recurrent neural network; combined with Figure 2 As can be seen, inputting the micro-feature vector and macro-graph structure within the region into the prediction module of the disease prediction model to obtain the disease prediction result of the region to be predicted within a preset time period can include steps 210 to 230, which will be described in detail below.
[0060] In step 210, the micro-feature vectors and macro-graph structures within the region are input into the prediction module of the disease prediction model, and the macro-graph structure and the micro-feature vectors within the region are fused to obtain a fused vector.
[0061] In one embodiment, the micro-feature vectors of all regions output by the pooling module, along with the acquired macro-graph structure, can be input into the prediction module. The prediction module first performs a feature fusion operation: for each region node in the macro-graph, its corresponding macro-level features (e.g., dynamic and static attributes such as the region's population size and historical infection sequence) are combined with the micro-feature vectors obtained from the pooling module to obtain a fused vector. This combination can be achieved through vector concatenation, weighted addition, or other feature fusion techniques. Through this step, a fused vector can be generated for each region, which simultaneously encodes the flow relationships between regions (reflected by their position in the macro-graph) and the contact heterogeneity within the region (reflected by the micro-feature vectors).
[0062] The prediction module aims to integrate macroscopic and microscopic information and use neural networks to predict the spread of infectious diseases. To this end, the macroscopic information matrix (corresponding to the macroscopic graph structure above) XtA (size N×FS+FD×LH) and the pooled microscopic information matrix (corresponding to the microscopic feature vectors within the region above) XtI (size N×FP) can be combined to obtain the collaborative information matrix Xt (corresponding to the fusion vector mentioned earlier). The obtained collaborative information matrix Xt (corresponding to the fusion vector mentioned earlier) can be represented by formula (7): Xt=concat(XtA∣XtI) (7) In step 220, the fusion vector is input into the graph attention network to obtain the spatial features of the region to be predicted output by the graph attention network. The graph attention network is used to extract the spatial features of the region to be predicted based on the fusion vector.
[0063] In one embodiment, the fusion vectors of all obtained regions can be input into a graph attention network within the prediction module. The graph attention network processes this fusion information through its unique attention mechanism. During application, for each target region node in the macro-graph, the graph attention network calculates its attention coefficient with all neighboring region nodes (based on edge connections). This coefficient is not fixed or based on simple distance, but is dynamically learned through a neural network, reflecting the importance or contribution of a neighboring region to the spread of disease in the target region within the context of the current fusion features. The graph attention network aggregates the fusion vectors of the target node itself and all its neighboring nodes, and performs a weighted sum based on the calculated attention coefficients, thereby updating the representation of each node. After processing by one or more layers of graph attention networks, a new set of node representations is finally output, referred to as the spatial features of the region to be predicted. This set of spatial features has been deeply integrated with the non-uniform spatial dependencies based on population flow networks, accurately depicting the complex spatial patterns of which regions have a greater impact on which regions.
[0064] In step 230, the spatial features of the region to be predicted are input into the recurrent neural network to obtain the disease prediction results of the region to be predicted in the future within a preset time period. The recurrent neural network is used to extract the disease prediction results of the region to be predicted in the future within a preset time period based on the spatial features.
[0065] In another embodiment, a sequence of spatial features organized by time steps (e.g., a historical window of the past LH days) can be input into a recurrent neural network (RNN) within the prediction module. The RNN, such as an RNN or its variants like GRU or LSTM, specializes in processing sequential data, processing the input spatial features sequentially over time. During application, the hidden state of the RNN is passed between time steps, thus remembering and integrating historical spatiotemporal pattern information. At each time step, the RNN updates its hidden state by combining the current input spatial features with its internally carried historical memory. After processing the entire historical sequence of input, the final hidden state of the RNN, or the transformation result of a specific output layer, contains comprehensive spatiotemporal information for predicting the future. Based on this, the output layer of the prediction module is configured to directly generate disease prediction results for the region to be predicted within a preset future time period, including at least the number of infected individuals, the disease transmission rate, and the disease recovery rate in each region.
[0066] In application, based on the macroscopic graph structure, spatiotemporal information can be extracted using GAT, and these graphs can be embedded into GRU to extract temporal information for predicting the spread trend of infectious diseases. Furthermore, constraints can be introduced to ensure accurate prediction of infectious disease transmission dynamics. To constrain long-term predictions, constraints are also imposed on the transmission dynamics of infectious diseases. Moreover, to achieve stable prediction of infectious disease parameters while considering human mobility, this invention implements constraints on the parameters and analyzes the relationship between human movement and infectious disease characteristics.
[0067] In general, the prediction module utilizes collaborative macroscopic and microscopic information to predict the dynamics of infectious disease transmission and incorporates constraints to improve prediction accuracy. This method enables accurate prediction of infectious disease trends and parameters even in complex dynamic environments such as human mobility. In the prediction module of this invention, a graph structure is used to model population flows between regions. To simulate disease transmission patterns, this invention needs to consider the spatial similarity of the graph, as viruses are more likely to spread between closely contacting nodes during transmission. Therefore, this invention can utilize GAT to extract the spatiotemporal features between regions (i.e., the spatial features of the region to be predicted).
[0068] In yet another exemplary embodiment of the present invention, the graph attention network may include a graph attention network with a multi-head attention mechanism; continuing from the preceding text Figure 2 Taking the above embodiment as an example, the spatial features of the region to be predicted (corresponding to step 220) output by the graph attention network can be obtained by inputting the fusion vector into the graph attention network as follows: The fusion vector is input into the multi-head attention mechanism under the graph attention network to obtain the attention weight of the node in the fusion vector under each attention mechanism head, and the node representation of the node under each attention mechanism head. The node in the fusion vector is used to represent the fusion information of the macro-graph features and micro-graph features of the region. For each node in the fusion vector, the node representation under each attention mechanism head and the attention weight under each attention mechanism head are aggregated to obtain the spatial feature representation of the node. Based on the spatial feature representations of all nodes, the spatial features of the region to be predicted are obtained from the output of the graph attention network.
[0069] In one embodiment, the obtained fusion vector (where each node corresponds to a region, and the node features are the macro-micro fusion information of that region) can be input into the attention network of the multi-head attention mechanism shown in the figure below. Assuming the number of attention heads is K, for each pair of adjacent or related nodes (regions) i and j in the macro graph, and for each attention head k (k=1,2,...,K), the network will perform the following calculations: The fusion vectors of nodes i and j are calculated separately after undergoing a linear transformation specific to that head. Based on the transformed representations, a scalar is calculated using a learnable attention mechanism, such as a feedforward neural network followed by a LeakyReLU activation function. This scalar represents the importance of node j to node i under the k-th attention head. The original attention scores calculated for all nodes j connected to node i are normalized using the softmax function to obtain formal, comparable attention weights. For each node i and each head k, the network generates a node representation of that node in the corresponding feature subspace, typically a weighted aggregation of its own and neighboring node features based on the attention weights.
[0070] For each node (region) i in the fusion vector, its node representations learned under K different attention heads, which may focus on different aspects of relationships, need to be aggregated to obtain the spatial feature representation of the node. The spatial feature representation of the node comes from complementary information from different subspaces. This representation not only includes the fusion information of the node itself and its neighbors, but also contains complex spatial interaction patterns revealed from multiple perspectives by the multi-head attention mechanism.
[0071] Furthermore, based on the spatial feature representations of all nodes obtained, spatial features that characterize the complex spatial dependencies within the entire region to be predicted can be constructed from the output of the graph attention network. This set of features will serve as input to the subsequent recurrent neural network for temporal dynamic modeling and final prediction.
[0072] To further illustrate the multi-scale spatial disease prediction method provided by this invention, the following embodiments will be used for explanation.
[0073] The basic idea of GAT is to update the embedding of each node by aggregating neighboring nodes, with information mainly spreading along edges with higher weights. This invention can use multi-layer GAT to extract spatiotemporal features (spatial features) from a macroscopic graph and construct the graph using historical data from a sliding window. Specifically, at each time step, this invention uses historical features of a certain length as input, where nodes... The input features are The size of the history window is denoted as Then, a graph attention mechanism is used to compute the representation of each node. ,in The output dimension of the GAT layer is represented by a hyperparameter. To compute node representations, this invention utilizes a multi-head attention mechanism, which independently runs graph convolutions multiple times, generating different attention weights by focusing on different features in the graph. Nodes between heads and nodes The attention weights are calculated using the following formula (8): (8) in, This represents the attention weights between the i-th node (where the node represents a region) of the k-th head and node j. This represents a non-linear activation function operation; This represents the macro-micro fusion information of the i-th region at time t, which can also correspond to the fusion vector of the i-th region at time t. This represents the macro-micro fusion information of the j-th region at time t, which can also correspond to the fusion vector of the j-th region at time t. The parameters represent the linear transformation weight matrix; This represents the attention weight calculation matrix for the k-th head. It is a nonlinear activation function, where R represents the real number field; This represents the output dimension of the GAT layer; LeakyReLu is used here. Then, this invention uses the softmax function to calculate the attention score for each edge to evaluate how much information is obtained from neighboring node j, which can be expressed as formula (9): (9) in, This represents the attention score for each edge; Let represent the attention weights of the i-th node (where each node represents a region) and node j in the k-th head; N represents the total number of regions in all nodes. This represents the attention weight between the i-th node (region) of the k-th head and node n; Finally, by summing the embedding vectors of all heads, the final representation of the node is obtained, which can be expressed as formula (10): (10) in, Let represent the spatial characteristics of the i-th region at time t; K represents the number of heads in the multi-head attention mechanism; k represents the k-th head; j represents the j-th region; N represents the number of regions. This represents the weighted weight of attention between regions i and j of the k-th head; The parameters represent the linear transformation weight matrix; This represents the macro-micro fusion information of the i-th region at time t, which can also correspond to the fusion vector of the i-th region at time t.
[0074] This embodiment enables the accurate simulation of the spatiotemporal transmission patterns of infectious diseases by utilizing population flow data and simulating the spatial similarity of graphs. By employing multi-layered GAT and multi-head attention mechanisms, this invention effectively captures complex relationships between regions and improves prediction accuracy.
[0075] In yet another exemplary embodiment of the present invention, continuing with the previously described embodiment as an example, the spatial features of the region to be predicted output by the graph attention network, based on the spatial feature representations of all nodes, can be obtained in the following manner: Max pooling is performed on the spatial feature representations of all nodes to obtain the spatial feature representations after max pooling. Based on the spatial feature representation after max pooling, the spatial features of the region to be predicted output by the graph attention network are obtained.
[0076] To better predict the future trend of infectious diseases, the predictive model needs to capture the patterns of graph information changing over time and the relationship between infectious diseases and time. Furthermore, it is necessary to consider the spread of the epidemic in different regions at different stages, because the spread models in each region differ in parameters but share the same graph structure. In this invention, MaxPool can be used to aggregate graph embeddings and reduce dimensionality; this process can be expressed as formula (11): (11) in, This represents the graph embedding information of all regions at time t; This represents the graph embedding information of region 0 at time t; This represents the graph embedding information of the first region at time t; This represents the graph embedding information of the Nth region at time t; This indicates a max pooling operation.
[0077] in, It is a matrix, and the Nth column is... ,therefore This step contains the most important features of all nodes extracted from the graph. This step helps to extract the most important features of all nodes, which is crucial for accurate prediction.
[0078] Furthermore, this invention models the time series by embedding the graph into a gated recurrent unit (GRU). The hidden states of the GRU contain the learned spatiotemporal patterns, which can be expressed as Equation (12): (12) in, This indicates the predicted disease outcome for the region to be predicted within a predetermined time period. This indicates the processing of gated recursive unit operations; This represents the graph embedding information for all regions at time 1. This represents the graph embedding information for all regions at time 2. This represents the graph embedding information of all regions at time t.
[0079] Through this embodiment, the model can capture the temporal dynamics of infectious diseases, thereby achieving more accurate predictions of future trends.
[0080] In another embodiment, when making predictions using macro-micro collaborative data from a historical window, dynamic parameters of the infectious disease (which may include the disease transmission rate) can also be output. and disease recovery rate ), and the daily increase in the number of infections (which can correspond to the number of people infected with the disease).
[0081] Among them, for the dynamic parameters of infectious diseases, the traditional SIS model assumes a transmission rate. and recovery rate These parameters remain constant over time, reflecting only the inherent characteristics of infectious disease viruses. However, in reality, changes in human mobility, whether due to policy shifts or spontaneous reductions, can cause these parameters to change over time. Therefore, the parameters no longer solely reflect the characteristics of the infectious disease. To address this, this invention introduces a transmission dynamics-constrained loss term to separate human mobility from infectious disease parameters, thereby ensuring... and Remain stable and unaffected by human mobility.
[0082] Regarding the daily increase in the number of infections, for the first Step by step, a historical window can be used to... The infectious disease trend (i.e., the future LP days) in the information prediction output window can be expressed as formula (13): (13) in, It is the increase in the number of infections. It represents the increment of the susceptible population, and MLP stands for Neural Network. The model in this invention aims to predict short-term and long-term disease transmission dynamics, as well as parameters of infectious diseases. To achieve this goal, the model employs a loss function mechanism that considers multiple prediction tasks related to transmission dynamics. This task utilizes evaluations of short-term and long-term prediction performance to jointly update parameters, thereby ensuring accurate predictions across all time scales.
[0083] Figure 3 This is a schematic diagram of the process of training a disease prediction model provided by the present invention.
[0084] The following will combine Figure 3 The process of training the disease prediction model provided by this invention will be explained.
[0085] In an exemplary embodiment of the present invention, combined with Figure 3 As can be seen, training a disease prediction model may include steps 310 to 330, which will be described in detail below.
[0086] In step 310, a training dataset is constructed, which includes multiple training data, including macroscopic graph structure samples and microscopic graph structure samples of each region within the training sample region, as well as disease prediction result labels corresponding to the training sample region.
[0087] In one embodiment, historical data is collected and organized to construct a dataset for model training. The training dataset contains multiple training data points that are sequential or spaced out in time. Each training data point is a data sample corresponding to a specific historical point in time or time period. Each training data point includes macroscopic graph structure samples of each region within the training sample region, microscopic graph structure samples of each region within the training sample region, and disease prediction result labels. Specifically, the macroscopic graph structure samples of each region within the training sample region are constructed based on population flow data for a period prior to the historical point in time (or the start of the time period), and their form is consistent with the macroscopic graph structure, reflecting the historical flow relationships between regions. The microscopic graph structure samples of each region within the training sample region are constructed based on anonymous user trajectory data from the same period as the macroscopic graph samples, generating a corresponding microscopic contact map for each region, whose form is consistent with the microscopic graph structure. The disease prediction result labels are the ground truth values corresponding to the aforementioned graph structure samples. Specifically, the labels may include the incremental sequence of the actual number of disease infections in each region within a preset future time period (e.g., the next 7 days), as well as representative disease transmission rate and disease recovery rate parameters for that time period, inferred or estimated from real epidemic data.
[0088] In step 320, a target loss function is constructed, which includes a trend prediction loss term, a propagation dynamic constraint loss term, and a human mobility loss term. The trend prediction loss term is used to construct the error between the increase in the number of disease infections predicted based on the disease prediction model and the actual increase. The propagation dynamic constraint loss term is used to construct the error between the increase in the number of disease infections calculated based on the disease transmission rate and disease recovery rate predicted by the disease prediction model and the actual increase. The human mobility loss term is used to constrain the relationship between the disease transmission rate and disease recovery rate and the characteristics reflecting human movement.
[0089] In one embodiment, the target loss function can be a multi-task composite loss function used to guide model training. This target loss function consists of three core loss terms that jointly constrain the model's learning direction. Specifically, the target loss function includes a trend prediction loss term, a propagation dynamic constraint loss term, and a human mobility loss term.
[0090] Trend prediction loss item This measure directly evaluates the model's accuracy in predicting the scale of a short-term outbreak. It is constructed based on the error between the model's predicted increase in the number of infections over a pre-defined future time period and the actual increase in the number of infections during that period. It is typically calculated using mean squared error (MSE) or mean absolute error (MAE). This measure ensures that the model accurately fits the observed trends in the number of infections in historical data.
[0091] The infectious disease trend prediction loss term is used to measure the short-term prediction of this invention. It is expressed as the mean squared error (MSE) between the model's direct prediction of the infectious disease transmission dynamics in the next LP days and the actual value. The calculation formula is as follows: (14) in, This represents the projected increase in the number of people infected with the disease over a predetermined time period. This label represents the actual increase in the number of infections corresponding to that time period. This represents the predicted increase in the number of people susceptible to the disease over a pre-defined future time period. This label represents the actual increase in the number of susceptible individuals corresponding to that time period.
[0092] Propagation dynamic constraint loss term This measure aims to ensure that the epidemiological parameters predicted by the model conform to the dynamics of infectious disease transmission. The calculation method is as follows: First, using the disease transmission rate and recovery rate predicted by the model, combined with the infectious disease dynamics equation (such as the SIS or SIR model), the increase in the number of infections within a preset future time period is calculated based on the actual state at the current moment. Then, the error (such as MSE) between this calculated increase and the actual increase label is calculated. This loss constraint ensures that the parameters predicted by the model are not only numerically reasonable but also able to "reproduce" the actual transmission dynamics through the theoretical model, enhancing the long-term rationality and consistency of the parameter predictions.
[0093] The loss term in the model of this invention is used to optimize the propagation rate. and recovery rate Long-term forecasts. However, due to and The information content is limited and has a small dimension, so this invention does not directly calculate the MSE of these parameters. Instead, this invention utilizes... and Losses are calculated based on predicted disease trends, with the prediction timeframe being the next LP day. Specifically, this is done when using MLP for prediction. and Subsequently, this invention employs a dynamic prediction method to progressively calculate the propagation dynamics using the initial dynamics at the current moment. Then, optimization is achieved by calculating the loss between the dynamic prediction and the true value. and The dynamic prediction formula is as follows: (15) in, The inferred value of the parameter representing the number of new infections; The parameter inferred represents the number of new infections on day t+1. Indicates the t-th The parameter estimate of the number of new infections per day; The parameter inferred represents the number of new infections on day i. This represents the actual number of susceptible individuals at time i-1; This represents the actual number of infections at time i-1; Indicates the population of the region; The parameter inferred represents the number of new infections on day i-1. The parameter inferred to represent the number of newly susceptible individuals; The parameter inferred represents the number of newly susceptible individuals on day t+1. Indicates the t-th The estimated value of the number of newly susceptible individuals per day; The parameter inferred represents the number of newly susceptible individuals on day i.
[0094] in, and Calculated based on the actual value of the previous day in the current forecast window. This represents the total population at a location. To further optimize the consistency between the prediction and long-term infectious disease trends, this invention uses a transmission dynamics constraint loss, which can be expressed as formula (16): (16) in, This represents the predicted number of new infections under the current forecast window; This represents the actual number of new infections within the current forecast window; This represents the predicted number of newly vulnerable individuals within the current forecast window; This represents the actual number of newly susceptible individuals within the current forecast window.
[0095] This loss measures the mean square error between the propagation dynamics forecast and the actual value, helping to ensure that the forecast results are consistent with the long-term trend.
[0096] For human liquidity loss items Using only propagation dynamics constraint loss to constrain parameter predictions may lead to inaccurate results. This is because changes in human mobility (such as travel restrictions implemented by policies) can affect the propagation dynamics of infectious diseases. If this invention only fits the dynamic equation based on disease trends, it may incorporate information related to human mobility into the parameters of the infectious disease, causing the extracted parameters to no longer simply reflect the intrinsic characteristics of the disease. Therefore, this invention needs to introduce a loss term to distinguish between the characteristics of infectious diseases and human mobility.
[0097] To this end, this invention trains an MLP network that outputs microscopic information features (XI, which can correspond to microscopic feature vectors within a region) related to the LP, making it linearly related to the parameters, thereby achieving separation between human mobility and infectious disease characteristics. Specifically, the parameters reflecting only infectious disease characteristics are represented as follows: and The parameter that simultaneously reflects the characteristics of infectious diseases and human mobility is expressed as... and This invention assumes that the relationship between human mobility and infectious diseases is a simple multiplicative one, which can be expressed as formula (17): (17) Therefore, the infectious disease parameters at each time step can be expressed as: Furthermore, since this relationship should remain constant over time, the present invention calculates the difference between the parameters. It is required that it tends to 0. The representation is similar. Based on the above assumptions, this invention constructs a human liquidity loss term that can be expressed as formula (18): (18) in, Indicates the transmission rate; Indicates the recovery rate; This represents the embedding corresponding to the micro-features of region I (the micro-feature vectors within the region).
[0098] The complete loss function is obtained by summing the three loss terms for each region in each prediction window LP, as shown below: (19) Once the model of this invention is trained, it can be applied to predict the spread of infectious diseases in all locations, given the historical window length LH, the prediction window length LP, and the graph information G.
[0099] In step 330, the disease prediction model is iteratively trained based on the target loss function and the training dataset to obtain a trained disease prediction model.
[0100] In one embodiment, the training process employs a standard backpropagation algorithm and a gradient descent optimizer (such as Adam). In each iteration or batch, samples are taken from the training dataset, inputting macroscopic graph structure samples and microscopic graph structure samples into the model to be trained, obtaining the model's output prediction results. Based on the model output and the corresponding true labels, the sum of the three losses mentioned above can be calculated. Calculate the gradient of the total loss with respect to all trainable parameters of the model, and update the parameters to minimize the total loss. Repeat this process until the model’s performance on the validation set stabilizes or reaches the preset number of iterations. The model obtained at this point is the trained disease prediction model.
[0101] In this embodiment, by constructing a composite loss function that includes a trend prediction loss term, a transmission dynamics constraint loss term, and a human mobility loss term, this training method guides the model to simultaneously learn three key aspects: accurately fitting short-term observation data, adhering to the basic dynamics of infectious disease transmission, and distinguishing between changes in human behavior and inherent viral characteristics. This multi-task, multi-constraint collaborative training mechanism avoids the pitfalls of overfitting or violating physical laws that may occur when the model only pursues short-term data fitting. It ensures that the final trained model not only outputs numerically accurate predictions of the number of infections but also provides reasonable and stable parameter estimates in an epidemiological sense, thus guaranteeing both numerical accuracy and theoretical rationality of the overall prediction results and significantly enhancing overall reliability.
[0102] As described above, this invention provides a multi-scale spatial disease prediction method. First, a regional micro-map is input into a pooling module, which generates a coarsened micro-information vector. Then, this vector is combined with information from a macro-map and input into a prediction module. Here, graph embedding is generated using GAT, and temporal changes in features are captured using a GRU network. In the final time slice, the infectious disease trend for all locations is output. and infectious disease parameters The prediction results are as follows. It should be noted that the model of this invention is optimized only during training. Therefore, prediction results for different time periods can be obtained by adjusting the prediction window length LP. By integrating macroscopic and microscopic information, the model of this invention can effectively predict the spread of infectious diseases in multiple locations. By utilizing GAT and GRU networks, the model can capture spatial and temporal dynamics, thereby making accurate trend and parameter predictions at each location.
[0103] The following describes the multi-scale spatial disease prediction device provided by the present invention. The multi-scale spatial disease prediction device described below and the multi-scale spatial disease prediction method described above can be referred to and correspond to each other.
[0104] Figure 4 This is a schematic diagram of the structure of the multi-scale spatial disease prediction device provided by the present invention.
[0105] The following will combine Figure 4 The structure of the multi-scale spatial disease prediction device provided by the present invention will be described.
[0106] In an exemplary embodiment of the present invention, combined with Figure 4 As can be seen, the multi-scale spatial disease prediction device may include an acquisition module 410, a calling module 420, and a 430, which will be described in detail below.
[0107] The acquisition module 410 can be configured to acquire the macroscopic and microscopic graph structures of each region within the region to be predicted, wherein the macroscopic graph structure is used to characterize the population flow relationship between regions; and the microscopic graph structure is used to characterize the contact relationship between users within the region. The calling module 420 can be configured to call a pre-trained disease prediction model, wherein the disease prediction model includes at least a pooling module and a prediction module. The pooling module is used to obtain micro-feature vectors within the region corresponding to the micro-graph structure based on the micro-graph structure. The prediction module is used to obtain disease prediction results for the region to be predicted within a future preset time period based on the macro-graph structure and the micro-feature vectors within the region. The prediction module 430 can be configured to input the macroscopic graph structure and the microscopic graph structure into a pre-trained disease prediction model to obtain the disease prediction results of the region to be predicted within a future preset time period output by the disease prediction model, wherein the disease prediction results include at least the number of people infected with the disease, the disease transmission rate, and the disease recovery rate.
[0108] In an exemplary embodiment of the present invention, the prediction module 430 may input the macroscopic graph structure and the microscopic graph structure into a pre-trained disease prediction model in the following manner to obtain the disease prediction result of the region to be predicted within a future preset time period output by the disease prediction model: The micrograph structure is input into the pooling module in the disease prediction model to obtain the micro-feature vector within the region corresponding to the micrograph structure, which is output by the pooling module. The micro-feature vectors and macro-graph structures within the region are input into the prediction module of the disease prediction model to obtain the disease prediction results for the region to be predicted within a preset time period.
[0109] In an exemplary embodiment of the present invention, the pooling module includes a multi-layer graph neural network; the prediction module 430 can input the micrograph structure into the pooling module in the disease prediction model in the following manner to obtain the micrograph feature vector within the region corresponding to the micrograph structure output by the pooling module: The micrograph structure is input into the pooling module of the disease prediction model, and a multi-layer graph neural network is used to coarsen the micrograph structure sequentially, extracting micro-feature vectors within the region corresponding to the micrograph structure. The input to the first layer of the multilayer graph neural network is the micrograph structure; for other layers of graph neural networks besides the first layer, the output of the previous layer is used as the input to the next layer.
[0110] In an exemplary embodiment of the present invention, the prediction module includes a graph attention network and a recurrent neural network; the prediction module 430 can input the micro-feature vector and the macro-graph structure within the region into the prediction module of the disease prediction model in the following manner to obtain the disease prediction result of the region to be predicted within a future preset time period output by the prediction module: The micro-feature vectors within the region and the macro-graph structure are input into the prediction module of the disease prediction model, and the macro-graph structure and the micro-feature vectors within the region are fused to obtain a fused vector; The fusion vector is input into the graph attention network to obtain the spatial features of the region to be predicted output by the graph attention network, wherein the graph attention network is used to extract the spatial features of the region to be predicted based on the fusion vector; The spatial features of the region to be predicted are input into the recurrent neural network to obtain the disease prediction result of the region to be predicted within a future preset time period output by the recurrent neural network. The recurrent neural network is used to extract the disease prediction result of the region to be predicted within a future preset time period based on the spatial features.
[0111] In an exemplary embodiment of the present invention, the graph attention network includes a graph attention network with a multi-head attention mechanism; the prediction module 430 can input the fusion vector into the graph attention network in the following manner to obtain the spatial features of the region to be predicted output by the graph attention network: The fusion vector is input into the multi-head attention mechanism under the graph attention network to obtain the attention weight of the node in the fusion vector under each attention mechanism head, and the node representation of the node under each attention mechanism head. The node in the fusion vector is used to represent the fusion information of the macro-graph features and micro-graph features of the region. For each node in the fusion vector, the node representation under each attention mechanism head and the attention weight under each attention mechanism head are aggregated to obtain the spatial feature representation of the node. Based on the spatial feature representations of all nodes, the spatial features of the region to be predicted are obtained from the output of the graph attention network.
[0112] In an exemplary embodiment of the present invention, the prediction module 430 can obtain the spatial features of the region to be predicted output by the graph attention network by implementing a spatial feature representation based on all nodes in the following manner: Max pooling is performed on the spatial feature representations of all nodes to obtain the spatial feature representations after max pooling. Based on the spatial feature representation after the max pooling operation, the spatial features of the region to be predicted are obtained from the output of the graph attention network.
[0113] In an exemplary embodiment of the present invention, the calling module 420 may train the disease prediction model in the following manner: Construct a training dataset, wherein the training dataset includes multiple training data, the training data including macroscopic graph structure samples and microscopic graph structure samples of each region within the training sample region, and disease prediction result labels corresponding to the training sample region; A target loss function is constructed, comprising a trend prediction loss term, a propagation dynamic constraint loss term, and a human mobility loss term. The trend prediction loss term is used to construct the error between the predicted increase in the number of infected people based on the disease prediction model and the actual increase. The propagation dynamic constraint loss term is used to construct the error between the calculated increase in the number of infected people based on the disease transmission rate and recovery rate predicted by the disease prediction model and the actual increase. The human mobility loss term is used to constrain the relationship between the disease transmission rate and recovery rate and characteristics reflecting human movement. The disease prediction model is iteratively trained based on the target loss function and the training dataset to obtain a trained disease prediction model.
[0114] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other through the communications bus 540. The processor 510 can call logical instructions in the memory 530 to execute a multi-scale spatial disease prediction method. This method includes: acquiring macroscopic and microscopic graph structures of various regions within the region to be predicted, wherein the macroscopic graph structure represents population flow relationships between regions; the microscopic graph structure represents contact relationships between users within the region; calling a pre-trained disease prediction model, wherein the disease prediction model includes at least a pooling module and a prediction module, the pooling module obtaining microscopic feature vectors within the region corresponding to the microscopic graph structure based on the microscopic graph structure; the prediction module obtaining disease prediction results for the region to be predicted within a future preset time period based on the macroscopic graph structure and the microscopic feature vectors within the region; inputting the macroscopic graph structure and the microscopic graph structure into the pre-trained disease prediction model to obtain the disease prediction results for the region to be predicted within the future preset time period output by the disease prediction model, wherein the disease prediction results include at least the number of infected individuals, the disease transmission rate, and the disease recovery rate.
[0115] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0116] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the multi-scale spatial disease prediction method provided by the above methods. The method includes: acquiring the macroscopic graph structure and microscopic graph structure of each region within the region to be predicted, wherein the macroscopic graph structure is used to characterize the population flow relationship between regions; the microscopic graph structure is used to characterize the contact relationship between users within the region; calling a pre-trained disease prediction model, wherein the disease prediction model includes at least a pooling module and a prediction module, the pooling module is used to obtain the microscopic feature vector within the region corresponding to the microscopic graph structure based on the microscopic graph structure; the prediction module is used to obtain the disease prediction result of the region to be predicted within a future preset time period based on the macroscopic graph structure and the microscopic feature vector within the region; inputting the macroscopic graph structure and the microscopic graph structure into the pre-trained disease prediction model to obtain the disease prediction result of the region to be predicted within a future preset time period output by the disease prediction model, wherein the disease prediction result includes at least the number of infected people, the disease transmission rate, and the disease recovery rate.
[0117] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program is implemented to perform the multi-scale spatial disease prediction method provided by the above methods. The method includes: acquiring macroscopic and microscopic graph structures of each region within the region to be predicted, wherein the macroscopic graph structure is used to characterize population flow relationships between regions; the microscopic graph structure is used to characterize contact relationships between users within the region; invoking a pre-trained disease prediction model, wherein the disease prediction model includes at least a pooling module and a prediction module, the pooling module being used to obtain microscopic feature vectors within the region corresponding to the microscopic graph structure based on the microscopic graph structure; the prediction module being used to obtain disease prediction results for the region to be predicted within a future preset time period based on the macroscopic graph structure and the microscopic feature vectors within the region; inputting the macroscopic graph structure and the microscopic graph structure into the pre-trained disease prediction model to obtain the disease prediction results for the region to be predicted within the future preset time period output by the disease prediction model, wherein the disease prediction results include at least the number of infected individuals, the disease transmission rate, and the disease recovery rate.
[0118] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0119] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-scale spatial disease prediction method, characterized in that, The method includes: Obtain the macroscopic and microscopic graph structures of each region within the region to be predicted, wherein the macroscopic graph structure is used to characterize the population flow relationships between regions; and the microscopic graph structure is used to characterize the contact relationships between users within the region. A pre-trained disease prediction model is invoked, wherein the disease prediction model includes at least a pooling module and a prediction module. The pooling module is used to obtain micro-feature vectors within the region corresponding to the micro-graph structure based on the micro-graph structure. The prediction module is used to obtain disease prediction results for the region to be predicted within a future preset time period based on the macro-graph structure and the micro-feature vectors within the region. The macroscopic graph structure and the microscopic graph structure are input into a pre-trained disease prediction model to obtain the disease prediction results of the region to be predicted within a future preset time period. The disease prediction results include at least the number of people infected with the disease, the disease transmission rate, and the disease recovery rate.
2. The multi-scale spatial disease prediction method according to claim 1, characterized in that, The step of inputting the macroscopic graph structure and the microscopic graph structure into a pre-trained disease prediction model to obtain the disease prediction results of the region to be predicted within a preset future time period output by the disease prediction model includes: The micrograph structure is input into the pooling module in the disease prediction model to obtain the micro-feature vector within the region corresponding to the micrograph structure, which is output by the pooling module. The micro-feature vectors and macro-graph structures within the region are input into the prediction module of the disease prediction model to obtain the disease prediction results for the region to be predicted within a preset time period.
3. The multi-scale spatial disease prediction method according to claim 2, characterized in that, The pooling module includes a multi-layer graph neural network; the step of inputting the micrograph structure into the pooling module in the disease prediction model to obtain the micrograph feature vector within the region corresponding to the micrograph structure output by the pooling module includes: The micrograph structure is input into the pooling module of the disease prediction model, and a multi-layer graph neural network is used to coarsen the micrograph structure sequentially, extracting micro-feature vectors within the region corresponding to the micrograph structure. The input to the first layer of the multilayer graph neural network is the micrograph structure; for other layers of graph neural networks besides the first layer, the output of the previous layer is used as the input to the next layer.
4. The multi-scale spatial disease prediction method according to claim 2, characterized in that, The prediction module includes a graph attention network and a recurrent neural network; the step of inputting the micro-feature vectors and the macro-graph structure within the region into the prediction module of the disease prediction model to obtain the disease prediction results of the region to be predicted within a preset time period output by the prediction module includes: The micro-feature vectors within the region and the macro-graph structure are input into the prediction module of the disease prediction model, and the macro-graph structure and the micro-feature vectors within the region are fused to obtain a fused vector; The fusion vector is input into the graph attention network to obtain the spatial features of the region to be predicted output by the graph attention network, wherein the graph attention network is used to extract the spatial features of the region to be predicted based on the fusion vector; The spatial features of the region to be predicted are input into the recurrent neural network to obtain the disease prediction result of the region to be predicted within a future preset time period output by the recurrent neural network. The recurrent neural network is used to extract the disease prediction result of the region to be predicted within a future preset time period based on the spatial features.
5. The multi-scale spatial disease prediction method according to claim 4, characterized in that, The graph attention network includes a multi-head attention mechanism, as shown in the graph attention network below. The step of inputting the fused vector into the graph attention network to obtain the spatial features of the region to be predicted output by the graph attention network includes: The fusion vector is input into the multi-head attention mechanism under the graph attention network to obtain the attention weight of the node in the fusion vector under each attention mechanism head, and the node representation of the node under each attention mechanism head. The node in the fusion vector is used to represent the fusion information of the macro-graph features and micro-graph features of the region. For each node in the fusion vector, the node representation under each attention mechanism head and the attention weight under each attention mechanism head are aggregated to obtain the spatial feature representation of the node. Based on the spatial feature representations of all nodes, the spatial features of the region to be predicted are obtained from the output of the graph attention network.
6. The multi-scale spatial disease prediction method according to claim 5, characterized in that, The spatial feature representation based on all nodes yields the spatial features of the region to be predicted output by the graph attention network, including: Max pooling is performed on the spatial feature representations of all nodes to obtain the spatial feature representations after max pooling. Based on the spatial feature representation after the max pooling operation, the spatial features of the region to be predicted are obtained from the output of the graph attention network.
7. The multi-scale spatial disease prediction method according to claim 1, characterized in that, The disease prediction model was pre-trained using the following method: Construct a training dataset, wherein the training dataset includes multiple training data, the training data including macroscopic graph structure samples and microscopic graph structure samples of each region within the training sample region, and disease prediction result labels corresponding to the training sample region; A target loss function is constructed, comprising a trend prediction loss term, a propagation dynamic constraint loss term, and a human mobility loss term. The trend prediction loss term is used to construct the error between the predicted increase in the number of infected people based on the disease prediction model and the actual increase. The propagation dynamic constraint loss term is used to construct the error between the calculated increase in the number of infected people based on the disease transmission rate and recovery rate predicted by the disease prediction model and the actual increase. The human mobility loss term is used to constrain the relationship between the disease transmission rate and recovery rate and characteristics reflecting human movement. The disease prediction model is iteratively trained based on the target loss function and the training dataset to obtain a trained disease prediction model.
8. A multi-scale spatial disease prediction device, characterized in that, The device includes: The acquisition module is used to acquire the macroscopic and microscopic graph structures of each region within the region to be predicted. The macroscopic graph structure is used to represent the population flow relationship between regions, and the microscopic graph structure is used to represent the contact relationship between users within the region. The invocation module is used to invoke a pre-trained disease prediction model, wherein the disease prediction model includes at least a pooling module and a prediction module. The pooling module is used to obtain micro-feature vectors within the region corresponding to the micro-graph structure based on the micro-graph structure. The prediction module is used to obtain disease prediction results for the region to be predicted within a future preset time period based on the macro-graph structure and the micro-feature vectors within the region. The prediction module is used to input the macroscopic graph structure and the microscopic graph structure into a pre-trained disease prediction model to obtain the disease prediction results of the region to be predicted within a future preset time period output by the disease prediction model. The disease prediction results include at least the number of people infected with the disease, the disease transmission rate, and the disease recovery rate.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the multi-scale spatial disease prediction method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the multi-scale spatial disease prediction method as described in any one of claims 1 to 7.