Traffic flow prediction method and device, equipment and storage medium

By combining the gated temporal convolution network and graph convolution network in the traffic flow prediction model, the spatial and temporal correlations are dynamically captured, and the problem that spatial correlations in the prior art are not captured with time changes is solved, and the accuracy of traffic flow prediction is improved.

CN119600799APending Publication Date: 2025-03-11PENG CHENG LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411609369.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The prior art fails to effectively capture the dynamic changes of spatial correlation over time in traffic flow prediction, resulting in inaccurate prediction results.

Method used

A pre-trained traffic flow prediction model is adopted, which includes a cascading gated time convolutional network and a graph convolutional network. The gated time convolution network captures time correlation through multiple gated convolution subnets deployed in parallel, while the graph convolution network flows data along the direction of the origin and destination in the traffic flow data, dynamically capturing bidirectional spatial correlation.

Benefits of technology

By dynamically capturing spatial and temporal correlations, the accuracy of traffic flow prediction is improved and the travel rules of the traffic system can be more effectively reflected.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600799A_ABST
    Figure CN119600799A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a traffic flow prediction method and device, equipment and a storage medium, and relates to the technical field of data processing. The method comprises the following steps: acquiring traffic flow data of a plurality of position nodes to generate an initial flow matrix, carrying out data optimization on the initial flow matrix to obtain an input flow matrix, inputting the input flow matrix into a correlation prediction sub-model for correlation analysis to obtain a first output matrix, and outputting the first output matrix to a second output sub-model; performing data processing on the input traffic matrix by using the gated convolutional sub-networks to obtain corresponding first gated data, obtaining second gated data according to the two pieces of first gated data, inputting the second gated data and the input traffic matrix into the graph convolutional network together for data processing to obtain a first output matrix, and outputting the first output matrix to the graph convolutional network; and inputting the first output matrix into an output prediction layer for data processing to obtain a target traffic matrix corresponding to the position node. Prediction is carried out based on the bidirectional spatial correlation and the temporal correlation obtained by the traffic flow prediction model, and the accuracy of traffic flow prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a traffic flow prediction method, device, equipment and storage medium. Background Art

[0002] Traffic flow prediction is a core task in intelligent transportation systems. Accurate and timely traffic demand analysis can effectively avoid traffic congestion and optimize transportation tool scheduling. In related technologies, the origin-destination (OD) matrix corresponding to the traffic origin and destination is usually used to predict travel volume. The demand prediction based on the OD matrix can show the number of trips for different combinations of departure and destination areas, thereby better reflecting the travel patterns of the transportation system.

[0003] However, the prediction process of the OD matrix in related technologies mainly relies on the corresponding adjacency matrix to characterize the spatial correlation, and then makes predictions based on the spatial correlation. This method does not take into account the dynamic changes of spatial correlation over time, resulting in inaccurate traffic flow prediction results. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a traffic flow prediction method, device, equipment and storage medium to improve the accuracy of traffic flow prediction results.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a traffic flow prediction method, which uses a pre-trained traffic flow prediction model to perform a prediction process, wherein the traffic flow prediction model at least includes a correlation prediction sub-model and an output prediction layer, wherein the correlation prediction sub-model includes a cascaded gated time convolutional network and a graph convolutional network, wherein the gated time convolutional network includes multiple gated convolutional sub-networks deployed in parallel, and wherein the method includes:

[0006] Obtaining traffic flow data of multiple location nodes to generate an originating flow matrix, and performing data optimization on the originating flow matrix to obtain an input flow matrix;

[0007] Inputting the input traffic matrix into the correlation prediction sub-model for correlation analysis to obtain a first output matrix, performing data processing on the input traffic matrix using the gated convolution sub-network to obtain corresponding first gated data, obtaining second gated data based on two of the first gated data, and inputting the second gated data and the input traffic matrix into the graph convolution network for data processing to obtain the first output matrix;

[0008] The first output matrix is ​​input into the output prediction layer for data processing to obtain a destination traffic matrix corresponding to the location node.

[0009] In some embodiments, the gated convolution subnetwork includes a diffusion graph convolution network and a corresponding first activation function, and the gated convolution subnetwork is used to perform data processing on the input traffic matrix to obtain the corresponding first gating data, including:

[0010] Using the diffusion graph convolutional network to process the input traffic matrix to obtain first intermediate data;

[0011] The first gating data is calculated according to the first activation function and the first intermediate data.

[0012] In some embodiments, the diffusion graph convolution network includes two diffusion convolution sub-networks deployed in parallel and a second activation function corresponding to each of the diffusion convolution sub-networks, and the step of using the diffusion graph convolution network to perform data processing on the input traffic matrix to obtain first intermediate data includes:

[0013] Inputting the input flow matrix into the diffusion convolution subnetwork for data processing to obtain first diffusion data corresponding to each diffusion convolution subnetwork;

[0014] Obtaining a first network weight corresponding to each of the diffuse convolutional sub-networks;

[0015] Calculate the second intermediate data corresponding to each of the diffusion convolution sub-networks using the second activation function, the first network weight and the first diffusion data respectively;

[0016] The Hadamard product of two of the second intermediate data is calculated to obtain the first intermediate data.

[0017] In some embodiments, inputting the input traffic matrix into the diffusion convolution subnetwork for data processing to obtain first diffusion data corresponding to each diffusion convolution subnetwork includes:

[0018] Determining multiple reference variables one by one according to the convolution kernel size of the diffusion convolution sub-network;

[0019] For each of the reference variables, an expansion intermediate variable is calculated based on a preset expansion factor and the reference variable, an intermediate flow value of the input flow matrix is ​​determined according to the expansion intermediate variable and the current time step, a reference convolution kernel size is calculated according to the reference variable, and a reference intermediate value corresponding to the reference variable is obtained according to the reference convolution kernel size and the intermediate flow value;

