Parameter optimization method based on large language model and depth deterministic strategy gradient
By combining large-scale language models and the DDPG algorithm to optimize the parameters of the vehicle-to-everything (V2X) system, the problem of balancing vehicle speed and resource reservation intervals was solved, achieving fast and stable AoI minimization in complex scenarios and improving the communication efficiency of the V2X system.
Patent Information
- Application Number
- CN202511106944.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-11-25
AI Technical Summary
Traditional methods struggle to effectively balance vehicle speed and resource reservation intervals to minimize the information age (AoI) of vehicle-to-everything (V2X) systems, especially in scenarios with complex vehicle density and varying channel conditions, leading to communication delays and frequent retransmissions.
By combining a large language model with the Deep Deterministic Policy Gradient (DDPG) algorithm, the parameters are gradually optimized to minimize the system's AoI by optimizing vehicle speed, vehicle density, and resource reservation interval. This is achieved by leveraging the context learning capability of the large language model and the stability of DDPG.
It enables the rapid generation of optimal parameter configurations under different traffic flow conditions, reduces system AoI, solves the problems of high training cost and slow convergence of traditional methods, and ensures optimization stability and fast convergence in complex dynamic scenarios.
Smart Images

Figure CN121013098A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle networking technology, specifically to a parameter optimization method based on a large language model and deep deterministic policy gradient. Background Technology
[0002] The Internet of Vehicles (IoV) plays a crucial role in realizing intelligent transportation systems. In IoV, vehicles communicate with other vehicles, roadside units, and base stations to meet local needs and enhance the driving experience. The dynamic changes in the traffic environment demand low latency and high reliability from onboard tasks, making communication latency a critical indicator for evaluating system performance. However, limited spectrum resources require allocating independent time slices for different onboard tasks, typically resulting in transmission delays after task generation. Considering the latency introduced by scheduling and queuing, traditional communication latency metrics are insufficient to comprehensively reflect system performance. As a novel metric, Age of Information (AoI) measures the time elapsed from data generation to reception, directly reflecting the freshness of information, and thus has gained widespread application.
[0003] The 5G New Radio (NR) V2X standard employs a semi-persistent scheduling (SPS) mechanism to coordinate resource contention among vehicles. Vehicle density in the environment indirectly affects the probability of task conflicts between vehicles. Considering data retransmission, different Resource Reservation Intervals (RRIs) impact resource scheduling performance. Furthermore, during task transmission, high-speed vehicles cause Doppler shift between the vehicle and the base station, altering channel conditions and potentially leading to transmission failures and retransmissions. These factors significantly affect the system's Area of Interest (AoI). Given the complex relationship between vehicle speed and channel conditions, and the interdependence between vehicle density and RRI, especially in fixed traffic flow scenarios where vehicle speed and density are inversely proportional, balancing these parameters to minimize AoI becomes an extremely challenging problem.
[0004] Traditional convex optimization and similar mathematical methods are difficult to solve directly due to variable coupling and complex nested functional relationships. In recent years, with the development of artificial intelligence (AI) technology, deep reinforcement learning models specifically trained for specific tasks and large-scale language models pre-trained on massive amounts of data have provided new approaches to solving complex problems. In particular, large-scale language models can deeply understand task intent and learn knowledge based on context without additional training. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a parameter optimization method based on a large language model and deep deterministic policy gradient.
[0006] To address the aforementioned technical problems, this invention specifically provides the following technical solution: a parameter optimization method based on a large-scale language model and deep deterministic policy gradient, used to optimize the information age of a vehicle-to-everything (V2X) system, comprising the following steps:
[0007] S1. Establish a system model: Consider a vehicle-to-everything (V2X) scenario consisting of multiple vehicles and base stations. Vehicles are distributed along the road at a linear density ρ. Base stations cover the entire scenario and provide services to the vehicles. Vehicles compete for resources based on SPS scheduling. At the same time, consider the impact of the Doppler effect caused by vehicle speed on channel conditions, as well as the effects of vehicle density and resource reservation interval on packet collisions and transmission success rate, and clarify the influencing factors of system AoI.
[0008] S2. Constructing the optimization problem: Combining the channel physical layer state and communication protocol, with the goal of minimizing the system AoI, the optimization variables are determined as vehicle speed, vehicle density and resource reservation interval, and the coupling constraints of vehicle density and vehicle speed under fixed traffic flow and the feasible range constraints of each variable are satisfied.
[0009] S3. Design prompts for large language models: Transform the optimization problem into a textual description, including the task background, objectives, main tasks, output format, and example set, to guide large language models (LLMs) to understand the problem and generate parameter configurations.
[0010] S4. Design a dual-path optimization algorithm:
[0011] Solving by calling large language models LLMs: Based on the prompt input, the context learning capability of large language models LLMs is used to iteratively optimize the parameters and configure the corresponding AoI results until the AoI tends to stabilize.
[0012] The DDPG algorithm is used to solve the problem: the state space, action space and reward function are defined, and the optimal parameter configuration is stably output by DDPG through training;
[0013] The results of the two methods are then compared to determine the final optimal parameters.
[0014] The present invention further defines the technical solution as follows:
[0015] Preferably, in step S1, the AoI of the system consists of two parts: queuing delay from data generation to transmission and transmission delay; wherein, the queuing delay further includes retransmission delay caused by data packet collision and retransmission delay caused by transmission failure, and the transmission delay is calculated based on Shannon's formula, and the vehicle speed and density satisfy the Greenshields linear model, that is, under a fixed traffic flow, the vehicle speed v = Q / m, where Q is the traffic flow constant and m is the number of vehicles.
[0016] Preferably, step S1 further includes: considering that the uncertainty of the wireless channel may lead to transmission failure, in which case the data needs to re-enter the queuing process. Therefore, the channel packet loss rate directly affects the queuing delay. The channel state is modeled as a Markov process: it is divided into ideal state and bad state according to the signal-to-noise ratio, and the channel switches between ideal state and bad state. Specifically, when the SNR is higher than E[SNR] / F (F is the fading margin), the channel is in ideal state; otherwise, it is in bad state.
[0017] At vehicle speed v and carrier frequency fc, the Doppler frequency shift is Where c is the speed of light; and the probability of data packet loss under adverse conditions. The correlation coefficient of the channel under adverse conditions under Doppler frequency shift fd is Where J0 is the zeroth-order Bessel function, and 1 / θ is the data packet transmission time, from which we can obtain The static transition probability of a vehicle-to-everything (V2X) system can be defined by a Markov function as:
[0018]
[0019] Where P p p is the probability that the channel remains in a poor state. i To maintain the probability of an ideal state, let L be the number of link layer frames required for a vehicle to transmit data packets, and let l be the probability of at least one frame failing to transmit under the initial ideal state. L Under the initial adverse conditions, the probability is v. L (Under adverse conditions, the first frame will definitely fail, therefore v) L =1). l i The update equation is:
[0020] l i =p i l i-1 +(1-p i )v L ,
[0021] Among them l i Let represent the probability that at least one of the first i frames fails to transmit. Therefore, the probability of a single data packet being lost in the channel is:
[0022]
[0023] Since data packets can only be transmitted after successful allocation of SPS resources, if transmission fails, the SPS process must be re-entered. Therefore, the transmission success rate directly affects the queuing delay. The queuing time obtained by averaging the vehicle positions is:
[0024]
[0025] Let the amount of data that the vehicle needs to transmit be ω. Based on Shannon's formula, the transmission delay can be obtained as follows:
[0026]
[0027] Where B is the bandwidth, P is the transmit power, G is the channel gain, and N0 is the noise power spectral density, the system AoI can be expressed as:
[0028]
[0029] Preferably, in step S2, an optimization problem is constructed, specifically minimizing the system AoI by optimizing vehicle speed, vehicle density, and RRI value, and its expression is:
[0030]
[0031] ρ min ≤ρ≤ρ max ,
[0032] v min ≤v≤v max ,
[0033] RRI min ≤RRI≤RRI max ,
[0034] Where ρ is vehicle density, v is vehicle speed, RRI is resource reservation interval, and v and ρ satisfy the fixed traffic flow constraint, i.e., v·ρ = constant, and ρ min ρ max v min v max RRI min and RRI max These represent the feasible ranges for vehicle density, speed, and RRI, respectively.
[0035] Preferably, in step S4, the state space of the DDPG algorithm is defined as follows:
[0036] s t =[v t ,ρ t ,RRI t ,p d,t ,PRR t ],
[0037] Among them, v t represents the vehicle speed, ρ t represents the traffic flow density, and p d,t represents the packet loss probability. The vehicle speed and traffic flow density satisfy the constraint conditions of a fixed traffic flow scenario;
[0038] The action space is defined as:
[0039] a t = [RRI t , v t .
[0040] Since the vehicle density can be derived from the vehicle speed and traffic flow constant, the density variable does not need to be included in the action space.
[0041] Preferably, the reward function of the DDPG algorithm is designed as follows:
[0042] Basic reward: Using the negative AoI value as the reward, controlling the numerical range through linear transformation where N1 and N2 are scaling factors;
[0043] Threshold mechanism: First, train to obtain a sub-optimal solution A1, give a higher reward to the decision with AoI < A1, and approximate the exhaustive search result after two iterations.
[0044] Preferably, in S3, the optimization problem is transformed into a text description, including the task background, task objective, main task, output format, and example set. The detailed task designed for the large language model LLM prompt is as follows:
[0045] Task background:
[0046] In the vehicle-mounted network system considered in this task, the AoI of the system consists of queuing delay and transmission delay;
[0047] Vehicles compete for resources through the semi-persistent scheduling (SPS) mechanism. The vehicle density affects the probability of resource conflict. The retransmission interval (RRI) determines the retransmission time interval, and the vehicle speed affects the transmission success rate - if the transmission fails, the data needs to re-enter the SPS queue;
[0048] In a fixed traffic flow scenario, the product of the vehicle speed and vehicle density is constant at 3600;
[0049] The vehicle speed range is [24 - 90] km / h, the vehicle density range is [40 - 150] vehicles / km, and the RRI range is [15 - 30] milliseconds;
[0050] Task objective:
[0051] Minimize AoI by adjusting the values of vehicle density, RRI, and vehicle speed, where vehicle speed equals 3600 divided by vehicle density;
[0052] Main tasks:
[0053] Referring to example decisions and historical decisions with results, logical reasoning is used to determine how to adjust vehicle density, RRI, and vehicle speed to minimize AoI. Based on this reasoning, parameter suggestions for the next iteration are provided.
[0054] Output format:
[0055] Output only the following content without any extra text, replacing 'num' with specific numerical values: Vehicledensity = [num], RRI = [num], Vehicle speed = [num]
[0056] Example decision:
[0057] Provide representative parameter configurations and corresponding AoI values as a reference for LLMs inference.
[0058] Preferably, the context learning capability of the large language model in S4 can be expressed as:
[0059]
[0060] Among them, D task Indicates the task description, ε t Let s be the example set at time t. t It represents the environmental state related to the target task, LLM stands for Large Language Model, and at is the output of LLM.
[0061] Compared with the prior art, the present invention has the following advantages:
[0062] This invention can predict the optimal parameter configuration for different traffic flow scenarios on highways, minimize the system's AoI, and utilize the context learning capability of LLMs to quickly generate initial solutions with a small number of examples without model training, thus solving the problems of "high training cost and slow convergence" in traditional reinforcement learning. Furthermore, it combines the stability advantage of DDPG in continuous action space and achieves long-term stable optimization through state-action-reward design, compensating for the volatility of LLMs in complex dynamic scenarios. The two methods complement each other, ensuring both the rapid convergence of LLMs and the optimization stability of DDPG. Attached Figure Description
[0063] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0064] Figure 1 This is a schematic diagram of the scenario of the present invention;
[0065] Figure 2 The impact of different RRI configurations on AoI performance at different speeds;
[0066] Figure 3 The impact of speed on AoI under different RRI configurations;
[0067] Figure 4 An iterative process for finding the optimal parameter configuration using different methods. Detailed Implementation
[0068] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0069] This invention provides a parameter optimization method based on a large language model and deep deterministic policy gradient for optimizing the information age of a vehicle-to-everything (V2X) system, comprising the following steps:
[0070] S1. Establish a system model: such as Figure 1 As shown, this paper considers a vehicle-to-everything (V2X) scenario consisting of multiple vehicles and base stations. The vehicles are distributed along the road at a line density ρ, and the base stations cover the entire scenario and provide services to the vehicles. The vehicles compete for resources based on SPS scheduling. The paper also considers the impact of the Doppler effect caused by vehicle speed on channel conditions, as well as the effects of vehicle density and resource reservation interval on packet collisions and transmission success rate, and clarifies the influencing factors of the system AoI.
[0071] The system's AoI consists of two parts: queuing delay from data generation to transmission and transmission delay. The queuing delay further includes retransmission delay caused by packet collision and retransmission delay caused by transmission failure. The transmission delay is calculated based on Shannon's formula, and the vehicle speed and density satisfy the Greenshields linear model, that is, under a fixed traffic flow, the vehicle speed v = Q / m, where Q is the traffic flow constant and m is the number of vehicles.
[0072] The total information age of the system can be expressed as:
[0073] A = T q +T t (1.19)
[0074] Where Tq is the queuing time and Tt is the transmission time.
[0075] Considering a scenario with fixed traffic flow and a finite-length highway segment, the highway range can be represented as [-L, L], where L represents half the road length. The set of all vehicles in the environment can be described as M = {1, 2, 3, ..., m}. Assuming the current vehicle density is ρ, the number of vehicles m can be calculated as v = ρ * 2 * L, and vehicle speed can be defined as a random variable. However, traffic flow theory indicates that when modeling highway traffic flow, there is usually a certain relationship between vehicle speed and traffic density. In particular, Greenshields first proposed a famous linear model describing the relationship between vehicle speed and traffic density. Based on this, assuming the traffic flow on the highway is Q, the vehicle speed can be calculated as: v = Q / m. All vehicles in the environment communicate using the SPS method. Assuming a vehicle's perception range is Rs, for a specific vehicle n, assuming the distance between vehicles remains constant and ignoring terminal effects, only considering the perception range on one side of the vehicle, the number of vehicles within that range can be expressed as Ns / 2 = ρ*Rs. The distance between the marked vehicle and the m-th nearest vehicle can be expressed as m / ρ. Therefore, the probability that at least one hidden vehicle collides with vehicle n is:
[0076]
[0077] in:
[0078]
[0079] Nr represents the maximum number of Resource Block Groups (RBGs) that each vehicle can select within the selection window, 1 ≤ m ≤ Ns / 2. nsns represents the number of RGBs per time slot, and ts represents the length of each time slot. If a collision causes a marked vehicle to fail to successfully receive a data packet sent by the m-th most recent vehicle, the queuing time is increased by a fixed length (i.e., one RRI). Assuming the hidden terminal effect occurs independently in each RRI, the additional delay caused by the collision to the data packet of the m-th most recent vehicle follows a geometric distribution:
[0080]
[0081] Where i represents the i-th transmission. Then the average queuing time required for the m-th most recent vehicle to send a data packet is:
[0082]
[0083] Since queuing time is related to vehicle location, the queuing time obtained by averaging over vehicle locations is:
[0084]
[0085] Meanwhile, considering that the uncertainty of the wireless channel may lead to transmission failure, the data needs to re-enter the queuing process. Therefore, the channel packet loss rate directly affects the queuing delay. The channel state is modeled as a Markov process: it is divided into ideal state and bad state according to the signal-to-noise ratio, and the channel switches between ideal state and bad state. Specifically, when the SNR is higher than E[SNR] / F (F is the fading margin), the channel is in ideal state, otherwise it is in bad state.
[0086] At vehicle speed v and carrier frequency fc, the Doppler frequency shift is Where c is the speed of light; and the probability of data packet loss under adverse conditions. The correlation coefficient of the channel under adverse conditions under Doppler frequency shift fd is Where J0 is the zeroth-order Bessel function, and 1 / θ is the data packet transmission time, from which we can obtain The static transition probability of a vehicle-to-everything (V2X) system can be defined by a Markov function as:
[0087]
[0088] Where P p p is the probability that the channel remains in a poor state. i To maintain the probability of an ideal state, let L be the number of link layer frames required for a vehicle to transmit data packets, and let l be the probability of at least one frame failing to transmit under the initial ideal state. L Under the initial adverse conditions, the probability is v. L (Under adverse conditions, the first frame will definitely fail, therefore v) L =1). l i The update equation is:
[0089] l i =p i l i-1 +(1-p i )v L ,
[0090] Among them l i Let represent the probability that at least one of the first i frames fails to transmit. Therefore, the probability of a single data packet being lost in the channel is:
[0091]
[0092] Since data packets can only be transmitted after successful allocation of SPS resources, if transmission fails, the SPS process must be re-entered. Therefore, the transmission success rate directly affects the queuing delay. The queuing time obtained by averaging the vehicle positions is:
[0093]
[0094] Let the amount of data that the vehicle needs to transmit be ω. Based on Shannon's formula, the transmission delay can be obtained as follows:
[0095]
[0096] Where B is the bandwidth, P is the transmit power, G is the channel gain, and N0 is the noise power spectral density, the system AoI can be expressed as:
[0097]
[0098] S2. Constructing the optimization problem: Combining the channel physical layer state and communication protocol, with the goal of minimizing the system AoI, the optimization variables are determined as vehicle speed, vehicle density and resource reservation interval, and the coupling constraints of vehicle density and vehicle speed under fixed traffic flow and the feasible range constraints of each variable are satisfied.
[0099] The aforementioned optimization problem specifically minimizes the system AoI by optimizing vehicle speed, vehicle density, and RRI value. Its expression is:
[0100]
[0101] ρ min ≤ρ≤ρ max ,
[0102] v min ≤v≤v max ,
[0103] RRI min ≤RRI≤RRI max ,
[0104] Where ρ is vehicle density, v is vehicle speed, RRI is resource reservation interval, and v and ρ satisfy the fixed traffic flow constraint, i.e., v·ρ = constant, and ρ min ρ max v min v max RRI min and RRI max These represent the feasible ranges for vehicle density, speed, and RRI, respectively.
[0105] S3. Designing prompts for large-scale language models: Transforming the optimization problem into a textual description, including the task background, objectives, main tasks, output format, and example set, to guide large-scale language models (LLMs) to understand the problem and generate parameter configurations. The detailed task of this large-scale language model (LLM) prompt design is as follows:
[0106] Task background:
[0107] In the vehicular network system considered in this task, the system's AoI consists of queuing delay and transmission delay;
[0108] Vehicles compete for resources through a semi-persistent scheduling (SPS) mechanism. Vehicle density affects the probability of resource conflicts, the retransmission interval (RRI) determines the retransmission time interval, and vehicle speed affects the transmission success rate—if transmission fails, the data needs to re-enter the SPS queue.
[0109] In a fixed traffic flow scenario, the product of vehicle speed (km / h) and vehicle density (vehicles / km) is constant at 3600. Vehicle speed ranges from [24–90] km / h, vehicle density ranges from [40–150] vehicles / km, and RRI ranges from [15–30] milliseconds. Example decisions demonstrate the system's AoI performance under representative parameter configurations. Historical decisions provide the results you previously generated; based on these results, continue optimizing parameters to reduce AoI.
[0110] Task objective:
[0111] Minimize AoI by adjusting the values of vehicle density, RRI, and vehicle speed (vehicle speed equals 3600 divided by vehicle density).
[0112] Main tasks:
[0113] Referring to example decisions and historical decisions with results, logical reasoning is used to determine how to adjust vehicle density, RRI, and vehicle speed to minimize AoI. Based on this reasoning, parameter suggestions for the next iteration are provided.
[0114] Output format:
[0115] Output only the following content without any extra text, replacing 'num' with specific numerical values: Vehicledensity = [num], RRI = [num], Vehicle speed = [num]
[0116] Example decision:
[0117] Vehicledensity=50.00,RRI=15,Vehicle speed=72.00,AoI=66.55137374879024
[0118] Vehicledensity=100.00,RRI=15,Vehicle speed=36.00,AoI=64.80657779901559
[0119] ...
[0120] Vehicledensity=150.00,RRI=30,Vehicle speed=24.00,AoI=84.49481258031248
[0121] Number of iterations: 0
[0122] Historical Decisions:
[0123] Vehicledensity=85.0000,RRI=15.0000,Vehicle speed=42.3529,AoI=63.5314\\
[0124] Vehicledensity=80.0000,RRI=15.0000,Vehicle speed=45.0000,AoI=63.5778\\
[0125] ...
[0126] Vehicledensity=83.0000,RRI=15.0000,Vehicle speed=43.3735,AoI=60.7317
[0127] S4. Design a dual-path optimization algorithm:
[0128] Solving by calling large language models LLMs: Based on the prompt input, the context learning capability of large language models LLMs is used to iteratively optimize the parameters and configure the corresponding AoI results until the AoI tends to stabilize.
[0129] The context learning capability of the aforementioned large-scale language model can be expressed as:
[0130]
[0131] Among them, D task Indicates the task description, ε t Let s be the example set at time t. t It refers to the environmental state related to the target task; LLM stands for Large Language Model; and at is the output of the LLM.
[0132] Solve using the DDPG algorithm: Define the state space, action space, and reward function, and through training, make the DDPG output a stable optimal parameter configuration;
[0133] And compare the results of the two methods to determine the final optimal parameters;
[0134] The state space of the above DDPG algorithm is defined as:
[0135] s t =[v t ,ρ t ,RRI t ,p d,t ,PRR t ,
[0136] where, v t represents the vehicle speed, ρ t represents the traffic flow density, p d,t represents the packet loss probability, and the vehicle speed and traffic flow density satisfy the constraint conditions of a fixed traffic flow scenario;
[0137] The action space is defined as:
[0138] a t =[RRI t ,v t .
[0139] Since the vehicle density can be derived from the vehicle speed and traffic flow constant, the action space does not need to include the density variable.
[0140] The reward function of the DDPG algorithm is designed as:
[0141] Basic reward: Use the negative AoI value as the reward, and control the numerical range through linear transformation , where N1 and N2 are scaling factors;
[0142] Threshold mechanism: First train to obtain a sub-optimal solution A1, give a higher reward to the decision with AoI < A1, and approximate the exhaustive search result after two iterations. The specific form of this reward function is as follows:
[0143]
[0144] After defining the state, action, and reward, in order to solve the optimal solution in the continuous space, we use the DDPG algorithm framework to solve this problem.
[0145] This embodiment clarifies the composition of AoI in the vehicular network considered in this paper, specifically including queuing delay and transmission delay, and describes the impact of vehicle density, RRI, and vehicle speed on resource contention and transmission efficiency. It also specifies the constraint of the speed-density product in a fixed traffic flow scenario. The task objective explicitly requires the LLM to minimize the system AoI by adjusting parameters. The main task defines the role of the LLM as an optimization algorithm, guiding it to iteratively infer parameters based on example decisions and historical decisions. The output format standardizes the presentation of results for easy subsequent processing. The example decision set provides representative parameter selections and corresponding AoI values to help the model determine the initial solution. The historical decision set provides a reference for the model's inference of previous parameters and their AoI performance.
[0146] During the iterative optimization process, after providing hints to the LLM, the model infers and outputs parameter combinations that might reduce the AoI based on examples. Subsequently, we calculate the AoI based on these parameters and feed the results back to the LLM as new examples, repeating this process until the AoI tends to stabilize. Through continuous optimization, the LLM can capture the complex influence of vehicle density, RRI, and speed on the AoI, strategically searching the parameter space to find the optimal combination that minimizes the AoI.
[0147] like Figure 2 As shown, the impact of vehicle speed on information timeliness under different repeated radio resource interval (RRI) settings was investigated. Higher vehicle speed corresponds to lower traffic density (because the product of vehicle speed and density remains constant). Due to the Doppler effect, channel conditions deteriorate, leading to increased packet loss rate and retransmission probability, thus increasing AoI. At low speeds, higher traffic density increases the probability of packet collisions during the semi-persistent scheduling phase, also resulting in higher AoI. When RRI is low, the collision probability is easily affected by traffic density, but the cost of retransmission waiting is low, thus resulting in better performance at high speeds. When RRI is high, the system's sensitivity to changes in traffic density decreases, but the retransmission cost is high, leading to poor performance at high speeds.
[0148] Figure 3 The effect of RRI on AoI under different vehicle speed conditions is shown, and the corresponding vehicle speed and density relationship is as follows: Figure 2 As shown in the figure, the results indicate that at low vehicle speeds (high density), a low RRI value results in a higher collision probability, leading to a larger AoI. As AoI increases, the relationship between RRI and AoI gradually becomes linear. This is because the collision probability tends to stabilize, while the channel drop probability remains constant (due to the fixed speed), making AoI a linear function of RRI. At higher vehicle speeds, the Doppler shift effect intensifies, leading to an increased channel drop probability. At this point, the rate of increase in AoI with RRI is greater than at low speeds, resulting in a steeper slope in the corresponding curve.
[0149] Figure 4 The AoI (Aspect-Oriented Identifier) trends of three large-scale language models, the DDPG algorithm, and the genetic algorithm were compared over 50 training epochs. The "Optimal" method represents the optimal value obtained through exhaustive search. Each data point is the average of multiple runs. Because LLMs initially explore different parameter combinations, the AoI fluctuates significantly in the initial stage. The prompts contain representative examples, providing good prior knowledge, thus the LLM method has a better initial solution and converges quickly with only a few iterations. Performance differences between different large-scale models are related to model size and pre-training methods. In contrast, DDPG and the genetic algorithm require more exploration steps per epoch and need continuous training and parameter tuning. LLM, on the other hand, only requires collecting examples, making the algorithm simpler to implement.
[0150] The above embodiments are merely exemplary embodiments of this application and are not intended to limit this application. The scope of protection of this application is defined by the claims. Those skilled in the art can make various modifications or equivalent substitutions to this application within its substance and scope of protection, and such modifications or equivalent substitutions should also be considered to fall within the scope of protection of this application.
Claims
1. A parameter optimization method based on a large-scale language model and deep deterministic policy gradient, used to optimize the information age of a vehicle-to-everything (V2X) system, characterized in that, Includes the following steps: S1. Establish a system model: Consider a vehicle-to-everything (V2X) scenario consisting of multiple vehicles and base stations. Vehicles are distributed along the road at a linear density ρ. Base stations cover the entire scenario and provide services to the vehicles. Vehicles compete for resources based on SPS scheduling. At the same time, consider the impact of the Doppler effect caused by vehicle speed on channel conditions, as well as the effects of vehicle density and resource reservation interval on packet collisions and transmission success rate, and clarify the influencing factors of system AoI. S2. Constructing the optimization problem: Combining the channel physical layer state and communication protocol, with the goal of minimizing the system AoI, the optimization variables are determined as vehicle speed, vehicle density and resource reservation interval, and the coupling constraints of vehicle density and vehicle speed under fixed traffic flow and the feasible range constraints of each variable are satisfied. S3. Design prompts for large language models: Transform the optimization problem into a textual description, including the task background, objectives, main tasks, output format, and example set, to guide large language models (LLMs) to understand the problem and generate parameter configurations. S4. Design a dual-path optimization algorithm: Solving by calling large language models LLMs: Based on the prompt input, the context learning capability of large language models LLMs is used to iteratively optimize the parameters and configure the corresponding AoI results until the AoI tends to stabilize. The DDPG algorithm is used to solve the problem: the state space, action space and reward function are defined, and the optimal parameter configuration is stably output by DDPG through training; The results of the two methods are then compared to determine the final optimal parameters.
2. The parameter optimization method based on a large language model and deep deterministic policy gradient as described in claim 1, characterized in that, In step S1, the system's AoI consists of two parts: queuing delay from data generation to transmission and transmission delay. The queuing delay further includes retransmission delay caused by data packet collision and retransmission delay caused by transmission failure. The transmission delay is calculated based on Shannon's formula, and the vehicle speed and density satisfy the Greenshields linear model, that is, under a fixed traffic flow, the vehicle speed v = Q / m, where Q is the traffic flow constant and m is the number of vehicles.
3. The parameter optimization method based on a large language model and deep deterministic policy gradient as described in claim 2, characterized in that, Step S1 further includes: considering that the uncertainty of the wireless channel may lead to transmission failure, in which case the data needs to re-enter the queuing process. Therefore, the channel packet loss rate directly affects the queuing delay. The channel state is modeled as a Markov process: it is divided into ideal state and bad state according to the signal-to-noise ratio, and the channel switches between ideal state and bad state. Specifically, when the SNR is higher than E[SNR] / F (F is the fading margin), the channel is in ideal state, otherwise it is in bad state. At vehicle speed v and carrier frequency fc, the Doppler frequency shift is Where c is the speed of light; and the probability of data packet loss under adverse conditions. The correlation coefficient of the channel under adverse conditions under Doppler frequency shift fd is Where J0 is the zeroth-order Bessel function, and 1 / θ is the data packet transmission time, from which we can obtain The static transition probability of a vehicle-to-everything (V2X) system can be defined by a Markov function as: Where P p p is the probability that the channel remains in a poor state. i To maintain the probability of an ideal state, let L be the number of link layer frames required for a vehicle to transmit data packets, and let l be the probability of at least one frame failing to transmit under the initial ideal state. L Under the initial adverse conditions, the probability is v. L (Under adverse conditions, the first frame will definitely fail, therefore v) L =1). l i The update equation is: l i =p i l i-1 +(1-p i )v L , Among them l i Let represent the probability that at least one of the first i frames fails to transmit. Therefore, the probability of a single data packet being lost in the channel is: Since data packets can only be transmitted after successful allocation of SPS resources, if transmission fails, the SPS process must be re-entered. Therefore, the transmission success rate directly affects the queuing delay. The queuing time obtained by averaging the vehicle positions is: Let the amount of data that the vehicle needs to transmit be ω. Based on Shannon's formula, the transmission delay can be obtained as follows: Where B is the bandwidth, P is the transmit power, G is the channel gain, and N0 is the noise power spectral density, the system AoI can be expressed as:
4. The parameter optimization method based on a large language model and deep deterministic policy gradient as described in claim 1, characterized in that, In S2, an optimization problem is constructed, specifically minimizing the system AoI by optimizing vehicle speed, vehicle density, and RRI value. Its expression is: r min ≤ρ≤ρ max , in min ≤v≤v max , RRI min ≤RRI≤RRI max , Where ρ is vehicle density, v is vehicle speed, RRI is resource reservation interval, and v and ρ satisfy the fixed traffic flow constraint, i.e., v·ρ = constant, while ρ min ρ max v min v max RRI min and RRI max These represent the feasible ranges for vehicle density, speed, and RRI, respectively.
5. The parameter optimization method based on a large language model and deep deterministic policy gradient as described in claim 1, characterized in that, In step S4, the state space of the DDPG algorithm is defined as: s t =[v t ,ρ t ,RRI t ,p d,t ,PRR t ], Among them, v t ρ represents vehicle speed. t p represents traffic density. d,t This indicates the probability of data packet loss, and the vehicle speed and traffic density satisfy the constraints of a fixed traffic flow scenario. The action space is defined as: a t =[RRI t ,v t ]. Since the vehicle density can be derived from the vehicle speed and the traffic flow constant, the action space does not need to include the density variable.
6. The parameter optimization method based on a large language model and deep deterministic policy gradient as described in claim 5, characterized in that, The reward function of the DDPG algorithm is designed as: Basic Reward: Rewards are negative AoI values, achieved through linear transformation. Control the range of values, where N1 and N2 are scaling factors; Threshold mechanism: First, train to obtain a sub-optimal solution A1, give higher rewards to decisions with AoI < A1, and approximate the exhaustive search result after two iterations.
7. The parameter optimization method based on a large language model and deep deterministic policy gradient as described in claim 1, characterized in that, In step S3, the optimization problem is transformed into a textual description, including the task background, task objective, main task, output format, and example set. The detailed tasks designed for the large language model LLM are as follows: Task background: In the vehicular network system considered in this task, the AoI of the system consists of queuing delay and transmission delay; Vehicles compete for resources through the semi-persistent scheduling (SPS) mechanism. The vehicle density affects the probability of resource conflict. The retransmission repetition interval (RRI) determines the retransmission time interval, and the vehicle speed affects the transmission success rate - if the transmission fails, the data needs to re-enter the SPS queue; In a fixed traffic flow scenario, the product of the vehicle speed and the vehicle density is constant at 3600; The vehicle speed range is [24–90] km / h, the vehicle density range is [40–150] vehicles / km, and the RRI range is [15–30] milliseconds; Task objective: By adjusting the values of vehicle density, RRI, and vehicle speed, minimize AoI, where the vehicle speed is equal to 3600 divided by the vehicle density; Main task: Refer to the example decisions and historical decisions with results, and logically infer how to adjust the vehicle density, RRI, and vehicle speed to minimize AoI. Based on the inference, give parameter suggestions for the next iteration; Output format: Only output the following content without any extra text, and replace num with specific values: Vehicledensity = [num], RRI = [num], Vehicle speed = [num] Example decisions: Provide representative parameter configurations and corresponding AoI values as references for the inference of LLMs.
8. The novel laboratory remote monitoring and operation and maintenance management system based on the Internet of Things as described in claim 1, characterized in that, In step S4, the in-context learning ability of the large language model can be expressed as: Among them, D task Indicates the task description, ε t Let s be the example set at time t. t It represents the environmental state related to the target task, LLM stands for Large Language Model, and at is the output of LLM.