A spatiotemporal data prediction method, system, device and medium for a task scenario

By extracting graph attention and inferring causal relationships between nodes in the data to be predicted in the task scenario, an adaptive graph structure is generated. The node with the smallest normalized attention value is selected to generate a causal graph structure, which solves the problem of poor spatiotemporal data prediction quality in the existing technology and achieves higher quality and wider range of spatiotemporal data prediction.

CN120180073BActive Publication Date: 2025-11-18SOUTH CHINA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510150980.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-11-18
Estimated Expiration
2045-02-11

AI Technical Summary

Technical Problem

Existing spatiotemporal data prediction techniques struggle to obtain the true prior graph structure, resulting in poor prediction quality. Furthermore, the authenticity of spatiotemporal features in the adaptive graph is not considered, leading to false associations that affect data quality.

Method used

By acquiring the data to be predicted in the task scenario, graph attention is extracted to generate a scene-adaptive graph structure, node causal inference and intervention are performed, the node with the smallest normalized attention value is selected, a causal graph structure is generated, and spatiotemporal data is extracted.

Benefits of technology

It reduces the difficulty of spatiotemporal data prediction, improves data quality, reduces the impact of misinformation, and expands the scope of application, especially in non-Euclidean space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120180073B_ABST
    Figure CN120180073B_ABST
Patent Text Reader

Abstract

The application discloses a kind of spatio-temporal data prediction method, system, equipment and medium of task scene, wherein the method obtains the predicted data of task scene;The graph attention extraction is carried out to the predicted data, and scene adaptive graph structure is obtained;The node causal inference is carried out to the scene adaptive graph structure, and first environmental node is obtained, and the first environmental node is in all graph nodes in the scene adaptive graph structure, the graph node with minimum normalized attention value;According to the first environmental node, node causal intervention is carried out to the scene adaptive graph structure, and causal graph structure is obtained;The spatio-temporal extraction is carried out to the causal graph structure, and the spatio-temporal data of the task scene is obtained.The method can reduce the difficulty of spatio-temporal data prediction, improve the data quality of spatio-temporal data prediction.The application relates to the field of data processing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, system, device and medium for spatiotemporal data prediction in a task scenario. Background Technology

[0002] Spatiotemporal data prediction refers to the prediction of changes in data in the future time and space dimensions based on historical observation data and known correlations, using data analysis and modeling techniques. It can be applied in many fields (such as meteorology, transportation planning, urban development, natural disaster management, etc.) and has attracted much attention.

[0003] Currently, existing spatiotemporal data prediction technologies are mainly based on graph neural networks (GNNs) or graph convolutional neural networks (GCNs). This approach requires obtaining a fixed, static prior graph structure and then using this fixed, static prior graph structure to perform spatiotemporal data prediction. This approach is quite difficult to use for spatiotemporal data prediction, and the quality of the predicted spatiotemporal data is unsatisfactory.

[0004] In addition, there are some spatiotemporal data prediction techniques that use adaptive graphs that can learn dynamic graph structures to predict spatiotemporal data. However, since this method does not consider the authenticity of the spatiotemporal features in the adaptive graph, the quality of the predicted spatiotemporal data is not satisfactory.

[0005] Therefore, the problems existing in the current technology still need to be solved and optimized. Summary of the Invention

[0006] The purpose of this invention is to at least partially solve one of the technical problems existing in the related art.

[0007] Therefore, one objective of this invention is to provide a method, system, device, and medium for predicting spatiotemporal data in a task scenario, wherein the method can reduce the difficulty of spatiotemporal data prediction and improve the data quality of spatiotemporal data prediction.

[0008] To achieve the above-mentioned technical objectives, the technical solutions adopted in the embodiments of this application include:

[0009] In a first aspect, embodiments of this application provide a method for spatiotemporal data prediction in a task scenario, including:

[0010] Obtain the data to be predicted for the task scenario;

[0011] Graph attention is extracted from the data to be predicted to obtain a scene-adaptive graph structure;

[0012] Perform node causal inference on the scene adaptive graph structure to obtain the first environment node, which is the graph node with the smallest normalized attention value among all graph nodes in the scene adaptive graph structure.

