A spatiotemporal data prediction method and device, and a storage medium

By introducing time, space, and spatiotemporal dimension attention modules into spatiotemporal series data prediction, the accuracy of spatiotemporal series data prediction is improved, solving the problems of prediction lag and low accuracy caused by capturing correlation only in the time dimension in existing technologies.

CN116957016BActive Publication Date: 2026-01-16CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211299549.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-21
Publication Date
2026-01-16
Estimated Expiration
2042-10-21

AI Technical Summary

Technical Problem

Existing spatiotemporal series data prediction methods mainly capture correlations in the time dimension, rarely involving spatial and spatiotemporal correlations, resulting in low prediction accuracy.

Method used

A target data prediction model is adopted, including time-dimensional attention, spatial-dimensional attention, and spatiotemporal-dimensional attention modules, to capture the multi-dimensional correlation of spatiotemporal sequence data.

Benefits of technology

By capturing the correlation of spatiotemporal series data in multiple dimensions, the accuracy of spatiotemporal series data prediction is improved, the prediction lag problem is solved, and accuracy is maintained in long-term prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116957016B_ABST
    Figure CN116957016B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of spatiotemporal data prediction method, this method comprises: obtaining spatiotemporal sequence data;Using target data prediction model, spatiotemporal sequence data is predicted, and the prediction result corresponding to spatiotemporal sequence data is obtained;Wherein, target data prediction model includes attention module, and attention module includes time dimension attention, spatial dimension attention and spatiotemporal dimension attention, the time dimension correlation, spatial dimension correlation and spatiotemporal dimension correlation of spatiotemporal sequence data can be captured by attention module in target data prediction model, so that the prediction result corresponding to spatiotemporal sequence data is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and particularly relates to a spatio-temporal data prediction method and device and a storage medium. BACKGROUND

[0002] A large amount of information is contained in spatio-temporal sequence data, and accurate mining of the information by modeling analysis and prediction of the spatio-temporal sequence data can effectively assist people in making scientific decisions and promoting fine management of industries, so that people's daily life is more convenient.

[0003] However, common spatio-temporal sequence data prediction methods are mostly for predicting time sequence data, that is, mainly for capturing time dimension correlation, and rarely involve obtaining correlation of other dimensions, so there is a problem of low accuracy of spatio-temporal sequence data prediction. SUMMARY

[0004] The present application provides a spatio-temporal data prediction method and device and a storage medium, which can use a target data prediction model to predict spatio-temporal sequence data, and thus can improve the accuracy of spatio-temporal sequence data prediction.

[0005] The technical scheme of the present application is as follows:

[0006] In a first aspect, the present application provides a spatio-temporal data prediction method, which comprises:

[0007] obtaining spatio-temporal sequence data;

[0008] predicting the spatio-temporal sequence data using a target data prediction model to obtain a prediction result corresponding to the spatio-temporal sequence data; wherein the target data prediction model comprises an attention module, and the attention module comprises time dimension attention, space dimension attention and spatio-temporal dimension attention.

[0009] In a second aspect, the present application provides a spatio-temporal data prediction device, which comprises an acquisition unit and a prediction unit.

[0010] The acquisition unit is configured to acquire spatio-temporal sequence data.

[0011] The prediction unit is configured to predict the spatio-temporal sequence data using a target data prediction model to obtain a prediction result corresponding to the spatio-temporal sequence data; wherein the target data prediction model comprises an attention module, and the attention module comprises time dimension attention, space dimension attention and spatio-temporal dimension attention.

[0012] In a third aspect, the embodiments of the present application provide a spatio-temporal data prediction device, the spatio-temporal data prediction device comprising: a processor and a memory; wherein

[0013] The memory is configured to store a computer program capable of running on the processor.

[0014] The processor is configured to execute the spatio-temporal data prediction method as described above when running the computer program.

[0015] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, characterized in that the storage medium stores computer program code, and when the computer program code is executed by a computer, the spatio-temporal data prediction method as described above is implemented.

[0016] The embodiments of the present application provide a spatio-temporal data prediction method and device, and a storage medium. The method comprises: acquiring spatio-temporal sequence data; using a target data prediction model to predict the spatio-temporal sequence data, and obtaining a prediction result corresponding to the spatio-temporal sequence data; wherein the target data prediction model comprises an attention module, and the attention module comprises a time dimension attention, a space dimension attention, and a spatio-temporal dimension attention. As can be seen, when the spatio-temporal data prediction device uses the target data prediction model to predict the spatio-temporal sequence data, the attention module in the target data prediction model can capture the time dimension correlation, the space dimension correlation, and the spatio-temporal dimension correlation of the spatio-temporal sequence data, so that the prediction result corresponding to the spatio-temporal sequence data is more accurate. That is, the spatio-temporal data prediction method proposed in the embodiments of the present application can capture multiple dimension correlations of the spatio-temporal sequence data, so as to improve the accuracy of spatio-temporal sequence data prediction. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 A spatio-temporal data prediction method diagram is provided for the embodiments of the present application.

[0018] Figure 2 A target data prediction model structure diagram is provided for the embodiments of the present application.

[0019] Figure 3 An attention module structure diagram is provided for the embodiments of the present application.

[0020] Figure 4 A cell traffic data cycle diagram is provided for the embodiments of the present application.

[0021] Figure 5 A spatio-temporal data correlation diagram is provided for the embodiments of the present application.

[0022] Figure 6 A prediction result diagram under attention time correlation is provided for the embodiments of the present application.

[0023] Figure 7 This is a schematic diagram illustrating the prediction results under the consideration of temporal correlation, spatial dimension correlation, and spatiotemporal dimension correlation proposed in the embodiments of this application.

[0024] Figure 8 This is a schematic diagram of the attention score calculation process proposed in the embodiments of this application;

[0025] Figure 9 This is a schematic diagram of the output of the attention module proposed in an embodiment of this application;

[0026] Figure 10 This is a schematic diagram of the composition structure of the spatiotemporal data prediction device proposed in the embodiments of this application. Figure 1 ;

[0027] Figure 11 This is a schematic diagram of the composition structure of the spatiotemporal data prediction device proposed in the embodiments of this application. Figure 2 . Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the relevant application and not for limiting the application. Furthermore, it should be noted that, for ease of description, only the parts related to the relevant application are shown in the accompanying drawings.

