Traffic flow prediction model training, traffic flow prediction method, device and equipment

By processing the input data of the spatiotemporal module in the traffic flow prediction model and extracting effective information features, the problem of large traffic flow prediction errors in existing technologies is solved, and accurate traffic flow prediction and improved road network safety are achieved.

CN116663717BActive Publication Date: 2025-12-16HEBEI UNIV OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310547059.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-16
Publication Date
2025-12-16
Estimated Expiration
2043-05-16

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods cannot effectively extract the periodicity of time series data and the dynamic changes in road network structure, resulting in large traffic flow prediction errors and an inability to disperse vehicles in a timely manner to improve road network safety.

Method used

By determining the input data of the spatiotemporal module in the traffic flow prediction model and inputting it into the spatiotemporal module for processing, effective information features are extracted, and the traffic flow prediction model is trained to accurately predict traffic flow.

Benefits of technology

It achieves accurate traffic flow prediction, enabling timely dispersal of vehicles in the road network and improving road network safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116663717B_ABST
    Figure CN116663717B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a kind of traffic flow prediction model training, traffic flow prediction method, device and equipment.The traffic flow prediction model training method includes: determining the module input data corresponding to space-time module in traffic flow prediction model;Wherein, the number of the space-time module is at least two;The module input data includes first module input data and second module input data;The module input data is input into the space-time module, and the space-time module intermediate data is obtained;According to each space-time module intermediate data, determine traffic flow prediction result, to train the traffic flow prediction model according to the traffic flow prediction result.The technical scheme of the embodiment of the present application can accurately predict traffic flow, so as to timely disperse vehicle in road network, improve the safety of road network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The embodiment of the present application relates to the technical field of intelligent transportation, in particular to a traffic flow prediction model training method, a traffic flow prediction method, device and equipment. BACKGROUND

[0002] In recent years, congestion events and traffic accidents on the road still occur from time to time, which not only brings impact to the society, but also causes great economic loss. By predicting the traffic flow of vehicles, the highway regulatory department can provide the basis for command and dispatch. When the number of vehicles on the same section is large, the regulatory department can timely disperse the vehicles to prevent the gathering of vehicles from causing major traffic accidents and improve the safety of the entire highway network.

[0003] However, in the existing traffic flow prediction method, the time correlation is usually captured by a time period and a step length set by a person in advance, and the spatial correlation is captured by a pre-defined adjacency matrix, so as to predict the overall traffic flow according to the time correlation and the spatial correlation. However, the regularity of the overall traffic flow is not strong in the above method, and the periodicity of the time series data cannot be effectively extracted by using the period set by a person in advance, and the extraction of the spatial correlation using the pre-defined road network structure ignores the dynamic changes of the road network in the time change. Therefore, the existing method cannot extract the effective information features in the data, resulting in a large traffic flow prediction error. SUMMARY

[0004] The embodiment of the present application provides a traffic flow prediction model training method, a traffic flow prediction method, device and equipment, which can accurately predict the traffic flow, thereby timely dispersing the vehicles in the road network and improving the safety of the road network.

[0005] According to an aspect of the present application, a traffic flow prediction model training method is provided, comprising:

[0006] Determine the module input data corresponding to the space-time module in the traffic flow prediction model; wherein the number of space-time modules is at least two; the module input data includes first module input data and second module input data;

[0007] Input the module input data into the space-time module to obtain the space-time module intermediate data;

[0008] Determine the traffic flow prediction result according to each space-time module intermediate data, and train the traffic flow prediction model according to the traffic flow prediction result.

[0009] According to another aspect of the present application, a traffic flow prediction method is provided, comprising:

[0010] Obtain the current traffic flow data;

[0011] input the current traffic flow data into a pre-trained traffic flow prediction model to obtain target traffic flow data corresponding to the current traffic flow data;

[0012] The traffic flow prediction model is trained by the traffic flow prediction model training method in any of the embodiments of the present application.

[0013] According to another aspect of the present application, a traffic flow prediction model training device is provided, comprising:

[0014] An input data determination module is configured to determine module input data corresponding to a space-time module in a traffic flow prediction model; the number of space-time modules is at least two; the module input data comprises first module input data and second module input data;

[0015] An intermediate data determination module is configured to input the module input data into the space-time module to obtain space-time module intermediate data;

[0016] A prediction model training module is configured to determine a traffic flow prediction result according to each space-time module intermediate data, and train the traffic flow prediction model according to the traffic flow prediction result.

[0017] According to another aspect of the present application, a traffic flow prediction device is provided, comprising:

[0018] A data acquisition module is configured to acquire current traffic flow data;

[0019] A data prediction module is configured to input the current traffic flow data into a pre-trained traffic flow prediction model to obtain target traffic flow data corresponding to the current traffic flow data;

[0020] The traffic flow prediction model is trained by the traffic flow prediction model training method in any of the embodiments of the present application.

[0021] According to another aspect of the present application, an electronic device is provided, comprising:

[0022] at least one processor; and

[0023] a memory in communication with the at least one processor; wherein

[0024] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the traffic flow prediction model training method in any of the embodiments of the present application, or execute the traffic flow prediction method in any of the embodiments of the present application.

[0025] According to another aspect of the present application, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the traffic flow prediction model training method according to any of the embodiments of the present application, or to implement the traffic flow prediction method according to any of the embodiments of the present application.

