Macro-micro simulation consistency driving parameter collaborative calibration online calibration method and device

CN123033360APending Publication Date: 2026-11-03BEIJING JIAOYAN SMART TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611201669.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-10
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

[0003]本申请的至少一个实施例提供了一种宏微观仿真一致性驾驶参数协同标定在线校准方法和装置,用于解决现有交通仿真方案中存在的收敛效果差、评价维度单一、宏微观缺乏层间协同的问题

Benefits of technology

[0017]与现有技术相比,本申请实施例提供的宏微观仿真一致性驾驶参数协同标定在线校准方法和装置,将宏观数据与微观数据分别经预设编码器映射至共享潜空间,得到宏观潜空间向量与微观潜空间向量;构建融合数据驱动对齐、交通流物理约束及宏观统计一致性损失的联合损失函数,训练跨尺度参数对齐网络;识别交通流相态并融合相态对齐函数,输出以宏观状态为条件的候选微观参数分布;执行由宏观解码至微观、再经仿真聚合还原至宏观的循环一致性校验,筛选得到满足物理机理与统计规律约束的参数一致性可行域;输入实时宏观观测数据生成微观参数候选域,以多目标优化求解最优微观参数,经聚合偏差与稳定性校验,自适应调整参数更新步长并累积校准宏观参数,解决现有交通仿真收敛效果差、评价维度单一、宏微观缺乏协同的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123033360A_ABST
    Figure CN123033360A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a macro-micro simulation consistency driving parameter collaborative calibration online calibration method and device, and relates to the technical field of traffic simulation. The method comprises the following steps: macroscopic data and microscopic data are respectively mapped by a preset encoder to obtain a macroscopic latent space vector and a microscopic latent space vector, a joint loss function is constructed by fusing data-driven alignment, traffic flow physical constraints and macroscopic statistical consistency, and a cross-scale parameter alignment network is trained; a candidate microscopic parameter distribution is output by identifying the phase state of the traffic flow; a loop consistency check is performed on the candidate microscopic parameter distribution to determine a parameter consistency feasible region; real-time macroscopic observation data are input to generate a microscopic parameter candidate domain, and the optimal microscopic parameter is solved by multi-objective optimization; and after the aggregation deviation and stability check, the parameter update step is adaptively adjusted and the macroscopic parameter is accumulated and calibrated, so that the problems of poor convergence effect, single evaluation dimension and lack of macro-micro coordination of the existing traffic simulation are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of traffic simulation technology, specifically to an online calibration method and device for co-calibrating driving parameters for macro- and micro-simulation consistency. Background Technology

[0002] Traffic simulation is categorized into three levels based on modeling granularity: macroscopic (e.g., road segment flow, density, speed, fluid dynamics equations), mesoscopic (e.g., vehicle groups, agents), and microscopic (e.g., single-vehicle following, lane changing). In practical engineering, fixed detectors, video cross-sections, or road network operation platforms more easily and stably obtain macroscopic statistics, such as road segment speed, flow, and density. However, microscopic simulation truly requires driving behavior parameters such as desired speed, safe headway, maximum acceleration, minimum headway, and lane-changing tendency. Since the same set of macroscopic speed, flow, and density may correspond to multiple combinations of microscopic driving behaviors, the inversion from macroscopic statistics to microscopic behavioral parameters is a problem with multiple solutions and constraints. Current microscopic simulations often rely on calibrating parameters for a single data type within a single scenario, emphasizing individual behavior while neglecting vehicle interaction, and lacking systematic evaluation indicators. Effective methods for information exchange and integration between different scales are lacking, making it difficult to select the microscopic driving behavior solution that best approximates real traffic operation while maintaining consistency in macroscopic statistical standards. To address the issues related to macro-micro fusion simulation and parameter calibration in traffic simulation, some targeted solutions have emerged in existing technologies. However, all these solutions have significant technical shortcomings and cannot fully overcome the aforementioned industry pain points: In one existing technical solution, a multi-objective solution model for macro-micro integrated calibration is constructed to achieve joint macro-micro parameter calibration. However, the convergence speed and optimization effect of the optimization algorithm in this solution are not ideal, and it is a deterministic one-to-one mapping. In another existing technical solution, a macro-micro simulation evaluation system is built based on parameter self-tuning technology, which improves the simulation effect evaluation process to some extent. However, the evaluation index designed in this solution has a single dimension and insufficient coverage of the evaluation method, which cannot achieve a full-dimensional and systematic simulation quality evaluation, and the evaluation results have limited reference value. In yet another existing technical solution, a serial mode of macro-calibration followed by independent micro-calibration is adopted, with unconstrained inter-layer transfer and collaborative correction. Summary of the Invention

[0003] At least one embodiment of this application provides an online calibration method and apparatus for coordinating driving parameters for macro-micro simulation consistency, which is used to solve the problems of poor convergence effect, single evaluation dimension, and lack of inter-layer coordination between macro and micro levels in existing traffic simulation schemes.

[0004] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide an online calibration method for collaborative calibration of macro- and micro-simulation consistent driving parameters, including: Macroscopic data containing flow rate, speed, density and basic graph parameters, and microscopic data containing historical microscopic driving parameter samples are respectively input into a preset encoder and mapped to the same shared latent space to obtain macroscopic latent space vectors and microscopic latent space vectors. Based on the macroscopic latent space vector and the microscopic latent space vector, a joint loss function is constructed that integrates data-driven alignment loss, traffic flow physical constraint loss and macroscopic statistical consistency loss. A cross-scale parameter alignment network is then trained based on the joint loss function. Based on the cross-scale parameter alignment network, the phase state of traffic flow is identified and the phase state weight is calculated. The micro-alignment functions corresponding to each phase state are fused, and the candidate micro-parameter distribution with macro-state as the condition is output. Based on the micro parameters obtained by sampling the candidate micro parameter distribution, perform a cyclic consistency check from macro to micro decoding and from micro simulation aggregation to macro to determine the feasible domain of parameter consistency. Real-time macroscopic traffic observation data is acquired and input into the cross-scale parameter alignment network to generate a candidate domain of microscopic parameters at the current moment under the constraint of the parameter consistency feasible domain. Based on the candidate domain of micro parameters, an objective function is constructed, and the optimal micro driving behavior parameter solution is output using the objective function. The optimal micro driving behavior parameter solution is then subjected to micro simulation aggregation deviation verification. The stability of the simulation aggregation results is verified for the parameter solutions that have passed the verification. The parameter update step size is adaptively adjusted according to the sensitivity of each parameter to the simulation output index. At the same time, cross-cycle cumulative calibration is performed on the macroscopic basic graph parameters to obtain the calibrated microscopic parameter set.

[0005] Optionally, based on the macroscopic latent space vector and the microscopic latent space vector, a joint loss function is constructed that integrates data-driven alignment loss, traffic flow physical constraint loss, and macroscopic statistical consistency loss. A cross-scale parameter alignment network is trained based on the joint loss function, including: Based on the macroscopic latent space vector and the microscopic latent space vector, a data-driven alignment loss is constructed; the data-driven alignment loss is used to characterize the degree of matching and fitting between macroscopic and microscopic data. A multi-dimensional traffic flow physical constraint loss is constructed. This loss includes violations of traffic flow conservation constraints, vehicle following behavior constraints, and traffic fundamental map boundary condition constraints. Specifically, the traffic flow conservation constraints ensure that the flow rate, density, and spatial average speed obtained from the macroscopic latent space vector decoding satisfy the traffic flow conservation law. The vehicle following behavior constraints, based on a preset vehicle following model, ensure that the steady-state flow rate-density relationship derived from microscopic driving parameters is consistent with the macroscopic traffic fundamental map law. The fundamental map boundary condition constraints ensure that the speed and flow rate boundary characteristics under extreme traffic conditions (zero density, congestion density, critical density) conform to traffic flow patterns. The microscopic latent space vector is decoded and mapped to generate microscopic driving parameters. The microscopic driving parameters are then input into the microscopic simulation module, and the simulation output results are aggregated to obtain the macroscopic simulation results. The microscopic driving parameters include at least the desired speed, safe time distance, and maximum acceleration. A macroscopic statistical consistency loss is constructed; the macroscopic statistical consistency loss is used to constrain the degree of deviation between the simulated macroscopic results and the real macroscopic data. The data-driven alignment loss, various traffic flow physical constraint losses, and macro-statistical consistency loss are each configured with preset penalty weights and then weighted and fused to obtain the joint loss function. With minimizing the joint loss function as the optimization objective, the network parameters are iteratively updated to train a cross-scale parameter alignment network that simultaneously satisfies the historical data fitting accuracy, traffic physics constraints, and macroscopic statistical consistency.

[0006] Optionally, the traffic flow phase is identified and the corresponding micro-alignment functions for different phases are fused to determine the distribution of candidate micro-parameters, including: The macroscopic traffic data to be mapped is input into the trained cross-scale parameter alignment network to obtain a shared latent space representation. Based on the macroscopic velocity and density in the shared potential space representation, identify the target phase of the current traffic flow; Based on the distance between the target phase state and the preset boundaries of free flow, synchronous flow and congested flow phase states, calculate the non-negative normalized fusion weight corresponding to each phase state; According to the non-negative normalized fusion weight, the predefined micro-alignment functions of each phase state are weighted and fused to obtain the phase state adaptive global alignment function. Based on the shared latent space representation and the global alignment function, the candidate microscopic parameter distribution is output.

[0007] Optionally, based on the micro-parameters obtained by sampling the candidate micro-parameter distribution, a cyclic consistency check is performed from macro to micro decoding and from micro simulation aggregation to macro to determine the feasible domain of parameter consistency, including: Obtain the original macroscopic traffic state, and based on the microscopic parameters sampled from the candidate microscopic parameter distribution, perform macroscopic-to-microscopic decoding from the original macroscopic traffic state to the microscopic parameters; Based on the micro parameters obtained by sampling the candidate micro parameter distribution, the micro parameters are input into the pre-constructed micro simulation module for simulation and deduction. The simulation output results are aggregated and statistically analyzed to restore the simulation macroscopic statistical state. Obtain the original macroscopic traffic state, compare the simulated macroscopic statistical state with the original macroscopic traffic state, and calculate the cyclic consistency error; If the cycle consistency error exceeds a preset cycle error threshold, an alignment correction mechanism is triggered to update the shared latent space representation until the error converges. Set the traffic flow conservation constraint deviation threshold, vehicle following behavior constraint deviation threshold, basic graph boundary condition constraint deviation threshold, macroscopic statistical consistency error threshold, and distribution dispersion interval; Parameter samples that simultaneously satisfy the conservation constraint deviation, car-following behavior constraint deviation, boundary condition constraint deviation, and macroscopic statistical error all within the corresponding threshold range, and whose parameter distribution dispersion is located within the specified dispersion interval, are identified as the parameter consistency feasible region.

[0008] Optionally, real-time macroscopic traffic observation data is acquired and input into the cross-scale parameter alignment network to generate a candidate domain of microscopic parameters at the current time under the parameter consistency feasible region constraint, including: Obtain real-time macroscopic traffic observation data; The real-time macroscopic traffic observation data is input into the cross-scale parameter alignment network to generate a candidate distribution of target microscopic parameters corresponding to the real-time macroscopic traffic observation data; Centered on the mean of the target micro-parameter candidate distribution, and combined with the preset range coefficient and distribution standard deviation, the parameter value range is determined. The intersection of the parameter value range and the parameter consistency feasible region is taken to generate the micro-parameter candidate domain at the current time.

[0009] Optionally, based on the candidate domain of micro-parameters, an objective function is constructed, and the optimal micro-driving behavior parameter solution is output using the objective function. The optimal micro-driving behavior parameter solution is then subjected to micro-simulation aggregation deviation verification, including: Within the candidate domain of micro parameters, a joint optimization objective function is constructed using macro statistical consistency error, micro trajectory likelihood error, phase behavior prior error, and parameter smoothing error. The objective function is then solved to obtain the optimal micro driving behavior parameter solution. The optimal microscopic driving behavior parameter solution is input into the microscopic simulation system, and the output results are aggregated and statistically analyzed to generate a simulated macroscopic traffic state. Calculate the co-occurrence deviation between the simulated macroscopic traffic conditions and the real-time macroscopic observation data; If the collaborative deviation exceeds the preset collaborative deviation threshold, the boundary shrinkage of the candidate domain of the micro parameters or the reassignment of the weight coefficients of each error in the objective function is triggered. Based on the adjusted candidate domain or weight coefficients, the parameters are solved again, and the micro simulation aggregation and collaborative deviation calculation are re-executed until the collaborative deviation meets the requirements of the preset collaborative deviation threshold. For the optimal micro-driving behavior parameter solution that meets the preset collaborative deviation threshold after verification and correction, perform micro-simulation aggregation deviation verification.