[0029] Spatiotemporal series data contains a wealth of information. By modeling, analyzing, and predicting this data, we can accurately extract this information to effectively assist in scientific decision-making, promote refined industrial management, and facilitate people's daily lives. Spatiotemporal series data consists of multiple time series with spatiotemporal correlation within a spatial structure, such as traffic data and other indicators from multiple base stations or cells within a certain area. Each base station or cell is called a node. In the field of mobile communication networks, spatiotemporal prediction is applied in areas such as predicting future traffic sequences based on historical traffic data from base station cells, assisting in fault repair, and achieving energy conservation at base stations.

[0030] Spatiotemporal sequence data has the following characteristics: (1) Spatial correlation: The time series of a node itself is affected by the neighboring nodes in the spatial dimension, and the mutual influence between nodes changes dynamically with time; (2) Temporal correlation: The value of each time in the future time series is affected by the historical time series, and the time series has non-linear dependence: it manifests as various periodicity, trend, mutation, etc.; (3) Heterogeneity: In the spatial dimension, for example, there are large differences in traffic flow in residential areas, business districts, and transportation hubs; in the temporal dimension, there are large differences in traffic flow during the week, weekends, and holidays.

[0031] There are two mainstream methods for spatio-temporal sequence prediction. The first method is an encoder-decoder structure, which uses attention mechanism to achieve time series prediction task. Google released Attention is all you need, which proposed a Transformer model to solve the sequence prediction problem. This article uses the structure of Attention instead of LSTM. Zhou et al. proposed Informer, which improved the existing problems of Transformer, such as attention matrix calculation complexity, long-term prediction output efficiency, etc. The improvements include probabilistic sparse self-attention, self-attention distillation mechanism, and parallel generative decoder mechanism. This way can only predict time series data and only applies attention mechanism in the time dimension, capturing the influence of historical sequences on the current time point, but not capturing the influence of neighboring nodes on the current node in the spatial dimension. The second method is based on graph convolutional neural network. Yu et al. proposed STGCN (Spatio-temporal graph convolutional networks), which introduced graph convolutional neural network into spatio-temporal sequence modeling and defined the traffic network structure as a graph structure. To ensure spatio-temporal correlation, i.e. the change of a neighbor node at one time greatly affects the change of the current node at this time, Song et al. proposed STSGCN, which constructed a local spatio-temporal graph by connecting multiple spatial graphs at adjacent time to capture the spatio-temporal correlation. This way captures the spatial correlation of data through graph convolution and aggregates the features of neighboring nodes. However, this method is based on a static adjacency matrix to construct a graph structure, and the construction of the adjacency matrix cannot guarantee accuracy. At the same time, the mutual influence between nodes is dynamically changing over time, and the static adjacency matrix cannot capture this dynamic change of the influence between neighboring nodes. In addition, this method is not suitable for long-term prediction tasks.

[0032] To solve the problem that the other dimension correlation of the spatio-temporal sequence data is rarely involved at present, resulting in low accuracy of spatio-temporal sequence data prediction, the embodiment of the application provides a spatio-temporal data prediction method and device and a storage medium, the method comprising: acquiring spatio-temporal sequence data; using a target data prediction model to predict the spatio-temporal sequence data, and obtaining a prediction result corresponding to the spatio-temporal sequence data; wherein the target data prediction model comprises an attention module, and the attention module comprises a time dimension attention, a space dimension attention and a spatio-temporal dimension attention. As can be seen, when the spatio-temporal data prediction device uses the target data prediction model to predict the spatio-temporal sequence data, the time dimension correlation, the space dimension correlation and the spatio-temporal dimension correlation of the spatio-temporal sequence data can be captured through the attention module in the target data prediction model, so that the prediction result corresponding to the spatio-temporal sequence data is more accurate. That is, the spatio-temporal data prediction method provided in the embodiment of the application can capture multiple dimension correlations of the spatio-temporal sequence data, so as to improve the accuracy of spatio-temporal sequence data prediction.

[0033] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application.

[0034] Embodiment one

[0035] The embodiment of the application provides a spatio-temporal data prediction method, Figure 1 The spatio-temporal data prediction method provided in the embodiment of the application is shown in the schematic diagram of the spatio-temporal data prediction method provided in the embodiment of the application. Figure 1 As shown in the schematic diagram, the method for the spatio-temporal data prediction device to perform spatio-temporal data prediction can comprise the following steps:

[0036] Step 101, acquiring spatio-temporal sequence data.

[0037] In the embodiment of the application, the spatio-temporal data prediction device can first acquire spatio-temporal sequence data.

[0038] It should be noted that in the embodiment of the application, the spatio-temporal sequence data can be wireless cell traffic data, or other types of data, for example, road traffic data, and the type of spatio-temporal sequence data is not limited in the application.

[0039] It should be noted that in the embodiment of the application, the spatio-temporal data prediction device can be any terminal or device with storage function and communication function, wherein the spatio-temporal data prediction device can be a device capable of using a target data prediction model to predict spatio-temporal sequence data, and the spatio-temporal data prediction device includes but is not limited to a personal computer (PC), a tablet computer and the like.

[0040] In step 102, the spatio-temporal sequence data is predicted using a target data prediction model to obtain a prediction result corresponding to the spatio-temporal sequence data; the target data prediction model includes an attention module, and the attention module includes time dimension attention, space dimension attention, and spatio-temporal dimension attention.

[0041] In the embodiments of the present application, after obtaining the spatio-temporal sequence data, the spatio-temporal data prediction device can further predict the spatio-temporal sequence data using a target data prediction model to obtain a prediction result corresponding to the spatio-temporal sequence data.

[0042] It should be noted that, in the embodiments of the present application, the target data prediction model can include an attention module, wherein the attention module can include time dimension attention, space dimension attention, and spatio-temporal dimension attention. Therefore, the target data prediction model proposed in the embodiments of the present application can capture the time dimension correlation, the space dimension correlation, and the spatio-temporal dimension correlation of the spatio-temporal data.

[0043] It should be noted that, in the embodiments of the present application, Figure 2 The structure diagram of the target data prediction model proposed in the embodiments of the present application is shown in FIG. 2. Figure 2 As shown in FIG. 2, the target data prediction model can include an Informer model, and the Informer model can include an encoder (Encoder) and a decoder (Decoder), and the Encoder module and the Decoder module both include an attention module provided with time dimension attention, space dimension attention, and spatio-temporal dimension attention.

