CN114519302B - Highway traffic situation simulation method based on digital twinning - Google Patents

Highway traffic situation simulation method based on digital twinning Download PDF

Info

Publication number
CN114519302B
CN114519302B CN202210099127.8A CN202210099127A CN114519302B CN 114519302 B CN114519302 B CN 114519302B CN 202210099127 A CN202210099127 A CN 202210099127A CN 114519302 B CN114519302 B CN 114519302B
Authority
CN
China
Prior art keywords
model
twin
simulation
traffic
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210099127.8A
Other languages
Chinese (zh)
Other versions
CN114519302A (en
Inventor
张蓉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu University of Science and Technology
Original Assignee
Jiangsu University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu University of Science and Technology filed Critical Jiangsu University of Science and Technology
Priority to CN202210099127.8A priority Critical patent/CN114519302B/en
Publication of CN114519302A publication Critical patent/CN114519302A/en
Application granted granted Critical
Publication of CN114519302B publication Critical patent/CN114519302B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Computer Hardware Design (AREA)
  • Geometry (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a highway traffic situation simulation method based on digital twinning, which is used for evaluating traffic situations of different road segments. The invention designs a corresponding free forest model, combines high influence factors in a clustering mode, outputs important attributes influencing traffic situation, designs a Bayesian network model to form a probability judging module, and establishes a traffic simulation model in a multi-agent environment. And constructing an advanced agent framework based on Anylogic by a threshold method to obtain a target object simulation model, performing countermeasure learning with a twin simulation path model based on a Tensorflow platform, and outputting an evaluation result. According to the invention, the digital twin information channel is used for communicating the twin target object model with the actual scene, training and deployment of the real-time random forest model are performed, and the traffic situation is simulated in real time and updated through the digital twin highway traffic situation assessment model. The traffic situation assessment method and the traffic situation assessment system can be used for effectively assessing traffic situations in various traffic scenes.

Description

Highway traffic situation simulation method based on digital twinning
Technical Field
The invention relates to the technical field of traffic situation simulation, in particular to a highway traffic situation simulation method based on digital twinning.
Background
With urban development, the importance of highway traffic is increasingly highlighted in the social and economic development of China. Traffic networks are increasingly large in scale and complexity, so that problems such as traffic jams and traffic accidents are increasingly serious. Whether it is traffic function departments or travelers, the requirements on the safety and convenience of traffic travel are higher and higher, and the requirements provide challenges for the accuracy of traffic situation awareness. Therefore, the road traffic situation simulation is realized as accurately as possible by utilizing advanced technology and detection equipment, the traffic condition of the current road section is grasped in real time, the travel efficiency is improved, the traffic safety is enhanced, and the method has important theoretical and practical research significance in the aspects of leading information technology application, improving urban comprehensive competitiveness, realizing sustainable development and the like.
With the continuous development of detection equipment and data transmission functions, large-scale multidimensional and real-time traffic data can be rapidly acquired. In the prior art, an artificial intelligence method, such as a neural network, is used for analyzing time sequence characteristics of traffic data, a model is built for predicting short-term traffic situation, but most models do not reflect the influence of uncertainty factors under the time sequence characteristics on the traffic situation, and the accuracy and the real-time update rate are required to be improved.
Disclosure of Invention
The invention aims to: aiming at the problems, the invention aims to provide a highway traffic situation simulation method based on digital twinning, which can simulate traffic situations, simulate and update real-time, and efficiently and accurately realize the pre-judgment of the traffic delay condition of a predicted target road section.
The technical scheme is as follows: a highway traffic situation simulation method based on digital twinning comprises the following steps:
s001: the calculation analysis module acquires the information of the target object and the information of the space where the target object is located through the information extraction module;
S002: reading and preprocessing the characteristic information of the twin target object, modeling by a modeling method based on digital twin, completing model self-optimization, selecting an optimal model for simulation, and generating a highway situation assessment result;
s003: the highway situation assessment result is sent to a preset receiving end through a communication module;
S004: and carrying out visual conversion on the highway situation assessment result, and generating visual video data on a visual module in a high-frame-rate video mode.
Further, in S002, the model set by the modeling method based on digital twin includes a twin target object feature model, a twin target object model, and a twin simulation path model.
Furthermore, the twin target object feature model is built by adopting a random forest modeling method, comprising the following steps,
S101, a calculation and analysis module acquires noise reduction of traffic road conditions and fused road characteristic data through an information extraction module;
S102: the calculation analysis module reads and preprocesses the noise-reduced and fused road characteristic data of the traffic road conditions, and models and analyzes the preprocessed noise-reduced and fused road characteristic data through a random forest model to generate an importance sorting result;
S103, a calculation and analysis module provides road feature data with importance lower than 5%, and outputs a feature result of the twin target object;
And S104, storing the obtained twin object characteristic result as a data set in a matrix form to form a twin object characteristic model.
Further, in S102, the modeling analysis of the random forest model includes the steps of,
S11: dividing the total number M of trees in the forest into 4 parts averagely and dividing the parts into each process for sharing, creating M/4 decision trees by each process, and returning the created M/4 decision trees to the main process in a list form;
s12: after the main process obtains the decision tree lists of 4 sub-processes, integrating the 4 sub-lists into a decision tree list L with the length of M;
S13: generating a training set for each decision tree, randomly extracting n samples from the repeated repetition which is put back in the original training sample set by using a bootstrap aggregating method in bagging to serve as a group of training sets;
S14: constructing a single decision tree, randomly extracting m features from the features of each sample, dividing the m features into a sample set B by using a feature-based mode to calculate a radix index, and dividing the sample set into a sample set D1 equal to a specified feature and a sample set B2 not equal to a given feature, wherein the steps are as follows:
Wherein A is the current feature, then find out the minimum division A of the base's index from all Gini (B, ai), use feature A as splitting feature, repeat this step and obtain the decision tree;
S15: each process repeatedly constructs M/3 decision trees according to the step S13 and the step S14, integrates the M/3 decision trees to form a random forest, and the last leaf node of each decision tree is the characteristic with the greatest influence on network safety to form a characteristic set A1, A2 … … Am;
s16: judging the effectiveness of the model according to the accuracy and selecting the optimal parameters:
Wherein TP is true positive, which means that the actual class is positive, and the algorithm output class is also positive; FP is false positive, indicating that the actual class is negative and the sample output class is positive; TN is true negative, meaning that the actual class is negative and the algorithm output class is also negative; FN is false negative, which means that the actual class is positive and the algorithm output class is negative; the super parameter θ is set as: max_features=0.2, decision tree number trees =18.
Further, the twin target object model is established by adopting a method for modifying the original Agent, comprising the following steps,
S31: an initialization stage: the vehicle physical entity is initialized as an Agent, and the attribute of the Agent is defined as:
Wherein id represents the unique identification number of the Agent; A velocity vector representing an Agent; pos (t) represents the location of an Agent; h represents the length of the Agent; r represents the width of Agent; p represents the average speed of the Agent; t represents a time step;
S32: and (3) interaction stage: each Agent performs information interaction with other agents and environments where the agents are located, and records the current position in a coordinate form;
s33: action stage: each Agent moves according to the driving of the social force model, and continuously updates the position information until the action stops;
S34: and recording and returning the speed change condition of the action on the road section, and judging and returning the road traffic delay condition according to the duty ratio of the agent action low-speed time period in the running time period.
Optimally, the twin simulation path model is built and trained by adopting a Bayesian network model, comprising the following steps,
S21: combining the occurrence probability of the feature sample set { A 1,A2……Am } obtained by random forest model learning simulation with the corresponding occurrence period and a sample label to form a feature set sample T with an occurrence probability value, marking the occurrence probability as prior probability, updating the feature sample, correcting all prior probabilities by using a Bayesian formula, and solving posterior probability;
S22: taking relevant parameters of the traffic situation of the road section as nodes, wherein the nodes comprise observable nodes and hidden nodes; wherein the observable nodes comprise the average travel time of the road segments and the relative density of the road segments, which can cause traffic, and the hidden nodes comprise the traffic situation of the road segments and the historical probability of traffic accidents of the road segments;
S23: calculating the probability of traffic delay of the corresponding road section by adopting a Bayesian formula, wherein the Bayesian formula is as follows:
Where P (A|B) is the likelihood that A occurs in the case of B occurring, A1, … …, ai are the complete event set, P (A) is the prior probability or edge probability of A, P (A|B) is the conditional probability of A after B has been known to occur, P (B|A) is the conditional probability of B after A has been known to occur, and P (B) is the prior probability or edge probability of B.
S24: and forming a Bayesian network for estimating the road traffic delay condition, and outputting a result.
Optimally, taking the result output by the Bayesian network of the S24 as a target for the result obtained by the simulation of the twin target object model to carry out the comprehensive comment of the countermeasure learning, establishing a countermeasure learning model,
The results output by the twin simulation path model are adopted to comment the results output by the twin target object model, the results are evaluated according to a comprehensive evaluation method, the comprehensive evaluation method comprises the following steps,
S41: generating a loss function gloss, wherein the formula is as follows:
loss=ganWeight×ganLoss+modelWeight×modelLoss;
wherein GANWEIGHT is the weight of the counterdamage function ganLoss, and the value is 0-30; modelWeight is the weight of a loss function modelLoss of the difference value between the output result of the twin object model and the output result of the twin simulation path model, and the value is 0-50;
modelLoss represents the difference between the output result of the twin object model and the output result of the twin simulation path model, and the calculation formula is as follows:
the RP ij represents the output result of the twin target object model, the QP ij represents the output result of the twin simulation path model, and the two results are represented in a two-dimensional matrix mode;
s42: generating ganLoss is a counterdamage function, and the formula is:
When Pmodel is countermeasure learning, the countermeasure learning model considers that the result output by the twin target object model is completely consistent with the result output by the twin simulation path model, and the matrix is a two-dimensional matrix which accommodates Pmodel values of different roads in different time periods; EPCG is a dimension stability factor when gradient is reduced, EPCG adopts a pseudo-random function to take a value in a [10 -4,10-11 ] interval in a pseudo-random mode in simulation;
s43: and a discrimination formula is adopted to discriminate the function at any time, the smaller the loss function is, the more accurate the simulation result is, wherein the discrimination formula is as follows:
Wherein, The probability matrix is the expected probability, namely the probability matrix that the actual situation is consistent with the result output by the twin target object model.
The beneficial effects are that: compared with the prior art, the invention has the advantages that:
(1) The complexity and the systematicness of the traffic situation are comprehensively analyzed, a digital twin-based modeling method is adopted to carry out traffic situation simulation evaluation, a digital twin-based traffic situation evaluation modeling theory and a digital twin-based modeling method are provided, the traffic situations of different road sections in different time periods are predicted through simulation, scientific basis is provided for traffic prediction, traffic control and traffic planning, and the method has remarkable guiding significance;
(2) Establishing a digital twin traffic situation evaluation simulation model: establishing a random forest model, and obtaining twin target object characteristics through an unsupervised machine learning method; and establishing a twin simulation path model and a twin target object simulation model, optimizing the model based on the actual traffic situation by an countermeasure learning method, and outputting a simulation result.
(3) And carrying out digital twin modeling in Tensorflow environment, deepening the application level of Tensorflow environment, simulating and analyzing the influence of important attributes on traffic situation, and providing related suggestions of traffic planning.
(4) Based on the digital twin modeling method, a new method for model establishment and model self-optimization is provided, the modeling direction in the traffic simulation field is widened on the basis of completing the application of the method, and the digital twin self-optimization modeling method is deduced.
(5) The digital twin is used as a new artificial intelligence method, on the complex time relevance of traffic situation, a Bayesian network is combined, a situation awareness technology of a higher level is utilized, elements affecting the traffic situation are extracted, and a better effect is achieved in solving the uncertainty influence in the traffic situation. The traffic situation simulation situation of the target road section can be accurately predicted in real time, and the result is continuously updated along with the evolution of the scene, so that the method has important significance for the works such as traffic situation prediction, control, traffic road network planning and the like.
Drawings
FIG. 1 is a schematic diagram of simulation method module signal transfer;
FIG. 2 is a flow chart of parallel allocation of decision trees of a random forest algorithm;
FIG. 3 is a schematic diagram of a Bayesian network-based twinning path model;
FIG. 4 is a schematic diagram of a modified Agent;
FIG. 5 is a flow chart for core predictive model creation.
Detailed Description
The invention will be further elucidated with reference to the drawings and to specific embodiments, it being understood that these embodiments are only intended to illustrate the invention and are not intended to limit the scope thereof.
A highway traffic situation simulation method based on digital twinning comprises four modules, as shown in fig. 1, including an information extraction module 100, a calculation analysis module 200, a communication module 300 and a visualization module 400.
The calculation analysis module 200 comprises a data reading submodule, a data preprocessing submodule, a core model submodule and a data output submodule which are sequentially connected through an API interface, the information extraction module 100 is in signal connection with the data reading submodule, the communication module 300 and the visualization module 400 are respectively in signal connection with the data output submodule, the visualization module 400 comprises a preset receiving end, and the preset receiving end is in signal connection with the communication module 300.
The information extraction module 100 is configured to detect a target object and information of a road segment where the target object is located, where the target object is a vehicle running on a highway, and the information extraction module 100 sends the acquired data information to the calculation analysis module 200.
The calculation and analysis module 200 is in signal connection with the communication module 300 and the visualization module 400, and is used for automatically establishing a highway traffic situation assessment model based on digital twinning, providing calculation power for assessment simulation, and sending traffic situation prediction results to the communication module 300 and the visualization module 400. The communication module 300 is used for transmitting information and transmitting the received road condition evaluation result to a preset receiving end. The visualization module 400 is used for visualizing and displaying the road condition evaluation result.
As shown in fig. 2 to 5, the highway traffic situation simulation method based on digital twinning comprises the following steps:
s001: the calculation analysis module acquires the information of the target object and the information of the space where the target object is located through the information extraction module;
S002: reading and preprocessing the characteristic information of the twin target object, modeling by a modeling method based on digital twin, completing model self-optimization, selecting an optimal model for simulation, and generating a highway situation assessment result;
s003: the highway situation assessment result is sent to a preset receiving end through a communication module;
S004: and carrying out visual conversion on the highway situation assessment result, and generating visual video data on a visual module in a high-frame-rate video mode.
The computational analysis module 200 is a python language based simulated computer environment integrated in a computer, wherein: the data reading sub-module, the data preprocessing sub-module, the core model sub-module and the data output sub-module are four functional partitions in the environment. The core model submodule is a highway traffic situation assessment model based on digital twinning, which is mentioned in the invention, stored and operated in the calculation analysis module 200.
And the data reading sub-module is used for reading the target object and the data information of the space where the target object is located, which are extracted by the information extraction module. And the data preprocessing sub-module is used for preprocessing the target object and the data information of the space where the target object is located.
The core model submodule is used for automatically establishing a digital twin-based highway traffic situation assessment model and carrying out simulation output assessment results on traffic situations through the digital twin-based highway traffic situation assessment model.
The modeling model based on the digital twin modeling method comprises a twin target object characteristic model, a twin target object model and a twin simulation path model.
Carrying out feature combination processing on the road feature data of the real-time traffic road conditions to obtain important feature attributes of the lanes; noise reduction processing is carried out on road section feature data of different time periods, noise data is removed, and the denoised road section feature data of the corresponding time period is obtained; carrying out data fusion processing on the denoised road section characteristic data in different time periods, and fusing the similar data to obtain fused road characteristic attributes in corresponding time periods; according to the fused road feature data, importance identification processing is carried out on the fused road feature attributes, an unsupervised machine learning training is carried out by a random forest modeling method, a soft classification method is adopted, the fused road feature classification is carried out by a trained random forest model, whether the road has a delay condition in the same time period is taken as a judgment label, the delay state in the invention means that the vehicle flow speed is 10% lower than the average flow speed, the feature attributes with the importance degree of the corresponding road being lower than 5% (too low) are removed, a twin target object feature result is obtained by outputting, and the twin target object feature comprises the feature attribute of the traffic road environment and the feature attribute of the vehicle moving in the traffic road environment.
The twin target object feature model is built by adopting a random forest modeling method, comprising the following steps,
S101, a calculation and analysis module acquires noise reduction of traffic road conditions and fused road characteristic data through an information extraction module;
S102: the calculation analysis module reads and preprocesses the noise-reduced and fused road characteristic data of the traffic road conditions, and models and analyzes the preprocessed noise-reduced and fused road characteristic data through a random forest model to generate an importance sorting result;
S103, a calculation and analysis module provides road feature data with importance lower than 5%, and outputs a feature result of the twin target object;
And S104, storing the obtained twin object characteristic result as a data set in a matrix form to form a twin object characteristic model.
The modeling analysis of the random forest model comprises the following steps:
s11: dividing the total number M of trees in the forest into 4 parts averagely and dividing the parts into each process for sharing, creating M/4 decision trees by each process, and returning the created M/4 decision trees to the main process in a list form;
s12: after the main process obtains the decision tree lists of 4 sub-processes, integrating the 4 sub-lists into a decision tree list L with the length of M;
S13: generating a training set for each decision tree, randomly extracting n samples from the repeated repetition which is put back in the original training sample set by using a bootstrap aggregating method in bagging to serve as a group of training sets;
S14: constructing a single decision tree, randomly extracting m features from the features of each sample, dividing the m features into a sample set B by using a feature-based mode to calculate a radix index, and dividing the sample set into a sample set D1 equal to a specified feature and a sample set B2 not equal to a given feature, wherein the steps are as follows:
Wherein A is the current feature, then find out the minimum division A of the base's index from all Gini (B, ai), use feature A as splitting feature, repeat this step and obtain the decision tree;
S15: each process repeatedly constructs M/3 decision trees according to the step S13 and the step S14, integrates the M/3 decision trees to form a random forest, and the last leaf node of each decision tree is the characteristic with the greatest influence on network safety to form a characteristic set A1, A2 … … Am;
s16: judging the effectiveness of the model according to the accuracy and selecting the optimal parameters:
TP (True positive) is true positive, which means that the actual class is positive, and the algorithm output class is also positive; FP (False positive) is false positive, indicating that the actual class is negative and the sample output class is positive; TN (True negative) is true negative, which means that the actual class is negative and the algorithm output class is also negative; FN (False negative) is false negative, indicating that the actual class is positive and the algorithm output class is negative. The closer the Accuracy (Accuracy) is to 1, the higher the model Accuracy. The super parameter θ is set as: the RFB module with max_features=0.2 and decision tree number trees =18 is applied in the modeling of the present invention.
The twin target object model is established by adopting a method for modifying an original Agent, and comprises the following steps:
S31: an initialization stage: the vehicle physical entity is initialized as an Agent, and the attribute of the modified Agent is defined as:
Wherein id represents the unique identification number of the Agent; A velocity vector representing an Agent; pos (t) represents the location of an Agent; h represents the length of the Agent; r represents the width of Agent; p represents the average speed of the Agent; t represents a time step; in the present invention, the shape of the Agent is modified to have a rounded rectangle V01 as shown in fig. 4 in order to fit the vehicle shape.
S32: and (3) interaction stage: each Agent performs information interaction with other agents and environments where the agents are located, and records the current position in a coordinate form;
s33: action stage: each Agent moves according to the driving of the social force model, and continuously updates the position information until the action stops;
S34: and recording and returning the speed change condition of the action on the road section, and judging and returning the road traffic delay condition according to the duty ratio of the agent action low-speed time period in the running time period.
Preferably, the social force model of the modified Agent is:
wherein, (x, y) is the centroid coordinates of the agents, (x 0, y 0) is the centroid coordinates of other agents, and r is the minimum distance from the central coordinates of other agents to the boundary; x and Y are the shortening distances in the X direction and the Y direction, and the shortening distances can simplify Agent into a perfect circle V02 in simulation calculation. Maintaining a force of a historical average speed through the road segment for the Agent; forces brought to other agents, including repulsion, extrusion, friction between agents; For behavior fluctuations, random variations of Agent motion are described, including commutation actions.
According to the characteristics of the twin target object, the twin simulation path model outputs a traffic situation evaluation result based on Bayesian network simulation; according to the characteristics of the twin target object, the twin target object simulation model simulates and outputs a traffic situation evaluation result based on the modified Agent model, and a twin simulation path model is established and trained by adopting a Bayesian network model, and comprises the following steps:
S21: combining the occurrence probability of the feature sample set { A 1,A2……Am } obtained by random forest model learning simulation with the corresponding occurrence period and a sample label to form a feature set sample T with an occurrence probability value, marking the occurrence probability as prior probability, updating the feature sample, correcting all prior probabilities by using a Bayesian formula, and solving posterior probability;
S22: taking relevant parameters of the traffic situation of the road section as nodes, wherein the nodes comprise observable nodes and hidden nodes; wherein the observable nodes comprise the average travel time of the road segments and the relative density of the road segments, which can cause traffic, and the hidden nodes comprise the traffic situation of the road segments and the historical probability of traffic accidents of the road segments;
S23: calculating the probability of traffic delay of the corresponding road section by adopting a Bayesian formula, wherein the Bayesian formula is as follows:
Where P (A|B) is the likelihood of A occurring in the case of B occurring A1, … …, ai is the complete event group, and P (A) is the prior probability or edge probability of A. This is called "a priori" because it does not take into account any factors in aspect B. P (a|b) is a conditional probability of a given that B occurs, and is also referred to as a posterior probability of a due to the value obtained from B. P (b|a) is a conditional probability of B after occurrence of a is known, and is also referred to as a posterior probability of B due to the value obtained from a. P (B) is the a priori probability or edge probability of B, also called normalization constant.
S24: and forming a Bayesian network for estimating the road traffic delay condition, and outputting a result, wherein fig. 3 is a Bayesian network pictorial intention generated by the invention.
The bayesian network constructed in this embodiment has the following nodes: peak period G1, peak period duty ratio G2, weather G3, road length G4, road width G6, vehicle density H1, average vehicle speed H2, road condition K.
Taking the result output by the Bayesian network of S24 as a target for the result obtained by the simulation of the twin target object model to carry out the comprehensive comment of the countermeasure learning, establishing a countermeasure learning model,
The method comprises the following steps of evaluating results output by a twin object model by adopting the results output by a twin simulation path model closest to the actual situation, and evaluating the results according to a comprehensive evaluation method, wherein the comprehensive evaluation method comprises the following steps of:
S41: generating a loss function gloss, wherein the formula is as follows:
loss=ganWeight×ganLoss+modelWeight×modelLoss;
wherein GANWEIGHT is the weight of the counterdamage function ganLoss, and the value is 0-30; modelWeight is the weight of a loss function modelLoss of the difference value between the output result of the twin object model and the output result of the twin simulation path model, and the value is 0-50;
modelLoss represents the difference between the output result of the twin object model and the output result of the twin simulation path model, and the calculation formula is as follows:
the RP ij represents the output result of the twin target object model, the QP ij represents the output result of the twin simulation path model, and the two results are represented in a two-dimensional matrix mode;
s42: generating ganLoss is a counterdamage function, and the formula is:
Wherein, P model is a probability matrix which is completely consistent with the result output by the twin target object model and the result output by the twin simulation path model by the countermeasure learning model when the countermeasure learning is performed, and the matrix is a two-dimensional matrix which accommodates P model values of different roads in different time periods; EPCG is the dimensional stability factor at gradient descent, EPCG takes a value in the interval [10 -4,10-11 ] by pseudo-random means using a pseudo-random function in the simulation.
S43: and a discrimination formula is adopted to discriminate the function at any time, the smaller the loss function is, the more accurate the simulation result is, wherein the discrimination formula is as follows:
Wherein, The probability matrix is the expected probability, namely the probability matrix that the actual situation is consistent with the result output by the twin target object model.
The overall process of building the models described above can be summarized in the following stages:
the first stage: and obtaining a twin target object characteristic model by a random forest method.
And a second stage: establishing a twin simulation path model based on a Bayesian network to simulate and output a traffic situation assessment result according to the twin target object characteristic model; and establishing a twin target object simulation model based on the modified Agent model according to the twin target object characteristic model to simulate and output a traffic situation evaluation result.
And a third stage: based on the actual traffic situation, the twin simulation path model and the twin target object simulation model perform countermeasure learning, the importance of the twin target object feature model is corrected, the simulation is more close to the actual traffic situation, and the building of the core comment loss function is as follows:
fourth stage: and selecting a model with the minimum loss function, carrying out traffic situation simulation, and outputting a result.
And the data output sub-module is used for sending the road traffic situation assessment result to the communication module and the visualization module.
The part of the core model submodule of the calculation analysis module is a small-sized calculation unit (a microcomputer or other calculation units with similar functions), the part stores a digital twin-based highway traffic situation assessment simulation model, and after data are read and preprocessing is executed, the digital twin-based highway traffic situation assessment simulation model is called, so that the traffic situation is simulated in real time, and the method is quite accurate and efficient. The method comprises the steps of reading a target object and data of an environment where the target object is located through a data reading submodule, transmitting the data to a data preprocessing submodule, preprocessing the data by the data preprocessing submodule, transmitting the data to a core model submodule, correcting the data after preprocessing through the core model submodule, establishing a twin simulation path model and a twin target object simulation model, performing self-optimization based on an anti-learning method, selecting an optimal model for simulation evaluation, generating an evaluation result, transmitting the result to a data output submodule, converting the data into a format suitable for the data visualization by the data output submodule, transmitting the data to the data visualization module, and completing a working closed loop of a calculation analysis module.
The calculation analysis module has universality, and can adopt the same strategy to call a highway traffic situation evaluation simulation model based on digital twinning aiming at different target objects (including various types of vehicles), so that the simulation method is ensured to be suitable for completing various tasks.
The digital twinning-based highway traffic situation assessment simulation model in the calculation analysis module is formed by constructing an advanced agent framework based on a widely accepted agent modeling platform Anylogic, adjusting detailed numerical values (such as model layer numbers, unit numbers and the like), and performing countermeasure learning and optimization on the obtained target object simulation model with good efficiency and a twinning simulation path model constructed based on a Tensorflow platform.
The software portion of the computational analysis module includes: the data reading program reads the related data of the target object and the related data of the road section where the target object is located from the information extraction module; the data preprocessing program performs necessary preprocessing such as interception, format conversion and the like, and then transmits data to the core model unit; the data output program transmits the simulation result of the core model unit to the visualization module and the communication module.
As an implementation mode, the signal transmission mode of the communication module can be selected as a common WIFI or Bluetooth transmission mode, and the two modes have large information transmission quantity and high speed.
As a rule, the traffic situation assessment simulation result sent by the calculation and analysis module is subjected to data conversion to become information which can be displayed on an electronic screen, the traffic situation assessment simulation result is displayed in real time in a color, number, curve or graph mode, and the results are displayed in a form of video data or picture data.
And providing hardware carrier and capability support for traffic situation assessment simulation through a data extraction module, a calculation analysis module, a communication module, a visualization module and an additional module, and performing real-time data acquisition and storage simulation.
In a specific evaluation model, as shown in fig. 5, the target object is a running vehicle in a certain road section, and the environment where the target object is located is shown in the figure. In the embodiment of the invention, the information extraction module extracts a series of data such as the length, the width, the average speed and the like of the target object, and a series of data such as the length, the width, the weather, the peak time period duty ratio and the like of the road section where the target object is positioned, and generates a data packet as the basis of subsequent modeling.
While the information extraction module extracts data, the calculation and analysis module is activated, and the data of the sensing information extraction module is continuously read through anylogic platform programs, necessary preprocessing is carried out, and the data are provided for a core prediction model in the calculation and analysis module. As shown in fig. 5, the core prediction model firstly performs screening of important feature attributes through a random forest model, forms an important feature data set, simultaneously establishes a twin simulation path model and a twin object simulation model, wherein W01 is a feasible road section, E01 is a driving vehicle, performs antagonism learning through the twin simulation path model and the twin object simulation model, and continuously and preferably obtains the model after correcting the importance of the twin object features. After multiple simulation countermeasures, selecting an optimal model for simulation evaluation to obtain a predicted dynamic traffic situation map. The number of vehicles, the positions where the vehicles exist, and the flow direction of the vehicles synchronously reflect traffic situations.
When the calculation analysis module predicts and gives the result in real time, the built-in java program can transmit the result to the communication module and the visualization module at the same time, and the communication module can directly transmit the evacuation simulation result to the appointed server according to a preset instruction.
The information extraction module is used for obtaining information of a target object, the calculation and analysis module is used for providing resource (calculation force) support for analysis, the communication module is used for providing result transmission capability, and the visualization module is used for providing a result display platform. The device can accurately predict the traffic situation assessment situation of the target road section in real time, continuously update the result along with the evolution of the scene, and has important significance for the works such as traffic situation prediction and control.
The method comprises the steps of extracting a target object and data information of a space where the target object is located through an extracting module, reading and preprocessing the target object and the data information of the space where the target object is located through a calculating and analyzing module, performing simulation analysis on the preprocessed target object and the data information of the space where the target object is located through a digital twin model, generating a road condition assessment result, sending the road condition assessment result to a pre-receiving end through a communication module, and visualizing the road condition assessment result through a visualizing module. The method is accurate and efficient, can continuously update the result along with the evolution of the scene, is obviously superior to the traditional traffic situation assessment method, and has great significance for the prediction, control and scheduling of traffic events and the planning of traffic road networks.

Claims (3)

1. A highway traffic situation simulation method based on digital twinning is characterized by comprising the following steps:
s001: the calculation analysis module acquires the information of the target object and the information of the space where the target object is located through the information extraction module;
S002: reading and preprocessing the characteristic information of the twin target object, modeling by a modeling method based on digital twin, completing model self-optimization, selecting an optimal model for simulation, and generating a highway situation assessment result;
s003: the highway situation assessment result is sent to a preset receiving end through a communication module;
s004: carrying out visual conversion on the highway situation assessment result, and generating visual video data on a visual module in a high-frame-rate video mode;
In S002, the model set by the modeling method based on digital twin includes a twin object feature model, a twin object model, and a twin simulation path model;
The twin target object model is established by adopting a method for modifying an original Agent, and comprises the following steps,
S31: an initialization stage: the vehicle physical entity is initialized as an Agent, and the attribute of the Agent is defined as:
Wherein id represents the unique identification number of the Agent; A velocity vector representing an Agent; pos (t) represents the location of an Agent; h represents the length of the Agent; r represents the width of Agent; p represents the average speed of the Agent; t represents a time step;
S32: and (3) interaction stage: each Agent performs information interaction with other agents and environments where the agents are located, and records the current position in a coordinate form;
s33: action stage: each Agent moves according to the driving of the social force model, and continuously updates the position information until the action stops;
S34: recording and returning the speed change condition of the action on the road section, and judging and returning the road traffic delay condition according to the duty ratio of the agent action low-speed time period in the running time period;
The twin simulation path model is established and trained by adopting a Bayesian network model, comprising the following steps,
S21: combining the occurrence probability of the feature sample set { A 1,A2……Am } obtained by random forest model learning simulation with the corresponding occurrence period and a sample label to form a feature set sample T with an occurrence probability value, marking the occurrence probability as prior probability, updating the feature sample, correcting all prior probabilities by using a Bayesian formula, and solving posterior probability;
S22: taking relevant parameters of the traffic situation of the road section as nodes, wherein the nodes comprise observable nodes and hidden nodes; wherein the observable nodes comprise the average travel time of the road segments and the relative density of the road segments, which can cause traffic, and the hidden nodes comprise the traffic situation of the road segments and the historical probability of traffic accidents of the road segments;
S23: calculating the probability of traffic delay of the corresponding road section by adopting a Bayesian formula, wherein the Bayesian formula is as follows:
where P (A|B) is the likelihood of A occurring in the case of B occurring, A1, … …, ai are the complete event group, P (A) is the prior probability or edge probability of A, P (A|B) is the conditional probability of A after the occurrence of B is known, P (B|A) is the conditional probability of B after the occurrence of A is known, P (B) is the prior probability or edge probability of B;
S24: forming a Bayesian network for estimating road traffic delay condition, and outputting a result;
Taking the result output by the Bayesian network of S24 as a target for the result obtained by the simulation of the twin target object model to carry out the comprehensive comment of the countermeasure learning, establishing a countermeasure learning model,
The results output by the twin simulation path model are adopted to comment the results output by the twin target object model, the results are evaluated according to a comprehensive evaluation method, the comprehensive evaluation method comprises the following steps,
S41: generating a loss function gloss, wherein the formula is as follows:
loss=ganWeight×ganLoss+modelWeight×modelLoss;
wherein GANWEIGHT is the weight of the counterdamage function ganLoss, and the value is 0-30; modelWeight is the weight of a loss function modelLoss of the difference value between the output result of the twin object model and the output result of the twin simulation path model, and the value is 0-50;
modelLoss represents the difference between the output result of the twin object model and the output result of the twin simulation path model, and the calculation formula is as follows:
the RP ij represents the output result of the twin target object model, the QP ij represents the output result of the twin simulation path model, and the two results are represented in a two-dimensional matrix mode;
s42: generating ganLoss is a counterdamage function, and the formula is:
When Pmodel is countermeasure learning, the countermeasure learning model considers that the result output by the twin target object model is completely consistent with the result output by the twin simulation path model, and the matrix is a two-dimensional matrix which accommodates Pmodel values of different roads in different time periods; EPCG is a dimension stability factor when gradient is reduced, EPCG adopts a pseudo-random function to take a value in a [10 -4,10-11 ] interval in a pseudo-random mode in simulation;
s43: and a discrimination formula is adopted to discriminate the function at any time, the smaller the loss function is, the more accurate the simulation result is, wherein the discrimination formula is as follows:
Wherein, The probability matrix is the expected probability, namely the probability matrix that the actual situation is consistent with the result output by the twin target object model.
2. The digital twinning-based highway traffic situation simulation method according to claim 1, wherein: the twin target object feature model is built by adopting a random forest modeling method, comprising the following steps,
S101, a calculation and analysis module acquires noise reduction of traffic road conditions and fused road characteristic data through an information extraction module;
S102: the calculation analysis module reads and preprocesses the noise-reduced and fused road characteristic data of the traffic road conditions, and models and analyzes the preprocessed noise-reduced and fused road characteristic data through a random forest model to generate an importance sorting result;
S103, a calculation and analysis module provides road feature data with importance lower than 5%, and outputs a feature result of the twin target object;
And S104, storing the obtained twin object characteristic result as a data set in a matrix form to form a twin object characteristic model.
3. The digital twinning-based highway traffic situation simulation method according to claim 2, wherein: in S102, the modeling analysis of the random forest model includes the steps of,
S11: dividing the total number M of trees in the forest into 4 parts averagely and dividing the parts into each process for sharing, creating M/4 decision trees by each process, and returning the created M/4 decision trees to the main process in a list form;
s12: after the main process obtains the decision tree lists of 4 sub-processes, integrating the 4 sub-lists into a decision tree list L with the length of M;
S13: generating a training set for each decision tree, randomly extracting n samples from the repeated repetition which is put back in the original training sample set by using a bootstrap aggregating method in bagging to serve as a group of training sets;
S14: constructing a single decision tree, randomly extracting m features from the features of each sample, dividing the m features into a sample set B by using a feature-based mode to calculate a radix index, and dividing the sample set into a sample set D1 equal to a specified feature and a sample set B2 not equal to a given feature, wherein the steps are as follows:
Wherein A is the current feature, then find out the minimum division A of the base's index from all Gini (B, ai), use feature A as splitting feature, repeat this step and obtain the decision tree;
S15: each process repeatedly constructs M/3 decision trees according to the step S13 and the step S14, integrates the M/3 decision trees to form a random forest, and the last leaf node of each decision tree is the characteristic with the greatest influence on network safety to form a characteristic set A1, A2 … … Am;
s16: judging the effectiveness of the model according to the accuracy and selecting the optimal parameters:
Wherein TP is true positive, which means that the actual class is positive, and the algorithm output class is also positive; FP is false positive, indicating that the actual class is negative and the sample output class is positive; TN is true negative, meaning that the actual class is negative and the algorithm output class is also negative; FN is false negative, which means that the actual class is positive and the algorithm output class is negative; the super parameter θ is set as: max_features=0.2, decision tree number trees =18.
CN202210099127.8A 2022-01-25 2022-01-25 Highway traffic situation simulation method based on digital twinning Active CN114519302B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210099127.8A CN114519302B (en) 2022-01-25 2022-01-25 Highway traffic situation simulation method based on digital twinning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210099127.8A CN114519302B (en) 2022-01-25 2022-01-25 Highway traffic situation simulation method based on digital twinning

Publications (2)

Publication Number Publication Date
CN114519302A CN114519302A (en) 2022-05-20
CN114519302B true CN114519302B (en) 2024-06-28

Family

ID=81596143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210099127.8A Active CN114519302B (en) 2022-01-25 2022-01-25 Highway traffic situation simulation method based on digital twinning

Country Status (1)

Country Link
CN (1) CN114519302B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114943304B (en) * 2022-06-17 2023-04-07 广东工业大学 Bayesian-based 3C electronic product assembly error transfer method
CN115481531B (en) * 2022-09-06 2023-07-11 苏州大学 SUMO-based road network traffic flow real-time twin method and system
CN115718466B (en) * 2022-11-21 2024-05-14 广东工业大学 Digital twin workshop fault prediction method based on random forest and analytic hierarchy process
CN115952692B (en) * 2023-03-10 2023-05-30 腾讯科技(深圳)有限公司 Road traffic simulation method and device, storage medium and electronic equipment
CN117057656B (en) * 2023-08-17 2024-05-31 广东飞翔云计算有限公司 Digital twinning-based smart city management method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191683A (en) * 2019-12-13 2020-05-22 南京邮电大学 Network security situation assessment method based on random forest and Bayesian network
CN112837344A (en) * 2019-12-18 2021-05-25 沈阳理工大学 Target tracking method for generating twin network based on conditional confrontation

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2020100709A4 (en) * 2020-05-05 2020-06-11 Bao, Yuhang Mr A method of prediction model based on random forest algorithm
CN113704956A (en) * 2021-06-15 2021-11-26 深圳市综合交通设计研究院有限公司 Urban road online microscopic simulation method and system based on digital twin technology

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191683A (en) * 2019-12-13 2020-05-22 南京邮电大学 Network security situation assessment method based on random forest and Bayesian network
CN112837344A (en) * 2019-12-18 2021-05-25 沈阳理工大学 Target tracking method for generating twin network based on conditional confrontation

Also Published As

Publication number Publication date
CN114519302A (en) 2022-05-20

Similar Documents

Publication Publication Date Title
CN114519302B (en) Highway traffic situation simulation method based on digital twinning
CN112561146B (en) Large-scale real-time traffic flow prediction method based on fuzzy logic and depth LSTM
CN111061277B (en) Unmanned vehicle global path planning method and device
CN109508360B (en) Geographical multivariate stream data space-time autocorrelation analysis method based on cellular automaton
CN111339818B (en) Face multi-attribute recognition system
CN104573706A (en) Object identification method and system thereof
CN106815563B (en) Human body apparent structure-based crowd quantity prediction method
CN113852432B (en) Spectrum Prediction Sensing Method Based on RCS-GRU Model
CN110889450A (en) Method and device for super-parameter tuning and model building
CN115617882B (en) GAN-based time sequence diagram data generation method and system with structural constraint
CN113762595A (en) Traffic time prediction model training method, traffic time prediction method and equipment
Dai et al. Spatio-temporal deep learning framework for traffic speed forecasting in IoT
CN109472030A (en) A kind of system replys the evaluation method and device of quality
CN108985455A (en) A kind of computer application neural net prediction method and system
CN115187772A (en) Training method, device and equipment of target detection network and target detection method, device and equipment
EP4227858A1 (en) Method for determining neural network structure and apparatus thereof
CN115099328A (en) Traffic flow prediction method, system, device and storage medium based on countermeasure network
CN116823572B (en) Population flow data acquisition method and device and computer readable storage medium
CN113705293A (en) Image scene recognition method, device, equipment and readable storage medium
CN115691140B (en) Analysis and prediction method for space-time distribution of automobile charging demand
KR102014288B1 (en) Development pressure prediction method based on artificial intelligence using drone
CN115981302A (en) Vehicle following lane change behavior decision-making method and device and electronic equipment
CN114462225A (en) Rapid construction system for hybrid traffic simulation supporting environment under vehicle-road cooperation
CN115659253A (en) Underwater target identification method based on multi-dimensional model fusion
Jenifer et al. Improved Mayfly Optimization and LightGBM Classifier for Smart City Traffic Prediction

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant