Traffic flow prediction method and system based on meteorological monitoring, terminal and storage medium

Forecasting by integrating the feature matrix of traffic flow and meteorological data solves the problem that traditional weather monitoring systems cannot provide accurate traffic management guidance, achieves more accurate traffic flow prediction, and improves transportation efficiency and safety.

CN118762502APending Publication Date: 2024-10-11SHANDONG ZHENGCHEN TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410736783.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Traditional meteorological monitoring systems are unable to provide accurate and real-time traffic management guidance, resulting in insufficient traffic signal optimization control and traffic diversion capabilities to respond to unexpected meteorological conditions, affecting traffic smoothness and safety.

Method used

By obtaining traffic flow spatial data, time series data and meteorological data, the corresponding feature matrix is ​​extracted, and then fused and input into the fully connected network for prediction, generating traffic flow prediction results and providing more accurate and reliable traffic flow prediction.

Benefits of technology

It improves transportation efficiency, alleviates traffic congestion, reduces the incidence of traffic accidents, and improves road safety and urban traffic operation levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762502A_ABST
    Figure CN118762502A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent traffic, and particularly provides a traffic flow prediction method and system based on meteorological monitoring, a terminal and a storage medium, and the method comprises the steps: obtaining traffic flow space data, traffic flow time series data and meteorological data; respectively extracting traffic flow spatial features, traffic flow time sequence features and meteorological features from the acquired traffic flow spatial data, traffic flow time sequence data and meteorological data to respectively obtain a traffic flow spatial feature matrix, a traffic flow time sequence feature matrix and a meteorological feature matrix; fusing the traffic flow time sequence feature matrix with the traffic flow spatial feature matrix and the meteorological feature matrix to obtain a first feature fusion matrix and a second feature fusion matrix; fusing the first feature fusion matrix and the second feature fusion matrix to obtain a third feature fusion matrix; and inputting the third feature fusion matrix into a full-connection network FC layer to obtain a traffic flow prediction result. According to the invention, the problem of traffic jam is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent transportation technology, and specifically relates to a traffic flow prediction method, system, terminal and storage medium based on meteorological monitoring. Background Art

[0002] With the rapid development of urbanization and the continuous economic growth, expressways have become an indispensable part of the modern transportation network. Expressways are not only the main traffic arteries connecting major cities, but also carry heavy vehicle and freight traffic. The efficient operation of these sections is one of the important factors supporting regional economic and social development. However, a major challenge facing traffic management departments is the uncertainty of meteorological conditions, especially under extreme weather conditions such as strong winds, heavy rains and haze, which greatly increase the risk of traffic accidents, cause serious traffic congestion, affect traffic efficiency and endanger the lives of drivers.

[0003] Traditional meteorological monitoring systems can only provide limited data monitoring, such as parameters such as temperature, humidity and wind speed, which is not enough to fully meet the needs of modern traffic management. Due to the isolation of this data, it is difficult for traditional meteorological systems to provide accurate and real-time guidance for traffic management. This not only affects the optimization control of traffic signals, but also affects the ability to guide traffic and respond to emergencies in meteorological conditions, ultimately affecting the overall traffic flow and safety. Summary of the invention

[0004] In view of the problem that the meteorological monitoring data in the prior art exists in isolation and cannot provide decisions for traffic diversion, thus affecting the smoothness of traffic, the present invention provides a traffic flow prediction method, system, terminal and storage medium based on meteorological monitoring to solve the above technical problems.

[0005] In a first aspect, the present invention provides a traffic flow prediction method based on meteorological monitoring, comprising:

[0006] Obtain traffic flow spatial data, traffic flow time series data and meteorological data;

[0007] From the acquired traffic flow spatial data, traffic flow time series data and meteorological data, the traffic flow spatial characteristics, traffic flow time series characteristics and meteorological characteristics are extracted respectively, and the traffic flow spatial characteristic matrix, traffic flow time series characteristic matrix and meteorological characteristic matrix are obtained respectively;

