A method and apparatus for predicting spatiotemporal network data
By filtering spatiotemporal network data and constructing a multi-channel target model, the problem of noise influence in spatiotemporal network data prediction is solved, and higher prediction accuracy is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAT UNIV OF DEFENSE TECH
- Filing Date
- 2023-01-10
- Publication Date
- 2026-04-21
AI Technical Summary
The challenge of predicting spatiotemporal network data lies in how to effectively extract temporal and spatial features while reducing the impact of noise. Existing models have failed to effectively distinguish and process different frequency components, resulting in unsatisfactory prediction performance.
By filtering the spatiotemporal network data, it is decomposed into low-frequency, mid-frequency, and high-frequency components. The weights of each frequency component are determined using cosine similarity, and a multi-channel target model is constructed. Prediction is then performed by combining a spatiotemporal convolution module and an attention mechanism.
It improves the prediction accuracy of spatiotemporal network data, effectively avoids noise pollution, accurately extracts key features, and enhances the accuracy of prediction results.
Smart Images

Figure CN115982437B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and apparatus for predicting spatiotemporal network data. Background Technology
[0002] Spatiotemporal network data is a type of data that incorporates both temporal and spatial characteristics. Predicting using spatiotemporal network data is not only a hot research topic but also has broad application value. Many real-world scenarios can be abstracted as spatiotemporal network data, such as transportation networks, communication networks, and water supply networks. In recent years, with the development of deep learning, many complex and excellent spatiotemporal data prediction models have been developed and have achieved good performance.
[0003] Predicting using spatiotemporal network data presents two main challenges. First, spatiotemporal network data is a complex, heterogeneous dataset, containing features from both temporal and spatial perspectives, making it difficult to extract these features simultaneously. Second, real-world data often contains significant noise, which negatively impacts prediction accuracy. Therefore, minimizing the impact of noise while extracting the core information from the data is a crucial challenge.
[0004] Spatiotemporal network data exhibits complex spatiotemporal correlations. For example... Figure 1 As shown, it is an abstract spatiotemporal network structure, which can be viewed as an abstract state of a real-world scene, such as a social network or a heat map. The state of each node in the diagram evolves over time. Simultaneously, the state of each node is influenced by its first-order and second-order neighbors (local influence), and even by all nodes in the network (global influence). This complex feature propagation process is usually called spatiotemporal correlation, which contains information in both time and space dimensions. Figure 2 As shown, this is a sample of traffic flow time series data, collected by sensors from a real traffic network. The figure reveals that the time series data exhibits overall periodicity, but also contains significant noise. This noise increases the difficulty of predicting data from spatiotemporal networks.
[0005] To address the first challenge, a significant amount of research has focused on effectively extracting spatiotemporal features from spatiotemporal network data, using models such as DCRCNN, STGCN, STSGCN, and STFGNN. Previous studies have primarily relied on graph neural networks (GNNs) to design related prediction models, such as combining GNNs with sequence models, designing spatiotemporal convolutional modules to acquire spatiotemporal information, and developing various variants. However, previous research has neglected data noise, a crucial component of the original data and a major factor contributing to suboptimal prediction performance.
[0006] In fact, time-series data generated in real-world scenarios typically exhibits a certain periodicity, with the frequency of these periodic changes determined by the data's actual meaning. For example, traffic flow data in transportation networks shows fixed frequencies of morning peaks, evening peaks, and weekend peaks. Noise in the data, on the other hand, is generated by random disturbances. If we consider the original time-series data as a signal, the original signal is obtained by adding several periodic signals to a noise signal. For example... Figure 3 As shown, this is a time series data sample and its corresponding spectrum. Figure 3 As can be seen, the energy of the original signal is mainly concentrated in the low-frequency components, with a relatively small proportion of high-frequency components. This indicates that the amplitude of the high-frequency components is much smaller than that of the low-frequency components, and the main features of the original time series are concentrated in the low-frequency part, while the high-frequency components contain fewer features. Therefore, in order to accurately predict spatiotemporal network data, different frequency components contained in the data should be treated differently. The low-frequency components in the original data should be extracted as the main focus, while the high-frequency components should be treated as secondary components. Summary of the Invention
[0007] This invention provides a method and apparatus for rapidly and accurately predicting spatiotemporal network data.
[0008] To address the aforementioned technical problems, embodiments of the present invention provide a spatiotemporal network data prediction method, characterized by comprising:
[0009] Obtain spatiotemporal network data, which contains multiple nodes, and the feature vector of each node is a time series of fixed length;
[0010] The feature vector of each node in the spatiotemporal network data is filtered to form low-frequency, mid-frequency and high-frequency components;
[0011] Calculate the cosine similarity between each frequency component in each feature vector and the feature vector;
[0012] Construct a target model with multiple channels;
[0013] Each frequency component in each feature vector is input into a different channel of the target model, and the cosine similarity is used as an attention value and input into the target model to determine the weight of each channel.
[0014] The spatiotemporal network data is predicted based on the target model with assigned weights to obtain prediction results.
[0015] As an optional embodiment, the filtering process for the feature vector of each node in the spatiotemporal network data includes:
[0016] The feature vectors of each node in the spatiotemporal network data are filtered by low-pass and band-pass filters respectively to obtain low-frequency components and mid-frequency components.
[0017] The high-frequency component is determined based on the low-frequency component, the mid-frequency component, and the feature vector of each node.
[0018] As an optional embodiment, the construction of the target model with multiple channels includes:
[0019] Construct a target model with at least three channels, wherein the at least three channels are respectively used to input low-frequency components, mid-frequency components and high-frequency components, and capture feature data of each corresponding frequency component.
[0020] As an optional embodiment, the target model includes a spatiotemporal convolution module, an attention mechanism layer, and an output layer;
[0021] The spatiotemporal convolution module includes a time series model for extracting temporal features and a graph neural network model for extracting spatial feature data.
[0022] The data in each channel is processed by the spatiotemporal convolution module to form corresponding hidden state data, which is then output to the attention mechanism layer by the corresponding channel.
[0023] As an optional embodiment, it also includes:
[0024] The weights of each channel are determined based on the cosine similarities obtained from the attention mechanism layer.
[0025] The hidden state data output by each channel is weighted and summed based on the weight of each channel to obtain the aggregated hidden state data corresponding to each feature vector.
[0026] As an optional embodiment, it also includes:
[0027] The hidden state data corresponding to each feature vector is obtained based on the output layer, and then processed to generate the prediction result.
[0028] Another embodiment of the present invention also provides a spatiotemporal network data prediction device, comprising:
[0029] The acquisition module is used to acquire spatiotemporal network data, which contains multiple nodes, and the feature vector of each node is a time series of fixed length.
[0030] The filtering module is used to filter the feature vector of each node in the spatiotemporal network data to form low-frequency components, mid-frequency components and high-frequency components.
[0031] The calculation module is used to calculate the cosine similarity between each frequency component in each feature vector and the feature vector;
[0032] Modules for building target models with multiple channels;
[0033] The input module is used to input each frequency component in each feature vector into different channels of the target model, and to input the cosine similarity as an attention value into the target model to determine the weight of each channel;
[0034] The prediction module is used to predict the spatiotemporal network data based on the target model with assigned weights, and obtain the prediction result.
[0035] As an optional embodiment, the filtering process for the feature vector of each node in the spatiotemporal network data includes:
[0036] The feature vectors of each node in the spatiotemporal network data are filtered by low-pass and band-pass filters respectively to obtain low-frequency components and mid-frequency components.
[0037] The high-frequency component is determined based on the low-frequency component, the mid-frequency component, and the feature vector of each node.
[0038] As an optional embodiment, the construction of the target model with multiple channels includes:
[0039] Construct a target model with at least three channels, wherein the at least three channels are respectively used to input low-frequency components, mid-frequency components and high-frequency components, and capture feature data of each corresponding frequency component.
[0040] As an optional embodiment, the target model includes a spatiotemporal convolution module, an attention mechanism layer, and an output layer;
[0041] The spatiotemporal convolution module includes a time series model for extracting temporal features and a graph neural network model for extracting spatial feature data.
[0042] The data in each channel is processed by the spatiotemporal convolution module to form corresponding hidden state data, which is then output to the attention mechanism layer by the corresponding channel.
[0043] Based on the disclosure of the above embodiments, it can be understood that the beneficial effects of the embodiments of the present invention include providing a multi-channel spatiotemporal graph convolutional network framework, i.e., a target model, by combining data filtering and graph neural network methods. This framework can simultaneously capture the temporal and spatial information of spatiotemporal network data. Considering the adverse effects of noise on spatiotemporal data prediction, the framework extracts low-frequency features (main features), mid-frequency features, and high-frequency features of the original data through multiple channels, and determines the weights of each channel by combining the cosine similarity between each frequency component and the original feature vector. In other words, it determines the weights of each frequency component, thereby distinguishing the processing of data of different frequency components, obtaining more accurate prediction results, effectively avoiding noise pollution, and effectively improving the prediction accuracy of spatiotemporal network data.
[0044] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0045] The technical solution of this application will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0046] The accompanying drawings are provided to further illustrate the present application and form part of the specification. They are used together with the embodiments of the present application to explain the application and do not constitute a limitation thereof. In the drawings:
[0047] Figure 1 This is a schematic diagram of a spatiotemporal network based on existing technology.
[0048] Figure 2 Example graph of traffic flow time series data.
[0049] Figure 3 Examples of time series data from existing technologies and their corresponding spectral diagrams are shown.
[0050] Figure 4 This is a flowchart of the spatiotemporal network data prediction method in an embodiment of the present invention.
[0051] Figure 5 This is a schematic diagram of time series decomposition in an embodiment of the present invention.
[0052] Figure 6 This is a structural block diagram of the target model in an embodiment of the present invention.
[0053] Figure 7 This is a structural block diagram of the spatiotemporal network data prediction device in an embodiment of the present invention. Detailed Implementation
[0054] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings, but these are not intended to limit the scope of the invention.
[0055] It should be understood that various modifications can be made to the embodiments disclosed herein. Therefore, the following description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope and spirit of this disclosure will be apparent to those skilled in the art.
[0056] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present disclosure and, together with the general description of the disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the disclosure.
[0057] These and other features of the invention will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.
[0058] It should also be understood that although the invention has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of the invention, which have the features described in the claims and are therefore all within the scope of protection defined herein.
[0059] The above and other aspects, features and advantages of this disclosure will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.
[0060] Specific embodiments of the present disclosure are described thereafter with reference to the accompanying drawings; however, it should be understood that the disclosed embodiments are merely examples of the present disclosure and can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the present disclosure. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but merely to serve as the basis and representative basis for the claims to teach those skilled in the art to use the present disclosure in a variety of substantially any suitable detailed structures.
[0061] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in still another embodiment,” all of which may refer to one or more of the same or different embodiments according to this disclosure.
[0062] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0063] like Figure 4 As shown, this embodiment of the invention provides a spatiotemporal network data prediction method, including:
[0064] Obtain spatiotemporal network data, which contains multiple nodes, and the feature vector of each node is a time series of fixed length;
[0065] The feature vector of each node in the spatiotemporal network data is filtered to form low-frequency, mid-frequency and high-frequency components;
[0066] Calculate the cosine similarity between each frequency component in each feature vector and the feature vector;
[0067] Construct a target model with multiple channels;
[0068] Each frequency component in each feature vector is input into a different channel of the target model, and the cosine similarity is used as an attention value and input into the target model to determine the weight of each channel.
[0069] The spatiotemporal network data is predicted based on the target model with assigned weights to obtain prediction results.
[0070] For example, for a spatiotemporal network data X∈R N×T It contains N nodes, and the feature vector of each node is a time series of length T. Design a Butterworth low-pass filter and a Butterworth band-pass filter, and use these filters to filter the feature vector x of each node. i ∈R T Decomposed into low-frequency components x i,l ∈R T , , intermediate frequency component x i,m ∈R T and high-frequency components x i,h ∈R T There exists a relation x. i =x i,l +x i,m +x i,h By decomposing each node, the low-frequency component X of the original network data can be obtained. l ∈R N×T Mid-frequency component X m ∈R N×T and high-frequency component X h ∈R N×T There exists a relation: X = X l +X m +X h Next, the original feature vector of each node is decomposed into low-frequency, mid-frequency, and high-frequency components. Then, the cosine similarity between each component and the original feature vector is calculated. This is then applied to the three different frequency components (low-frequency component X...). l ∈R N×T Mid-frequency component X m ∈R N×T and high-frequency component X h ∈R N×TThe values are input into different channels of the target model, and the previously obtained cosine similarity is used as the attention value to assign weights to each channel of the target model. The target model can then calculate and output the prediction results for the corresponding spatiotemporal network data.
[0071] Based on the disclosure of the above embodiments, it can be understood that the beneficial effects of this embodiment include providing a multi-channel spatiotemporal graph convolutional network framework, i.e., the target model, by combining data filtering and graph neural network methods. This framework can simultaneously capture the temporal and spatial information of spatiotemporal network data. Considering the adverse effects of noise on spatiotemporal data prediction, it extracts low-frequency features (main features), mid-frequency features, and high-frequency features of the original data through multiple channels, and determines the weights of each channel by combining the cosine similarity between each frequency component and the original feature vector. That is, it determines the weights of each frequency component, so that data of different frequency components can be processed differently, resulting in higher accuracy. It can effectively avoid the prediction results contaminated by noise and effectively improve the prediction accuracy of spatiotemporal network data.
[0072] Further, the feature vector of each node in the spatiotemporal network data is filtered, including:
[0073] The feature vectors of each node in the spatiotemporal network data are filtered by low-pass and band-pass filters respectively to obtain low-frequency components and mid-frequency components.
[0074] The high-frequency component is determined based on the low-frequency component, the mid-frequency component, and the feature vector of each node.
[0075] like Figure 5 As shown, for a given spatiotemporal network data X∈R N×T This involves N nodes, each with a feature vector that is a time series of length T. First, the spectrum of the time series for each node is obtained using Discrete Fourier Transform. It can be seen that the signal energy in the spectrum of each time series is mainly concentrated in the low-frequency components, with larger amplitudes in the low-frequency components and smaller amplitudes in the high-frequency components. This indicates that the energy of the original time series is mainly concentrated in the low-frequency part, with a smaller proportion of energy in the high-frequency part. Let the spectrum of the time series be F∈R. N / 2Let f(i) represent the i-th element (amplitude of the i-th frequency component) in F. Two thresholds are set: α1∈[0,1] and α2∈[0,1]. Two filters are designed (one Butterworth low-pass filter and one Butterworth band-pass filter). First, each time series in the original spatiotemporal network data is input into the low-pass filter. This low-pass filter retains the low-frequency components with a frequency ratio of α1 in the time series and filters out the remaining components. For example, if the highest frequency in the components contained in the original time series is 1000Hz, when α1=0.1, the low-pass filter only retains components with frequencies ≤100Hz. The low-frequency components obtained after the original time series passes through the low-pass filter are denoted as x. i,l ∈R T The low-frequency component of the corresponding spatiotemporal network data is denoted as X. l The original time series is then input into a bandpass filter. This filter retains the frequency components with a proportion greater than α1 and less than or equal to α2, while filtering out other components. For example, if the highest frequency in the original time series is 1000Hz, when α1 = 0.1 and α2 = 0.3, the bandpass filter will only retain the components with frequencies between 100Hz and f ≤ 300Hz. After passing through the bandpass filter, the original time series yields the intermediate frequency component, denoted as x. i,m ∈R T The low-frequency component of the corresponding spatiotemporal network data is denoted as X. m After processing with a low-pass filter and a band-pass filter, the low-frequency component X of the original spatiotemporal network data was obtained. l and intermediate frequency component X m These components respectively contain the lowest-frequency and second-lowest-frequency components from the original data. Then, the low-frequency components X can be subtracted from the original spatiotemporal network data X. l and intermediate frequency component X m The high-frequency component can then be obtained, denoted as X. h .
[0076] Furthermore, such as Figure 6 As shown, a target model with multiple channels is constructed, including:
[0077] Construct a target model with at least three channels, wherein the at least three channels are respectively used to input low-frequency components, mid-frequency components and high-frequency components, and capture feature data of each corresponding frequency component.
[0078] The target model includes a spatiotemporal convolutional module, an attention mechanism layer, and an output layer.
[0079] The spatiotemporal convolution module includes a time series model for extracting temporal features and a graph neural network model for extracting spatial feature data.
[0080] The data in each channel is processed by the spatiotemporal convolution module to form corresponding hidden state data, which is then output to the attention mechanism layer by the corresponding channel.
[0081] For example, the original spatiotemporal network data is decomposed into three components—low frequency, mid frequency, and high frequency—after passing through a filter. The three components X are then... l X m and X h The input is fed into three channels of the model. The three channels are used to capture features of different frequency components in the original spatiotemporal network data. Each channel has the same structure, containing two spatiotemporal convolutional modules (ST-ConvBlock), an attention layer, and an output layer.
[0082] Specifically, the spatiotemporal convolution module in this embodiment consists of ChebNet and LSTM (two LSTM layers (time series model) with a ChebNet layer (graph neural network model) in between). This module captures the temporal and spatial features of the spatiotemporal network data. When data is input into the spatiotemporal convolution module, it first passes through an LSTM layer, which extracts the temporal features of the data. Then, it passes through a ChebNet layer, a classic graph neural network model capable of extracting spatial features from the data. After processing by the spatiotemporal convolution module, the input data from the three channels outputs the hidden state data corresponding to each channel, denoted as H. l H m H h .
[0083] Furthermore, the method in this embodiment also includes:
[0084] The weights of each channel are determined based on the cosine similarities obtained from the attention mechanism layer.
[0085] The hidden state data output by each channel is weighted and summed based on the weight of each channel to obtain the aggregated hidden state data corresponding to each feature vector.
[0086] For example, the weight of each channel can be determined by the cosine similarity between the input data and the original data, and the weights of the three channels can be denoted as v. l v m v h Then, the hidden state H output for each channel. l H m H h By performing a weighted summation, we obtain the aggregated hidden state H, which is:
[0087] H = v l Hl +v m H m +v n H h
[0088] For example, if the original data is X, the three channels are respectively input to the low-frequency component X1 in X. l Mid-frequency component X m and high-frequency component X h The original data X and the low-frequency component X l Mid-frequency component X m and high-frequency component X h The cosine similarities are 0.99, 0.12, and 0.03, respectively. Therefore, the hidden states of the three channel outputs are assigned weights of 0.99, 0.12, and 0.03, respectively. The weighted summation yields the aggregated hidden state H = 0.99H. l +0.12H m +0.03H h .
[0089] Furthermore, the method in this embodiment also includes:
[0090] The hidden state data corresponding to each feature vector is obtained based on the output layer, and then processed to generate the prediction result.
[0091] Specifically, in this embodiment, the output layer consists of a fully connected layer, with the mean squared error function used as the loss function. The hidden state H output by the attention mechanism layer is processed by the output layer to obtain the final prediction result. And output it.
[0092] like Figure 7 As shown, another embodiment of the present invention also provides a spatiotemporal network data prediction device, comprising:
[0093] The acquisition module is used to acquire spatiotemporal network data, which contains multiple nodes, and the feature vector of each node is a time series of fixed length.
[0094] The filtering module is used to filter the feature vector of each node in the spatiotemporal network data to form low-frequency components, mid-frequency components and high-frequency components.
[0095] The calculation module is used to calculate the cosine similarity between each frequency component in each feature vector and the feature vector;
[0096] Modules for building target models with multiple channels;
[0097] The input module is used to input each frequency component in each feature vector into different channels of the target model, and to input the cosine similarity as an attention value into the target model to determine the weight of each channel;
[0098] The prediction module is used to predict the spatiotemporal network data based on the target model with assigned weights, and obtain the prediction result.
[0099] As an optional embodiment, the filtering process for the feature vector of each node in the spatiotemporal network data includes:
[0100] The feature vectors of each node in the spatiotemporal network data are filtered by low-pass and band-pass filters respectively to obtain low-frequency components and mid-frequency components.
[0101] The high-frequency component is determined based on the low-frequency component, the mid-frequency component, and the feature vector of each node.
[0102] As an optional embodiment, the construction of the target model with multiple channels includes:
[0103] Construct a target model with at least three channels, wherein the at least three channels are respectively used to input low-frequency components, mid-frequency components and high-frequency components, and capture feature data of each corresponding frequency component.
[0104] As an optional embodiment, the target model includes a spatiotemporal convolution module, an attention mechanism layer, and an output layer;
[0105] The spatiotemporal convolution module includes a time series model for extracting temporal features and a graph neural network model for extracting spatial feature data.
[0106] The data in each channel is processed by the spatiotemporal convolution module to form corresponding hidden state data, which is then output to the attention mechanism layer by the corresponding channel.
[0107] As an optional embodiment, it also includes:
[0108] A determination module is used to determine the weight of each channel based on the cosine similarity obtained by combining the attention mechanism layer;
[0109] The summation module is used to perform weighted summation of the hidden state data output by each channel according to the weight of each channel, so as to obtain the aggregated hidden state data corresponding to each feature vector.
[0110] As an optional embodiment, it also includes:
[0111] The output module is used to obtain the hidden state data corresponding to each feature vector based on the output layer, process it, and generate the prediction result.
[0112] Another embodiment of the present invention also provides an electronic device, comprising:
[0113] One or more processors;
[0114] Memory, configured to store one or more programs;
[0115] When the one or more programs are executed by the one or more processors, the one or more processors implement the above-described spatiotemporal network data prediction method.
[0116] Furthermore, one embodiment of the present invention also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the spatiotemporal network data prediction method as described above. It should be understood that the various solutions in this embodiment have the corresponding technical effects in the above-described method embodiments, and will not be repeated here.
[0117] Furthermore, embodiments of the present invention also provide a computer program product, which is tangibly stored on a computer-readable medium and includes computer-readable instructions that, when executed, cause at least one processor to perform a spatiotemporal network data prediction method such as the embodiments described above.
[0118] It should be noted that the computer storage medium of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access storage media (RAM), read-only storage media (ROM), erasable programmable read-only storage media (EPROM or flash memory), optical fibers, portable compact disk read-only storage media (CD-ROM), optical storage media, magnetic storage media, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program configured for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, antenna, optical fiber, RF, etc., or any suitable combination thereof.
[0119] Furthermore, those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0120] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0121] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0122] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0123] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
[0124] The above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the present invention. The scope of protection of the present invention is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to the present invention within its spirit and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of the present invention.
Claims
1. A spatiotemporal network data prediction method, characterized in that, include: Spatiotemporal network data is obtained, which contains multiple nodes, and the feature vector of each node is a time series of fixed length. The spatiotemporal networks involved in the spatiotemporal network data include transportation networks, communication networks, and water supply networks. The feature vector of each node in the spatiotemporal network data is filtered to form low-frequency, mid-frequency and high-frequency components; Calculate the cosine similarity between each frequency component in each feature vector and the feature vector; Construct a target model with multiple channels; Each frequency component in each feature vector is input into a different channel of the target model, and the cosine similarity is used as an attention value and input into the target model to determine the weight of each channel. Based on the target model with assigned weights, the spatiotemporal network data is predicted to obtain the prediction result; The filtering process for the feature vector of each node in the spatiotemporal network data includes: The feature vectors of each node in the spatiotemporal network data are filtered by low-pass and band-pass filters respectively to obtain low-frequency components and mid-frequency components. The high-frequency components are calculated and determined based on the low-frequency components, mid-frequency components, and the feature vectors of each node. The construction of the target model with multiple channels includes: Construct a target model with at least three channels, wherein the at least three channels are respectively used to input low-frequency components, mid-frequency components and high-frequency components, and capture feature data of each corresponding frequency component; The target model includes a spatiotemporal convolutional module, an attention mechanism layer, and an output layer; The spatiotemporal convolution module includes a time series model for extracting temporal features and a graph neural network model for extracting spatial feature data. The data in each channel is processed by the spatiotemporal convolution module to form corresponding hidden state data, which is then output to the attention mechanism layer by the corresponding channel. Also includes: The weights of each channel are determined based on the cosine similarities obtained from the attention mechanism layer. The hidden state data output by each channel is weighted and summed based on the weight of each channel to obtain the aggregated hidden state data corresponding to each feature vector.
2. The spatiotemporal network data prediction method according to claim 1, characterized in that, Also includes: The hidden state data corresponding to each feature vector is obtained based on the output layer, and then processed to generate the prediction result.
3. A spatiotemporal network data prediction device, characterized in that, include: The acquisition module is used to acquire spatiotemporal network data, which contains multiple nodes. The feature vector of each node is a time series of fixed length. The spatiotemporal networks involved in the spatiotemporal network data include transportation networks, communication networks, and water supply networks. The filtering module is used to filter the feature vector of each node in the spatiotemporal network data to form low-frequency components, mid-frequency components and high-frequency components. The calculation module is used to calculate the cosine similarity between each frequency component in each feature vector and the feature vector; Modules for building target models with multiple channels; The input module is used to input each frequency component in each feature vector into different channels of the target model, and to input the cosine similarity as an attention value into the target model to determine the weight of each channel; The prediction module is used to predict the spatiotemporal network data based on the target model with assigned weights, and obtain the prediction result; The filtering process for the feature vector of each node in the spatiotemporal network data includes: The feature vectors of each node in the spatiotemporal network data are filtered by low-pass and band-pass filters respectively to obtain low-frequency components and mid-frequency components. The high-frequency components are calculated and determined based on the low-frequency components, mid-frequency components, and the feature vectors of each node. The construction of the target model with multiple channels includes: Construct a target model with at least three channels, wherein the at least three channels are respectively used to input low-frequency components, mid-frequency components and high-frequency components, and capture feature data of each corresponding frequency component; The target model includes a spatiotemporal convolutional module, an attention mechanism layer, and an output layer; The spatiotemporal convolution module includes a time series model for extracting temporal features and a graph neural network model for extracting spatial feature data. The data in each channel is processed by the spatiotemporal convolution module to form corresponding hidden state data, which is then output to the attention mechanism layer by the corresponding channel. Also includes: A determination module is used to determine the weight of each channel based on the cosine similarity obtained by combining the attention mechanism layer; The summation module is used to perform weighted summation on the hidden state data output by each of the channels based on the weights of each channel, so as to obtain the aggregated hidden state data corresponding to each of the feature vectors.
Citation Information
Patent Citations
Short-term traffic flow prediction method based on three-stage model
CN112801386A
Highway traffic flow prediction method based on embedded feature selection strategy
CN115578861A