[0020] The reference intermediate values ​​are accumulated to obtain the first diffusion data.

[0021] In some embodiments, the step of performing data optimization on the originating traffic matrix to obtain an input traffic matrix includes:

[0022] Obtaining an adjacency matrix corresponding to the position node, calculating a degree matrix corresponding to the adjacency matrix, and calculating a graph Laplacian matrix based on a difference between the degree matrix and the adjacency matrix;

[0023] Obtaining a preset regularization parameter, and calculating a preprocessing matrix based on the preset regularization parameter and the graph Laplace matrix;

[0024] The input traffic matrix is ​​obtained according to the product of the preprocessing matrix and the originating traffic matrix.

[0025] In some embodiments, the graph convolution network includes two cascaded graph convolution layers, and the step of inputting the second gating data and the input traffic matrix into the graph convolution network for data processing to obtain the first output matrix includes:

[0026] Accumulating the second gating data and the input traffic matrix to obtain a graph convolution input matrix;

[0027] Using the first graph convolution layer to process the graph convolution input matrix to obtain a first graph convolution matrix;

[0028] The second graph convolution layer is used to perform data processing on the first graph convolution matrix to obtain the first output matrix.

[0029] In some embodiments, the graph convolution layer includes a hidden layer and a third activation function, and the step of performing data processing on the graph convolution input matrix using the first graph convolution layer to obtain a first graph convolution matrix includes:

[0030] Obtaining a graph Laplacian matrix and a second network weight corresponding to the hidden layer;

[0031] The first graph convolution matrix is ​​calculated according to the graph Laplacian matrix, the second network weight, the third activation function and the graph convolution input matrix.

[0032] In some embodiments, a preset number of the correlation prediction sub-models are cascaded, and the first output matrix corresponding to the first correlation prediction sub-model is accumulated with the output data of the last correlation prediction sub-model through a jump connection.

[0033] To achieve the above-mentioned purpose, the second aspect of the embodiment of the present application proposes a traffic flow prediction device, which uses a pre-trained traffic flow prediction model to perform a prediction process, wherein the traffic flow prediction model at least includes a correlation prediction sub-model and an output prediction layer, wherein the correlation prediction sub-model includes a cascaded gated time convolution network and a graph convolution network, wherein the gated time convolution network includes a plurality of gated convolution sub-networks deployed in parallel, and wherein the device includes:

[0034] Data acquisition module: used to acquire traffic flow data of multiple location nodes to generate an originating flow matrix, and perform data optimization on the originating flow matrix to obtain an input flow matrix;

[0035] Correlation analysis module: used for inputting the input traffic matrix into the correlation prediction sub-model for correlation analysis to obtain a first output matrix, respectively using the gated convolution sub-network to process the input traffic matrix to obtain corresponding first gated data, obtaining second gated data according to the two first gated data, and inputting the second gated data and the input traffic matrix into the graph convolution network for data processing to obtain the first output matrix;

[0036] Data output module: used to input the first output matrix into the output prediction layer for data processing to obtain the destination traffic matrix corresponding to the location node.

[0037] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0038] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0039] The traffic flow prediction method, device, equipment and storage medium proposed in the embodiments of the present application use a pre-trained traffic flow prediction model to perform a prediction process. The traffic flow prediction model at least includes a correlation prediction sub-model and an output prediction layer. The correlation prediction sub-model includes a cascaded gated time convolutional network and a graph convolutional network. The gated time convolutional network includes two gated convolutional sub-networks deployed in parallel. The method specifically includes obtaining traffic flow data of multiple location nodes to generate an originating flow matrix, and optimizing the originating flow matrix to obtain an input flow matrix, inputting the input flow matrix into the correlation prediction sub-model for correlation analysis to obtain a first output matrix, using the gated convolutional sub-network to process the input flow matrix to obtain the corresponding first gated data, obtaining the second gated data based on the two first gated data, inputting the second gated data and the input flow matrix into the graph convolutional network for data processing to obtain the first output matrix, and inputting the first output matrix into the output prediction layer for data processing to obtain the destination flow matrix corresponding to the location node. The traffic flow prediction model in the embodiment of the present application utilizes a graph convolutional network to perform data flow along the direction of the origin and destination in the traffic flow data, and can dynamically capture the bidirectional spatial correlation between the origin and the destination. At the same time, a gated temporal convolutional network is used to capture the temporal correlation. Finally, traffic flow prediction is performed based on the captured bidirectional spatial correlation and temporal correlation, which can improve the accuracy of traffic flow prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a structural diagram of the traffic flow prediction model provided in the embodiment of the present application.

[0041] Figure 2 It is a schematic diagram of the structure of the diffusion graph convolutional network provided in an embodiment of the present application.

[0042] Figure 3 It is a schematic diagram of the structure of the graph convolutional network provided in the embodiment of the present application.

[0043] Figure 4 It is another structural diagram of the traffic flow prediction model provided in the embodiment of the present application.

[0044] Figure 5 It is a flow chart of the traffic flow prediction method provided in the embodiment of the present application.

[0045] Figure 6 It is a flow chart of optimizing the data of the originating traffic matrix to obtain the input traffic matrix provided by an embodiment of the present application.

[0046] Figure 7 This is a flowchart of an embodiment of the present application, which uses a gated convolutional sub-network to process the input traffic matrix to obtain corresponding first gating data.

[0047] Figure 8 This is a flowchart of using a diffusion graph convolutional network to process the input traffic matrix to obtain first intermediate data, as provided in an embodiment of the present application.

[0048] Fig. 9 The embodiment of the present application provides a flowchart for inputting the input traffic matrix into the diffusion convolution subnetwork for data processing to obtain the first diffusion data corresponding to each diffusion convolution subnetwork.