[0026] The technical solution of the embodiments of the present application determines the module input data corresponding to the space-time module in the traffic flow prediction model, inputs the module input data into the space-time module to obtain the space-time module intermediate data, determines the traffic flow prediction result according to each space-time module intermediate data, trains the traffic flow prediction model according to the traffic flow prediction result, inputs the obtained current traffic flow data into the trained traffic flow prediction model to obtain the target traffic flow data, solves the problem that the traffic flow prediction error is large due to the inability to extract effective information features in the data in the prior art, and can accurately predict the traffic flow, thereby dispersing the vehicles in the road network in time and improving the safety of the road network.

[0027] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0029] Figure 1 is a flowchart of a traffic flow prediction model training method provided by the first embodiment of the present application;

[0030] Figure 2 is an architecture diagram of a traffic flow prediction model provided by the first embodiment of the present application;

[0031] Figure 3 is a schematic diagram of convolution calculation provided by the first embodiment of the present application;

[0032] Figure 4 is an architecture diagram of a space-time module provided by the first embodiment of the present application;

[0033] Figure 5 is a flowchart of a traffic flow prediction method provided by the second embodiment of the present application;

[0034] Figure 6is a schematic diagram of a vehicle flow prediction model training device provided by an embodiment four of the present application.

[0035] Figure 7 is a schematic diagram of a vehicle flow prediction device provided by an embodiment five of the present application.

[0036] Figure 8 is a structural schematic diagram of an electronic device implementing the vehicle flow prediction model training method or the vehicle flow prediction method. DETAILED DESCRIPTION

[0037] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0038] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0039] Embodiment one

[0040] Figure 1 is a flowchart of a vehicle flow prediction model training method provided by an embodiment one of the present application. The embodiment can be applicable to accurately predict vehicle flow. The method can be executed by a vehicle flow prediction model training device. The device can be realized by software and / or hardware, and can be directly integrated in an electronic device executing the method. The electronic device can be a terminal device or a server device. The present application does not limit the type of electronic device executing the vehicle flow prediction model training method. Specifically, as shown in the figure, the vehicle flow prediction model training method can include the following steps: Figure 1

[0041] S110, determine the module input data corresponding to the space-time module in the vehicle flow prediction model. ​

[0042] The number of the spatio-temporal modules can be at least two. The module input data can include first module input data and second module input data.

[0043] The traffic flow prediction model can be a model for predicting traffic flow. The spatio-temporal module can be a module in the traffic flow prediction model, and can be used for processing time characteristics and spatial characteristics of the data input into the module. The module input data can be data input into the spatio-temporal module. The first module input data can be one of the data input into the spatio-temporal module. The second module input data can be another of the data input into the spatio-temporal module.

[0044] It can be understood that the module input data can be the same as or different from the input data of the traffic flow prediction model, and the embodiments of the present application do not limit this. For example, the data input into the traffic flow prediction model can be determined as the module input data, or the data input into the traffic flow prediction model can be processed to determine the module input data, or the module input data corresponding to the next spatio-temporal module can be determined according to the output data of the previous spatio-temporal module. For example, the data input into the traffic flow prediction model can be connected by a full connection layer.

[0045] In the embodiments of the present application, the module input data corresponding to each spatio-temporal module in the traffic flow prediction model is determined. It can be understood that the number of the spatio-temporal modules in the traffic flow prediction model is not limited by the embodiments of the present application, and each spatio-temporal module can correspond to first module input data and second module input data. Optionally, the number of the spatio-temporal modules can be determined by training the traffic flow prediction model.

[0046] Optionally, before determining the module input data corresponding to the spatio-temporal module in the traffic flow prediction model, the method can further include: obtaining traffic flow sample data, and inputting the traffic flow sample data into a dynamic graph construction module in the traffic flow prediction model to obtain dynamic graph output data; and determining the first module input data corresponding to the spatio-temporal module in the traffic flow prediction model can include: determining the first module input data of each spatio-temporal module according to the dynamic graph output data.

[0047] The traffic flow sample data can be sample data used for training the traffic flow prediction model. It can be understood that the traffic flow sample data can be a set of data, and the length of the traffic flow sample data can be set according to the input data length requirement corresponding to the traffic flow prediction model. For example, the traffic flow sample data can include 12 data, each of which is 5-minute traffic flow data, and the traffic flow sample data can represent one hour of traffic flow data. The dynamic graph construction module can be another module in the traffic flow prediction model and can be used to construct a dynamic graph. The dynamic graph output data can be the result data output by the dynamic graph construction module after data processing on the input data.

[0048] Specifically, the traffic flow sample data is obtained and input into the dynamic graph construction module in the traffic flow prediction model to obtain dynamic graph output data, so as to determine the first module input data of each spatio-temporal module according to the dynamic graph output data. It can be understood that in the training process of the traffic flow prediction model, the first module input data of each spatio-temporal module can be determined according to the dynamic graph output data.

[0049] Optionally, the dynamic graph output data can be dynamic tensor data; determining the first module input data of each spatio-temporal module according to the dynamic graph output data can include extracting a dynamic graph adjacency matrix in the dynamic graph output data; wherein the dynamic graph adjacency matrix is an adjacency matrix including a time dimension; and determining the dynamic graph adjacency matrix as the first module input data of each spatio-temporal module.

[0050] Specifically, after the traffic flow sample data is input into the dynamic graph construction module in the traffic flow prediction model to obtain the dynamic graph output data, the dynamic graph adjacency matrix can be further extracted in the dynamic graph output data to determine the dynamic graph adjacency matrix as the first module input data of each spatio-temporal module. It can be understood that the dynamic graph adjacency matrix can be an adjacency matrix with time extracted from the constructed dynamic tensor data (i.e., dynamic graph output data).

