A method for constructing highway traffic model based on digital twin
By building a highway traffic model based on digital twins, combining static environmental information and dynamic vehicle information, the accurate identification and real-time visualization of highway traffic status is achieved, and the problem of inaccurate traffic status identification in the existing technology is solved and traffic is improved Management efficiency.
Patent Information
- Application Number
- CN202410192827.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-21
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-02-21
AI Technical Summary
The prior art is difficult to accurately identify highway traffic conditions, especially in traffic congestion, and lacks interaction with the real traffic environment and intuitive visualization methods.
By building a highway traffic model based on digital twins, combining static environment information and dynamic vehicle information, a digital twin model of highways is established to realize real-time interaction between the real traffic environment and the virtual simulation environment, and to identify traffic stability and congestion status in real time, dynamic Shown in the digital twin.
It realizes accurate identification and real-time visualization of highway traffic status, improves the efficiency and accuracy of traffic management, provides strong data support for managers, and alleviates traffic congestion problems.
Smart Images

Figure CN117932763B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of digital twin technology, and in particular, to a method for constructing a highway traffic model based on digital twin. Background Art
[0002] As the infrastructure of modern transportation, the emergence and development of expressways are the inevitable product of modern economic and social development. As a fast and direct mode of transportation, it can greatly improve traffic efficiency, shorten people's travel time, speed up the transportation of goods, and promote the circulation of goods.
[0003] However, with the continuous expansion of my country's highway network, traffic flow will also increase, and the resulting traffic congestion problem will become more serious, especially during holidays. Therefore, accurate identification of highway status is of great significance for implementing road management measures, optimizing traffic flow, and improving road transportation efficiency. Previous traffic status identification methods are often numerical analysis of traffic flow data, lacking interaction with the real traffic environment and intuitive visualization methods. Summary of the invention
[0004] An embodiment of the present invention provides a method for constructing a highway traffic model based on digital twins, which combines the highway digital twin model with a traffic status recognition method to achieve real-time interaction between the real traffic environment of the highway and the virtual simulation environment, and displays the traffic status in real time in the digital twin model, making it convenient for managers to perform visual management and control.
[0005] In a first aspect, an embodiment of the present invention provides a method for constructing a highway traffic model based on digital twins, comprising:
[0006] Obtain static environment information and dynamic vehicle information of highways;
[0007] Constructing a scene static twin model according to the static environment information, and constructing a vehicle dynamic twin model according to the dynamic vehicle information;
[0008] The static twin model and the dynamic twin model are jointly simulated to establish a highway digital twin model;
[0009] During the simulation process, the traffic stability status and congestion status of each road section are identified in real time based on the dynamic vehicle information, and the identification results are dynamically displayed in the digital twin model.
[0010] In a second aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0011] one or more processors;
[0012] a memory for storing one or more programs,
[0013] When the one or more programs are executed by the one or more processors, the one or more processors implement the highway traffic model construction method based on digital twins described in any embodiment.
[0014] In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, which, when executed by a processor, implements the method for constructing a highway traffic model based on digital twins as described in any embodiment.
[0015] The embodiment of the present invention provides a method for constructing a highway traffic model based on digital twins, using the traffic digital twin model as a mapping of the real traffic environment to achieve real-time interaction between the real traffic environment of the highway and the virtual simulation environment; at the same time, the traffic status is displayed in real time in the digital twin model, and it is intuitively presented to managers, making it convenient for managers to perform visual management and control. In particular, this embodiment divides the traffic status into a stable state and a congested state according to the traffic flow characteristics of the highway, thereby improving the accuracy of traffic status identification and providing strong data support for managers. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of a method for constructing a highway traffic model based on digital twins provided in an embodiment of the present invention;
[0018] Figure 2 is a schematic diagram of a stability characteristic diagram provided by an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of a congestion characteristic map provided by an embodiment of the present invention;
[0020] Figure 4 It is a structural schematic diagram of a first traffic state offline classification model and its training framework provided by an embodiment of the present invention;
[0021] Figure 5 It is a structural schematic diagram of a second traffic state offline classification model and its training framework provided by an embodiment of the present invention;
[0022] Figure 6is a flow chart of a traffic status identification process provided by an embodiment of the present invention;
[0023] Figure 7 This is a flowchart of a highway traffic model for visual management based on digital twins provided by an embodiment of the present invention.
[0024] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0026] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0027] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0028] Figure 1 This is a flowchart of a method for constructing a highway traffic model based on digital twins provided by an embodiment of the present invention. This method is applicable to scenarios such as highway simulation and control, and is executed by electronic equipment. Figure 1 As shown, the method specifically includes:
[0029] S110: Obtain static environment information and dynamic vehicle information of the highway.
[0030] The static environment information of the highway includes road surface information and traffic facility information, and the dynamic vehicle information includes the position, speed, and model of each vehicle. In this step, the static environment information can be obtained through the relevant information of the road and the relevant information of the traffic facilities, and the dynamic vehicle information can be collected through the sensing equipment on the highway as the data source of the whole method.
[0031] In a specific implementation, the road-related information includes the road design information, GIS data, high-precision maps, etc., and the road surface information that can be obtained includes the road line type, slope, traffic sign line, etc. The relevant information of traffic facilities includes images and design information of roadside traffic facilities, and the traffic facility information that can be obtained includes: information on guardrails, traffic signs, roadside detection facilities (cameras, radars, etc.), induction devices, etc. The sensing devices on the highway include bayonet cameras, edge computing devices, millimeter-wave radars, laser radars, etc. For example, the acquisition frequency and information transmission frequency of sensing devices such as bayonet cameras are in the second level, and the acquisition frequency and information transmission frequency of sensing devices such as radars are in the millisecond level, and the vehicle position positioning accuracy is in the decimeter level; the collected vehicle dynamic information includes vehicle license plate information, acquisition time information, acquisition equipment pile number information, speed information, vehicle latitude and longitude coordinate information, vehicle model information, etc.
[0032] S120. Construct a scene static twin model based on the static environment information, and construct a vehicle dynamic twin model based on the dynamic vehicle information.
[0033] On the one hand, this step constructs a scene static twin model based on the static road environment information, and updates it in real time according to the road conditions, and displays road events such as construction in real time. In a specific implementation, first, based on the road pavement information, professional modeling software (such as RoadRunner software) is used to model the road environment, including road pavement material, texture, line type, slope, and traffic markings, etc.; at the same time, based on the road facility information, professional software (such as AutoCAD software) is used to model the three-dimensional model of roadside facilities, including the establishment of three-dimensional models of guardrails, traffic signs, roadside detection facilities (cameras, radars, etc.), induction devices, etc. Then, the above-mentioned road environment model and road facility model are combined and rendered, and updated in real time according to the road conditions. If there is a construction event, it is marked on the corresponding road section and the estimated duration is displayed.
[0034] On the other hand, this step establishes a vehicle dynamic twin model based on dynamic vehicle information, performs vehicle trajectory restoration, model tracking, accident information display, etc. In a specific implementation, first, the latitude and longitude coordinates and speed of the vehicle are extracted from the radar detection data, and the vehicle trajectory is restored using a cubic spline curve fitting and smoothing method; then, the vehicle trajectories between different radars are spliced and marked with real-time speed information; finally, the vehicle model trajectory is tracked based on the spliced vehicle trajectory and real-time speed. Optionally, Simulink can be used to establish a vehicle simulation control model, and a vehicle model is continuously generated at the vehicle source based on vehicle trajectory information, speed information, vehicle model and color information, and the Stanly method is used to track the vehicle model trajectory. Furthermore, traffic accidents can also be displayed in real time in the vehicle dynamic twin model, including visual display of accident type, location, and impact range.
[0035] S130: jointly simulate the static twin model and the dynamic twin model to establish a digital twin model of the highway.
[0036] This step realizes the joint simulation of the vehicle-road model and dynamically simulates the operation status of the highway in real time. In a specific implementation, the world coordinates of the vehicle model and the trajectory can be converted into the relative coordinates of the twin model, and the vehicle trajectory and the vehicle model generated by the dynamic twin model can be imported into the static scene model, and then dynamic simulation is performed to establish a digital twin model of the highway. Exemplarily, the static twin model and the dynamic twin model are jointly simulated in the Simulink control model, and the VehicleToWorld module is used to convert the world coordinates of the vehicle model and the trajectory into the relative coordinates of the twin model; the vehicle trajectory and the vehicle model generated by the dynamic twin model are imported into the static scene model, and dynamic simulation is performed through the Unreal Engine software to establish a digital twin model of the highway.
[0037] In particular, during the simulation process, this embodiment identifies the traffic stability status and congestion status of each road section in real time based on the dynamic vehicle information, and dynamically displays the identification results in the digital twin model, thereby realizing the interaction and visual intuitive display of the traffic status and the real traffic environment.
[0038] Specifically, according to the traffic flow characteristics of the expressway, this embodiment divides the traffic state into a traffic congestion state and a traffic stability state. Among them, the congestion state is used to reflect the current congestion level of the road section, and the stability state is used to reflect the possibility of the congestion spreading to the upstream section. Compared with traffic control in scenes such as urban traffic, the distance of the expressway section is long and the speed is fast. Traffic control in this scene needs to consider the influence of traffic waves. Traffic waves visualize the transmission of traffic flow states as fluctuations in the fluid. When the density and speed of the upstream and downstream areas are different, traffic waves that can propagate along the traffic flow will be generated. When the speed and density reach the congestion critical value, traffic waves moving in the opposite direction of the traffic flow will be generated, which will cause congestion to be transmitted upstream, thereby causing congestion in a larger range. The identification of traffic wave states is an identification of traffic stability states. Therefore, this embodiment simultaneously accurately identifies the congestion state and stability state of a certain section on the expressway, providing reliable decision-making basis for traffic managers in actual traffic management and control decisions, alleviating the congestion level of the current section and inhibiting the spread of congestion to the upstream section.
[0039] Optionally, the average vehicle speed and average traffic flow parameters of the road section can be used as feature parameters, and a method combining offline classification and online recognition can be used to identify the traffic state, wherein both offline classification and online recognition are built using relevant models based on deep learning. In a specific implementation, the process may include the following steps:
[0040] Step 1. According to the dynamic vehicle information, calculate the average speed and traffic volume of any road section at the most recent multiple times, and the average speed at each time and the traffic volume at each time constitute two time series, respectively. For the convenience of distinction and description, the time series consisting of the average speed at each time is called the first time series, and the time series consisting of the traffic volume at each time is called the second time series. Optionally, first, perform abnormal data cleaning on the dynamic vehicle information, delete duplicate data, and use the three sigma criterion to filter the travel time data to remove excessive values and outliers, and use cftool in Matlab to calibrate the free flow speed according to the basic traffic flow diagram. Then, calculate the time average speed of each road section based on the processed license plate recognition data, and count the traffic volume of each road section. Finally, perform statistical analysis on the historical traffic flow data, and obtain the maximum and minimum values of representative traffic flow parameters on weekdays and holidays, and then perform data standardization. The specific formula is as follows:
[0041]
[0042] In the formula, x t is the original traffic flow parameter (average speed or traffic volume) at time t, X maxis the representative maximum value obtained by statistical analysis of the historical data of this parameter, X min is the representative minimum value obtained by statistical analysis of the historical data of this parameter, x′ t Represents x t The corresponding standardized parameters.
[0043] Step 2: Convert the first time series and the second time series into two-dimensional feature images from the perspectives of traffic stability and congestion. In order to give full play to the advantages of neural network algorithms in the field of image processing, this embodiment converts traffic time series data into image data such as feature maps, constructs input tensors, and thus improves recognition accuracy. This process includes the following two aspects:
[0044] On the one hand, from the perspective of traffic stability, the first time series and the second time series are converted into two characteristic diagrams representing stability using the Gram angle field diagram, in which each row and column corresponds to each moment, and each element represents the correlation between the vehicle speed or traffic volume between the moment corresponding to the row and the moment corresponding to the column. For the sake of distinction and description, the characteristic diagram representing stability converted from the first time series is called the first stability characteristic diagram, and the characteristic diagram representing stability converted from the second time series is called the second stability characteristic diagram. Taking the average vehicle speed as an example, the process may optionally include the following steps:
[0045] First, the average vehicle speed at each moment is normalized. For example, the original time series of the average vehicle speed is recorded as X = {x 1 ,x 2 ,x 3 ,…,x n}, n is the number of values in the sequence; the sequence is normalized to between [–1,1] and expressed as in, is the normalized time series value.
[0046] Then, the normalized average speeds are mapped to polar coordinates. The length r of the polar coordinates represents each moment, and the angle of the polar coordinates is Represents the average vehicle speed at each moment. The calculation formula is shown in formula (2).
[0047]
[0048] Among them, t i is the timestamp, i.e. the i-th moment; N means dividing the unit length of the polar coordinate into N equal parts.
[0049] Finally, using trigonometric functions and angle formulas, the correlation between every two moments is defined. The Gram angular field matrix is expressed as formula (2):
[0050]
[0051] Among them, each row and column of the matrix corresponds to a moment, is the angle in polar coordinates at the ith moment, represents the correlation between the i-th moment and the average speed at the i-th moment; I is a unit row vector. The inner product of the two vectors x and y is redefined as The penalty term is added to reduce the interference of noise. The two-dimensional matrix is the real-time first stability characteristic diagram of the road section, such as Figure 2 shown.
[0052] By processing the time series data of vehicle flow in the same way, we can get the following Figure 2 The second stability characteristic diagram shown. This embodiment converts the time series data such as average vehicle speed and traffic flow into a two-dimensional characteristic diagram through the Gram angle field to characterize the similarity of the characteristics of each time step. The more similar the traffic states of two time steps are, the more stable the traffic flow is.
[0053] On the other hand, from the perspective of traffic congestion, the first time series and the second time series are expanded along the row dimension or the column dimension to generate two feature maps representing the congestion degree. For the sake of distinction and description, the feature map representing the congestion degree generated by expanding the first time series is called the first congestion feature map, and the feature map representing the congestion degree generated by expanding the second time series is called the second congestion feature map. Taking the average vehicle speed as an example, the normalized first time series is Expand each element in the row vector into a column vector along the column dimension to obtain a two-dimensional matrix This matrix is the real-time first congestion feature map of the road section, such as Figure 3 shown.
[0054] Using the same method to process the polarity of the time series data of vehicle flow, we can get the following Figure 3 The second congestion characteristic diagram shown. This embodiment reflects the time series change law of parameters through dimension expansion, highlights the time series change of traffic state characteristics, and reflects the traffic congestion state. The higher the average vehicle speed, the smoother the road, and vice versa.
[0055] Step three: input the first stability characteristic graph, the second stability characteristic graph, the first congestion characteristic graph and the second congestion characteristic graph into an online traffic status recognition model to obtain the real-time traffic stability status and congestion status of the road section.
[0056] As described above, this embodiment uses a method combining offline classification and online recognition to identify traffic conditions. Among them, online recognition refers to the use of a deep learning model (called the traffic state online recognition model) to process the real-time traffic data of the road section to obtain the real-time traffic state of the road section (i.e., the above step three); offline classification refers to the use of two other deep learning models (respectively referred to as the first offline classification model and the second offline classification model) to classify multiple groups of real-time traffic data of the road section into different traffic states before using the traffic state online recognition model, and take each group of real-time traffic data and the corresponding traffic state as a sample to obtain a training sample set of the deep learning model. Among them, the first offline classification model is used to classify the stability characteristic diagram into different stability states, and the second offline classification model is used to classify the congestion characteristic diagram into different congestion states. Therefore, in order to illustrate the mechanism of online identification of traffic conditions, the process of constructing a training sample set using an offline classification model is first introduced. In a specific embodiment, the process may include the following steps:
[0057] S3-1. Generate a first stability characteristic graph, a second stability characteristic graph, a first congestion characteristic graph, and a second congestion characteristic graph for each road section in each historical period according to the average vehicle speed and vehicle flow of the multiple road sections at each time in the multiple historical periods. The generation process of each characteristic graph is as described above and will not be repeated here.
[0058] S3-2, using the first traffic status offline classification model, classify the first stability characteristic graph and the second stability characteristic graph of each road section in each historical period, and use the classification result as the traffic stability state of each road section at the final moment of each historical period. Figure 4 The structure of the first traffic state offline classification model is shown, which includes a first autoencoder and a second autoencoder. Optionally, the autoencoder can be a convolutional variational autoencoder. Figure 4, the classification process includes: first, using the first convolutional variational autoencoder to reduce the dimension and extract features of each first stability feature map, mapping the traffic state features to a low-dimensional latent space, and obtaining each first embedded feature z1 that characterizes the stability of the vehicle speed. At the same time, using the second convolutional variational autoencoder to reduce the dimension and extract features of each second stability feature map, mapping the traffic state features to a low-dimensional latent space, and obtaining each second embedded feature z2 that characterizes the stability of the vehicle flow. Then, each first embedded feature z1 and the corresponding second embedded feature z2 are fused to obtain each fused feature z, and each fused feature is clustered; optionally, the K-means clustering algorithm is used to cluster the latent space. Finally, according to the road section and historical period corresponding to each cluster center, the traffic stability status of each cluster center is manually labeled; the first stability feature map and the second stability feature map corresponding to each fused feature in the same cluster cluster are classified into one category and labeled as the same traffic stability status as the cluster center. The cluster center has the strongest generalization ability and can best represent the data characteristics of the same cluster. Therefore, this step manually labels the traffic stability state of the cluster center, and the labeling categories can include 4 levels from stable to unstable. This embodiment realizes the classification of traffic status by clustering fusion features. The fusion features can simultaneously consider the information of average vehicle speed and traffic flow, expand the brightness of traffic features, and also expand the depth of traffic features. The deeper the depth, the easier it is to cluster.
[0059] The following describes the training process of the first traffic state offline classification model. In a specific implementation, the process requires the use of an autodecoder corresponding to the autoencoder. Figure 4The training framework of the first traffic state offline classification model includes a first autoencoder, a second autoencoder, a first autodecoder and a second autodecoder. When each encoder adopts a convolutional variational autoencoder, each decoder adopts a convolutional variational autodecoder accordingly. During training, firstly, according to the average vehicle speed and vehicle flow of multiple sections at each moment in multiple historical time periods, the first stability characteristic graph and the second stability characteristic graph of each section in each historical time period are generated respectively. The first stability characteristic graph and the second stability characteristic graph of the same section in the same time period together constitute a sample for training the parameters of the entire training framework, wherein the multiple historical time periods here can be the same as or different from the multiple historical time periods in S3-1, and this embodiment does not make specific restrictions. During the training process, for any sample, firstly, the first stability characteristic graph A1 in the sample is reduced in dimension using the first autoencoder to obtain the first embedded feature z1 that characterizes the vehicle speed stability; the second stability characteristic graph A2 in the sample is reduced in dimension using the second autoencoder to obtain the second embedded feature z2 that characterizes the vehicle flow stability; the first embedded feature z1 and the corresponding second embedded feature z2 are fused to obtain the fused feature z. Then, the first decoder is used to decode the first embedded feature z1 to obtain the restored image B1 of the first stability feature map A1; the first decoder is used to decode the fused feature z to obtain another restored image B2 of the first stability feature map A1. At the same time, the second self-decoder is used to decode the second embedded feature z2 to obtain the restored image B3 of the second stability feature map A2; the second self-decoder is used to decode the fused feature z to obtain another restored image B4 of the second stability feature map A2. For the convenience of distinction and description, the restored image B1 and the other restored image B2 are respectively referred to as the first restored image and the second restored image, and the restored image B3 and the other restored image B4 are respectively referred to as the third restored image and the fourth restored image. Figure 4 Taking the structure of the convolutional variational autoencoder and convolutional variational autodecoder shown in the figure as an example, in the convolutional variational autoencoder, three convolutional layers are first used to extract features from the image to obtain a tensor of size m×n×n, where m is the number of channels of the tensor and n is the height and width of each feature map. The feature tensor is then reduced to a one-dimensional column vector using the view() function, and then the mean and variance of the Gaussian distribution are extracted using two fully connected layers, respectively, and then the parameterization operation is performed to generate embedded features. In the convolutional variational autodecoder, the embedded features or fused features are first increased in dimension using a fully connected layer, and then the one-dimensional column vector is integrated into a tensor of size m×n×n using the view() function, and then three deconvolution layers are used to restore the image to obtain the restored image. Finally, each restored image is substituted into the following loss function:
[0060] L VAE =|B1-A1|+|B3-A2|-b×(D KL1+D KL2 ) (4)
[0061] L Fusion =|B2-A1|+|B4-A2| (5)
[0062] L = α × L VAE +β×L Fusion
[0063] Among them, L VAE is the variational autoencoder loss function, b is the penalty coefficient, D KL1 and D KL2 are the KL divergence of the network parameters of the first autoencoder and the second autoencoder, L Fusion is the reconstruction loss, L is the total loss function, and α and β are the balance coefficients. VAE The minimization of L can achieve the minimization of the difference between the first restored image and the first stability characteristic map and the minimization of the difference between the third restored image and the second stability characteristic map. Fusion The minimization of can achieve the minimization of the difference between the second restored image and the second stability feature map and the minimization of the difference between the fourth restored image and the second stability feature map, thereby completing the parameter training of each convolutional autoencoder and convolutional self-decoder. The trained first convolutional autoencoder and the second convolutional autoencoder can be used together with the clustering algorithm to form a first traffic state offline classification model. In particular, in this embodiment, in order to make the weighted fused embedded feature z better represent the latent space characteristics of each view, the model uses z for decoding and restoration in the decoding and restoration link, and uses reconstruction loss to represent its restoration ability, and applies a high weight (β) to it in the total loss function, so as to make the model tend to be trained in the direction of better extracting the latent space characteristics of each view.
[0064] S3-3, using the second traffic status offline classification model, classify the first congestion feature map and the second congestion feature map of each road section in each historical period, and use the classification result as the traffic congestion state of each road section at the final moment of each historical period. Optionally, the structure of the second traffic status offline classification model and its training framework is as follows: Figure 5 As shown, its classification process and training process are similar to those of the first traffic state offline classification model, the difference being that the input of the second traffic state offline classification model is a congestion feature map, and the traffic state obtained after clustering is a traffic congestion state, including four levels from smooth to congested. It should be noted that S3-2 and S3-3 are independent of each other and can be executed in any order, or simultaneously or cross-executed, and this embodiment does not impose any specific restrictions.
[0065] S3-4, the first stability characteristic graph, the second stability characteristic graph, the first congestion characteristic graph, the second congestion characteristic graph of each road section in each historical period, and the traffic stability state and traffic congestion state of each historical road section at the final moment together constitute each sample, and obtain the training sample set of the traffic state online recognition model. It should be noted that, since the traffic state online recognition model recognizes the traffic state in real time, the input data of each sample is the stability characteristic graph and the congestion characteristic graph converted from the time series consisting of the average vehicle speed or traffic flow at a certain moment and multiple moments before it, and the output data is the traffic state at that moment.
[0066] After obtaining the training sample set, the sample set can be divided into a training set and a test set, and the training set and the test set are used to train and verify the online traffic state recognition model respectively. Optionally, the model adopts the CoAtNet algorithm, and adopts a structure combining a convolutional layer and a Transformer layer, that is, a CCTT superposition method, where C represents the convolutional layer, T represents the Transformer layer, and an attention mechanism is added to improve the model recognition ability. The input of the trained online traffic state recognition model is the first stability feature map, the second stability feature map, the first congestion feature map, and the second congestion feature map converted from a time series consisting of the average vehicle speed or traffic flow at a certain moment and multiple moments before it, and the output is the traffic stability state level and congestion state level at that moment.
[0067] After the online traffic state recognition model is trained, it can be applied to the simulation process of the highway digital twin model. The time series consisting of the average vehicle speed or traffic flow at the current moment and multiple previous moments of a certain section of road is converted into a real-time first stability characteristic graph, a real-time second stability characteristic graph, a real-time first congestion characteristic graph and a real-time second congestion characteristic graph, and input into the traffic state online recognition model to obtain the real-time traffic stability state and congestion state of the section. Figure 6 It is a flow chart of a traffic state recognition process provided by an embodiment of the present invention, showing the entire process from offline classification to online recognition.
[0068] After obtaining the traffic status recognition results, they are imported into the highway digital twin model for visualization. Optionally, a color can be determined for each level of stability state and congestion state, and then the color of the stability state level and congestion state level corresponding to each road section is displayed on the background of the road section twin model and described in text. Managers can understand the traffic status of the road section based on the visualization results and then take corresponding control measures, such as making management decisions based on the road operation status, traffic status and other information provided by the digital twin model, thereby realizing human-computer interaction and virtual-reality interaction. Figure 7It is a flowchart of visual management of a highway traffic model based on a digital twin provided by an embodiment of the present invention, showing a closed-loop process from model construction to visual management.
[0069] In summary, this embodiment provides a method for constructing a highway traffic model based on digital twins, using the traffic digital twin model as a mapping of the real traffic environment to achieve real-time interaction between the real traffic environment of the highway and the virtual simulation environment; at the same time, the traffic status is displayed in real time in the digital twin model, and it is intuitively presented to the management personnel, which is convenient for the management personnel to perform visual management and control. In particular, this embodiment divides the traffic status into stability status and congestion status according to the traffic flow characteristics of the highway, converts the average speed and traffic flow time series data of the road section into stability feature graphs and congestion feature graphs, and uses a method combining offline classification with online recognition to identify the traffic status in real time according to the above feature graphs, thereby improving the accuracy of traffic status recognition and providing strong data support for management personnel.
[0070] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 8 As shown, the device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the device can be one or more. Figure 8 A processor 60 is taken as an example; the processor 60, the memory 61, the input device 62 and the output device 63 in the device can be connected by a bus or other means. Figure 8 The example of connecting through bus is taken in the following.
[0071] The memory 61 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the method for constructing a highway traffic model based on digital twins in the embodiment of the present invention. The processor 60 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 61, that is, realizing the above-mentioned method for constructing a highway traffic model based on digital twins.
[0072] The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include a memory remotely arranged relative to the processor 60, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0073] The input device 62 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 63 may include a display device such as a display screen.
[0074] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it implements the method for constructing a highway traffic model based on digital twins of any embodiment.
[0075] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0076] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0077] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0078] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a highway traffic model based on digital twins, characterized in that: include: Obtain static environment information and dynamic vehicle information of highways; Constructing a scene static twin model according to the static environment information, and constructing a vehicle dynamic twin model according to the dynamic vehicle information; The static twin model and the dynamic twin model are jointly simulated to establish a highway digital twin model; During the simulation, the traffic stability state and congestion state of each road section are identified in real time according to the dynamic vehicle information, and the identification results are dynamically displayed in the digital twin model; Wherein, the real-time identification of the traffic stability state and congestion state of each road section according to the dynamic vehicle information includes: According to the dynamic vehicle information, the average vehicle speed and traffic volume of any road section at the most recent multiple times are calculated, the average vehicle speed at each time constitutes a first time series, and the traffic volume at each time constitutes a second time series; The first time series and the second time series are converted into a first stability characteristic diagram and a second stability characteristic diagram respectively by using a Gram angle field diagram, wherein each row and column in the diagram corresponds to each moment, and each element represents the correlation between the vehicle speed or vehicle flow rate between the moment corresponding to the row and the moment corresponding to the column; Expanding the first time series sequence and the second time series sequence along the row dimension or the column dimension respectively to generate a first congestion feature map and a second congestion feature map; The first stability characteristic graph, the second stability characteristic graph, the first congestion characteristic graph, and the second congestion characteristic graph are input into an online traffic status recognition model to obtain a real-time traffic stability status and congestion status of the road section, wherein the stability status is used to reflect the possibility of congestion spreading to an upstream road section.
2. The method according to claim 1, characterized in that Before inputting the first stability characteristic graph, the second stability characteristic graph, the first congestion characteristic graph, and the second congestion characteristic graph into the traffic state online recognition model to obtain the real-time traffic stability state and congestion state of the road section, the method further includes: According to the average vehicle speed and traffic volume of multiple road sections at each time in multiple historical time periods, respectively generate a first stability characteristic graph, a second stability characteristic graph, a first congestion characteristic graph and a second congestion characteristic graph for each road section in each historical time period; Using the first traffic state offline classification model, classify the first stability characteristic graph and the second stability characteristic graph of each road section in each historical period, and use the classification result as the traffic stability state of each road section at the final moment of each historical period; Using the second traffic status offline classification model, classify the first congestion characteristic graph and the second congestion characteristic graph of each road section in each historical period, and use the classification result as the traffic congestion status of each road section at the final moment of each historical period; Each sample is composed of the first stability characteristic graph, the second stability characteristic graph, the first congestion characteristic graph, the second congestion characteristic graph of each road section in each historical period, and the traffic stability state and traffic congestion state of each historical road section at the final moment, thereby obtaining a training sample set for the traffic state online recognition model.
3. The method according to claim 2, characterized in that The first traffic state offline classification model includes a first autoencoder and a second autoencoder; The method of using the first traffic state offline classification model to classify the first stability characteristic graph and the second stability characteristic graph of each road section in each historical period includes: Using the first autoencoder to reduce the dimension of each first stability feature graph to obtain each first embedded feature characterizing vehicle speed stability; Using the second autoencoder to reduce the dimension of each second stability feature graph to obtain each second embedding feature characterizing the stability of vehicle flow; Fusing each first embedded feature with the corresponding second embedded feature, and clustering each fused feature; According to the road sections and historical time periods corresponding to each cluster center, the traffic stability status of each cluster center is manually labeled; The first stability feature graph and the second stability feature graph corresponding to each fusion feature in the same cluster are classified into one category and marked as the same traffic stability state as the cluster center.
4. The method according to claim 2, characterized in that: The first traffic state offline classification model includes a first autoencoder and a second autoencoder, and the training framework of the first traffic state offline classification model includes a first autoencoder, a first autodecoder, a second autoencoder and a second autodecoder; Before the first traffic state offline classification model is used to identify the first stability characteristic graph and the second stability characteristic graph of each road section in each time period to obtain the traffic stability state of each road section in each time period, the method further includes: Generating a first stability characteristic graph and a second stability characteristic graph for each road section in each historical period according to the average vehicle speed and vehicle flow of the multiple road sections at each time in the multiple historical periods; Using the first autoencoder pair to reduce the dimension of each first stability feature graph, so as to obtain each first embedded feature characterizing the vehicle speed stability; using the second autoencoder pair to reduce the dimension of each second stability feature graph, so as to obtain each second embedded feature characterizing the vehicle flow stability; Fusing each first embedded feature with the corresponding second embedded feature to obtain each fused feature; Using a first self-decoder to decode each first embedded feature and each fused feature, respectively, to obtain a first restored image and a second restored image of each first stability feature map; using a second self-decoder to decode each second embedded feature and each fused feature, respectively, to obtain a third restored image and a fourth restored image of each second stability feature map; The first autoencoder and the second autoencoder are trained by minimizing the differences between each first restored image and each second restored image and each first stability characteristic map, and minimizing the differences between each third restored image and each fourth restored image and each second stability characteristic map.
5. The method according to claim 3, characterized in that: The first traffic status offline classification model also includes a first convolutional network connected before the first autoencoder, and a second convolutional network connected before the second autoencoder; each encoder is a variational autoencoder.
6. The method according to claim 1, characterized in that The dynamic vehicle information includes vehicle position and speed acquired by multiple radars; The constructing of a vehicle dynamic twin model according to the dynamic vehicle information includes: The vehicle trajectory is restored from the vehicle position obtained by each radar using cubic spline curve fitting and smoothing method; The vehicle tracks corresponding to each radar are spliced together and the real-time vehicle speed is marked; The vehicle model trajectory is tracked based on the spliced vehicle trajectory and real-time vehicle speed.
7. The method according to claim 1, characterized in that The dynamically displaying the recognition result in the digital twin model includes: A color is determined for each level of stability state and congestion state; The color of the stability status level and congestion status level of each road section is displayed in the digital twin model.
8. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the highway traffic model construction method based on digital twins as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, which, when executed by a processor, implements the method for constructing a highway traffic model based on digital twins as described in any one of claims 1-7.
Citation Information
Patent Citations
Traffic and construction organization scheme optimization decision-making method and system
CN116258284A
Vehicle network information system and method based on digital twinning
CN117373244A