[0049] Fig.10 This is a flowchart provided by an embodiment of the present application for inputting the second gating data and the input traffic matrix into a graph convolutional network for data processing to obtain a first output matrix.

[0050] Fig.11 This is a flowchart of the graph convolution layer provided in an embodiment of the present application performing data processing on the graph convolution input matrix to obtain the first graph convolution matrix.

[0051] Fig.12 This is a structural block diagram of a traffic flow prediction device provided in yet another embodiment of the present application.

[0052] Fig.13 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0054] It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0056] In intelligent transportation systems, traffic flow prediction is a core task. Traffic flow prediction refers to predicting the traffic flow from a specific starting area to another specific destination area in the next period given some auxiliary information. Accurate and timely traffic demand analysis can effectively avoid traffic congestion and optimize transportation scheduling. In related technologies, the origin-destination (OD) matrix corresponding to the traffic origin and destination is usually used to predict travel volume. The demand prediction based on the OD matrix can show the number of trips for different combinations of departure and destination areas, thereby better reflecting the travel rules of the transportation system.

[0057] For the OD matrix, there is a set of semantic correlations between the starting areas, and there is another set of semantic correlations between the target areas, and the correlations between the areas will change dynamically over time. However, the prediction process of the OD matrix in related technologies mainly relies on the corresponding adjacency matrix to characterize the spatial correlation, and then predicts based on the spatial correlation. The adjacency matrix is ​​usually fixed, so it cannot reflect the dynamic changes of spatial correlation over time, resulting in inaccurate traffic flow prediction results.

[0058] Based on this, the embodiments of the present application provide a traffic flow prediction method, device, equipment and storage medium. Through the traffic flow prediction model, a graph convolutional network is used to perform data flow along the direction of the origin and destination in the traffic flow data, and the bidirectional spatial correlation between the origin and the destination is dynamically captured. At the same time, a gated time convolutional network is used to capture the time correlation. Finally, traffic flow prediction is performed based on the captured bidirectional spatial correlation and time correlation, which can improve the accuracy of traffic flow prediction.

[0059] The embodiments of the present application provide a traffic flow prediction method, apparatus, device and storage medium, which are specifically illustrated by the following embodiments. First, the traffic flow prediction method in the embodiments of the present application is described.

[0060] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making.

[0061] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0062] The traffic flow prediction method provided in the embodiment of the present application relates to the field of data processing technology. The traffic flow prediction method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be a computer program running in a terminal or a server side. For example, a computer program can be a native program or software module in an operating system; it can be a local (Native) application (Application, APP), that is, a program that needs to be installed in the operating system to run, such as a client that supports traffic flow prediction, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module or plug-in. Among them, the terminal communicates with the server via a network. The traffic flow prediction method can be executed by a terminal or a server, or by a terminal and a server in collaboration.

[0063] In some embodiments, the terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer or a smart watch, etc. In addition, the terminal may also be an intelligent vehicle-mounted device. The intelligent vehicle-mounted device applies the traffic flow prediction method of this embodiment to provide related services and enhance the driving experience. The server may be an independent server, or it may be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms; it may also be a service node in a blockchain system, and each service node in the blockchain system forms a peer-to-peer (Peer To Peer, P2P) network, and the P2P protocol is an application layer protocol running on the Transmission Control Protocol (Transmission Control Protocol, TCP) protocol. The terminal and the server may be connected via Bluetooth, Universal Serial Bus (Universal Serial Bus, USB) or network communication connection methods, and this embodiment is not limited here.

[0064] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0065] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0066] First, the specific structure of the traffic prediction model provided by the embodiment of the present application is described.

[0067] In one embodiment, referring to Figure 1 , Figure 1 It is a structural diagram of the traffic flow prediction model provided in the embodiment of the present application.

[0068] In one embodiment, Figure 1 The traffic flow prediction model includes at least a correlation prediction sub-model and an output prediction layer, wherein the correlation prediction sub-model includes a gated temporal convolutional network and a graph convolutional network.

[0069] Specifically, the gated temporal convolutional network includes multiple gated convolutional subnetworks deployed in parallel, e.g. Figure 1Two examples are used for illustration, which does not limit their number. The input data of the gated time convolution network is simultaneously input into two gated convolution sub-networks. After data processing, the two obtain corresponding output data respectively. After the Hadamard product operation is performed on the output data of the two, it is used as the output data of the gated time convolution network. The output data of the gated time convolution network is used as part of the input data of the graph convolution network. According to the residual connection method, the other part of the input data of the graph convolution network is the input data of the gated time convolution network. Then, the graph convolution network performs data processing based on all the input data, and the obtained output data is used as the output data of the gated time convolution network. Finally, the output data of the gated time convolution network is input into the output prediction layer for linear transformation, and the shape of the output sequence is adjusted to obtain the final traffic flow prediction result.

[0070] In one embodiment, the gated convolution sub-networks include a cascaded diffusion graph convolution network and a corresponding activation function, denoted as a first activation function. The input data of the gated temporal convolution network is used as the input data of the diffusion graph convolution network, and the output data of the diffusion graph convolution network is processed accordingly using the corresponding first activation function to obtain the output data corresponding to the gated convolution sub-network.

[0071] In one embodiment, referring to Figure 2 , Figure 2 It is a structural diagram of the diffusion graph convolution network provided in the embodiment of the present application. Among them, the diffusion graph convolution network includes two diffusion convolution sub-networks deployed in parallel and an activation function corresponding to each diffusion convolution sub-network, which is recorded as the second activation function. The input data of the diffusion graph convolution network is used as the input data of the diffusion convolution sub-network, and the output data of the diffusion convolution sub-network is processed accordingly using the corresponding second activation function to obtain the output data corresponding to the diffusion graph convolution network. And, further, in this embodiment, the diffusion convolution sub-network is a temporal convolutional network (Temporal Convolutional Networks, TCN), and the diffusion convolution sub-network processing can process data with time series characteristics, and effectively captures the long-term dependencies in time series data by introducing technologies such as causal convolution and dilated convolution.

