Traffic flow speed prediction method and device, equipment and storage medium
Through the training of frequency decomposition and deep learning models of the space -time related data of the target section, the problem that traditional models cannot capture data dynamic characteristics have been solved, and the reliable predictions and efficiency of the traffic flow speed are improved.
Patent Information
- Application Number
- CN202411947557.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-01-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional linear models cannot effectively capture the dynamic characteristics of the current spatio-temporal correlation data of the target road section, resulting in the predicted traffic flow speed being unreliable.
By obtaining the preset -time data associated data of the target road section, it is decomposed into high frequency, medium frequency, low frequency and trend components to build a deep learning model to predict real -time traffic flow speed, and to improve the accuracy of forecasting through the loss value training model.
It improved the reliable prediction of the current traffic flow speed, reducing the time for manual acquisition, and improving the efficiency of forecasting.
Smart Images

Figure CN119378766A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology and can be applied to the field of transportation. In particular, the present invention relates to a method, device, equipment and storage medium for predicting traffic flow speed. Background Art
[0002] With the development of the times, the diversity of urbanization functions has become increasingly rich, and traffic congestion has gradually become one of the important problems facing cities. The current traffic flow speed of the target section can help the traffic management department quickly grasp the congestion status of the target section, so as to take timely response measures to alleviate traffic congestion and improve the traffic efficiency of the target section.
[0003] However, the current spatiotemporal correlation data of the target road section will change over time, and this change is not linear. The traditional linear model cannot capture the dynamic characteristics of the current spatiotemporal correlation data. Therefore, the current traffic flow speed of the target road section predicted by the traditional linear model is not reliable enough. Therefore, how to predict the current traffic flow speed of the target road section is an urgent problem to be solved. Summary of the invention
[0004] The present invention provides a traffic flow speed prediction method, device, computer equipment and storage medium to solve the technical problem of how to predict the current traffic flow speed of a target road section.
[0005] In a first aspect, a traffic flow speed prediction method is provided, comprising: Acquire preset spatiotemporal correlation data of a target road section, and acquire preset traffic flow speed corresponding to the target road section; Based on a predefined acquisition method, a high-frequency component, a medium-frequency component, a low-frequency component and a trend component of the preset spatiotemporal correlation data are acquired; Determine a first eigenvector corresponding to the preset spatiotemporal correlation data based on a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the preset spatiotemporal correlation data; Obtaining a real-time traffic flow speed predicted by a preset deep learning model based on the first feature vector, and obtaining a loss value between the real-time traffic flow speed and the preset traffic flow speed; Determine the deep learning model after training based on the loss value and a predefined determination method; Obtain current spatiotemporal correlation data of the target road section, determine a second eigenvector corresponding to the current spatiotemporal correlation data based on the high-frequency component, mid-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data, and obtain the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second eigenvector.
[0006] Furthermore, the obtaining of the high-frequency component, the medium-frequency component, the low-frequency component and the trend component of the preset spatiotemporal correlation data based on a predefined obtaining method includes: Decomposing the preset spatiotemporal correlation data of the neighboring road segments by a preset CEEMDAN algorithm to obtain a plurality of first IMF components, where the first IMF components are IMF components of the preset spatiotemporal correlation data; clustering the plurality of first IMF components of the preset spatiotemporal correlation data according to entropy values corresponding to the first IMF components by a preset clustering algorithm to obtain a first clustering result; In the first clustering result, the first IMF component belonging to the high-frequency category is selected as the high-frequency component of the preset spatiotemporal correlation data, the first IMF component belonging to the medium-frequency category is selected as the medium-frequency component of the preset spatiotemporal correlation data, the first IMF component belonging to the low-frequency category is selected as the low-frequency component of the preset spatiotemporal correlation data, and the first IMF component belonging to the trend category is selected as the trend component of the preset spatiotemporal correlation data.
[0007] Further, the determining a first feature vector corresponding to the preset spatiotemporal correlation data based on the high-frequency component, the medium-frequency component, the low-frequency component and the trend component of the preset spatiotemporal correlation data includes: Selecting a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the preset spatiotemporal correlation data as first input information; The first input information and the position coding information corresponding to the first input information are input into a fusion convolution layer, and the first input information and the position coding information corresponding to the first input information are fused using the fusion convolution layer to obtain a first feature vector corresponding to the preset spatiotemporal correlation data.
[0008] Furthermore, the obtaining of the real-time traffic flow speed predicted by the preset deep learning model based on the first feature vector, and obtaining the loss value between the real-time traffic flow speed and the preset traffic flow speed, includes: Inputting the first feature vector into a preset deep learning model to obtain a real-time traffic flow speed predicted by the deep learning model based on the first feature vector; The loss value between the real-time traffic flow speed and the preset traffic flow speed is obtained through a preset mean square error function.
[0009] Furthermore, determining the trained deep learning model based on the loss value and a predefined determination method includes: Training the deep learning model according to the loss value, and during the training process of the deep learning model, determining that the loss value is less than a preset value; When the loss value is less than a preset value, stop training the deep learning model and obtain the trained deep learning model.
[0010] Further, the obtaining of the current spatiotemporal correlation data of the target road section, determining a second feature vector corresponding to the current spatiotemporal correlation data based on a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the current spatiotemporal correlation data, and obtaining the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second feature vector, includes: Acquire current spatiotemporal correlation data of the target road section, acquire high-frequency components, medium-frequency components, low-frequency components and trend components of the current spatiotemporal correlation data, and select the high-frequency components, medium-frequency components, low-frequency components and trend components of the current spatiotemporal correlation data as second input information; The second input information and the position coding information corresponding to the second input information are input into a fusion convolution layer, and the second input information and the position coding information corresponding to the second input information are fused using the fusion convolution layer to obtain a second feature vector corresponding to the current spatiotemporal correlation data, and the second feature vector is input into the trained deep learning model to obtain the current traffic flow speed of the target section predicted by the trained deep learning model.
[0011] Further, in the step of obtaining the current spatiotemporal correlation data of the target road section, determining a second feature vector corresponding to the current spatiotemporal correlation data based on a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the current spatiotemporal correlation data, and obtaining the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second feature vector, the traffic flow speed prediction method includes: A display interface corresponding to the target road section is obtained, and the current traffic flow speed is displayed on the display interface.
[0012] In a second aspect, a traffic flow speed prediction device is provided, comprising: A first acquisition module is used to acquire preset spatiotemporal correlation data of a target road section and to acquire a preset traffic flow speed corresponding to the target road section; A second acquisition module, used to acquire the high-frequency component, the medium-frequency component, the low-frequency component and the trend component of the preset spatiotemporal correlation data based on a predefined acquisition method; A first determining module, configured to determine a first eigenvector corresponding to the preset spatiotemporal correlation data based on a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the preset spatiotemporal correlation data; A third acquisition module is used to obtain the real-time traffic flow speed predicted by the preset deep learning model based on the first feature vector, and obtain the loss value between the real-time traffic flow speed and the preset traffic flow speed; A second determination module, used to determine the trained deep learning model based on the loss value and a predefined determination method; A prediction module is used to obtain the current spatiotemporal correlation data of the target road section, determine the second eigenvector corresponding to the current spatiotemporal correlation data based on the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data, and obtain the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second eigenvector.
[0013] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned traffic flow speed prediction method when executing the computer program.
[0014] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned traffic flow speed prediction method are implemented.
[0015] The present application provides a traffic flow speed prediction method, device, computer equipment and storage medium, which obtain preset spatiotemporal correlation data of a target road section, obtain a preset traffic flow speed corresponding to the target road section; based on a predefined acquisition method, obtain the high-frequency component, medium-frequency component, low-frequency component and trend component of the preset spatiotemporal correlation data; based on the high-frequency component, medium-frequency component, low-frequency component and trend component of the preset spatiotemporal correlation data, determine a first feature vector corresponding to the preset spatiotemporal correlation data; obtain the real-time traffic flow speed predicted by a preset deep learning model based on the first feature vector, obtain the loss value between the real-time traffic flow speed and the preset traffic flow speed; determine the trained deep learning model based on the loss value and a predefined determination method; obtain the current spatiotemporal correlation data of the target road section, and determine the second feature vector corresponding to the current spatiotemporal correlation data based on the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data. The method can obtain the current traffic flow speed of the target section predicted by the trained deep learning model based on the second feature vector. The beneficial effects are in two aspects. On the one hand, the current spatiotemporal correlation data of the target section is obtained, and the second feature vector corresponding to the current spatiotemporal correlation data is determined based on the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data. Based on the second feature vector, the current traffic flow speed of the target section predicted by the trained deep learning model is obtained. Since the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data are all dynamic features of the current spatiotemporal correlation data, the trained deep learning model can capture the dynamic features of the current spatiotemporal correlation data, which is beneficial to improve the reliability of the predicted current traffic flow speed. On the other hand, since there is no need for manual acquisition, the acquisition time of the current traffic flow speed is reduced, which is beneficial to improve the acquisition efficiency of the current traffic flow speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0017] Figure 1 is a schematic diagram of an application environment of a traffic flow speed prediction method in one embodiment of the present invention; Figure 2 A schematic diagram of a flow chart of a traffic flow speed prediction method provided by an embodiment of the present invention; Figure 3 yes Figure 2A schematic flow chart of a specific implementation of step S23; Figure 4 yes Figure 2 A schematic flow chart of a specific implementation of step S25; Figure 5 yes Figure 2 A schematic flow chart of a specific implementation of step S26; Figure 6 is a schematic diagram of the structure of a traffic flow speed prediction device in one embodiment of the present invention; Figure 7 is a schematic diagram of a structure of a computer device in one embodiment of the present invention; Figure 8 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.
[0019] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an application environment of a traffic flow speed prediction method according to an embodiment of the present invention. The traffic flow speed prediction method provided by the embodiment of the present invention can be applied in the following embodiments: Figure 1 In an application environment, a client communicates with a server through a network.
[0020] The server obtains preset spatiotemporal correlation data of the target road section through the client, and obtains the preset traffic flow speed corresponding to the target road section; Based on a predefined acquisition method, a high-frequency component, a medium-frequency component, a low-frequency component and a trend component of the preset spatiotemporal correlation data are acquired; Determine a first eigenvector corresponding to the preset spatiotemporal correlation data based on a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the preset spatiotemporal correlation data; Obtaining a real-time traffic flow speed predicted by a preset deep learning model based on the first feature vector, and obtaining a loss value between the real-time traffic flow speed and the preset traffic flow speed; Determine the deep learning model after training based on the loss value and a predefined determination method; Obtain current spatiotemporal correlation data of the target road section, determine a second eigenvector corresponding to the current spatiotemporal correlation data based on the high-frequency component, mid-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data, and obtain the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second eigenvector.
[0021] In the scheme implemented by the above-mentioned traffic flow speed prediction method, device, equipment and medium, the beneficial effects are in two aspects. On the one hand, the current spatiotemporal correlation data of the target section is obtained, and based on the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data, the second feature vector corresponding to the current spatiotemporal correlation data is determined. Based on the second feature vector, the current traffic flow speed of the target section predicted by the trained deep learning model is obtained. Since the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data are dynamic characteristics of the current spatiotemporal correlation data, the trained deep learning model can capture the dynamic characteristics of the current spatiotemporal correlation data, which is beneficial to improve the reliability of the predicted current traffic flow speed. On the other hand, since no manual acquisition is required, the acquisition time of the current traffic flow speed is reduced, which is beneficial to improve the acquisition efficiency of the current traffic flow speed.
[0022] The device running the client is referred to as a client device.
[0023] The device running the server is referred to as the server device.
[0024] The client devices may include but are not limited to various personal computers, laptops, smart phones, tablet computers, and portable wearable devices.
[0025] The server device can be implemented with an independent task database or a task database cluster composed of multiple task databases. The present invention is described in detail below through specific embodiments.
[0026] See also Figure 2 , Figure 2 A flow chart of a traffic flow speed prediction method provided by an embodiment of the present invention includes the following steps: S21, obtaining preset spatiotemporal correlation data of a target road section, and obtaining a preset traffic flow speed corresponding to the target road section; The target road section refers to a section of road that is specially selected or focused on during the process of traffic planning, management, monitoring or analysis. The target road section includes but is not limited to a road section with a large number of vehicles and people, and a road section with frequent accidents.
[0027] The preset spatiotemporal correlation data is the spatiotemporal correlation data of a past time period.
[0028] The preset spatiotemporal correlation data of the target road section refers to the data information collected for the target road section in the past time period in the traffic network. The preset spatiotemporal correlation data not only records the traffic conditions of the target road section in the past time period, such as the changes in traffic volume, speed, traffic density, etc. over time, but also covers the mutual influence and correlation information of traffic flow between the target road section and other road sections in the past time period.
[0029] For the sake of illustration, an example is given below: For example, the target section is the i-th section, and the preset time series of the i-th section is.
[0030] Construct a matrix: Get the Pearson correlation coefficient between the preset time series of the ith road section and the preset time series of other road sections; construct the first matrix of the ith road section based on the Pearson correlation coefficient between the preset time series of the ith road section and the preset time series of other road sections. Convolution feature extraction: Set parameters such as the number of input channels, the number of output channels, and the size of the convolution kernel, and perform convolution operations on the first matrix through the convolution layer to obtain the second matrix of the ith road section: ; in, is the second matrix of the ith road segment, represents the activation function, Represents the convolution operation; represents the first matrix, Represents the parameters in the convolution operation.
[0031] Pooling operation: Perform a pooling operation on the second matrix of the i-th road section to obtain the third matrix: ; in, is the third matrix of the i-th road segment, is the pooling function, is the second matrix of the i-th road segment.
[0032] Fusion operation: The third matrix of the i-th section is fused with the preset time series of the i-th section to obtain the fourth matrix of the i-th section: ; in, is the fourth matrix of the i-th road segment, is the third matrix of the ith road segment, is the Hadamard product operation; is the preset time series of the i-th road segment.
[0033] Among them, the fourth matrix of the i-th road section is selected as the preset spatiotemporal correlation data of the target road section.
[0034] Among them, the Hadamard product, also known as element-wise product, is a special type of matrix operation.
[0035] Among them, the Chinese name of the Pearson correlation coefficient is: Pearson correlation coefficient, and the English name of the Pearson correlation coefficient is: Pearson correlation coefficient. Pearson correlation coefficient is a statistic used to measure the strength of the linear relationship between two continuous variables. The value range of the Pearson correlation coefficient is between -1 and 1. When the Pearson correlation coefficient is close to 1, it means that the two variables are strongly positively correlated; when the Pearson correlation coefficient is close to -1, it means that the two variables are strongly negatively correlated; and when the correlation coefficient is close to 0, it means that there is no linear relationship between the two variables.
[0036] S22, acquiring a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the preset spatiotemporal correlation data based on a predefined acquisition method; Wherein, the obtaining of the high-frequency component, the medium-frequency component, the low-frequency component and the trend component of the preset spatiotemporal correlation data based on a predefined obtaining method includes: Decomposing the preset spatiotemporal correlation data of the neighboring road segments by a preset CEEMDAN algorithm to obtain a plurality of first IMF components, where the first IMF components are IMF components of the preset spatiotemporal correlation data; clustering the plurality of first IMF components of the preset spatiotemporal correlation data according to entropy values corresponding to the first IMF components by a preset clustering algorithm to obtain a first clustering result; In the first clustering result, the first IMF component belonging to the high-frequency category is selected as the high-frequency component of the preset spatiotemporal correlation data, the first IMF component belonging to the medium-frequency category is selected as the medium-frequency component of the preset spatiotemporal correlation data, the first IMF component belonging to the low-frequency category is selected as the low-frequency component of the preset spatiotemporal correlation data, and the first IMF component belonging to the trend category is selected as the trend component of the preset spatiotemporal correlation data.
[0037] Among them, the Chinese name of the IMF component is: intrinsic mode function component, and the English name of the IMF component is: Intrinsic Mode Function Component.
[0038] Among them, different first IMF components represent different frequency components in the preset spatiotemporal correlation data. By analyzing the first IMF components, it is helpful to understand the characteristics of the preset spatiotemporal correlation data and discover the potential laws and trends in the preset spatiotemporal correlation data.
[0039] Among them, the CEEMDAN algorithm, whose full name in Chinese is: Complete Ensemble Empirical Mode Decomposition with Adaptive Noise, and whose full name in English is: Complete Ensemble Empirical Mode Decomposition with Adaptive Noise, is a signal processing technology.
[0040] Among them, the CEEMDAN algorithm is based on traditional empirical mode decomposition. By introducing adaptive noise and multiple iterations, it effectively solves the common modal aliasing problem of traditional empirical mode decomposition when processing nonlinear and non-stationary signals.
[0041] Among them, the CEEMDAN algorithm is used to decompose the traffic flow speed sequence of each road section, which reduces the interference of the non-stationary and noise characteristics of the data on the predicted real-time traffic flow speed, making the predicted real-time traffic flow speed more accurate and reliable.
[0042] S24, obtaining a real-time traffic flow speed predicted by a preset deep learning model based on the first feature vector, and obtaining a loss value between the real-time traffic flow speed and the preset traffic flow speed; The step of obtaining the real-time traffic flow speed predicted by the preset deep learning model based on the first feature vector and obtaining the loss value between the real-time traffic flow speed and the preset traffic flow speed includes: Inputting the first feature vector into a preset deep learning model to obtain a real-time traffic flow speed predicted by the deep learning model based on the first feature vector; The loss value between the real-time traffic flow speed and the preset traffic flow speed is obtained through a preset mean square error function.
[0043] Among them, the preset mean square error function is: ; in, is the loss value, is the real-time traffic flow speed predicted by the deep learning model; is the preset traffic flow speed; It is a regularization term that helps control the complexity of the model and avoid overfitting; is the regularization hyperparameter, express and The Euclidean distance between is the symbol of the norm.
[0044] Among them, the role of regularization hyperparameters is to help deep learning models avoid overfitting training data during training, thereby improving the model's ability to predict unseen data. By setting regularization hyperparameters, a balance can be found between the accuracy and generalization of deep learning models.
[0045] S25, determining the deep learning model after training based on the loss value and a predefined determination method; S26, obtaining the current spatiotemporal correlation data of the target road section, determining a second eigenvector corresponding to the current spatiotemporal correlation data based on the high-frequency component, mid-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data, and obtaining the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second eigenvector.
[0046] The current spatiotemporal correlation data is the spatiotemporal correlation data of the current time period.
[0047] Among them, the current spatiotemporal correlation data of the target road section refers to the data information collected for the target road section in the current time period in the traffic network. The current spatiotemporal correlation data not only records the traffic conditions of the target road section in the current time period, such as the changes in traffic volume, speed, traffic density, etc. over time, but also covers the mutual influence and correlation information of traffic flow between the target road section and other road sections in the current time period.
[0048] For the sake of illustration, an example is given below: For example, the target section is the i-th section, and the current time series of the i-th section is .
[0049] Constructing a matrix: obtaining the Pearson correlation coefficient between the current time series of the ith road section and the current time series of other road sections; constructing the fifth matrix of the ith road section based on the Pearson correlation coefficient between the current time series of the ith road section and the current time series of other road sections.
[0050] Convolution feature extraction: Set parameters such as the number of input channels, the number of output channels, and the size of the convolution kernel, and perform a convolution operation on the fifth matrix through the convolution layer to obtain the sixth matrix of the i-th road section: ; in, is the sixth matrix of the i-th road segment, represents the activation function, Represents the convolution operation; represents the fifth matrix, Represents the parameters in the convolution operation.
[0051] Pooling operation: Perform a pooling operation on the sixth matrix of the i-th road section to obtain the seventh matrix: ; in, is the seventh matrix of the i-th road segment, is the pooling function, is the sixth matrix of the i-th road segment.
[0052] Fusion operation: The seventh matrix is fused with the current time series of the i-th section to obtain the eighth matrix of the i-th section: ; in, is the eighth matrix of the ith road segment, is the seventh matrix of the i-th road segment, is the Hadamard product operation; is the current time series of the i-th road segment.
[0053] Among them, the eighth matrix of the i-th road section is selected as the current spatiotemporal correlation data of the target road section.
[0054] Wherein, after obtaining the current spatiotemporal correlation data of the target road section, determining a second feature vector corresponding to the current spatiotemporal correlation data based on the high-frequency component, the medium-frequency component, the low-frequency component and the trend component of the current spatiotemporal correlation data, and obtaining the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second feature vector, the traffic flow speed prediction method includes: A display interface corresponding to the target road section is obtained, and the current traffic flow speed is displayed on the display interface.
[0055] In an embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, the current spatiotemporal correlation data of the target road section is obtained, and based on the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data, the second feature vector corresponding to the current spatiotemporal correlation data is determined. Based on the second feature vector, the current traffic flow speed of the target road section predicted by the trained deep learning model is obtained. Since the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data are dynamic characteristics of the current spatiotemporal correlation data, the trained deep learning model can capture the dynamic characteristics of the current spatiotemporal correlation data, which is beneficial to improve the reliability of the predicted current traffic flow speed. On the other hand, since no manual acquisition is required, the acquisition time of the current traffic flow speed is reduced, which is beneficial to improve the acquisition efficiency of the current traffic flow speed.
[0056] See also Figure 3 , Figure 3 yes Figure 2 A specific implementation flow diagram of step S23 is described in detail as follows: S31, selecting a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the preset spatiotemporal correlation data as first input information; S32: input the first input information and the position coding information corresponding to the first input information into a fusion convolution layer, and use the fusion convolution layer to fuse the first input information and the position coding information corresponding to the first input information to obtain a first feature vector corresponding to the preset spatiotemporal correlation data.
[0057] In an embodiment of the present invention, the first input information and the position coding information corresponding to the first input information are fused to obtain a first feature vector corresponding to the preset spatiotemporal correlation data. The deep learning model can not only capture the characteristics of the first input information itself through the first feature vector, but also accurately identify the position of the first input information in the preset spatiotemporal correlation data. In this way, the deep learning model can effectively parse the structural information of the preset spatiotemporal correlation data.
[0058] See also Figure 4 , Figure 4 yes Figure 2 A specific implementation flow diagram of step S25 is described in detail as follows: S41, training the deep learning model according to the loss value, and during the training process of the deep learning model, determining that the loss value is less than a preset value; S42: When the loss value is less than a preset value, stop training the deep learning model and obtain the trained deep learning model.
[0059] In an embodiment of the present invention, when the loss value is less than a preset value, continuing training will no longer bring significant performance improvement, but may increase computing cost and time. Therefore, when the loss value is less than the preset value, stopping training the deep learning model can significantly improve training efficiency.
[0060] See also Figure 5 , Figure 5 yes Figure 2 A specific implementation flow diagram of step S26 is described in detail as follows: S51, obtaining current spatiotemporal correlation data of the target road section, obtaining a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the current spatiotemporal correlation data, and selecting the high-frequency component, the medium-frequency component, the low-frequency component, and the trend component of the current spatiotemporal correlation data as second input information; Exemplarily, obtaining the high-frequency component, the medium-frequency component, the low-frequency component, and the trend component of the current spatiotemporal correlation data includes: Decomposing the current spatiotemporal correlation data by using a CEEMDAN algorithm to obtain a plurality of second IMF components, where the second IMF components are IMF components of the current spatiotemporal correlation data; Using a preset clustering algorithm, clustering the plurality of the second IMF components of the current spatiotemporal correlation data according to the entropy values corresponding to the second IMF components, to obtain a second clustering result; In the second clustering result, the second IMF component belonging to the high-frequency category is selected as the high-frequency component of the current spatiotemporal correlation data, the second IMF component belonging to the medium-frequency category is selected as the medium-frequency component of the current spatiotemporal correlation data, the second IMF component belonging to the low-frequency category is selected as the low-frequency component of the current spatiotemporal correlation data, and the second IMF component belonging to the trend category is selected as the trend component of the current spatiotemporal correlation data.
[0061] Among them, different second IMF components represent different frequency components in the current spatiotemporal correlation data. By analyzing the second IMF components, it is helpful to understand the characteristics of the current spatiotemporal correlation data and discover the potential laws and trends in the current spatiotemporal correlation data.
[0062] S52, input the second input information and the position coding information corresponding to the second input information into a fusion convolution layer, use the fusion convolution layer to fuse the second input information and the position coding information corresponding to the second input information to obtain a second feature vector corresponding to the current spatiotemporal correlation data, input the second feature vector into the trained deep learning model, and input the second feature vector into the trained deep learning model to obtain the current traffic flow speed of the target section predicted by the trained deep learning model.
[0063] Among them, the second input information and the position coding information corresponding to the second input information are fused to obtain the second feature vector corresponding to the current spatiotemporal correlation data. The trained deep learning model can not only capture the characteristics of the second input information itself through the second feature vector, but also accurately identify the position of the second input information in the current spatiotemporal correlation data. In this way, the deep learning model can effectively parse the structural information of the current spatiotemporal correlation data.
[0064] In an embodiment of the present invention, since the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data are all dynamic characteristics of the current spatiotemporal correlation data, the trained deep learning model can capture the dynamic characteristics of the current spatiotemporal correlation data, which is beneficial to improving the reliability of the predicted current traffic flow speed.
[0065] See also Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a traffic flow speed prediction device according to an embodiment of the present invention. Figure 6 As shown, the traffic flow speed prediction device includes a first acquisition module 101, a second acquisition module 102, a first determination module 103, a third acquisition module 104, a second determination module 105, and a prediction module 106. The functional modules are described in detail as follows: The first acquisition module 101 is used to acquire preset spatiotemporal correlation data of a target road section and acquire a preset traffic flow speed corresponding to the target road section; The second acquisition module 102 is used to acquire the high-frequency component, the medium-frequency component, the low-frequency component and the trend component of the preset spatiotemporal correlation data based on a predefined acquisition method; A first determining module 103, configured to determine a first eigenvector corresponding to the preset spatiotemporal correlation data based on a high frequency component, a medium frequency component, a low frequency component and a trend component of the preset spatiotemporal correlation data; A third acquisition module 104 is used to obtain the real-time traffic flow speed predicted by the preset deep learning model based on the first feature vector, and obtain the loss value between the real-time traffic flow speed and the preset traffic flow speed; A second determination module 105, configured to determine the trained deep learning model based on the loss value and a predefined determination method; The prediction module 106 is used to obtain the current spatiotemporal correlation data of the target road section, determine the second eigenvector corresponding to the current spatiotemporal correlation data based on the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data, and obtain the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second eigenvector.
[0066] In one embodiment, the second acquisition module 102 includes: A decomposition subunit, configured to decompose the preset spatiotemporal correlation data of the neighboring road segments by using a preset CEEMDAN algorithm to obtain a plurality of first IMF components, wherein the first IMF components are IMF components of the preset spatiotemporal correlation data; an execution subunit, configured to cluster the plurality of first IMF components of the preset spatiotemporal correlation data using a preset clustering algorithm according to entropy values corresponding to the first IMF components, to obtain a first clustering result; The first selection subunit is used to select the first IMF component belonging to the high frequency category in the first clustering result as the high frequency component of the preset spatiotemporal correlation data, select the first IMF component belonging to the medium frequency category as the medium frequency component of the preset spatiotemporal correlation data, select the first IMF component belonging to the low frequency category as the low frequency component of the preset spatiotemporal correlation data, and select the first IMF component belonging to the trend category as the trend component of the preset spatiotemporal correlation data.
[0067] In one embodiment, the first determining module 103 includes: A second selection subunit is used to select a high-frequency component, a medium-frequency component, a low-frequency component and a trend component of the preset spatiotemporal correlation data as first input information; The first input subunit is used to input the first input information and the position coding information corresponding to the first input information into a fusion convolution layer, and use the fusion convolution layer to fuse the first input information and the position coding information corresponding to the first input information to obtain a first feature vector corresponding to the preset spatiotemporal correlation data.
[0068] In one embodiment, the third acquisition module 104 includes: A first acquisition subunit, configured to input the first feature vector into a preset deep learning model, and obtain a real-time traffic flow speed predicted by the deep learning model based on the first feature vector; The second acquisition subunit is used to acquire the loss value between the real-time traffic flow speed and the preset traffic flow speed through a preset mean square error function.
[0069] In one embodiment, the second determining module 105 includes: A judging subunit, configured to train the deep learning model according to the loss value, and during the training process of the deep learning model, judge that the loss value is less than a preset value; The third acquisition subunit is used to stop training the deep learning model and acquire the trained deep learning model when the loss value is less than a preset value.
[0070] In one embodiment, the prediction module 106 includes: a fourth acquisition subunit, configured to acquire current spatiotemporal correlation data of the target road section, acquire a high frequency component, a medium frequency component, a low frequency component, and a trend component of the current spatiotemporal correlation data, and select the high frequency component, the medium frequency component, the low frequency component, and the trend component of the current spatiotemporal correlation data as second input information; A prediction subunit is used to input the second input information and the position coding information corresponding to the second input information into a fusion convolution layer, and use the fusion convolution layer to fuse the second input information and the position coding information corresponding to the second input information to obtain a second feature vector corresponding to the current spatiotemporal correlation data, and input the second feature vector into the trained deep learning model to obtain the current traffic flow speed of the target section predicted by the trained deep learning model.
[0071] In one embodiment, the traffic flow speed prediction device further includes: The display module is used to obtain a display interface corresponding to the target road section and display the current traffic flow speed on the display interface.
[0072] In an embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, the current spatiotemporal correlation data of the target road section is obtained, and based on the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data, the second feature vector corresponding to the current spatiotemporal correlation data is determined. Based on the second feature vector, the current traffic flow speed of the target road section predicted by the trained deep learning model is obtained. Since the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data are dynamic characteristics of the current spatiotemporal correlation data, the trained deep learning model can capture the dynamic characteristics of the current spatiotemporal correlation data, which is beneficial to improve the reliability of the predicted current traffic flow speed. On the other hand, since no manual acquisition is required, the acquisition time of the current traffic flow speed is reduced, which is beneficial to improve the acquisition efficiency of the current traffic flow speed.
[0073] The specific limitations of the traffic flow speed prediction device can be found in the above limitations of the traffic flow speed prediction method, which will not be repeated here.
[0074] Each module in the above-mentioned traffic flow speed prediction device can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0075] See also Figure 7 , Figure 7is a schematic diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device may be a server device, and its internal structure diagram may be as shown in FIG. Figure 7 The computer device includes a processor, a memory, a network interface and a database connected through a system bus.
[0076] The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, the functions or steps of a traffic flow speed prediction method can be implemented on the server-side device.
[0077] See also Figure 8 , Figure 8 is another structural diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device may be a client device, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external task database through a network connection. When the computer program is executed by the processor, the functions or steps of a traffic flow speed prediction method can be implemented on the client device.
[0078] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor.
[0079] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant description in the aforementioned method embodiment. In order to avoid repetition, they will not be described one by one here.
[0080] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0081] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operations may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated sub-samples, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0082] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0083] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be 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 sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other 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. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0084] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A traffic flow speed prediction method, characterized in that: include: Acquire preset spatiotemporal correlation data of a target road section, and acquire preset traffic flow speed corresponding to the target road section; Based on a predefined acquisition method, a high-frequency component, a medium-frequency component, a low-frequency component and a trend component of the preset spatiotemporal correlation data are acquired; Determine a first eigenvector corresponding to the preset spatiotemporal correlation data based on a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the preset spatiotemporal correlation data; Obtaining a real-time traffic flow speed predicted by a preset deep learning model based on the first feature vector, and obtaining a loss value between the real-time traffic flow speed and the preset traffic flow speed; Determine the deep learning model after training based on the loss value and a predefined determination method; Obtain current spatiotemporal correlation data of the target road section, determine a second eigenvector corresponding to the current spatiotemporal correlation data based on the high-frequency component, mid-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data, and obtain the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second eigenvector.
2. The traffic flow speed prediction method according to claim 1, characterized in that: The obtaining of the high-frequency component, the medium-frequency component, the low-frequency component and the trend component of the preset spatiotemporal correlation data based on the predefined obtaining method includes: Decomposing the preset spatiotemporal correlation data of the neighboring road segments by a preset CEEMDAN algorithm to obtain a plurality of first IMF components, where the first IMF components are IMF components of the preset spatiotemporal correlation data; clustering the plurality of first IMF components of the preset spatiotemporal correlation data according to entropy values corresponding to the first IMF components by a preset clustering algorithm to obtain a first clustering result; In the first clustering result, the first IMF component belonging to the high-frequency category is selected as the high-frequency component of the preset spatiotemporal correlation data, the first IMF component belonging to the medium-frequency category is selected as the medium-frequency component of the preset spatiotemporal correlation data, the first IMF component belonging to the low-frequency category is selected as the low-frequency component of the preset spatiotemporal correlation data, and the first IMF component belonging to the trend category is selected as the trend component of the preset spatiotemporal correlation data.
3. The traffic flow speed prediction method according to claim 1, characterized in that: The determining, based on the high frequency component, the medium frequency component, the low frequency component and the trend component of the preset spatiotemporal correlation data, a first feature vector corresponding to the preset spatiotemporal correlation data comprises: Selecting a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the preset spatiotemporal correlation data as first input information; The first input information and the position coding information corresponding to the first input information are input into a fusion convolution layer, and the first input information and the position coding information corresponding to the first input information are fused using the fusion convolution layer to obtain a first feature vector corresponding to the preset spatiotemporal correlation data.
4. The traffic flow speed prediction method according to claim 1, characterized in that: The step of obtaining the real-time traffic flow speed predicted by the preset deep learning model based on the first feature vector, and obtaining the loss value between the real-time traffic flow speed and the preset traffic flow speed includes: Inputting the first feature vector into a preset deep learning model to obtain a real-time traffic flow speed predicted by the deep learning model based on the first feature vector; The loss value between the real-time traffic flow speed and the preset traffic flow speed is obtained through a preset mean square error function.
5. The traffic flow speed prediction method according to claim 1, characterized in that: The step of determining the trained deep learning model based on the loss value and a predefined determination method includes: Training the deep learning model according to the loss value, and during the training process of the deep learning model, determining that the loss value is less than a preset value; When the loss value is less than a preset value, stop training the deep learning model and obtain the trained deep learning model.
6. The traffic flow speed prediction method according to claim 1, characterized in that: The step of obtaining the current spatiotemporal correlation data of the target road section, determining a second feature vector corresponding to the current spatiotemporal correlation data based on a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the current spatiotemporal correlation data, and obtaining the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second feature vector, includes: Acquire current spatiotemporal correlation data of the target road section, acquire high-frequency components, medium-frequency components, low-frequency components and trend components of the current spatiotemporal correlation data, and select the high-frequency components, medium-frequency components, low-frequency components and trend components of the current spatiotemporal correlation data as second input information; The second input information and the position coding information corresponding to the second input information are input into a fusion convolution layer, and the second input information and the position coding information corresponding to the second input information are fused using the fusion convolution layer to obtain a second feature vector corresponding to the current spatiotemporal correlation data, and the second feature vector is input into the trained deep learning model to obtain the current traffic flow speed of the target section predicted by the trained deep learning model.
7. The traffic flow speed prediction method according to any one of claims 1 to 6, characterized in that: After obtaining the current spatiotemporal correlation data of the target road section, determining a second feature vector corresponding to the current spatiotemporal correlation data based on the high-frequency component, the medium-frequency component, the low-frequency component and the trend component of the current spatiotemporal correlation data, and obtaining the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second feature vector, the traffic flow speed prediction method includes: A display interface corresponding to the target road section is obtained, and the current traffic flow speed is displayed on the display interface.
8. A traffic flow speed prediction device, characterized in that: include: A first acquisition module is used to acquire preset spatiotemporal correlation data of a target road section and to acquire a preset traffic flow speed corresponding to the target road section; A second acquisition module, used to acquire the high-frequency component, the medium-frequency component, the low-frequency component and the trend component of the preset spatiotemporal correlation data based on a predefined acquisition method; A first determining module, configured to determine a first eigenvector corresponding to the preset spatiotemporal correlation data based on a high-frequency component, a medium-frequency component, a low-frequency component, and a trend component of the preset spatiotemporal correlation data; A third acquisition module is used to obtain the real-time traffic flow speed predicted by the preset deep learning model based on the first feature vector, and obtain the loss value between the real-time traffic flow speed and the preset traffic flow speed; A second determination module, used to determine the trained deep learning model based on the loss value and a predefined determination method; A prediction module is used to obtain the current spatiotemporal correlation data of the target road section, determine the second eigenvector corresponding to the current spatiotemporal correlation data based on the high-frequency component, medium-frequency component, low-frequency component and trend component of the current spatiotemporal correlation data, and obtain the current traffic flow speed of the target road section predicted by the trained deep learning model based on the second eigenvector.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the traffic flow speed prediction method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the traffic flow speed prediction method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Different-time-period urban road network state prediction method based on unmanned aerial vehicle
CN108399745A
Urban expressway traffic flow short-term prediction method, computer and storage medium
CN114241779A
Urban traffic flow prediction method for aggregating multi-scale space-time similar information
CN114611814A
Space-time convolution short-time traffic flow prediction method for improving complementary integrated empirical mode decomposition
CN115631624A
Road vehicle sensing method based on multi-sensor fusion
CN116625383A