[0044] It should be noted that, in the embodiments of the present application, as shown in FIG. 2, Figure 2 The Encoder module includes a multi-head attention layer and a convolution layer, and the Decoder module includes a Masked Attention layer, an attention layer, and a convolution layer.

[0045] It should be noted that, in the embodiments of the present application, the attention layer can capture the spatial relationship, the time sequence relationship, and the spatio-temporal synchronization relationship between the wireless cell traffic data; the convolution layer uses convolution and pooling operations for feature dimension reduction; the Masked Attention layer can input a prediction sequence filled with 0, for example, the Decoder historical sequence length is n_hist, the prediction sequence length is n_pred, the input sequence length is n_hist+n_pred, and the last n_pred bits are filled with 0, which is used to learn the relationship between the history and the prediction target.

[0046] It should be noted that in the embodiments of the present application, the spatio-temporal data prediction device can take the output of the Masked Attention layer in the Decoder module as the query, the output of the Encoder as the key and the value, and then enter the attention module for attention calculation, and finally obtain the output of the Decoder module.

[0047] It should be noted that in the embodiments of the present application, the last layer in the target data prediction model is an output layer, the input of the layer is the output of the Decoder module, the length of the output result is equal to the input of the Decoder, and the last n_pred bits in the output are the prediction result, i.e., the prediction result corresponding to the spatio-temporal sequence data.

[0048] It should be noted that in the embodiments of the present application, Figure 3 The structure diagram of the attention module proposed in the embodiments of the present application is shown in FIG. 2. Figure 3 As shown in FIG. 2, the attention module includes time dimension attention, space dimension attention, and space-time synchronous attention, and Dropout&Norm (Normalization and Dropout) can refer to normalization processing.

[0049] It should be noted that in the embodiments of the present application, the attention module in the target data prediction model includes time dimension attention, space dimension attention, and space-time synchronous attention, so that when the target data prediction model predicts the spatio-temporal sequence data, it can capture the time dimension correlation, space dimension correlation and space-time dimension correlation of the spatio-temporal sequence data, so that the prediction result corresponding to the spatio-temporal sequence data is more accurate, and the accuracy of the spatio-temporal sequence data prediction is further improved.

[0050] Further, in the embodiments of the present application, the spatio-temporal data prediction device can use the target data prediction model to predict the spatio-temporal sequence data, including: based on the target data prediction model, performing time dimension attention, space dimension attention and space-time dimension attention calculation on the spatio-temporal sequence data to obtain a first output of the attention module; and obtaining a prediction result based on the first output.

[0051] It should be noted that in the embodiments of the present application, the first output of the attention module can be understood as the result obtained by the spatio-temporal data prediction device based on the target data prediction model, by combining the calculation results of the spatio-temporal sequence data in the time dimension attention, the space dimension attention and the space-time dimension attention when performing attention calculation on the spatio-temporal sequence data.

[0052] Further, in the embodiments of the present application, the spatio-temporal data prediction device can calculate the time dimension attention, the space dimension attention and the spatio-temporal dimension attention of the spatio-temporal sequence data based on the target data prediction model to obtain the first output of the attention module.

[0053] Specifically, the spatio-temporal data prediction device can determine a query matrix, a key value matrix and a value matrix according to the spatio-temporal sequence data based on the target data prediction model; determine a time dimension attention matrix, a space dimension attention matrix and a spatio-temporal dimension attention matrix according to the query matrix, the key value matrix and the value matrix; and generate the first output according to the time dimension attention matrix, the space dimension attention matrix and the spatio-temporal dimension attention matrix.

[0054] It should be noted that, in the embodiments of the present application, the spatio-temporal sequence data can be wireless cell traffic data. For example, the number of cells is N, and the length of the time sequence is L. Assuming that the number of cells is 100 and the length of the traffic sequence is 24, then N = 100 and L = 24. The spatio-temporal data prediction device can determine a query matrix (quiers), a key value matrix (keys) and a value matrix (values) according to the spatio-temporal sequence data. The query matrix, the key value matrix and the value matrix have the same dimension, which is a 4-dimensional matrix. The first dimension is the batch size (B), i.e., the number of selected samples. The second dimension is the number of nodes (N). The third dimension is the length of the time sequence (L). The last dimension is the length of the feature encoding (E).

[0055] Further, in the embodiments of the present application, after determining the query matrix, the key value matrix, the value matrix and the corresponding dimensions according to the spatio-temporal sequence data, the spatio-temporal data prediction device can determine the time dimension attention matrix according to the query matrix, the key value matrix, the value matrix and the corresponding dimensions.

[0056] It should be noted that, in the embodiments of the present application, Figure 4 The cell traffic data cycle diagram proposed in the embodiments of the present application is shown in FIG. 1. Figure 4 As shown in FIG. 1, the spatio-temporal data prediction device can capture the time dimension correlation of the spatio-temporal sequence data, which can refer to the correlation between the traffic sequence data of a certain cell and different time points. The traffic data of a cell has obvious periodicity in the time dimension, which is often 24 hours as a period, and a trough appears at about 3 a.m.

[0057] It should be noted that in the embodiments of the present application, the spatio-temporal data prediction device can determine the attention matrix of the time dimension according to the query matrix, the key-value matrix and the value matrix, including: performing matrix operation on the query matrix and the key-value matrix in the first dimension (the third dimension time sequence length L) and the third dimension (the last dimension feature encoding length (E)), obtaining a first operation result, and determining a time attention score matrix according to the operation result; and determining the attention matrix of the time dimension according to the time attention score matrix and the value matrix.

[0058] For example, when the spatio-temporal data prediction device determines the attention matrix of the time dimension according to the query matrix, the key-value matrix and the value matrix, by performing matrix operation on the query matrix and the key-value matrix in the first dimension (the third dimension time sequence length (L)) and the third dimension (the last dimension feature encoding length (E)), the first operation result is a matrix with a matrix dimension of [B, N, L, L], which can represent the correlation of a certain cell traffic sequence data and each time with other times, and then performing softmax operation on the last dimension (time sequence length L) of the matrix with a matrix dimension of [B, N, L, L] can obtain the time attention score matrix, so that the attention matrix of the time dimension can be determined according to the multiplication of the time attention score matrix and the value matrix. The above time dimension attention calculation process can be represented by the following formula.

[0059]

[0060] Wherein, d k is the dimension of the query matrix, the key-value matrix and the value matrix, and T refers to the transpose of the matrix.