[0010] Optionally, the stability of the simulation aggregation results is verified for the validated parameter solutions. The parameter update step size is adaptively adjusted according to the sensitivity of each parameter to the simulation output index. At the same time, cross-cycle cumulative calibration is performed on the macroscopic basic graph parameters to obtain the calibrated microscopic parameter set, including: Substitute the verified parameter solution into the current microscopic simulation window and run it. Calculate the deviation between the macroscopic result of the simulation aggregation output and the current macroscopic observation result. If the deviation meets the preset convergence threshold, the stability verification is determined to be successful. Calculate the normalized sensitivity of each micro-parameter to be calibrated to the simulation output index, and perform inverse adaptive adjustment based on the update step size corresponding to the normalized sensitivity; The macroscopic basic graph parameters are grouped according to link type. The ratio of the observed value to the simulated value of each link in the group is calculated as the single link calibration factor. The geometric mean of the single link calibration factors in the group is taken to obtain the group-level calibration factor. Based on the group-level calibration factor, the macroscopic basic graph parameters are updated in multiple rounds. The update results of the macroscopic basic graph parameters are then pruned using preset single-round update intervals and cross-round cumulative intervals to obtain the updated macroscopic basic graph parameters. The abnormal detection data and abnormal trajectory data input in real time are isolated and removed to eliminate their interference with the current parameter update; Based on the observation results after removing outlier data, the adjusted parameter update step size, and the updated macroscopic basic graph parameters, the current microscopic parameter set is finally updated to obtain the calibrated microscopic parameter set.

[0011] Optionally, after obtaining the calibrated set of micro parameters, the method further includes: Obtain the current macroscopic observation statistical state, and the equivalent macroscopic statistical state obtained by aggregating the calibrated microscopic parameter set through microscopic simulation; Calculate the residual total deviation between the macroscopic observation statistical state and the equivalent macroscopic statistical state; The residual total deviation is decomposed into four types of deviation components: parameter deviation, aggregated sampling deviation, random fluctuation, and structural difference. Each of the aforementioned deviation components is quantified and estimated, and corresponding processing instructions are generated based on the threshold determination results of each deviation component.

[0012] Optionally, each of the aforementioned deviation components is quantified and estimated, and corresponding processing instructions are generated based on the threshold determination results of each deviation component, including: Based on the residual total deviation, multiple repeated simulations are performed, and the random fluctuation component is obtained by quantifying the aggregated flow in each simulation. Calculate the difference between the mean aggregated traffic in the current aggregation window and the extended reference window, and combine the standard deviation of the traffic samples in the current window with the number of valid samples to calculate the aggregation sampling bias component; Call the offline fitted density-related structural difference compensation function and calculate the structural difference components in combination with the current density value; The parameter deviation component is obtained by subtracting the random fluctuation component, the aggregated sampling deviation component, and the structural difference component from the residual total deviation. When the parameter deviation component exceeds a preset threshold, a parameter callback correction instruction is generated; when the aggregated sampling deviation component exceeds a preset threshold, an aggregated statistical window expansion instruction is generated; the structural difference component is corrected online through the compensation function without triggering micro-parameter adjustment; the random fluctuation component is determined as an acceptable error and no parameter adjustment instruction is generated.

[0013] Optionally, the method further includes: The calibrated set of micro parameters is aggregated and restored to the simulated macroscopic statistical state, and a reverse consistency check is performed on the simulated macroscopic statistical state using a preset macroscopic model. If the reverse verification deviation exceeds a preset threshold, it is determined that the offline mapping of the cross-scale parameter alignment network is not suitable for the current scenario, and a mapping retraining prompt is output.

[0014] Secondly, embodiments of this application provide an online calibration device for collaborative calibration of macro- and micro-simulation consistent driving parameters, comprising: The first processing module is used to input macroscopic data containing flow rate, speed, density and basic map parameters, and microscopic data containing historical microscopic driving parameter samples into a preset encoder and map them to the same shared latent space to obtain macroscopic latent space vectors and microscopic latent space vectors. The second processing module is used to construct a joint loss function based on the macroscopic latent space vector and the microscopic latent space vector, which integrates data-driven alignment loss, traffic flow physical constraint loss and macroscopic statistical consistency loss, and to train a cross-scale parameter alignment network based on the joint loss function. The third processing module is used to identify the phase state of traffic flow and calculate the phase state weight based on the cross-scale parameter alignment network, fuse the micro-alignment functions corresponding to each phase state, and output the candidate micro-parameter distribution based on the macro-state. The fourth processing module is used to perform a cyclic consistency check from macro to micro decoding and from micro simulation aggregation to macro based on the micro parameters obtained by sampling the candidate micro parameter distribution, and to determine the feasible domain of parameter consistency. The fifth processing module is used to acquire real-time macroscopic traffic observation data and input it into the cross-scale parameter alignment network to generate the microscopic parameter candidate domain at the current time under the parameter consistency feasible domain constraint. The sixth processing module is used to construct an objective function based on the candidate domain of micro parameters, output the optimal micro driving behavior parameter solution using the objective function, and perform micro simulation aggregation deviation verification on the optimal micro driving behavior parameter solution. The seventh processing module is used to perform stability verification of the simulation aggregation results of the verified parameter solutions, adaptively adjust the parameter update step size according to the sensitivity of each parameter to the simulation output index, and perform cross-cycle cumulative calibration on the macroscopic basic graph parameters to obtain the calibrated microscopic parameter set.

[0015] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method as described in any one of the first aspects.

[0016] Fourthly, embodiments of this application provide a computer program product, including computer instructions that, when executed by a processor, implement the steps of the method as described in any one of the first aspects.

[0017] Compared with existing technologies, the online calibration method and apparatus for collaborative calibration of macro- and micro-simulation consistency driving parameters provided in this application maps macro- and micro-data to a shared latent space via a preset encoder, obtaining macro- and micro-latent space vectors; constructs a joint loss function that integrates data-driven alignment, traffic flow physical constraints, and macro-statistical consistency loss, and trains a cross-scale parameter alignment network; identifies traffic flow phases and integrates phase alignment functions, outputting candidate micro-parameter distributions conditioned on macro-states; performs cyclic consistency verification from macro-decoding to micro-level and then back to macro-level through simulation aggregation, filtering to obtain feasible parameter consistency domains that satisfy physical mechanisms and statistical constraints; inputs real-time macro-observation data to generate candidate micro-parameter domains, solves for optimal micro-parameters through multi-objective optimization, and adaptively adjusts the parameter update step size and accumulates calibration of macro-parameters after aggregation deviation and stability verification, thus solving the problems of poor convergence effect, single evaluation dimension, and lack of macro- and micro-level coordination in existing traffic simulations. Attached Figure Description

[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A schematic flowchart illustrating the online calibration method for collaborative calibration of macro- and micro-simulation consistent driving parameters provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of the online calibration device for co-calibrating driving parameters for macro- and micro-simulation consistency provided in this application embodiment. Detailed Implementation

[0019] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, without limiting the number of objects; for example, the first object can be one or more. Furthermore, "or" in this application indicates at least one of the connected objects. For example, "A or B" covers three scenarios: Scenario 1: including A but not B; Scenario 2: including B but not A; Scenario 3: including both A and B. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0020] The term "instruction" in this application can be either a direct instruction (or explicit instruction) or an indirect instruction (or implicit instruction). A direct instruction can be understood as one in which the sender explicitly informs the receiver of specific information, the operation to be performed, or the requested result, etc.; an indirect instruction can be understood as one in which the receiver determines the corresponding information based on the instruction sent by the sender, or makes a judgment and determines the operation to be performed or the requested result, etc., based on the judgment result.

[0021] To enable those skilled in the art to better understand the embodiments of this application, the following description is provided first: Traffic simulation is a core technology based on mathematical models and computer technology to reproduce road traffic operation states and deduce traffic evolution patterns. It is widely used in traffic engineering fields such as road network planning, traffic control, congestion management, and traffic efficiency assessment. Depending on the modeling granularity and the object being described, the industry generally divides traffic simulation into three levels: macroscopic, mesoscopic, and microscopic. Each of these three types of simulation models has its own emphasis in terms of modeling logic and application scenarios.

[0022] Among them, macroscopic traffic simulation takes the entire road segment as the research unit and conducts modeling based on fluid dynamics equations. It mainly outputs macroscopic indicators such as road network traffic flow, traffic density, and average driving speed. Its advantages are high computational efficiency and adaptability to large-scale road network overall situation analysis, but it cannot reflect the operating characteristics of individual vehicles. Mesoscopic traffic simulation is between macroscopic and microscopic, taking vehicle groups and agents as basic modeling units, taking into account both the group operation rules and microscopic vehicle aggregation characteristics. Microscopic traffic simulation takes a single motor vehicle as the smallest unit, focusing on modeling individual driving behaviors such as vehicle following, lane changing, starting, stopping, and avoiding. It can accurately reproduce the dynamic interaction process between vehicles and is the mainstream technology for current refined traffic analysis and microscopic road segment simulation.

[0023] As urban road networks become increasingly complex and traffic management becomes more refined and dynamic, single-scale simulation can no longer meet the needs of practical applications. Macro- and micro-scale fusion simulation has become the mainstream development trend in the industry. The parameter calibration accuracy, multi-scale data linkage capability, and dynamic online calibration level of micro-simulation directly determine the authenticity and usability of traffic simulation results.

[0024] Currently, most mainstream microscopic traffic simulation systems are based on fixed scenarios and single data sources for model parameter calibration. Their modeling approach focuses on depicting the independent driving behavior of a single vehicle, weakening or even ignoring the dynamic interactions between vehicles. Furthermore, the industry has not yet established a unified and systematic evaluation index system for simulation performance. Based on this, existing multi-scale traffic simulation and parameter calibration schemes have revealed several core technical shortcomings, as follows: (1) Insufficient multi-scale information integration capability, making it difficult to guarantee consistency between macro and micro behaviors: Currently, macro simulation and micro simulation are independent of each other, and no effective physical mapping and correlation mechanism has been established between the two types of models. Macro and micro data and operating status cannot achieve bidirectional flow and deep integration. The overall operating law of the macro road network and the micro driving behavior of individual vehicles are separated, making it impossible to accurately reproduce the coordinated and consistent operating status of the road traffic system at both the macro and micro levels, which greatly reduces the credibility of multi-scale simulation results.

[0025] (2) The model parameter calibration method is inefficient and consumes a lot of computing resources: Existing parameter calibration schemes generally use random search algorithms to optimize parameters. The working mode is to repeatedly carry out full microscopic simulation and compare the simulation output data with the measured data to adjust the model parameters step by step. This method has problems such as redundant computational logic and many iterations. Not only is the overall computational complexity high and the equipment storage space occupied, but it also takes a very long time to carry out a single microscopic simulation for a large-scale urban road network, which cannot support the application requirements of rapid simulation and real-time inference.

[0026] (3) The simulation deviation handling method is crude and easily leads to parameter oscillation problems: The existing technology only uniformly counts the overall macro and micro deviations at the simulation output and triggers parameter tuning operations across the entire domain based on the total deviation results, without the ability to trace the source of deviations or classify and identify them. In actual scenarios, some simulation deviations come from the inherent structural differences of the model itself, which are inherent errors that cannot be eliminated by parameter tuning. However, the existing solution still continuously corrects the parameters for such deviations, which ultimately causes the model parameters to fluctuate repeatedly and oscillate continuously, making it difficult to stabilize the simulation state.

[0027] (4) Online parameter calibration is passively delayed, resulting in data distortion throughout the simulation: The mainstream online calibration mechanism is a deviation-driven passive triggering mode, which only starts the parameter update process when the traffic flow undergoes a significant phase change and the simulation results show a significant deviation. During the entire waiting period from the occurrence of the deviation to the convergence of the parameters, the simulation system continues to run with inaccurate old parameters, resulting in the output of erroneous simulation data for a long time, which cannot adapt to the dynamically changing real traffic flow scenario.