[0013] Based on the first environment node, node causal intervention is performed on the scene adaptive graph structure to obtain a causal graph structure;

[0014] Spatiotemporal extraction is performed on the causal graph structure to obtain the spatiotemporal data of the task scenario.

[0015] In addition, the method according to the above embodiments of this application may also have the following additional technical features:

[0016] Furthermore, in one embodiment of this application, the step of extracting graph attention from the data to be predicted to obtain a scene adaptive graph structure includes:

[0017] Based on the data to be predicted, obtain several original node feature representations;

[0018] A linear transformation is performed on all the original node feature representations to obtain several intermediate node feature representations;

[0019] Multi-head attention aggregation is performed on the feature representations of all intermediate nodes to obtain the scene adaptive graph structure.

[0020] Furthermore, in one embodiment of this application, the step of performing node causal inference on the scene adaptive graph structure to obtain the first environment node includes:

[0021] Obtain the total attention weight of each graph node in the scene adaptive graph structure. The total attention weight is the sum of the attention weights of the target node and all its neighboring nodes. The target node is any graph node in the scene adaptive graph structure.

[0022] Attention normalization is performed on all the total attention weights to obtain the normalized attention value corresponding to each total attention weight;

[0023] The minimum value is selected from all the normalized attention values ​​to obtain the target attention value;

[0024] Based on the target attention value, the graph nodes of the scene adaptive graph structure are filtered to obtain the first environment node.

[0025] Furthermore, in one embodiment of this application, obtaining the total attention weight of the target node includes:

[0026] Based on the scene adaptive graph structure, obtain several neighbor nodes of the target node, and the neighbor attention weight corresponding to each neighbor node;

[0027] Based on the node attention weight of the target node, the attention weights of all the neighbors are summed to obtain the total attention weight of the target node.

[0028] Furthermore, in one embodiment of this application, the step of performing node causal intervention on the scene adaptive graph structure based on the first environment node to obtain a causal graph structure includes:

[0029] Obtain the time step index of the first environment node;

[0030] Based on the time step index and the first environment node, the scene adaptive graph structure is updated with node causality to obtain the causal graph structure.

[0031] Further, in one embodiment of this application, the step of performing node causal update on the scene adaptive graph structure based on the time step index and the first environment node to obtain the causal graph structure includes:

[0032] Obtain the spatial neighbor nodes of the first environment node in the scene adaptive graph structure, and obtain the time history nodes of the first environment node according to the time step index;

[0033] Spatiotemporal sampling is performed on the spatially adjacent nodes and the temporally historical nodes to obtain spatiotemporally adjacent nodes;

[0034] Based on the time step index, the spatial neighbor nodes, the time history nodes, and the spatiotemporal neighbor nodes, the first environment node in the scene adaptive graph structure is updated to obtain the causal graph structure.

[0035] Further, in one embodiment of this application, the step of updating the first environment node in the scene adaptive graph structure according to the time step index, the spatial neighbor node, the time history node, and the spatiotemporal neighbor node to obtain the causal graph structure includes:

[0036] Obtain the observation step size index of the time history node and obtain the spatial node similarity, which is used to characterize the similarity between the spatial neighbor node and the first environment node;

[0037] Based on the observation step index, the time coefficient is calculated on the time step index to obtain the time decay coefficient;

[0038] Spatial coefficients are calculated based on the spatial node similarity to obtain spatial mixing coefficients;

[0039] Based on the time decay coefficient and the spatial mixing coefficient, the spatiotemporal adjacent nodes are updated to obtain the second environment node;

[0040] Based on the second environment node, the first environment node in the scene adaptive graph structure is replaced to obtain the causal graph structure.

[0041] Secondly, embodiments of this application provide a spatiotemporal data prediction system for a task scenario, comprising:

[0042] The first processing unit is used to acquire the data to be predicted for the task scenario;

[0043] The second processing unit is used to extract graph attention from the data to be predicted to obtain a scene adaptive graph structure.

[0044] The third processing unit is used to perform node causal inference on the scene adaptive graph structure to obtain a first environment node. The first environment node is the graph node with the smallest normalized attention value among all graph nodes in the scene adaptive graph structure.