[0061] It should be noted that in the embodiments of the present application, in addition to determining the attention matrix of the time dimension according to the query matrix, the key-value matrix and the value matrix, the spatio-temporal data prediction device can also determine the attention matrix of the space dimension, that is, the spatio-temporal data prediction device can capture the spatial dimension correlation in addition to the time dimension correlation of the spatio-temporal sequence data, which can further improve the accuracy of spatio-temporal sequence data prediction.

[0062] Further, in the embodiments of the present application, the spatio-temporal data prediction device captures the spatial dimension correlation of the spatio-temporal sequence data, that is, it can focus on the correlation between different cells at the same time point in the spatio-temporal sequence data, and the neighbor nodes will influence each other in the spatio-temporal sequence data.

[0063] Further, in the embodiment of the present application, the spatio-temporal data prediction device determines the attention matrix of the spatial dimension according to the query matrix, the key-value matrix and the value matrix, including: performing matrix operation on the query matrix and the key-value matrix in the second dimension (the second dimension is the number of nodes (N)) and the third dimension (the last dimension is the feature encoding length (E)), to obtain a second operation result, and determining the spatial attention score matrix according to the operation result; and determining the attention matrix of the spatial dimension according to the spatial attention score matrix and the value matrix.

[0064] For example, when the spatio-temporal data prediction device determines the attention matrix of the spatial dimension according to the query matrix, the key-value matrix and the value matrix, it can perform matrix operation on the query matrix and the key-value matrix in the second dimension (the second dimension is the number of nodes (N)) and the third dimension (the last dimension is the feature encoding length (E)), to obtain a second operation result, the second operation result is a matrix with a matrix dimension of [B, N, N, L], which can represent the correlation between each cell and other cells at the same time, and then a softmax operation is performed on the matrix with a matrix dimension of [B, N, N, L] to obtain a spatial attention score matrix, so that the attention matrix of the spatial dimension can be determined according to the multiplication of the spatial attention score matrix and the value matrix, and the spatial dimension attention calculation process can also be represented by the above formula (1).

[0065] It should be noted that in the embodiment of the present application, in addition to determining the attention matrix of the time dimension and the attention matrix of the spatial dimension according to the query matrix, the key-value matrix and the value matrix, the spatio-temporal data prediction device can also determine the attention matrix of the spatio-temporal dimension, that is, the spatio-temporal data prediction device can capture the spatio-temporal dimension correlation in addition to the time dimension correlation and the spatial dimension correlation of the spatio-temporal sequence data, that is, it can simultaneously focus on the time dimension correlation, the spatial dimension correlation and the spatio-temporal dimension correlation of the spatio-temporal sequence data, so as to improve the accuracy of spatio-temporal sequence data prediction.

[0066] Further, in the embodiment of the present application, Figure 5 The spatio-temporal data correlation diagram proposed in the embodiment of the present application is shown in Figure 5 As shown in the figure, the spatio-temporal data prediction device captures the spatio-temporal dimension correlation of the spatio-temporal sequence data, that is, it can focus on the correlation between different time points and different cells, t1 and t2 are two different time points, the circle represents a cell, and the arrow represents the correlation. The brown arrow at the same time point represents the spatial dimension influence, which can be captured by the spatial attention, the blue arrow between the two time points represents the time dimension influence, which can be captured by the time attention, but the mutual influence between the cells at different time points has not been focused. Figure 5 The green arrow in the figure represents the influence of the red node cell at the previous time point on its neighbor cell at the next time point.

[0067] It should be noted that in the embodiments of the present application, the spatio-temporal data prediction device can capture the spatio-temporal dimension correlation, that is, the influence of the changes of the surrounding cells at the last time on other cells at the next time, thereby avoiding the lag problem often occurring in spatio-temporal sequence data prediction.

[0068] Further, in the embodiments of the present application, the spatio-temporal data prediction device can determine the attention matrix of the spatio-temporal dimension according to the query matrix, the key-value matrix and the value matrix, including: determining the spatio-temporal attention score matrix by the query matrix at the t time and the key-value matrix at the t-1 time; wherein t is greater than 1; determining the attention matrix on the spatio-temporal dimension by the spatio-temporal attention score matrix and the value matrix at the t-1 time.

[0069] For example, when the spatio-temporal data prediction device determines the attention matrix of the spatio-temporal dimension according to the query matrix, the key-value matrix and the value matrix, it can calculate the influence of all nodes at time t-1 on all nodes at time t by performing matrix operation on the query matrix at time t and the key-value matrix at time t-1, and then perform softmax operation on the matrix after operation to obtain the spatio-temporal attention score matrix, so as to determine the attention matrix on the spatio-temporal dimension according to the multiplication of the spatio-temporal attention score matrix and the value matrix at time t-1.

[0070] It should be noted that in the embodiments of the present application, after the spatio-temporal data prediction device determines the attention matrix of the time dimension, the attention matrix of the space dimension and the attention matrix of the spatio-temporal dimension according to the query matrix, the key-value matrix and the value matrix, it can also generate the first output according to the attention matrix of the time dimension, the attention matrix of the space dimension and the attention matrix of the spatio-temporal dimension.

[0071] Specifically, the spatio-temporal data prediction device can perform summation operation on the attention matrix of the time dimension, the attention matrix of the space dimension and the attention matrix of the spatio-temporal dimension to obtain a third operation result; and then perform normalization processing on the third operation result to obtain the first output.

[0072] It should be noted that in the embodiments of the present application, the spatio-temporal data prediction device can perform normalization processing on the third operation result by Normalization and Dropout, thereby obtaining the first output

[0073] It should be noted that in the embodiments of the present application, the spatio-temporal data prediction device not only captures the correlation of the spatio-temporal sequence data in the time dimension, but also pays attention to the spatial dimension correlation and the spatio-temporal dimension correlation, that is, the spatio-temporal data prediction device can capture the correlation of different dimensions when predicting the spatio-temporal sequence data, so that the prediction result is more accurate. At the same time, the correlation of the spatial dimension changes with time, and in the attention module calculation, the weight can be dynamically calculated, solving the problem that the static adjacency matrix cannot capture the influence between the dynamic neighbor nodes.

[0074] Further, in the embodiments of the present application, assuming that the spatio-temporal data prediction device predicts the massive wireless cell traffic sequence data, after applying the spatial dimension attention and the spatio-temporal dimension attention in the attention module, the lag problem existing in the prediction of the spatio-temporal sequence data by the target data prediction model is solved, and there is a significant improvement in each evaluation index (the smaller the evaluation index value, the better the model). The application effect of the attention module is shown in Table 1.