[0028] (5) Lack of version management and failure learning mechanism, resulting in poor system fault tolerance: The existing simulation calibration system does not have parameter version management or operation status backtracking function. When parameter calibration fails, it cannot quickly roll back to the historical stable operation state. At the same time, the system cannot collect, analyze and learn from past calibration failure cases, making it difficult to summarize failure patterns. It is very easy for similar problems to occur repeatedly, resulting in low system operation stability and low operation and maintenance efficiency.

[0029] As described in the background section, existing technologies suffer from insufficient information integration across scales, a lack of effective constraints in micro-parameter inversion, and difficulty in coordinating macro-statistical consistency with the realism of micro-behavior, severely reducing the efficiency of parameter calibration and the reliability of simulation results in traffic simulation. To address at least one of these problems, this application provides an online calibration method and apparatus for coordinating macro- and micro-scale simulation consistency driving parameters. This method effectively enhances information mapping and coordinating correction at both macro and micro scales, narrows the feasible domain for inversion solutions, balances macro-statistical consistency with the realism of micro-driving behavior, and improves parameter calibration convergence efficiency and the reliability of simulation results.

[0030] This application provides an online calibration method and apparatus for co-calibrating driving parameters to ensure consistency between macro and micro simulations. The method and apparatus are based on the same concept, and since they address similar problems, their implementations can be mutually referenced; repeated details will not be elaborated further.

[0031] Please refer to Figure 1 This application provides an online calibration method for co-calibrating macro- and micro-scale simulation-consistent driving parameters, comprising: Step 11: Input macroscopic data containing flow rate, speed, density and basic graph parameters, and microscopic data containing historical microscopic driving parameter samples into a preset encoder and map them to the same shared latent space to obtain macroscopic latent space vector and microscopic latent space vector.

[0032] It should be noted that this step first converts the macroscopic data and microscopic parameters into the same comparable expression. This application can obtain historical macroscopic traffic statistics and microscopic driving parameter samples, and then process the macroscopic data and microscopic data through a macroscopic statistical state encoder and a microscopic parameter encoder, respectively, to obtain the corresponding macroscopic latent space vector and microscopic latent space vector.

[0033] It's important to note that macroscopic data includes traffic flow, speed, density, and basic map parameters, while microscopic data includes desired speed, safe headway, maximum acceleration, comfortable deceleration, and minimum headway. These are not originally the same type of quantity; therefore, they are first converted into latent vectors by an encoder, and then compared for matching in the same space. The macroscopic statistical state encoder handles road segment-level statistical data, while the microscopic parametric encoder handles vehicle-level driving behavior parameters. Both convert the input into latent vector representations, rather than directly outputting the final calibration parameters.

[0034] For example, it can be represented by the following expression: ;in, It is a macroscopic statistical state vector. , , These represent flow rate, velocity, and density obtained from macroscopic observations, respectively. For the macroscopic basic graph parameter vector. For free flow velocity, For critical density, For blocking density, Maximum flow rate or throughput capacity; For the parameter vector of the micro-carriage following model, For the desired speed, For safe time interval, For maximum acceleration, For comfortable deceleration, Minimum headway; , For encoder mapping functions, , Its learnable parameters; , These are macroscopic spatial vectors and microscopic latent spatial vectors, respectively. If a specific microscopic simulation model includes a lane-changing module, parameters such as lane-changing tendency can be used as... The extended components are then fed into the same encoder.

[0035] Step 12: Based on the macroscopic latent space vector and the microscopic latent space vector, construct a joint loss function that integrates data-driven alignment loss, traffic flow physical constraint loss and macroscopic statistical consistency loss, and train a cross-scale parameter alignment network based on the joint loss function.

[0036] Here, based on paired macroscopic and microscopic latent space vectors, a joint loss function is constructed that integrates data-driven alignment loss, traffic flow physical constraint loss, and macroscopic statistical consistency loss. Through end-to-end supervised training and gradient backpropagation, the network parameters are iteratively optimized until convergence. This process allows the network to obtain a mapping relationship that conforms to traffic flow conservation laws, car-following model steady-state characteristics, and basic graph boundary conditions, outputting a physically interpretable cross-scale parameter alignment network.

[0037] Step 13: Based on the cross-scale parameter alignment network, identify the phase state of the traffic flow and calculate the phase state weight, fuse the micro-alignment functions corresponding to each phase state, and output the candidate micro-parameter distribution with macro-state as the condition.

[0038] This application inputs the macroscopic traffic data to be mapped into a trained network for inference. Traffic flow phases are identified based on macroscopic speed and density, and non-negative normalized weights are calculated for each phase. A phase-adaptive global alignment function is constructed by weighted fusion of predefined microscopic alignment functions for each phase. Based on the shared latent space representation and this alignment function, a conditional distribution decoder outputs a candidate microscopic parameter distribution conditioned on the macroscopic state, representing the mean and heterogeneity of group driving behavior.

[0039] Step 14: Based on the micro parameters obtained by sampling the candidate micro parameter distribution, perform a cyclic consistency check from macro to micro decoding and from micro simulation aggregation to macro to determine the feasible domain of parameter consistency.

[0040] Sampling is performed from the candidate microscopic parameter distribution, and a cyclic mapping from macroscopic to microscopic decoding and from microscopic simulation to macroscopic is executed. The restored macroscopic statistical state is compared with the original macroscopic input to calculate the cyclic consistency error. Using deviation thresholds from traffic flow conservation constraints, car-following behavior constraints, basic graph boundary constraints, and macroscopic statistical consistency constraints as criteria, combined with the distribution dispersion interval, compliant parameter samples are screened. The set of parameters satisfying all constraints is defined as the parameter consistency feasible region, providing the solution space boundary for online calibration.

[0041] Step 15: Obtain real-time macroscopic traffic observation data and input it into the cross-scale parameter alignment network to generate the microscopic parameter candidate domain at the current time under the parameter consistency feasible domain constraint.

[0042] Real-time macroscopic traffic observation data is acquired and input into a trained cross-scale parameter alignment network. The network outputs an initial microscopic parameter distribution corresponding to the current real-time traffic state. The initial microscopic parameter distribution is truncated and filtered using a pre-determined consistency feasible region as a boundary constraint to eliminate invalid parameter values ​​that exceed the feasible region range, thereby generating a candidate domain of microscopic parameters at the current time, which limits the effective search space for subsequent parameter optimization solutions.

[0043] Step 16: Based on the candidate domain of micro parameters, construct an objective function, and use the objective function to output the optimal micro driving behavior parameter solution, and perform micro simulation aggregation deviation verification on the optimal micro driving behavior parameter solution.

[0044] Within the candidate domain of micro-parameters, an objective function is constructed with macro-statistical consistency, micro-trajectory likelihood, phase behavior prior, and parameter smoothness as joint optimization objectives. The objective function is solved using a multi-objective optimization algorithm to obtain the optimal micro-driving behavior parameter solution. The optimal micro-driving behavior parameter solution is then input into the micro-simulation model for execution. The vehicle operation data output from the simulation is aggregated to obtain macro-level indicators such as flow rate, speed, and density. The aggregated macro-indicators are compared with real-time macro-observation data, and the relative deviation is calculated to complete the micro-simulation aggregation deviation verification.

[0045] Step 17: Perform stability verification of the simulation aggregation results on the parameter solutions that have passed the verification. Adaptively adjust the parameter update step size according to the sensitivity of each parameter to the simulation output index. At the same time, perform cross-cycle cumulative calibration on the macroscopic basic graph parameters to obtain the calibrated microscopic parameter set.

[0046] The stability of the simulation aggregation results is verified by performing a series of repeated simulation runs to calculate the fluctuation of the aggregated macroscopic indicators and verify the output stability of the parameter solutions. The sensitivity of each microscopic driving behavior parameter to the simulation output indicators is determined in advance through sensitivity analysis. Based on this, the update step size of the corresponding parameters is adaptively adjusted. Smaller update step size is used for parameters with higher sensitivity to ensure calibration accuracy, while larger update step size is used for parameters with lower sensitivity to improve convergence speed. At the same time, based on the deviation between the macroscopic observation data accumulated in multiple calibration processes and the simulation aggregation data, cross-cycle cumulative calibration is performed on the macroscopic basic graph parameters to finally obtain the calibrated microscopic parameter set.

[0047] This application focuses on parameter mapping and collaborative calibration at both macro and micro scales in traffic simulation. It divides the process into two stages: offline modeling and online collaborative calibration, achieving stable inversion and dynamic calibration of macro-level traffic statistics into micro-level driving behavior parameters. In the offline stage, a dual-encoder structure maps macro-level traffic statistics and micro-level driving behavior parameters to a unified latent space. A joint loss function integrating data-driven alignment, traffic flow physical constraints, and macro-level statistical consistency is constructed to train a cross-scale parameter alignment network. Combined with a micro-alignment function for traffic flow phase adaptation and bidirectional cyclic consistency verification at both macro and micro levels, the feasible region for micro-level parameter consistency is defined. This narrows the solution space for parameter inversion from the source, eliminating invalid parameter solutions that violate traffic physics and statistical consistency. In the online phase, real-time macroscopic traffic observation data is used as input. Under the constraint of a consistent feasible region, a candidate domain of microscopic parameters is generated. The optimal microscopic driving behavior parameter solution is solved through multi-objective joint optimization of macroscopic statistical consistency, microscopic trajectory likelihood, phase behavior prior, and parameter smoothness. The microscopic simulation aggregation deviation verification and aggregation result stability verification are completed sequentially. At the same time, the update step size is adaptively adjusted based on the sensitivity of each parameter to the simulation output, and the cross-wheel cumulative calibration of macroscopic basic map parameters is performed synchronously. Finally, a stable and reliable calibrated microscopic parameter set is output.

[0048] This method effectively solves the problems of insufficient inter-scale information integration, lack of inversion solution constraints, and difficulty in balancing statistical consistency and behavioral authenticity in existing technologies through a closed-loop mechanism of positive bounding of macro-constraints, reverse correction of micro-evidence, and bidirectional collaborative verification. It improves the authenticity and calibration efficiency of micro-driving behavior parameters while ensuring consistency of macro-statistical standards, and can adapt to the long-term online operation requirements of engineering scenarios such as lane-cell micro-loading simulation.

[0049] In an optional embodiment, step 12 described above includes: Based on the macroscopic latent space vector and the microscopic latent space vector, a data-driven alignment loss is constructed; the data-driven alignment loss is used to characterize the degree of matching and fitting between macroscopic and microscopic data. A multi-dimensional traffic flow physical constraint loss is constructed. This loss includes violations of traffic flow conservation constraints, vehicle following behavior constraints, and traffic fundamental map boundary condition constraints. Specifically, the traffic flow conservation constraints ensure that the flow rate, density, and spatial average speed obtained from the macroscopic latent space vector decoding satisfy the traffic flow conservation law. The vehicle following behavior constraints, based on a preset vehicle following model, ensure that the steady-state flow rate-density relationship derived from microscopic driving parameters is consistent with the macroscopic traffic fundamental map law. The fundamental map boundary condition constraints ensure that the speed and flow rate boundary characteristics under extreme traffic conditions (zero density, congestion density, critical density) conform to traffic flow patterns. The microscopic latent space vector is decoded and mapped to generate microscopic driving parameters. The microscopic driving parameters are then input into the microscopic simulation module, and the simulation output results are aggregated to obtain the macroscopic simulation results. The microscopic driving parameters include at least the desired speed, safe time distance, and maximum acceleration. A macroscopic statistical consistency loss is constructed; the macroscopic statistical consistency loss is used to constrain the degree of deviation between the simulated macroscopic results and the real macroscopic data. The data-driven alignment loss, various traffic flow physical constraint losses, and macro-statistical consistency loss are each configured with preset penalty weights and then weighted and fused to obtain the joint loss function. With minimizing the joint loss function as the optimization objective, the network parameters are iteratively updated to train a cross-scale parameter alignment network that simultaneously satisfies the historical data fitting accuracy, traffic physics constraints, and macroscopic statistical consistency.

[0050] In this embodiment, based on the macroscopic and microscopic latent space vectors generated in step 11, a joint loss function is constructed that integrates data-driven alignment loss, traffic flow physical constraint loss, and macroscopic statistical consistency loss. Network training is completed with the goal of minimizing the joint loss, resulting in a cross-scale parameter alignment network. The specific implementation process is as follows: A data-driven alignment loss is constructed, which characterizes the matching and fitting degree between macroscopic and microscopic data. It is calculated based on historically paired macroscopic and microscopic latent space vector samples, and its expression is: Where N is the total number of historical pairing samples; Let be the macroscopic latent space vector corresponding to the i-th sample; Let be the microscopic latent space vector corresponding to the i-th sample; This is a L2 norm squared operation. The loss, by measuring the feature distance between paired samples in the shared latent space, constrains the feature matching accuracy between macroscopic traffic conditions and corresponding microscopic driving parameters.