[0072] In one embodiment, referring to Figure 3 , Figure 3 It is a schematic diagram of the structure of the graph convolutional network provided in the embodiment of the present application. Figure 3 The graph convolution network includes two cascaded graph convolution layers, each of which contains a hidden layer and a corresponding activation function, which is recorded as the third activation function. The output data of each graph convolution layer is obtained after being processed by the third activation function.

[0073] In one embodiment, since increasing the number of network layers can improve the prediction accuracy to a certain extent, the number of correlation prediction sub-models can be expanded in the embodiment of the present application, and a preset number of correlation prediction sub-model cascades can be set. In addition, the problem of gradient disappearance is solved by using a skip connection method, while retaining data details. Figure 4 , Figure 4 It is another structural diagram of the traffic flow prediction model provided in the embodiment of the present application. Figure 4 Taking the preset number of 2 as an example, two correlation prediction sub-models are cascaded, wherein the output data corresponding to the first correlation prediction sub-model is accumulated with the output data of the second correlation prediction sub-model by means of a jump connection, and the accumulated result is used as the input data of the output prediction layer. It can be understood that if there are multiple correlation prediction sub-models cascaded, the output data corresponding to the first correlation prediction sub-model can be accumulated with the output data of the last correlation prediction sub-model by means of a jump connection to achieve a jump connection. This embodiment does not specifically limit the preset number, and it can be set according to actual computing requirements.

[0074] The following describes the traffic flow prediction method in the embodiment of the present application based on the traffic flow prediction model described above.

[0075] Figure 5 is an optional flow chart of the traffic flow prediction method provided in the embodiment of the present application. Figure 5 The method may include but is not limited to steps 110 to 130. It can also be understood that this embodiment Figure 5 The order of step 110 to step 130 is not specifically limited, and the order of steps can be adjusted or some steps can be reduced or added according to actual needs.

[0076] Step 110: Obtain traffic flow data of multiple location nodes to generate an originating flow matrix, and perform data optimization on the originating flow matrix to obtain an input flow matrix.

[0077] In one embodiment, for the target area to be predicted, the sensors used to participate in the prediction are obtained, such as cameras, infrared sensors, geomagnetic sensors, etc., and the selected sensor nodes are arranged at the key traffic nodes of the target area, such as intersections, lanes, parking lot entrances, etc. The corresponding location nodes are obtained according to the location of the sensors. Each location node can collect traffic flow data such as the number of vehicles, speeds, and vehicle types passing through the area in real time. Next, the originating traffic matrix is ​​generated based on the traffic flow data collected by the location node as the originating area, wherein the originating traffic matrix can be a matrix in the form of rows and columns, for example, each row represents a location node, each row represents a sensor node, and each column represents a time interval, such as 5 minutes, 1 hour, etc. Each element in the originating traffic matrix represents the traffic flow collected by the sensor within a specific time interval.

[0078] It can be understood that the process of generating the origin flow matrix can be considered as the process of filling the matrix data: the traffic flow data collected by each location node is filled into the origin flow matrix in time and space order. And for missing or abnormal data, interpolation or correction methods can be used for data processing to ensure the integrity and accuracy of the generated origin flow matrix.

[0079] In one embodiment, since noise is inevitably generated during the sensor acquisition process, in order to further improve the accuracy of the subsequent prediction process, the embodiment of the present application performs data optimization on the originating traffic matrix to obtain the input traffic matrix. Figure 6 , Figure 6 This is a flow chart of optimizing the data of the originating traffic matrix to obtain the input traffic matrix provided by an embodiment of the present application, which specifically includes the following steps:

[0080] Step 610: Obtain the adjacency matrix corresponding to the position node, calculate the degree matrix corresponding to the adjacency matrix, and calculate the graph Laplacian matrix based on the difference between the degree matrix and the adjacency matrix.

[0081] In one embodiment, the adjacency matrix is ​​used to describe the connection relationship between each vertex in the graph, and the degree matrix is ​​used to describe the degree information of each vertex. Among them, in the field of transportation, road networks, subway lines, etc. are all natural non-Euclidean graph structures, so the position nodes can also constitute a graph structure, and the corresponding adjacency matrix is ​​a square matrix. For example, there are N position nodes. At this time, the adjacency matrix is ​​an N*N square matrix, and its rows and columns correspond to the position nodes. When there is a connection relationship between two position nodes, the element of the corresponding position in the adjacency matrix is ​​1, otherwise it is 0. The connection relationship here can be a communication relationship. If two sensors can communicate directly, it can be considered that there is an edge between the corresponding two position nodes, and then the element in the adjacency matrix is ​​1.

[0082] In one embodiment, after obtaining the adjacency matrix A corresponding to the position node, the degree matrix D corresponding to the adjacency matrix A is calculated, and the calculation process of the degree matrix is ​​consistent with the related art. Next, the graph Laplacian matrix L is calculated based on the difference between the degree matrix D and the adjacency matrix A, expressed as: L = DA.

[0083] Step 620: Obtain preset regularization parameters, and calculate a preprocessing matrix based on the preset regularization parameters and the graph Laplacian matrix.

[0084] In one embodiment, a preset regularization parameter λ preset according to actual conditions is obtained, and then a preprocessing matrix L' is calculated based on the preset regularization parameter and the graph Laplacian matrix, where the preprocessing matrix is ​​expressed as:

[0085] L′=(I+λL) -1

[0086] Where I represents the identity matrix.

[0087] Step 630: Obtain an input traffic matrix according to the product of the preprocessing matrix and the originating traffic matrix.