[0075] Table 1

[0076] Model MAPE MAE Temporal dimension attention only 44.98 164.82 Temporal + spatial + spatio-temporal dimension attention 23.59 134.06

[0077] Wherein, MAPE refers to Mean Absolute Percentage Error, and MAE refers to Mean Absolute Error.

[0078] Further, in the embodiments of the present application, Figure 6 The prediction result schematic diagram under the attention to time correlation proposed by the embodiments of the present application is as shown in Figure 6 The pred_12 line can refer to the result after the spatio-temporal data prediction device predicts the massive wireless cell traffic sequence data, compared with the true_12 line (the true result), it can be seen that when the spatio-temporal data prediction device predicts the massive wireless cell traffic sequence data, if only the time dimension correlation is concerned, the prediction lag is serious.

[0079] Further, in the embodiments of the present application, Figure 7 The prediction result schematic diagram under the attention to time correlation + spatial dimension correlation + spatio-temporal dimension correlation proposed by the embodiments of the present application is as shown in Figure 7As shown, when the spatiotemporal data prediction apparatus predicts the massive wireless cell traffic sequence data, the pred_1 line, which is the result after the spatiotemporal data prediction apparatus predicts the massive wireless cell traffic sequence data, is basically consistent with the true_1 line (the true result) after the spatiotemporal data prediction apparatus pays attention to the spatial dimension correlation and the spatiotemporal dimension correlation on the basis of paying attention to the time dimension correlation. It can be seen that the spatiotemporal data prediction apparatus pays attention to the spatial dimension correlation and the spatiotemporal dimension correlation while capturing the time dimension correlation of the spatiotemporal sequence data, so that the prediction can capture details and has no lag problem, and the prediction result is more accurate.

[0080] It should be noted that, in the embodiments of the present application, as Figure 7 As shown, when the spatiotemporal data prediction apparatus predicts the massive wireless cell traffic sequence data, long-term prediction can be performed, for example, data about 51 hours in the future can be predicted. At present, the adjacency matrix is constructed based on the distance between cells, the latitude and longitude of the cell and other characteristics, and the obtained adjacency matrix cannot accurately reflect the relevance of two nodes. In addition, this method is usually suitable for short-term prediction, such as predicting 1-12 data points in the future. Assuming that the time granularity of the data is 15 minutes, this scheme is suitable for predicting data in the next 15 minutes to 3 hours, and the prediction result is too smooth and close to the average value in the long-term prediction task.

[0081] The embodiment of the present application provides a spatiotemporal data prediction method, which comprises: acquiring spatiotemporal sequence data; using a target data prediction model to predict the spatiotemporal sequence data and obtaining a prediction result corresponding to the spatiotemporal sequence data; wherein the target data prediction model comprises an attention module, and the attention module comprises a time dimension attention, a spatial dimension attention and a spatiotemporal dimension attention. It can be seen that when the spatiotemporal data prediction apparatus uses the target data prediction model to predict the spatiotemporal sequence data, the attention module in the target data prediction model can capture the time dimension correlation, the spatial dimension correlation and the spatiotemporal dimension correlation of the spatiotemporal sequence data, so that the prediction result corresponding to the spatiotemporal sequence data is more accurate. That is, the spatiotemporal data prediction method provided in the embodiment of the present application can capture multiple dimension correlations of the spatiotemporal sequence data, so as to improve the accuracy of the spatiotemporal sequence data prediction.

[0082] Embodiment two

[0083] Based on the above embodiments, another embodiment of the present application provides a spatio-temporal data prediction method, which can use spatial attention to focus on the influence of other nodes on the current node at the current timestamp, and can use temporal attention to focus on the influence of other timestamps on the current timestamp at the current node. In addition, it can also focus on the influence of other nodes and other timestamps on the current timestamp and the current node, i.e., the changes of the surrounding cells at the last time point, which can cause the changes of the current cell traffic at this time point. The spatio-temporal data prediction device based on the attention mechanism captures the spatio-temporal correlation of the spatio-temporal data prediction method, and uses attention to capture the correlation of the wireless cell traffic data in the time, space, and spatio-temporal synchronous dimensions. The implementation scheme is as follows.

[0084] It should be noted that in the embodiments of the present application, the target data prediction model can include an Informer model, and the Informer model can include an encoder (Encoder) and a decoder (Decoder), and the Encoder module and the Decoder module each include an attention module.

[0085] It should be noted that in the embodiments of the present application, as shown in Figure 2 , the overall structure of the target data prediction model includes two modules of Encoder and Decoder. The Encoder module has two sub-layers, which are a multi-head attention layer and a convolution layer. The multi-head attention layer uses self-attention to capture the spatial relationship, time sequence relationship, and spatio-temporal synchronous relationship between the wireless cell traffic data. The convolution layer uses convolution and pooling operations for feature dimension reduction.

[0086] It should be noted that in the embodiments of the present application, assuming that the input is a certain cell traffic data sequence a i , it is multiplied by three different parameter matrices W q , W k , and W v , which can be represented by the following formula.

[0087] q i =W q a i , k i =W k a i , v i =W v a i (2)

[0088] wherein the vector q i is called a query matrix (query), k i is a key matrix (key), and v i is a value matrix (value).

[0089] Further, in the embodiments of the present application, Figure 8 The attention score calculation process diagram for the embodiments of the present application is shown in FIG. 3. Figure 8 As shown, the spatio-temporal data prediction apparatus can multiply each query matrix and each key-value matrix, which can be represented by the following formula.

[0090]

[0091] where d is the dimension of the matrix.

[0092] Further, the result of multiplying each query matrix and each key-value matrix can be subjected to a softmax operation to obtain the attention score The attention score represents the influence weight between each element in the flow sequence, and T represents the length of the input sequence.

[0093] It should be noted that in the embodiments of the present application, Figure 9 The attention module output diagram for the embodiments of the present application is shown in FIG. 4. Figure 9 As shown, after the spatio-temporal data prediction apparatus determines the attention score, the attention score and the value matrix can be weighted to obtain the attention module output, which can be represented by the following formula.

[0094]

[0095] where the output b 1 The information of the entire time sequence is considered.