[0051] Furthermore, a multi-dimensional traffic flow physical constraint loss is constructed. This loss includes violations of traffic flow conservation constraints, violations of vehicle following behavior constraints, and violations of basic graph boundary condition constraints. The specific forms of these three types of constraints and their corresponding violation calculation methods are as follows: The first type is the traffic flow conservation constraint, used to ensure that the flow rate, density, and spatial average speed obtained from latent space vector decoding satisfy the traffic flow conservation law. Its conservation relationship expression is: q = ρv, where q is the flow rate; ρ is the density; and v is the spatial average speed, all three of which are generated by latent space vector decoding. The corresponding violation expression for the conservation constraint is: ; A preset reference flow rate is used to normalize the conservation deviation. The larger the value, the greater the degree of violation of the conservation relationship.

[0052] The second category is vehicle car-following behavior constraints. Based on a preset car-following model, the steady-state flow density relationship derived from microscopic driving parameters is consistent with the macroscopic traffic fundamental map patterns. This embodiment uses an Intelligent Driver Model (IDM) as the benchmark for the car-following model, and the vehicle acceleration and desired headway conform to the following expression: ; ; Where a is the vehicle acceleration; s is the acceleration exponent; s is the actual distance between the front and rear of the vehicle. The speed difference with the vehicle in front; Let the desired front-end spacing function be used. The desired speed is T; the safe travel distance is T. b is the maximum acceleration; b is the comfortable deceleration. This is the minimum headway.

[0053] Introducing the equilibrium condition a=0, =0, considering the relationship between density and the distance between vehicle front ends. (where l is the effective length of the vehicle), the equilibrium flow-density relationship driven by microscopic driving parameters can be derived. It is required that this relationship remain consistent with the macroscopic basic diagram. The corresponding expression is: ;in, The velocity-density relationship is in equilibrium. , These are the flow-density functions driven by microscopic parameters and the macroscopic fundamental graph, respectively. The equilibrium velocity-density relationship is calculated using the steady-state conditions of the car-following model: under given density conditions, the equilibrium headway is first solved, then the acceleration and relative velocity are satisfied with the steady-state conditions, substituted into the car-following model to obtain the equilibrium velocity, and the microscopic flow-density function is further derived; the macroscopic fundamental graph function can be obtained by fitting historical detector flow-density data, including but not limited to the Greenshields model, the triangular fundamental graph model, or existing engineering fundamental graph models.

[0054] The expression for the violation amount of the vehicle following behavior constraint is: Where J is the total number of density sampling points; For the j-th density sampling point; This is the maximum flow rate, used to normalize the deviation. The larger the value, the greater the deviation between the microscopically derived steady-state flow-density relationship and the macroscopic basic diagram.

[0055] The third category is basic graph boundary condition constraints, used to ensure that the speed and flow boundary characteristics conform to traffic flow patterns under three extreme traffic states: zero density, congestion density, and critical density. The corresponding boundary condition expressions are: ;in, For free flow velocity; Blocking density; It is the critical density; The maximum flow rate is the throughput capacity; the three equations correspond to the physical boundaries where the velocity is the free flow velocity at zero density, the velocity is zero at blocked density, and the flow rate reaches its maximum value at critical density.

[0056] The expression for the violation of the boundary condition constraints of the corresponding basic graph is: ;in, That is, blockage density ; The larger the value, the greater the deviation of the boundary features of the basic graph.

[0057] Furthermore, a macroscopic statistical consistency loss is constructed, which is used to constrain the degree of deviation between the simulated macroscopic results and the actual macroscopic data. Specifically, a decoding mapping is performed on the microscopic latent space vector to generate microscopic driving parameters. These microscopic driving parameters are input into the microscopic simulation module, and the simulated macroscopic results are obtained by aggregating the simulation output results. The expression for constructing the macroscopic statistical consistency loss is as follows: ;in, This refers to the macro-statistical consistency error. These are micro-driving parameters, specifically the micro-driving behavior parameter vector obtained by decoding and mapping the micro-latent space vector. This is a macroscopic statistical state vector; , , These represent the flow rate, velocity, and density obtained after microscopic simulation aggregation, respectively. , , These are flow rate, velocity, and density obtained from actual macroscopic observations, respectively. , , These are the error weights corresponding to flow rate, velocity, and density, respectively. This loss is used to ensure that the aggregated microscopic parameters can reproduce macroscopic statistical characteristics by comparing the deviations between the aggregated microscopic simulation results and the actual macroscopic observation data.

[0058] Based on the aforementioned loss terms and constraint violations, a joint loss function is constructed, the expression of which is: ;in, For data-driven alignment loss; , , These are the violations of three types of constraints: conservation, race-following steady state, and fundamental graph boundary. , , , The penalty weights are respectively the penalty weights for conservation constraints, car-following behavior constraints, basic graph boundary constraints, and macroscopic statistical consistency constraints, which can be preset and adjusted according to engineering needs. During training, the learnable parameters of the network are iteratively updated using the gradient backpropagation algorithm with the optimization objective of minimizing the joint loss function, until the joint loss function value converges to the preset convergence threshold. Finally, a cross-scale parameter alignment network that simultaneously satisfies the historical data fitting accuracy, traffic physics constraints, and macroscopic statistical consistency is obtained.

[0059] Furthermore, step 13 above includes: The macroscopic traffic data to be mapped is input into the trained cross-scale parameter alignment network to obtain a shared latent space representation. Based on the macroscopic velocity and density in the shared potential space representation, identify the target phase of the current traffic flow; Based on the distance between the target phase state and the preset boundaries of free flow, synchronous flow and congested flow phase states, calculate the non-negative normalized fusion weight corresponding to each phase state; According to the non-negative normalized fusion weight, the predefined micro-alignment functions of each phase state are weighted and fused to obtain the phase state adaptive global alignment function. Based on the shared latent space representation and the global alignment function, the candidate microscopic parameter distribution is output.

[0060] In this embodiment, the macroscopic traffic data to be mapped is input into the trained cross-scale parameter alignment network. The macroscopic encoder in the cross-scale parameter alignment network outputs a shared latent space representation corrected by traffic physical constraints and macroscopic statistical consistency constraints. This implementation classifies traffic flow into three phases: free flow, synchronous flow, and congested flow. Based on the local microscopic alignment functions and parameter mapping relationships of each phase obtained during offline training, it matches differentiated driving behaviors under different traffic conditions, overcoming the deficiency that a single fixed mapping cannot adapt to all traffic conditions. The current traffic phase is identified based on real-time traffic flow speed and density data, and the non-negative normalized fusion weights corresponding to each phase are calculated. If the current traffic state clearly belongs to a single phase, the weight of that phase is assigned a value of 1, and the weights of other phases are assigned a value of 0. If the current traffic state is in a multi-phase transition zone, the weights of each phase are determined based on the distance between the real-time speed and density and the boundaries of each phase, or the output probability of the phase classification model.

[0061] By weighted fusion of the micro-alignment functions of each phase state, an adaptive global alignment function for phase state is obtained, eliminating parameter jumps during phase state switching. The fusion formula is as follows: ,in, For the first Microscopic alignment functions corresponding to various traffic phase states; For the first The fusion weights corresponding to different traffic phases.

[0062] Based on shared latent space representation and phase-adaptive global alignment function, a conditional distribution decoder outputs candidate micro-parameter distributions. This decoder does not output unique micro-parameter solutions, but rather Gaussian-form parameter probability distributions. The distribution mean represents typical group driving behavior, and the distribution dispersion represents individual driver behavior differences and mapping uncertainties. The parameter distribution and macro-aggregate consistency constraint formulas are as follows: ; ;in, The corrected shared latent space representation; The mean of the candidate microscopic parameter distribution; The standard deviation of the candidate microscopic parameter distribution; It is a Gaussian distribution function; It is a diagonal covariance matrix; For macroscopic velocity variance; The partial derivative of the equilibrium velocity with respect to the safe time interval is obtained by differentiating the implicit function of the steady-state equation; The variance of the safe time interval distribution.

[0063] It should be noted that the distribution mean represents the average behavior of the group, while the dispersion represents the heterogeneity of driving. Therefore, the same macroscopic speed, flow rate, and density are not forcibly mapped to a single parameter point, but rather form a set of physically feasible candidate microscopic behavioral solutions, which are then further optimized in the online phase based on evidence from real trajectories. The distribution mean and standard deviation are output by the conditional distribution decoder. In engineering implementation, the conditional distribution decoder has two parallel output channels: a mean channel and a heterogeneity channel. The mean channel outputs the mean of the candidate microscopic parameter distribution, and the heterogeneity channel outputs the standard deviation of the candidate microscopic parameter distribution. The standard deviation output is processed by a positive value function to ensure that the standard deviation is always positive. During model training, alignment loss and macroscopic statistical consistency error are used as the main supervision signals, combined with the cyclic consistency error from step 14 to form a closed-loop correction, iteratively updating the decoder parameters and outputting feasible microscopic parameter candidate solutions that conform to physical constraints and adapt to traffic phases.

[0064] Furthermore, step 14 above includes: Obtain the original macroscopic traffic state, and based on the microscopic parameters sampled from the candidate microscopic parameter distribution, perform macroscopic-to-microscopic decoding from the original macroscopic traffic state to the microscopic parameters; Based on the micro parameters obtained by sampling the candidate micro parameter distribution, the micro parameters are input into the pre-constructed micro simulation module for simulation and deduction. The simulation output results are aggregated and statistically analyzed to restore the simulation macroscopic statistical state. Obtain the original macroscopic traffic state, compare the simulated macroscopic statistical state with the original macroscopic traffic state, and calculate the cyclic consistency error; If the cycle consistency error exceeds a preset cycle error threshold, an alignment correction mechanism is triggered to update the shared latent space representation until the error converges. Set the traffic flow conservation constraint deviation threshold, vehicle following behavior constraint deviation threshold, basic graph boundary condition constraint deviation threshold, macroscopic statistical consistency error threshold, and distribution dispersion interval; Parameter samples that simultaneously satisfy the conservation constraint deviation, car-following behavior constraint deviation, boundary condition constraint deviation, and macroscopic statistical error all within the corresponding threshold range, and whose parameter distribution dispersion is located within the specified dispersion interval, are identified as the parameter consistency feasible region.

[0065] In this embodiment, for the candidate microscopic parameter distributions corresponding to each traffic phase, a bidirectional mapping loop verification is performed: "from macroscopic to microscopic, and then from microscopic to macroscopic." First, through the decoding mapping logic corresponding to each phase, the microscopic parameter distribution of the corresponding phase is obtained by decoding the original macroscopic traffic state. Then, through the macroscopic aggregation mapping logic, this microscopic parameter distribution is substituted into the simulation model or solved analytically, and back-aggregated to restore the macroscopic flow, speed, and density statistics. Through the above-mentioned macroscopic-microscopic bidirectional closed-loop mapping, the loop verification from the original macroscopic state to the final macroscopic state is completed.

[0066] By comparing the restored macroscopic statistical state with the original macroscopic traffic state, the cycle consistency loss is calculated to quantify and evaluate the closed-loop matching accuracy of the macro-micro bidirectional mapping. The formula for calculating the cycle consistency loss is as follows: ;in, For the first A mapping function for the distribution of microscopic parameters obtained by decoding macroscopic statistical states under a certain phase state; For the first The mapping function of macroscopic statistical state is obtained by aggregating and reducing the distribution of microscopic parameters under each phase state; This refers to norm operations. The physical meaning of this formula is: taking the original macroscopic state as input, and after a complete cycle from macroscopic to microscopic and then back to macroscopic, check whether the output is consistent with the input. When cycle consistency is lost... Exceeding the preset cycle error threshold When a deviation is detected in the shared latent space mapping, a latent space alignment correction instruction is triggered to iteratively correct the shared latent space representation.