[0008] The traffic flow time series feature matrix is ​​fused with the traffic flow space feature matrix and the meteorological feature matrix respectively to obtain the first feature fusion matrix and the second feature fusion matrix;

[0009] The first feature fusion matrix is ​​fused with the second feature fusion matrix to obtain a third feature fusion matrix;

[0010] The third feature fusion matrix is ​​input into the fully connected network FC layer to obtain the traffic flow prediction result.

[0011] Furthermore, from the acquired traffic flow spatial data Y flow , traffic flow time series data and meteorological data Y weather In the above, the spatial characteristics of traffic flow, the temporal characteristics of traffic flow and the meteorological characteristics are extracted respectively, and the spatial characteristic matrix of traffic flow is obtained respectively. Traffic flow time series characteristic matrix and meteorological characteristic matrix include:

[0012] Based on the traffic flow spatial data Y flow , using the formula Calculate and get the graph signal sequence in, is the graph signal sequence, g is the nonlinear activation function, and C is the learnable parameter matrix; based on the graph signal sequence Using the formula Perform average pooling operation to calculate the traffic flow spatial feature matrix in, is the spatial feature matrix of traffic flow, and avgpool is the average pooling operation;

[0013] Based on the traffic flow time series data, the initial traffic flow time series characteristic matrix O is obtained by using formulas (1)-(5) t ;

[0014] R t =σ(W hr H t-1 +W xr X t +a r ) (1)

[0015] Z t =σ(W hz +W xz X t +a z ) (2)

[0016]

[0017] O t =σ(W o H t ) (5)

[0018] Among them, R t is the reset gate, H t-1 is the hidden state at the historical moment t-1, Xt is the input at time t, W hr Reset the gate weight parameter matrix for the historical moment, W xr is the weight parameter matrix of the reset gate at the current time t, σ is the sigmoid activation function, a r is the bias matrix of the reset gate; Z t is the update gate, W hz Update the gate weight parameter matrix for the historical moment, W xz Update the gate weight parameter matrix at the current time t, a z is the bias matrix of the update gate; is the candidate hidden state at the current time t, is the weight parameter matrix of the candidate hidden state at the historical moment, is the weight parameter matrix of the candidate hidden state at the current moment, is the bias matrix of the candidate hidden state, ⊙ is the Hadamard product operation; H t is the hidden state at the current time t; O t is the output value at the current moment;

[0019] Based on the initial traffic flow time series feature matrix O t , using the formula Calculate the hidden layer state vector H at different times t The attention score vector b under t ; Based on the attention score vector b t and the initial traffic flow time series characteristic matrix O t , using the formula The traffic flow time series characteristic matrix is ​​calculated, where b t is the attention score vector at time t, is the traffic flow time series characteristic matrix;

[0020] Based on meteorological data Y weather , using the formula Calculate and obtain the initial meteorological characteristic matrix Among them, FC is a fully connected network; based on the initial meteorological feature matrix Using the formula Perform average pooling operation to obtain the meteorological feature matrix

[0021]

[0022] Furthermore, the traffic flow time series feature matrix is ​​respectively summed with the traffic flow space feature matrix to obtain a first feature fusion matrix and a second feature fusion matrix, including:

[0023] The traffic flow time series characteristic matrix and traffic flow spatial characteristic matrix are combined using the formula Perform fusion to obtain the first feature fusion matrix K1, where φ is the tanh nonlinear activation function and W1 is the trainable parameter matrix;

[0024] The traffic flow time series characteristic matrix and the meteorological characteristic matrix are combined using the formula The fusion is performed to obtain the second feature fusion matrix K2, where W2 is a trainable parameter matrix.

[0025] Furthermore, the first feature fusion matrix is ​​fused with the second feature fusion matrix to obtain a third feature fusion matrix, including:

[0026] Use the formula Y fusion =conv([K1,K2]) performs convolution operation to fuse the first feature fusion matrix with the second feature fusion matrix to obtain the third feature fusion matrix Y fusion , where conv is the convolution operation.

[0027] Furthermore, the third feature fusion matrix is ​​input into the fully connected network FC layer to obtain the traffic flow prediction results, including:

[0028] Use the formula Y predict =FC(Y fusion ), and obtain the traffic flow prediction result Y in the fully connected network FC layer predict .

[0029] In a second aspect, the present invention provides a traffic flow prediction system based on meteorological monitoring, comprising:

[0030] A data acquisition module is used to acquire traffic flow spatial data, traffic flow time series data and meteorological data;

[0031] A feature extraction module is used to extract traffic flow spatial features, traffic flow time series features and meteorological features from the acquired traffic flow spatial data, traffic flow time series data and meteorological data, respectively, to obtain a traffic flow spatial feature matrix, a traffic flow time series feature matrix and a meteorological feature matrix respectively;

[0032] The first fusion module is used to fuse the traffic flow time series feature matrix with the traffic flow space feature matrix and the meteorological feature matrix to obtain a first feature fusion matrix and a second feature fusion matrix;

[0033] A second fusion module is used to fuse the first feature fusion matrix with the second feature fusion matrix to obtain a third feature fusion matrix;

[0034] The prediction output module is used to input the third feature fusion matrix into the fully connected network FC layer to obtain the prediction result of traffic flow.

[0035] Furthermore, the feature extraction module includes:

[0036] Spatial feature extraction unit, used to extract spatial features based on traffic flow spatial data Y flow , using the formula Calculate and get the graph signal sequence in, is the graph signal sequence, g is the nonlinear activation function, and C is the learnable parameter matrix; based on the graph signal sequence Using the formula Perform average pooling operation to calculate the traffic flow spatial feature matrix in, is the spatial feature matrix of traffic flow, and avgpool is the average pooling operation;

[0037] The initial time series feature extraction unit is used to calculate the initial traffic flow time series feature matrix O based on the traffic flow time series data using formulas (1)-(5) t ;

[0038] R t =σ(W hr H t-1 +W xr X t +a r ) (1)

[0039] Z t =σ(W hz +W xz X t +a z ) (2)

[0040]

[0041]

[0042] O t =σ(W o H t ) (5)

[0043] Among them, R t is the reset gate, H t-1 is the hidden state at the historical moment t-1, X t is the input at time t, W hr Reset the gate weight parameter matrix for the historical moment, W xr is the weight parameter matrix of the reset gate at the current time t, σ is the sigmoid activation function, a r is the bias matrix of the reset gate; Z t is the update gate, Whz Update the gate weight parameter matrix for the historical moment, W xz Update the gate weight parameter matrix at the current time t, a z is the bias matrix of the update gate; is the candidate hidden state at the current time t, is the weight parameter matrix of the candidate hidden state at the historical moment, is the weight parameter matrix of the candidate hidden state at the current moment, is the bias matrix of the candidate hidden state, ⊙ is the Hadamard product operation; H t is the hidden state at the current time t; O t is the output value at the current moment;

[0044] The time series feature extraction unit is used to extract the time series feature matrix O of the initial traffic flow. t , using the formula Calculate the hidden layer state vector H at different times t The attention score vector b under t ; Based on the attention score vector b t and the initial traffic flow time series characteristic matrix O t , using the formula The traffic flow time series characteristic matrix is ​​calculated, where b t is the attention score vector at time t, is the traffic flow time series characteristic matrix;

[0045] Meteorological feature extraction unit, used to extract meteorological features based on meteorological data Y weather , using the formula Calculate and obtain the initial meteorological characteristic matrix Among them, FC is a fully connected network; based on the initial meteorological feature matrix Using the formula Perform average pooling operation to obtain the meteorological feature matrix

[0046] Furthermore, the first fusion module includes:

[0047] The first fusion unit is used to combine the traffic flow time series feature matrix and the traffic flow space feature matrix using the formula Perform fusion to obtain the first feature fusion matrix K1, where φ is the tanh nonlinear activation function and W1 is the trainable parameter matrix;

[0048] The second fusion unit is used to combine the traffic flow time series feature matrix and the meteorological feature matrix using the formula The fusion is performed to obtain the second feature fusion matrix K2, where W2 is a trainable parameter matrix.

[0049] In a third aspect, a terminal is provided, including:

[0050] processor, memory, wherein:

[0051] The memory is used to store computer programs.

[0052] The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.

[0053] In a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the computer-readable storage medium is run on a computer, the computer executes the methods described in the above aspects.

[0054] The beneficial effect of the present invention is that the traffic flow prediction method, system, terminal and storage medium based on meteorological monitoring provided by the present invention extract features from traffic flow spatial data, traffic flow time series data and meteorological data to generate a corresponding feature matrix. The three feature matrices are integrated to perform traffic flow prediction, so as to more comprehensively reflect the changing trend of actual traffic flow, provide more accurate and reliable traffic flow prediction results for traffic management departments, help improve transportation efficiency, alleviate traffic congestion problems, reduce the incidence of traffic accidents, and improve road safety and the overall level of urban traffic operation.

[0055] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0057] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0058] Figure 2 is a schematic block diagram of a system according to an embodiment of the present invention.

[0059] Figure 3 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0062] The traffic flow prediction method based on meteorological monitoring provided by the embodiment of the present invention is executed by a computer device. Accordingly, the traffic flow prediction system based on meteorological monitoring runs in the computer device.

[0063] To facilitate understanding of the present invention, the traffic flow prediction method based on meteorological monitoring provided by the present invention is further described below based on the principle of the traffic flow prediction method based on meteorological monitoring provided by the present invention and in combination with the process of regulating the timing of traffic lights in the embodiment.

[0064] Specifically, the traffic flow prediction method based on meteorological monitoring includes:

[0065] S1. Obtain traffic flow spatial data, traffic flow time series data and meteorological data.

[0066] S2. Extract the traffic flow spatial characteristics, traffic flow time series characteristics and meteorological characteristics from the acquired traffic flow spatial data, traffic flow time series data and meteorological data, and obtain the traffic flow spatial characteristic matrix, traffic flow time series characteristic matrix and meteorological characteristic matrix respectively.

[0067] Based on the traffic flow spatial data Y flow , using the formula Calculate and get the graph signal sequence in, is the graph signal sequence, g is the nonlinear activation function, and C is the learnable parameter matrix; based on the graph signal sequence Using the formula Perform average pooling operation to calculate the traffic flow spatial feature matrix in, is the spatial feature matrix of traffic flow, and avgpool is the average pooling operation;

[0068] Based on the traffic flow time series data, the initial traffic flow time series characteristic matrix O is obtained by using formulas (1)-(5) t ;

[0069] R t =σ(W hr H t-1 +W xr X t +a r ) (1)

[0070] Z t =σ(W hz +W xz X t +a z ) (2)

[0071]

[0072]

[0073] O t =σ(W o H t ) (5)

[0074] Among them, R t is the reset gate, H t-1 is the hidden state at the historical moment t-1, X t is the input at time t, W hr Reset the gate weight parameter matrix for the historical moment, W xr is the weight parameter matrix of the reset gate at the current time t, σ is the sigmoid activation function, a r is the bias matrix of the reset gate; Z t is the update gate, W hz Update the gate weight parameter matrix for the historical moment, W xz Update the gate weight parameter matrix at the current time t, a z is the bias matrix of the update gate; is the candidate hidden state at the current time t, is the weight parameter matrix of the candidate hidden state at the historical moment, is the weight parameter matrix of the candidate hidden state at the current moment, is the bias matrix of the candidate hidden state, ⊙ is the Hadamard product operation; H t is the hidden state at the current time t; O t is the output value at the current moment;

[0075] Based on the initial traffic flow time series feature matrix O t , using the formula Calculate the hidden layer state vector H at different times t The attention score vector b under t ; Based on the attention score vector b t and the initial traffic flow time series characteristic matrix O t , using the formula The traffic flow time series characteristic matrix is ​​calculated, where b t is the attention score vector at time t, is the traffic flow time series characteristic matrix;

[0076] Based on meteorological data Y weather , using the formula Calculate and obtain the initial meteorological characteristic matrix Among them, FC is a fully connected network; based on the initial meteorological feature matrix Using the formula Perform average pooling operation to obtain the meteorological feature matrix