[0096] It should be noted that in the embodiments of the present application, the Decoder includes three sub-layers. The first layer is MaskedAttention, the input of which is the prediction sequence padded with 0. For example, the Decoder history sequence length is n_hist, the prediction sequence length is n_pred, x decoder The length is n_hist+n_pred, and the last n_pred bits are padded with 0, which is used to learn the relationship between the history and the prediction target. When attention operation is performed, the dot product corresponding to the mask will be set to negative infinity, so that the attention score obtained by softmax is 0. The output of the first sub-layer (Masked Attention) is taken as the query, and the output of the Encoder is taken as the key and the value, which are input into the attention module in the Decoder module.

[0097] It should be noted that in the embodiments of the present application, the input of the output layer in the target data prediction model is the output of the decoder module, the length of the output result is equal to the input of the decoder, and the last n_pred bits in the output are the prediction result.

[0098] Furthermore, in the embodiments of this application, the spatiotemporal data prediction device, targeting the characteristics of massive wireless cell traffic data, including spatial correlation, temporal correlation, and heterogeneity, includes three types of attention calculations in the attention module of the target data prediction model: time-dimensional attention calculation, spatial-dimensional attention calculation, and spatiotemporal synchronous attention calculation.

[0099] Specifically, such as Figure 4 As shown, time-dimensional attention focuses on the correlation between traffic sequence data of a specific cell at different times. The traffic data of a cell exhibits a clear periodicity in the time dimension, often with a 24-hour cycle, and a trough appears around 3 a.m.

[0100] It should be noted that in the embodiments of this application, the attention calculation of the attention module is performed on the time dimension of the input features, and single-head attention is used for simplicity. The number of input data cells is N, and the time series length is L. Assuming that the number of cells is 100 and the traffic series length is 24, then N = 100 and L = 24. The quiers, keys, and values ​​have the same dimension, which are all 4-dimensional matrices. The first dimension is the batch size (B), the second dimension is the number of nodes, the third dimension is the sequence length, and the last dimension is the feature encoding length (E). To calculate the attention in the time dimension, quiers and keys perform matrix operations on the third and fourth dimensions, and the output dimension is [B, N, L, L], which represents the correlation between each time step and other time steps in the traffic series of each cell. After the softmax operation, the time attention score matrix A, [B, N, L, L] is obtained, and multiplied by the values ​​matrix, the result dimension is [B, N, L, E]. The time dimension attention calculation process can be represented by the above formula (1).

[0101] It should be noted that, in the embodiments of this application, the spatiotemporal data prediction device can determine the attention matrix in the spatial dimension in addition to the attention matrix in the time dimension based on the query matrix, key value matrix, and value matrix. In other words, the spatiotemporal data prediction device can capture the spatial dimension correlation in addition to the temporal dimension correlation of spatiotemporal sequence data, which can further improve the accuracy of spatiotemporal sequence data prediction.

[0102] Furthermore, in the embodiments of this application, the spatiotemporal data prediction device captures the spatial dimension correlation of spatiotemporal sequence data, that is, it can focus on the correlation between different cells at the same time point in the spatiotemporal sequence data. In the spatiotemporal sequence data, neighboring nodes will influence each other.

[0103] Specifically, when the spatio-temporal data prediction apparatus performs spatial dimension attention calculation, the correlation between different cells at the same time point can be focused on. In the spatio-temporal data, there is mutual influence between neighbor nodes. The module attention is performed on the spatial dimension of the input feature, and the previous part is followed. The matrix operation is performed on the second and fourth dimensions of quiers and keys, and the output dimension is [B, N, N, L], which represents the correlation between each cell and other cells at each time point. The spatial attention score matrix A is obtained through the softmax operation, [B, N, N, L], and the matrix is multiplied with the value matrix, and the result dimension is [B, N, L, E].

[0104] Further, in the embodiment of the present application, when the spatio-temporal data prediction apparatus performs spatio-temporal synchronous attention calculation, the correlation between different cells at different time points can be focused on. As shown in FIG. 6, t1 and t2 are two different time points, and the circle represents a cell and the arrow represents the correlation. The brown arrow at the same time point represents the spatial dimension influence, which can be captured by the spatial attention, the blue arrow between the two time points represents the time dimension influence, which can be captured by the time attention, and the mutual influence between the cells at different time points has not been focused on. Figure 5 The green arrow in FIG. 7 represents the influence of the red node cell at the previous time point on the neighbor cells at the next time point. Figure 5

[0105] Further, in the embodiment of the present application, the spatio-temporal data prediction apparatus can take time t as the query and the previous time t-1 as the key to calculate the influence of all nodes at time t-1 on all nodes at time t, that is, the attention score matrix, and the feature representation at time t is obtained by weighted sum of the node feature at t-1 using the attention score. The spatio-temporal synchronous module calculates the correlation between a certain cell and any other cell at adjacent time points, that is, captures the influence of the changes of the surrounding cells at the previous time point on the other cells at the next time point. The lag problem often occurring in spatio-temporal data prediction is avoided.

[0106] It should be noted that, in the embodiment of the present application, the spatio-temporal data prediction apparatus can determine the attention matrix of the time dimension, the attention matrix of the spatial dimension, and the attention matrix of the spatio-temporal dimension according to the query matrix, the key value matrix and the value matrix, that is, the spatio-temporal data prediction apparatus can capture the spatio-temporal dimension correlation in addition to the time dimension correlation and the spatial dimension correlation of the spatio-temporal sequence data, that is, the time dimension correlation, the spatial dimension correlation and the spatio-temporal dimension correlation of the spatio-temporal sequence data can be focused on at the same time, so as to improve the accuracy of the spatio-temporal sequence data prediction.

[0107] ​It should be noted that, in the embodiments of this application, the outputs of the above three attention dimensions capture the temporal correlation, spatial correlation, and spatiotemporal synchronization correlation of massive wireless cell traffic sequence data, respectively. The sum of the three is processed by Normalization and Dropout to obtain the output of the attention module.

[0108] It should be noted that, in the embodiments of this application, the spatiotemporal data prediction device not only captures the correlation of spatiotemporal sequence data in the time dimension, but also pays attention to the correlation in the spatial dimension and the spatiotemporal dimension. That is, when predicting spatiotemporal sequence data, the spatiotemporal data prediction device can capture the correlation in different dimensions, making the prediction results more accurate. At the same time, the correlation in the spatial dimension changes over time. In terms of attention module calculation, weights can be dynamically calculated, solving the problem that static adjacency matrices cannot capture the influence between such dynamically changing neighbor nodes.