[0045] The fourth processing unit is used to perform node causal intervention on the scene adaptive graph structure based on the first environment node to obtain a causal graph structure.

[0046] The fifth processing unit is used to perform spatiotemporal extraction on the causal graph structure to obtain the spatiotemporal data of the task scenario.

[0047] Thirdly, embodiments of this application also provide an electronic device, including:

[0048] At least one processor;

[0049] At least one memory for storing at least one program;

[0050] When the at least one program is executed by the at least one processor, the at least one processor performs the method described above.

[0051] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a processor-executable program, which, when executed by the processor, is used to implement the above-described method.

[0052] The advantages and beneficial effects of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application:

[0053] This application discloses a method, system, device, and medium for spatiotemporal data prediction in a task scenario. The method involves: acquiring data to be predicted for the task scenario; performing graph attention extraction on the data to be predicted to obtain a scene-adaptive graph structure; performing node causal inference on the scene-adaptive graph structure to obtain a first environment node, where the first environment node is the graph node with the smallest normalized attention value among all graph nodes in the scene-adaptive graph structure; performing node causal intervention on the scene-adaptive graph structure based on the first environment node to obtain a causal graph structure; and performing spatiotemporal extraction on the causal graph structure to obtain the spatiotemporal data of the task scenario. This method, by performing graph attention extraction on the data to be predicted for the task scenario, can obtain an adaptive graph structure corresponding to the task scenario, which helps reduce the difficulty of subsequent spatiotemporal data prediction and improves the data quality of spatiotemporal data prediction. Furthermore, this method also improves the data quality of subsequent spatiotemporal data prediction by performing node causal inference on the scene-adaptive graph, specifically by evaluating the authenticity of node associations in the adaptive graph structure using the environment node with the smallest normalized attention value. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following description is provided with accompanying drawings of the relevant technical solutions in the embodiments of this application or the prior art. It should be understood that the accompanying drawings described below are only for the purpose of clearly illustrating some embodiments of the technical solutions in this application. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0055] Figure 1 A flowchart illustrating a spatiotemporal data prediction method for a task scenario provided in an embodiment of this application;

[0056] Figure 2 A schematic diagram of the structural framework of a spatiotemporal data prediction system for a task scenario provided in an embodiment of this application;

[0057] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0058] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application. The step numbers in the following embodiments are set only for ease of explanation, and there is no limitation on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0060] Currently, existing spatiotemporal data prediction technologies are mainly based on graph neural networks (GNNs) or graph convolutional neural networks (GCNs). This approach requires obtaining a fixed, static prior graph structure and then using this fixed, static prior graph structure to perform spatiotemporal data prediction. However, due to factors such as data protection and privacy protection, real prior graph structures are often difficult to obtain, and fixed, static prior graph structures have certain limitations on the model's ability to learn dynamic evolution patterns across spatiotemporal dimensions. Therefore, it is quite difficult to perform spatiotemporal data prediction using this approach, and the quality of the predicted spatiotemporal data is unsatisfactory.

[0061] In addition, some spatiotemporal data prediction techniques utilize adaptive graphs capable of learning dynamic graph structures to achieve spatiotemporal data prediction. For example, they employ learnable regional graph structures and dynamic spatiotemporal graph networks to model spatial correlations; they improve the ability of graph convolutional neural networks with gated recurrent units to capture spatiotemporal heterogeneity by establishing a meta-node library; and they enhance the performance of spatiotemporal data prediction through self-supervised learning frameworks. While these methods can capture different temporal periodic features and dynamic spatial characteristics, they treat the adaptive graph as accurate and effective, neglecting the authenticity of the spatiotemporal features. Specifically, in practice, the graph structure obtained from the adaptive graph may reveal unrelated nodes with some connection in the actual space. In other words, a fully adaptive graph is prone to generating spurious spatial correlations, resulting in unsatisfactory data quality in subsequent spatiotemporal data predictions.

[0062] Furthermore, there are a very small number of spatiotemporal data prediction technologies that apply causal feature perception to spatiotemporal data prediction modeling. For example, they use visual Transformers to identify causal regions in images; or they use interpretable causal frameworks to identify and intervene in spurious attributes across environments. None of these spatiotemporal data prediction technologies consider spatiotemporal prediction scenarios in non-Euclidean spaces, and their applicability is relatively limited.

