A method and system for physical-enhanced large language model-based car following on curved road segments
Patent Information
- Application Number
- CN202610740514.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-09-25
AI Technical Summary
[0005]尽管少数研究尝试将车道变换或道路几何纳入模型,但大多数仍局限于纵向一维分析
[0042]本发明提升了弯道建模精度与安全性:通过采用路线自适应跟驰模型,特别是引入包含道路曲率 和超高
的加速度控制项
,本发明方法能够更真实地反映弯道几何对驾驶行为的约束作用。如具体实施方式及附图4所示,其在弯道路段的安全裕度(SM)相比未考虑几何约束的原始ES3模型提升了7.8%,位置预测均方误差(MSE)降低了4.7%,在安全关键场景下展现出了更优的碰撞避免能力。
Smart Images

Figure CN122808753A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent transportation and artificial intelligence technology, specifically relating to a method and system for car following on curved road sections based on a physically enhanced large language model. Background Technology
[0002] Car-following dynamics is a fundamental mechanism in microscopic traffic flow theory describing longitudinal vehicle interactions. Accurate characterization of car-following behavior is crucial for traffic state estimation and traffic safety. Existing research is mainly divided into physics-driven models and data-driven models, but each has its limitations.
[0003] Early physics-driven models (such as Newell, Gipps, IDM, and OVM) were based on explicit mathematical formulas and were highly interpretable. However, these models relied on rigorous theoretical assumptions, had limited simulation accuracy in complex scenarios, and generally ignored the constraints of road geometry (such as planar curvature and superelevation) on car-following behavior. On curved road sections, relying solely on scalar state variables such as speed, relative speed, and spacing cannot accurately describe the lateral stability limitations of vehicles, potentially leading to collision risks in the simulation results.
[0004] In recent years, data-driven models, especially deep learning-based methods, have achieved high accuracy in car-following behavior simulation thanks to their powerful pattern recognition capabilities. However, their "black box" nature leads to poor interpretability, failing to provide a physical explanation for behavioral decisions. Emerging Large Language Models (LLMs) have shown great potential in processing sequential data and cross-domain reasoning, providing a new paradigm for car-following modeling. However, effectively bridging the gap between time-series trajectory data and natural language modalities, and combining it with prior physical knowledge, remains a significant challenge.
[0005] Although a few studies have attempted to incorporate lane changes or road geometry into the model, most remain limited to longitudinal one-dimensional analysis. Therefore, there is an urgent need for a new car-following modeling method that can integrate the interpretability of physical models with the high accuracy of data-driven models (especially large language models) and explicitly handle the geometric constraints of curved road segments. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a method and system for car-following modeling on curved road sections based on a physically enhanced large language model. The aim is to combine the prior knowledge of the physical model with the strong representational capabilities of the large language model to achieve accurate, safe, and interpretable modeling of car-following behavior on curved road sections.
[0007] Technical solution: This invention discloses a method for car following on curved road sections based on a physically enhanced large language model, specifically as follows:
[0008] An adaptive car-following model is constructed as a physical information model to calculate acceleration and introduce geometrically related acceleration control terms. The acceleration and acceleration control terms are combined, and the future state of the car-following vehicle is recursively deduced through discrete-time kinematic equations.
[0009] A data-driven model based on a large language model is constructed. Adaptive patch reprogramming is used to map the time-series data of the car-following trajectory to the semantic space to obtain the patch embedding matrix. At the same time, prefix prompts are used to guide the large language model to understand the data background and task in order to extract complex spatiotemporal features in the trajectory data. The patch embedding matrix and prefix prompts are concatenated and input into the data-driven model to output the predicted trajectory of the vehicle.
[0010] We design an adaptive composite loss function to collaboratively optimize the physical information model and the data-driven model, enabling the physical information model to guide the data-driven model to output a reasonable vehicle prediction trajectory.
[0011] Furthermore, using the ES3 model as the car-following model, the acceleration expression is:
[0012] ;
[0013] Where t represents time, and n represents the nth vehicle, i.e., the following vehicle. For driver reaction time, For free flow velocity, Sensitivity coefficient For shape parameters, This is the sensitivity coefficient for spacing deviation. For driver reaction time, To keep up with the speed of the vehicle, To correspond to the current speed steady-state spatial spacing, To maintain the distance between following vehicles and the vehicle in front .
[0014] Furthermore, the expression for the acceleration control term is as follows:
[0015] ;
[0016] in, For the road at all times The real-time radius, and For the parameters to be calibrated, , Dimensionless To correspond to the current vehicle speed The minimum safe turning radius is calculated using the following formula:
[0017] ;
[0018] in, It is the acceleration due to gravity. For roads with a super-high percentage, The coefficient of lateral friction is denoted as .
[0019] Furthermore, it will accelerate. With acceleration control items By combining these methods, the future state of the following vehicle is recursively deduced using discrete-time kinematic equations:
[0020] ;
[0021] ;
[0022] in, for Always keep track of the vehicle's location. for Always keep up with the speed of the vehicles. For time intervals, To keep up with the speed of the car, for It constantly tracks the vehicle's location. Furthermore, it analyzes the input data... Normalization is performed, and the normalized data is divided into multiple fixed-length patches. Each patch is then mapped to a high-dimensional feature space through a linear embedding layer to obtain the patch embedding matrix. A linear layer is used to embed the original words of the language model into a matrix. Mapped to This yields a semantic space containing general text prototypes. Then, through multi-head cross-attention computation, the patch embedding vectors are reprogrammed into this semantic space.
[0023] ;
[0024] ;
[0025] in, For the first Trainable projection matrices for each attention head Let k be the query matrix of the attention head. For the first The key matrix of each attention head. For the first The value matrix of each attention head, The dimension is defined for each attention head; the outputs of each attention head are concatenated and then linearly projected to obtain the final reprogramming patch embedding matrix. Throughout the reprogramming process, all parameters of the large language model remain frozen.
[0026] Furthermore, the prefix prompts include task instructions, dataset background, road environment, and input data statistics; the input data statistics include maximum speed, minimum speed, median speed, and overall trend.
[0027] Furthermore, the expression for the adaptive composite loss function is as follows:
[0028] ;
[0029] in, For data-driven loss, For physical information loss:
[0030] ;
[0031] in, The output of the data-driven model at the i-th time step. This represents the actual trajectory at the i-th time step; The number of time steps for prediction;
[0032] ;
[0033] in, This is the output of the physical information model at the i-th time step.
[0034] A curve-following system based on a physically enhanced large language model includes:
[0035] The data input module is used to acquire and preprocess the historical trajectory data of the target vehicle and the vehicle in front of it, as well as the road curvature and superelevation data of the corresponding road segment;
[0036] The physical information model module, with a built-in adaptive car-following model, receives input data and calculates a physical reference trajectory that conforms to the geometric constraints of the curve based on physical laws. ;
[0037] The data-driven model module incorporates a large language model based on adaptive patch reprogramming and prefix suggestion engineering. This model receives input data, extracts deep temporal features, and outputs data-driven predicted trajectories. ;
[0038] The fusion optimization module is used to calculate the adaptive composite loss function and, based on this loss function, collaboratively train and optimize the parameters of the physical information model module and the data-driven model module to generate the final high-precision, high-reliability car-following trajectory prediction result.
[0039] A computer device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method.
[0040] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method.
[0041] Beneficial effects:
[0042] This invention improves the accuracy and safety of curve modeling by employing a route adaptive car-following model, particularly by introducing a model that incorporates road curvature. and super high Acceleration control item The method of this invention can more realistically reflect the constraint effect of curve geometry on driving behavior. See the specific embodiments and appendices. Figure 4 As shown, its safety margin (SM) on curved road sections is improved by 7.8% compared to the original ES3 model without considering geometric constraints, and the mean square error of position prediction (MSE) is reduced by 4.7%, demonstrating superior collision avoidance capability in safety-critical scenarios.
[0043] Advantages of integrating physics and data: This invention employs a framework and a fusion model, and in particular, designs an adaptive composite loss function. This invention resolves the contradiction between the limited accuracy of physical models and the lack of interpretability in data-driven models. During training, this loss function can dynamically sense the loss of physical information. and data-driven loss The changes in the data are automatically adjusted and optimized, achieving synergy between physical knowledge and data-driven learning. The final output of the car-following behavior prediction results balances accuracy and physical rationality.
[0044] Efficient Application of Large Language Models: This invention utilizes data-driven modeling, particularly adaptive patch reprogramming and prefix suggestion engineering techniques. Without updating the main parameters of large language models such as Qwen3-32B, this invention effectively maps time-series trajectory data to the language model space and guides it to complete carousel prediction tasks simply by training a lightweight input / output adaptation module. This method significantly reduces computational overhead while maintaining performance, thus improving practicality.
[0045] Wide adaptability: The basic car-following model of this invention is replaceable, allowing for flexible selection of the most suitable physical model based on specific application scenarios (such as different road grades and different traffic flow states). Furthermore, as shown in the specific embodiments, extensive testing with numerous car-following samples demonstrates that the method of this invention maintains stable performance in diverse traffic scenarios, exhibiting high robustness. Attached Figure Description
[0046] Figure 1 This is a schematic diagram illustrating the motivation and core idea of the present invention.
[0047] Figure 2 This is a diagram showing the overall structure of the physical enhancement large language model framework of this invention.
[0048] Figure 3 This is an example diagram of the prefix hint structure used to guide a large language model in this invention.
[0049] Figure 4 These are comparison diagrams of the collision avoidance trajectories of various models for following vehicles in different scenarios in the embodiments of the present invention. Among them, (a) is a comparison diagram of the collision avoidance trajectories of following vehicles with an initial speed of 10m / s and an initial distance of 50m, (b) is a comparison diagram of the collision avoidance trajectories of following vehicles with an initial speed of 10m / s and an initial distance of 100m, (c) is a comparison diagram of the collision avoidance trajectories of following vehicles with an initial speed of 20m / s and an initial distance of 150m, and (d) is a comparison diagram of the collision avoidance trajectories of following vehicles with an initial speed of 20m / s and an initial distance of 200m. Detailed Implementation
[0050] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0051] This embodiment provides a method for car-following modeling on curved road sections based on a physically enhanced large language model. Its overall framework is shown in the appendix to the specification. Figure 2 As shown, it comprises three core components: a physical information model, a data-driven model, and a fusion model. The following details the specific implementation steps:
[0052] Step 1: Data Acquisition and Preprocessing
[0053] This embodiment uses the Zen Traffic Data (ZTD) dataset for validation. This dataset was acquired using a computer vision system at a temporal resolution of 0.1 seconds, capturing vehicle trajectories on the Hanshin Expressway Line 11 in Japan. The selected study section is approximately 2 kilometers long and includes radii of [missing information]. and The dataset provides both the vehicle's micro-kinematic information (position, velocity, etc.) and the road's geometric parameters.
[0054] Data filtering follows these guidelines:
[0055] (1) The duration of the car-following behavior is at least 180 seconds;
[0056] (2) The minimum headway between vehicles is less than 10 meters to ensure that traffic flow dynamics are captured;
[0057] (3) No lane-changing behavior occurred between the preceding and following vehicles during the observation period.
[0058] After the above screening process, a total of 2067 valid car-following pairs were obtained. Subsequently, all samples were randomly divided into training and test sets in a 7:3 ratio, with the training set used for model parameter optimization and the test set used for final performance evaluation.
[0059] In this embodiment, the model's input data Defined as historical time step The following trajectory time series data includes the speed of the following vehicle. (That is, the speed of the following vehicle), relative speed (Refers to the relative speed between the following vehicle and the vehicle in front), spatial distance (Refers to the distance between following vehicles and the vehicle in front), real-time road radius and road superelevation The model's prediction objective Defined as the future The sequence of vehicle positions at each time step. Time interval. The interval is fixed at 0.1 seconds, consistent with the data acquisition frequency.
[0060] Step 2: Constructing and training the physical information model
[0061] This step aims to construct a physical information model capable of explicitly responding to changes in road geometry. This model consists of two parts: a basic car-following model and geometry-dependent acceleration control terms. The specific implementation details are described below.
[0062] 2.1 Selecting the Basic Car-Following Model
[0063] This embodiment selects the Extended S3 (ES3) Car-Following Model as the base model. This model is an improvement on the original S3 Car-Following Model, addressing the latter's issues related to relative speed. The acceleration is forced to zero and the vehicle speed is ignored. Two major microscopic defects have an impact. The acceleration calculation formula for the ES3 model is:
[0064]
[0065] in, For free flow velocity, Sensitivity coefficient For shape parameters, This is the sensitivity coefficient for spacing deviation. For driver reaction time, To correspond to the current speed The steady-state spatial spacing is determined by introducing a spacing deviation correction term, which allows the vehicle to adjust its acceleration and deceleration based on the difference between the actual spacing and the steady-state spacing even when the relative speed is zero, thus more realistically depicting micro-car-following behavior.
[0066] 2.2 Construction of Geometrically Dependent Acceleration Control Terms
[0067] To simulate the physical constraints of curved road sections on driving behavior, a geometrically dependent acceleration control term is introduced. This control term, based on the principles of vehicle lateral dynamics, quantifies the suppressive effect of curve curvature and superelevation on the longitudinal acceleration of the vehicle. Its mathematical expression is as follows:
[0068]
[0069] in, For the road at all times The real-time radius, (>0, unit is m / s²) and (Dimensionless) represents the parameter to be calibrated. To correspond to the current vehicle speed The minimum safe turning radius is calculated using the following formula:
[0070]
[0071] in, Let gravitational acceleration be the acceleration due to gravity, and its value be [value]. ; The percentage of roads exceeding the standard height; The lateral friction coefficient is 0.6 in this embodiment. When the vehicle enters a curve with a small radius or travels at a high speed, The ratio increases, This will produce a significant deceleration value, thereby correcting the unsafe acceleration behavior that the base car-following model may produce in cornering scenarios.
[0072] 2.3 Generation of Physical Reference Trajectory
[0073] Acceleration calculated from the basic ES3 model With acceleration control items By combining these methods, the future state of the following vehicle is recursively deduced using discrete-time kinematic equations. Specifically, within a time interval... (In this embodiment, the time is fixed at 0.1 seconds) The formulas for updating the vehicle's speed and position are as follows:
[0074]
[0075]
[0076] Through the above iterative process, a physical reference trajectory that takes into account road geometric constraints can be generated, denoted as... To achieve end-to-end training, this embodiment introduces a lightweight neural network module for dynamically aggregating and updating the parameters to be calibrated in the physical model (including those of the ES3 model) during training. and control items The initial parameters of this module are pre-estimated based on the specific traffic scenario and are updated in real time during training as the loss function backpropagates.
[0077] Step 3: Building and Training Data-Driven Models
[0078] This step aims to leverage the temporal processing capabilities of Large Language Models (LLMs) to construct a data-driven model that captures complex spatiotemporal dependency patterns in trajectory data. Qwen3-32B was chosen as the backbone LLM, achieving a good balance between computational efficiency and carousel feature extraction capabilities. The construction process mainly includes two key technical steps: adaptive patch reprogramming and prefix hint engineering.
[0079] 3.1 Adaptive Patch Reprogramming
[0080] First, the input multivariable car trail time series data... Reversible instance normalization is performed to give the model zero mean and unit standard deviation to mitigate distribution bias during training. The mean and standard deviation used in the normalization process are stored for subsequent denormalization of the model output to restore the original physical dimensions.
[0081] Subsequently, the normalized data was divided into multiple fixed-length segments. The patches form a patch matrix. ,in Let be the total number of patches. Each patch is mapped to a high-dimensional feature space through a linear embedding layer to obtain the patch embedding. ,in For the embedded dimension.
[0082] To address the fundamental differences between time-series data and natural language modalities, this embodiment employs a multi-head cross-attention mechanism, utilizing the word embedding matrix of a pre-trained large language model. ( For vocabulary, To construct a compact text prototype space (for hidden dimensions), first, a linear layer is used... Mapped to ,in This is used to construct a compact semantic space containing general text prototypes (such as acceleration, deceleration, etc.). Subsequently, the temporal patch embedding vectors are reprogrammed into this natural language semantic text prototype space through the following multi-head cross-attention computation:
[0083]
[0084]
[0085] in, For the first Trainable projection matrices for each attention head The dimension is defined for each attention head. The outputs of each attention head are concatenated and then linearly projected to obtain the final reprogramming patch representation. Throughout the reprogramming process, all parameters of the backbone large language model Qwen3-32B remain frozen, and only the trainable projection matrix and linear embedding layer are updated, thereby achieving cross-modal transfer learning in a parameter-efficient manner.
[0086] 3.2 Prefix Hint Project
[0087] To further guide the large language model in understanding specific car-following prediction tasks and data features, a structured prefix hint was constructed. This hint, presented in natural language, mainly comprises the following four parts:
[0088] (1) Task Instructions: Clearly inform the model that it is simulating a car-following vehicle and needs to predict the position of the vehicle in the next time step based on the provided trajectory of the preceding vehicle, historical information, and road environment. For example: Simulate a car-following vehicle. The system will provide the trajectory of the preceding vehicle, data of several historical time steps of the car-following vehicle, and road environment information. The model needs to follow the preceding vehicle and predict the trajectory for the next 5 time steps based on this information.
[0089] (2) Dataset Background: Explain the source of the input data, the sampling interval (0.1 seconds), and the specific meaning of each feature dimension. For example: The input data is vehicle trajectory data, and the sampling interval is 0.1 seconds. Each data point contains features such as vehicle speed and position.
[0090] (3) Road Environment: Describe the geometric characteristics of the current road segment in detail. For example: This road segment contains two lanes. The curvature ranges from 0 (straight road) to... The section from 38.9 meters to 65.2 meters is a curved section with a radius of 475 meters.
[0091] (4) Input Data Statistics: Provides summary statistics of the current batch of data, such as the highest speed, lowest speed, median speed, and overall trend. For example: The highest speed of the input trajectory is 30 m / s, the lowest speed is 5 m / s, and the median speed is 17 m / s. The overall trend is upward.
[0092] A specific example of the above prompt structure is shown in the appendix to the instruction manual. Figure 3 As shown.
[0093] 3.3 Trajectory Prediction Output
[0094] The reprogrammed patch is embedded and concatenated with the constructed prefix hints, and then fed into the parameter-frozen Qwen3-32B model. After model processing, the output representation corresponding to the prediction time step is extracted, flattened, and mapped back to the original physical space through a linear layer. Inverse normalization is then performed to restore the dimensions, ultimately yielding the predicted trajectory of the data-driven model. .
[0095] Step 4: Integration Training and Optimization
[0096] This step involves designing an adaptive composite loss function to collaboratively optimize the aforementioned physical information model and data-driven model during training, thereby achieving complementary advantages between the two.
[0097] 4.1 Definition of Loss Function
[0098] First, define data-driven loss. Output for data-driven models Compared with the actual observed trajectory Mean squared error (MSE) between:
[0099]
[0100] Secondly, define physical information loss. Output for data-driven models Output of physical information model Mean squared error (MSE) between:
[0101]
[0102] in, This represents the number of time steps for prediction. The two loss terms mentioned above constrain the model from the perspectives of data fitting accuracy and physical consistency, respectively.
[0103] 4.2 Construction of the Adaptive Composite Loss Function
[0104] To avoid the bias and suboptimal problems caused by manually setting fixed weights, this embodiment designs an adaptive weighting mechanism based on the Softmax structure. The final adaptive composite loss function... Defined as:
[0105]
[0106] The core idea of this mechanism is to automatically perceive the relative performance of two model components at each step of training and assign a larger weight to the component that is currently performing worse (i.e., has a larger loss value). For example, when the predictions of the data-driven model deviate significantly from physical constraints, Increase its weighting factor in the total loss. The corresponding increase drives the optimization process to prioritize correcting physical inconsistencies, and vice versa.
[0107] 4.3 Training Process
[0108] During training, gradient descent and backpropagation are used to update only the parameters of the neural network portion used for parameter management in the physical information model and the trainable modules (including the embedding layer, linear projection layer, and output projection layer) in the data-driven model. The weights of the backbone large language model Qwen3-32B are kept frozen throughout. Through repeated iterations until the model converges, the synergistic effect of the two models is ultimately achieved.
[0109] Step 5: Performance Evaluation and Application
[0110] 5.1 Evaluation Indicators and Results:
[0111] The evaluation metrics used in this embodiment include the mean square error (MSE) of position prediction and the safety margin (SM). The safety margin (SM) is a quantitative indicator of following risk that is negatively correlated with the collision probability; a higher value indicates higher safety. The calculation formula is as follows:
[0112]
[0113] Experimental results show that the PILLM-CFF method of this invention (using the Qwen3-32B backbone) achieves a position MSE of 0.389, which is approximately 4.7% lower than that of the route adaptive car-following physical model alone (0.408); and a safety margin SM of 0.954, which is 2.7% and 7.8% higher than that of the physical model (0.929) and the original ES3 model (0.885), respectively. These results verify that the method of this invention is effective in improving prediction accuracy and enhancing curve safety.
[0114] 5.2 Verification of Safety-Critical Scenarios
[0115] To further evaluate the model's performance under extreme conditions, this embodiment includes a safety-critical scenario test. This scenario assumes the preceding vehicle remains stationary, testing the collision avoidance capability of the following vehicle at different initial speeds and distances. Specifically, four sets of conditions are set:
[0116] (1) Initial velocity 10 m / s, initial distance 50 m;
[0117] (2) Initial velocity 10 m / s, initial distance 100 m;
[0118] (3) Initial velocity 20 m / s, initial distance 150 m;
[0119] (4) Initial velocity 20 m / s, initial distance 200 m.
[0120] As per the instruction manual Figure 4 As shown, in all four operating conditions, vehicles following the car using the PILLM-CFF method of this invention (based on Qwen3-32B) were able to begin braking earlier and decelerate to a stop more smoothly than baseline methods (such as the original ES3 model and a separate route adaptive physics model), ultimately maintaining a greater safe distance from the stationary vehicle in front. The advantages of this invention are particularly evident in emergency situations with high initial speeds and short initial distances. This strongly demonstrates that the method of this invention possesses superior collision avoidance capabilities and reasonable physical behavior in safety-critical scenarios.
[0121] Ultimately, the trained model can be deployed on autonomous vehicles or traffic simulation platforms. In practical applications, after real-time acquisition or simulation of vehicle state and road geometry data is input into the model, it can output high-precision and physically reasonable behavioral decisions (such as expected acceleration) or future trajectory prediction results online, providing reliable technical support for vehicle adaptive cruise control, traffic flow simulation of complex road networks, and traffic safety management.
[0122] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.
[0123] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.
[0124] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the methods described in the above embodiments.
[0125] It is understood that the systems, devices, and storage media provided in the embodiments of the present invention correspond to the methods provided in the embodiments of the present invention, and the explanations, examples, and beneficial effects of the relevant content can be referred to the corresponding parts of the above methods.
[0126] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0127] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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. Without further limitations, 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 said element.
[0128] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0129] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0130] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the present invention will not describe the various possible combinations separately.
Claims
1. A method for following a car on a curved road segment based on a physically enhanced large language model, characterized in that, Specifically: An adaptive car-following model is constructed as a physical information model to calculate acceleration and introduce geometrically related acceleration control terms. The acceleration and acceleration control terms are combined, and the future state of the car-following vehicle is recursively deduced through discrete-time kinematic equations. A data-driven model based on a large language model is constructed. Adaptive patch reprogramming is used to map the time series data of the car-following trajectory to the semantic space to obtain the patch embedding matrix. At the same time, prefix prompts are used to guide the large language model to understand the data background and task in order to extract complex spatiotemporal features in the trajectory data. The patch embedding matrix and prefix prompts are concatenated and input into the data-driven model to output the predicted trajectory of the vehicle. We design an adaptive composite loss function to collaboratively optimize the physical information model and the data-driven model, enabling the physical information model to guide the data-driven model to output a reasonable vehicle prediction trajectory.
2. The method for car following on curved road sections based on a physically enhanced large language model according to claim 1, characterized in that, Using the ES3 model as the car-following model, the acceleration expression is: ; Where t represents time, and n represents the nth vehicle, i.e., the following vehicle. For driver reaction time, For free flow velocity, Sensitivity coefficient For shape parameters, This is the sensitivity coefficient for spacing deviation. For driver reaction time, To keep up with the speed of the car, To correspond to the current speed steady-state spatial spacing, To maintain the distance between following vehicles and the vehicle in front .
3. The method for car following on curved road segments based on a physically enhanced large language model according to claim 1, characterized in that, The expression for the acceleration control term is as follows: ; in, For the road at all times The real-time radius, and For the parameters to be calibrated, , Dimensionless To correspond to the current vehicle speed The minimum safe turning radius is calculated using the following formula: ; in, It is the acceleration due to gravity. For roads with a super-high percentage, The coefficient of lateral friction is denoted as .
4. The method for car following on curved road sections based on a physically enhanced large language model according to claim 1, characterized in that, acceleration With acceleration control items By combining these methods, the future state of the following vehicle is recursively deduced using discrete-time kinematic equations: ; ; in, for Always keep track of the vehicle's location. for Always keep up with the speed of the vehicles. For time intervals, To keep up with the speed of the car, for Always keep track of the vehicle's location.
5. The method for following a car on a curved road segment based on a physically enhanced large language model according to claim 1, characterized in that, For the input data Normalization is performed, and the normalized data is divided into multiple fixed-length patches. Each patch is then mapped to a high-dimensional feature space through a linear embedding layer to obtain the patch embedding matrix. ; A linear layer is used to embed the original words of the language model into a matrix. Mapped to This yields a semantic space containing general text prototypes. Then, through multi-head cross-attention computation, the patch embedding vectors are reprogrammed into this semantic space. ; ; in, For the first Trainable projection matrices for each attention head Let k be the query matrix of the attention head. For the first The key matrix of each attention head. For the first The value matrix of each attention head, The dimension is defined for each attention head; the outputs of each attention head are concatenated and then linearly projected to obtain the final reprogramming patch embedding matrix. Throughout the reprogramming process, all parameters of the large language model remain frozen.
6. The method for car following on curved road segments based on a physically enhanced large language model according to claim 1, characterized in that, The prefix prompts include task instructions, dataset background, road environment, and input data statistics; the input data statistics include maximum speed, minimum speed, median speed, and overall trend.
7. The method for car following on curved road segments based on a physically enhanced large language model according to claim 1, characterized in that, The expression for the adaptive composite loss function is as follows: ; in, For data-driven loss, For physical information loss: ; in, The output of the data-driven model at the i-th time step. This represents the actual trajectory at the i-th time step; The number of time steps for prediction; ; in, This is the output of the physical information model at the i-th time step.
8. A curve-following system based on a physically enhanced large language model, characterized in that, include: The data input module is used to acquire and preprocess the historical trajectory data of the target vehicle and the vehicle in front of it, as well as the road curvature and superelevation data of the corresponding road segment; The physical information model module, with a built-in adaptive car-following model, receives input data and calculates a physical reference trajectory that conforms to the geometric constraints of the curve based on physical laws. ; The data-driven model module incorporates a large language model based on adaptive patch reprogramming and prefix suggestion engineering. This model receives input data, extracts deep temporal features, and outputs data-driven predicted trajectories. ; The fusion optimization module is used to calculate the adaptive composite loss function and, based on this loss function, collaboratively train and optimize the parameters of the physical information model module and the data-driven model module to generate the final high-precision, high-reliability car-following trajectory prediction result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.