[0109] Furthermore, in the embodiments of this application, as shown in Table 1 above, after applying the spatial and spatiotemporal synchronization attention module to the task of predicting massive wireless cell traffic sequences, the lag problem that is common in time series data prediction is solved, and at the same time, there is a significant improvement in various evaluation indicators (the smaller the evaluation indicator value, the better the model).

[0110] Furthermore, in the embodiments of this application, such as Figure 6 As shown, when a spatiotemporal data prediction device predicts massive wireless cell traffic sequence data, if only the correlation of the time dimension is considered, the prediction will lag significantly.

[0111] Furthermore, in the embodiments of this application, such as Figure 7 As shown, when the spatiotemporal data prediction device predicts massive wireless cell traffic sequence data, by paying attention to spatial and spatiotemporal correlations in addition to temporal correlations, the prediction can capture more details and has no lag issues, making the prediction results more accurate.

[0112] It should be noted that, in the embodiments of this application, as... Figure 7 As shown, when the spatiotemporal data prediction device predicts massive wireless cell traffic sequence data, it can make long-term predictions, for example, it can predict data for the next approximately 51 hours.

[0113] The embodiment of the application provides a spatio-temporal data prediction method, which comprises the following steps: acquiring spatio-temporal sequence data; and using a target data prediction model to predict the spatio-temporal sequence data, so as to obtain a prediction result corresponding to the spatio-temporal sequence data; wherein the target data prediction model comprises an attention module, and the attention module comprises time dimension attention, space dimension attention and spatio-temporal dimension attention. Therefore, when the spatio-temporal data prediction device uses the target data prediction model to predict the spatio-temporal sequence data, the time dimension correlation, the space dimension correlation and the spatio-temporal dimension correlation of the spatio-temporal sequence data can be captured through the attention module in the target data prediction model, so that the prediction result corresponding to the spatio-temporal sequence data is more accurate. That is to say, the spatio-temporal data prediction method provided in the embodiment of the application can capture multiple dimension correlations of the spatio-temporal sequence data, so as to improve the accuracy of spatio-temporal sequence data prediction.

[0114] Embodiment three

[0115] Based on the above-mentioned embodiments, the embodiment of the application provides a spatio-temporal data prediction device, Figure 10 The composition structure of the spatio-temporal data prediction device is shown in Figure 1 As shown in Figure 10 The spatio-temporal data prediction device 10 comprises an acquisition unit 11 and a prediction unit 12.

[0116] The acquisition unit 11 is configured to acquire spatio-temporal sequence data.

[0117] The prediction unit 12 is configured to use a target data prediction model to predict the spatio-temporal sequence data, so as to obtain a prediction result corresponding to the spatio-temporal sequence data; wherein the target data prediction model comprises an attention module, and the attention module comprises time dimension attention, space dimension attention and spatio-temporal dimension attention.

[0118] In the embodiment of the application, further, Figure 11 The composition structure of the spatio-temporal data prediction device is shown in Figure 2 As shown in Figure 11 The spatio-temporal data prediction device 10 provided in the embodiment of the application can further comprise a processor 13 and a memory 14 in which processor-executable instructions are stored, and further, the spatio-temporal data prediction device 10 can further comprise a communication interface 15 and a bus 16 for connecting the processor 13, the memory 14 and the communication interface 15.

[0119] In the embodiments of the present application, the processor 13 can be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, or a microprocessor. It can be understood that, for different devices, the electronic device used to implement the functions of the processor can also be other devices, and the embodiments of the present application are not limited specifically. The space-time data prediction device 10 can further include a memory 14, which can be connected with the processor 13. The memory 14 is used to store executable program codes, and the program codes include computer operation instructions. The memory 14 can include a high-speed RAM memory, and can also include a non-volatile memory, for example, at least two disk memories.

[0120] In the embodiments of the present application, the bus 16 is used to connect the communication interface 15, the processor 13, and the memory 14, and to realize the mutual communication among these devices.

[0121] In the embodiments of the present application, the memory 14 is used to store instructions and data.

[0122] Further, in the embodiments of the present application, the processor 13 is used for the space-time data prediction device to acquire space-time sequence data, and to use a target data prediction model to predict the space-time sequence data, to obtain a prediction result corresponding to the space-time sequence data. The target data prediction model includes an attention module, and the attention module includes time dimension attention, space dimension attention, and space-time dimension attention.

[0123] In practical applications, the memory 14 can be a volatile memory, such as a Random-Access Memory (RAM), or a non-volatile memory, such as a Read-Only Memory (ROM), a flash memory, a Hard Disk Drive (HDD) or a Solid-State Drive (SSD), or a combination of the above types of memories, and provides instructions and data to the processor 13.

[0124] The embodiment of the present application provides a kind of spatio-temporal data prediction device, spatio-temporal data prediction device can obtain spatio-temporal sequence data;Using target data prediction model, the spatio-temporal sequence data is predicted, obtains the prediction result corresponding to the spatio-temporal sequence data;Wherein, the target data prediction model includes attention module, and the attention module includes time dimension attention, spatial dimension attention and spatio-temporal dimension attention.It can be seen from this, when spatio-temporal data prediction device uses target data prediction model to predict spatio-temporal sequence data, the time dimension correlation, spatial dimension correlation and spatio-temporal dimension correlation of spatio-temporal sequence data can be captured by attention module in target data prediction model, so that the prediction result corresponding to spatio-temporal sequence data is more accurate.That is to say, the spatio-temporal data prediction method proposed in the embodiment of the present application can capture multiple dimension correlations of spatio-temporal sequence data, to improve the accuracy of spatio-temporal sequence data prediction.

[0125] The embodiment of the present application provides a computer readable storage medium, which stores a program, and the program is executed by a processor to realize the spatio-temporal data prediction method described above.

[0126] Specifically, the program instructions corresponding to the spatio-temporal data prediction method in the embodiment can be stored on optical discs, hard disks, U disks and other storage media, and when the program instructions corresponding to the spatio-temporal data prediction method in the storage medium are read or executed by an electronic device, the following steps are included:

[0127] Obtain spatio-temporal sequence data;

[0128] Using target data prediction model, the spatio-temporal sequence data is predicted, obtains the prediction result corresponding to the spatio-temporal sequence data;Wherein, the target data prediction model includes attention module, and the attention module includes time dimension attention, spatial dimension attention and spatio-temporal dimension attention.