[0051] In one specific example of the present application, Figure 2 is an architecture diagram of a traffic flow prediction model provided by Embodiment One of the present application, as shown in Figure 2 The traffic flow prediction model can include an input layer, a dynamic graph constructor (i.e., a dynamic graph construction module), a plurality of spatio-temporal blocks (i.e., spatio-temporal modules), and an output layer. The input layer and the output layer can be fully connected layers.

[0052] Optionally, before inputting the traffic flow sample data into the dynamic graph construction module of the traffic flow prediction model, the dynamic graph construction module can be constructed according to the time slot matrix, the source node matrix, the target node matrix and the core tensor. It can be understood that the dynamic graph construction module can be an adjacency tensor with learnable parameters, and the dynamic graph construction module can enable certain structures of the dynamic graph to be shared across time and space. Specifically, the adjacency tensor can be calculated according to the time slot matrix, the source node matrix, the target node matrix and the core tensor to simulate the potential and time-varying spatial dependency between nodes.

[0053] Specifically, the time slot matrix can be represented as ; the source node matrix can be represented as ; the target node matrix can be represented as ; and the core tensor can be represented as .

[0054] wherein d represents an embedding dimension; represents a number of timestamps; represents a number of source nodes; represents a number of target nodes.

[0055] Specifically, the dynamic graph construction module can be constructed based on the following formula:

[0056]

[0057]

[0058]

[0059] wherein represents an adjacency tensor, i.e., the dynamic graph construction module; represents initialization of the adjacency tensor; represents a new adjacency tensor obtained by maximizing the initialized adjacency tensor; o represents a first dimension of a tensor matrix; p represents a second dimension of the tensor matrix; and r represents a third dimension of the tensor matrix; represents the time slot matrix at the timestamp t; represents the core tensor when the values of each dimension are o, p and r, respectively; represents the matrix when the target node is i; represents the matrix when the source node is j.

[0060] Optionally, before acquiring the traffic flow sample data, the traffic flow data can be collected and the collected traffic flow data can be processed. For example, the collected traffic flow data can be divided into time slices of 5 minutes, the data of each time slice can be summarized according to vehicle types and time, and the gantry data with missing or incorrect data can be filtered out to generate an initial data set. Then, the data in the initial data set can be processed by a data loader to obtain input sequence data (the data length can be 12) and output sequence data (the data length can be 12). Finally, the input sequence can be stored as input sample data (i.e., traffic flow sample data) in a sample data set, and the output sequence data can be stored as output sample data (i.e., the true value corresponding to the traffic flow prediction result) in the sample data set.

[0061] Optionally, determining the second module input data corresponding to the spatio-temporal module in the traffic flow prediction model can include: in a case where the spatio-temporal module is not the first spatio-temporal module, determining the spatio-temporal module as a current spatio-temporal module, and determining the previous spatio-temporal module of the current spatio-temporal module as a target spatio-temporal module; determining first target module input data, second target module input data, and target module intermediate data of the target spatio-temporal module; performing convolution calculation on the first target module input data and the target module intermediate data to obtain convolution data; performing residual connection on the convolution data and the second target module input data to obtain target module output data; and determining the target module output data as the second module input data of the current spatio-temporal module.

[0062] The current spatio-temporal module can be one of the plurality of spatio-temporal modules. It can be understood that the current spatio-temporal module is not the first spatio-temporal module. The target spatio-temporal module can be the previous spatio-temporal module of the current spatio-temporal module. For example, assuming that the current spatio-temporal module is the third spatio-temporal module, the target spatio-temporal module is the second spatio-temporal module. The first target module input data can be one input data of the target spatio-temporal module. The second target module input data can be another input data of the target spatio-temporal module. The target module intermediate data can be intermediate processing result data obtained by the target spatio-temporal module by processing the input data. The convolution data can be result data obtained by performing convolution calculation on the first target module input data and the target module intermediate data. The target module output data can be result data output by the target spatio-temporal module after processing the input data.

[0063] Specifically, when the space-time module is not the first space-time module, the space-time module can be determined as a current space-time module, and a previous space-time module of the current space-time module is determined as a target space-time module, so as to determine first target module input data, second target module input data and target module intermediate data of the target space-time module, thereby performing convolution calculation on the first target module input data and the target module intermediate data to obtain convolution data, and performing residual connection on the convolution data and the second target module input data to obtain target module output data, and then determining the target module output data as second module input data of the current space-time module.

[0064] Optionally, the convolution calculation on the first target module input data and the target module intermediate data can be convolution on different graphs at different time slices. For example, Figure 3 is a schematic diagram of convolution calculation provided by an embodiment of the present application, assuming that the first target module input data includes dynamic graph data at time 0 Figure 1 and dynamic graph data at time 1 Figure 2 , and the target module intermediate data includes data 1 at time 0 and data 2 at time 1, when performing convolution calculation, the dynamic graph data at time 0 Figure 1 is convoluted with the data 1 at time 0, and the dynamic graph data at time 1 Figure 2 is convoluted with the data 2 at time 1.

[0065] Specifically, the convolution calculation on the first target module input data and the target module intermediate data to obtain the convolution data can be determined based on the following formula:

[0066]

[0067] wherein, represents convolution data of the lth space-time module; represents dynamic graph data at time t in the first target module input data; k represents the maximum diffusion step length; represents data at time t in the target module intermediate data of the lth space-time module; represents a parameter with a depth of k.