[0077]

[0078] S 3. The traffic flow time series feature matrix is ​​fused with the traffic flow spatial feature matrix and the meteorological feature matrix respectively to obtain a first feature fusion matrix and a second feature fusion matrix.

[0079] The traffic flow time series characteristic matrix and traffic flow spatial characteristic matrix are combined using the formula Perform fusion to obtain the first feature fusion matrix K1, where φ is the tanh nonlinear activation function and W1 is the trainable parameter matrix;

[0080] The traffic flow time series characteristic matrix and the meteorological characteristic matrix are combined using the formula The fusion is performed to obtain the second feature fusion matrix K2, where W2 is a trainable parameter matrix.

[0081] S4. Fuse the first feature fusion matrix with the second feature fusion matrix to obtain a third feature fusion matrix.

[0082] Use the formula Y fusion =conv([K1,K2]) performs convolution operation to fuse the first feature fusion matrix with the second feature fusion matrix to obtain the third feature fusion matrix Y fusion , where conv is the convolution operation.

[0083] S5. Input the third feature fusion matrix into the fully connected network FC layer to obtain the prediction result of traffic flow.

[0084] Use the formula Y predict =FC(Yfusion ), and obtain the traffic flow prediction result Y in the fully connected network FC layer predict .

[0085] In some embodiments, the traffic flow prediction system based on meteorological monitoring may include multiple functional modules composed of computer program segments. The computer program of each program segment in the traffic flow prediction system based on meteorological monitoring may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) The function of traffic flow prediction based on meteorological monitoring.

[0086] In this embodiment, the traffic flow prediction system based on meteorological monitoring can be divided into multiple functional modules according to the functions it performs, such as Figure 2 As shown. The functional modules of the system 200 may include: a data acquisition module 210, a feature extraction module 220, a first fusion module 230, a second fusion module 240 and a prediction output module 250. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0087] A data acquisition module is used to acquire traffic flow spatial data, traffic flow time series data and meteorological data;

[0088] A feature extraction module is used to extract traffic flow spatial features, traffic flow time series features and meteorological features from the acquired traffic flow spatial data, traffic flow time series data and meteorological data, respectively, to obtain a traffic flow spatial feature matrix, a traffic flow time series feature matrix and a meteorological feature matrix respectively;

[0089] The first fusion module is used to fuse the traffic flow time series feature matrix with the traffic flow space feature matrix and the meteorological feature matrix respectively to obtain a first feature fusion matrix and a second feature fusion matrix;

[0090] A second fusion module is used to fuse the first feature fusion matrix with the second feature fusion matrix to obtain a third feature fusion matrix;

[0091] The prediction output module is used to input the third feature fusion matrix into the fully connected network FC layer to obtain the prediction result of traffic flow.

[0092] Optionally, as an embodiment of the present invention, the feature extraction module includes:

[0093] Spatial feature extraction unit, used to extract spatial features based on traffic flow spatial data Y flow , using the formula Calculate and get the graph signal sequence in, is the graph signal sequence, g is the nonlinear activation function, and C is the learnable parameter matrix; based on the graph signal sequence Using the formula Perform average pooling operation to calculate the traffic flow spatial feature matrix in, is the spatial feature matrix of traffic flow, and avgpool is the average pooling operation;

[0094] The initial time series feature extraction unit is used to calculate the initial traffic flow time series feature matrix O based on the traffic flow time series data using formulas (1)-(5) t ;

[0095] R t =σ(W hr H t-1 +W xr X t +a r ) (1)

[0096] Z t =σ(W hz +W xz X t +a z ) (2)

[0097]

[0098]

[0099] O t =σ(W o H t ) (5)