[0067] By combining the traffic flow conservation deviation threshold, vehicle car-following behavior deviation threshold, basic map boundary deviation threshold, macroscopic statistical consistency error threshold, and parameter distribution dispersion interval, microscopic parameters that satisfy all constraints are selected, and a parameter consistency feasible region is constructed. The feasible region is defined as follows: ;in, For the feasible region of microscopic parameter consistency; Preset a deviation threshold for traffic flow conservation constraints; Preset a deviation threshold for vehicle following behavior constraints; Preset deviation thresholds for the boundary constraints of the basic graph; A threshold is preset for macro-statistical consistency error; The vector of standard deviations of the microscopic parameter distribution; This represents a reasonable range for the dispersion of micro-parameter distributions. Each threshold is determined by the statistical characteristics of historical training and validation samples or the upper limit of engineering allowable error. The reasonable range for dispersion is determined by the statistical results of historical driving parameters in the same phase state. Only parameters that satisfy all constraints can be included in the parameter consistency feasible region, serving as the effective parameter range for online calibration.

[0068] It should be noted that, after steps 11 to 14 above, the offline stage ultimately yields two results: first, a mapping M(·) from macroscopic traffic conditions to the candidate distribution of microscopic driving parameters; and second, a parameter consistency feasible region Ω that restricts the parameters from arbitrarily changing. Subsequent online calibration can only select and update parameters based on this.

[0069] Optionally, step 15 above includes: Obtain real-time macroscopic traffic observation data; The real-time macroscopic traffic observation data is input into the cross-scale parameter alignment network to generate a candidate distribution of target microscopic parameters corresponding to the real-time macroscopic traffic observation data; Centered on the mean of the target micro-parameter candidate distribution, and combined with the preset range coefficient and distribution standard deviation, the parameter value range is determined. The intersection of the parameter value range and the parameter consistency feasible region is taken to generate the micro-parameter candidate domain at the current time.

[0070] In this embodiment, real-time macroscopic traffic observation data is collected, including road segment flow, operating speed, and lane occupancy. Based on lane occupancy, real-time traffic density is calculated by combining effective vehicle length, detection interval length, or a predetermined engineering conversion model, and then integrated to obtain the time-based traffic density. The standardized macroscopic statistical state is expressed as follows: ;in, For a moment The macro-statistical status; For a moment The observed flow rate; For a moment The observation speed; For a moment The observation density.

[0071] Real-time macro statistical status The trained cross-scale parameter alignment network is input, and a macro-micro mapping model is constructed offline. Generate candidate distributions of micro-parameters corresponding to real-time operating conditions, with the following mapping relationship: .

[0072] With the mean of the candidate parameter distribution Centered on, combined with preset range coefficients With the standard deviation of the candidate parameter distribution Construct a parameter value range and compare this range with the offline determined feasible region. Taking the intersection yields the candidate domain of microscopic parameters at the current time, with the following constraint formula: ;in, The mean of the candidate micro parameters distribution corresponding to the real-time macroscopic state; The standard deviation of the candidate microscopic parameter distribution corresponding to the real-time macroscopic state; This is the preset range coefficient; This step defines the feasible region for consistent micro-parameters. It limits the search range for micro-parameters that are compliant with macro-level standards, and does not output unique micro-parameters, thus providing a constraint basis for subsequent parameter optimization.

[0073] Optionally, step 16 above includes: Within the candidate domain of micro parameters, a joint optimization objective function is constructed using macro statistical consistency error, micro trajectory likelihood error, phase behavior prior error, and parameter smoothing error. The objective function is then solved to obtain the optimal micro driving behavior parameter solution. The optimal microscopic driving behavior parameter solution is input into the microscopic simulation system, and the output results are aggregated and statistically analyzed to generate a simulated macroscopic traffic state. Calculate the co-occurrence deviation between the simulated macroscopic traffic conditions and the real-time macroscopic observation data; If the collaborative deviation exceeds the preset collaborative deviation threshold, the boundary shrinkage of the candidate domain of the micro parameters or the reassignment of the weight coefficients of each error in the objective function is triggered. Based on the adjusted candidate domain or weight coefficients, the parameters are solved again, and the micro simulation aggregation and collaborative deviation calculation are re-executed until the collaborative deviation meets the requirements of the preset collaborative deviation threshold. For the optimal micro-driving behavior parameter solution that meets the preset collaborative deviation threshold after verification and correction, perform micro-simulation aggregation deviation verification.

[0074] In this application, the candidate domain of microscopic parameters at the current time... Internally, a joint optimization objective function is constructed that integrates macroscopic statistical consistency, microscopic trajectory likelihood, phase behavior priority, and parameter temporal smoothness. By solving for the minimum value of the multi-objective loss objective function, the optimal microscopic driving behavior parameter solution is obtained. The objective function and the partial errors are defined as follows: A multi-objective loss function is constructed, with macroscopic statistical consistency, microscopic trajectory likelihood, phase behavior priority, and parameter temporal smoothness as joint optimization objectives. The optimal microscopic driving behavior parameter solution is then obtained. The formulas for the objective function and the partial errors are as follows: + + + ; ; ; ; in, The solution for the optimal microscopic driving behavior parameters; The candidate domain of micro-parameters is constrained by the feasible domain of parameter consistency at the current moment; This refers to real-time collected floating car trajectory or video trajectory data; It is the probability density function; Macroscopic statistical consistency error is used to measure the degree of deviation between the aggregated results of microscopic parameters and macroscopic observations. The trajectory likelihood error is used to quantify the explanatory power of micro-parameters on real vehicle speed, acceleration, and headway sequences. This is the phase prior error, used to constrain micro-parameters to conform to the statistical characteristics of historical driving behavior under the current traffic phase. This is the parameter timing smoothing error, used to suppress non-physical jumps in parameters between adjacent update cycles; These are the micro-parameters that took effect in the previous update cycle; , , , These are the preset weighting coefficients for each error term.

[0075] Furthermore, the optimal microscopic driving behavior parameters are solved. Substituting the data into the microscopic simulation system, the simulated macroscopic traffic state is obtained. By comparing the simulated macroscopic traffic state with the real-time macroscopic observation data, the coordination deviation is calculated using the following formula: ;in, The simulated macroscopic state is obtained by decomposing the optimal microscopic parameters; To monitor the macroscopic state in real time; This refers to macro-micro coordination bias. When coordination bias occurs... Exceeding the preset coordination deviation threshold At that time, perform micro-parameter candidate domain shrinkage or optimize weight redistribution to complete parameter aggregation deviation closed-loop verification.

[0076] Solve the above optimal micro-driving behavior parameters The simulation is input into a microscopic simulation system to perform a deduction, and the simulation output results are aggregated and statistically analyzed to generate a simulated macroscopic traffic state. Computational simulation of macroscopic traffic conditions and real-time macroscopic observation data. The norm distance between them yields the macro-micro cooperative bias. The calculation formula is as follows: ;in, The simulated macroscopic state is obtained by decomposing the optimal microscopic parameters; To monitor the macroscopic state in real time; The cooperative bias is used to characterize the degree of macro-micro matching.