[0068] Optionally, the second module input data of the current space-time module can be determined based on the following formula:

[0069]

[0070] wherein, represents second module input data of the (l+1)th space-time module; represents second module input data of the lth space-time module.

[0071] Optionally, the second module input data corresponding to the spatio-temporal module in the traffic flow prediction model can also include: when the spatio-temporal module is the first spatio-temporal module, obtaining traffic flow sample data, and converting the traffic flow sample data through a full connection layer of the traffic flow prediction model to obtain the second module input data of the spatio-temporal module.

[0072] Specifically, the second module input data of the spatio-temporal module can be determined according to the traffic flow sample data, and can be determined based on the following formula:

[0073]

[0074] wherein, the second module input data of the first spatio-temporal module; the traffic flow sample data; W represents a weight; and b represents an offset.

[0075] S120, inputting the module input data into the spatio-temporal module to obtain spatio-temporal module intermediate data.

[0076] The spatio-temporal module intermediate data can be intermediate processing result data obtained by the spatio-temporal module processing the input data.

[0077] In the embodiment of the application, after determining the module input data corresponding to each spatio-temporal module in the traffic flow prediction model, the module input data can be further input into the spatio-temporal module to obtain the spatio-temporal module intermediate data.

[0078] Optionally, inputting the module input data into the spatio-temporal module to obtain the spatio-temporal module intermediate data can include: performing time series decomposition on the second module input data to obtain periodic item data and trend item data; performing periodic data processing on the periodic item data to obtain processed periodic data; and determining the spatio-temporal module intermediate data according to the processed periodic data and the trend item data.

[0079] The time series decomposition can decompose the time series of the second module input data into multiple parts. It can be understood that each part can represent a potential time pattern, such as periodic item data or trend item data. The periodic item data can be data representing a periodic cycle feature in the second module input data. The trend item data can be data representing a long-term trend feature in the second module input data. The periodic data processing can be data processing on the periodic item data. It can be understood that the data processing on the periodic item data can obtain data with more obvious periodic cycle features. The processed periodic data can be result data obtained after the periodic data processing. That is, the periodic cycle feature of the processed periodic data is more obvious than that of the periodic item data.

[0080] Specifically, after determining the module input data corresponding to each spatiotemporal module in the traffic flow prediction model, the second module input data can be further decomposed into periodic item data and trend item data in time series, the periodic item data is processed to obtain processed periodic data, and the spatiotemporal module intermediate data is determined according to the processed periodic data and the trend item data.

[0081] Optionally, the second module input data is decomposed in time series to obtain the periodic item data and the trend item data, which can be determined based on the following formula:

[0082]

[0083]

[0084] wherein, the second module input data of the lth spatiotemporal module is represented by the periodic item data of the lth spatiotemporal module is represented by the trend item data of the lth spatiotemporal module is represented by

[0085] Optionally, the periodic data processing on the periodic item data to obtain the processed periodic data can include: determining the autocorrelation coefficient of the periodic item data, and determining at least one data period corresponding to the periodic item data according to the autocorrelation coefficient; determining at least one similar time series corresponding to the periodic item data according to each data period, and performing data aggregation on each similar time series to obtain at least one aggregated periodic data; and performing data fusion on each aggregated periodic data and the periodic item data to obtain the processed periodic data.

[0086] wherein, the data period can be the period of the estimated periodic item data. It can be understood that the data period can be one or multiple, and the embodiments of the present application do not limit this. The similar time series can be similar time series in a period. The aggregated periodic data can be data obtained by aggregating similar time series. It can be understood that each data period can correspond to a similar time series, and each similar time series can be aggregated to obtain an aggregated periodic data. That is, the number of aggregated periodic data can be consistent with the number of data periods.

[0087] Specifically, after the time series decomposition of the second module input data to obtain the periodic term data and the trend term data, the autocorrelation coefficient of the periodic term data can be further determined, and the data period corresponding to the periodic term data is determined according to the autocorrelation coefficient, so as to determine the similar time series corresponding to the periodic term data according to the data period, and the aggregated periodic data is obtained by data aggregation of the similar time series, thereby data fusion of the aggregated periodic data and the periodic term data to obtain the processed periodic data. Optionally, the similar time series can be aggregated by shifting time. It can be understood that the periodic fluctuation can be smoothed by moving average to highlight the long-term trend.

[0088] It can be understood that the autocorrelation mechanism is used for the decomposed periodic term, and by analyzing the time lag relationship between two signals, when the lag value (the maximum possible value of the length of the lag term) corresponding to the maximum correlation between the two signals is found, the autocorrelation coefficient calculated is the period thereof.

[0089] Optionally, the autocorrelation coefficient of the periodic term data can be determined by fast Fourier transform, and specifically, the autocorrelation coefficient of the periodic term data can be determined based on the following formula:

[0090]

[0091] wherein, represents the autocorrelation coefficient between and and L represents the total length of the periodic term data; represents the data period, i.e. the estimated period length.

[0092] It should be noted that when the autocorrelation coefficient of the periodic term data is determined by fast Fourier transform, the signal can be converted to the frequency domain first, and then calculated in the frequency domain.

[0093] Optionally, the autocorrelation coefficient can be used as a non-normalized confidence degree of the estimated period length, and then the most possible k period lengths are selected, and the estimated period based on the above calculation is used to calculate by weighting according to the corresponding autocorrelation.

[0094] Optionally, the similar time series can be aggregated to obtain the aggregated periodic data, and the similar time series can be aggregated by softmax normalization confidence.