[0100] Among them, R t is the reset gate, H t-1 is the hidden state at the historical moment t-1, X t is the input at time t, W hr Reset the gate weight parameter matrix for the historical moment, W xr is the weight parameter matrix of the reset gate at the current time t, σ is the sigmoid activation function, a r is the bias matrix of the reset gate; Z t is the update gate, W hz Update the gate weight parameter matrix for the historical moment, W xz Update the gate weight parameter matrix at the current time t, a z is the bias matrix of the update gate; is the candidate hidden state at the current time t, is the weight parameter matrix of the candidate hidden state at the historical moment, is the weight parameter matrix of the candidate hidden state at the current moment, is the bias matrix of the candidate hidden state, ⊙ is the Hadamard product operation; H t is the hidden state at the current time t; O t is the output value at the current moment;

[0101] The time series feature extraction unit is used to extract the time series feature matrix O of the initial traffic flow. t , using the formula Calculate the hidden layer state vector H at different times t The attention score vector b under t ; Based on the attention score vector b t and the initial traffic flow time series characteristic matrix O t , using the formula The traffic flow time series characteristic matrix is ​​calculated, where b t is the attention score vector at time t, is the traffic flow time series characteristic matrix;

[0102] Meteorological feature extraction unit, used to extract meteorological features based on meteorological data Y weather , using the formula σ(FC(Y weather )) to calculate and obtain the initial meteorological characteristic matrix Among them, FC is a fully connected network; based on the initial meteorological feature matrix Using the formula Perform average pooling operation to obtain the meteorological feature matrix

[0103] Optionally, as an embodiment of the present invention, the first fusion module includes:

[0104] The first fusion unit is used to combine the traffic flow time series feature matrix and the traffic flow space feature matrix using the formula Perform fusion to obtain the first feature fusion matrix K1, where φ is the tanh nonlinear activation function and W1 is the trainable parameter matrix;

[0105] The second fusion unit is used to combine the traffic flow time series feature matrix and the meteorological feature matrix using the formula The fusion is performed to obtain the second feature fusion matrix K2, where W2 is a trainable parameter matrix.

[0106] Figure 3A schematic diagram of the structure of a terminal 300 provided in an embodiment of the present invention. The terminal 300 can be used to execute the traffic flow prediction method based on meteorological monitoring provided in an embodiment of the present invention.

[0107] The terminal 300 may include: a processor 310, a memory 320 and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0108] The memory 320 can be used to store the execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEpROM), erasable programmable read-only memory (EpROM), programmable read-only memory (pROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 can perform some or all of the steps in the following method embodiments.

[0109] The processor 310 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. By running or executing software programs and / or modules stored in the memory 320, and calling data stored in the memory, the processor can execute various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC for short), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 310 can include only a central processing unit (Central processing Unit, referred to as CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0110] The communication unit 330 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.

[0111] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0112] Therefore, the present invention generates a corresponding feature matrix by extracting features from traffic flow spatial data, traffic flow time series data and meteorological data. The three feature matrices are integrated to perform traffic flow prediction, so as to more comprehensively reflect the changing trend of actual traffic flow, provide more accurate and reliable traffic flow prediction results for traffic management departments, and help improve transportation efficiency, alleviate traffic congestion problems, reduce the incidence of traffic accidents, improve road safety and the overall level of urban traffic operation. The technical effects that can be achieved by this embodiment can be found in the description above, and will not be repeated here.

[0113] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution in the embodiments of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention.

[0114] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0115] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules 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 systems or modules, which can be electrical, mechanical or other forms.

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

[0117] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0118] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all of these shall be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A traffic flow prediction method based on meteorological monitoring, characterized in that: include: Obtain traffic flow spatial data, traffic flow time series data and meteorological data; From the acquired traffic flow spatial data, traffic flow time series data and meteorological data, the traffic flow spatial characteristics, traffic flow time series characteristics and meteorological characteristics are extracted respectively, and the traffic flow spatial characteristic matrix, traffic flow time series characteristic matrix and meteorological characteristic matrix are obtained respectively; The traffic flow time series feature matrix is ​​fused with the traffic flow space feature matrix and the meteorological feature matrix respectively to obtain the first feature fusion matrix and the second feature fusion matrix; The first feature fusion matrix is ​​fused with the second feature fusion matrix to obtain a third feature fusion matrix; The third feature fusion matrix is ​​input into the fully connected network FC layer to obtain the traffic flow prediction result.