[0077] When coordination deviation Exceeding the preset coordination deviation threshold If the current parameter solution satisfies the joint optimization objective but fails the macroscopic aggregation verification, a correction instruction is triggered: execute the microscopic parameter candidate domain. Boundary contraction, or the weighting coefficients of the errors in the joint optimization objective function ( , , , The system is reconfigured and the optimal parameters are resolved based on the adjusted constraints until the cooperative deviation meets the threshold requirement, thus completing the closed-loop verification between macroscopic statistical constraints and microscopic behavioral optimization.

[0078] Optionally, step 17 above includes: Substitute the verified parameter solution into the current microscopic simulation window and run it. Calculate the deviation between the macroscopic result of the simulation aggregation output and the current macroscopic observation result. If the deviation meets the preset convergence threshold, the stability verification is determined to be successful. Calculate the normalized sensitivity of each micro-parameter to be calibrated to the simulation output index, and perform inverse adaptive adjustment based on the update step size corresponding to the normalized sensitivity; The macroscopic basic graph parameters are grouped according to link type. The ratio of the observed value to the simulated value of each link in the group is calculated as the single link calibration factor. The geometric mean of the single link calibration factors in the group is taken to obtain the group-level calibration factor. Based on the group-level calibration factor, the macroscopic basic graph parameters are updated in multiple rounds. The update results of the macroscopic basic graph parameters are then pruned using preset single-round update intervals and cross-round cumulative intervals to obtain the updated macroscopic basic graph parameters. The abnormal detection data and abnormal trajectory data input in real time are isolated and removed to eliminate their interference with the current parameter update; Based on the observation results after removing outlier data, the adjusted parameter update step size, and the updated macroscopic basic graph parameters, the current microscopic parameter set is finally updated to obtain the calibrated microscopic parameter set.

[0079] In this embodiment, stability verification is performed on the verified microscopic parameter solutions. The microscopic parameters are substituted into the current simulation window, and the deviation between the simulation aggregation results and the real-time observation results is compared. If the deviation meets the preset convergence threshold, the verification is deemed successful; otherwise, the process returns to the parameter optimization step for re-optimization.

[0080] The sensitivity of each micro-parameter to be calibrated to the simulation output index is calculated. Based on the parameter normalization sensitivity, the parameter update step size is adaptively adjusted to achieve differentiated iterative updates of micro-parameters. The calculation formula is as follows: ;in, For the first The simulation output index for the first The sensitivity of the microscopic parameters to be calibrated; The simulation output metrics include flow rate, velocity, density, and trajectory error. For the first The update step size of the micro parameters; Update the step size based on the baseline; This is the step size adjustment coefficient; The sensitivity is normalized for micro-parameters. High-sensitivity micro-parameters are updated with small step sizes to suppress parameter oscillations, while low-sensitivity micro-parameters are updated with large step sizes to improve convergence speed.

[0081] Grouped cross-wheel cumulative calibration is performed on macroscopic basic map parameters such as free-flow velocity, capacity, and critical density. Road segments are grouped according to link type, and the calibration factor for each individual link within a group is calculated. The group-level calibration factor is obtained through geometric averaging, and the value range of the single-wheel calibration factor is limited. The calculation formula is as follows: ;in, Group by link type; For a single link within the group; This is the single-link current-round calibration factor; Group-level calibration factor; This refers to the number of links within the group. The calibration factor is clipped to a single-round interval.

[0082] The macroscopic fundamental graph parameters are updated multiple times based on group-level calibration factors, and long-term parameter drift is suppressed by cross-cycle interval pruning. Taking free-flow velocity calibration as an example, the throughput capacity and critical density adopt the same calibration logic, as shown in the following formula: ; ;in, For the first Wheelset-level cumulative calibration factor; This is a range clipping function; Accurately calibrate the trimming range across wheels; The reference free-flow velocity; For the first The free-flow velocity after wheel calibration. This calibration method only applies to macroscopic fundamental graph parameters to stabilize the macroscopic constraint basis and does not add new microscopic driving behavior parameters.

[0083] During online calibration, abnormal detection data and trajectory data, such as missing, out-of-bounds, duplicate, and abrupt changes, are isolated and removed to eliminate interference from abnormal data on micro-parameter updates and ensure the continuous and stable calibration process. Based on the effective observation results after removing abnormal data, the adaptively adjusted micro-parameter update step size, and the updated macroscopic basic graph parameters, the current micro-parameter set is finally updated, resulting in a calibrated micro-parameter set that balances macroscopic statistical consistency, microscopic behavioral authenticity, and temporal stability.

[0084] In an optional embodiment, after obtaining the calibrated set of micro parameters, the method further includes: Obtain the current macroscopic observation statistical state, and the equivalent macroscopic statistical state obtained by aggregating the calibrated microscopic parameter set through microscopic simulation; Calculate the residual total deviation between the macroscopic observation statistical state and the equivalent macroscopic statistical state; The residual total deviation is decomposed into four types of deviation components: parameter deviation, aggregated sampling deviation, random fluctuation, and structural difference. Each of the aforementioned deviation components is quantified and estimated, and corresponding processing instructions are generated based on the threshold determination results of each deviation component.

[0085] In this embodiment, after obtaining the calibrated microscopic parameter set, macroscopic and microscopic residual deviations are traced and targeted to avoid the problem of blind parameter tuning. First, the current macroscopic observation statistical state and the equivalent macroscopic statistical state obtained by aggregating the calibrated microscopic parameter set through microscopic simulation are obtained. Based on the two sets of state data, the total macroscopic and microscopic residual deviations are calculated, and the single overall deviation is decomposed into multi-dimensional independent deviation components to achieve accurate deviation tracing.

[0086] Formulas for calculating the total macroscopic and microscopic residual deviations and decomposing the deviation components are constructed, dividing the total deviation into four independent components: parameter deviation, aggregate sampling deviation, random fluctuation, and structural difference. The specific formulas are as follows: ; ;in, The total residual deviation vector consists of macroscopic and microscopic components, derived from the flow deviation. Speed ​​deviation Density deviation constitute; The online calibration phase refers to the current macroscopic observation and statistical status. ; The equivalent macroscopic statistical state obtained by decomposing the optimal microscopic parameters; This is the parameter bias component, caused by the inability of micro-parameters to simultaneously satisfy both statistical consistency and behavioral reality constraints; The aggregated sampling bias component is caused by statistical sampling errors of a limited number of vehicles; The random fluctuation component is caused by the inherent randomness of microscopic simulation. The structural difference components are caused by the theoretical differences between the continuous traffic medium assumption and the discrete individual vehicle assumption. Four types of deviation components are sequentially quantified and solved. Based on the judgment results of preset thresholds for each component, corresponding handling instructions are generated to distinguish between correctable parameter deviations and non-eliminable model, sampling, and random errors, thus achieving targeted deviation handling.

[0087] Furthermore, each of the aforementioned deviation components is quantified and estimated, and corresponding processing instructions are generated based on the threshold determination results of each deviation component, including: Based on the residual total deviation, multiple repeated simulations are performed, and the random fluctuation component is obtained by quantifying the aggregated flow in each simulation. Calculate the difference between the mean aggregated traffic in the current aggregation window and the extended reference window, and combine the standard deviation of the traffic samples in the current window with the number of valid samples to calculate the aggregation sampling bias component; Call the offline fitted density-related structural difference compensation function and calculate the structural difference components in combination with the current density value; The parameter deviation component is obtained by subtracting the random fluctuation component, the aggregated sampling deviation component, and the structural difference component from the residual total deviation. When the parameter deviation component exceeds a preset threshold, a parameter callback correction instruction is generated; when the aggregated sampling deviation component exceeds a preset threshold, an aggregated statistical window expansion instruction is generated; the structural difference component is corrected online through the compensation function without triggering micro-parameter adjustment; the random fluctuation component is determined as an acceptable error and no parameter adjustment instruction is generated.

[0088] In this application, based on the above-mentioned deviation decomposition logic, various deviation components are calculated one by one, and corresponding processing instructions are generated according to the differentiated threshold judgment rules to accurately distinguish between deviation types that require parameter adjustment and those that do not.

[0089] Through repeated microscopic simulation experiments, the dispersion of the aggregated flow from multiple simulations was statistically analyzed, and the inherent random fluctuation component of the simulation was solved. The calculation formula is as follows: ;in, The number of times the simulation is repeated; For the first The aggregated traffic from the second simulation; This represents the average flow rate aggregated from multiple simulations.

[0090] Select the current aggregation window and the extended reference window, compare the difference in the average aggregation traffic between the two windows, and combine the sample characteristics of the current window to solve for the aggregation sampling bias and sampling standard error. The calculation formula is as follows: ; ;in, This is the current aggregated statistics window; To expand the reference window; , These are the aggregated traffic averages for the current window and the extended reference window, respectively. This represents the standard deviation of the flow samples within the current window. This represents the number of valid samples within the current window. This is a sampling standard error.

[0091] The density-related structural difference compensation function obtained from offline training is called, and the structural difference components are solved by combining the current real-time density value. The formula is as follows: ;in, The density-related structural difference compensation function is obtained by fitting the offline historical residuals and the density correlation. This represents the current real-time traffic density.

[0092] By subtracting non-parametric deviation components from the total deviation, irrelevant error interference is eliminated, and the true parameter deviation components are obtained, as shown in the following formula: Differential processing is performed based on the threshold determination results of each deviation component: when the parameter deviation component... When the preset threshold is exceeded, a parameter callback correction instruction is generated to backtrack and optimize the micro parameters; when the aggregated sampling deviation component... or sampling standard error When the threshold is exceeded, an aggregated statistical window expansion instruction is generated to improve the sampling statistical accuracy; for structural difference components... Online state correction is achieved solely through an offline-fitted compensation function, without triggering any micro-parameter adjustments; random fluctuation components If the error is determined to be an inherent and acceptable error in the simulation, no parameter adjustment instructions will be generated.

[0093] Furthermore, the method also includes: The calibrated set of micro parameters is aggregated and restored to the simulated macroscopic statistical state, and a reverse consistency check is performed on the simulated macroscopic statistical state using a preset macroscopic model. If the reverse verification deviation exceeds a preset threshold, it is determined that the offline mapping of the cross-scale parameter alignment network is not suitable for the current scenario, and a mapping retraining prompt is output.

[0094] In this application, after the deviation tracing and targeted handling, a cross-scale mapping effectiveness self-checking step is performed: the calibrated micro-parameter set is aggregated and restored to the simulated macro-statistical state; a reverse consistency check is performed on the simulated macro-statistical state using a preset macro-model to verify the scenario adaptability of the offline mapping relationship of the cross-scale parameter alignment network; the simulated macro-statistical state is compared with the macro-observed statistical state to calculate the reverse check deviation; when the reverse check deviation exceeds a preset mapping check threshold, it is determined that the offline mapping of the cross-scale parameter alignment network is not applicable to the current traffic scenario, and a mapping retraining prompt is output to trigger the iterative update of the cross-scale parameter alignment network, updating the macro-micro mapping rules, thereby avoiding the accumulation of parameter calibration deviations caused by mapping failure.

[0095] In one specific embodiment, the test scenario is a two-way six-lane urban expressway with a length of 12km and eight fixed detection sections along the route, with a floating car penetration rate of approximately 10%. The system collects traffic flow, speed, and occupancy data through fixed detectors and calculates real-time traffic density. Microscopic simulation is based on a lane-cell simulation platform, using an IDM (Independent Driver Model) car-following model for experimental verification. Offline training uses continuous traffic data from sixty working days, covering 720 hours of free-flow conditions, 360 hours of synchronized flow conditions, and 120 hours of congested flow conditions. Driving features such as headway, acceleration, and speed fluctuations are extracted from historical floating car trajectory data to construct a priori dataset of driving behavior.

[0096] The cross-scale parameter alignment network employs a fully connected architecture. The encoder consists of a four-layer network with hidden layer dimensions of 64, 32, and 16, and a latent space dimension of 8. The decoder is divided into a mean output channel and a heterogeneous output channel, both with a three-layer network structure and hidden layer dimensions of 16, 32, and 64, respectively. Model training utilizes the Adam optimizer with a batch size of 128 and 500 iterations. The training process uses cathodic steady-state constraints and macroscopic statistical consistency constraints as the core loss weights, and the cycle consistency threshold is set to [value missing]. .

[0097] The basic parameters of the IDM car-following model are uniformly set: the speed index is 4, the comfort deceleration is 2.0 m / s², and the vehicle length is 5 m. The macroscopic basic graph parameters adopt a hierarchical calibration method, with the single-wheel calibration factor clipping range set to 0.8 to 1.25 and the cross-wheel cumulative calibration factor clipping range set to 0.5 to 2.0, effectively ensuring the long-term stable operation of macroscopic parameters.

[0098] During the online operation phase, core operating parameters are uniformly configured. The macroscopic statistical update cycle is 5 minutes, the microscopic parameter optimization update cycle is 1 minute, the coordination deviation threshold is 0.08, and the range coefficient is 2. The deviation judgment threshold is configured differently according to different traffic phase states, and the phase change discrimination threshold is determined through scenario calibration. Model parameters are divided into fast-changing parameters at the second level, medium-changing parameters at the minute level, and slow-changing parameters at the hour level based on their change characteristics, realizing hierarchical updates. The system has data fault tolerance capabilities; a single abnormal data point will not interrupt the entire calibration process.

[0099] Experimental results show that the MAPE (Marginal Statistical Error) of this invention is 4.2% under congested conditions, a significant improvement compared to the 11.7% error accuracy of the traditional fixed mapping scheme. This invention can eliminate pseudo-parameter solutions with abnormal driving behavior within a parameter range that meets macroscopic statistical accuracy requirements, ensuring the authenticity and validity of microscopic parameters. A single macroscopic-microscopic collaborative correction takes approximately 5 minutes, a significant improvement in calibration efficiency compared to the 25 to 40 minutes required by traditional serial recalibration methods.

[0100] In a typical deviation calibration scenario, the initial total deviation of a road segment is 360 veh / h / lane. By isolating 85 veh / h / lane of structural difference deviation through a multi-source deviation decomposition mechanism, the remaining 222.3 veh / h / lane of effective parameter deviation can converge without oscillation within 4 minutes. Traditional methods that directly adjust parameters based on the total deviation still suffer from parameter oscillation and inability to achieve stable convergence even after 16 minutes of iteration. This invention can predict traffic phase changes 2 minutes in advance, reducing the peak error of phase change conditions from 18.5% to 5.3%, shortening the calibration response time from 6 minutes to 1 minute, and allowing for a second-level rollback to a historically stable parameter version in case of parameter failure.

[0101] The network structure, training parameters, thresholds, and operating configurations involved in this embodiment are all exemplary parameters. They can be flexibly adapted and adjusted according to the actual road network structure, detector deployment conditions, floating car penetration rate, and data sampling frequency. Equivalent modifications to the parameters do not change the technical solution of this invention.

[0102] Overall performance comparison tests show that the present invention can reduce the macro-micro aggregated flow deviation from 14.2% to 4.1%, shorten the parameter convergence time after phase change from 8.5 minutes to 1.2 minutes, reduce the number of parameter oscillations from 47 to 3, and shorten the calibration failure recovery time from 18.3 minutes to less than 1 second, fully verifying the effectiveness and superiority of each functional module of the present invention.

[0103] This application presents an online calibration method for collaborative calibration of driving parameters with macro- and micro-simulation consistency. The overall technical solution consists of two stages: offline modeling and online calibration. In the offline stage, a cross-scale parameter alignment network with physical constraints is constructed. A feasible domain for micro-parameter consistency is built by combining traffic physics mechanisms and prior information on driving behavior, establishing a compliant mapping relationship from macro-traffic states to micro-parameter distributions and limiting the effective range of online parameter iteration. In the online stage, based on real-time macro-observation data, a candidate set of micro-parameters is generated within the preset feasible domain. Parameter optimization and macro- and micro-consistency verification are completed by combining trajectory evidence and multi-objective constraints. This method classifies and handles residual deviations through multi-source deviation decomposition, completes traffic phase change prediction and parameter pre-switching through multi-dimensional precursor indicators, adapts to the changing characteristics of different parameters through a multi-timescale hierarchical update mechanism, and forms a high-precision, high-stability, and highly self-healing online collaborative calibration closed-loop system based on parameter version evaluation, failure rollback, and avoidance mechanisms.

[0104] Compared with the prior art, the present invention has the following beneficial effects: (1) Construct a cross-scale parameter alignment network and parameter feasible region with physical constraints, establish a precise correspondence between macroscopic statistical state and microscopic driving parameters, and solve the problem of disconnect between macroscopic and microscopic scales and disordered parameter search in traditional calibration. (2) The joint optimization mechanism of macroscopic statistical consistency and microscopic behavioral authenticity is adopted, and the parameter solution process is constrained by both, which effectively avoids the problem of pseudo-solution in traditional calibration where the macroscopic error meets the standard but the microscopic driving behavior is distorted. (3) Set up a parameter adaptive step size update and macroscopic parameter cumulative calibration mechanism to improve the parameter calibration convergence efficiency, suppress the long-term parameter drift phenomenon, and improve the stability of the simulation system for long-term online operation; (4) Use multi-source deviation decomposition technology to distinguish between parameter deviation, sampling deviation, random fluctuation and structural difference and implement differentiated treatment to prevent parameter oscillation and convergence instability caused by blind parameter adjustment. (5) Based on multiple traffic precursor indicators, traffic phase change prediction and parameter pre-switching are realized, and the traditional passive and lagging parameter adjustment mode is optimized into active feedforward control, which improves the parameter adaptation effect under traffic change scenarios. (6) Adopt a multi-timescale hierarchical update strategy, and configure different update frequencies for fast-changing, medium-changing and slow-changing parameters to balance the response capability to sudden traffic changes and the long-term parameter operation stability. (7) Equipped with parameter version evaluation, automatic rollback and failure avoidance mechanism, it can quickly repair calibration anomalies and actively avoid similar failure conditions, significantly improving the fault tolerance and system robustness of online calibration.

[0105] The various methods described above are based on embodiments of this application. Apparatus for implementing the above methods will now be provided.

[0106] Please refer to Figure 2 This application embodiment also provides an online calibration device for co-calibrating macro- and micro-simulation consistent driving parameters, comprising: The first processing module 21 is used to input macroscopic data containing flow rate, speed, density and basic map parameters, and microscopic data containing historical microscopic driving parameter samples into a preset encoder and map them to the same shared latent space to obtain macroscopic latent space vector and microscopic latent space vector. The second processing module 22 is used to construct a joint loss function based on the macroscopic latent space vector and the microscopic latent space vector, which integrates data-driven alignment loss, traffic flow physical constraint loss and macroscopic statistical consistency loss, and to train a cross-scale parameter alignment network based on the joint loss function. The third processing module 23 is used to identify the phase state of traffic flow and fuse the micro-alignment functions corresponding to different phase states to determine the distribution of candidate micro parameters; The fourth processing module 24 is used to perform a cyclic consistency check from macro to micro decoding and from micro simulation aggregation to macro based on the micro parameters obtained by sampling the candidate micro parameter distribution, and to determine the feasible domain of parameter consistency. The fifth processing module 25 is used to acquire real-time macroscopic traffic observation data and input it into the cross-scale parameter alignment network to generate the microscopic parameter candidate domain at the current time under the parameter consistency feasible domain constraint. The sixth processing module 26 is used to construct an objective function based on the candidate domain of micro parameters, output the optimal micro driving behavior parameter solution using the objective function, and perform micro simulation aggregation deviation verification on the optimal micro driving behavior parameter solution. The seventh processing module 27 is used to perform stability verification of the simulation aggregation results of the verified parameter solutions, adaptively adjust the parameter update step size according to the sensitivity of each parameter to the simulation output index, and perform cross-cycle cumulative calibration on the macroscopic basic graph parameters to obtain the calibrated microscopic parameter set.

[0107] Optionally, the second processing module 22 described above is specifically used for: Based on the macroscopic latent space vector and the microscopic latent space vector, a data-driven alignment loss is constructed; the data-driven alignment loss is used to characterize the degree of matching and fitting between macroscopic and microscopic data. A multi-dimensional traffic flow physical constraint loss is constructed. This loss includes violations of traffic flow conservation constraints, vehicle following behavior constraints, and traffic fundamental map boundary condition constraints. Specifically, the traffic flow conservation constraints ensure that the flow rate, density, and spatial average speed obtained from the macroscopic latent space vector decoding satisfy the traffic flow conservation law. The vehicle following behavior constraints, based on a preset vehicle following model, ensure that the steady-state flow rate-density relationship derived from microscopic driving parameters is consistent with the macroscopic traffic fundamental map law. The fundamental map boundary condition constraints ensure that the speed and flow rate boundary characteristics under extreme traffic conditions (zero density, congestion density, critical density) conform to traffic flow patterns. The microscopic latent space vector is decoded and mapped to generate microscopic driving parameters. The microscopic driving parameters are then input into the microscopic simulation module, and the simulation output results are aggregated to obtain the macroscopic simulation results. The microscopic driving parameters include at least the desired speed, safe time distance, and maximum acceleration. A macroscopic statistical consistency loss is constructed; the macroscopic statistical consistency loss is used to constrain the degree of deviation between the simulated macroscopic results and the real macroscopic data. The data-driven alignment loss, various traffic flow physical constraint losses, and macro-statistical consistency loss are each configured with preset penalty weights and then weighted and fused to obtain the joint loss function. With minimizing the joint loss function as the optimization objective, the network parameters are iteratively updated to train a cross-scale parameter alignment network that simultaneously satisfies the historical data fitting accuracy, traffic physics constraints, and macroscopic statistical consistency.

[0108] Optionally, the aforementioned third processing module 23 is specifically used for: The macroscopic traffic data to be mapped is input into the trained cross-scale parameter alignment network to obtain a shared latent space representation. Based on the macroscopic velocity and density in the shared potential space representation, identify the target phase of the current traffic flow; Based on the distance between the target phase state and the preset boundaries of free flow, synchronous flow and congested flow phase states, calculate the non-negative normalized fusion weight corresponding to each phase state; According to the non-negative normalized fusion weight, the predefined micro-alignment functions of each phase state are weighted and fused to obtain the phase state adaptive global alignment function. Based on the shared latent space representation and the global alignment function, the candidate microscopic parameter distribution is output.

[0109] Optionally, the fourth processing module 24 mentioned above is specifically used for: Obtain the original macroscopic traffic state, and based on the microscopic parameters sampled from the candidate microscopic parameter distribution, perform macroscopic-to-microscopic decoding from the original macroscopic traffic state to the microscopic parameters; Based on the micro parameters obtained by sampling the candidate micro parameter distribution, the micro parameters are input into the pre-constructed micro simulation module for simulation and deduction. The simulation output results are aggregated and statistically analyzed to restore the simulation macroscopic statistical state. Obtain the original macroscopic traffic state, compare the simulated macroscopic statistical state with the original macroscopic traffic state, and calculate the cyclic consistency error; If the cycle consistency error exceeds a preset cycle error threshold, an alignment correction mechanism is triggered to update the shared latent space representation until the error converges. Set the traffic flow conservation constraint deviation threshold, vehicle following behavior constraint deviation threshold, basic graph boundary condition constraint deviation threshold, macroscopic statistical consistency error threshold, and distribution dispersion interval; Parameter samples that simultaneously satisfy the conservation constraint deviation, car-following behavior constraint deviation, boundary condition constraint deviation, and macroscopic statistical error all within the corresponding threshold range, and whose parameter distribution dispersion is located within the specified dispersion interval, are identified as the parameter consistency feasible region.

[0110] Optionally, the fifth processing module 25 mentioned above is specifically used for: Obtain real-time macroscopic traffic observation data; The real-time macroscopic traffic observation data is input into the cross-scale parameter alignment network to generate a candidate distribution of target microscopic parameters corresponding to the real-time macroscopic traffic observation data; Centered on the mean of the target micro-parameter candidate distribution, and combined with the preset range coefficient and distribution standard deviation, the parameter value range is determined. The intersection of the parameter value range and the parameter consistency feasible region is taken to generate the micro-parameter candidate domain at the current time.

[0111] Optionally, the sixth processing module 26 mentioned above is specifically used for: Within the candidate domain of micro parameters, a joint optimization objective function is constructed using macro statistical consistency error, micro trajectory likelihood error, phase behavior prior error, and parameter smoothing error. The objective function is then solved to obtain the optimal micro driving behavior parameter solution. The optimal microscopic driving behavior parameter solution is input into the microscopic simulation system, and the output results are aggregated and statistically analyzed to generate a simulated macroscopic traffic state. Calculate the co-occurrence deviation between the simulated macroscopic traffic conditions and the real-time macroscopic observation data; If the collaborative deviation exceeds the preset collaborative deviation threshold, the boundary shrinkage of the candidate domain of the micro parameters or the reassignment of the weight coefficients of each error in the objective function is triggered. Based on the adjusted candidate domain or weight coefficients, the parameters are solved again, and the micro simulation aggregation and collaborative deviation calculation are re-executed until the collaborative deviation meets the requirements of the preset collaborative deviation threshold. For the optimal micro-driving behavior parameter solution that meets the preset collaborative deviation threshold after verification and correction, perform micro-simulation aggregation deviation verification.

[0112] Optionally, the aforementioned seventh processing module 27 is specifically used for: Substitute the verified parameter solution into the current microscopic simulation window and run it. Calculate the deviation between the macroscopic result of the simulation aggregation output and the current macroscopic observation result. If the deviation meets the preset convergence threshold, the stability verification is determined to be successful. Calculate the normalized sensitivity of each micro-parameter to be calibrated to the simulation output index, and perform inverse adaptive adjustment based on the update step size corresponding to the normalized sensitivity; The macroscopic basic graph parameters are grouped according to link type. The ratio of the observed value to the simulated value of each link in the group is calculated as the single link calibration factor. The geometric mean of the single link calibration factors in the group is taken to obtain the group-level calibration factor. Based on the group-level calibration factor, the macroscopic basic graph parameters are updated in multiple rounds. The update results of the macroscopic basic graph parameters are then pruned using preset single-round update intervals and cross-round cumulative intervals to obtain the updated macroscopic basic graph parameters. The abnormal detection data and abnormal trajectory data input in real time are isolated and removed to eliminate their interference with the current parameter update; Based on the observation results after removing outlier data, the adjusted parameter update step size, and the updated macroscopic basic graph parameters, the current microscopic parameter set is finally updated to obtain the calibrated microscopic parameter set.

[0113] Optionally, the apparatus of this application further includes: The acquisition module is used to acquire the current macroscopic observation statistical state and the equivalent macroscopic statistical state obtained by aggregating the calibrated microscopic parameter set through microscopic simulation. The calculation module is used to calculate the residual total deviation between the macroscopic observation statistical state and the equivalent macroscopic statistical state; The eighth processing module is used to decompose the residual total deviation into four types of deviation components: parameter deviation, aggregated sampling deviation, random fluctuation, and structural difference. The ninth processing module is used to quantify and estimate each type of deviation component, and generate corresponding processing instructions based on the threshold determination results of each type of deviation component.

[0114] Optionally, the ninth processing module mentioned above is specifically used for: Based on the residual total deviation, multiple repeated simulations are performed, and the random fluctuation component is obtained by quantifying the aggregated flow in each simulation. Calculate the difference between the mean aggregated traffic in the current aggregation window and the extended reference window, and combine the standard deviation of the traffic samples in the current window with the number of valid samples to calculate the aggregation sampling bias component; Call the offline fitted density-related structural difference compensation function and calculate the structural difference components in combination with the current density value; The parameter deviation component is obtained by subtracting the random fluctuation component, the aggregated sampling deviation component, and the structural difference component from the residual total deviation. When the parameter deviation component exceeds a preset threshold, a parameter callback correction instruction is generated; when the aggregated sampling deviation component exceeds a preset threshold, an aggregated statistical window expansion instruction is generated; the structural difference component is corrected online through the compensation function without triggering micro-parameter adjustment; the random fluctuation component is determined as an acceptable error and no parameter adjustment instruction is generated.

[0115] Optionally, the apparatus of this application further includes: The tenth processing module is used to aggregate and restore the calibrated micro parameter set to the simulated macroscopic statistical state, and perform reverse consistency verification on the simulated macroscopic statistical state through a preset macroscopic model; In the eleventh processing module, if the reverse verification deviation exceeds a preset threshold, it is determined that the offline mapping of the cross-scale parameter alignment network is not suitable for the current scenario, and a mapping retraining prompt is output.

[0116] It should be noted that the device in this embodiment corresponds to the method described above, and the implementation methods in each of the above embodiments are applicable to the embodiments of this device, achieving the same technical effect. The device provided in this application embodiment can implement all the method steps implemented in the above method embodiments and achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiments will not be described in detail here.

[0117] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described embodiments of the online calibration method for collaborative calibration of macro- and micro-simulation consistent driving parameters, and achieves the same technical effect. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0118] This application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, they implement the various processes of the above-described embodiments of the online calibration method for collaborative calibration of macro- and micro-simulation consistent driving parameters, and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0119] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0120] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0121] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for online calibration of macro- and micro-scale simulation-consistent driving parameters, characterized in that, include: Macroscopic data containing flow rate, speed, density and basic graph parameters, and microscopic data containing historical microscopic driving parameter samples are respectively input into a preset encoder and mapped to the same shared latent space to obtain macroscopic latent space vectors and microscopic latent space vectors. Based on the macroscopic latent space vector and the microscopic latent space vector, a joint loss function is constructed that integrates data-driven alignment loss, traffic flow physical constraint loss and macroscopic statistical consistency loss. A cross-scale parameter alignment network is then trained based on the joint loss function. Based on the cross-scale parameter alignment network, the phase state of traffic flow is identified and the phase state weight is calculated. The micro-alignment functions corresponding to each phase state are fused, and the candidate micro-parameter distribution with macro-state as the condition is output. Based on the micro parameters obtained by sampling the candidate micro parameter distribution, perform a cyclic consistency check from macro to micro decoding and from micro simulation aggregation to macro to determine the feasible domain of parameter consistency. Real-time macroscopic traffic observation data is acquired and input into the cross-scale parameter alignment network to generate a candidate domain of microscopic parameters at the current moment under the constraint of the parameter consistency feasible domain. Based on the candidate domain of micro parameters, an objective function is constructed, and the optimal micro driving behavior parameter solution is output using the objective function. The optimal micro driving behavior parameter solution is then subjected to micro simulation aggregation deviation verification. The stability of the simulation aggregation results is verified for the parameter solutions that have passed the verification. The parameter update step size is adaptively adjusted according to the sensitivity of each parameter to the simulation output index. At the same time, cross-cycle cumulative calibration is performed on the macroscopic basic graph parameters to obtain the calibrated microscopic parameter set.

