A V2G Smart Power Distribution Method for Electric Vehicles Based on Sequence Control
By using a hierarchical power distribution system based on self-evolving sequence compilation and energy state collaborative game theory, the real-time response and strategy consistency issues of V2G systems are solved, enabling flexible scheduling and balanced energy distribution of electric vehicle V2G intelligent power distribution, and improving the system's adaptability and execution consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 北京中航若翼机电工程有限公司
- Filing Date
- 2025-11-08
- Publication Date
- 2026-07-31
AI Technical Summary
With the increasing number of electric vehicles and the increasing complexity of user travel behavior, existing V2G power distribution systems struggle to respond to local changes in real time, leading to control delays and energy distribution imbalances. They also lack adaptive mechanisms and consistency verification at the execution layer, making them prone to policy conflicts.
A hierarchical power distribution system employing self-evolving sequence compilation, energy-state collaborative game theory, and multi-strategy consensus execution is adopted. The system generates dynamic control scripts through the self-evolving sequence compiler, combines the energy-state collaborative game theory mechanism to achieve group energy allocation equilibrium, and performs multi-strategy consensus verification at the edge execution layer to ensure strategy consistency.
It enables flexible scheduling, balanced energy distribution, and safe execution of the V2G system, improves the system's adaptability and real-time response performance, and enhances grid load balance and user benefits.
Smart Images