2. The method according to claim 1, characterized in that: From the acquired traffic flow spatial data, traffic flow time series data and meteorological data, the traffic flow spatial characteristics, traffic flow time series characteristics and meteorological characteristics are extracted respectively, and the traffic flow spatial characteristic matrix, traffic flow time series characteristic matrix and meteorological characteristic matrix are obtained respectively, including: Based on traffic flow spatial data Y flow , using the formula Calculate and get the graph signal sequence in, is the graph signal sequence, g is the nonlinear activation function, and C is the learnable parameter matrix; based on the graph signal sequence Using the formula Perform average pooling operation to calculate the traffic flow spatial feature matrix in, is the spatial feature matrix of traffic flow, and avgpool is the average pooling operation; Based on the traffic flow time series data, the initial traffic flow time series characteristic matrix O is obtained by using formulas (1)-(5) t ; R t =σ(W hr H t-1 +W xr X t +a r ) (1) WITH t =σ(W hz +W xz X t +a z ) (2) The t =σ(W o H t ) (5) Among them, R t H is the reset gate. t-1 is the hidden state at the historical moment t-1, X t is the input at time t, W hr Reset the gate weight parameter matrix for the historical moment, W xr is the weight parameter matrix of the reset gate at the current time t, σ is the sigmoid activation function, a r is the bias matrix of the reset gate; Z t is the update gate, W hz Update the gate weight parameter matrix for the historical moment, W xz Update the gate weight parameter matrix at the current time t, a z is the bias matrix of the update gate; is the candidate hidden state at the current time t, is the weight parameter matrix of the candidate hidden state at the historical moment, is the weight parameter matrix of the candidate hidden state at the current moment, is the bias matrix of the candidate hidden state, ⊙ is the Hadamard product operation; H t is the hidden state at the current time t; O t is the output value at the current moment; Based on the initial traffic flow time series characteristic matrix O t , using the formula Calculate the hidden layer state vector H at different times t The attention score vector b under t ; Based on the attention score vector b t and the initial traffic flow time series characteristic matrix O t , using the formula The traffic flow time series characteristic matrix is ​​calculated, where b t is the attention score vector at time t, is the traffic flow time series characteristic matrix; Based on meteorological data Y weather , using the formula Calculate and obtain the initial meteorological characteristic matrix Among them, FC is a fully connected network; based on the initial meteorological feature matrix Using the formula Perform average pooling operation to obtain the meteorological feature matrix 3. The method according to claim 1, characterized in that The traffic flow time series feature matrix is ​​respectively summed with the traffic flow space feature matrix to obtain the first feature fusion matrix and the second feature fusion matrix, including: The traffic flow time series characteristic matrix and traffic flow spatial characteristic matrix are combined using the formula Perform fusion to obtain the first feature fusion matrix K1, where φ is the tanh nonlinear activation function and W1 is the trainable parameter matrix; The traffic flow time series characteristic matrix and the meteorological characteristic matrix are combined using the formula The fusion is performed to obtain the second feature fusion matrix K2, where W2 is a trainable parameter matrix.

4. The method according to claim 3, characterized in that: The first feature fusion matrix is ​​fused with the second feature fusion matrix to obtain a third feature fusion matrix, including: Use the formula Y fusion =conv([K1,K2]) performs convolution operation to fuse the first feature fusion matrix with the second feature fusion matrix to obtain the third feature fusion matrix Y fusion , where conv is the convolution operation.

5. The method according to claim 1, characterized in that The third feature fusion matrix is ​​input into the fully connected network FC layer to obtain the traffic flow prediction results, including: Use the formula Y predict =FC(Y fusion ), and obtain the traffic flow prediction result Y in the fully connected network FC layer predict .