[0088] In one embodiment, assuming that the originating traffic matrix is ​​F and the input traffic matrix is ​​X, this process is expressed as:

[0089] X=(I+λL) -1 F

[0090] Through the above process, the denoised input flow matrix is ​​obtained. Next, we will describe how to predict traffic flow based on the input flow matrix.

[0091] Step 120: Input the input traffic matrix into the correlation prediction sub-model for correlation analysis to obtain a first output matrix, use the gated convolution sub-network to process the input traffic matrix to obtain the corresponding first gated data, obtain the second gated data based on the two first gated data, and input the second gated data and the input traffic matrix into the graph convolution network for data processing to obtain the first output matrix.

[0092] In one embodiment, referring to Figure 1 , taking the traffic flow prediction model including a correlation prediction sub-model as an example. The denoised input flow matrix is ​​input into the traffic flow prediction model for processing. Since the correlation prediction sub-model and the output prediction layer are cascaded, the input flow matrix is ​​first input into the correlation prediction sub-model. Figure 1In the model structure, the correlation prediction sub-model uses two gated convolution sub-networks to process the input traffic matrix to obtain two first gated data, and then obtains the second gated data according to the Hadamard product operation of the two first gated data. Finally, the second gated data and the input traffic matrix are input into the graph convolution network for data processing to obtain the first output matrix.

[0093] In one embodiment, since the gated temporal convolutional network includes two gated convolutional sub-networks deployed in parallel, the processing process of each gated convolutional sub-network is similar. Figure 7 , Figure 7 The embodiment of the present application provides a flowchart of using a gated convolutional subnetwork to process the input traffic matrix to obtain the corresponding first gating data, which specifically includes the following steps:

[0094] Step 710: Use a diffusion graph convolutional network to process the input traffic matrix to obtain first intermediate data.

[0095] In one embodiment, referring to Figure 8 , Figure 8 The present invention provides a flowchart of using a diffusion graph convolutional network to process the input traffic matrix to obtain first intermediate data, which specifically includes the following steps:

[0096] Step 810: Input the input flow matrix into the diffusion convolution sub-network for data processing to obtain the first diffusion data corresponding to each diffusion convolution sub-network.

[0097] In one embodiment, the input flow matrix is ​​respectively sent to the diffusion convolution sub-network for data processing, and the corresponding diffusion convolution sub-network calculates a first diffusion data. Specifically, the diffusion convolution sub-network in this embodiment is a time convolution network. Fig. 9 , Fig. 9 The flow chart of inputting the input flow matrix into the diffusion convolution subnetwork for data processing to obtain the first diffusion data corresponding to each diffusion convolution subnetwork provided in the embodiment of the present application specifically includes the following steps:

[0098] Step 910: Determine multiple reference variables one by one according to the convolution kernel size of the diffusion convolution sub-network.

[0099] In one embodiment, assume that the diffusion convolution subnetwork is represented by f(t), where t represents the time step and its convolution kernel size is K. At this time, parameters are selected one by one from 0 to K-1 as reference variables s, that is, the value range of s is an integer of [0, K-1].

[0100] It is understandable that the embodiment of the present application uses a diffusion convolution subnetwork to combine the advantages of dilated convolution and causal convolution. The purpose of using causal convolution is to ensure that the model only uses current and past information when predicting, and does not use future information. Dilated convolution can use different reference variables to control the receptive field of one-dimensional convolution. Different receptive fields can capture local temporal correlations of different scales of input data. Among them, the larger receptive field used can also solve the problem of gradient disappearance caused by convolution stacking.

[0101] Step 920: For each reference variable, a dilated intermediate variable is calculated based on a preset dilation factor and the reference variable, the flow intermediate value of the input flow matrix is ​​determined according to the dilated intermediate variable and the current time step, the reference convolution kernel size is calculated according to the reference variable, and the reference intermediate value corresponding to the reference variable is obtained according to the reference convolution kernel size and the flow intermediate value.

[0102] In one embodiment, the preset expansion factor d is set according to actual needs, which is used to determine the step size of the convolution kernel sliding on the input flow matrix X. The corresponding expansion intermediate variable is expressed as d×s. At this time, the flow intermediate value determined according to the expansion intermediate variable and the current time step t is expressed as X(td×s). Next, the convolution kernel is changed into a reference convolution kernel, and the reference convolution kernel size is the reference variable s. The reference intermediate value corresponding to the reference variable is expressed as: f(s)X(td×s) according to the reference convolution kernel size and the flow intermediate value.

[0103] Step 930: Accumulate the reference intermediate values ​​to obtain first diffusion data.

[0104] In one embodiment, the first diffusion data is expressed as:

[0105]

[0106] Assume that the input traffic matrix X is an M*N matrix, f(t) is a K×K convolution kernel, where K is an odd number, and for position (i, j), i=0,1,...,M-1, j=0,1,...,N-1, the first diffusion data y is expressed as:

[0107]

[0108] By stacking the reference intermediate values ​​of different receptive fields, the first diffusion data can characterize the local temporal correlations of different scales in the entire time series.

[0109] Step 820: Obtain the first network weight corresponding to each diffuse convolutional sub-network.

[0110] In one embodiment, referring to Figure 2 , the first network weight corresponding to the first diffusion convolution subnetwork is Wfilter , the weight of the first network corresponding to the second diffusion convolution sub-network is W date .

[0111] Step 830: Calculate the second intermediate data corresponding to each diffusion convolution sub-network using the second activation function, the first network weight and the first diffusion data respectively.

[0112] In one embodiment, assuming that the second activation function of the first diffusion convolutional subnetwork is a tanh activation function, the deviation value is b, where the deviation value is obtained during the training process, the corresponding second intermediate data is expressed as:

[0113] tanh(XW filter +b)