Figure CN121485051B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent energy management and vehicle-to-grid (V2G) interaction control technology for electric vehicles, and particularly to a V2G intelligent power distribution method for electric vehicles based on sequence control. Background Technology
[0002] With the rapid growth of electric vehicle ownership and the widespread integration of distributed energy resources, vehicle-to-grid (V2G) technology has become an important means of peak shaving and energy storage in power systems. Existing V2G distribution systems generally adopt a centralized dispatch and control approach, using a central algorithm to calculate the charging and discharging power of a group of vehicles and issue unified control commands. While this method initially offered advantages such as simplicity and centralized management, its centralized model struggles to respond to local changes in real time, especially given the continuous increase in the number of electric vehicles, the increasing complexity of user travel behavior, and frequent fluctuations in grid load. This can easily lead to control delays and energy distribution imbalances.
[0003] In existing technologies, V2G scheduling methods mostly rely on static optimization or rule-based control logic, lacking adaptive mechanisms that consider individual vehicle energy state differences and dynamic preferences. Scheduling systems often calculate power solely based on electricity price and total load, neglecting crucial constraints such as vehicle state of charge, health status, battery temperature, and user travel time windows. This leads to uneven energy distribution, local node overload, and some vehicles being unable to charge and discharge as needed. Traditional algorithms cannot quickly self-correct to grid disturbances, communication delays, and changes in user behavior, resulting in insufficient robustness of the overall system scheduling.
[0004] Existing V2G execution layers typically employ a single control script execution mode, lacking a mechanism to verify consistency between upper-layer policies. This can lead to policy conflicts or command overriding in complex power distribution scenarios. Execution results are mostly transmitted back to the central system via data uploads, but no effective self-evolution and re-optimization mechanism has been established, making continuous learning and policy improvement difficult.
[0005] Therefore, how to provide a V2G intelligent power distribution method for electric vehicles based on sequence control is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a V2G intelligent power distribution method for electric vehicles based on sequence control. This invention comprehensively utilizes intelligent control methods such as self-evolving sequence compilation, energy-state collaborative game theory, and multi-strategy consensus execution to establish a hierarchical power distribution system with a central scheduling layer, a group coordination layer, and an edge execution layer operating collaboratively. By introducing the evolutionary sequence control language SCL, dynamic generation and adaptive optimization of control scripts are achieved. By constructing an energy-state collaborative game theory mechanism, game coordination is conducted based on multi-dimensional factors such as vehicle state of charge, health status, battery temperature, and travel time window to achieve energy distribution equilibrium among the group. By deploying a multi-strategy consensus execution entity, consistency and safe execution among the central scheduling strategy, the group coordination strategy, and the local emergency strategy are ensured. This realizes the transformation of the V2G system from centralized static scheduling to distributed intelligent self-optimization, possessing advantages such as flexible scheduling, balanced energy distribution, high security, and strong execution consistency.
[0007] A V2G smart power distribution method for electric vehicles based on sequence control according to an embodiment of the present invention includes: Collect grid operation data from the grid side and vehicle status data from the vehicle side. Preprocess the grid operation data and vehicle status data to construct an energy state dataset for the electric vehicle population. A self-evolving sequence compiler is built at the central dispatch layer. It reads the energy state dataset, defines the sequence control language SCL, and adopts an optimization mechanism that combines constraint-driven counterexample-guided synthesis method with syntax-constrained Monte Carlo tree search to iteratively optimize the SCL script and generate sequence control bytecode based on power grid operation data and vehicle status data. An energy-state collaborative game mechanism is constructed at the group coordination layer. Based on the energy-state vector and individual payoff preference parameters of each electric vehicle, a local collaborative game model between vehicles is established. The local payoff value of each vehicle in the current power distribution cycle is calculated, and a dynamic Nash equilibrium search is performed to obtain the energy-state collaborative game result. A multi-policy consensus execution body is established at the edge execution layer. Each electric vehicle is loaded with an S-policy control script from the central scheduling layer, a G-policy game strategy from the group coordination layer, and a local R-policy emergency strategy. The similarity of the three is calculated. When the average similarity exceeds a preset threshold, the control command is executed; otherwise, the correction process of the local R-policy emergency strategy is triggered. The S-policy control script is executed on each charging pile control terminal to complete the charging and discharging operation according to the sequence control bytecode instructions. The power trajectory, energy change and status feedback information during the execution process are recorded, and the execution feedback is uploaded to the central scheduling layer. The central dispatch layer retrains the self-evolving sequence compiler and recompiles the scripts based on the execution feedback, updates the control strategy based on the new energy state cooperative game results, and completes the V2G serialized intelligent power distribution process.
[0008] Optionally, the power grid operation data includes real-time load data, electricity price curves, distribution capacity and node voltage information, and the vehicle status data includes state of charge (SOC), state of health (SOH), battery temperature, geographical location and user travel time window information.
[0009] Optionally, the preprocessing of power grid operation data and vehicle status data includes synchronizing power grid operation data and vehicle status data according to a unified timestamp, interpolating and removing missing and abnormal data, using normalization and standardization algorithms to unify the units, mapping data from different sources to a unified feature space, and constructing an energy state dataset.
[0010] Optionally, the step of generating sequence control bytecode based on power grid operation data and vehicle status data includes: The self-evolving sequence compiler is initialized at the central dispatching layer, the energy state dataset is loaded as the input data source, and a data index organized according to the power distribution cycle is established. Define the instruction set and syntax production rules of the Sequence Control Language (SCL), and establish a script parser, syntax verifier, and constraint verifier. The constraints include safety constraints, capacity constraints, node voltage constraints, and user travel time window constraints. An optimized kernel for a self-evolving sequence compiler is constructed. The optimized kernel uses a constraint-driven counterexample-guided synthesis method to generate initial candidate SCL scripts. A constraint verifier is used to check the feasibility of the candidate scripts. Failure scenarios that do not meet the constraints are recorded as counterexamples and added to the sample set for the next round of script synthesis. On the candidate script set that has passed the feasibility check, a sequence strategy search is performed using syntactic-constrained Monte Carlo tree search. The script prefix is used as the search node. Sampling, evaluation and backtracking are performed on the syntactically allowed instruction extensions. The script with better performance is selected based on four evaluation criteria: energy balance, power distribution safety, user satisfaction and execution complexity. The counterexample-guided synthesis method and tree search are executed alternately in an iterative manner until the termination condition is met. The target SCL script determined after iterative optimization is submitted to the compiler to generate sequence control bytecode, forming an S-policy control script that includes execution time window, execution sequence identifier, power upper limit, power lower limit and synchronization group identifier.
[0011] Optionally, obtaining the energy state cooperative game result includes: A three-layer structure for constructing an energy-state collaborative game mechanism is proposed. The three-layer structure includes a state-aware modeling layer, a local collaborative game layer, and a global coordination mapping layer. The state-aware modeling layer extracts power grid operation data and vehicle state data from the energy-state dataset and forms standardized inputs that can be used for game. The local collaborative game layer organizes vehicles to perform strategy coordination and countermeasure updates within the feeder or transformer topology neighborhood. The global coordination mapping layer integrates the coordination results of each neighborhood in a consistent manner and outputs them. In the state-aware modeling layer, an energy state vector and individual benefit preference parameters are generated for each electric vehicle. The energy state vector consists of the state of charge, health state, battery temperature, geographical location, and travel time window. The individual benefit preference parameters consist of benefit preference, safety preference, and urgency preference. In the local collaborative game layer, the connected vehicles are divided into several neighborhoods based on the power grid topology. A local collaborative game model is constructed for each neighborhood. The local collaborative game model takes the vehicles as participants and charging, discharging, standby, discrete power levels and execution time windows as optional actions. The upper limit of distribution capacity, the allowable range of node voltage, the minimum remaining power of the vehicle and the user travel time window are hard constraints. The evaluation elements are electricity price revenue, safety constraint penalty, synchronous collaboration reward and execution complexity penalty. A comprehensive evaluation criterion for ranking the merits of actions is formed by combining weights. In the local collaborative game layer, a distributed dynamic equilibrium search is performed. The strategies of vehicles in each neighborhood are updated through interaction and response. Strategies that do not meet the constraints are corrected. The power and timing of synchronization and capacity conflicts are locally adjusted. The equilibrium is determined based on the preset convergence conditions. The equilibrium strategy configuration and corresponding evaluation results of each neighborhood are output. In the global coordination mapping layer, the equilibrium action configurations of each neighborhood are consistently integrated to eliminate cross-neighborhood resource competition and time window conflicts, generate energy state cooperative game results and encapsulate them as G-policy game strategies.
[0012] Optionally, the calculation of the similarity among the three entities, and the execution of a control command when the average similarity exceeds a preset threshold, otherwise triggering a correction process for the local R-policy emergency strategy, includes: A multi-policy consensus executor is established at the edge execution layer. The multi-policy consensus executor is an edge-side operating framework used to evaluate the consistency of S-policy control scripts, G-policy game strategies and R-policy emergency strategies and make execution decisions. It loads a unified feature template, configures similarity calculation logic and consistency judgment rules, sets the operation parameters for correction and re-verification, and starts the instruction issuance and result recording process to complete the construction and initialization of the multi-policy consensus executor. For each electric vehicle, the S-policy control script, G-policy game strategy and local R-policy emergency strategy are received respectively. The time window, power upper limit, power lower limit, control mode, synchronization group identifier and execution priority are extracted according to a unified template. The format is checked, the unit is unified and the range is pruned, and the feature is standardized and vectorized for storage. The similarity of the three types of strategies is evaluated pairwise, and the similarity between S-policy and G-policy, G-policy and R-policy, and S-policy and R-policy is given respectively. The average similarity and individual similarity reports are generated within a unified scale. Set a preset consistency threshold and make a judgment. When the average similarity reaches or exceeds the preset consistency threshold, the consensus is deemed to be passed, and the sequence control bytecode corresponding to the S-policy is sent to the charging pile control terminal for execution. When the average similarity does not reach the preset consistency threshold, the correction process of the local R-policy emergency strategy is triggered. Within the limited parameter adjustment range and the maximum number of iterations, the time window, power limit, synchronization group identifier and execution priority are minimized. After completion, the similarity assessment and threshold determination are re-executed. If the upper limit is reached and the threshold is still not passed, the security degradation strategy is executed and the central scheduling layer and group coordination layer are reported.
[0013] Optionally, the step of executing the S-policy control script at each charging pile control terminal to complete the charging and discharging operation according to the sequence control bytecode instructions includes: The S-policy control script is parsed and the corresponding sequence control bytecode is loaded in the charging pile control terminal to complete the mapping of the script to the executable instruction sequence on the pile side, and the execution time window, execution sequence identifier, power upper limit, power lower limit, synchronization group identifier and execution priority are read and set. According to the time window and execution sequence identifier, charging or discharging commands are issued, fixed control cycles and sampling cycles are set, and local safety interlocks such as overvoltage protection, undervoltage protection, overcurrent protection, overtemperature protection, insulation monitoring and emergency stop linkage are enabled. During execution, power trajectory, energy change, pile-side node voltage, pile-side current, contact temperature, battery temperature, state of charge (SOC), state of health (SOH), control mode status, and execution result status code are collected in real time. Timestamp alignment and local caching are completed, and execution stage identifiers are generated. Perform execution deviation detection, determine power tracking error, energy statistics error, time window out of bounds, node voltage out of bounds, overcurrent event and overtemperature event, trigger local derating, pause or cut-off based on the determination result, record event code and recovery conditions, and generate local execution report; The local execution report and the original sampling data are combined to form the execution feedback. The execution feedback includes power trajectory, energy statistics, status code, event record, timestamp, charging pile identifier and vehicle identifier. It is uploaded to the central dispatch layer. After receiving the upload confirmation, the local log is archived and the next control cycle begins.
[0014] Optionally, the central scheduling layer retrains the self-evolving sequence compiler and recompiles the scripts based on execution feedback, including: The execution feedback from the charging pile control terminal is aggregated, indexed by power distribution cycle and vehicle identification, and timestamp alignment, anomaly removal and integrity verification are completed to form a sample set; Using the sample set as input, the policy generation and constraint evaluation module of the self-evolving sequence compiler is retrained to update the weight parameters and template parameters; The results of the energy state cooperative game are used as external constraints and preference inputs to trigger the recompilation of the sequence control language script. A joint optimization mechanism of constraint-driven counterexample-guided synthesis and syntax-constrained Monte Carlo tree search is used to generate candidate scripts and iteratively select the target script. The target script is verified by simulation playback and online small-scale grayscale verification. The release criteria are determined based on power balance deviation, number of node voltage out-of-bounds times, user satisfaction and execution complexity. Once the release threshold is reached, the updated sequence control bytecode and S-policy control script are compiled and generated. The updated S-policy control script is sent to the edge execution layer, the effective time window and rollback strategy are set, and version tracking information is recorded. Then, the next power distribution cycle is entered, and the continuous closed-loop optimization of V2G serialized intelligent power distribution is completed.
[0015] The beneficial effects of this invention are: This invention establishes an intelligent scheduling system based on sequence control language by introducing a self-evolving sequence compiler at the central scheduling layer, enabling dynamic generation and continuous optimization of distribution control logic. Compared with traditional fixed algorithms, this invention retrains the compiler model and recompiles the scripts based on real-time execution feedback data, giving the system self-learning and adaptive capabilities. This allows the system to maintain the optimality and stability of the distribution strategy under conditions of grid load fluctuations, vehicle energy state changes, and external disturbances, thereby improving the system's flexible scheduling capabilities and real-time response performance.
[0016] In the group coordination layer, the energy-state collaborative game mechanism constructed in this invention effectively solves the problems of uneven energy distribution and low individual participation willingness in existing V2G systems. By incorporating vehicle state of charge, health status, battery temperature, geographical location, and travel time window information into the collaborative game model, a two-layer optimization of individual constraints and group benefits is achieved. This enables each vehicle to meet user needs while balancing the overall grid load and maximizing energy efficiency. This not only improves the game convergence speed and computational stability but also enhances scalability and fairness in multi-vehicle participation scenarios.
[0017] At the edge execution layer, the multi-policy consensus executor proposed in this invention can perform consistency verification on the S-policy control script from the central scheduling layer, the G-policy game strategy from the group coordination layer, and the local R-policy emergency strategy before execution, ensuring safe and reliable instruction execution. When deviations exist among the three, the system automatically triggers a correction and re-verification process, thereby avoiding policy conflicts and control errors. Combined with pile-side real-time power monitoring, energy tracking, and status feedback mechanisms, this invention achieves complete closed-loop control from policy generation to execution verification, significantly improving the intelligence level, energy utilization rate, and operational safety of the V2G system. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a V2G intelligent power distribution method for electric vehicles based on sequence control proposed in this invention; Figure 2 This is a flowchart illustrating the operation of a multi-strategy consensus executor for a V2G intelligent power distribution method for electric vehicles based on sequence control proposed in this invention. Detailed Implementation
[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0020] refer to Figure 1 and Figure 2 A V2G intelligent power distribution method for electric vehicles based on sequence control includes: Collect grid operation data from the grid side and vehicle status data from the vehicle side. Preprocess the grid operation data and vehicle status data to construct an energy state dataset for the electric vehicle population. A self-evolving sequence compiler is built at the central dispatch layer. It reads the energy state dataset, defines the sequence control language SCL, and adopts an optimization mechanism that combines constraint-driven counterexample-guided synthesis method with syntax-constrained Monte Carlo tree search to iteratively optimize the SCL script and generate sequence control bytecode based on power grid operation data and vehicle status data. An energy-state collaborative game mechanism is constructed at the group coordination layer. Based on the energy-state vector and individual payoff preference parameters of each electric vehicle, a local collaborative game model between vehicles is established. The local payoff value of each vehicle in the current power distribution cycle is calculated, and a dynamic Nash equilibrium search is performed to obtain the energy-state collaborative game result. A multi-policy consensus execution body is established at the edge execution layer. Each electric vehicle is loaded with an S-policy control script from the central scheduling layer, a G-policy game strategy from the group coordination layer, and a local R-policy emergency strategy. The similarity of the three is calculated. When the average similarity exceeds a preset threshold, the control command is executed; otherwise, the correction process of the local R-policy emergency strategy is triggered. The S-policy control script is executed on each charging pile control terminal to complete the charging and discharging operation according to the sequence control bytecode instructions. The power trajectory, energy change and status feedback information during the execution process are recorded, and the execution feedback is uploaded to the central scheduling layer. The central dispatch layer retrains the self-evolving sequence compiler and recompiles the scripts based on the execution feedback, updates the control strategy based on the new energy state cooperative game results, and completes the V2G serialized intelligent power distribution process.
[0021] In this embodiment, the power grid operation data includes real-time load data, electricity price curves, distribution capacity and node voltage information, and the vehicle status data includes state of charge (SOC), state of health (SOH), battery temperature, geographical location and user travel time window information.
[0022] In this embodiment, the preprocessing of power grid operation data and vehicle status data includes synchronizing power grid operation data and vehicle status data according to a unified timestamp, interpolating and removing missing and abnormal data, using normalization and standardization algorithms to unify the units, mapping data from different sources to a unified feature space, and constructing an energy state dataset.
[0023] In this embodiment, the step of generating sequence control bytecode based on power grid operation data and vehicle status data includes: The self-evolving sequence compiler is initialized at the central dispatching layer, the energy state dataset is loaded as the input data source, and a data index organized according to the power distribution cycle is established. Define the instruction set and syntax production rules of the Sequence Control Language (SCL), and establish a script parser, syntax verifier, and constraint verifier. The constraints include safety constraints, capacity constraints, node voltage constraints, and user travel time window constraints. An optimized kernel for a self-evolving sequence compiler is constructed. The optimized kernel uses a constraint-driven counterexample-guided synthesis method to generate initial candidate SCL scripts. A constraint verifier is used to check the feasibility of the candidate scripts. Failure scenarios that do not meet the constraints are recorded as counterexamples and added to the sample set for the next round of script synthesis. On the candidate script set that has passed the feasibility check, a sequence strategy search is performed using syntactically constrained Monte Carlo tree search. The script prefix is used as the search node. Sampling, evaluation, and backtracking are performed on syntactically allowed instruction extensions. Based on four evaluation criteria—energy balance, power distribution safety, user satisfaction, and execution complexity—the script with the better performance is selected. The counterexample-guided synthesis method and tree search are executed iteratively, alternating until the termination condition is met. Specifically, the sequence strategy search using syntactically constrained Monte Carlo tree search involves: In the node expansion phase of Monte Carlo tree search, a constraint template is established for the syntax structure of the sequence control language (SCL) to limit the syntactic validity and dependency order of instruction generation, ensuring that each node expansion conforms to the control syntax rules and scheduling logic structure, and avoiding invalid searches and instruction conflicts. During the evaluation phase of the search tree, four indicators are comprehensively considered: energy balance, power distribution safety constraints, user satisfaction, and execution complexity. A dynamically weighted multidimensional reward function is constructed, and the weight ratio is adaptively adjusted according to the node performance in each round of evaluation to improve the global optimality of the search direction and the stability of the scheduling strategy. During the search process, when an evaluation node violates constraints or performs below a preset threshold, the evaluation node is used as a counterexample to guide the synthesis module to correct the syntax and parameters. The corrected result is then returned to the Monte Carlo tree for further searching. This iterative approach accelerates convergence and improves the executability and security of the script in complex scenarios. The target SCL script determined after iterative optimization is submitted to the compiler to generate sequence control bytecode, forming an S-policy control script that includes execution time window, execution sequence identifier, power upper limit, power lower limit and synchronization group identifier.
[0024] In this embodiment, obtaining the energy state cooperative game result includes: A three-layer structure for constructing an energy-state collaborative game mechanism is proposed. The three-layer structure includes a state-aware modeling layer, a local collaborative game layer, and a global coordination mapping layer. The state-aware modeling layer extracts power grid operation data and vehicle state data from the energy-state dataset and forms standardized inputs that can be used for game. The local collaborative game layer organizes vehicles to perform strategy coordination and countermeasure updates within the feeder or transformer topology neighborhood. The global coordination mapping layer integrates the coordination results of each neighborhood in a consistent manner and outputs them. In the state-aware modeling layer, an energy state vector and individual benefit preference parameters are generated for each electric vehicle. The energy state vector consists of the state of charge, health state, battery temperature, geographical location, and travel time window. The individual benefit preference parameters consist of benefit preference, safety preference, and urgency preference. In the local collaborative game layer, the connected vehicles are divided into several neighborhoods based on the power grid topology. A local collaborative game model is constructed for each neighborhood. The local collaborative game model takes the vehicles as participants and charging, discharging, standby, discrete power levels and execution time windows as optional actions. The upper limit of distribution capacity, the allowable range of node voltage, the minimum remaining power of the vehicle and the user travel time window are hard constraints. The evaluation elements are electricity price revenue, safety constraint penalty, synchronous collaboration reward and execution complexity penalty. A comprehensive evaluation criterion for ranking the merits of actions is formed by combining weights. In the local collaborative game layer, a distributed dynamic equilibrium search is performed. The strategies of vehicles in each neighborhood are updated through interaction and response. Strategies that do not meet the constraints are corrected. The power and timing of synchronization and capacity conflicts are locally adjusted. The equilibrium is determined based on the preset convergence conditions. The equilibrium strategy configuration and corresponding evaluation results of each neighborhood are output. In the global coordination mapping layer, the equilibrium action configurations of each neighborhood are consistently integrated to eliminate cross-neighborhood resource competition and time window conflicts, generate energy state cooperative game results and encapsulate them as G-policy game strategies.
[0025] In this embodiment, the calculation of the similarity among the three entities, and the execution of a control command when the average similarity exceeds a preset threshold, and the triggering of a correction process for the local R-policy emergency strategy, includes: A multi-policy consensus executor is established at the edge execution layer. The multi-policy consensus executor is an edge-side operating framework used to evaluate the consistency of S-policy control scripts, G-policy game strategies and R-policy emergency strategies and make execution decisions. It loads a unified feature template, configures similarity calculation logic and consistency judgment rules, sets the operation parameters for correction and re-verification, and starts the instruction issuance and result recording process to complete the construction and initialization of the multi-policy consensus executor. For each electric vehicle, the S-policy control script, G-policy game strategy and local R-policy emergency strategy are received respectively. The time window, power upper limit, power lower limit, control mode, synchronization group identifier and execution priority are extracted according to a unified template. The format is checked, the unit is unified and the range is pruned, and the feature is standardized and vectorized for storage. The similarity of each of the three policy classes is evaluated pairwise, providing the similarity scores between S-policy and G-policy, G-policy and R-policy, and S-policy and R-policy, respectively. Average similarity and individual similarity reports are generated within a unified scale. Specifically, the pairwise similarity evaluation of the three policy classes involves: The S-policy control script, G-policy game strategy, and R-policy emergency strategy are transformed into multi-dimensional feature vectors. The feature dimensions include time window, power command, execution mode, synchronization group identifier and priority weight, etc., and are then normalized. When calculating the similarity between policies, weighting coefficients are set according to feature importance, key features are given higher weights, and auxiliary features are given attenuated weights. The weighted similarity between S-policy and G-policy, G-policy and R-policy, and S-policy and R-policy is calculated in a hierarchical matching manner. To address the deviations in execution time and operation sequence of the strategy, the time correlation coefficients of power trajectories and control modes in adjacent time periods are calculated, and the characteristic difference values are dynamically corrected. The weighted similarity results of each strategy pair are standardized to the [0,1] interval, and the average similarity index is calculated. Individual similarity and comprehensive similarity reports are output. Set a preset consistency threshold and make a judgment. When the average similarity reaches or exceeds the preset consistency threshold, the consensus is deemed to be passed, and the sequence control bytecode corresponding to the S-policy is sent to the charging pile control terminal for execution. When the average similarity does not reach the preset consistency threshold, the correction process of the local R-policy emergency strategy is triggered. Within the limited parameter adjustment range and the maximum number of iterations, the time window, power limit, synchronization group identifier and execution priority are minimized. After completion, the similarity assessment and threshold determination are re-executed. If the upper limit is reached and the threshold is still not passed, the security degradation strategy is executed and the central scheduling layer and group coordination layer are reported.
[0026] In this embodiment, the step of executing the S-policy control script at each charging pile control terminal and completing the charging and discharging operation according to the sequence control bytecode instructions includes: The S-policy control script is parsed and the corresponding sequence control bytecode is loaded in the charging pile control terminal to complete the mapping of the script to the executable instruction sequence on the pile side, and the execution time window, execution sequence identifier, power upper limit, power lower limit, synchronization group identifier and execution priority are read and set. According to the time window and execution sequence identifier, charging or discharging commands are issued, fixed control cycles and sampling cycles are set, and local safety interlocks such as overvoltage protection, undervoltage protection, overcurrent protection, overtemperature protection, insulation monitoring and emergency stop linkage are enabled. During execution, power trajectory, energy change, pile-side node voltage, pile-side current, contact temperature, battery temperature, state of charge (SOC), state of health (SOH), control mode status, and execution result status code are collected in real time. Timestamp alignment and local caching are completed, and execution stage identifiers are generated. Perform execution deviation detection, determine power tracking error, energy statistics error, time window out of bounds, node voltage out of bounds, overcurrent event and overtemperature event, trigger local derating, pause or cut-off based on the determination result, record event code and recovery conditions, and generate local execution report; The local execution report and the original sampling data are combined to form the execution feedback. The execution feedback includes power trajectory, energy statistics, status code, event record, timestamp, charging pile identifier and vehicle identifier. It is uploaded to the central dispatch layer. After receiving the upload confirmation, the local log is archived and the next control cycle begins.
[0027] In this embodiment, the central scheduling layer retrains the self-evolving sequence compiler and recompiles the scripts based on execution feedback, including: The execution feedback from the charging pile control terminal is aggregated, indexed by power distribution cycle and vehicle identification, and timestamp alignment, anomaly removal and integrity verification are completed to form a sample set; Using the sample set as input, the policy generation and constraint evaluation module of the self-evolving sequence compiler is retrained to update the weight parameters and template parameters; The results of the energy state cooperative game are used as external constraints and preference inputs to trigger the recompilation of the sequence control language script. A joint optimization mechanism of constraint-driven counterexample-guided synthesis and syntax-constrained Monte Carlo tree search is used to generate candidate scripts and iteratively select the target script. The target script is verified by simulation playback and online small-scale grayscale verification. The release criteria are determined based on power balance deviation, number of node voltage out-of-bounds times, user satisfaction and execution complexity. Once the release threshold is reached, the updated sequence control bytecode and S-policy control script are compiled and generated. The updated S-policy control script is sent to the edge execution layer, the effective time window and rollback strategy are set, and version tracking information is recorded. Then, the next power distribution cycle is entered, and the continuous closed-loop optimization of V2G serialized intelligent power distribution is completed. Example
[0028] To verify the feasibility of this invention in practice, it was applied to a new energy demonstration charging station. This station is equipped with 20 bidirectional DC charging piles, with a total access capacity of 1000kW, serving approximately 260 electric vehicles, with about 150 vehicles active daily. The power station is connected to a dual-power system of a local photovoltaic array (180kW installed capacity) and the mains power, exhibiting typical urban load fluctuation characteristics, making it suitable for conducting V2G (vehicle-to-grid) group scheduling tests. The main objective of the test was to verify the performance improvements of this invention in dynamic energy scheduling, adaptive energy allocation, and consistent control execution.
[0029] In the test scenario, the central dispatch layer deployed a self-evolving sequence compiler to read real-time grid operation data from stations, including load curves, electricity price curves, node voltage ranges, and distribution capacity limits. This data was then fused with vehicle status data (SOC, SOH, battery temperature, geographical location, and travel time windows) to form an energy state dataset. Based on this dataset, the compiler employed a constraint-driven counterexample-guided synthesis method combined with syntax-constrained Monte Carlo tree search to generate SCL control scripts and compile them into sequence control bytecode. Within each 15-minute dispatch cycle, the central dispatch layer automatically generated a dynamically optimal dispatch script and distributed it to the group coordination layer and edge execution layer.
[0030] In the group coordination layer, the energy-state collaborative game mechanism establishes a local game model based on factors such as vehicle state of charge, health status, battery temperature, and user travel time windows. A dynamic equilibrium search algorithm is used to calculate the optimal charging and discharging power allocation scheme for vehicles within the neighborhood. During the test, the system performed 289 game solutions with an average convergence time of 1.6 seconds. The results show that under scenarios with significant load variations during morning and evening peak hours, energy distribution among vehicles tends to be balanced, effectively avoiding single-node overload.
[0031] The edge execution layer deploys a multi-policy consensus executor, which loads the S-policy control script from the central scheduling layer, the G-policy game strategy from the group coordination layer, and the local R-policy emergency strategy. Whenever the similarity among the three falls below a preset threshold (0.92), the R-policy automatically triggers a correction process. During the test, 12 policy deviation events occurred, and the system corrected and re-verified all within 8 seconds, with no charging / discharging command conflicts. In each execution cycle, the system collects power trajectories, energy changes, and node voltages in real time. The data is uploaded to the central scheduling layer via a secure channel, providing feedback data for the next round of script retraining.
[0032] After collecting execution feedback, the central scheduling layer retrains and recompiles the self-evolving sequence compiler, enabling the model to automatically optimize parameters and generation logic based on historical execution data. During 30 consecutive days of operation, the system completed 210 script retraining iterations and 5 model version iterations, reducing the average script generation time from 1.42 seconds initially to 1.05 seconds. After three rounds of evolution, the system's power regulation error under complex peak load scenarios was controlled within ±3.5%, and the node voltage fluctuation amplitude did not exceed 2.1% of the rated value, verifying the stability and rapid response capability of this method in dynamic scenarios.
[0033] Table 1 Typical Test Data of V2G Smart Power Distribution in New Energy Demonstration Charging Stations Peak load (17:00–20:00) Peak power (kW) 982 903 Peak reduction of 8.0% Average power distribution balance Balance (%) 76.5 91.8 Increased by 20.0% Node voltage fluctuation range Maximum fluctuation (%) ±4.6 ±2.1 Stability improved by 54% Average policy convergence time Time (s) 2.7 1.6 Shortened by 40.7% Strategy consistency verification pass rate Pass rate (%) 93.4 99.1 Increased by 6.1% Average execution response latency Time (s) 3.8 1.4 Shortened by 63.2% Average energy utilization rate Utilization rate (%) 92.5 97.3 Increased by 4.8% Average revenue per vehicle Earnings (RMB / day) 11.84 13.26 Growth of 12.0% Vehicle charging and discharging energy statistics Average energy (kWh) 26.4 28.1 An increase of 6.4% Script generation time Average time elapsed (s) 1.42 1.05 Reduced by 26.1% Execution power error Average deviation (%) ±6.8 ±3.5 Accuracy improved by 48.5% Energy fed back to the grid Percentage (%) 18.4 31.2 An increase of 12.8 percentage points As shown in Table 1, the proposed V2G smart power distribution method for electric vehicles based on sequence control significantly outperforms traditional centralized dispatching systems in several key performance indicators. Regarding grid operation stability, this invention, through self-evolving sequence compilation and energy-state collaborative game mechanism, reduces the peak total load during peak hours from 982kW to 903kW, a reduction of 8.0%, effectively alleviating load spikes caused by centralized charging. The maximum fluctuation range of node voltage is reduced from ±4.6% to ±2.1%, with voltage stability improved by over 50%, indicating that this method can achieve dynamic balance and energy flow constraint adjustment of the local power distribution topology under conditions of multiple vehicles concurrently accessing the grid.
[0034] In terms of scheduling efficiency and control accuracy, the method of this invention exhibits higher response speed and convergence performance. The average policy convergence time is reduced from 2.7 seconds to 1.6 seconds, and the average execution response latency is reduced from 3.8 seconds to 1.4 seconds, representing improvements of approximately 40% and 63%, respectively. This indicates that the system possesses higher dynamic response capabilities in real-time game solving and edge execution decision-making. The script generation time is reduced from 1.42 seconds to 1.05 seconds. Combined with the compiler's retraining mechanism, this ensures that the sequence control script can achieve continuous self-optimization under rapidly changing electricity prices and load scenarios. The execution power error is reduced from ±6.8% to ±3.5%, and the control accuracy is nearly doubled, further verifying the effectiveness of the multi-policy consensus executor in policy consistency verification and instruction correction.
[0035] In terms of energy utilization and economic benefits, this invention also demonstrates significant advantages. The average energy utilization rate increased from 92.5% to 97.3%, significantly reducing energy waste; the average power distribution balance improved by 20%, indicating a more balanced energy distribution among vehicle groups. Through a group collaborative game mechanism-optimized revenue distribution strategy, the average revenue per vehicle increased from 11.84 yuan to 13.26 yuan, an increase of approximately 12%. The proportion of energy fed back to the grid increased from 18.4% to 31.2%, reflecting the system's actual benefits in peak shaving and valley filling. This invention's method achieves significant improvements in scheduling flexibility, operational stability, energy utilization, and economic benefits, fully demonstrating its engineering feasibility and technological advancement in complex V2G environments.
[0036] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A sequence control-based V2G intelligent power distribution method for electric vehicles, characterized in that, include: Collect grid operation data from the grid side and vehicle status data from the vehicle side. Preprocess the grid operation data and vehicle status data to construct an energy state dataset for the electric vehicle population. A self-evolving sequence compiler is built at the central dispatch layer. It reads the energy state dataset, defines the sequence control language SCL, and adopts an optimization mechanism that combines constraint-driven counterexample-guided synthesis method with syntax-constrained Monte Carlo tree search to iteratively optimize the SCL script and generate sequence control bytecode based on power grid operation data and vehicle status data. An energy-state collaborative game mechanism is constructed at the group coordination layer. Based on the energy-state vector and individual payoff preference parameters of each electric vehicle, a local collaborative game model between vehicles is established. The local payoff value of each vehicle in the current power distribution cycle is calculated, and a dynamic Nash equilibrium search is performed to obtain the energy-state collaborative game result. A multi-policy consensus execution body is established at the edge execution layer. Each electric vehicle is loaded with an S-policy control script from the central scheduling layer, a G-policy game strategy from the group coordination layer, and a local R-policy emergency strategy. The similarity of the three is calculated. When the average similarity exceeds a preset threshold, the control command is executed; otherwise, the correction process of the local R-policy emergency strategy is triggered. The S-policy control script is executed on each charging pile control terminal to complete the charging and discharging operation according to the sequence control bytecode instructions. The power trajectory, energy change and status feedback information during the execution process are recorded, and the execution feedback is uploaded to the central scheduling layer. The central dispatch layer retrains the self-evolving sequence compiler and recompiles the scripts based on the execution feedback, updates the control strategy based on the new energy state cooperative game results, and completes the V2G serialized intelligent power distribution process.
2. The sequence control-based V2G smart power distribution method for electric vehicles according to claim 1, characterized in that, The power grid operation data includes real-time load data, electricity price curves, distribution capacity and node voltage information, and the vehicle status data includes state of charge (SOC), state of health (SOH), battery temperature, geographical location and user travel time window information.
3. The sequence control-based V2G smart power distribution method for electric vehicles according to claim 1, characterized in that, The preprocessing of power grid operation data and vehicle status data includes synchronizing power grid operation data and vehicle status data according to a unified timestamp, interpolating and removing missing and abnormal data, using normalization and standardization algorithms to unify the units, mapping data from different sources to a unified feature space, and constructing an energy state dataset.
4. The sequence control-based V2G smart power distribution method for electric vehicles according to claim 1, characterized in that, The generation of sequence control bytecode based on power grid operation data and vehicle status data includes: The self-evolving sequence compiler is initialized at the central dispatching layer, the energy state dataset is loaded as the input data source, and a data index organized according to the power distribution cycle is established. Define the instruction set and syntax production rules of the Sequence Control Language (SCL), and establish a script parser, syntax verifier, and constraint verifier. The constraints include safety constraints, capacity constraints, node voltage constraints, and user travel time window constraints. An optimized kernel for a self-evolving sequence compiler is constructed. The optimized kernel uses a constraint-driven counterexample-guided synthesis method to generate initial candidate SCL scripts. A constraint verifier is used to check the feasibility of the candidate scripts. Failure scenarios that do not meet the constraints are recorded as counterexamples and added to the sample set for the next round of script synthesis. On the candidate script set that has passed the feasibility check, a sequence strategy search is performed using syntactic-constrained Monte Carlo tree search. The script prefix is used as the search node. Sampling, evaluation and backtracking are performed on the syntactically allowed instruction extensions. The script with better performance is selected based on four evaluation criteria: energy balance, power distribution safety, user satisfaction and execution complexity. The counterexample-guided synthesis method and tree search are executed alternately in an iterative manner until the termination condition is met. The target SCL script determined after iterative optimization is submitted to the compiler to generate sequence control bytecode, forming an S-policy control script that includes execution time window, execution sequence identifier, power upper limit, power lower limit and synchronization group identifier.
5. The sequence control-based V2G smart power distribution method for electric vehicles according to claim 1, characterized in that, The obtained energy state cooperative game results include: A three-layer structure for constructing an energy-state collaborative game mechanism is proposed. The three-layer structure includes a state-aware modeling layer, a local collaborative game layer, and a global coordination mapping layer. The state-aware modeling layer extracts power grid operation data and vehicle state data from the energy-state dataset and forms standardized inputs that can be used for game. The local collaborative game layer organizes vehicles to perform strategy coordination and countermeasure updates within the feeder or transformer topology neighborhood. The global coordination mapping layer integrates the coordination results of each neighborhood in a consistent manner and outputs them. In the state-aware modeling layer, an energy state vector and individual benefit preference parameters are generated for each electric vehicle. The energy state vector consists of the state of charge, health state, battery temperature, geographical location, and travel time window. The individual benefit preference parameters consist of benefit preference, safety preference, and urgency preference. In the local collaborative game layer, the connected vehicles are divided into several neighborhoods based on the power grid topology. A local collaborative game model is constructed for each neighborhood. The local collaborative game model takes the vehicles as participants and charging, discharging, standby, discrete power levels and execution time windows as optional actions. The upper limit of distribution capacity, the allowable range of node voltage, the minimum remaining power of the vehicle and the user travel time window are hard constraints. The evaluation elements are electricity price revenue, safety constraint penalty, synchronous collaboration reward and execution complexity penalty. A comprehensive evaluation criterion for ranking the merits of actions is formed by combining weights. In the local collaborative game layer, a distributed dynamic equilibrium search is performed. The strategies of vehicles in each neighborhood are updated through interaction and response. Strategies that do not meet the constraints are corrected. The power and timing of synchronization and capacity conflicts are locally adjusted. The equilibrium is determined based on the preset convergence conditions. The equilibrium strategy configuration and corresponding evaluation results of each neighborhood are output. In the global coordination mapping layer, the equilibrium action configurations of each neighborhood are consistently integrated to eliminate cross-neighborhood resource competition and time window conflicts, generate energy state cooperative game results and encapsulate them as G-policy game strategies.
6. The sequence control-based V2G smart power distribution method for electric vehicles according to claim 1, characterized in that, The calculation of the similarity among the three entities involves executing a control command when the average similarity exceeds a preset threshold; otherwise, triggering a correction process for the local R-policy emergency strategy, including: A multi-policy consensus executor is established at the edge execution layer. The multi-policy consensus executor is an edge-side operating framework used to evaluate the consistency of S-policy control scripts, G-policy game strategies and R-policy emergency strategies and make execution decisions. It loads a unified feature template, configures similarity calculation logic and consistency judgment rules, sets the operation parameters for correction and re-verification, and starts the instruction issuance and result recording process to complete the construction and initialization of the multi-policy consensus executor. For each electric vehicle, the S-policy control script, G-policy game strategy and local R-policy emergency strategy are received respectively. The time window, power upper limit, power lower limit, control mode, synchronization group identifier and execution priority are extracted according to a unified template. The format is checked, the unit is unified and the range is pruned, and the feature is standardized and vectorized for storage. The similarity of the three types of strategies is evaluated pairwise, and the similarity between S-policy and G-policy, G-policy and R-policy, and S-policy and R-policy is given respectively. The average similarity and individual similarity reports are generated within a unified scale. Set a preset consistency threshold and make a judgment. When the average similarity reaches or exceeds the preset consistency threshold, the consensus is deemed to be passed, and the sequence control bytecode corresponding to the S-policy is sent to the charging pile control terminal for execution. When the average similarity does not reach the preset consistency threshold, the correction process of the local R-policy emergency strategy is triggered. Within the limited parameter adjustment range and the maximum number of iterations, the time window, power limit, synchronization group identifier and execution priority are minimized. After completion, the similarity assessment and threshold determination are re-executed. If the upper limit is reached and the threshold is still not passed, the security degradation strategy is executed and the central scheduling layer and group coordination layer are reported.
7. The sequence control-based V2G smart power distribution method for electric vehicles according to claim 1, characterized in that, The process involves executing the S-policy control script on each charging pile control terminal to complete the charging and discharging operations according to the sequence control bytecode instructions, including: The S-policy control script is parsed and the corresponding sequence control bytecode is loaded in the charging pile control terminal to complete the mapping of the script to the executable instruction sequence on the pile side, and the execution time window, execution sequence identifier, power upper limit, power lower limit, synchronization group identifier and execution priority are read and set. According to the time window and execution sequence identifier, charging or discharging commands are issued, fixed control cycles and sampling cycles are set, and local safety interlocks such as overvoltage protection, undervoltage protection, overcurrent protection, overtemperature protection, insulation monitoring and emergency stop linkage are enabled. During execution, power trajectory, energy change, pile-side node voltage, pile-side current, contact temperature, battery temperature, state of charge (SOC), state of health (SOH), control mode status, and execution result status code are collected in real time. Timestamp alignment and local caching are completed, and execution stage identifiers are generated. Perform execution deviation detection, determine power tracking error, energy statistics error, time window out of bounds, node voltage out of bounds, overcurrent event and overtemperature event, trigger local derating, pause or cut-off based on the determination result, record event code and recovery conditions, and generate local execution report; The local execution report and the original sampling data are combined to form the execution feedback. The execution feedback includes power trajectory, energy statistics, status code, event record, timestamp, charging pile identifier and vehicle identifier. It is uploaded to the central dispatch layer. After receiving the upload confirmation, the local log is archived and the next control cycle begins.
8. The sequence control-based V2G smart power distribution method for electric vehicles according to claim 1, characterized in that, The central scheduling layer retrains the self-evolving sequence compiler and recompiles the scripts based on execution feedback, including: The execution feedback from the charging pile control terminal is aggregated, indexed by power distribution cycle and vehicle identification, and timestamp alignment, anomaly removal and integrity verification are completed to form a sample set; Using the sample set as input, the policy generation and constraint evaluation module of the self-evolving sequence compiler is retrained to update the weight parameters and template parameters; The results of the energy state cooperative game are used as external constraints and preference inputs to trigger the recompilation of the sequence control language script. A joint optimization mechanism of constraint-driven counterexample-guided synthesis and syntax-constrained Monte Carlo tree search is used to generate candidate scripts and iteratively select the target script. The target script is verified by simulation playback and online small-scale grayscale verification. The release criteria are determined based on power balance deviation, number of node voltage out-of-bounds times, user satisfaction and execution complexity. Once the release threshold is reached, the updated sequence control bytecode and S-policy control script are compiled and generated. The updated S-policy control script is sent to the edge execution layer, the effective time window and rollback strategy are set, and version tracking information is recorded. Then, the next power distribution cycle is entered, and the continuous closed-loop optimization of V2G serialized intelligent power distribution is completed.