6. A traffic flow prediction system based on meteorological monitoring, characterized in that: include: A data acquisition module is used to acquire traffic flow spatial data, traffic flow time series data and meteorological data; A feature extraction module is used to extract traffic flow spatial features, traffic flow time series features and meteorological features from the acquired traffic flow spatial data, traffic flow time series data and meteorological data, respectively, to obtain a traffic flow spatial feature matrix, a traffic flow time series feature matrix and a meteorological feature matrix respectively; The first fusion module is used to fuse the traffic flow time series feature matrix with the traffic flow space feature matrix and the meteorological feature matrix to obtain a first feature fusion matrix and a second feature fusion matrix; A second fusion module is used to fuse the first feature fusion matrix with the second feature fusion matrix to obtain a third feature fusion matrix; The prediction output module is used to input the third feature fusion matrix into the fully connected network FC layer to obtain the prediction result of traffic flow.

7. The system according to claim 6, characterized in that The feature extraction module includes: Spatial feature extraction unit, used to extract spatial features based on traffic flow spatial data Y flow , using the formula Calculate and get the graph signal sequence in, is the graph signal sequence, g is the nonlinear activation function, and C is the learnable parameter matrix; based on the graph signal sequence Using the formula Perform average pooling operation to calculate the traffic flow spatial feature matrix in, is the spatial feature matrix of traffic flow, and avgpool is the average pooling operation; The initial time series feature extraction unit is used to calculate the initial traffic flow time series feature matrix O based on the traffic flow time series data using formulas (1)-(5) t ; R t =σ(W hr H t-1 +W xr X t +a r ) (1) WITH t =σ(W hz +W xz X t +a z ) (2) The t =σ(W o H t ) (5) Among them, R t H is the reset gate. t-1 is the hidden state at the historical moment t-1, X t is the input at time t, W hr Reset the gate weight parameter matrix for the historical moment, W xr is the weight parameter matrix of the reset gate at the current time t, σ is the sigmoid activation function, a r is the bias matrix of the reset gate; Z t is the update gate, W hz Update the gate weight parameter matrix for the historical moment, W xz Update the gate weight parameter matrix at the current time t, a z is the bias matrix of the update gate; is the candidate hidden state at the current time t, is the weight parameter matrix of the candidate hidden state at the historical moment, is the weight parameter matrix of the candidate hidden state at the current moment, is the bias matrix of the candidate hidden state, ⊙ is the Hadamard product operation; H t is the hidden state at the current time t; O t is the output value at the current moment; The time series feature extraction unit is used to extract the time series feature matrix O of the initial traffic flow. t , using the formula Calculate the hidden layer state vector H at different times t The attention score vector b under t ; Based on the attention score vector b t and the initial traffic flow time series characteristic matrix O t , using the formula The traffic flow time series characteristic matrix is ​​calculated, where b t is the attention score vector at time t, is the traffic flow time series characteristic matrix; Meteorological feature extraction unit, used to extract meteorological features based on meteorological data Y weather , using the formula Calculate and obtain the initial meteorological characteristic matrix Among them, FC is a fully connected network; based on the initial meteorological feature matrix Using the formula Perform average pooling operation to obtain the meteorological feature matrix 8. The system according to claim 6, characterized in that The first fusion module includes: The first fusion unit is used to combine the traffic flow time series feature matrix and the traffic flow space feature matrix using the formula Perform fusion to obtain the first feature fusion matrix K1, where φ is the tanh nonlinear activation function and W1 is the trainable parameter matrix; The second fusion unit is used to combine the traffic flow time series feature matrix and the meteorological feature matrix using the formula The fusion is performed to obtain the second feature fusion matrix K2, where W2 is a trainable parameter matrix.

9. A terminal, characterized in that: include: A memory, used for storing a traffic flow prediction program based on meteorological monitoring; A processor is used to implement the steps of the traffic flow prediction method based on meteorological monitoring as described in any one of claims 1-6 when executing the traffic flow prediction program based on meteorological monitoring.

10. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a traffic flow prediction program based on meteorological monitoring, and when the traffic flow prediction program based on meteorological monitoring is executed by a processor, the steps of the traffic flow prediction method based on meteorological monitoring as described in any one of claims 1-6 are implemented.

Citation Information

Cited By

  • Deep learning traffic flow prediction method based on meteorological information fusion

    CN119181256A