[0129] Those skilled in the art will appreciate that embodiments of the application can be further implemented in a computer program product tangibly embodied in a machine-readable storage medium (e.g., memory storage) including instructions that, when executed by a machine (e.g., a processor), cause the machine to perform the steps of embodiments of the application. The terms "machine-readable storage medium" or "computer-readable storage medium" include, but are not limited to, portable or fixed storage devices, optical storage devices, magnetic storage devices, wireline, optical, or other communication links, commonly known as computer communication networks, including the Internet, intranets, local area networks (LANs), wide area networks (WANs), etc. The terms "machine-readable storage medium" or "computer-readable storage medium" also include any medium that is capable of storing or encoding computer readable instructions for execution by a machine (e.g., a processor) and that cause the machine to perform any one or more of the steps that define the procedures described in the detailed description section of the instant disclosure. The terms "machine-readable storage medium" or "computer-readable storage medium" therefore include, but are not limited to, memories (e.g., optical, read-only memories (ROM); flash memories; etc.), floppy disks; compact disks (CD); optical disks; and machine- readable storage media that are external to the computer or computing device or transitory signals.

[0130] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams. The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams.

[0131] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams. The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams.

[0132] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams. The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions that execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks or in the combination of flowchart blocks and / or blocks in the block diagrams.

[0133] The foregoing is merely exemplary and is not intended to limit the scope of the present disclosure.

Claims

1. A spatiotemporal data prediction method, applied to a spatiotemporal data prediction device, comprising: obtaining spatiotemporal sequence data; wherein the spatiotemporal sequence data comprises current wireless cell traffic data; using a target data prediction model to predict the spatiotemporal sequence data, to obtain a prediction result corresponding to the spatiotemporal sequence data; wherein the target data prediction model comprises an attention module, the attention module comprises time dimension attention, space dimension attention and spatiotemporal dimension attention, to capture time dimension correlation, space dimension correlation and spatiotemporal dimension correlation of the spatiotemporal sequence data, and the prediction result comprises future wireless cell traffic data.

2. The method of claim 1, wherein, The using a target data prediction model to predict the spatiotemporal sequence data comprises: based on the target data prediction model, performing calculation of the time dimension attention, the space dimension attention and the spatiotemporal dimension attention on the spatiotemporal sequence data, to obtain a first output of the attention module; based on the first output, obtaining the prediction result.

3. The method of claim 2, wherein, The based on the target data prediction model, performing calculation of the time dimension attention, the space dimension attention and the spatiotemporal dimension attention on the spatiotemporal sequence data, to obtain a first output of the attention module comprises: based on the target data prediction model, determining a query matrix, a key-value matrix and a value matrix according to the spatiotemporal sequence data; determining a time dimension attention matrix, a space dimension attention matrix and a spatiotemporal dimension attention matrix according to the query matrix, the key-value matrix and the value matrix; generating the first output according to the time dimension attention matrix, the space dimension attention matrix and the spatiotemporal dimension attention matrix.

4. The method of claim 3, wherein, The method further comprises: determining a first dimension, a second dimension and a third dimension corresponding to the spatiotemporal sequence data.

5. The method of claim 4, wherein, The determining a time dimension attention matrix, a space dimension attention matrix and a spatiotemporal dimension attention matrix according to the query matrix, the key-value matrix and the value matrix comprises: performing matrix operation on the query matrix and the key-value matrix in the first dimension and the third dimension, to obtain a first operation result, and determining a time attention score matrix according to the operation result; determining the time dimension attention matrix according to the time attention score matrix and the value matrix.

6. The method of claim 4, wherein, The determining a time dimension attention matrix, a space dimension attention matrix and a spatiotemporal dimension attention matrix according to the query matrix, the key-value matrix and the value matrix comprises: performing matrix operation on the query matrix and the key-value matrix in the second dimension and the third dimension, to obtain a second operation result, and determining a space attention score matrix according to the operation result; determining the space dimension attention matrix according to the space attention score matrix and the value matrix.

7. The method of claim 4, wherein, The determining a time dimension attention matrix, a space dimension attention matrix and a spatiotemporal dimension attention matrix according to the query matrix, the key-value matrix and the value matrix comprises: Determine a space-time attention score matrix through the query matrix at the t-th moment and the key value matrix at the (t-1)-th moment; wherein t is greater than 1; Determine an attention matrix in the space-time dimension through the space-time attention score matrix and the value matrix at the (t-1)-th moment.

8. The method according to any of claims 5-7, characterized by, The first output is generated according to the attention matrix in the time dimension, the attention matrix in the space dimension, and the attention matrix in the space-time dimension, including: Summation operation is performed on the attention matrix in the time dimension, the attention matrix in the space dimension, and the attention matrix in the space-time dimension to obtain a third operation result; Normalization processing is performed on the third operation result to obtain the first output.

9. The method of claim 1, wherein, The target data prediction model includes an Informer model, and the Informer model includes an encoder and a decoder, and the encoder and the decoder both include the attention module.

10. The method of claim 9, wherein, The encoder includes a multi-head attention layer and a convolution layer, and the decoder includes a Masked Attention layer, an attention layer, and a convolution layer.

11. A spatio-temporal data prediction apparatus characterized by comprising: The space-time data prediction apparatus includes an acquisition unit and a prediction unit. The acquisition unit is configured to acquire space-time sequence data, wherein the space-time sequence data includes current wireless cell traffic data. The prediction unit is configured to use a target data prediction model to predict the space-time sequence data to obtain a prediction result corresponding to the space-time sequence data, wherein the target data prediction model includes an attention module, the attention module includes time dimension attention, space dimension attention, and space-time dimension attention to capture time dimension correlation, space dimension correlation, and space-time dimension correlation of the space-time sequence data, and the prediction result includes future wireless cell traffic data.

12. A spatio-temporal data prediction apparatus characterized by comprising: The space-time data prediction apparatus includes a processor and a memory. The memory is configured to store a computer program capable of running on the processor. The processor is configured to execute the method of any one of claims 1-10 when running the computer program.

13. A computer-readable storage medium, characterized in that, The storage medium has computer program code stored thereon, and the computer program code is executed by a computer to execute the method of any one of claims 1-10.

Citation Information

Patent Citations

  • Wireless network flow prediction method based on multi-graph convolution

    CN112911626A

  • Long-term network traffic prediction method based on deep learning

    CN113316163A