[0095] It can be understood that the periodic term data can be regarded as a periodic signal, which is infinite in time, i.e. the periodic term data can be regarded as an infinite sequence that repeats continuously, so the sequence after the lag (lag term) corresponding to the periodic term data can be filled by the first half of the repeating sequence.

[0096] In one specific example of the embodiment of the present application, Figure 4 is a schematic diagram of a space-time module provided by the first embodiment of the present application, as shown in Figure 4 The space-time module processes the second module input data through sequence decomposition, autocorrelation mechanism, re-sequence decomposition, and dynamic graph convolution to obtain output data of the space-time module.

[0097] Optionally, determining the space-time module intermediate data according to the processing period data and the trend item data can include: performing time series decomposition on the processing period data to obtain decomposition period data; and performing data fusion on the decomposition period data and the trend item data to obtain the space-time module intermediate data.

[0098] The decomposition period data can be result data obtained by performing time series decomposition on the processing period data.

[0099] Specifically, after processing the period item data to obtain the processing period data, the processing period data can be further decomposed in time series to obtain decomposition period data, so as to perform data fusion on the decomposition period data and the trend item data to obtain the space-time module intermediate data.

[0100] S130, determining a traffic flow prediction result according to each of the space-time module intermediate data, and training the traffic flow prediction model according to the traffic flow prediction result.

[0101] The traffic flow prediction result can be predicted traffic flow data. It can be understood that the traffic flow prediction result can be a set of data. For example, assuming that the traffic flow sample data is the traffic flow data from 8:00 to 9:00 in the morning, the traffic flow prediction result can be the traffic flow data from 9:00 to 10:00 in the morning.

[0102] In the embodiment of the present application, after inputting the module input data into the space-time module to obtain the space-time module intermediate data, the traffic flow prediction result can be determined according to each of the space-time module intermediate data, and the traffic flow prediction model can be trained according to the traffic flow prediction result. It can be understood that each space-time module can output space-time module intermediate data, that is, the number of space-time module intermediate data can be consistent with the number of space-time modules.

[0103] Optionally, determining the traffic flow prediction result according to the intermediate data of each space-time module can include: adding a skip connection from the intermediate data of each space-time module to an output layer of the traffic flow prediction model as an intermediate hidden variable of each space-time module; and determining the traffic flow prediction result according to a skip connection result of the output layer of the traffic flow prediction model. Specifically, determining the traffic flow prediction result according to the intermediate data of each space-time module can be adding a skip connection from the intermediate data of each space-time module to an output layer as an intermediate hidden variable of each space-time module, so that hidden states of different depths are concatenated and transmitted to a fully connected layer, and thus the traffic flow prediction result is obtained through the output layer.

[0104] Specifically, determining the traffic flow prediction result according to the intermediate data of each space-time module can be determined based on the following formula:

[0105]

[0106]

[0107] wherein, represents data at time t in the intermediate data of the space-time module at the lth layer; H represents a result after a concatenation operation on the intermediate data of each space-time module; || is a concatenation operation; reshape(·) is a function of reshaping the hidden state for concatenation . represents a predicted traffic flow prediction result from time t+1 to time t+Q; W(·) and b(·) are learnable parameters.

[0108] It should be noted that training the traffic flow prediction model according to the traffic flow prediction result can be updating the model parameters in the traffic flow prediction model according to the traffic flow prediction result to obtain an updated traffic flow prediction model. For example, an error is calculated according to the traffic flow prediction result and a true value, and back propagation is performed to update the model parameters.

[0109] Optionally, training the traffic flow prediction model according to the traffic flow prediction result can also include training a dynamic graph construction module in the traffic flow prediction model according to the traffic flow prediction result, i.e., updating the parameters of the dynamic graph construction module in the traffic flow prediction model according to the traffic flow prediction result to update the dynamic graph construction module. That is, the dynamic graph output data of the dynamic graph construction module can be different in each training process of the traffic flow prediction model.

[0110] The technical scheme of the embodiment determines the module input data corresponding to the space-time module in the vehicle flow prediction model, inputs the module input data into the space-time module to obtain the space-time module intermediate data, determines the vehicle flow prediction result according to each space-time module intermediate data, trains the vehicle flow prediction model according to the vehicle flow prediction result, solves the problem that the vehicle flow prediction error is large due to the inability to extract effective information features in the prior art, and can accurately predict the vehicle flow, thereby dispersing the vehicles in the road network in time and improving the safety of the road network.

[0111] Embodiment Two

[0112] Figure 5 is a flowchart of a vehicle flow prediction method provided by Embodiment Two of the present application. The embodiment can be applicable to accurately predict vehicle flow. The method can be executed by a vehicle flow prediction device. The device can be realized by software and / or hardware, and can be directly integrated in an electronic device that executes the method. The electronic device can be a terminal device or a server device. The type of the electronic device that executes the vehicle flow prediction method is not limited in the present application. Specifically, as shown in Figure 5 The vehicle flow prediction method can include the following steps:

[0113] S510, obtaining current vehicle flow data.

[0114] S520, inputting the current vehicle flow data into a pre-trained vehicle flow prediction model to obtain target vehicle flow data corresponding to the current vehicle flow data.

[0115] The vehicle flow prediction model is trained by the vehicle flow prediction model training method of any embodiment of the present application.

[0116] The current vehicle flow data can be current vehicle flow data. The target vehicle flow data can be predicted vehicle flow. It can be understood that the current vehicle flow data can be a group of data, which can be set according to the input data length requirement of the vehicle flow prediction model. The vehicle flow prediction result can also be a group of data. For example, assuming that the current time is 9:00 am, the current vehicle flow data can be the vehicle flow data from 8:00 am to 9:00 am, and the vehicle flow prediction result can be the predicted vehicle flow data from 9:00 am to 10:00 am.

[0117] In the embodiment of the present application, the current vehicle flow data is obtained, and the current vehicle flow data is input into the pre-trained vehicle flow prediction model to obtain the vehicle flow prediction result corresponding to the current vehicle flow data.

[0118] The technical scheme of the embodiment is characterized in that current traffic flow data is acquired, the current traffic flow data is input into a traffic flow prediction model that is pre-trained, and a traffic flow prediction result corresponding to the current traffic flow data is obtained, thereby solving the problem that the traffic flow prediction error is large due to the inability to extract effective information features in the data in the prior art, and enabling the traffic flow to be accurately predicted, thereby timely dispersing vehicles in the road network and improving the safety of the road network.

[0119] Embodiment three

[0120] The application scenario of traffic flow prediction of two-passenger and one-dangerous vehicle is taken as an example for specific description, and compared with ordinary private cars, the two-passenger and one-dangerous vehicle is a kind of transport vehicle, which often carries more passengers or extremely dangerous dangerous goods, and once the vehicle has an accident, it will bring very bad influence, therefore, monitoring the traffic flow of the two-passenger and one-dangerous vehicle is an important part of vehicle road safety. Therefore, the traffic flow prediction of the two-passenger and one-dangerous vehicle is of great significance to highway supervision. Unlike ordinary traffic flow prediction, the traffic flow data set of the two-passenger and one-dangerous vehicle has the characteristics of small data fluctuation range (i.e. time series is stable) and obvious periodic characteristics. Specifically, the traffic flow prediction model training method can include the following contents:

[0121] (1) Data preprocessing. Specifically, the original data of the gantry of a provincial expressway is acquired, a provincial expressway data set is constructed, and the data set is divided into a training set, a test set and a validation set according to a ratio of 7:2:1. The traffic flow of the gantry data of the provincial expressway is processed, and the traffic flow information of the gantry is processed. The gantry of the expressway of a certain city is selected, and after screening, a total of 213 gantries are obtained, the sample number of the training set is 6032, the sample number of the test set is 1723, and the sample number of the validation set is 862.

[0122] (2) Constructing a learnable dynamic tensor (i.e. a dynamic graph constructor). The learnable dynamic tensor can use different adjacency matrices to represent different road network structures at different times.

[0123] (3) The data input to the spatio-temporal block (i.e. the second module input data) is decomposed into a periodic term (i.e. periodic term data) and a trend term (i.e. trend term data) by using time series decomposition, and the autocorrelation of the periodic term is calculated by Fourier transform through an autocorrelation mechanism, and then the sub-sequences based on the similar period are aggregated, so as to connect the residual error of the autocorrelation calculation result and the periodic term, and then the residual error connection result is subjected to sequence decomposition again and data fusion with the trend term.

[0124] (4) According to the dynamic graph (that is, the road network structure at different times) constructed by the dynamic graph constructor, the spatial correlation of the data is captured through convolution operation, and the result is taken as the input of the next spatio-temporal block.

[0125] (5) The hidden state output after capturing the correlation of each spatio-temporal block is connected by jumping, and the prediction result is output through the output layer, so as to train the vehicle flow prediction model according to the prediction result.

[0126] The above technical scheme, according to the specific characteristics of the "two passengers and one dangerous" traffic flow data, learns the period information through autocorrelation analysis, which is different from the method of using pre-defined period and period step in the prior art; according to the periodicity of vehicle data, the time correlation in the data is extracted by extracting the period information of the data; and considering the spatio-temporal data characteristics of traffic flow, a tensor with learnable parameters is synthesized to simulate the potential and time-varying spatial dependence relationship between nodes, so as to convolve different graphs at different times and capture the spatial correlation of the input data; thereby the "two passengers and one dangerous" vehicle flow situation can be effectively predicted in advance, and traffic control personnel can be assisted to timely warn.

[0127] Embodiment four

[0128] Figure 6 is a schematic diagram of a vehicle flow prediction model training device provided by an embodiment of the present application, as shown in Figure 6 The device comprises an input data determination module 610, an intermediate data determination module 620 and a prediction model training module 630, wherein:

[0129] The input data determination module 610 is configured to determine the module input data corresponding to the spatio-temporal module in the vehicle flow prediction model; wherein the number of the spatio-temporal module is at least two; the module input data comprises first module input data and second module input data;

[0130] The intermediate data determination module 620 is configured to input the module input data into the spatio-temporal module to obtain the spatio-temporal module intermediate data;

[0131] The prediction model training module 630 is configured to determine the vehicle flow prediction result according to each spatio-temporal module intermediate data, and train the vehicle flow prediction model according to the vehicle flow prediction result.

[0132] The technical scheme of the embodiment determines the module input data corresponding to the space-time module in the vehicle flow prediction model, inputs the module input data into the space-time module to obtain the space-time module intermediate data, determines the vehicle flow prediction result according to each space-time module intermediate data, and trains the vehicle flow prediction model according to the vehicle flow prediction result, thereby solving the problem that the vehicle flow prediction error is large due to the inability to extract effective information features in the data in the prior art, and accurately predicting the vehicle flow, thereby timely dispersing the vehicles in the road network and improving the safety of the road network.