[0063] In view of this, embodiments of the present invention provide a method, system, device, and medium for spatiotemporal data prediction in a task scenario. This method extracts graph attention from the data to be predicted in the task scenario to obtain an adaptive graph structure corresponding to the task scenario. This eliminates the need for prior knowledge of the graph structure, reduces the difficulty of subsequent spatiotemporal data prediction, and improves the data quality of the predicted spatiotemporal data. Furthermore, the method performs node causal inference on the scene adaptive graph. Specifically, it evaluates the authenticity of node associations in the adaptive graph structure by using the environment node with the smallest normalized attention value. This helps determine the accuracy of implicit associations between nodes that contradict the true structure, thereby improving the data quality of subsequent spatiotemporal data prediction. Moreover, the method sequentially performs node causal inference and causal intervention on the scene adaptive graph structure. Specifically, by filtering the spatial information of the graph nodes in the scene adaptive graph structure, it can accurately eliminate false spatiotemporal associations introduced by the adaptive graph structure. This effectively avoids the accumulation of false information affecting the spatiotemporal evolution pattern of subsequent model analysis. It also fully considers spatiotemporal prediction scenarios in non-Euclidean spaces, thus effectively improving the applicability of spatiotemporal data prediction.

[0064] Reference Figure 1 In this embodiment of the application, a method for predicting spatiotemporal data in a task scenario includes:

[0065] Step 110: Obtain the data to be predicted for the task scenario;

[0066] In the embodiments of this application, the task scenario can be a practical application scenario in the fields of meteorology, transportation planning, urban development, and natural disaster management. For example, in the application scenario of wind and photovoltaic power generation in the field of meteorology, the data to be predicted can be the load data in the net load prediction task of wind and photovoltaic power generation, as well as the load-wind-solar data of spatial nodes and other data related to a specific geographical location. The data to be predicted can specifically include the wind power, photovoltaic power generation, wind speed, sunshine duration, solar radiation intensity, etc. of a specific node. Alternatively, in the application scenario of traffic flow prediction in the field of transportation planning, the data to be predicted can be data related to spatial nodes such as taxi trip records and bicycle tracks. The data to be predicted in other fields can be deduced by analogy, and will not be elaborated further in this application.

[0067] Step 120: Extract graph attention from the data to be predicted to obtain a scene adaptive graph structure;

[0068] In this embodiment of the application, a spatial domain-based graph attention network (GAT) can first be obtained, and the data to be predicted is input into the graph attention network. The graph attention network extracts graph attention from the data to be predicted, thereby obtaining the explicit scene adaptive graph structure output by the graph attention network.

[0069] In some embodiments, step 120, extracting graph attention from the data to be predicted to obtain a scene adaptive graph structure, includes:

[0070] A1. Based on the data to be predicted, obtain several original node feature representations;

[0071] A2. Perform a linear transformation on all the original node feature representations to obtain several intermediate node feature representations;

[0072] A3. Perform multi-head attention aggregation on the feature representations of all intermediate nodes to obtain the scene adaptive graph structure.

[0073] In this embodiment, the original node feature representation can first be obtained based on the attribute or feature information of the data to be predicted; then, a linear transformation is performed on each original node feature representation to project each original node feature representation into a low-dimensional space, thereby obtaining the intermediate node feature representation corresponding to each original node feature representation.

[0074] Understandably, for a given intermediate node feature representation, step A3 can be based on a multi-head attention mechanism to calculate the attention weights between the intermediate node feature representation and each of its neighboring intermediate node feature representations. Then, by aggregating the feature information of the intermediate node feature representation and its neighboring intermediate node feature representations using each acquired attention weight, the aggregated intermediate node feature representation is obtained. The remaining intermediate node feature representations can be derived similarly. After obtaining all aggregated intermediate node feature representations, the graph attention network can dynamically generate an explicit graph structure (i.e., a scene-adaptive graph structure) based on all aggregated intermediate node feature representations.

