Prediction method, device, computer equipment and storage medium for spatiotemporal data
By encoding and decoding spatiotemporal data through autoencoders, the problems of high training cost and loss of spatial features in spatiotemporal data prediction are solved, and more efficient and accurate spatiotemporal data prediction is achieved.
Patent Information
- Application Number
- CN202311177542.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-12
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2043-09-12
AI Technical Summary
Existing spatiotemporal data prediction methods require high time costs when training spatiotemporal graph convolutional networks, and graph coarsening processing leads to the loss of spatial features, making it difficult to accurately predict spatiotemporal data.
Large-scale spatiotemporal data is encoded through an autoencoder to generate a low-dimensional dense tensor, which is predicted using a coarsened encoding network. The original data structure is restored through decoding, maintaining spatial features and reducing training computational overhead.
It improves the prediction accuracy of spatiotemporal data, speeds up training, maintains the spatial characteristics of the original topological network, and improves the performance of the prediction model.
Smart Images

Figure CN117131293B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a method, device, computer equipment and storage medium for predicting spatiotemporal data. Background Art
[0002] Rapid urbanization creates a vast amount of data that needs to be processed, and this data is constantly changing across time and space. From a spatial perspective, the inherent interactions between different urban areas, such as pedestrian and vehicle flows, can have a significant impact on urban traffic forecasting. From a temporal perspective, some events in some urban areas exhibit cyclical or even seasonal fluctuations, such as the correlation between future traffic flow and past and current traffic flow.
[0003] Currently, spatiotemporal data prediction is often addressed using spatiotemporal graph convolutional networks (GCNNs). However, training GCNNs on large-scale spatiotemporal data requires a high training time. To reduce this training time, graph coarsening is often used to merge certain nodes into supernodes (i.e., coarsened nodes) to reduce the network size. However, graph coarsening simply flattens spatiotemporal feature data, which can lead to a loss of spatial features and make it difficult to accurately predict spatiotemporal data. Summary of the Invention
[0004] In view of this, the present invention provides a method, apparatus, computer device and storage medium for predicting spatiotemporal data to solve the problem of difficulty in accurately predicting spatiotemporal data.
[0005] In a first aspect, the present invention provides a method for predicting spatiotemporal data, comprising: obtaining an original topological network of spatiotemporal data, the original topological network including multiple original nodes; coarsening the original topological network based on the spatiotemporal feature data of each original node to generate a coarsened topological network, the coarsened topological network including multiple coarsened nodes, each coarsened node being obtained by fusion of at least one original node; encoding the spatiotemporal feature data fused by the coarsening nodes to generate a coarsened coding network; inputting the coarsened coding network into a preset spatiotemporal prediction model, and outputting the spatiotemporal prediction network through the preset spatiotemporal prediction model, wherein the preset spatiotemporal prediction model is obtained by training based on coarsened coding network samples and spatiotemporal prediction network samples; decoding the spatiotemporal prediction data corresponding to the spatiotemporal prediction network to generate a target prediction network for predicting spatiotemporal data.
[0006] The prediction method for spatiotemporal data provided by an embodiment of the present invention, when coarsening the original topological network, encodes the spatiotemporal feature data fused by the coarsening nodes to generate a coarsening coding network, thereby being able to embed high-dimensional sparse data into the form of a low-dimensional dense tensor to represent the spatiotemporal data features after coarsening. The spatial relationship between different nodes in the original topological network is fully learned in the form of self-encoding, so that the spatial features are not lost, further reducing the training computational overhead of large-scale spatiotemporal data on the spatiotemporal prediction model. Subsequently, the preset spatiotemporal prediction model obtained by training outputs a spatiotemporal prediction network corresponding to the coarsening coding network, and the spatiotemporal prediction network is decoded to restore the low-dimensional dense tensor to the data structure of the original topological network, thereby obtaining the prediction results of the spatiotemporal data, thereby utilizing the spatial features of the original topological network to a certain extent and improving the prediction accuracy of the spatiotemporal data.
[0007] In an optional embodiment, the original topology network is coarsened based on the spatiotemporal feature data of each original node to generate a coarsened topology network, including: obtaining at least one neighbor node corresponding to each original node; determining the feature similarity between each original node and its neighbor nodes based on the spatiotemporal feature data; determining a fusion node set based on the feature similarity, the fusion node set being a node set consisting of the original node and the adjacent nodes; and coarsening the original topology network according to the fusion node set to generate a coarsened topology network.
[0008] The spatiotemporal data prediction method provided by an embodiment of the present invention utilizes the feature similarity between spatiotemporal feature data to determine the fusion of the original node and its neighboring nodes, generates a fusion node set consisting of multiple coarsened nodes, and coarsens the original topological network based on the fusion node set to compress large-scale spatiotemporal data into a coarsened topological network consisting of coarsened nodes, so that the coarsened topological network can maintain the original features of the original topological network and improve the accuracy of spatiotemporal data prediction.
[0009] In an optional embodiment, based on the spatiotemporal feature data, the feature similarity between each original node and its neighbor nodes is determined, including: based on the spatiotemporal feature data corresponding to each original node and its neighbor nodes, determining the degree corresponding to each original node and its neighbor nodes, and the edge vector between each original node and the neighbor node; based on the degree and the edge vector, determining the spectral distance between each original node and its neighbor nodes; and determining the spectral distance as the feature similarity.
[0010] The spatiotemporal data prediction method provided by the embodiment of the present invention combines the spatiotemporal data of each original node and its neighboring nodes to determine the spectral distance between each original node and its neighboring nodes. The feature similarity between nodes determined by the spectral distance facilitates accurate node coarsening.
[0011] In an optional embodiment, determining a fusion node set based on feature similarity includes: sorting the feature similarities corresponding to each original node, determining the maximum feature similarity corresponding to each original node and the target neighbor node corresponding to the maximum feature similarity; and merging each original node and its corresponding target neighbor node into a fusion node set.
[0012] The spatiotemporal data prediction method provided by the embodiment of the present invention determines the target neighbor node that can be fused with the original node by comparing feature similarities, thereby ensuring the node fusion accuracy to the greatest extent.
[0013] In an optional embodiment, the spatiotemporal feature data fused by the coarsening nodes are encoded to generate a coarsening coding network, including: obtaining the original node fusion order corresponding to the coarsening nodes; encoding the spatiotemporal feature data fused by the coarsening nodes according to the original node fusion order to generate an embedded feature tensor; and constructing a coarsening coding network based on the embedded feature tensor.
[0014] The prediction method for spatiotemporal data provided by an embodiment of the present invention, since the coarsening nodes are obtained by fusion of multiple original nodes, the spatiotemporal feature data fused by the coarsening nodes are encoded using the fusion order of the original nodes to construct a coarsening coding network, thereby realizing the encoding of large-scale spatiotemporal data into smaller networks and maintaining the original characteristics of the original topological network.
[0015] In an optional embodiment, a preset spatiotemporal prediction model is trained based on coarsening coding network samples and spatiotemporal prediction network samples, including: obtaining a preset time series length of spatiotemporal data and the number of coarsening nodes contained in the coarsening coding network samples; constructing a feature matrix corresponding to the spatiotemporal prediction network samples based on the preset time series length and the number of coarsening nodes; performing fitting training on the coarsening coding network samples and the feature matrix to obtain a mapping function between the coarsening coding network samples and the feature matrix; and determining the mapping function as the preset spatiotemporal prediction model.
[0016] The method for predicting spatiotemporal data provided by an embodiment of the present invention determines a preset spatiotemporal prediction model by pre-training a mapping function between coarsening coding network samples and a feature matrix. Coarsening coding network samples are used for model training here, which promotes the prediction of large-scale spatiotemporal data and accelerates the training speed of the spatiotemporal prediction model.
[0017] In an optional embodiment, the spatiotemporal prediction data corresponding to the spatiotemporal prediction network is decoded, and a target prediction network is generated to predict the spatiotemporal data, including: decoding the spatiotemporal prediction data corresponding to each node in the spatiotemporal prediction network to restore the original data structure of the spatiotemporal prediction data; generating a target prediction network based on the original data structure; and predicting the spatiotemporal data through the target prediction network to obtain a spatiotemporal data prediction result.
[0018] In the spatiotemporal data prediction method provided by an embodiment of the present invention, each node in the spatiotemporal prediction network corresponds to each coarsening node, and the spatiotemporal data fused by each node is decoded to restore the original data structure, thereby achieving effective prediction of the spatiotemporal data.
[0019] In a second aspect, the present invention provides a prediction device for spatiotemporal data, comprising: an acquisition module for acquiring an original topological network of spatiotemporal data, the original topological network including multiple original nodes; a coarsening processing module for coarsening the original topological network based on the spatiotemporal feature data of each original node to generate a coarsened topological network, the coarsened topological network including multiple coarsened nodes, each coarsened node being obtained by fusion of at least one original node; an encoding module for encoding the spatiotemporal feature data fused by the coarsening nodes to generate a coarsened coding network; a prediction module for inputting the coarsened coding network into a preset spatiotemporal prediction model, and outputting the spatiotemporal prediction network through the preset spatiotemporal prediction model, wherein the preset spatiotemporal prediction model is obtained by training based on the coarsening coding network samples and the spatiotemporal prediction network samples; a decoding module for decoding the spatiotemporal prediction data corresponding to the spatiotemporal prediction network to generate a target prediction network for prediction of spatiotemporal data.
[0020] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute the method for predicting spatiotemporal data of the first aspect or any corresponding embodiment thereof.
[0021] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for predicting spatiotemporal data of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0023] Figure 1 is a schematic flow chart of a method for predicting spatiotemporal data according to an embodiment of the present invention;
[0024] Figure 2 is a schematic structural diagram of an autoencoder according to an embodiment of the present invention;
[0025] Figure 3 is a flow chart of another method for predicting spatiotemporal data according to an embodiment of the present invention;
[0026] Figure 4 2 is a schematic diagram of constructing a large-scale parking spatiotemporal data prediction model according to an embodiment of the present invention;
[0027] Figure 5 is a schematic diagram of the distribution of parking lots according to an embodiment of the present invention;
[0028] Figure 6 3 is a schematic diagram comparing the training overhead and root mean square error (RMSE) of using TGCN at different coarsening rates according to an embodiment of the present invention;
[0029] Figure 7 3 is a schematic diagram comparing the root mean square error (RMSE) and training overhead of the method according to an embodiment of the present invention and various baseline methods;
[0030] Figure 8 is a structural block diagram of a device for predicting spatiotemporal data according to an embodiment of the present invention;
[0031] Figure 9 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0033] Existing methods for predicting spatiotemporal data are addressed using spatiotemporal graph convolutional networks (STGCNs), but their main drawback is the prohibitive time cost of model training. Current approaches to reducing large-scale spatiotemporal data include graph sparsification and graph coarsening. The former primarily reduces the number of edges in large-scale graph networks, but this lacks flexibility due to the sampling requirements. The latter, on the other hand, merges certain nodes into supernodes to reduce network size. However, the data features obtained by coarsening are merely a flattening of the original data, without reducing the feature dimension. Furthermore, this flattening process can lead to the loss of spatial features.
[0034] Based on this, the technical solution of the present invention uses an autoencoder (AE) to encode the coarsened large-scale spatiotemporal data to obtain a low-dimensional dense tensor for more efficient prediction. Finally, the autoencoder (AE) restores each set of predicted tensor data to the original data structure of the spatiotemporal data, avoiding the loss of spatial features and improving the prediction accuracy of spatiotemporal data. Furthermore, the autoencoder (AE) can perform parallel encoding and decoding, greatly accelerating the training progress of the data prediction model and effectively improving training performance.
[0035] According to an embodiment of the present invention, an embodiment of a method for predicting spatiotemporal data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] In this embodiment, a method for predicting spatiotemporal data is provided, which can be used in computer devices such as computers, servers, etc. Figure 1 is a flow chart of a method for predicting spatiotemporal data according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0037] Step S101: obtaining an original topological network of spatiotemporal data, where the original topological network includes a plurality of original nodes.
[0038] The original topological network is constructed for large-scale spatiotemporal data and is used to define the distribution characteristics of spatiotemporal data. Original nodes are the nodes that make up the original topological network and are derived by abstracting large-scale spatiotemporal data. Specifically, connections are constructed between adjacent original nodes to generate edges between them. Based on these edges, the original topological network of the spatiotemporal data is generated.
[0039] Specifically, the original topological network can be constructed based on the currently collected spatiotemporal data, or can be input into the computer device from an external storage device (such as a USB flash drive, a mobile hard disk, etc.). The method for obtaining the original topological network is not limited here.
[0040] Taking large-scale parking spatiotemporal data as an example, in the process of constructing the original topological network of large-scale parking spatiotemporal data, each parking lot is regarded as a node in the large-scale spatiotemporal data, that is, each original node in the original topological network. The edges between the original nodes represent the paths connecting the parking lots. The corresponding original topological network can be generated by combining the various paths.
[0041] Step S102 : Based on the spatiotemporal feature data of each original node, the original topology network is coarsened to generate a coarsened topology network.
[0042] The coarsened topological network includes multiple coarsened nodes, and each coarsened node is obtained by fusion of at least one original node.
[0043] Each original node has corresponding spatiotemporal feature data. Based on the feature similarity of the spatiotemporal feature data, the spatiotemporal feature data of one or more original nodes are fused to generate a supernode, which is a coarsened node that integrates the spatiotemporal feature data of multiple original nodes. Thus, the original nodes in the original topological network can be fused into multiple coarsened nodes. The original topological network is then processed according to the fused coarsened nodes, achieving coarsening of the original topological network and obtaining a coarsened topological network.
[0044] Taking the above-mentioned large-scale parking spatiotemporal data as an example, each original node has corresponding characteristic attributes, such as parking lot capacity, parking space occupancy rate, location information, etc. These characteristic attributes are the spatiotemporal characteristic data of the original node, which can be represented by feature vectors.
[0045] Step S103: Encode the spatiotemporal feature data fused by the coarsening nodes to generate a coarsening coding network.
[0046] An autoencoder (AE) is deployed in the computer device. The autoencoder AE can be trained based on the spatiotemporal data fused by each coarsening node. This process can be performed in parallel on multiple distributed computers, which improves the training speed of the autoencoder AE. Then, the computer device can use the autoencoder AE to encode the spatiotemporal feature data. Specifically, the autoencoder AE has an encoding unit and a decoding unit, such as Figure 2 As shown in the figure, the autoencoder AE uses a symmetrical five-layer dense neural network. The two layers on the left serve as encoding units, the two layers on the right serve as decoding units, and the middle layer with the smallest number of neurons can serve as the output of the encoding unit and the input of the decoding unit.
[0047] The coarsening nodes are sequentially integrated with the original nodes, meaning that the original nodes are integrated sequentially based on the similarity of the spatiotemporal feature data. By connecting the coarsening nodes in the order in which they integrate the spatiotemporal feature data, a one-dimensional tensor is formed. This one-dimensional tensor is used as the input to the autoencoder (AE), which encodes the spatiotemporal feature data integrated by the coarsening nodes to generate an embedded feature tensor. The coarsening encoding network is then generated from the embedded feature tensors corresponding to each coarsening node.
[0048] Step S104: input the coarsened coding network into a preset spatiotemporal prediction model, and output a spatiotemporal prediction network through the preset spatiotemporal prediction model.
[0049] The preset spatiotemporal prediction model is trained based on coarsened coding network samples and spatiotemporal prediction network samples. This preset spatiotemporal prediction model is a spatio-temporal graph convolutional neural network (STGCN) model. A detailed description of the training method for the preset spatiotemporal prediction model is provided below and is not detailed here.
[0050] The trained preset spatiotemporal prediction model is deployed to a computer device. After obtaining the coarsened coding network, the computer device can input the coarsened coding network into the pre-trained preset spatiotemporal prediction model, and output the spatiotemporal prediction network corresponding to the coarsened coding network through the preset spatiotemporal prediction model.
[0051] Step S105: Decode the spatiotemporal prediction data corresponding to the spatiotemporal prediction network to generate a target prediction network for predicting the spatiotemporal data.
[0052] As described above, the autoencoder AE has an encoding unit and a decoding unit. When the spatiotemporal prediction network is obtained, the spatiotemporal prediction data of each node in the spatiotemporal prediction network is extracted and input into the decoding unit of the autoencoder AE. The decoding unit restores the spatiotemporal prediction data of each node to the data structure of the original topological network to generate the corresponding target prediction network. The target prediction network predicts the spatiotemporal data, completes the prediction for the spatiotemporal data, and outputs the corresponding spatiotemporal data prediction results.
[0053] The prediction method for spatiotemporal data provided in this embodiment, when coarsening the original topological network, encodes the spatiotemporal feature data fused by the coarsening nodes to generate a coarsening coding network, thereby being able to embed high-dimensional sparse data into the form of a low-dimensional dense tensor to represent the spatiotemporal data features after coarsening. Through the form of self-encoding, the spatial relationship between different nodes in the original topological network is fully learned, so that the spatial features are not lost, further reducing the training computational overhead of large-scale spatiotemporal data on the spatiotemporal prediction model. Subsequently, the preset spatiotemporal prediction model obtained by training outputs a spatiotemporal prediction network corresponding to the coarsening coding network, and the spatiotemporal prediction network is decoded to restore the low-dimensional dense tensor to the data structure of the original topological network, and obtain the prediction results of the spatiotemporal data, thereby utilizing the spatial features of the original topological network to a certain extent and improving the prediction accuracy of the spatiotemporal data.
[0054] In this embodiment, a method for predicting spatiotemporal data is provided, which can be used in computer devices such as computers, servers, etc. Figure 3 is a flow chart of a method for predicting spatiotemporal data according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0055] Step S201: Obtain an original topological network of spatiotemporal data, wherein the original topological network includes a plurality of original nodes. Detailed descriptions refer to the corresponding descriptions of the above embodiments, which will not be repeated here.
[0056] Step S202 : Based on the spatiotemporal feature data of each original node, the original topology network is coarsened to generate a coarsened topology network.
[0057] The coarsened topological network includes multiple coarsened nodes, and each coarsened node is obtained by fusion of at least one original node.
[0058] Specifically, the above step S202 may include:
[0059] Step S2021: Obtain at least one neighbor node corresponding to each original node.
[0060] The original topology network contains multiple original nodes, and neighbor nodes are nodes adjacent to the original nodes. Each original node corresponds to one or more neighbor nodes. Figure 4 As shown, a topological network G = (V, E) is defined, where V is the set of original nodes, E is the set of edges between original nodes in the original topological network, and W represents the adjacency matrix of G.
[0061] Step S2022: Determine the feature similarity between each original node and its neighboring nodes based on the spatiotemporal feature data.
[0062] Feature similarity is used to characterize the similarity of the spatiotemporal feature data of an original node and its neighboring nodes. This feature similarity is used to determine the multiple original nodes that can be fused together. Specifically, this feature similarity can be calculated by calculating the feature distance between the original node and its neighboring nodes, and the feature distance is used to characterize the feature similarity between the original node and its neighboring nodes.
[0063] In some optional implementations, the above step S2022 may include:
[0064] Step a1: Based on the spatiotemporal feature data corresponding to each original node and its neighboring nodes, determine the degree corresponding to each original node and its neighboring nodes, as well as the edge vector between each original node and its neighboring nodes.
[0065] In step a2, the spectral distance between each original node and its neighbor nodes is determined based on the degree and edge vector.
[0066] Step a3: determining the spectral distance as the feature similarity.
[0067] If the original node to be fused and its neighboring nodes obtained from the original topological network are v(i) and v(j), respectively, then the degrees and edge vectors corresponding to v(i) and v(j) can be determined by combining the spatiotemporal feature data. The edge vector represents the weight vector of the original node. The spectral distance is determined based on the degree and edge vector, and the calculated spectral distance is determined as the feature similarity. The specific method for calculating the spectral distance is as follows:
[0068]
[0069] Among them, d s (i, j) represents the spectral distance; d(i) represents the degree of the original node v(i), and d(j) represents the degree of the neighboring node v(j); w(i) represents the weight vector of the original node v(i), that is, the vector composed of the edges between the original node v(i) and other nodes; w(j) represents the weight vector of the neighboring node v(j), that is, the vector composed of the edges between the neighboring node v(j) and other nodes.
[0070] In the above embodiment, the spectral distance between each original node and its neighboring nodes is determined by combining the spatiotemporal data of each original node and its neighboring nodes. The feature similarity between nodes determined by the spectral distance is used to accurately perform node coarsening processing.
[0071] Step S2023: Determine a fusion node set based on feature similarity.
[0072] The fused node set is a node set consisting of the original node and adjacent nodes.
[0073] The calculated feature similarities corresponding to the original node are compared with the preset similarity to determine whether the original node and its neighboring nodes can be fused. If it is determined that the original node can be fused with its neighboring nodes, the index relationship between the original node and its neighboring nodes is recorded and stored in the fused node set. The preset similarity is a pre-set spatiotemporal data similarity, such as 95%, 96%, 98%, etc.
[0074] In some optional implementations, the above step S2023 may include:
[0075] Step b1: sort the feature similarities corresponding to each original node, and determine the maximum feature similarity corresponding to each original node and the target neighbor node corresponding to the maximum feature similarity.
[0076] Step b2: determining a fusion node set based on each original node and its corresponding target neighbor node.
[0077] When it is determined that the current original node has multiple neighboring nodes that meet the fusion conditions (i.e., feature similarity exceeds a preset similarity), the multiple feature similarities corresponding to the current original node can be sorted, and the maximum feature similarity and the neighbor node corresponding to the maximum feature similarity can be determined. This neighbor node is then determined as the target neighbor node to be fused with the current original node. Subsequently, the original node and its corresponding target neighbor node are stored in the fusion node set.
[0078] In the above embodiment, the target neighbor node that can be fused with the original node is determined by comparing feature similarities, thereby ensuring the accuracy of node fusion to the greatest extent.
[0079] Step S2024: coarsening the original topology network according to the fused node set to generate a coarsened topology network.
[0080] Combined with the index relationship between the original nodes and their neighbor nodes stored in the fusion node set, each original node and one or more neighbor nodes of its index are fused into a super node (i.e., a coarsened node), and the original topological network is coarsened, thereby reducing the nodes of the topological network and the dimension of the spatiotemporal data, and generating a coarsened topological network corresponding to the original topological network.
[0081] As a specific example, in this embodiment, a multilevel graph coarsening algorithm (MGC) can be used to coarsen the original topology network. Taking the matrix G representing the original topology network as input, the dimension n to be coarsened is first given, and a set S is randomly initialized, and the set S contains all the original nodes in the original topology network.
[0082] For each original node v in the set S i Iterate and continuously merge its neighbor nodes v j , and calculate the spectral distance between the node pairs. Use the MGC algorithm to search for the most similar node pairs in set S and merge them into coarsened nodes. In order to reduce the computational cost, the candidate nodes corresponding to each original node are limited to a distance of 2 hops. The loop ends when the number of nodes in set S is equal to the coarsened dimension n, and finally returns the coarse graph adjacency matrix G. c And the corresponding index matrix. The specific implementation is shown in the following table:
[0083]
[0084] Step S203: Encode the spatiotemporal feature data fused by the coarsening nodes to generate a coarsening coding network.
[0085] Specifically, the above step S203 may include:
[0086] Step S2031, obtaining the fusion order of the original nodes corresponding to the coarsened nodes.
[0087] The original node fusion order represents the order in which multiple original nodes are fused into a coarsening node. The corresponding original node fusion order can be obtained by combining the process of fusion of each original node into a coarsening node. For example, the current coarsening node is obtained by fusing three original nodes A, B, and C. A and B are merged to obtain coarsening node A1, and then A1 is merged with C to obtain a new coarsening node A2. Coarsening node A2 is the coarsening node obtained by the coarsening process. Therefore, the original node fusion order corresponding to coarsening node A2 is A, B, C.
[0088] Step S2032: Encode the spatiotemporal feature data fused by the coarsening nodes according to the original node fusion order to generate an embedded feature tensor.
[0089] The spatiotemporal feature data corresponding to each original node is input into the autoencoder AE in sequence according to the original node fusion order for encoding processing, generating an embedded feature tensor obtained by concatenating the spatiotemporal feature data. Specifically, the encoding method of the autoencoder AE is as follows:
[0090] ξ=f(Qx+p)
[0091] Where ξ is the embedded feature tensor output after encoding the input spatiotemporal feature data x, Q, p, and f represent the weight, bias, and activation function of the encoding unit of the autoencoder AE, respectively. The activation function can be a sigmoid function.
[0092] Step S2033: construct a coarse coding network based on the embedded feature tensor.
[0093] The coarsened topology network is converted into a coarsened coding network by combining the embedded feature tensors corresponding to each coarsened node, thus realizing coding processing for the coarsened topology network.
[0094] Step S204: input the coarsened coding network into a preset spatiotemporal prediction model, and output a spatiotemporal prediction network through the preset spatiotemporal prediction model.
[0095] Among them, the preset spatiotemporal prediction model is obtained by training based on coarsened coding network samples and spatiotemporal prediction network samples.
[0096] Specifically, the steps of training the preset spatiotemporal prediction model based on the coarse coding network samples and the spatiotemporal prediction network samples include:
[0097] Step c1: obtaining a preset time series length of the spatiotemporal data and the number of coarsened nodes included in the coarsened coding network sample.
[0098] Step c2: construct a feature matrix corresponding to the spatiotemporal prediction network sample based on the preset time series length and the number of coarsened nodes.
[0099] Step c3: performing fitting training on the coarse coding network sample and the feature matrix to obtain a mapping function between the coarse coding network sample and the feature matrix.
[0100] Step c4: determining the mapping function as a preset spatiotemporal prediction model.
[0101] The encoding result output by the autoencoder AE is used as the coarse coding network sample, and combined with the time data of the coarse coding network sample, its feature matrix is determined to be X c N×n , where n represents the length of the historical time series of spatiotemporal data, and N represents the number of coarsening nodes in the coarsening coding network. The coarsening coding network samples are trained with the feature matrix to determine a mapping function F between the two. This mapping function F is then used as the preset spatiotemporal prediction model. The coarsening coding network is then input into the trained preset spatiotemporal prediction model. The preset spatiotemporal prediction model is then used to output a spatiotemporal prediction network corresponding to the coarsening coding network.
[0102] Taking large-scale parking spatiotemporal data as an example, X ct ∈R N×i It is used to represent the occupancy rate of each parking lot at time i. For the parking prediction problem, it can be regarded as a coarse coding network G using parking spatiotemporal data. c and the feature matrix X cLearn the mapping function F and then calculate the parking occupancy rate within the next time T. The mapping function F is expressed as follows:
[0103]
[0104] T is the length of the time series to be predicted. Here, T can be pre-set to 1, 2, 3, and 4, representing the occupancy rate of each parking lot in the next 15 minutes, 30 minutes, 45 minutes, and 60 minutes, respectively.
[0105] In order to capture the spatial and temporal dependencies of parking data, this paper adopts a spatiotemporal graph convolutional network neural network model based on graph convolutional networks and gated recurrent units, whose structure is as follows: Figure 4 shown.
[0106] During the training process, in order to ensure the effectiveness of training, the loss function is constructed as follows:
[0107]
[0108] Among them, x i and They represent the actual occupancy rate and predicted occupancy rate of the parking lot, L reg is the L2 regularization term, which helps to avoid overfitting problems, and λ is a hyperparameter.
[0109] In the above embodiment, the mapping function between the coarse coding network samples and the feature matrix is pre-trained to determine the preset spatiotemporal prediction model. The coarse coding network samples are used for model training here, which promotes the prediction of large-scale spatiotemporal data and accelerates the training speed of the spatiotemporal prediction model.
[0110] Step S205 , decoding the spatiotemporal prediction data corresponding to the spatiotemporal prediction network, and generating a target prediction network to predict the spatiotemporal data.
[0111] Specifically, the above step S205 may include:
[0112] Step S2051 : decoding the spatiotemporal prediction data corresponding to each node in the spatiotemporal prediction network to restore the original data structure of the spatiotemporal prediction data.
[0113] After the spatiotemporal prediction network is output by the spatiotemporal prediction model, the spatiotemporal prediction data of each node in the spatiotemporal prediction network is input in parallel to the decoding unit of the autoencoder AE. The decoding unit performs parallel decoding processing on the spatiotemporal prediction data corresponding to each node to restore the spatiotemporal data of each node to the original data structure. Specifically, the decoding method is as follows:
[0114] x′=g(Q′ξ+p′)
[0115] Where x′ is the spatiotemporal feature data output by the decoding unit after the input ξ, Q′, p′, and g represent the weight, bias, and activation function of the decoding unit of the autoencoder AE, respectively. The activation function can be an identity function.
[0116] In the process of restoring the original data structure, an objective function is constructed to minimize the difference between the input data and the output data by reconstructing the representation. Specifically, the expression of the objective function is as follows:
[0117]
[0118] Step S2052: Generate a target prediction network based on the original data structure.
[0119] The network topology is restored according to the original data structure of each node, and then the corresponding target prediction network is constructed according to the restored network topology.
[0120] Step S2053: predict the spatiotemporal data through the target prediction network to obtain the spatiotemporal data prediction result.
[0121] After obtaining the target prediction network, the computer device predicts the subsequent spatiotemporal data according to the target prediction network and outputs the corresponding spatiotemporal data prediction results.
[0122] The prediction method for spatiotemporal data provided in this embodiment uses the feature similarity between spatiotemporal feature data to determine the fusion of the original node and its neighboring nodes, generates a fusion node set consisting of multiple coarsening nodes, and coarsens the original topological network based on the fusion node set to compress large-scale spatiotemporal data into a coarsening topological network consisting of coarsening nodes, so that the coarsening topological network can maintain the original characteristics of the original topological network and improve the accuracy of spatiotemporal data prediction. Since the coarsening nodes are obtained by fusion of multiple original nodes, the spatiotemporal feature data fused by the coarsening nodes is encoded using the fusion order of the original nodes to construct a coarsening coding network, which realizes the encoding of large-scale spatiotemporal data into a smaller network and can maintain the original characteristics of the original topological network. Each node in the spatiotemporal prediction network corresponds to each coarsening node. By decoding the spatiotemporal data fused by each node to restore the original data structure, effective prediction of spatiotemporal data is achieved.
[0123] As a specific application example of the present invention, the above-mentioned spatiotemporal data prediction method is described here in conjunction with a specific application scenario. The specific implementation is as follows:
[0124] 1) Constructing a parking spatiotemporal dataset: Taking the large-scale urban parking spatiotemporal data prediction as an example, we conduct experiments on a large parking dataset in a certain area. This dataset records the spatiotemporal parking data of P parking lots in a certain area within one month. The distribution of the above parking lots is as follows: Figure 5 shown.
[0125] 2) Set the evaluation index: Apply the root mean square error RMSE index widely used in regression tasks to measure the actual occupancy rate x i and predicted occupancy The root mean square error RMSE is defined as follows:
[0126] Root mean square error
[0127] in, and represents the actual occupancy rate and predicted occupancy rate of parking lot i at the jth time sample in the area. M is the number of time samples; N is the number of parking lots. Specifically, the root mean square error (RMSE) is used to measure the prediction error: smaller values indicate better predictions.
[0128] 3) Baseline method: The coarsening method is compared with the traditional community partitioning algorithm, the grid partitioning method, and the graph partitioning-based diffusion convolutional recurrent neural network method with and without super node autoencoders AE. Various spatiotemporal graph convolutional neural network models are used for comparison experiments: dynamic spatiotemporal graph convolution DSTGCN model, Bayesian spatiotemporal graph convolution BSTGCN network and temporal graph convolution T-GCN model
[0129] 4) Comparison of coarsening performance. Figure 6 In (a), we can see that the training cost of the temporal graph convolutional TGCN model increases exponentially with the change of the coarsening rate. When the coarsening rate is between 0.2-0.6, the number of training iterations slowly increases from about 500. When the coarsening rate is 0.7, the number of training iterations reaches around 750, and the growth rate reaches an inflection point, after which the model convergence time becomes unacceptable. At the same time, Figure 6 (b) shows the effect of the coarsening rate on the performance of the prediction model for the next 15 minutes, by Figure 6 (b) It can be found that when the coarsening rate is between 0.6 and 0.7, the lowest RMSE values are 2.42 and 2.14 (the number of super nodes is 246 and 287, respectively).
[0130] The above experiments demonstrate that graph coarsening not only helps reduce data complexity and training overhead, but also points out that the coarsening ratio plays a significant role in performance. The best-performing coarsening ratio in the experiment actually aligns with common sense: in a dense city, 70% of parking lots are primarily located in commercial areas and large residential areas. A coarsening ratio between 0.6 and 0.7 precisely forms supernodes centered around these typical, important parking lots. In this case, the resulting coarsened parking network represents, to a certain extent, the city's parking backbone.
[0131] 5) Comparison of prediction performance: Figure 7 The performance comparison of different methods for 15-minute (1-step), 30-minute (2-step), 45-minute (3-step), and 60-minute (4-step) prediction tasks on the experimental dataset is shown at a coarsening ratio of 0.7. It can be observed that the coarsening method in this application achieves the best prediction performance across all evaluation metrics across almost all prediction ranges, demonstrating its effectiveness for large-scale parking data prediction.
[0132] like Figure 7 As shown in (a), compared to directly inputting raw parking data into the TGCN model, the coarsening model, meshing, and convolutional recurrent neural network (DCRNN) methods of the present invention reduce the root mean square error (RMSE) by approximately 62.4%, 21.6%, and 29.3%, respectively. Both meshing and the diffused convolutional recurrent neural network (DCRNN) divide a large graph into multiple subgraphs of varying sizes without considering the connections between these subgraphs. This results in an inaccurate representation of the global spatial characteristics of the parking network, which is likely the primary cause of their prediction errors. The graph coarsening method considers not only global but also local topological information, including reachable edges between different vertices when forming supernodes. As a result, our method outperforms the TGCN in the 15-minute prediction task, as well as the 30-, 45-, and 60-minute prediction tasks. In these tasks, compared to meshing and the diffused convolutional recurrent neural network (DCRNN), which only consider global topological information, our method reduces the root mean square error (RMSE) by 51.5% and 43.9%, respectively.
[0133] At the same time, experiments show that in terms of error, the method with supernode autoencoder AE is significantly lower than the method without supernode autoencoder AE by 32.16%-38.57%; in terms of training time, the former is significantly 1.54 times faster than the latter, and the loss value is about 1 / 3 of the latter.
[0134] also, Figure 7(b) also shows that when the coarsening rate is 0.7, the loss of the technical solution of the present application decreases fastest as the number of epochs increases, and the rate of loss decreases is 1.61 times and 2.73 times that of the two community division algorithms, respectively. The loss of the technical solution of the present application ultimately reaches 9.86, while the final approximate average loss values of the two community division algorithms are 52.34 and 46.47, respectively. This result is due to the fact that the technical solution of the present application can capture the spatial dependencies of the parking network, and the combination of multiple parallel calculations of the supernode autoencoder AE reduces the complexity of the original parking data, while the reference algorithm still uses the original parking data.
[0135] 6) Performance comparison of multiple spatiotemporal graph convolutional network (STGCN) models: Table 1 shows the root mean square error (RMSE) values obtained by the coarsening method in the technical solution of this application on different spatiotemporal graph convolutional network (STGCN) models when the coarsening rate is 0.7. By comparison, it can be found that the RMSE values of the actual parking occupancy rate and the predicted parking occupancy rate finally calculated by the three different spatiotemporal graph convolutional models are roughly the same. The average relative deviation of the root mean square error (RMSE) of the three groups of models is only 0.79%, which shows that the technical solution of this application has a certain degree of versatility and can be used together with multiple spatiotemporal graph convolutional network (STGCN) to complete large-scale parking prediction.
[0136] Table 1 Root mean square error RMSE comparison
[0137]
[0138] In the present embodiment, a prediction device for spatiotemporal data is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be repeated hereafter. As used below, the term "module" refers to a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and contemplated.
[0139] This embodiment provides a prediction device for spatiotemporal data, such as Figure 8 As shown, including:
[0140] The acquisition module 301 is used to acquire an original topological network of spatiotemporal data, where the original topological network includes a plurality of original nodes.
[0141] The coarsening processing module 302 is used to coarsen the original topological network based on the spatiotemporal feature data of each original node to generate a coarsened topological network. The coarsened topological network includes multiple coarsened nodes, each of which is obtained by fusion of at least one original node.
[0142] The encoding module 303 is used to encode the spatiotemporal feature data fused by the coarsening nodes to generate a coarsening encoding network.
[0143] The prediction module 304 is used to input the coarsening coding network into a preset spatiotemporal prediction model and output the spatiotemporal prediction network through the preset spatiotemporal prediction model, wherein the preset spatiotemporal prediction model is obtained by training based on the coarsening coding network samples and the spatiotemporal prediction network samples.
[0144] The decoding module 305 is used to decode the spatiotemporal prediction data corresponding to the spatiotemporal prediction network and generate a target prediction network to predict the spatiotemporal data.
[0145] In some optional implementations, the roughening processing module 302 may include:
[0146] The node acquisition unit is used to acquire at least one neighbor node corresponding to each original node.
[0147] The similarity determination unit is used to determine the feature similarity between each original node and its neighbor nodes based on the spatiotemporal feature data.
[0148] The node set determining unit is used to determine the fusion node set based on feature similarity.
[0149] The coarsening unit is used to coarsen the original topology network according to the fusion node set to generate a coarsened topology network.
[0150] In some optional implementations, the similarity determination unit may include:
[0151] The first determination subunit is used to determine the degree corresponding to each original node and its neighboring nodes, and the edge vector between each original node and its neighboring nodes based on the spatiotemporal feature data corresponding to each original node and its neighboring nodes.
[0152] The second determining subunit is configured to determine the spectral distance between each original node and its neighboring nodes based on the degree and the edge vector.
[0153] The third determining subunit is configured to determine the spectral distance as the feature similarity.
[0154] In some optional implementations, the node set determination unit may include:
[0155] The similarity sorting subunit is used to sort the feature similarities corresponding to each original node, and determine the maximum feature similarity corresponding to each original node and the target neighbor node corresponding to the maximum feature similarity.
[0156] The node set determination subunit is used to determine the fusion node set based on each original node and its corresponding target neighbor node.
[0157] In some optional implementations, the encoding module 303 may include:
[0158] The fusion order obtaining unit is used to obtain the fusion order of the original nodes corresponding to the coarsened nodes.
[0159] The encoding unit is used to encode the spatiotemporal feature data fused by the coarsening nodes according to the original node fusion order to generate an embedded feature tensor.
[0160] The encoding network construction unit is used to construct a coarse encoding network based on the embedded feature tensor.
[0161] In some optional implementations, the prediction module 304 may include:
[0162] The model training unit is used to train a preset spatiotemporal prediction model based on the coarsened coding network samples and the spatiotemporal prediction network samples.
[0163] The model training unit is specifically used to: obtain the preset time series length of the spatiotemporal data and the number of coarsening nodes contained in the coarsening coding network sample; based on the preset time series length and the number of coarsening nodes, construct the feature matrix corresponding to the spatiotemporal prediction network sample; perform fitting training on the coarsening coding network sample and the feature matrix to obtain the mapping function between the coarsening coding network sample and the feature matrix; and determine the mapping function as the preset spatiotemporal prediction model.
[0164] In some optional implementations, the decoding module 305 may include:
[0165] The decoding unit is used to decode the spatiotemporal prediction data corresponding to each node in the spatiotemporal prediction network and restore the original data structure of the spatiotemporal prediction data.
[0166] The prediction network generation unit is used to generate a target prediction network based on the original data structure.
[0167] The prediction result determination unit is used to predict the spatiotemporal data through the target prediction network to obtain the spatiotemporal data prediction result.
[0168] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0169] The prediction device for spatiotemporal data in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0170] The spatiotemporal data prediction device provided by the embodiment of the present invention, when coarsening the original topological network, encodes the spatiotemporal feature data fused by the coarsening nodes to generate a coarsening coding network, thereby being able to embed high-dimensional sparse data into the form of a low-dimensional dense tensor to represent the spatiotemporal data features after coarsening. Through the form of self-encoding, the spatial relationship between different nodes in the original topological network is fully learned, so that the spatial features are not lost, further reducing the training computational overhead of large-scale spatiotemporal data on the spatiotemporal prediction model. Subsequently, the preset spatiotemporal prediction model obtained by training outputs a spatiotemporal prediction network corresponding to the coarsening coding network, and the spatiotemporal prediction network is decoded to restore the low-dimensional dense tensor to the data structure of the original topological network, thereby obtaining the prediction results of the spatiotemporal data, thereby utilizing the spatial features of the original topological network to a certain extent and improving the prediction accuracy of the spatiotemporal data.
[0171] The embodiment of the present invention also provides a computer device having the above Figure 8 The prediction device of the spatiotemporal data is shown.
[0172] See also Figure 9 , Figure 9 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 9 As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 9 A processor 10 is taken as an example.
[0173] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0174] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0175] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0176] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0177] The computer device further includes a communication interface 30 for data communication between the computer device and other devices or a communication network.
[0178] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0179] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for predicting spatiotemporal data, characterized in that: The method comprises: Acquire an original topological network of spatiotemporal data, wherein the original topological network includes a plurality of original nodes; Based on the spatiotemporal feature data of each original node, the original topological network is coarsened to generate a coarsened topological network, wherein the coarsened topological network includes a plurality of coarsened nodes, each of which is obtained by fusing at least one of the original nodes; Encoding the spatiotemporal feature data fused by the coarsening nodes to generate a coarsening coding network, including: obtaining an original node fusion order corresponding to the coarsening nodes; encoding the spatiotemporal feature data fused by the coarsening nodes according to the original node fusion order to generate an embedded feature tensor; and constructing the coarsening coding network according to the embedded feature tensor; Inputting the coarsening coding network into a preset spatiotemporal prediction model, and outputting a spatiotemporal prediction network through the preset spatiotemporal prediction model, wherein the preset spatiotemporal prediction model is trained based on the coarsening coding network samples and the spatiotemporal prediction network samples; The spatiotemporal prediction data corresponding to the spatiotemporal prediction network is decoded to generate a target prediction network to predict the spatiotemporal data, including: decoding the spatiotemporal prediction data corresponding to each node in the spatiotemporal prediction network to restore the original data structure of the spatiotemporal prediction data; generating the target prediction network based on the original data structure; and predicting the spatiotemporal data through the target prediction network to obtain a spatiotemporal data prediction result.
2. The method according to claim 1, characterized in that The method of performing coarsening processing on the original topology network based on the spatiotemporal feature data of each original node to generate a coarsened topology network includes: Obtain at least one neighbor node corresponding to each original node; Determining feature similarity between each original node and its neighboring nodes based on the spatiotemporal feature data; Determining a fused node set based on the feature similarity, where the fused node set is a node set consisting of the original node and the neighboring nodes; The original topology network is coarsened according to the fused node set to generate the coarsened topology network.
3. The method according to claim 2, characterized in that The determining, based on the spatiotemporal feature data, the feature similarity between each original node and its neighboring nodes includes: Determine, based on the spatiotemporal feature data corresponding to each original node and its neighboring nodes, the degree corresponding to each original node and its neighboring nodes, and the edge vector between each original node and the neighboring nodes; Determining a spectral distance between each original node and its neighboring nodes based on the degree and the edge vector; The spectral distance is determined as the feature similarity.
4. The method according to claim 2 or 3, characterized in that The determining of the fusion node set based on the feature similarity includes: Sorting the feature similarities corresponding to each original node to determine the maximum feature similarity corresponding to each original node and the target neighbor node corresponding to the maximum feature similarity; The fused node set is determined based on each original node and its corresponding target neighbor node.
5. The method according to claim 1, characterized in that The training step of the preset spatiotemporal prediction model includes: Acquiring a preset time series length of the spatiotemporal data and the number of the coarsened nodes included in the coarsened coding network sample; Based on the preset time series length and the number of the coarsened nodes, constructing a feature matrix corresponding to the spatiotemporal prediction network sample; Performing fitting training on the coarse coding network sample and the feature matrix to obtain a mapping function between the coarse coding network sample and the feature matrix; The mapping function is determined as the preset spatiotemporal prediction model.
6. A prediction device for spatiotemporal data, characterized in that: The device comprises: An acquisition module, configured to acquire an original topological network of spatiotemporal data, wherein the original topological network includes a plurality of original nodes; A coarsening processing module is used to perform coarsening processing on the original topological network based on the spatiotemporal feature data of each original node to generate a coarsening topological network, wherein the coarsening topological network includes a plurality of coarsening nodes, each of which is obtained by fusion of at least one of the original nodes; An encoding module, configured to encode the spatiotemporal feature data fused by the coarsening nodes to generate a coarsening encoding network; A prediction module, configured to input the coarsening coding network into a preset spatiotemporal prediction model and output a spatiotemporal prediction network through the preset spatiotemporal prediction model, wherein the preset spatiotemporal prediction model is trained based on the coarsening coding network samples and the spatiotemporal prediction network samples; A decoding module, configured to decode the spatiotemporal prediction data corresponding to the spatiotemporal prediction network and generate a target prediction network to predict the spatiotemporal data; The encoding module includes: a fusion order acquisition unit for acquiring the original node fusion order corresponding to the coarsening node; an encoding unit for encoding the spatiotemporal feature data fused by the coarsening node according to the original node fusion order to generate an embedded feature tensor; and an encoding network construction unit for constructing the coarsening encoding network according to the embedded feature tensor. Among them, the decoding module includes: a decoding unit, used to decode the spatiotemporal prediction data corresponding to each node in the spatiotemporal prediction network and restore the original data structure of the spatiotemporal prediction data; a prediction network generation unit, used to generate the target prediction network based on the original data structure; a prediction result determination unit, used to predict the spatiotemporal data through the target prediction network to obtain the spatiotemporal data prediction result.
7. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the spatiotemporal data prediction method according to any one of claims 1 to 5 by executing the computer instructions.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the spatiotemporal data prediction method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Time series data prediction method and device
CN114756720A
Similarity query optimization method based on trajectory representation learning
CN115544070A