[0133] Optionally, the input data determination module 610 can be specifically configured to: obtain vehicle flow sample data, and input the vehicle flow sample data into a dynamic graph construction module in the vehicle flow prediction model to obtain dynamic graph output data; and determine the first module input data of each space-time module according to the dynamic graph output data.

[0134] Optionally, the dynamic graph output data can be dynamic tensor data; and correspondingly, the input data determination module 610 can be further configured to: extract a dynamic graph adjacency matrix from the dynamic graph output data; wherein the dynamic graph adjacency matrix is an adjacency matrix including a time dimension; and determine the dynamic graph adjacency matrix as the first module input data of each space-time module.

[0135] Optionally, the input data determination module 610 can be specifically configured to: in a case where it is determined that the space-time module is not the first space-time module, determine the space-time module as a current space-time module, and determine a previous space-time module of the current space-time module as a target space-time module; determine the first target module input data, the second target module input data and the target module intermediate data of the target space-time module; perform convolution calculation on the first target module input data and the target module intermediate data to obtain convolution data; perform residual connection on the convolution data and the second target module input data to obtain target module output data; and determine the target module output data as the second module input data of the current space-time module.

[0136] Optionally, the input data determination module 610 can be specifically configured to: in a case where it is determined that the space-time module is the first space-time module, obtain vehicle flow sample data; and perform data conversion on the vehicle flow sample data through a fully connected layer of the vehicle flow prediction model to obtain the second module input data of the space-time module.

[0137] Optionally, the intermediate data determination module 620 can be specifically configured to: perform time series decomposition on the second module input data to obtain periodic term data and trend term data; perform periodic data processing on the periodic term data to obtain processed periodic data; and determine the space-time module intermediate data according to the processed periodic data and the trend term data.

[0138] Optionally, the intermediate data determination module 620 can be further configured to determine an autocorrelation coefficient of the periodic term data, determine at least one data period corresponding to the periodic term data according to the autocorrelation coefficient, determine at least one similar time sequence corresponding to the periodic term data according to each data period, and perform data aggregation on each similar time sequence to obtain at least one aggregated periodic data, and perform data fusion on each aggregated periodic data and the periodic term data to obtain the processing periodic data.

[0139] Optionally, the intermediate data determination module 620 can be further configured to perform time series decomposition on the processing periodic data to obtain decomposed periodic data, and perform data fusion on the decomposed periodic data and the trend term data to obtain the intermediate data in the space-time module.

[0140] Optionally, the prediction model training module 630 can be specifically configured to add a skip connection to an output layer of the traffic flow prediction model by taking each intermediate data in the space-time module as an intermediate hidden variable of each space-time module, and determine the traffic flow prediction result according to a skip connection result of the output layer of the traffic flow prediction model.

[0141] The traffic flow prediction model training device provided in the embodiment of the present application can perform the traffic flow prediction model training method provided in any embodiment of the present application, and has the corresponding function modules and beneficial effects of the execution method.

[0142] Embodiment five

[0143] Figure 7 is a schematic diagram of a traffic flow prediction device provided in the embodiment five of the present application, as shown in the figure, the device comprises a data acquisition module 710 and a data prediction module 720, wherein: Figure 7

[0144] The data acquisition module 710 is configured to acquire current traffic flow data.

[0145] The data prediction module 720 is configured to input the current traffic flow data into a pre-trained traffic flow prediction model to obtain target traffic flow data corresponding to the current traffic flow data.

[0146] The traffic flow prediction model is trained by the traffic flow prediction model training method provided in any embodiment of the present application.

[0147] The technical scheme of the present embodiment, by acquiring the current traffic flow data, inputting the current traffic flow data into the pre-trained traffic flow prediction model, and obtaining the traffic flow prediction result corresponding to the current traffic flow data, solves the problem of large traffic flow prediction error caused by the inability to extract effective information features in the data in the prior art, and can accurately predict the traffic flow, thereby dispersing the vehicles in the road network in time and improving the safety of the road network.​

[0148] The vehicle flow prediction device provided by the embodiments of the present application can execute the vehicle flow prediction method provided by any of the embodiments of the present application, and has the function modules and beneficial effects corresponding to the execution method.

[0149] Embodiment six

[0150] Figure 8 A structural schematic diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.

[0151] As shown in Figure 8 The electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11, wherein the memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0152] A plurality of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, a speaker, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0153] The processor 11 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, and the like. The processor 11 performs various methods and processes described above, such as the traffic volume prediction model training method or the traffic volume prediction method.

[0154] In some embodiments, the traffic volume prediction model training method or the traffic volume prediction method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded onto the RAM 13 and executed by the processor 11, one or more steps of the traffic volume prediction model training method or the traffic volume prediction method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the traffic volume prediction model training method or the traffic volume prediction method by any other suitable means, such as by means of firmware.

[0155] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0156] Computer programs used to implement the methods of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the computer program, when executed, implements the functions / acts specified in the flowcharts and / or block diagrams. The computer program can be executed entirely on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0157] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium will include one or more lines of a program of instructions in a transitory signal form, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0158] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0159] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), blockchain networks, and the Internet.

[0160] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0161] It should be understood that the various forms of flow shown above can be used to reorder, add or delete steps. For example, each step described in the present application can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present application can be achieved, which is not limited herein.