[0075] Step 130: Perform node causal inference on the scene adaptive graph structure to obtain the first environment node. The first environment node is the graph node with the smallest normalized attention value among all graph nodes in the scene adaptive graph structure.

[0076] In this embodiment, the first environment node with the smallest normalized attention value in the scene adaptive graph structure can be determined based on the attention weight of each graph node in the scene adaptive graph structure. This first environment node is used to characterize the spatial false associations of the scene adaptive graph structure.

[0077] In some embodiments, step 130, performing node causal inference on the scene adaptive graph structure to obtain a first environment node, includes:

[0078] B1. Obtain the total attention weight of each graph node in the scene adaptive graph structure. The total attention weight is the sum of the attention weights of the target node and all its neighboring nodes. The target node is any graph node in the scene adaptive graph structure.

[0079] Further, obtaining the total attention weight of the target node includes:

[0080] B11. Based on the scene adaptive graph structure, obtain several neighbor nodes of the target node, and the neighbor attention weight corresponding to each neighbor node;

[0081] B12. Based on the node attention weight of the target node, sum the attention weights of all the neighbors to obtain the total attention weight of the target node.

[0082] In this embodiment, step B1 can first obtain the attention weight matrix corresponding to all graph nodes of the scene adaptive graph structure. This attention weight matrix can be obtained in the multi-head attention aggregation stage of step A3 mentioned above. Then, for one of the graph nodes (i.e. the target node), the node attention weight corresponding to the target node in the attention weight matrix and the neighbor attention weight corresponding to each neighbor node of the target node in the attention weight matrix can be obtained. Next, the total attention weight of the target node is obtained by weighted summation of the node attention weight and all neighbor attention weights.

[0083] It is understandable that in the attention weight matrix corresponding to the scene adaptive graph structure, each matrix row has the following relationship, which can be represented as:

[0084]

[0085] in, Let be the attention weight relation for the i-th row of the attention weight matrix; N is the total number of columns in the attention weight matrix. This refers to the attention weight in the i-th row and j-th column of the attention weight matrix, which is also the attention weight of the i-th graph node to the j-th graph node in the scene adaptive graph structure.

[0086] It should be noted that, due to the above relationships between each row of the attention weight matrix, the rows of the attention weight matrix cannot distinguish the importance of each graph node in the scene adaptive graph structure. Therefore, in this embodiment, the total attention weight obtained by summing the attention weights of the target node and its neighboring nodes can effectively reflect the importance of the neighboring nodes to the target node. The total attention weight of the target node can be expressed as:

[0087]

[0088] in, is the total attention weight of the target node; N is the total number of rows in the attention weight matrix.

[0089] It is worth noting that the excellent performance of spatiotemporal prediction models is accompanied by a large number of complex calculations. The embodiments of this application use attention weights to describe the importance of target nodes, which can achieve node causal inference without introducing any additional variables. This helps to reduce the computational resources required for spatiotemporal prediction models to perform spatiotemporal data prediction and improve the efficiency of spatiotemporal data prediction.

[0090] B2. Normalize the total attention weights to obtain the normalized attention value corresponding to each total attention weight;

[0091] B3. Filter the minimum value of all the normalized attention values ​​to obtain the target attention value;

[0092] B4. Based on the target attention value, perform node filtering on the graph nodes of the scene adaptive graph structure to obtain the first environment node.

[0093] In this embodiment of the application, for a certain target node, step B2 may be to normalize the attention of the target node based on the corresponding total attention weight, thereby obtaining a normalized attention value corresponding to the target node. The normalized attention value can be expressed as:

[0094]

[0095] in, This is the normalized attention value for the target node.

[0096] It is understandable that after obtaining the normalized attention value of each graph node in the scene adaptive graph structure, step B3 may be to compare and filter all normalized attention values ​​and determine the smallest normalized attention value among all normalized attention values ​​as the target attention value; step B4 may be to determine the graph node in the scene adaptive graph structure that corresponds to the target attention value as the first environment node.

[0097] Step 140: Based on the first environment node, perform node causal intervention on the scene adaptive graph structure to obtain a causal graph structure;