2. The method according to claim 1, characterized in that, Based on the macroscopic latent space vector and the microscopic latent space vector, a joint loss function is constructed that integrates data-driven alignment loss, traffic flow physical constraint loss, and macroscopic statistical consistency loss. A cross-scale parameter alignment network is trained based on this joint loss function, including: Based on the macroscopic latent space vector and the microscopic latent space vector, a data-driven alignment loss is constructed; the data-driven alignment loss is used to characterize the degree of matching and fitting between macroscopic and microscopic data. A multi-dimensional traffic flow physical constraint loss is constructed. This loss includes violations of traffic flow conservation constraints, vehicle following behavior constraints, and traffic fundamental map boundary condition constraints. Specifically, the traffic flow conservation constraints ensure that the flow rate, density, and spatial average speed obtained from the macroscopic latent space vector decoding satisfy the traffic flow conservation law. The vehicle following behavior constraints, based on a preset vehicle following model, ensure that the steady-state flow rate-density relationship derived from microscopic driving parameters is consistent with the macroscopic traffic fundamental map law. The fundamental map boundary condition constraints ensure that the speed and flow rate boundary characteristics under extreme traffic conditions (zero density, congestion density, critical density) conform to traffic flow patterns. The microscopic latent space vector is decoded and mapped to generate microscopic driving parameters. These microscopic driving parameters are then input into a microscopic simulation module. The simulation output results are aggregated to obtain the macroscopic simulation results. The microscopic driving parameters include at least the desired speed, safe time distance, and maximum acceleration. A macroscopic statistical consistency loss is constructed; the macroscopic statistical consistency loss is used to constrain the degree of deviation between the simulated macroscopic results and the real macroscopic data. The data-driven alignment loss, various traffic flow physical constraint losses, and macro-statistical consistency loss are each configured with preset penalty weights and then weighted and fused to obtain the joint loss function. With minimizing the joint loss function as the optimization objective, the network parameters are iteratively updated to train a cross-scale parameter alignment network that simultaneously satisfies the historical data fitting accuracy, traffic physics constraints, and macroscopic statistical consistency.