[0162] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for training a traffic flow prediction model, characterized in that, include: Determine the module input data corresponding to the spatiotemporal modules in the traffic flow prediction model; wherein, the number of spatiotemporal modules is at least two; the module input data includes first module input data and second module input data; The process of inputting the module input data into the spatiotemporal module to obtain intermediate spatiotemporal module data includes: performing time series decomposition on the second module input data to obtain periodic data and trend data; determining the autocorrelation coefficient of the periodic data and determining at least one data period corresponding to the periodic data based on the autocorrelation coefficient; determining at least one similar time series corresponding to the periodic data based on each data period and aggregating the similar time series to obtain at least one aggregated periodic data; fusing the aggregated periodic data with the periodic data to obtain processed periodic data; performing time series decomposition on the processed periodic data to obtain decomposed periodic data; and fusing the decomposed periodic data with the trend data to obtain the intermediate spatiotemporal module data. The periodic data refers to the data in the second module input data that characterizes cyclical features, and the trend data refers to the data in the second module input data that characterizes long-term trend features. The intermediate data of each of the spatiotemporal modules are used as intermediate hidden variables of each of the spatiotemporal modules to add jump connections to the output layer of the traffic flow prediction model; The traffic flow prediction model is trained based on the traffic flow prediction results obtained by determining the traffic flow prediction results through the output layer of the traffic flow prediction model based on the skip connection results.

2. The method according to claim 1, characterized in that, Before determining the module input data corresponding to the spatiotemporal module in the traffic flow prediction model, the method further includes: Traffic flow sample data is obtained and input into the dynamic graph construction module in the traffic flow prediction model to obtain dynamic graph output data; The input data of the first module corresponding to the spatiotemporal module in the traffic flow prediction model includes: Based on the output data of the dynamic graph, the first module input data of each of the spatiotemporal modules is determined.

3. The method according to claim 2, characterized in that, The output data of the dynamic graph is dynamic tensor data; The step of determining the first module input data for each of the spatiotemporal modules based on the output data of the dynamic graph includes: Extract the dynamic graph adjacency matrix from the dynamic graph output data; wherein, the dynamic graph adjacency matrix is ​​an adjacency matrix that includes a time dimension; The adjacency matrix of the dynamic graph is determined as the first module input data of each of the spatiotemporal modules.

4. The method according to claim 1, characterized in that, Determine the input data for the second module corresponding to the spatiotemporal module in the traffic flow prediction model, including: If it is determined that the spatiotemporal module is not the first spatiotemporal module, the spatiotemporal module is determined as the current spatiotemporal module, and the previous spatiotemporal module of the current spatiotemporal module is determined as the target spatiotemporal module; Determine the first target module input data, the second target module input data, and the target module intermediate data of the target spatiotemporal module; Convolutional calculations are performed on the input data of the first target module and the intermediate data of the target module to obtain convolutional data; The convolutional data and the input data of the second target module are residually concatenated to obtain the output data of the target module. The output data of the target module is determined as the second module input data of the current spatiotemporal module.

5. The method according to claim 1, characterized in that, Determining the input data for the second module corresponding to the spatiotemporal module in the traffic flow prediction model also includes: If it is determined that the spatiotemporal module is the first spatiotemporal module, traffic flow sample data is obtained; The traffic flow sample data is transformed by the fully connected layer of the traffic flow prediction model to obtain the second module input data of the spatiotemporal module.

6. A traffic flow prediction method, characterized in that, include: Get current traffic flow data; The current traffic flow data is input into a pre-trained traffic flow prediction model to obtain the target traffic flow data corresponding to the current traffic flow data; The traffic flow prediction model is trained using the traffic flow prediction model training method described in any one of claims 1-5.

7. A traffic flow prediction model training device, characterized in that, include: An input data determination module is used to determine the module input data corresponding to the spatiotemporal modules in the traffic flow prediction model; wherein, the number of spatiotemporal modules is at least two; the module input data includes first module input data and second module input data; The intermediate data determination module is used to input the module input data into the spatiotemporal module to obtain the spatiotemporal module intermediate data; The intermediate data determination module is specifically used to perform time series decomposition on the input data of the second module to obtain periodic data and trend data; determine the autocorrelation coefficient of the periodic data, and determine at least one data period corresponding to the periodic data based on the autocorrelation coefficient; determine at least one similar time series corresponding to the periodic data based on each data period, and aggregate each similar time series to obtain at least one aggregated periodic data; fuse each aggregated periodic data with the periodic data to obtain processed periodic data; perform time series decomposition on the processed periodic data to obtain decomposed periodic data; and fuse the decomposed periodic data with the trend data to obtain the intermediate data of the spatiotemporal module; wherein, the periodic data is the data in the input data of the second module that represents the cyclical characteristics, and the trend data is the data in the input data of the second module that represents the long-term trend characteristics; The prediction model training module is used to add skip connections to the output layer of the traffic flow prediction model by using the intermediate data of each spatiotemporal module as the intermediate hidden variables of each spatiotemporal module; the output layer of the traffic flow prediction model determines the traffic flow prediction result based on the skip connection result, and trains the traffic flow prediction model based on the traffic flow prediction result.

8. A traffic flow prediction device, characterized in that, include: The data acquisition module is used to acquire current traffic flow data; The data prediction module is used to input the current traffic flow data into a pre-trained traffic flow prediction model to obtain the target traffic flow data corresponding to the current traffic flow data. The traffic flow prediction model is trained using the traffic flow prediction model training method described in any one of claims 1-5.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the traffic flow prediction model training method of any one of claims 1-5, or to perform the traffic flow prediction method of claim 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the traffic flow prediction model training method of any one of claims 1-5, or the traffic flow prediction method of claim 6.