[0114] Similarly, assuming that the second activation function of the second diffusion convolution subnetwork is the sigmoid activation function and the deviation value is c, the corresponding second intermediate data is expressed as:

[0115] sigmoid(XW date +c)

[0116] Step 840: Calculate the Hadamard product of the two second intermediate data to obtain the first intermediate data.

[0117] In one embodiment, the first intermediate data z is expressed as:

[0118] z=tanh(XW filter +b)e sigmoid(XW date +c)

[0119] Here, e represents the Hadamard product operation.

[0120] According to the above steps, the first intermediate data corresponding to each diffusion graph convolutional network is obtained.

[0121] Step 720: Calculate first gating data according to the first activation function and the first intermediate data.

[0122] In one embodiment, referring to Figure 1 After obtaining the first intermediate data, it is input into the corresponding first activation function as an input parameter, and the output of the first activation function is obtained as the first gating data. It can be understood that the first activation functions in the two gated convolutional subnetworks here can be the same or different, for example, one of them can be a tanh activation function and the other can be another activation function.

[0123] In one embodiment, referring to Figure 1After obtaining the two first gating data, the second gating data is obtained according to the Hadamard product operation of the two first gating data, and then the second gating data and the input flow matrix are input into the graph convolution network for data processing to obtain the first output matrix. Figure 3 , the graph convolution network includes two cascaded graph convolution layers, which are used to calculate the first output matrix. Fig.10 , Fig.10 It is a flowchart provided by an embodiment of the present application of inputting the second gating data and the input traffic matrix into the graph convolution network for data processing to obtain the first output matrix, which specifically includes the following steps:

[0124] Step 1010: Accumulate the second gating data and the input traffic matrix to obtain a graph convolution input matrix.

[0125] In one embodiment, the second gating data and the input traffic matrix are fused so that the graph convolution input matrix obtained after the fusion contains both time correlation information and original information, thereby increasing the amount of information contained therein and improving subsequent prediction results.

[0126] Step 1020: Use the first graph convolution layer to process the graph convolution input matrix to obtain a first graph convolution matrix.

[0127] Step 1030: Use the second graph convolution layer to process the first graph convolution matrix to obtain a first output matrix.

[0128] In one embodiment, referring to Figure 3 , the graph convolution layers are cascaded, so the first graph convolution matrix obtained by the first graph convolution layer through data processing on the graph convolution input matrix will be used as the input of the second graph convolution layer, and finally the output of the second graph convolution layer will be used as the output of the entire graph convolution network, which is also the first output matrix of the entire correlation prediction sub-model.

[0129] In one embodiment, taking the first graph convolution layer as an example, refer to Fig.11 , Fig.11 The graph convolution layer provided in the embodiment of the present application processes the graph convolution input matrix to obtain a flow chart of the first graph convolution matrix, which specifically includes the following steps:

[0130] Step 1110: Obtain the graph Laplacian matrix and the second network weights corresponding to the hidden layer.

[0131] In one embodiment, the graph Laplacian matrix here is the graph Laplacian matrix L mentioned above, which is expressed as: L = DA, assuming that the second network weight of the hidden layer in the graph convolution layer is expressed as W l , for the first graph convolution layer, the second network weight of its hidden layer is represented by W 1, for the second graph convolution layer, the second network weight of its hidden layer is expressed as W 2 .

[0132] Step 1120: Calculate a first graph convolution matrix according to the graph Laplacian matrix, the second network weight, the third activation function and the graph convolution input matrix.

[0133] In one embodiment, the third activation functions of both graph convolutional layers can be Relu activation functions. In this case, the first graph convolution matrix is ​​expressed as:

[0134] H l+1 =σ(((I+λL) -1 )H l W l )

[0135] The value of l is 1 or 2.

[0136] When l = 1, it indicates the first graph convolutional layer, then H l =H 1 is the graph convolution input matrix, W l =W 1 is the second network weight of the hidden layer of the first graph convolutional layer, σ represents the third activation function of the first graph convolutional layer, H l+1 =H 2 The first graph convolution matrix output by the first graph convolution layer.

[0137] When l = 2, it indicates the second graph convolutional layer, then H l =H 2 is the first graph convolution matrix, W l =W 2 is the second network weight of the hidden layer of the second graph convolutional layer, σ represents the third activation function of the second graph convolutional layer, H l+1 =H 3 The first output matrix of the second graph convolutional layer.

[0138] At this point, the output of the correlation prediction sub-model is obtained. If multiple correlation prediction sub-models are cascaded, the output update process is performed by accumulating the output data of the last correlation prediction sub-model with the first output matrix corresponding to the first correlation prediction sub-model through a jump connection. The jump connection process will not be repeated here.

[0139] Step 130: Input the first output matrix into the output prediction layer for data processing to obtain the destination traffic matrix corresponding to the location node.

[0140] In one embodiment, the output prediction layer can be composed of two cascaded fully connected layers, and the first fully connected layer extracts useful information from the input first output matrix and converts it into an intermediate representation through linear transformation and nonlinear activation function (such as Relu activation function). This intermediate representation is a high-dimensional vector to learn the complex relationship between the first output matrices. The second fully connected layer is used to map the intermediate representation to an output space of a specific size, which corresponds to the structure of the OD matrix. Among them, the second-level fully connected layer may use an activation function different from that of the first fully connected layer, such as a softmax activation function or a sigmoid activation function, to ensure that the value of the output target traffic matrix is ​​within an appropriate range.

[0141] In one embodiment, the traffic flow prediction model of the embodiment of the present application needs to be trained in advance. At this time, the loss function used in the training process is the mean absolute error loss function, which is expressed as:

[0142] L MAE =||Y′-Y||1

[0143] Among them, Y represents the actual destination traffic data in the training sample, that is, the sample label, and Y′ represents the predicted destination traffic data.