3. The method according to claim 2, characterized in that, Based on the cross-scale parameter alignment network, the phase state of traffic flow is identified and phase weights are calculated. The micro-alignment functions corresponding to each phase state are fused, and a candidate micro-parameter distribution conditioned on the macro-state is output, including: The macroscopic traffic data to be mapped is input into the trained cross-scale parameter alignment network to obtain a shared latent space representation. Based on the macroscopic velocity and density in the shared potential space representation, identify the target phase of the current traffic flow; Based on the distance between the target phase state and the preset boundaries of free flow, synchronous flow and congested flow phase states, calculate the non-negative normalized fusion weight corresponding to each phase state; According to the non-negative normalized fusion weight, the predefined micro-alignment functions of each phase state are weighted and fused to obtain the phase state adaptive global alignment function. Based on the shared latent space representation and the global alignment function, the candidate microscopic parameter distribution is output.

4. The method according to claim 3, characterized in that, Based on the micro-parameters obtained by sampling the candidate micro-parameter distribution, a cyclic consistency check is performed from macro to micro decoding and from micro simulation aggregation to macro to determine the feasible region of parameter consistency, including: Obtain the original macroscopic traffic state, and based on the microscopic parameters sampled from the candidate microscopic parameter distribution, perform macroscopic-to-microscopic decoding from the original macroscopic traffic state to the microscopic parameters; Based on the micro parameters obtained by sampling the candidate micro parameter distribution, the micro parameters are input into a pre-constructed micro simulation module for simulation and deduction. The simulation output results are aggregated and statistically analyzed to restore the simulation macroscopic statistical state. Obtain the original macroscopic traffic state, compare the simulated macroscopic statistical state with the original macroscopic traffic state, and calculate the cyclic consistency error; If the cycle consistency error exceeds a preset cycle error threshold, an alignment correction mechanism is triggered to update the shared latent space representation until the error converges. Set the traffic flow conservation constraint deviation threshold, vehicle following behavior constraint deviation threshold, basic graph boundary condition constraint deviation threshold, macroscopic statistical consistency error threshold, and distribution dispersion interval; Parameter samples that simultaneously satisfy the conservation constraint deviation, car-following behavior constraint deviation, boundary condition constraint deviation, and macroscopic statistical error all within the corresponding threshold range, and whose parameter distribution dispersion is located within the specified dispersion interval, are identified as the parameter consistency feasible region.

5. The method according to claim 1, characterized in that, Real-time macroscopic traffic observation data is acquired and input into the cross-scale parameter alignment network. Under the parameter consistency feasible region constraint, a candidate domain of microscopic parameters for the current time is generated, including: Obtain real-time macroscopic traffic observation data; The real-time macroscopic traffic observation data is input into the cross-scale parameter alignment network to generate a candidate distribution of target microscopic parameters corresponding to the real-time macroscopic traffic observation data; Centered on the mean of the target micro-parameter candidate distribution, and combined with the preset range coefficient and distribution standard deviation, the parameter value range is determined. The intersection of the parameter value range and the parameter consistency feasible region is taken to generate the micro-parameter candidate domain at the current time.

6. The method according to claim 1, characterized in that, Based on the candidate domain of microscopic parameters, an objective function is constructed, and the optimal microscopic driving behavior parameter solution is output using the objective function. The optimal microscopic driving behavior parameter solution is then subjected to microscopic simulation aggregation deviation verification, including: Within the candidate domain of micro parameters, a joint optimization objective function is constructed using macro statistical consistency error, micro trajectory likelihood error, phase behavior prior error, and parameter smoothing error. The objective function is then solved to obtain the optimal micro driving behavior parameter solution. The optimal microscopic driving behavior parameter solution is input into the microscopic simulation system, and the output results are aggregated and statistically analyzed to generate a simulated macroscopic traffic state. Calculate the co-occurrence deviation between the simulated macroscopic traffic conditions and the real-time macroscopic observation data; If the collaborative deviation exceeds the preset collaborative deviation threshold, the boundary shrinkage of the candidate domain of the micro parameters or the reassignment of the weight coefficients of each error in the objective function is triggered. Based on the adjusted candidate domain or weight coefficients, the parameters are solved again, and the micro simulation aggregation and collaborative deviation calculation are re-executed until the collaborative deviation meets the requirements of the preset collaborative deviation threshold. For the optimal micro-driving behavior parameter solution that meets the preset collaborative deviation threshold after verification and correction, perform micro-simulation aggregation deviation verification.

7. The method according to claim 1, characterized in that, The stability of the simulation aggregation results is verified on the validated parameter solutions. The parameter update step size is adaptively adjusted according to the sensitivity of each parameter to the simulation output index. At the same time, cross-cycle cumulative calibration is performed on the macroscopic basic graph parameters to obtain the calibrated microscopic parameter set, including: Substitute the verified parameter solution into the current microscopic simulation window and run it. Calculate the deviation between the macroscopic result of the simulation aggregation output and the current macroscopic observation result. If the deviation meets the preset convergence threshold, the stability verification is determined to be successful. Calculate the normalized sensitivity of each micro-parameter to be calibrated to the simulation output index, and perform inverse adaptive adjustment based on the update step size corresponding to the normalized sensitivity; The macroscopic basic graph parameters are grouped according to link type. The ratio of the observed value to the simulated value of each link in the group is calculated as the single link calibration factor. The geometric mean of the single link calibration factors in the group is taken to obtain the group-level calibration factor. Based on the group-level calibration factor, the macroscopic basic graph parameters are updated in multiple rounds. The update results of the macroscopic basic graph parameters are then pruned using preset single-round update intervals and cross-round cumulative intervals to obtain the updated macroscopic basic graph parameters. The abnormal detection data and abnormal trajectory data input in real time are isolated and removed to eliminate their interference with the current parameter update; Based on the observation results after removing outlier data, the adjusted parameter update step size, and the updated macroscopic basic graph parameters, the current microscopic parameter set is finally updated to obtain the calibrated microscopic parameter set.

8. The method according to claim 1, characterized in that, After obtaining the calibrated set of micro parameters, the method further includes: Obtain the current macroscopic observation statistical state, and the equivalent macroscopic statistical state obtained by aggregating the calibrated microscopic parameter set through microscopic simulation; Calculate the residual total deviation between the macroscopic observation statistical state and the equivalent macroscopic statistical state; The residual total deviation is decomposed into four types of deviation components: parameter deviation, aggregated sampling deviation, random fluctuation, and structural difference. Each of the aforementioned deviation components is quantified and estimated, and corresponding processing instructions are generated based on the threshold determination results of each deviation component.

9. The method according to claim 8, characterized in that, Each of the aforementioned deviation components is quantified and estimated, and corresponding processing instructions are generated based on the threshold determination results of each deviation component, including: Based on the residual total deviation, multiple repeated simulations are performed, and the random fluctuation component is obtained by quantifying the aggregated flow in each simulation. Calculate the difference between the mean aggregated traffic in the current aggregation window and the extended reference window, and combine the standard deviation of the traffic samples in the current window with the number of valid samples to calculate the aggregation sampling bias component; Call the offline fitted density-related structural difference compensation function and calculate the structural difference components in combination with the current density value; The parameter deviation component is obtained by subtracting the random fluctuation component, the aggregated sampling deviation component, and the structural difference component from the residual total deviation. When the parameter deviation component exceeds a preset threshold, a parameter callback correction instruction is generated; when the aggregated sampling deviation component exceeds a preset threshold, an aggregated statistical window expansion instruction is generated; the structural difference component is corrected online through the compensation function without triggering micro-parameter adjustment; the random fluctuation component is determined as an acceptable error and no parameter adjustment instruction is generated.

10. The method according to claim 8, characterized in that, The method further includes: The calibrated set of micro parameters is aggregated and restored to the simulated macroscopic statistical state, and a reverse consistency check is performed on the simulated macroscopic statistical state using a preset macroscopic model. If the reverse verification deviation exceeds a preset threshold, it is determined that the offline mapping of the cross-scale parameter alignment network is not suitable for the current scenario, and a mapping retraining prompt is output.

11. An online calibration device for co-calibrating driving parameters for macro- and micro-simulation consistency, characterized in that, include: The first processing module is used to input macroscopic data containing flow rate, speed, density and basic map parameters, and microscopic data containing historical microscopic driving parameter samples into a preset encoder and map them to the same shared latent space to obtain macroscopic latent space vectors and microscopic latent space vectors. The second processing module is used to construct a joint loss function based on the macroscopic latent space vector and the microscopic latent space vector, which integrates data-driven alignment loss, traffic flow physical constraint loss and macroscopic statistical consistency loss, and to train a cross-scale parameter alignment network based on the joint loss function. The third processing module is used to identify the phase state of traffic flow and calculate the phase state weight based on the cross-scale parameter alignment network, fuse the micro-alignment functions corresponding to each phase state, and output the candidate micro-parameter distribution based on the macro-state. The fourth processing module is used to perform a cyclic consistency check from macro to micro decoding and from micro simulation aggregation to macro based on the micro parameters obtained by sampling the candidate micro parameter distribution, and to determine the feasible domain of parameter consistency. The fifth processing module is used to acquire real-time macroscopic traffic observation data and input it into the cross-scale parameter alignment network to generate the microscopic parameter candidate domain at the current time under the parameter consistency feasible domain constraint. The sixth processing module is used to construct an objective function based on the candidate domain of micro parameters, output the optimal micro driving behavior parameter solution using the objective function, and perform micro simulation aggregation deviation verification on the optimal micro driving behavior parameter solution. The seventh processing module is used to perform stability verification of the simulation aggregation results of the verified parameter solutions, adaptively adjust the parameter update step size according to the sensitivity of each parameter to the simulation output index, and perform cross-cycle cumulative calibration on the macroscopic basic graph parameters to obtain the calibrated microscopic parameter set.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 10.

13. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 10.