[0098] In this embodiment of the application, causal intervention can be performed on the false associations of nodes in the scene adaptive graph structure based on the first environment node, thereby reducing the unstable impact of false associations of nodes on the scene adaptive graph structure and thus obtaining a causal graph structure.

[0099] In some embodiments, step 140, performing node causal intervention on the scene adaptive graph structure based on the first environment node to obtain a causal graph structure, includes:

[0100] C1. Obtain the time step index of the first environment node;

[0101] C2. Based on the time step index and the first environment node, perform node causal update on the scene adaptive graph structure to obtain the causal graph structure.

[0102] Further, step C2, updating the causal relationships of nodes in the scene adaptive graph structure based on the time step index and the first environment node to obtain the causal graph structure, includes:

[0103] C21. Obtain the spatial neighbor nodes of the first environment node in the scene adaptive graph structure, and obtain the time history nodes of the first environment node according to the time step index;

[0104] C22. Perform spatiotemporal sampling on the spatially adjacent nodes and the temporal history nodes to obtain spatiotemporally adjacent nodes;

[0105] In this embodiment, the time step index of the first environment node and its spatial neighbor nodes in the scene adaptive graph structure are first obtained. These spatial neighbor nodes are those that are directly or indirectly related to the first environment node in the topological structure of the scene adaptive graph, and may be connected to the first environment node through physical or logical edges. Furthermore, based on the time step index of the first environment node, the time history nodes of the first environment node before the time point indicated by the time step index are obtained. These time history nodes are used to indicate the state of the first environment node at past time points.

[0106] It is understandable that step C22 can be to use spatially neighboring nodes as node data in the spatial dimension and temporal historical nodes as node data in the temporal dimension, and then perform mixed sampling on spatially neighboring nodes and temporal historical nodes to obtain spatiotemporally adjacent nodes. These spatiotemporally adjacent nodes are used to represent nodes that have a real causal relationship with the first environment node. They include both the spatial information of spatially neighboring nodes and the dynamic changes of temporal historical nodes, which is beneficial to improving the ability of subsequent models to capture the spatiotemporal dependencies of data.

[0107] C23. Based on the time step index, the spatial neighbor node, the time history node, and the spatiotemporal neighbor node, update the first environment node in the scene adaptive graph structure to obtain the causal graph structure.

[0108] Further, step C23, updating the first environment node in the scene adaptive graph structure according to the time step index, the spatial neighbor node, the time history node, and the spatiotemporal neighbor node to obtain the causal graph structure, includes:

[0109] C231. Obtain the observation step size index of the time history node and obtain the spatial node similarity, wherein the spatial node similarity is used to characterize the similarity between the spatial neighbor node and the first environment node;

[0110] C232. Based on the observation step index, calculate the time coefficient of the time step index to obtain the time decay coefficient;

[0111] C233. Calculate the spatial coefficients of the spatial node similarity to obtain the spatial mixing coefficients;

[0112] C234. Based on the time decay coefficient and the spatial mixing coefficient, update the spatiotemporal adjacent nodes to obtain the second environment node;

[0113] C235. Based on the second environment node, replace the first environment node in the scene adaptive graph structure to obtain the cause-effect graph structure.

[0114] In this embodiment, step C231 may involve obtaining the observation step size index corresponding to the time history node, and the similarity between the first environment node and its spatial neighbors; then, by capturing the time dependency between the time history node and the first environment node on the historical time series using the observation step size index and the time step index, a time decay coefficient is obtained, which can be expressed as:

[0115]

[0116] in, This is the time decay coefficient; Indexed by time step; For observation step size index; The standard deviation is denoted as .

[0117] It is understandable that step C233 can be based on the spatial node similarity of several spatially neighboring nodes to calculate the spatial mixing coefficient, which can be expressed as:

[0118]

[0119] in, The spatial mixing coefficient; Let M be the spatial node similarity between the m-th spatial neighbor node and the first environment node; M is the maximum number of indices of spatial neighbor nodes.

[0120] It should be noted that after obtaining the time decay coefficient and spatial mixing coefficient, the spatiotemporally adjacent nodes can be updated based on the obtained time decay coefficient and spatial mixing coefficient to obtain the second environment node used to update the scene adaptive graph structure. This second environment node can be represented as:

[0121]

[0122] in, This is the second environment node; R is the maximum total time step length of the observation step index; These are spatiotemporally adjacent nodes.

[0123] It is worth mentioning that after obtaining the second environment node, the corresponding first environment node in the scene adaptive graph structure can be replaced based on the second environment node to obtain the replaced and updated scene adaptive graph structure, and the replaced and updated scene adaptive graph structure is determined as a causal graph structure.

[0124] Step 150: Perform spatiotemporal extraction on the causal graph structure to obtain the spatiotemporal data of the task scenario.

[0125] In this embodiment, spatial features can be extracted from graph nodes in the causal graph structure using a spatial encoder to obtain spatial prediction data corresponding to the data to be predicted in the task scenario; and temporal features can be extracted from graph nodes in the causal graph structure using a gated recurrent unit (GRU) in an RNN network to obtain temporal prediction data corresponding to the data to be predicted in the task scenario; then the spatial prediction data and temporal prediction data are integrated to obtain the spatiotemporal data of the task scenario.

[0126] The following describes in detail, with reference to the accompanying drawings, a spatiotemporal data prediction system for a task scenario proposed according to an embodiment of this application.

[0127] Reference Figure 2 The spatiotemporal data prediction system for a task scenario proposed in this application includes:

[0128] The first processing unit 101 is used to acquire the data to be predicted in the task scenario;

[0129] The second processing unit 102 is used to perform graph attention extraction on the data to be predicted to obtain a scene adaptive graph structure.

[0130] The third processing unit 103 is used to perform node causal inference on the scene adaptive graph structure to obtain a first environment node. The first environment node is the graph node with the smallest normalized attention value among all graph nodes in the scene adaptive graph structure.

[0131] The fourth processing unit 104 is used to perform node causal intervention on the scene adaptive graph structure based on the first environment node to obtain a causal graph structure.

[0132] The fifth processing unit 105 is used to perform spatiotemporal extraction on the causal graph structure to obtain the spatiotemporal data of the task scenario.

[0133] It is understood that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0134] Reference Figure 3 This application also provides an electronic device, including:

[0135] At least one processor 201;

[0136] At least one memory 202 is used to store at least one program;

[0137] When the at least one program is executed by the at least one processor 201, the at least one processor 201 implements the method embodiment described above.

[0138] Similarly, it can be understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0139] This application also provides a computer-readable storage medium storing a program executable by a processor 201, which, when executed by the processor 201, is used to implement the above-described method embodiments.

[0140] Similarly, the content of the above method embodiments is applicable to the present computer-readable storage medium embodiments. The specific functions implemented by the present computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0141] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this application are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0142] Furthermore, although this application is described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding this application. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional technology for an engineer. Therefore, those skilled in the art can implement the application set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of this application, which is determined by the full scope of the appended claims and their equivalents.

[0143] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, 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 in the embodiments of this application. 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.

[0144] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0145] More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0146] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0147] In the foregoing description of this specification, the references to terms such as "one embodiment," "another embodiment," or "some embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0148] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.

[0149] The above is a detailed description of the preferred embodiments of this application, but this application is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A method for predicting spatiotemporal data in a task scenario, characterized in that, include: Obtain the data to be predicted for the task scenario; when the task scenario is a wind and solar power generation application scenario, the data to be predicted is wind and solar load data; Graph attention is extracted from the data to be predicted to obtain a scene-adaptive graph structure; Perform node causal inference on the scene adaptive graph structure to obtain the first environment node, which is the graph node with the smallest normalized attention value among all graph nodes in the scene adaptive graph structure. Based on the first environment node, node causal intervention is performed on the scene adaptive graph structure to obtain a causal graph structure; Spatiotemporal extraction is performed on the causal graph structure to obtain the spatiotemporal data of the task scenario; The step of performing node causal intervention on the scene adaptive graph structure based on the first environment node to obtain a causal graph structure includes: Obtain the time step index of the first environment node; Obtain the spatial neighbor nodes of the first environment node in the scene adaptive graph structure, and obtain the time history nodes of the first environment node according to the time step index; Spatiotemporal sampling is performed on the spatially adjacent nodes and the temporally historical nodes to obtain spatiotemporally adjacent nodes; Obtain the observation step size index of the time history node and obtain the spatial node similarity, which is used to characterize the similarity between the spatial neighbor node and the first environment node; Based on the observation step index, the time coefficient is calculated on the time step index to obtain the time decay coefficient; Spatial coefficients are calculated based on the spatial node similarity to obtain spatial mixing coefficients; Based on the time decay coefficient and the spatial mixing coefficient, the spatiotemporal adjacent nodes are updated to obtain the second environment node; Based on the second environment node, the first environment node in the scene adaptive graph structure is replaced to obtain the causal graph structure.