[0144] Different from the traffic flow prediction process in the related art, the embodiment of the present application combines the gated temporal convolutional network and the graph convolutional network to make full use of the available spatiotemporal context information to analyze traffic travel data. Among them, the graph convolutional network is based on the adjacency matrix without self-loops to force the model to learn to use the features of the neighboring position nodes to update the features of the position nodes in the current space, while the gated temporal convolutional network can learn the spatiotemporal correlation features of different patterns.

[0145] The technical solution provided by the embodiment of the present application uses a pre-trained traffic flow prediction model to perform a prediction process. The traffic flow prediction model at least includes a correlation prediction sub-model and an output prediction layer. The correlation prediction sub-model includes a cascaded gated time convolutional network and a graph convolutional network. The gated time convolutional network includes two gated convolutional sub-networks deployed in parallel. The method specifically includes obtaining traffic flow data of multiple location nodes to generate an originating flow matrix, and optimizing the originating flow matrix to obtain an input flow matrix, inputting the input flow matrix into the correlation prediction sub-model for correlation analysis to obtain a first output matrix, and using the gated convolutional sub-network to process the input flow matrix to obtain the corresponding first gated data, and obtaining the second gated data based on the two first gated data. The second gated data and the input flow matrix are jointly input into the graph convolutional network for data processing to obtain a first output matrix, and the first output matrix is ​​input into the output prediction layer for data processing to obtain a destination flow matrix corresponding to the location node. The traffic flow prediction model in the embodiment of the present application utilizes a graph convolutional network to perform data flow along the direction of the origin and destination in the traffic flow data, and can dynamically capture the bidirectional spatial correlation between the origin and the destination. At the same time, a gated temporal convolutional network is used to capture the temporal correlation. Finally, traffic flow prediction is performed based on the captured bidirectional spatial correlation and temporal correlation, which can improve the accuracy of traffic flow prediction.

[0146] The present application also provides a traffic flow prediction device, which can implement the above traffic flow prediction method. Fig.12 , the device comprises:

[0147] Data acquisition module 1210: used to acquire traffic flow data of multiple location nodes to generate an originating flow matrix, and perform data optimization on the originating flow matrix to obtain an input flow matrix.

[0148] Correlation analysis module 1220: used to input the input traffic matrix into the correlation prediction sub-model for correlation analysis to obtain a first output matrix, perform data processing on the input traffic matrix using the gated convolution sub-network to obtain corresponding first gated data, obtain second gated data based on the two first gated data, and input the second gated data and the input traffic matrix into the graph convolution network for data processing to obtain the first output matrix.

[0149] Data output module 1230: used to input the first output matrix into the output prediction layer for data processing to obtain the destination traffic matrix corresponding to the location node.

[0150] The specific implementation of the traffic flow prediction device of this embodiment is basically the same as the specific implementation of the above-mentioned traffic flow prediction method, and will not be repeated here.

[0151] The present application also provides an electronic device, including:

[0152] at least one memory;

[0153] at least one processor;

[0154] at least one program;

[0155] The program is stored in the memory, and the processor executes the at least one program to implement the traffic flow prediction method implemented in the present application. The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.

[0156] See also Fig.13 , Fig.13 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0157] The processor 1301 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0158] The memory 1302 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1302 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1302, and the processor 1301 calls and executes the traffic flow prediction method of the embodiment of this application;

[0159] Input / output interface 1303, used to implement information input and output;

[0160] Communication interface 1304, used to realize communication interaction between the device and other devices, which can be realized by wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); and

[0161] A bus 1305 that transmits information between the various components of the device (e.g., the processor 1301, the memory 1302, the input / output interface 1303, and the communication interface 1304);

[0162] The processor 1301 , the memory 1302 , the input / output interface 1303 and the communication interface 1304 are connected to each other in communication within the device via a bus 1305 .

[0163] An embodiment of the present application further provides a storage medium, which is a storage medium storing a computer program, and the computer program implements the above-mentioned traffic flow prediction method when executed by a processor.

[0164] As a non-transitory storage medium, the memory can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0165] The traffic flow prediction method, device, equipment and storage medium proposed in the embodiments of the present application use a pre-trained traffic flow prediction model to perform a prediction process. The traffic flow prediction model at least includes a correlation prediction sub-model and an output prediction layer. The correlation prediction sub-model includes a cascaded gated time convolutional network and a graph convolutional network. The gated time convolutional network includes two gated convolutional sub-networks deployed in parallel. The method specifically includes obtaining traffic flow data of multiple location nodes to generate an originating flow matrix, and optimizing the originating flow matrix to obtain an input flow matrix, inputting the input flow matrix into the correlation prediction sub-model for correlation analysis to obtain a first output matrix, using the gated convolutional sub-network to process the input flow matrix to obtain the corresponding first gated data, obtaining the second gated data based on the two first gated data, inputting the second gated data and the input flow matrix into the graph convolutional network for data processing to obtain the first output matrix, and inputting the first output matrix into the output prediction layer for data processing to obtain the destination flow matrix corresponding to the location node. The traffic flow prediction model in the embodiment of the present application utilizes a graph convolutional network to perform data flow along the direction of the origin and destination in the traffic flow data, and can dynamically capture the bidirectional spatial correlation between the origin and the destination. At the same time, a gated temporal convolutional network is used to capture the temporal correlation. Finally, traffic flow prediction is performed based on the captured bidirectional spatial correlation and temporal correlation, which can improve the accuracy of traffic flow prediction.

[0166] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0167] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0168] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0169] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0170] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0171] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0172] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0173] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0174] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0175] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store programs.

