A traffic condition prediction method and system based on Internet of Vehicles big data
Through the method of Internet of Vehicles big data, historical and traffic data are processed, and gray correlation analysis and pre-trained models are used to solve the problems of complexity and insufficient accuracy of traffic condition prediction in the existing technology, and achieve more efficient traffic management and travel. planning.
Patent Information
- Application Number
- CN202211738591.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-12-30
AI Technical Summary
The existing traffic condition prediction technology is complex and difficult to reflect traffic change patterns from date attribute data. The prediction accuracy is insufficient and the reference data is single.
Using a method based on Internet of Vehicles big data, historical trajectory data and traffic data are obtained, and traffic conditions are predicted through three-dimensional vector processing and gray correlation analysis, combined with a pre-trained road condition prediction model.
It improves the accuracy of traffic condition prediction, reduces traffic congestion, helps travelers choose appropriate routes, saves time, improves road traffic efficiency, and improves urban traffic management.
Smart Images

Figure CN116189425B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic technology, and in particular to a method and system for predicting traffic conditions based on Internet of Vehicles big data. Background Art
[0002] With the development of social economy, the scale of urban traffic network is getting larger and larger. In order to manage urban traffic network more scientifically and intelligently, it is necessary to effectively monitor and predict urban traffic conditions. The Internet of Vehicles is an important intersection of the two major fields of the Internet of Things and intelligent vehicles in strategic emerging industries, and is a key component of urban smart transportation. The concept of the Internet of Vehicles originated from the Internet of Things. It uses sensors, communication networks, system integration and other technologies to achieve network interconnection and information exchange between people and cars, cars and cars, and cars and roads, and realizes intelligent traffic management through intelligent control of people, cars and roads.
[0003] Among the currently commonly used technical means, the prediction input is complex, it is difficult to reflect the changing patterns of traffic conditions from date attribute data, and the reference data is relatively single, making it difficult to guarantee the accuracy of the prediction. Summary of the invention
[0004] The purpose of the present invention is to provide a traffic condition prediction method and system based on Internet of Vehicles big data to improve the above problems. In order to achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0005] In a first aspect, the present application provides a method for predicting traffic conditions based on Internet of Vehicles big data, including:
[0006] Acquire historical trajectory data of the area to be measured within a preset time period before the current moment;
[0007] Respectively obtain first trajectory data and second trajectory data of traffic conditions in the test area, wherein the first trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were not in the test area at the previous moment but are in the test area at the current moment; the second trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were in the test area at the previous moment but are not in the test area at the current moment;
[0008] Processing the first trajectory data and the second trajectory data based on the three-dimensional vector to obtain traffic information of all vehicle trajectories at each time point to be tested in all the areas to be tested, wherein the traffic information includes relative traffic flow between all vehicles, relative traffic flow change rate, uncertainty information of traffic accidents and environmental factors of the current road;
[0009] Performing grey correlation analysis on the flow information and the historical trajectory data to obtain a correlation value between each flow information and the historical trajectory data;
[0010] According to a pre-trained traffic condition prediction model, the correlation value, the flow information and the historical trajectory data are processed to obtain traffic condition prediction information, wherein the traffic condition prediction model is trained based on the traffic conditions in the area to be tested within a historical period.
[0011] In a second aspect, the present application also provides a traffic condition prediction system based on Internet of Vehicles big data, comprising a first acquisition module, a second acquisition module, a first processing module, an analysis module, and a second processing module, wherein:
[0012] The first acquisition module is used to acquire the historical trajectory data of the area to be measured within a preset time period before the current moment;
[0013] The second acquisition module is used to respectively acquire first trajectory data and second trajectory data of traffic conditions in the test area, wherein the first trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were not in the test area at the previous moment but are currently in the test area; the second trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were in the test area at the previous moment but are currently not in the test area;
[0014] A first processing module is used to process the first trajectory data and the second trajectory data based on a three-dimensional vector to obtain traffic information of all vehicle trajectories at each time point to be tested in all the tested areas, wherein the traffic information includes relative traffic flow between all vehicles, relative traffic flow change rate, uncertainty information of traffic accidents and environmental factors of the current road;
[0015] Analysis module: used for performing grey correlation analysis on the flow information and the historical trajectory data to obtain a correlation value between each flow information and the historical trajectory data;
[0016] The second processing module is used to process the correlation value, the flow information and the historical trajectory data according to a pre-trained traffic condition prediction model to obtain traffic condition prediction information, wherein the traffic condition prediction model is trained according to the traffic conditions in the test area within a historical period.
[0017] In a third aspect, the present application also provides a traffic condition prediction device based on Internet of Vehicles big data, including:
[0018] Memory for storing computer programs;
[0019] A processor is used to implement the steps of the traffic condition prediction method based on Internet of Vehicles big data when executing the computer program.
[0020] In a fourth aspect, the present application also provides a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned traffic condition prediction method based on Internet of Vehicles big data are implemented.
[0021] The beneficial effects of the present invention are as follows: by acquiring historical estimation data, first trajectory data and second trajectory data, processing the data based on three-dimensional vectors, determining the proportion of images based on the hierarchical analysis method, and analyzing the data using grey correlation analysis and a neural network model, the sustainable prediction optimization of the model is maintained, and the accuracy of road condition prediction is improved, traffic congestion is effectively reduced, the traffic conditions of the target intersection to be reached by the target vehicle are predicted, and urban road travel predictions are provided for travelers, which helps travelers choose appropriate traffic routes for travel, save time, avoid point congestion, improve the traffic efficiency of existing roads, improve road congestion conditions, alleviate urban traffic congestion, and improve the comprehensive management level of urban road traffic.
[0022] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by implementing the embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 It is a flow chart of a method for predicting traffic conditions based on Internet of Vehicles big data according to an embodiment of the present invention;
[0025] Figure 2 Schematic diagram of the traffic condition prediction system based on Internet of Vehicles big data described in an embodiment of the present invention;
[0026] Figure 3 Schematic diagram of the structure of a traffic condition prediction device based on Internet of Vehicles big data described in an embodiment of the present invention.
[0027] In the figure: 701, first acquisition module; 702, second acquisition module; 7021, acquisition unit; 7022, identification unit; 7023, first determination unit; 7024, selection unit; 703, first processing module; 704, analysis module; 7041, analysis unit; 7042, first processing unit; 7043, calculation unit; 7044, determination unit; 705, second processing module; 7051, classification unit; 70511, second setting unit; 70512, cleaning unit; 70513, transformation unit; 7052, first setting unit; 7053, optimization unit; 7054, second processing unit; 7055, comparison unit; 800, traffic condition prediction device based on Internet of Vehicles big data; 801, processor; 802, memory; 803, multimedia component; 804, I / O interface; 805, communication component. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, 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 part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0029] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0030] Embodiment 1:
[0031] This embodiment provides a method for predicting traffic conditions based on Internet of Vehicles big data.
[0032] See also Figure 1 , the figure shows that the method includes step S100, step S200, step S300, step S400 and step S500.
[0033] S100: Acquire historical trajectory data of the area to be measured within a preset time period before the current moment.
[0034] It can be understood that in this step, it is implemented according to the existing technology. For example, the user's historical trajectory data can be pre-stored in a database. When in use, the historical trajectory data is obtained from the database according to the user's identification. Of course, time or region can be used as a restriction condition, or the current more mature road condition prediction model can be used to input the previously stored historical trajectory data into the prediction model for processing to obtain a relatively accurate historical processing result, which is recorded as historical trajectory data.
[0035] S200, respectively obtain first trajectory data and second trajectory data of traffic conditions in the area to be tested, wherein the first trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were not in the area to be tested at a previous moment but are currently in the area to be tested; and the second trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were in the area to be tested at a previous moment but are currently not in the area to be tested.
[0036] It can be understood that in this step, the collected GPS data is converted into the form of outflow and inflow with regional characteristics to calculate the flow data.
[0037] Specifically, the area to be detected is regarded as a whole, and it is assumed that the whole is divided into small areas of 16*16, so as to make a prediction of the flow data according to the entry and exit of the vehicle. For example, for a certain area (x, y), the first trajectory data of the area is counted, that is, the total number of vehicles in the area to be detected that were not in the area to be detected at the previous moment and are currently in the area to be detected among all vehicle trajectories, which can be judged as the inflow flow; the second trajectory data of the area is counted, that is, the total number of vehicles in the area to be detected that were not in the area to be detected at the previous moment and are currently in the area to be detected among all vehicle trajectories, which can be judged as the outflow flow. Taking a certain area (x, y) as an example, at the previous moment, that is, at the moment t-1, vehicles A and B are not in the area, only vehicle C is in the area, at the moment t, vehicles A and B are in the area, and vehicle C is not in the area. It can be obtained that vehicles A and B are inflow vehicles, and vehicle C is an outflow vehicle, and the coordinate points can be marked in the area (x, y). According to this form of marking, the flow information in the area to be detected can be counted.
[0038] S300: Process the first trajectory data and the second trajectory data based on the three-dimensional vector to obtain traffic information of all vehicle trajectories at each time point to be tested in all the areas to be tested, wherein the traffic information includes relative traffic flow between all vehicles, relative traffic flow change rate, uncertainty information of traffic accidents, and environmental factors of the current road.
[0039] Specifically, the entire area obtained above is divided into 16*16, so the three-dimensional vector of the data at each moment in the area to be detected can be represented by the three-dimensional vector, and the flow information of all vehicle trajectories at each time point to be tested can be obtained according to the collected data cycle.
[0040] Among them, it should be noted that relative traffic flow, relative traffic flow change rate, uncertain information of traffic accidents and current road environment factors are all important factors affecting traffic flow information.
[0041] The relative traffic flow is the number of traffic entities passing through a certain location, a certain section or a certain lane of the road within the selected time period. It is composed of the two types of data mentioned above, inflow and outflow. The relative traffic flow refers to the inflow minus the outflow, that is, the relative traffic flow. The relative traffic flow change rate is when a traffic accident occurs on the traffic road, the path will change, such as congestion, vehicle queues, etc. This change in traffic flow is the relative traffic flow change rate, which is generated relative to the previous moment. The current road environment factors, as the name implies, are related to whether the current road is congested, whether a traffic accident occurs, and the bearing capacity of the current road. The uncertain information of traffic accidents refers to the information obtained by processing the relative traffic flow, the relative traffic flow change rate and the road bearing capacity.
[0042] It can be understood that the process of obtaining the uncertain information of the traffic accident in step S300 includes S301, S302, S303 and S304, wherein:
[0043] S301, using a camera device to obtain traffic road condition image information at each of the time points to be tested in the area to be tested;
[0044] In order to grasp the vehicle operation status at each traffic intersection, the camera device is often set up at a suitable position at the traffic intersection, such as the isolation belt above the road or in the middle of the road, to monitor the vehicle operation status on the roads at each traffic intersection in real time, including vehicle queuing, waiting for traffic lights, parking time, vehicle left and right turns, etc. In order to enable the video processing center to obtain the traffic status of each road through the video images of each intersection captured by the camera, after the camera captures the video image of the vehicle operation status on the roads at each traffic intersection, the video image is transmitted to the background video processing center so that the video processing center can obtain the video graphics, analyze and process the video image, and finally obtain the traffic road condition image information.
[0045] S302, performing image preprocessing on the traffic image information, and recognizing the preprocessed image based on the Yolo v3 network to obtain multiple groups of overlapping images, wherein the multiple groups of overlapping images are at least three groups, wherein the overlapping images include at least two trajectories of the same turning information divided into the same image trajectory set;
[0046] It should be noted that the image is preprocessed, and the preprocessed image is identified based on the convolutional network to remove the shadows, impurities and other unclear places in some images, and to optimize and compare the images. The image marked by the Yolov3 network is the closest to which image, that is, the overlapping images. There are many trajectories in the overlapping images, and any trajectory is composed of multiple trajectory points. The overlapping image is the historical heat used to measure the heat information of traffic conditions. For example, multiple groups of overlapping images are classified to obtain multiple categories: the first category, the second category, the third category... and so on. The images with the same trajectory are added to the corresponding category, that is, they are divided into the same image trajectory set.
[0047] S303, performing hierarchical analysis on all the overlapping images to determine the proportion of the same steering image information in each group of overlapping images;
[0048] It should be noted that the relative importance of the relationship is obtained by comparison based on the hierarchical analysis method, and the discriminant matrix is obtained by normalization, as follows:
[0049] A=(a ij ) n×n
[0050] Among them: A is the discriminant matrix; a ij is the importance ratio scale of element i and element j at the current level to the previous level; i and j are elements of different types respectively; n is the dimension of the hierarchical model, and the element is any element in the solution layer.
[0051] The weight calculation formula is as follows:
[0052]
[0053] Among them, W' is the weight coefficient of each element, W i is the geometric mean of the scaled data in each row of the discriminant matrix.
[0054] S304, according to the proportion of the same turning image information in each group of overlapping images, select the intersection with the largest proportion as the overlapping intersection, and the overlapping intersection is the intersection with the most turns, that is, it is used to measure the uncertainty information of the traffic accident.
[0055] It should be noted that the intersection with the largest proportion of overlap is also the intersection with the most turns, which provides a basis for predicting traffic conditions. It is an important factor in measuring traffic accidents and also improves the accuracy of traffic condition prediction.
[0056] S400: Perform grey correlation analysis on the flow information and the historical trajectory data to obtain a correlation value between each flow information and the historical trajectory data.
[0057] It should be noted that the discrete behavior observations of system factors are converted into piecewise continuous broken lines through the method of linear interpolation, and then a model for measuring the degree of association is constructed based on the geometric characteristics of the broken lines. The so-called degree of association is essentially the degree of difference in the geometric shapes between the curves. Therefore, the difference between the curves can be used as a measure of the degree of association.
[0058] It can be understood that step S400 includes S401, S402, S403 and S404, wherein:
[0059] S401, performing sequence analysis on the flow information and the historical trajectory data to obtain a first sequence data and a second sequence data, wherein the historical trajectory data is used as a parent sequence reflecting traffic road condition factors, and the flow information is used as a subsequence reflecting traffic road condition factors;
[0060] It can be understood that by analyzing the traffic information and historical trajectory data, the traffic road condition factors reflecting the overall behavior development are taken as the parent sequence, and the data sequence reflecting the factors affecting the system development is taken as the child sequence.
[0061] S402, performing dimensionless quantization processing on the first sequence data and the second sequence data, and performing mean calculation on the processed data to obtain first mean data of the first sequence data and second mean data of the second sequence data;
[0062] It should be noted that, because the physical meanings of the factors in the first and second sequence data are different, the dimensions of the data are not necessarily the same, which is not convenient for comparison. Therefore, dimensionless quantization is performed on both the first and second sequence data, and the mean is calculated as follows:
[0063]
[0064] Among them, x ij The jth data in the i-th row, n is the total number of data.
[0065] S403, performing association calculation based on the first sequence data, the second sequence data, the first mean data, and the second mean data to obtain a correlation coefficient between the subsequence and the parent sequence;
[0066] It can be understood that the calculation formula of the correlation coefficient in the above steps is:
[0067]
[0068] Where: γ f (k) is the correlation coefficient between the historical accident data and the historical operating parameter information after dimensionless processing; f is the historical accident data after dimensionless processing; k is the historical operating parameter information after dimensionless processing; y(k) is the time series before the historical accident occurred; x f (k) is the time series after the historical accident; ρ is the resolution coefficient, which ranges from 0 to 1.
[0069] S404: Determine a correlation value between each flow information and the historical trajectory data based on the correlation coefficient.
[0070] It can be understood that the calculation formula of the correlation value is as follows:
[0071]
[0072] Where: t is the correlation degree corresponding to the independent variable t; t is the data type of the parent sequence; h is the data type of the subsequence; m is the total number of samples of the subsequence data; γ f (h) is the relationship coefficient of the subsequence data f with respect to the dependent variable h.
[0073] S500. According to a pre-trained traffic condition prediction model, the correlation value, the flow information and the historical trajectory data are processed to obtain traffic condition prediction information, wherein the traffic condition prediction model is trained based on the traffic conditions in the area to be tested within a historical period.
[0074] It can be understood that step S500 includes S501, S502, S503, S504 and S505, wherein:
[0075] S501, classifying the association value, the traffic information, and the historical trajectory data to obtain a training set and a prediction set, and performing standardization processing on the data of the training set and the data of the prediction set respectively to obtain a first standardization processing result and a second standardization processing result;
[0076] S502, setting the number of layers of the LSTM neural network model and the number of neurons in each layer, and based on the deep learning library and the grid search parameter optimization method, selecting an activation function and an optimizer suitable for the LSTM neural network model after the setting is completed, and the activation function and the optimizer are used to update the parameters of the LSTM neural network model;
[0077] It should be noted that the number of layers of the DNN model network structure and the number of neurons in each layer are set. The sc i kit-l earn network search function in the Keras library is used to select the activation function and optimizer suitable for the model, and the mean square error (MSE) is selected as the loss function to measure the output loss of the training samples. The optimizer is "Adam" for updating the model parameters. After each training cycle, the loss function is optimized to minimize the extreme value; the iteration step size and the number of training times are set, the model is trained, and the trained model is used to predict the road conditions, which improves the accuracy of traffic condition prediction.
[0078] S503, optimizing the updated LSTM neural network model according to the loss function to obtain an optimized LSTM neural network model;
[0079] It should be noted that by optimizing the model parameter algorithm, the value of the loss function will gradually decrease, so that the error rate of the neural network's prediction of the training data continues to decrease. Assume that the training set is T = (x 1 ,y 1 ),(x 2 ,y 2 ),…,(x n ,y n ), where x n A vector representing the nth input, each of which is characterized by x n ,y n is the correct classification of each data. Assuming that the output of the neural network is a, and given the loss function, the calculation formula is as follows:
[0080]
[0081] Among them, w and b represent model parameters, n is the data of samples in the training set, and in fact, the loss function describes the mean square error between the prediction of the optimized LSTM neural network model and the sample annotation.
[0082] S504, sending the first standardized processing result to the optimized LSTM neural network model for processing, wherein the data in the first standardized processing result is segmented in units of 30 minutes, and the first standardized processing results of different time periods are input into the more optimized LSTM neural network model for processing to obtain output data of different time periods, wherein the output data is flow information of different time periods;
[0083] It should be understood that by encoding each image using an autoencoder, an image sequence of each image at different time periods is determined.
[0084] The step S504 includes S5041, S5042 and S5043, wherein:
[0085] S5041. According to the collected data of the flow information, set the time period of each day corresponding to each time point of each test area in all the test areas with a time period of 30 minutes to obtain preprocessed data;
[0086] It should be noted that setting the time period to 30 minutes is helpful to avoid redundancy and improve processing efficiency.
[0087] S5042, performing data cleaning on the preprocessed data, including parsing, removing duplication, omission, noise and exception processing on the preprocessed data;
[0088] Specifically, parsing, removing duplication, omissions, noise and exceptions from the data can improve judgment accuracy, facilitate accurate judgment of road conditions, and prepare for standardization.
[0089] S5043. Perform a linear transformation on the cleaned data to obtain traffic flow data, and record the traffic flow data as the first standardized processing result.
[0090] It should be noted that the traffic flow data is obtained by linearly transforming the traffic flow data and mapping the data to the range of [-1, 1].
[0091] S505. Compare the second standardized processing result with the output data to obtain a comparison result; if the comparison result is that the second standardized processing result is inconsistent with the output data, use a grid search parameter optimization method to continuously adjust parameters until the comparison result is that the second standardized processing result is consistent with the output data, wherein the parameters are the input feature dimension, hidden layer dimension and input layer data of the STM neural network model.
[0092] It can be understood that this step trains the LSTM neural network model to predict data results in different time periods, and then adjusts the prediction accuracy to achieve the purpose of high efficiency and speed.
[0093] Embodiment 2:
[0094] like Figure 2 As shown, this embodiment provides a traffic condition prediction system based on Internet of Vehicles big data, see Figure 2 The system includes a first acquisition module 701, a second acquisition module 702, a first processing module 703, an analysis module 704 and a second processing module 705, wherein:
[0095] The first acquisition module 701 is used to acquire the historical trajectory data of the area to be measured within a preset time period before the current moment;
[0096] The second acquisition module 702 is used to respectively acquire first trajectory data and second trajectory data of traffic conditions in the test area, wherein the first trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were not in the test area at the previous moment but are currently in the test area; the second trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were in the test area at the previous moment but are currently not in the test area;
[0097] The first processing module 703 is used to process the first trajectory data and the second trajectory data based on the three-dimensional vector to obtain the traffic information of all vehicle trajectories at each time point to be tested in all the areas to be tested, wherein the traffic information includes the relative traffic flow between all vehicles, the relative traffic flow change rate, the uncertainty information of traffic accidents and the environmental factors of the current road;
[0098] Analysis module 704: used for performing grey correlation analysis on the flow information and the historical trajectory data to obtain a correlation value between each flow information and the historical trajectory data;
[0099] The second processing module 705 is used to process the correlation value, the flow information and the historical trajectory data according to a pre-trained traffic condition prediction model to obtain traffic condition prediction information, wherein the traffic condition prediction model is trained according to the traffic conditions in the test area within a historical period.
[0100] Specifically, the process of acquiring the uncertain information of the traffic accident in the first processing module 703 includes an acquiring unit 7021, an identifying unit 7022, a first determining unit 7023 and a selecting unit 7024, wherein:
[0101] The acquisition unit 7021 is used to acquire the traffic road condition image information of each time point to be tested in the test area by using a camera device;
[0102] The recognition unit 7022 is used to perform image preprocessing on the traffic road condition image information, and recognize the preprocessed image based on the Yo l ov3 network to obtain multiple groups of overlapping images, where the multiple groups of overlapping images are at least three groups, wherein the overlapping images include at least two trajectories of the same turning information divided into the same image trajectory set;
[0103] The first determining unit 7023 is used to perform hierarchical analysis on all the overlapping images to determine the proportion of the same steering image information in each group of overlapping images;
[0104] Selection unit 7024: used to select the overlapped intersection with the largest proportion of the same turn image information in each group of overlapped images, and the overlapped intersection is the intersection with the most turns, that is, it is used to measure the uncertainty information of the traffic accident.
[0105] Specifically, the analysis module 704 includes an analysis unit 7041, a first processing unit 7042, a calculation unit 7043 and a determination unit 7044, wherein:
[0106] The analyzing unit 7041 is used to perform sequence analysis on the flow information and the historical trajectory data to obtain a first sequence data and a second sequence data, wherein the historical trajectory data is used as a parent sequence reflecting traffic road condition factors, and the flow information is used as a subsequence reflecting traffic road condition factors;
[0107] The first processing unit 7042 is used to perform dimensionless quantization processing on the first sequence data and the second sequence data, and perform mean calculation on the processed data to obtain first mean data of the first sequence data and second mean data of the second sequence data;
[0108] A calculation unit 7043 is configured to perform an association calculation based on the first sequence data, the second sequence data, the first mean data, and the second mean data to obtain a correlation coefficient between the subsequence and the parent sequence;
[0109] The determination unit 7044 is used to determine the correlation value between each flow information and the historical trajectory data based on the correlation coefficient.
[0110] Specifically, the second processing module 705 includes a classification unit 7051, a first setting unit 7052, an optimization unit 7053, a second processing unit 7054 and a comparison unit 7055, wherein:
[0111] Classification unit 7051: used for classifying the association value, the traffic information and the historical trajectory data to obtain a training set and a prediction set, and performing standardization processing on the data of the training set and the data of the prediction set respectively to obtain a first standardization processing result and a second standardization processing result;
[0112] The first setting unit 7052 is used to set the number of layers of the LSTM neural network model and the number of neurons in each layer, and based on the deep learning library and the grid search parameter optimization method, select an activation function and an optimizer suitable for the LSTM neural network model after the setting is completed, and the activation function and the optimizer are used to update the parameters of the LSTM neural network model;
[0113] Optimizing unit 7053: used to optimize the updated LSTM neural network model according to the loss function to obtain an optimized LSTM neural network model;
[0114] The second processing unit 7054 is used to send the first standardized processing result to the optimized LSTM neural network model for processing, wherein the data in the first standardized processing result is segmented into 30-minute units, and the first standardized processing results of different time periods are input into the more optimized LSTM neural network model for processing to obtain output data of different time periods, wherein the output data is the traffic information of different time periods;
[0115] Comparison unit 7055: used to compare the second standardized processing result with the output data to obtain a comparison result; if the comparison result is that the second standardized processing result is inconsistent with the output data, a grid search parameter optimization method is used to continuously adjust the parameters until the comparison result is that the second standardized processing result is consistent with the output data, wherein the parameters are the input feature dimension, hidden layer dimension and input layer data of the STM neural network model.
[0116] Specifically, the classification unit 7051 includes a second setting unit 70511, a cleaning unit 70512 and a transformation unit 70513, wherein:
[0117] The second setting unit 70511 is used to set the test time period of each test time point in all the test areas corresponding to the test time period of each day with 30 minutes as a time period according to the collected data of the flow information, so as to obtain pre-processed data;
[0118] Cleaning unit 70512: used for performing data cleaning on the pre-processed data, including parsing, removing duplication, omission, noise and exception processing on the pre-processed data;
[0119] Transformation unit 70513: used to perform linear transformation on the cleaned data to obtain traffic flow data, and record the traffic flow data as the first standardized processing result.
[0120] It should be noted that, regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0121] Embodiment 3:
[0122] Corresponding to the above method embodiment, this embodiment also provides a traffic condition prediction device based on the big data of the Internet of Vehicles. The traffic condition prediction device based on the big data of the Internet of Vehicles described below and the traffic condition prediction based on the big data of the Internet of Vehicles described above can be referred to each other.
[0123] Figure 3 is a block diagram of a traffic condition prediction device 800 based on Internet of Vehicles big data according to an exemplary embodiment. Figure 3 As shown, the traffic condition prediction device 800 based on the big data of the Internet of Vehicles may include: a processor 801 and a memory 802. The traffic condition prediction device 800 based on the big data of the Internet of Vehicles may also include one or more of a multimedia component 803, an I / O interface 804, and a communication component 805.
[0124] The processor 801 is used to control the overall operation of the traffic condition prediction device 800 based on the big data of the Internet of Vehicles to complete all or part of the steps in the above-mentioned traffic condition prediction method based on the big data of the Internet of Vehicles. The memory 802 is used to store various types of data to support the operation of the traffic condition prediction device 800 based on the big data of the Internet of Vehicles. These data may include, for example, instructions for any application or method operating on the traffic condition prediction device 800 based on the big data of the Internet of Vehicles, as well as application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The memory 802 can be implemented by any type of volatile or non-volatile storage device 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, disk or optical disk. The multimedia component 803 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input an audio signal. For example, the audio component may include a microphone, which is used to receive an external audio signal. The received audio signal may be further stored in the memory 802 or sent via the communication component 805. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 804 provides an interface between the processor 801 and other interface modules, and the above-mentioned other interface modules can be keyboards, mice, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the traffic condition prediction device 800 based on the big data of the Internet of Vehicles and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 805 can include: Wi-Fi module, Bluetooth module, NFC module.
[0125] In an exemplary embodiment, the traffic condition prediction device 800 based on the big data of the Internet of Vehicles can be implemented by one or more application-specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned traffic condition prediction method based on the big data of the Internet of Vehicles.
[0126] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned traffic condition prediction method based on Internet of Vehicles big data are implemented. For example, the computer-readable storage medium can be the above-mentioned memory 802 including program instructions, and the above-mentioned program instructions can be executed by the processor 801 of the traffic condition prediction device 800 based on Internet of Vehicles big data to complete the above-mentioned traffic condition prediction method based on Internet of Vehicles big data.
[0127] Embodiment 4:
[0128] Corresponding to the above method embodiment, a readable storage medium is also provided in this embodiment. The readable storage medium described below and the traffic condition prediction based on Internet of Vehicles big data described above can refer to each other.
[0129] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the traffic condition prediction method based on Internet of Vehicles big data of the above-mentioned method embodiment.
[0130] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0131] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0132] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A traffic condition prediction method based on Internet of Vehicles big data, characterized in that: include: Obtain historical trajectory data of the area to be measured within a preset time period before the current moment; Respectively obtain first trajectory data and second trajectory data of traffic conditions in the test area, wherein the first trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were not in the test area at the previous moment but are in the test area at the current moment; the second trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were in the test area at the previous moment but are not in the test area at the current moment; Processing the first trajectory data and the second trajectory data based on the three-dimensional vector to obtain traffic information of all vehicle trajectories at each time point to be tested in all the areas to be tested, wherein the traffic information includes relative traffic flow between all vehicles, relative traffic flow change rate, uncertainty information of traffic accidents and environmental factors of the current road; Performing grey correlation analysis on the flow information and the historical trajectory data to obtain a correlation value between each flow information and the historical trajectory data; According to a pre-trained traffic condition prediction model, the correlation value, the flow information and the historical trajectory data are processed to obtain traffic condition prediction information, wherein the traffic condition prediction model is trained based on the traffic conditions in the area to be tested within a historical period.
2. The traffic condition prediction method based on Internet of Vehicles big data according to claim 1 is characterized in that ,The traffic flow information includes the relative traffic flow among all vehicles, the relative traffic flow change rate, the uncertain information of the traffic accident and the environmental factors of the current road, wherein the acquisition process of the uncertain information of the traffic accident includes: Using a camera device to acquire traffic road condition image information at each of the time points to be tested in the area to be tested; Performing image preprocessing on the traffic image information, and recognizing the preprocessed image based on the Yolov3 network to obtain multiple groups of overlapping images, wherein the multiple groups of overlapping images are at least three groups, wherein the overlapping images include at least two trajectories of the same turning information divided into the same image trajectory set; Performing hierarchical analysis on all the overlapping images to determine the proportion of the same steering image information in each group of overlapping images; According to the proportion of the same turning image information in each group of overlapping images, the intersection with the largest proportion is selected as the overlapping intersection. The overlapping intersection is the intersection with the most turns, that is, it is used to measure the uncertain information of the traffic accident.
3. The traffic condition prediction method based on Internet of Vehicles big data according to claim 1 is characterized in that , gray correlation analysis is performed on the flow information and the historical trajectory data to obtain the correlation value of each flow information and the historical trajectory data, including: Performing sequence analysis on the flow information and the historical trajectory data to obtain first sequence data and second sequence data, wherein the historical trajectory data is used as a parent sequence reflecting traffic road condition factors, and the flow information is used as a subsequence reflecting traffic road condition factors; Perform dimensionless quantization processing on the first sequence data and the second sequence data, and perform mean calculation on the processed data to obtain first mean data of the first sequence data and second mean data of the second sequence data; performing association calculation based on the first sequence data, the second sequence data, the first mean data, and the second mean data to obtain a correlation coefficient between the subsequence and the parent sequence; Based on the correlation coefficient, a correlation value between each flow information and the historical trajectory data is determined.
4. The traffic condition prediction method based on Internet of Vehicles big data according to claim 1 is characterized in that , the said correlation value, the said flow information and the said historical trajectory data are processed according to the pre-trained traffic condition prediction model to obtain traffic condition prediction information, which includes: Classifying the correlation value, the traffic information, and the historical trajectory data to obtain a training set and a prediction set, and performing standardization processing on the data of the training set and the data of the prediction set respectively to obtain a first standardization processing result and a second standardization processing result; Set the number of layers of the LSTM neural network model and the number of neurons in each layer, and select an activation function and an optimizer suitable for the LSTM neural network model after the setting is completed based on the deep learning library and the grid search parameter optimization method. The activation function and the optimizer are used to update the parameters of the LSTM neural network model; According to the loss function, the updated LSTM neural network model is optimized to obtain an optimized LSTM neural network model; The first standardized processing result is sent to the optimized LSTM neural network model for processing, wherein the data in the first standardized processing result is segmented into 30-minute units, and the first standardized processing results of different time periods are input into the more optimized LSTM neural network model for processing to obtain output data of different time periods, wherein the output data is flow information of different time periods; The second standardized processing result is compared with the output data to obtain a comparison result; if the comparison result is that the second standardized processing result is inconsistent with the output data, a grid search parameter optimization method is used to continuously adjust the parameters until the comparison result is that the second standardized processing result is consistent with the output data, wherein the parameters are the input feature dimension, hidden layer dimension and input layer data of the STM neural network model.
5. The traffic condition prediction method based on Internet of Vehicles big data according to claim 4 is characterized in that , the first standardized processing result is obtained, including: According to the collected data of the flow information, each time point to be tested in all the areas to be tested is set to correspond to the time period to be tested every day with a time period of 30 minutes to obtain pre-processed data; Performing data cleaning on the preprocessed data, including parsing, removing duplication, omission, noise and exception processing on the preprocessed data; The cleaned data is linearly transformed to obtain traffic flow data, and the traffic flow data is recorded as the first standardized processing result.
6. A traffic condition prediction system based on Internet of Vehicles big data, characterized in that: include: The first acquisition module is used to acquire the historical trajectory data of the area to be measured within a preset time period before the current moment; The second acquisition module is used to respectively acquire first trajectory data and second trajectory data of traffic conditions in the test area, wherein the first trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were not in the test area at the previous moment but are currently in the test area; the second trajectory data is the total number of vehicles in all vehicle trajectories whose vehicles were in the test area at the previous moment but are currently not in the test area; A first processing module is used to process the first trajectory data and the second trajectory data based on a three-dimensional vector to obtain traffic information of all vehicle trajectories at each time point to be tested in all the tested areas, wherein the traffic information includes relative traffic flow between all vehicles, relative traffic flow change rate, uncertainty information of traffic accidents and environmental factors of the current road; Analysis module: used for performing grey correlation analysis on the flow information and the historical trajectory data to obtain a correlation value between each flow information and the historical trajectory data; The second processing module is used to process the correlation value, the flow information and the historical trajectory data according to a pre-trained traffic condition prediction model to obtain traffic condition prediction information, wherein the traffic condition prediction model is trained according to the traffic conditions in the test area within a historical period.
7. The traffic condition prediction system based on Internet of Vehicles big data according to claim 6 is characterized in that: The process of obtaining the uncertain information of the traffic accident in the first processing module includes: An acquisition unit is used to acquire the traffic road condition image information of each of the time points to be tested in the area to be tested by using a camera device; Recognition unit: used for performing image preprocessing on the traffic road condition image information, and recognizing the preprocessed image based on Yolov3 network to obtain multiple groups of overlapping images, wherein the multiple groups of overlapping images are at least three groups, wherein the overlapping images include at least two trajectories of the same turning information divided into the same image trajectory set; A first determining unit is used to perform hierarchical analysis on all the overlapping images to determine the proportion of the same steering image information in each group of overlapping images; Selection unit: used to select the overlapped intersection with the largest proportion of the same turning image information in each group of overlapped images according to the proportion of the same turning image information in each group of overlapped images. The overlapped intersection is the intersection with the most turns, that is, it is used to measure the uncertain information of the traffic accident.
8. The traffic condition prediction system based on Internet of Vehicles big data according to claim 6 is characterized in that: The analysis module includes: An analysis unit: used for performing sequence analysis on the flow information and the historical trajectory data to obtain a first sequence data and a second sequence data, wherein the historical trajectory data is used as a parent sequence reflecting traffic road condition factors, and the flow information is used as a subsequence reflecting traffic road condition factors; A first processing unit is used to perform dimensionless quantization processing on the first sequence data and the second sequence data, and perform mean calculation on the processed data to obtain first mean data of the first sequence data and second mean data of the second sequence data; A calculation unit: configured to perform association calculation based on the first sequence data, the second sequence data, the first mean data and the second mean data to obtain a correlation coefficient between the subsequence and the parent sequence; A determination unit is used to determine the correlation value between each flow information and the historical trajectory data based on the correlation coefficient.
9. The traffic condition prediction system based on Internet of Vehicles big data according to claim 6 is characterized in that: The second processing module comprises: A classification unit: used for classifying the association value, the traffic information and the historical trajectory data to obtain a training set and a prediction set, and performing standardization processing on the data of the training set and the data of the prediction set respectively to obtain a first standardization processing result and a second standardization processing result; The first setting unit is used to set the number of layers of the LSTM neural network model and the number of neurons in each layer, and based on the deep learning library and the grid search parameter optimization method, select an activation function and an optimizer suitable for the LSTM neural network model after the setting is completed, and the activation function and the optimizer are used to update the parameters of the LSTM neural network model; Optimization unit: used for optimizing the updated LSTM neural network model according to the loss function to obtain an optimized LSTM neural network model; The second processing unit is used to send the first standardized processing result to the optimized LSTM neural network model for processing, wherein the data in the first standardized processing result is segmented into 30-minute units, and the first standardized processing results of different time periods are input into the more optimized LSTM neural network model for processing to obtain output data of different time periods, wherein the output data is the traffic information of different time periods; Comparison unit: used for comparing the second standardized processing result with the output data to obtain a comparison result; if the comparison result is that the second standardized processing result is inconsistent with the output data, a grid search parameter optimization method is used to continuously adjust the parameters until the comparison result is that the second standardized processing result is consistent with the output data, wherein the parameters are the input feature dimension, hidden layer dimension and input layer data of the STM neural network model.
10. The traffic condition prediction system based on Internet of Vehicles big data according to claim 9 is characterized in that: The taxa include: A second setting unit is used to set the test time period of each test time point in all the test areas corresponding to the test time period of each day with 30 minutes as a time period according to the collected data of the flow information, so as to obtain pre-processed data; Cleaning unit: used for performing data cleaning on the pre-processed data, including parsing, removing duplication, omission, noise and exception processing on the pre-processed data; Transformation unit: used for performing linear transformation on the cleaned data to obtain traffic flow data, and recording the traffic flow data as the first standardized processing result.