2. The method according to claim 1, characterized in that, The step of extracting graph attention from the data to be predicted to obtain a scene adaptive graph structure includes: Based on the data to be predicted, obtain several original node feature representations; A linear transformation is performed on all the original node feature representations to obtain several intermediate node feature representations; Multi-head attention aggregation is performed on the feature representations of all intermediate nodes to obtain the scene adaptive graph structure.

3. The method according to claim 1, characterized in that, The step of performing node causal inference on the scene adaptive graph structure to obtain the first environment node includes: Obtain the total attention weight of each graph node in the scene adaptive graph structure. The total attention weight is the sum of the attention weights of the target node and all its neighboring nodes. The target node is any graph node in the scene adaptive graph structure. Attention normalization is performed on all the total attention weights to obtain the normalized attention value corresponding to each total attention weight; The minimum value is selected from all the normalized attention values ​​to obtain the target attention value; Based on the target attention value, the graph nodes of the scene adaptive graph structure are filtered to obtain the first environment node.

4. The method according to claim 3, characterized in that, Obtaining the total attention weight of the target node includes: Based on the scene adaptive graph structure, obtain several neighbor nodes of the target node, and the neighbor attention weight corresponding to each neighbor node; Based on the node attention weight of the target node, the attention weights of all the neighbors are summed to obtain the total attention weight of the target node.

5. A spatiotemporal data prediction system for a task scenario, characterized in that, include: The first processing unit is used to acquire the data to be predicted for the task scenario; When the task scenario is a wind and solar power generation application scenario, the data to be predicted is wind and solar power data; The second processing unit is used to extract graph attention from the data to be predicted to obtain a scene adaptive graph structure. The third processing unit is used to perform node causal inference on the scene adaptive graph structure to obtain a first environment node. The first environment node is the graph node with the smallest normalized attention value among all graph nodes in the scene adaptive graph structure. The fourth processing unit is used to perform node causal intervention on the scene adaptive graph structure based on the first environment node to obtain a causal graph structure. The fifth processing unit is used to perform spatiotemporal extraction on the cause-effect graph structure to obtain the spatiotemporal data of the task scenario; The step of performing node causal intervention on the scene adaptive graph structure based on the first environment node to obtain a causal graph structure includes: Obtain the time step index of the first environment node; Obtain the spatial neighbor nodes of the first environment node in the scene adaptive graph structure, and obtain the time history nodes of the first environment node according to the time step index; Spatiotemporal sampling is performed on the spatially adjacent nodes and the temporally historical nodes to obtain spatiotemporally adjacent nodes; Obtain the observation step size index of the time history node and obtain the spatial node similarity, which is used to characterize the similarity between the spatial neighbor node and the first environment node; Based on the observation step index, the time coefficient is calculated on the time step index to obtain the time decay coefficient; Spatial coefficients are calculated based on the spatial node similarity to obtain spatial mixing coefficients; Based on the time decay coefficient and the spatial mixing coefficient, the spatiotemporal adjacent nodes are updated to obtain the second environment node; Based on the second environment node, the first environment node in the scene adaptive graph structure is replaced to obtain the causal graph structure.

6. An electronic device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method as described in any one of claims 1-4.

7. A computer-readable storage medium storing a processor-executable program, characterized in that, The processor-executable program, when executed by the processor, is used to implement the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Dynamic graph neural network prediction method and product under space-time distribution migration

    CN115828987A

  • Time sequence causal discovery method and device based on intervention data, equipment and medium

    CN117648983A