[0176] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A traffic flow prediction method, characterized in that: A prediction process is performed using a pre-trained traffic flow prediction model, wherein the traffic flow prediction model includes at least a correlation prediction sub-model and an output prediction layer, wherein the correlation prediction sub-model includes a cascaded gated time convolutional network and a graph convolutional network, wherein the gated time convolutional network includes a plurality of gated convolutional sub-networks deployed in parallel, and wherein the method includes: Obtaining traffic flow data of multiple location nodes to generate an originating flow matrix, and performing data optimization on the originating flow matrix to obtain an input flow matrix; Inputting the input traffic matrix into the correlation prediction sub-model for correlation analysis to obtain a first output matrix, performing data processing on the input traffic matrix using the gated convolution sub-network to obtain corresponding first gated data, obtaining second gated data based on two of the first gated data, and inputting the second gated data and the input traffic matrix into the graph convolution network for data processing to obtain the first output matrix; The first output matrix is ​​input into the output prediction layer for data processing to obtain a destination traffic matrix corresponding to the location node.

2. The traffic flow prediction method according to claim 1, characterized in that: The gated convolution subnetwork includes a diffusion graph convolution network and a corresponding first activation function, and the gated convolution subnetwork is used to perform data processing on the input traffic matrix to obtain corresponding first gating data, including: Using the diffusion graph convolutional network to process the input traffic matrix to obtain first intermediate data; The first gating data is calculated according to the first activation function and the first intermediate data.

3. The traffic flow prediction method according to claim 2, characterized in that: The diffusion graph convolution network includes two diffusion convolution sub-networks deployed in parallel and a second activation function corresponding to each of the diffusion convolution sub-networks. The use of the diffusion graph convolution network to perform data processing on the input traffic matrix to obtain first intermediate data includes: Inputting the input flow matrix into the diffusion convolution sub-network for data processing to obtain first diffusion data corresponding to each diffusion convolution sub-network; Obtaining a first network weight corresponding to each of the diffuse convolutional sub-networks; Calculate the second intermediate data corresponding to each of the diffusion convolution sub-networks using the second activation function, the first network weight and the first diffusion data respectively; The Hadamard product of two of the second intermediate data is calculated to obtain the first intermediate data.

4. The traffic flow prediction method according to claim 3, characterized in that: The step of inputting the input flow matrix into the diffusion convolution subnetwork for data processing to obtain first diffusion data corresponding to each diffusion convolution subnetwork includes: Determining multiple reference variables one by one according to the convolution kernel size of the diffusion convolution sub-network; For each of the reference variables, an expansion intermediate variable is calculated based on a preset expansion factor and the reference variable, an intermediate flow value of the input flow matrix is ​​determined according to the expansion intermediate variable and the current time step, a reference convolution kernel size is calculated according to the reference variable, and a reference intermediate value corresponding to the reference variable is obtained according to the reference convolution kernel size and the intermediate flow value; The reference intermediate values ​​are accumulated to obtain the first diffusion data.

5. The traffic flow prediction method according to claim 1, characterized in that: The step of performing data optimization on the originating traffic matrix to obtain an input traffic matrix includes: Obtaining an adjacency matrix corresponding to the position node, calculating a degree matrix corresponding to the adjacency matrix, and calculating a graph Laplacian matrix based on a difference between the degree matrix and the adjacency matrix; Obtaining a preset regularization parameter, and calculating a preprocessing matrix based on the preset regularization parameter and the graph Laplace matrix; The input traffic matrix is ​​obtained according to the product of the preprocessing matrix and the originating traffic matrix.

6. The traffic flow prediction method according to claim 1, characterized in that: The graph convolution network includes two cascaded graph convolution layers, and the second gating data and the input traffic matrix are input into the graph convolution network for data processing to obtain the first output matrix, including: Accumulating the second gating data and the input traffic matrix to obtain a graph convolution input matrix; Using the first graph convolution layer to process the graph convolution input matrix to obtain a first graph convolution matrix; The second graph convolution layer is used to perform data processing on the first graph convolution matrix to obtain the first output matrix.

7. The traffic flow prediction method according to claim 6, characterized in that: The graph convolution layer includes a hidden layer and a third activation function, and the first graph convolution layer is used to perform data processing on the graph convolution input matrix to obtain a first graph convolution matrix, including: Obtaining a graph Laplacian matrix and a second network weight corresponding to the hidden layer; The first graph convolution matrix is ​​calculated according to the graph Laplacian matrix, the second network weight, the third activation function and the graph convolution input matrix.

8. The traffic flow prediction method according to any one of claims 1 to 7, characterized in that: A preset number of the correlation prediction sub-models are cascaded, and the first output matrix corresponding to the first correlation prediction sub-model is accumulated with the output data of the last correlation prediction sub-model through a jump connection.

9. A traffic flow prediction device, characterized in that: The prediction process is performed using a pre-trained traffic flow prediction model, wherein the traffic flow prediction model includes at least a correlation prediction sub-model and an output prediction layer, wherein the correlation prediction sub-model includes a cascaded gated time convolutional network and a graph convolutional network, wherein the gated time convolutional network includes a plurality of gated convolutional sub-networks deployed in parallel, and wherein the device includes: Data acquisition module: used to acquire traffic flow data of multiple location nodes to generate an originating flow matrix, and perform data optimization on the originating flow matrix to obtain an input flow matrix; Correlation analysis module: used for inputting the input traffic matrix into the correlation prediction sub-model for correlation analysis to obtain a first output matrix, respectively using the gated convolution sub-network to process the input traffic matrix to obtain corresponding first gated data, obtaining second gated data according to the two first gated data, and inputting the second gated data and the input traffic matrix into the graph convolution network for data processing to obtain the first output matrix; Data output module: used to input the first output matrix into the output prediction layer for data processing to obtain the destination traffic matrix corresponding to the location node.

10. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the traffic flow prediction method according to any one of claims 1 to 8 when executing the computer program.

11. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the traffic flow prediction method according to any one of claims 1 to 8 is implemented.