Electric vehicle charging and discharging resource scheduling method and system based on power grid load data

CN122993006APending Publication Date: 2026-10-27BEIJING SHENGSHI KAIRUI INVESTMENT GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610834019.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-10
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0003]此外,在大规模车辆调度层面,现有技术由调度中心直接与海量车辆逐一通信和计算,通信与计算负载随车辆数量线性增长,且充放电任务在时间维度上容易产生冲突,缺乏有效的分层汇聚与无冲突时隙编排机制,难以在保障调度有序性的同时实现时隙资源的高效利用,进而限制了V2G系统向社区级、区域级规模化扩展的能力

Benefits of technology

1、本发明通过采集电网、车辆与充电桩的多源数据,从电网负荷数据中提取调度态势并生成区域削峰填谷需求,按社区承载能力分解任务,进而以车辆可调度属性为约束、以电网任务完成度、用户净收益和电池损耗为优化目标,通过改进多目标粒子群算法生成单车级充放电指令,并基于动态博弈与沙普利值精确结算每辆车的实际削峰填谷贡献,最终将执行偏差反馈修正车辆状态与电网预测参数,实现了电网负荷需求与电动汽车充放电资源的精准匹配、用户收益与电池保护的均衡优化以及调度策略的持续自适应迭代,有效提升了电网调度的经济性、可靠性与资源利用效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122993006A_ABST
    Figure CN122993006A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of charging and discharging resource scheduling, and discloses an electric vehicle charging and discharging resource scheduling method and system based on power grid load data, which comprises the following steps: decomposing regional total demand into community-level scheduling task packages; analyzing the vehicle schedulable attributes of each community in the community-level scheduling task packages, and forming an initial charging and discharging task allocation scheme based on the vehicle schedulable attributes; taking the highest degree of completion of the power grid task, the maximum user net income and the minimum battery loss as optimization targets, iteratively optimizing the initial charging and discharging task allocation scheme to obtain an optimal single-vehicle charging and discharging scheduling instruction set; issuing the optimal single-vehicle charging and discharging scheduling instruction set to corresponding charging piles and vehicles for execution, recording actual execution records in real time, and calculating the peak shaving contribution degree and the valley filling contribution degree of the vehicles based on the actual execution records. The application realizes accurate matching of power grid load demand and electric vehicle charging and discharging resources and continuous self-adaptive iteration of the scheduling strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of charging and discharging resource scheduling technology, and more specifically, to a method and system for electric vehicle charging and discharging resource scheduling based on power grid load data. Background Technology

[0002] Electric vehicle (EV) grid integration technology is a key path to achieving vehicle-to-grid (V2G) interaction. By transforming EVs from simple electricity loads into mobile energy storage units for the grid, they can discharge to the grid during peak load periods to reduce peak demand and charge during off-peak periods to fill in the gaps. This simultaneously promotes the integration of renewable energy, reduces vehicle owners' operating costs, and drives the coordinated upgrading of new energy vehicles and the energy ecosystem. However, existing V2G scheduling methods still face multiple obstacles in practical large-scale deployment: At the scheduling method level, existing technologies mostly rely on static electricity price signals or simple rules for charging and discharging control. They lack comprehensive consideration of the real-time supply and demand status of the power grid, the dispatchability of vehicles, and user travel constraints. It is difficult to achieve a balance between the completion of power grid tasks, net user benefits, and battery losses. This results in crude scheduling decisions, low resource utilization, and the inability to adaptively iterate and correct based on actual execution deviations. The scheduling strategy is difficult to continuously optimize with changes in power grid load characteristics and vehicle behavior.

[0003] Furthermore, at the level of large-scale vehicle dispatching, existing technologies rely on the dispatch center to communicate and compute directly with a massive number of vehicles one by one. The communication and computing load increases linearly with the number of vehicles, and charging and discharging tasks are prone to conflicts in the time dimension. There is a lack of effective hierarchical aggregation and conflict-free time slot orchestration mechanisms, making it difficult to achieve efficient utilization of time slot resources while ensuring the orderliness of dispatching. This limits the ability of V2G systems to scale up to the community and regional levels.

[0004] No effective solutions have yet been proposed to address the problems in the relevant technologies. Summary of the Invention

[0005] To address the problems in related technologies, this invention proposes a method and system for scheduling electric vehicle charging and discharging resources based on power grid load data, in order to overcome the aforementioned technical problems existing in the existing related technologies.

[0006] Therefore, the specific technical solution adopted by the present invention is as follows: According to one aspect of the present invention, a method for scheduling electric vehicle charging and discharging resources based on power grid load data is provided, the method comprising: S1. Collect raw data from the power grid side, vehicle side and charging pile side to construct a multi-source heterogeneous dataset; S2. Extract scheduling situation dataset from multi-source heterogeneous dataset and generate regional total demand. Decompose regional total demand into community-level scheduling task packages with the proportion of vehicle ownership and charging pile capacity of each community as weights. S3. Analyze the vehicle dispatchable attributes of each community in the community-level scheduling task package, and form an initial charging and discharging task allocation scheme based on the vehicle dispatchable attributes. With the optimization objectives of maximizing the grid task completion rate, maximizing user net benefits, and minimizing battery loss, iteratively optimize the initial charging and discharging task allocation scheme to obtain the optimal single-vehicle charging and discharging scheduling instruction set. S4. The optimal single-vehicle charging and discharging scheduling instruction set is sent to the corresponding charging pile and vehicle for execution through a unified communication interface. The actual charging and discharging amount, response time and duration of the vehicle during the execution process are recorded in real time and an actual execution record is formed. Based on the actual execution record, the peak shaving contribution and valley filling contribution of the vehicle are calculated. S5. Combine the actual execution records and contribution calculation results to analyze the actual response characteristics of the vehicle, and update the vehicle status parameters and power grid supply and demand prediction parameters. The updated parameters are then fed back to step S1 and merged with the original multi-source heterogeneous dataset as the basic dataset for the next scheduling cycle.

[0007] According to another aspect of the present invention, an electric vehicle charging and discharging resource scheduling system based on power grid load data is also provided, the system comprising: The multi-source data aggregation module is used to collect raw data from the power grid side, vehicle side and charging pile side to construct a multi-source heterogeneous dataset; The regional demand decomposition module is used to extract scheduling situation datasets from multi-source heterogeneous datasets and generate total regional demand. It decomposes the total regional demand into community-level scheduling task packages based on the proportion of vehicle ownership and charging pile capacity in each community. The single-vehicle instruction optimization module is used to parse the vehicle dispatchable attributes of each community in the community-level scheduling task package, and form an initial charging and discharging task allocation scheme based on the vehicle dispatchable attributes. With the optimization objectives of maximizing the grid task completion rate, maximizing user net benefits, and minimizing battery loss, the initial charging and discharging task allocation scheme is iteratively optimized to obtain the optimal single-vehicle charging and discharging scheduling instruction set. The execution contribution settlement module is used to send the optimal single-vehicle charging and discharging scheduling instruction set to the corresponding charging pile and vehicle for execution through a unified communication interface. It records the actual charging and discharging amount, response time and duration of the vehicle in real time during the execution process and forms an actual execution record. Based on the actual execution record, it calculates the peak shaving contribution and valley filling contribution of the vehicle. The feedback parameter update module is used to analyze the actual response characteristics of vehicles by combining actual execution records and contribution calculation results, and update vehicle status parameters and power grid supply and demand prediction parameters. The updated parameters are fed back to the multi-source data aggregation module and merged with the original multi-source heterogeneous dataset as the basic dataset for the next scheduling cycle.

[0008] The beneficial effects of this invention are as follows: 1. This invention collects multi-source data from the power grid, vehicles, and charging piles, extracts the scheduling situation from the power grid load data, generates regional peak shaving and valley filling demand, decomposes tasks according to community carrying capacity, and then uses vehicle scheduling attributes as constraints and power grid task completion, user net benefits, and battery losses as optimization objectives. It generates single-vehicle-level charging and discharging instructions through an improved multi-objective particle swarm optimization algorithm, and accurately calculates the actual peak shaving and valley filling contribution of each vehicle based on dynamic game theory and Shapley value. Finally, it uses execution deviation feedback to correct vehicle status and power grid prediction parameters, achieving precise matching between power grid load demand and electric vehicle charging and discharging resources, balanced optimization of user benefits and battery protection, and continuous adaptive iteration of scheduling strategies, effectively improving the economy, reliability, and resource utilization efficiency of power grid scheduling.

[0009] 2. This invention constructs a master-slave game model that integrates the real-time supply and demand status of the power grid into the pricing process, generating a dynamic equilibrium value coefficient to accurately reflect the true value of the adjustment service in each time slot. At the same time, it uses the Shapley value algorithm to model the cooperative game among vehicles participating in the response in the same time slot, establishes vehicle sub-alliances and calculates the marginal filling improvement before and after each vehicle joins, and removes the unique incremental contribution of each vehicle to the peak shaving or valley filling task. Finally, the marginal contribution is multiplied and aggregated with the dynamic value coefficient to form a single vehicle contribution settlement result that takes into account both efficiency and fairness. This solves the problem that traditional fixed electricity price settlement cannot distinguish the true contribution of individuals, and improves the enthusiasm of users to participate in dispatch and the fairness of revenue distribution.

[0010] 3. This invention constructs a tree-like hierarchical network of communities, charging piles, and vehicles. Vehicle self-assessment requirements are reported layer by layer to generate a superframe structure. The charging and discharging time slots are sequentially and conflict-freely allocated with scheduling suitability as the priority, forming a high-quality initial plan. Then, through multi-objective optimization, a balance is achieved between grid task completion, user benefits, and battery protection. Finally, an executable and precise single-vehicle instruction is output, realizing the orderly decomposition of large-scale vehicle scheduling tasks, efficient resource utilization, and multi-objective collaborative optimization. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart of an electric vehicle charging and discharging resource scheduling method based on power grid load data according to an embodiment of the present invention; Figure 2 This is a schematic diagram of an electric vehicle charging and discharging resource scheduling system based on power grid load data, according to an embodiment of the present invention.

[0013] In the picture: 1. Multi-source data aggregation module; 2. Regional demand decomposition module; 3. Single vehicle instruction optimization module; 4. Execution contribution settlement module; 5. Feedback parameter update module. Detailed Implementation

[0014] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention.

[0015] According to embodiments of the present invention, a method and system for scheduling electric vehicle charging and discharging resources based on power grid load data are provided.

[0016] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, according to an embodiment of the present invention, a method for scheduling electric vehicle charging and discharging resources based on grid load data includes: S1. Collect raw data from the power grid side, vehicle side and charging pile side to construct a multi-source heterogeneous dataset.

[0017] It should be noted that the raw data collected from the power grid side mainly includes: real-time load of the regional power grid, historical load curves, time-of-use electricity prices, spot market electricity prices, ancillary service market prices, power grid frequency, voltage level, reserve capacity, peak shaving and valley filling demand instructions issued by the superior dispatching agency, real-time output and predicted output of distributed photovoltaic and wind power, etc. These data provide the basis for the subsequent step S2 to extract historical patterns of power grid load and real-time supply and demand status of the power grid.

[0018] The raw data collected from the vehicle side mainly includes: vehicle ID, model, battery type, current state of charge (SOC), battery health status (SOH), battery temperature, rated capacity, etc. for each electric vehicle. This data provides support for the subsequent step S3 to extract the vehicle's schedulable attributes.

[0019] The raw data collected from the charging pile side mainly includes: charging pile ID, rated power, total rated capacity, current available capacity, occupancy status, fault status, working mode, online status, communication protocol type, community or substation number, geolocation code, as well as the ID of the currently connected vehicle, access time, and expected departure time, etc. This data provides the basis for the subsequent step S2 to extract the available capacity of the charging pile network and the step S23 to calculate the proportion of the total rated capacity of the community charging piles.

[0020] After cleaning, removing outliers, filling in missing values, and deduplicating the aforementioned multi-source data, time alignment and fusion are performed using vehicle ID, charging pile ID, and time tag as association keys, ultimately forming a unified structured multi-source heterogeneous dataset, which serves as the unified data input source for each step in the subsequent scheduling cycle.

[0021] S2. Extract scheduling situation dataset from multi-source heterogeneous datasets and generate regional total demand. Decompose regional total demand into community-level scheduling task packages with the proportion of vehicle ownership and charging pile capacity in each community as weights.

[0022] Wherein, S2 includes: S21. Extract scheduling status data from multi-source heterogeneous datasets, including historical patterns of power grid load, vehicle charging and discharging behavior characteristics, real-time power grid supply and demand status, and available capacity of charging pile networks. Specifically, this includes: From multi-source heterogeneous datasets, time-series data of power grid load over several past scheduling cycles are extracted. Statistical analysis or pattern recognition methods are used to extract load curve morphology features, peak-valley period distribution patterns, and load change trends to form historical patterns of power grid load.

[0023] Historical charging and discharging records of electric vehicles in the community are extracted from multi-source heterogeneous datasets, including the start time, duration, charging and discharging amount, and dispatch command type of each charging and discharging. The response probability, average response time, and charging and discharging preference time periods of the vehicles are statistically analyzed to form the characteristics of vehicle charging and discharging behavior.

[0024] From multi-source heterogeneous datasets, real-time grid load, available power generation output, reserve capacity, real-time renewable energy output, frequency and voltage, and other operating indicators are extracted to calculate the grid supply-demand gap and supply-demand tightness, thus forming the real-time grid supply-demand status.

[0025] The current available capacity, occupancy status and fault status of each charging pile are extracted from the multi-source heterogeneous dataset and summarized to form the available capacity of the charging pile network.

[0026] The generated historical patterns of power grid load, characteristics of vehicle charging and discharging behavior, real-time supply and demand status of the power grid, and available capacity of the charging pile network are structurally integrated to form a unified scheduling situation dataset, which serves as the direct input to the S22 regional demand calculation model.

[0027] S22. Input the scheduling situation dataset into the preset regional demand calculation model and output the total regional demand in the current scheduling cycle. The total regional demand includes peak shaving demand, valley filling demand and ancillary service demand.

[0028] It should be noted that the regional demand calculation model is a multi-input, multi-output prediction and decision-making model. Its task is to receive the dispatch status dataset extracted in the current dispatch cycle and output the peak shaving demand, valley filling demand, and ancillary service demand that the regional power grid needs to complete in the current dispatch cycle. The regional demand calculation model adopts a three-layer architecture of feature extraction layer, demand prediction layer, and constraint verification layer.

[0029] First layer: Feature extraction layer; The input dispatch situation dataset is standardized, and the time-series data is divided into fixed-length feature vectors using a sliding window. For historical patterns of power grid load, statistical aggregation (mean, peak, and peak-valley period labels) is used; for real-time supply and demand status, it is directly encoded into numerical features such as supply-demand difference and tightness; for available charging pile capacity and vehicle behavior characteristics, aggregation and encoding are performed according to the community dimension.

[0030] The second layer is the demand forecasting layer. Using Long Short-Term Memory (LSTM) networks or Gated Recurrent Units (GRUs), historical load sequences and real-time supply and demand characteristics are input to predict the load curve for the next scheduling cycle. The predicted load is compared with grid safety operation thresholds (e.g., transformer capacity upper limit, voltage stability lower limit). The portion exceeding the upper limit is the peak-shaving demand, and the portion below the lower limit is the valley-filling demand. Ancillary service demand is calculated using a confidence interval formula based on the historical standard deviation of the prediction error and the current reserve capacity gap.

[0031] The third layer, the constraint verification layer; The raw demand value output by the demand forecasting layer is compared with the available capacity of the charging pile network. If the peak-shaving demand exceeds the total discharge capacity of the community's charging piles, it is truncated to the upper limit of the available capacity; if the valley-filling demand exceeds the total charging capacity, it is also truncated. The truncated demand value is converted into specific charging and discharging power and ancillary service duration requirements through a power conversion factor, and finally outputs the total regional demand for the current scheduling period.

[0032] The training process for the regional demand calculation model includes: extracting historical data from the past N scheduling cycles from a multi-source heterogeneous dataset. For each historical cycle, constructing an input feature vector (including historical patterns of grid load before the start of the cycle, vehicle behavior characteristics, real-time supply and demand status, and available charging pile capacity) and an output label (the actual peak shaving, valley filling, and ancillary service volume executed during the cycle, or the demand instructions issued by the superior dispatching agency). The dataset is then divided chronologically into a training set (first 70% of cycles), a validation set, a middle 15% of cycles, and a test set (last 15% of cycles).

[0033] Input features are normalized; continuous features are standardized using Z-scores, and categorical features are one-hot encoded. Missing values ​​are filled using linear interpolation or mean imputation. For temporal features, a sliding window is used to generate fixed-length input sequences. The number of hidden layers is set to 2-3, the number of hidden units to 64-128, the initial learning rate to 0.001, and the Adam optimizer is used with mean squared error (MSE) as the loss function. During training, the validation set loss is monitored, and an early stopping mechanism is triggered when the validation loss does not decrease for 5 consecutive epochs. The number of hidden layers, number of units, and learning rate are tuned using grid search or Bayesian optimization. The model's prediction accuracy is evaluated on the test set, and the mean absolute percentage error (MAS) of peak-shaving demand, valley-filling demand, and ancillary service demand is calculated. When the errors of all three indicators are below the preset thresholds, the model is deployed as a regional demand calculation model and embedded in step S22 as a preset model.

[0034] The regional demand calculation model is not static. At the end of each scheduling cycle, the actual execution records and actual grid load curves for that cycle are compared with the model's predicted values ​​to calculate the prediction deviation. When the prediction deviation exceeds a threshold for multiple consecutive cycles, a model retraining mechanism is triggered: the data from the latest cycle is added to the training set, the data from the oldest cycle is removed, and the model is incrementally trained or fully retrained using a rolling window approach, allowing the model to continuously adapt to changes in grid load characteristics and vehicle behavior.

[0035] S23. Extract the percentage of registered electric vehicles and the percentage of total rated capacity of charging piles in each community from the multi-source heterogeneous dataset. Calculate the comprehensive capacity of each community for this scheduling task using a weighted average method. Specifically, this includes: From the multi-source heterogeneous dataset, the number of registered electric vehicles in each community within the region is extracted, and the proportion of the number of registered electric vehicles in each community to the total number of registered electric vehicles in the region is calculated as the vehicle ownership proportion factor of each community.

[0036] From the multi-source heterogeneous dataset, the total rated capacity of charging piles in each community within the region (i.e., the sum of the rated power of all charging piles in the community) is extracted. The proportion of the total rated capacity of charging piles in each community to the total capacity of charging piles in the region is calculated as the charging pile capacity proportion factor of each community.

[0037] Based on the nature of this dispatching task, weighting coefficients are set for the vehicle ownership ratio factor and the charging pile capacity ratio factor. When the dispatching task focuses on peak shaving (requiring discharge capacity), the weight of the charging pile capacity ratio factor can be appropriately increased; when the dispatching task focuses on valley filling (requiring charging demand), the weight of the vehicle ownership ratio factor can be appropriately increased. The sum of the weighting coefficients is 1.

[0038] The vehicle ownership ratio factor obtained in S231 and the charging pile capacity ratio factor obtained in S232 are weighted and summed according to the weighting coefficient determined in S233 to obtain the comprehensive undertaking capacity of each community for this dispatch task. This value is directly used as the basis for decomposing the total regional demand to each community according to the weight ratio in S24.

[0039] S24. Based on the total regional demand within the current scheduling cycle, and taking the comprehensive capacity of each community as the allocation basis, the peak shaving demand, valley filling demand, and auxiliary service demand in the total regional demand are allocated to each community according to their weight ratios, forming a community-level scheduling task package for each community.

[0040] S3. Analyze the vehicle dispatchable attributes of each community in the community-level scheduling task package, and form an initial charging and discharging task allocation scheme based on the vehicle dispatchable attributes. With the optimization objectives of maximizing the grid task completion rate, maximizing user net benefits, and minimizing battery loss, iteratively optimize the initial charging and discharging task allocation scheme to obtain the optimal single-vehicle charging and discharging scheduling instruction set.

[0041] Wherein, S3 includes: S31. Receive and parse the community-level scheduling task package to obtain the target total charging and discharging power and execution time window of each community, and extract the schedulable attributes of vehicles in each community from the multi-source heterogeneous dataset.

[0042] Vehicle dispatchability attributes refer to key state parameters and user-defined information extracted from multi-source heterogeneous datasets to determine whether an electric vehicle is eligible to participate in charging and discharging scheduling and its scheduling capacity limit. Specifically, these include: I. Battery physical state; Current state of charge: The percentage of battery charge remaining, which determines the amount of chargeable capacity or dischargeable capacity.

[0043] Battery health status: The ratio of the battery's current maximum capacity to its rated capacity, which affects the maximum charge / discharge power and available capacity.

[0044] Battery rated capacity / available capacity: determines the maximum regulated power that can be provided in a single dispatch.

[0045] Maximum charge / discharge power: The upper limit of power is restricted by the battery and vehicle BMS.

[0046] II. User travel plans; Target state of charge: The minimum charge level that the battery must reach when disconnected from the grid, as set by the user, is a hard constraint for the charging task.

[0047] Expected off-grid time: The end time of a vehicle's stay at a charging station, which limits the boundaries of the schedulable time window.

[0048] Next day's travel mileage requirement: used to estimate the minimum amount of electricity that must be restored before the vehicle leaves the grid, and to help correct the target state of charge.

[0049] III. Vehicle identification and connection status; Vehicle ID: A unique identifier used for linking instructions and settlement.

[0050] Currently connected charging pile ID: This identifies which community and which charging pile the vehicle is participating in the dispatch process for.

[0051] Access time: The moment when a vehicle begins to connect to a charging station, which together with the off-grid time constitutes the scheduling time window.

[0052] S32. Divide the execution time window into consecutive scheduling time slots, and decompose the total task into charging and discharging power sub-tasks for each time slot based on the target total charging and discharging power of each community. S33. Based on the vehicle's schedulable attributes, select vehicles that meet the target state of charge and user travel constraints, calculate the vehicle scheduling priority, and allocate the charging and discharging power sub-tasks of each time slot to the corresponding vehicles in descending order of vehicle scheduling priority, thus forming an initial charging and discharging task allocation scheme.

[0053] Wherein, S33 includes: S331. Construct a tree-like dispatch network structure with the community dispatch center as the root node, the charging pile as the intermediate node, and the connected electric vehicles as the leaf nodes.

[0054] It should be noted that a tree-like scheduling network with the community dispatch center as the root node, each charging pile as an intermediate node, and the connected electric vehicles as leaf nodes is constructed, using the minimum depth. After the tree-like scheduling network is constructed, each node obtains and stores its own depth (i.e., the number of levels from the root node), the parent node identifier, and a list of all child nodes. The specific construction method is as follows: The community dispatch center is used as the root node of the tree with a depth of 0, and its child nodes are all online and available charging piles within the community's jurisdiction. Each charging pile is taken as the middle node of the tree, its parent node is the community dispatch center, and its child nodes are all electric vehicles that are currently physically connected to the charging pile and have registered to participate in the dispatch. Each electric vehicle is treated as a leaf node of the tree, and its parent node is the charging station it is connected to. Leaf nodes no longer have child nodes.

[0055] The tree-like network structure is rebuilt at the beginning of each scheduling cycle to reflect the real-time access status of charging piles and vehicles. If a charging pile is offline or malfunctions, it and its child nodes do not participate in the current round of network construction; if a vehicle leaves midway through the cycle, the leaf node is dynamically removed from the tree and the list of child nodes of the parent node is updated layer by layer upwards.

[0056] The hierarchical structure of the tree network naturally corresponds to the information aggregation path between vehicles, charging piles, and the community dispatch center. In S332, vehicle time slot requirements are reported layer by layer from the leaf nodes upwards, intermediate nodes summarize and verify, and the root node summarizes to determine the superframe structure. All of these rely on the communication topology with clear parent-child relationships and no loops built in this step, ensuring that the information transmission direction is clear, without duplication or omission. Without building a hierarchical tree network, the community dispatch center would need to communicate directly with each vehicle in its jurisdiction. In a large-scale electric vehicle access scenario, the number of communication links and the computational load of the central node would increase linearly with the number of vehicles. The tree network built in this step distributes the communication and computational pressure to the intermediate nodes of each charging pile. The charging piles only handle the aggregation calculations of the vehicles under their jurisdiction, and the community dispatch center only needs to communicate with the charging pile nodes, significantly improving the scalability of the system.

[0057] S332. Combining the leaf nodes, intermediate nodes and root nodes in the tree-like scheduling network structure, perform self-assessment of vehicle scheduling capabilities and layer-by-layer reporting of requirements to obtain the total time slot requirements of the community, and determine the superframe structure of the current scheduling cycle based on the total time slot requirements of the community.

[0058] Wherein, S332 includes: S3321. Based on each leaf node, extract the target state of charge and user travel plan from the schedulable attributes, calculate the minimum number of charging time slots and the maximum number of discharging time slots required to reach the target state of charge within the scheduling time window, form the vehicle time slot demand, and report it to the intermediate node.

[0059] It should be noted that the minimum number of charging time slots refers to the minimum number of standard scheduling time slots required to charge the battery's State of Charge (SOC) from its current value to the target SOC within the current scheduling time window (from the current moment to the user-set estimated off-grid time). For example, each time slot is 15 minutes long. The calculation method includes: calculating the required charging capacity, i.e., (target SOC minus current SOC) multiplied by the available battery capacity; dividing this charging capacity by the product of the vehicle's maximum charging power and the duration of a single time slot; and rounding the result up.

[0060] The maximum number of discharge time slots refers to the maximum number of time slots a vehicle can provide for discharge service within a dispatch time window, provided that the battery's minimum allowable state of charge (SOC) is not lowered and the battery's health is not compromised. The calculation method includes: calculating the dischargeable capacity, i.e., (current SOC minus minimum safe SOC) multiplied by the battery's available capacity; dividing this dischargeable capacity by the product of the vehicle's maximum discharge power and the duration of a single time slot, and rounding the result down. This value is also constrained by the charging tasks that must be completed before the user-set estimated off-grid time.

[0061] S3322. After all leaf nodes have reported their vehicle time slot demand vectors, the intermediate nodes summarize the total charging time slot demand and total discharging time slot demand of the vehicles under their jurisdiction. S3323. Verify and correct the total charging time slot requirement and total discharging time slot requirement based on the rated capacity of the charging pile itself, form the total charging time slot requirement and total discharging time slot requirement at the pile level, and report them to the root node.

[0062] It should be noted that the intermediate node (charging station) compares the total charging time slot demand and total discharging time slot demand reported by the vehicles under its jurisdiction with the rated capacity of the charging station. If the total charging power demand exceeds the rated charging capacity of the charging station in any time slot, or the total discharging power demand exceeds the rated discharging capacity, the demand is reduced according to vehicle priority or the proportion reported by each vehicle until it does not exceed the rated capacity. The corrected result is the total charging time slot demand and the total discharging time slot demand at the charging station level. This step ensures that the reported demand is within the actual physical capacity.

[0063] S3324. The root node summarizes the total charging time slot demand and total discharging time slot demand reported by all intermediate nodes at the pile level, and calculates the total time slot demand of the community, which includes the total charging time slot demand and the total discharging time slot demand.

[0064] It should be noted that the total time slot requirement of the community includes two parts: the total number of charging time slots and the total number of discharging time slots. The total number of charging time slots is the result of the root node summarizing the total charging time slot requirements reported by all intermediate nodes at the pile level, taking the maximum value or a weighted sum (depending on the scheduling strategy). The total number of discharging time slots is calculated similarly. These two values ​​together determine the length of the charging time slot segment and the discharging time slot segment in the subsequent superframe structure.

[0065] The superframe length equals the sum of the community's total charging time slot demand and total discharging time slot demand, measured in the number of time slots. The superframe structure is a scheduling cycle division consisting of consecutive time slot numbers. The first half is the charging time slot segment (containing all charging time slots), and the second half is the discharging time slot segment (containing all discharging time slots). Time slot numbers start from 1 and increment sequentially. After the time slot division is complete, specific time slot numbers can be assigned to specific vehicles in S334.

[0066] S3325. Determine the superframe length of this scheduling cycle based on the total time slot requirement of the community, and complete the time slot division of the scheduling time window to finally obtain the superframe structure of the current scheduling cycle, which includes charging time slots and discharging time slots.

[0067] S333. Based on the total time slot demand of the community, determine all vehicles that have reported time slot demand, use the vehicle scheduling suitability index as the evaluation factor, calculate the vehicle scheduling priority in a weighted manner, and generate a list of schedulable vehicles arranged from high to low scheduling priority. S334. Based on the superframe structure and the list of schedulable vehicles, assign charging time slot sequences and discharging time slot sequences to each vehicle in the list of schedulable vehicles in sequence.

[0068] Wherein, S334 includes: S3341. Determine the start and end boundaries of the charging time slot and the discharging time slot; S3342. Within the charging time slot of the superframe structure, according to the total charging time slot demand of the community, charging time slots are allocated to each vehicle with charging needs in descending order of priority in the list of schedulable vehicles. The charging time slots of all vehicles are connected end to end to form a charging time slot sequence. S3343. Allocate consecutive dedicated discharge time slots to each vehicle with discharge capability according to the same priority order to form a discharge time slot sequence.

[0069] It should be noted that the core idea of ​​the DSA / DHS algorithm (demand-based time slot allocation algorithm / demand-based hybrid time slot allocation algorithm) is to first uniformly allocate the receiving time slot sequence and then uniformly allocate the transmitting time slot sequence. The charging time slot corresponds to receiving (vehicles absorb electrical energy from the grid), and the discharging time slot corresponds to transmitting (vehicles feed electrical energy back to the grid). In the superframe structure, the two belong to two independent continuous time slot segments. The charging tasks of all vehicles are completed centrally within the charging time slot segment, and the discharging tasks are completed centrally within the discharging time slot segment. From the time slot arrangement level, co-channel interference between receiving and transmitting is eliminated, ensuring the orderliness of the scheduling process.

[0070] The core idea of ​​the DSA / DHS algorithm, which uniformly allocates the receive time slot sequence and then uniformly allocates the transmit time slot sequence, is to achieve transmit-receive separation, collision-free transmission, and maximize time slot utilization in the time dimension through centralized and continuous arrangement of time slot types. Specifically, this includes: By centrally arranging the receive time slots of all nodes in the first half of the superframe and the transmit time slots in the second half of the superframe, the entire network has only one transmission direction at any given time. This fundamentally eliminates self-interference caused by simultaneous transmission and reception by the same node, as well as cross-interference between neighboring nodes due to different transmission and reception directions. Collision-free communication can be achieved without complex channel contention or collision detection mechanisms.

[0071] The receive time slot sequence and the transmit time slot sequence are continuous within each other and connected end to end. Nodes only need to maintain the receive state in the receive segment and the transmit state in the transmit segment. There is no need to frequently switch between receive and transmit states. This not only greatly reduces the energy consumption and processing overhead of node state switching, but also avoids the waste of time slot resources caused by the protection interval due to frequent switching, thus maximizing the proportion of effective communication time.

[0072] Instead of allocating receive and transmit time slots alternately for each node, the unified allocation of receive and transmit time slot sequences to all nodes makes the time slot arrangement logic simple and clear, with low signaling overhead. The aggregation node only needs to broadcast two parameters: the receive segment length and the transmit segment length. Each node can then independently calculate its own position in the sequence, thereby reducing computational complexity and the number of signaling interactions.

[0073] While allowing multiple vehicles to charge and discharge in parallel within the same time slot could shorten the task time, the combined power of multiple vehicles could lead to the charging pile or distribution transformer exceeding its capacity limit. S334 adopts a series allocation method, allocating only a limited number of vehicles for charging and discharging tasks within each time slot, ensuring that the total power within each time slot is always within the rated capacity of the charging pile and the safety margin of the power grid, thus satisfying physical constraints from the source of allocation.

[0074] The initial charge / discharge task allocation scheme generated by S334-S335 is not the final execution scheme, but rather the initial solution of the S34 multi-objective particle swarm optimization algorithm. Through sequential allocation and priority sorting, this initial solution already satisfies basic constraints such as no conflict, no exceeding limits, and priority-based allocation, and its time slot utilization is close to the upper limit, essentially making it a high-quality feasible solution. The multi-objective optimization algorithm iterates on this basis, requiring only local fine-tuning and multi-objective trade-offs, which can significantly accelerate the convergence speed and avoid the infeasibility exploration and slow convergence problems that may occur when starting from a random initial solution.

[0075] S335. Convert the charging time slot sequence into charging power commands for each vehicle in the charging time slot, convert the discharging time slot sequence into discharging power commands for each vehicle in the discharging time slot, and summarize the charging and discharging power commands of all vehicles to form an initial charging and discharging task allocation scheme.

[0076] S34. Using the initial charging and discharging task allocation scheme as the initial solution, and with the optimization objectives of maximizing grid task completion, maximizing user net benefit, and minimizing battery loss, and incorporating user travel plans as constraints, the initial charging and discharging task allocation scheme is iteratively optimized to obtain the time-slot-optimal charging and discharging power matrix, specifically including: S341. Based on the initial charge / discharge task allocation scheme generated in S335, a multi-objective optimization model is constructed, comprising three optimization objectives and one hard constraint. The optimization objectives are: maximizing the grid task completion rate (i.e., the degree of matching between the actual charge / discharge power and the target power in the community scheduling task package), maximizing the user's net benefit (i.e., the difference between discharge benefit and charging cost, minus battery degradation cost), and minimizing battery loss (measured by the amount of battery health state degradation). The hard constraint is the user's travel plan for each vehicle, i.e., the SOC must be charged to the target value before the user's expected off-grid time. The initial charge / discharge task allocation scheme is encoded as a particle, and other particles are generated based on this through random perturbation, forming the initial particle population. Each particle represents a feasible charge / discharge power allocation scheme.

[0077] S342. For each particle in the population, calculate its fitness value on the three optimization objectives. Based on the Pareto dominance relationship, determine the superiority or inferiority of each particle: if particle A is not inferior to particle B on all three objectives and is strictly superior to particle B on at least one objective, then A dominates B. Store all non-dominated particles in an external archive and maintain the diversity of the archive by calculating the crowding distance, eliminating overly dense non-dominated solutions, and keeping the size of the external archive within a preset upper limit.

[0078] S343. Each particle maintains its individual historical best position (i.e., the best non-dominated position found by the particle so far). From the external archive, a roulette wheel selection strategy based on congestion is used to select a globally optimal position for each particle as its flight guidance direction. When updating particle velocity and position, a feasibility rule is used to handle hard constraints on user travel plans: if the solution corresponding to a particle violates the target SOC or off-grid time constraint of a certain vehicle, the particle is determined to be an infeasible solution; during individual optimal and global optimal updates, feasible solutions always take precedence over infeasible solutions, guiding the population to converge toward the feasible region.

[0079] S344. Based on the velocity-position update formula of the particle swarm optimization algorithm, and combining inertia weight, individual learning factor, and social learning factor, update the velocity and position of each particle. The inertia weight adopts an adaptive decreasing strategy, maintaining a large value in the early stage of iteration to enhance global exploration capability, and gradually decreasing it in the later stage of iteration to improve local exploration accuracy. For the updated particles, a multinomial mutation operator is applied with a preset probability to perform small-amplitude random perturbations on the charging and discharging power values ​​of individual time slots to enhance population diversity and avoid getting trapped in local optima.

[0080] S345. Repeat steps S342 to S344 until a preset termination condition is met, such as reaching the maximum number of iterations or the quality of the non-dominated solutions in the external archive no longer significantly improving over several consecutive generations. After termination, a multi-objective decision-making method based on fuzzy membership is used from the external archive to select the non-dominated solution with the highest overall satisfaction as the final scheduling scheme. This scheme is decoded into a time-slot-wise optimal charging and discharging power matrix in the vehicle × time slot dimension, where each element represents the optimal charging or discharging power value of the corresponding vehicle in the corresponding time slot.

[0081] Among them, multi-objective decision-making methods based on fuzzy membership include: Step 1: For each non-dominated solution in the external archive, extract its fitness value across three optimization objectives: grid task completion (denoted as f, the larger the better), user net benefit (denoted as f, the larger the better), and battery loss (denoted as f, the smaller the better). To eliminate the differences in the dimensions of different objectives, linear normalization is used to map each objective value to the [0,1] interval. For objectives (f, f) where larger values ​​are better, the normalization formula is (actual value - minimum value) / (maximum value - minimum value); for objectives (f) where smaller values ​​are better, the normalization formula is (maximum value - actual value) / (maximum value - minimum value). The closer the normalized value is to 1, the better the objective is. 123123 Step 2: For each non-dominated solution, based on the three normalized objective values, directly use the normalized value as the membership degree of the solution on that objective. The membership degree μ represents the degree to which the solution satisfies the objective of maximizing the completion of the power grid task, μ represents the degree to which the solution satisfies the objective of maximizing the net benefit to the user, and μ represents the degree to which the solution satisfies the objective of minimizing battery loss. Each non-dominated solution has a membership degree vector [μ]. 1231 [μ2,μ3] Step 3: Define the overall satisfaction for each non-dominated solution. Take the minimum membership degree of the solution across the three objectives as the overall satisfaction index, i.e., Overall Satisfaction = min(μ1, μ2, μ3). This minimum-value strategy ensures that the selected solution performs well across all three objectives, avoiding extreme solutions where one objective is excellent while another is poor, and guaranteeing the balance of the scheduling scheme among grid-side demand, user-side revenue, and vehicle-side lifespan protection. Step 4: Compare the overall satisfaction of all non-dominated solutions in the external archive, and select the non-dominated solution with the highest overall satisfaction value as the final scheduling scheme. If multiple solutions have the same highest overall satisfaction value, further compare the next lowest membership values, and so on, until a unique optimal solution is selected. Decode this solution into a time-slot-wise optimal charging and discharging power matrix in the vehicle × time slot dimension, and output it to S35 for instruction conversion.

[0082] S35. The optimal charging and discharging power matrix is ​​converted into single-vehicle execution instructions containing vehicle ID, charging pile ID, start and end time, and average charging and discharging power, and summarized to form the optimal single-vehicle charging and discharging scheduling instruction set, specifically including: The optimal charging and discharging power matrix for each time slot is split into an independent power time series for each vehicle according to the vehicle dimension. This series records the charging and discharging power value of the vehicle in each time slot within the scheduling period. Positive values ​​represent charging power, negative values ​​represent discharging power, and zero values ​​represent no scheduling task in that time slot.

[0083] The power time series of each vehicle is traversed, and consecutive time slots with the same power direction (both positive or both negative) and similar power values ​​(e.g., a difference less than a preset threshold) are merged into an execution segment. Each execution segment includes a start time slot number, an end time slot number, and the arithmetic mean of the power values ​​within that segment.

[0084] According to the scheduling time slot allocation rules determined in S32, the start and end time slot numbers of each execution segment are mapped to the actual start and end times, respectively. For example, if an execution segment contains time slots 3 to 5, with a time slot length of 15 minutes and a start time of 14:00, then the start and end times of this execution segment are 14:30 to 15:15.

[0085] Based on the currently connected charging pile ID from the vehicle's schedulable attributes extracted in S31, each execution command for each vehicle is associated with the corresponding charging pile ID. The vehicle ID, charging pile ID, start and end time, and average charging / discharging power are encapsulated into a single-vehicle charging / discharging scheduling command, where a positive average charging / discharging power indicates a charging command and a negative average charging / discharging power indicates a discharging command. All commands from all vehicles are aggregated to form the optimal single-vehicle charging / discharging scheduling command set.

[0086] For example, in the X community scheduling scenario, the scheduling time window is 14:00-15:00, with a total of 4 time slots (each time slot is 15 minutes); the optimal charge and discharge power matrix output by time slot after S34 optimization is shown in Table 1 (unit: kW, positive value for charging, negative value for discharging).

[0087] Table 1. Output Slot-by-Slot Optimal Charge / Discharge Power Matrix

[0088] Instruction conversion process: Step 1: Split the power sequence by vehicle; Vehicle V1 power sequence: [Time slot 1: +6.8, Time slot 2: +7.0, Time slot 3: -6.5, Time slot 4: -6.7]; Vehicle V2 power sequence: [Time slot 1: 0, Time slot 2: +7.1, Time slot 3: 0, Time slot 4: -7.0]; Step 2: Consecutive time slot merging; Vehicle V1: Time slots 1 and 2 are both positive (charging), with a power difference of 0.2kW, which is less than the threshold (e.g., 1kW). They are combined into execution segment A, with an average power of (+6.8+7.0)÷2=+6.9kW. Time slots 3 and 4 are both negative (discharging), with a power difference of 0.2kW. They are combined into execution segment B, with an average power of (-6.5+(-6.7))÷2=-6.6kW.

[0089] Vehicle V2: Time slot 2 is positive, acting as independent execution segment C, with an average power of +7.1kW; time slot 4 is negative, acting as independent execution segment D, with an average power of -7.0kW. Time slots 1 and 3 have zero power and do not generate instructions.

[0090] Step 3: Convert the time slot number into actual time; Vehicle V1 executes segment A: time slots 1-2, start and end time 14:00-14:30, lasting 30 minutes.

[0091] Vehicle V1 execution segment B: time slots 3-4, start and end time 14:30-15:00, lasting 30 minutes.

[0092] Vehicle V2 execution segment C: time slot 2, start and end time 14:15-14:30, lasting 15 minutes.

[0093] Vehicle V2 executes segment D: time slot 4, start and end time 14:45-15:00, lasting 15 minutes.

[0094] Step 4: Encapsulate and summarize the instructions; As shown in Table 2, the four instructions are summarized to form the optimal single-vehicle charging and discharging scheduling instruction set for a certain community. They can be directly sent to the charging pile P1 one by one through the unified communication interface, and then forwarded by P1 to the corresponding vehicles V1 and V2 for execution.

[0095] Table 2 Packaging Instructions

[0096] S4. The optimal single-vehicle charging and discharging scheduling instruction set is sent to the corresponding charging pile and vehicle for execution through a unified communication interface. The actual charging and discharging amount, response time and duration of the vehicle during the execution process are recorded in real time and an actual execution record is formed. Based on the actual execution record, the peak shaving contribution and valley filling contribution of the vehicle are calculated.

[0097] Wherein, S4 includes: S41. The optimal single-vehicle charging and discharging scheduling instruction set is sent out one by one to the corresponding charging piles and vehicles for execution through a unified communication interface; S42. During the execution of the instruction, the actual charging and discharging power, response time and duration of each vehicle are collected in real time and aligned with the corresponding charging and discharging time slot to form an actual execution record containing vehicle ID, time slot number, actual charging and discharging amount and response time. S43. Combining the value coefficients corresponding to each charging and discharging time slot with the actual charging and discharging amounts in the actual execution records, and introducing the power grid supply and demand indicators in the scheduling situation dataset, the contribution calculation algorithm of dynamic game value is used to calculate the single-vehicle contribution settlement result of each vehicle; the single-vehicle contribution settlement result includes the single-vehicle peak shaving contribution and valley filling contribution.

[0098] Wherein, S43 includes: S431. Extract power grid supply and demand indicators from the dispatch situation dataset to construct a master-slave game model. Use reverse induction to solve the equilibrium solution of the master-slave game model in each charging and discharging time slot, and obtain the dynamic equilibrium value coefficient of each charging and discharging time slot.

[0099] It should be noted that the power grid supply and demand indicators extracted from the dispatch situation dataset include five categories: real-time power grid load, i.e., the total active power load of the regional power grid at the current moment, extracted from the real-time power grid supply and demand status in the dispatch situation dataset; available generating capacity, i.e., the maximum dispatchable generating capacity of the regional power grid at the current moment, extracted from the real-time power grid supply and demand status; supply and demand gap, calculated by subtracting available generating capacity from real-time load, with positive values ​​indicating insufficient supply and negative values ​​indicating oversupply; reserve capacity gap, calculated by subtracting the current actual reserve capacity from the minimum required reserve capacity; and new energy output prediction deviation, i.e., the difference between the current actual new energy output and the day-ahead prediction value, extracted by comparing the historical patterns and real-time status of the power grid load in the dispatch situation dataset.

[0100] The specific structure of the master-slave game model (i.e., the game model) includes: constructing a single-master, multi-slave Stackelberg game model with the power grid dispatch center as the master and the electric vehicle group participating in the response within the community as the followers. The game occurs within each dispatch time slot, and the games in each time slot are independent of each other, specifically including: 1. Participants and decision-making sequence; The leading entity, the power grid dispatch center, first announces the unit adjustment incentive price (i.e., value coefficient) for that time slot.

[0101] Followers: The electric vehicle swarm, after observing the price, each vehicle independently determines its actual charging and discharging power in that time slot.

[0102] 2. The utility function of the dominant entity (power grid dispatch center); The goal of the power grid dispatch center is to minimize the sum of power grid operating costs and penalty costs for unmet regulation demands. Its utility function is to maximize the net power grid revenue: Net power grid revenue = Unit regulation value × Total vehicle regulation power - Incentive price × Total vehicle regulation power.

[0103] The unit regulation value is derived from the grid supply and demand indicators; the tighter the supply and demand, the higher the unit regulation value. The grid dispatch center induces vehicles to provide sufficient regulation power by selecting the optimal incentive price, while minimizing its own expenditure costs.

[0104] 3. The utility function of the followers (electric vehicle herd); The goal of each electric vehicle is to maximize its net revenue: Net revenue = Incentive price × Self-regulating power - Battery depreciation cost × Self-regulating power - Charging cost (if charging); where battery depreciation cost is related to charge / discharge power and battery state of health (SOH), and charging cost is the time-of-use electricity price from the grid.

[0105] 4. Strategy space; Dominant strategy: Incentive price, with a value range of [0, and the upper limit of the adjustment value per time slot].

[0106] Follower strategy: The actual charging and discharging power of each vehicle is constrained by its schedulable attributes (SOC, SOH, maximum charging and discharging power).

[0107] The specific solution process of backward induction includes: Step 1: Solve for the follower's optimal response function: For any incentive price announced by the leader, each vehicle solves for its optimal charging / discharging power based on its own utility maximization principle. Differentiate the utility function of vehicle i and set the derivative to zero to obtain its optimal response function: when the incentive price is higher than its marginal cost, the vehicle provides maximum available power; when the incentive price is lower than its marginal cost, the vehicle does not provide adjustment power; when they are equal, it provides any feasible power. Superimpose the optimal response functions of all vehicles in the power direction to obtain the overall optimal response function of the community's electric vehicle group.

[0108] Step Two: The dominant player optimizes its own utility using the follower's response function: The power grid dispatch center predicts the follower's overall optimal response function and substitutes it into its own utility function, transforming the utility function into an optimization problem with only the incentive price as a single variable. The first-order necessary conditions are solved to obtain the optimal incentive price. This price is the equilibrium price that maximizes the power grid's net revenue.

[0109] Step 3: Reverse Substitution to Determine the Actual Power of Each Vehicle: Substitute the optimal incentive price obtained in Step 2 into the optimal response function of each vehicle in Step 1 to determine the actual charging and discharging power allocation of each vehicle in that time slot. This price and power combination constitutes the subgame perfect Nash equilibrium for that time slot.

[0110] The optimal incentive price obtained from the above solution is the dynamic equilibrium value coefficient for that time slot. Its physical meaning is: under the current power grid supply and demand conditions, the highest marginal price the power grid dispatch center is willing to pay to obtain a unit of regulated power. In subsequent step S434, this dynamic equilibrium value coefficient is directly used as a multiplier factor, multiplied by the Shapley marginal contribution of each vehicle to obtain the settlement value of the vehicle's peak-shaving contribution or valley-filling contribution for that time slot.

[0111] The game theory model must satisfy the following constraints during the solution process: 1. Vehicle physical constraints: The charging and discharging power of each vehicle shall not exceed its maximum charging and discharging power, and the State of Charge (SOC) shall not be lower than the lower safety limit and not higher than the upper safety limit.

[0112] 2. Charging pile capacity constraint: The total charging power or total discharging power of vehicles in the community within each time slot shall not exceed the total rated capacity of the community's charging pile network.

[0113] 3. Power grid security constraints: The total regional regulation power shall not exceed the maximum regulation that the power grid can absorb.

[0114] 4. User travel constraints: The SOC of a vehicle at the end of the scheduling cycle shall not be lower than the target value set by the user (this constraint has been treated as a hard constraint in S34, and the game model here solves for the set of feasible vehicles that have passed the constraint screening).

[0115] When power grid supply and demand indicators change, such as a sudden increase in load or a sharp drop in renewable energy output, the game theory model solves independently in each scheduling time slot. It requires no retraining or offline modeling; simply updating the input indicator values ​​is sufficient to solve for the equilibrium solution online in real time, meeting the time response requirements of the scheduling cycle. S432. Extract all vehicles that actually generate charging and discharging responses within each charging and discharging time slot to form a cooperative game alliance. S433. Use the Shapley value algorithm to enumerate all vehicle sub-alliances in the cooperative game alliance, calculate the filling degree of each vehicle sub-alliance to the total task based on the actual charging and discharging amount in the actual execution record, and obtain the marginal contribution of each vehicle in the current charging and discharging time slot.

[0116] It should be noted that the term "charge / discharge time slot" is a collective term for both charging and discharging time slots. In a superframe structure within a scheduling cycle, there are charging and discharging time slot segments, each consisting of several consecutive charging or discharging time slots. When this invention relates to traversing all time slots, the term "charge / discharge time slot" refers to the set of charging and discharging time slots. When this invention relates to the specific calculation of a single time slot, it is determined whether it is a charging or discharging time slot based on the time slot segment it belongs to, and the corresponding contribution type is determined accordingly. Charging time slots correspond to valley-filling marginal contribution, and discharging time slots correspond to peak-shaving marginal contribution.

[0117] Wherein, S433 includes: S4331. For the cooperative game alliance in the current charging / discharging time slot, an exhaustive combination method is used to generate all non-empty subsets of the cooperative game alliance. Each subset represents a type of vehicle cooperative sub-alliance. Specifically, for the current charging / discharging time slot, all vehicles that actually generate charging / discharging responses within that time slot, extracted from S432, constitute the cooperative game alliance for that time slot. The membership criteria for the alliance are: the actual charging / discharging amount of a vehicle in that time slot is greater than zero, meaning the vehicle actually participated in the peak shaving or valley filling task response for that time slot. Vehicles that did not generate actual charging / discharging amounts are not included in the cooperative game alliance for that time slot.

[0118] S4332. Extract the actual charging and discharging amounts of all member vehicles in each vehicle collaboration sub-alliance from the actual execution records, and summarize them to obtain the total charging and discharging amount of each vehicle collaboration sub-alliance. S4333. Compare the total charging and discharging capacity of the alliance with the target adjustment power value, calculate the completion ratio of each vehicle cooperative sub-alliance for peak shaving or valley filling tasks, and use it as the characteristic function value of each vehicle cooperative sub-alliance.

[0119] It should be noted that the target regulation power value refers to the regulation power value specified by the charge / discharge power sub-task of the current charge / discharge time slot obtained from S32. For a charging time slot, the target regulation power value is the charging power sub-task value for that time slot; for a discharging time slot, the target regulation power value is the discharging power sub-task value for that time slot. This value can be directly retrieved from the output of S32 by community and time slot number. The target regulation power value serves as the evaluation benchmark for alliance fill capability, and its unit is kW.

[0120] S4334. For each target vehicle in the cooperative game alliance, traverse all vehicle cooperative sub-alliances that do not contain the target vehicle, and add the target vehicle to the vehicle cooperative sub-alliance to form a new alliance containing the target vehicle. Calculate the difference in the characteristic function values ​​of the vehicle cooperative sub-alliances before and after the target vehicle is added as the marginal filling improvement amount. S4335. The marginal fill increase of the target vehicle in all relevant vehicle cooperative sub-alliances is weighted and averaged according to the size of each vehicle cooperative sub-alliance to obtain the valley filling marginal contribution of the target vehicle in the current charging and discharging time slot and the peak shaving marginal contribution in the current discharging time slot.

[0121] It should be noted that, for each target vehicle in the cooperative game alliance, all cooperative sub-alliances that do not contain the target vehicle are traversed. Adding the target vehicle to this sub-alliance creates a new alliance containing the target vehicle. This new alliance must be one of all non-empty subsets exhaustively enumerated in S4331, and its characteristic function value has already been calculated in S4333. Therefore, this step directly retrieves the characteristic function value of the new alliance from the calculation results of S4333, without recalculation. The specific retrieval method is as follows: using the set of member vehicles of the new alliance as the key, a matching search is performed in the results of S4333. The characteristic function value of the new alliance is subtracted from the characteristic function value of the original alliance; the difference is the marginal filling improvement brought by the target vehicle to this sub-alliance.

[0122] In addition, the weight of the weighted average is the number of vehicles in each vehicle cooperative sub-alliance (i.e. the number of members of the sub-alliance). For a sub-alliance containing k vehicles, the corresponding weight factor is 1 / (k×C), where C is a normalization constant. By weighted averaging, the marginal contribution of the target vehicle in the current charging and discharging time slot is obtained.

[0123] The rules for determining the contribution type are as follows: If the current charging / discharging time slot belongs to the charging time slot segment, then the calculated contribution is the valley-filling marginal contribution of the target vehicle, because the vehicle fills the load trough through charging behavior in this time slot; if the current charging / discharging time slot belongs to the discharging time slot segment, then the calculated contribution is the peak-shaving marginal contribution of the target vehicle, because the vehicle reduces the load peak through discharging behavior in this time slot. A specific time slot has one and only one type, therefore the marginal contribution also has only one type.

[0124] S434. Multiply the marginal contribution of each vehicle in the current charging / discharging time slot by the corresponding dynamic equilibrium value coefficient to obtain the peak shaving contribution and valley filling contribution of each vehicle; aggregate the peak shaving contribution and valley filling contribution by vehicle ID to obtain the single-vehicle contribution settlement result of each vehicle.

[0125] It should be noted that this step achieves a fusion of efficiency and fairness by multiplying the Shapley marginal contribution by the dynamic equilibrium value coefficient: the value coefficient reflects the grid's true willingness to pay for the time slot regulation service, while the marginal contribution reflects the irreplaceability of each vehicle in the time slot regulation task. Multiplying the two ensures that the final contribution settlement result reflects both market value signals and individual real contributions. After aggregation by vehicle ID, each vehicle receives a complete dispatch cycle contribution settlement statement, including sub-contributions for both peak shaving and valley filling services. The data is clear and traceable, providing users with transparent and reliable revenue evidence, supporting subsequent incentive distribution and user behavior analysis.

[0126] S5. Analyze the actual response characteristics of vehicles by combining actual execution records and contribution calculation results, and update vehicle status parameters and power grid supply and demand prediction parameters. The updated parameters are then fed back to step S1 and fused with the original multi-source heterogeneous dataset as the base dataset for the next scheduling cycle. Specifically, this includes: S51. Obtain the actual execution record and single-vehicle contribution settlement result for the current scheduling cycle from the output of S4. The actual execution record includes the actual charging and discharging amount, response time, and duration of each vehicle in each time slot. The contribution settlement result includes the total peak shaving contribution and total valley filling contribution of each vehicle.

[0127] S52. Compare the actual execution records obtained in S51 with the planned scheduling instructions generated in S3, and calculate the response deviation of each vehicle in each time slot. The response deviation indicators include: response time deviation, which is the difference between the instruction issuance time and the actual start time; capacity fulfillment rate, which is the ratio of actual charging and discharging amount to planned charging and discharging amount; duration deviation, which is the difference between actual duration and planned duration; and number of premature exits, which is the number of times the vehicle terminates prematurely during task execution. Based on these deviation indicators, update the vehicle status parameters of each vehicle. The updating of vehicle status parameters includes: correcting the battery health state (SOH) based on the battery temperature change and depth of charge and discharge during the actual charging and discharging process, combined with the battery degradation model; calibrating the actual available capacity of the vehicle based on the sliding average of the capacity fulfillment rate; and updating the response characteristic parameters such as the response probability and average response delay of the vehicle based on the response time deviation and historical performance.

[0128] S53. Compare the actual total charging and discharging data in the actual execution records obtained in S51 with the total regional demand generated in S2 to calculate the grid supply and demand forecast deviation. The forecast deviation indicators include: the deviation rate between the actual peak shaving completion amount and the planned peak shaving demand, the deviation rate between the actual valley filling completion amount and the planned valley filling demand, and the deviation rate between the actual ancillary service response amount and the planned ancillary service demand. Based on these deviation rates, the grid supply and demand forecast parameters are updated using exponential smoothing or moving average methods. Updating the grid supply and demand forecast parameters includes: correcting the load forecast baseline for the next scheduling cycle, calibrating the forecast model parameters for the supply and demand difference, and adjusting the safety margin of reserve capacity demand. The updated grid supply and demand forecast parameters will improve the accuracy of the input data for the regional demand calculation model in the next cycle.

[0129] The updated vehicle status parameters (S52) and updated grid supply and demand forecast parameters (S53) are encapsulated according to a preset standardized data format to generate a standardized basic dataset for the next scheduling cycle. This standardized basic dataset includes: the updated SOH value, calibrated available capacity, and response characteristic parameters for each vehicle, as well as the updated grid load forecast baseline and supply and demand forecast parameters.

[0130] The standardized basic dataset that has been packaged is sent to S1 through the data return interface. It is then fused with the original multi-source heterogeneous data newly collected in S1 for the next cycle, and the historical patterns and real-time status database in S1 are updated. This allows the extraction of scheduling status and calculation of regional demand for the next scheduling cycle to be performed on a more accurate parameter basis.

[0131] like Figure 2 As shown, according to another embodiment of the present invention, an electric vehicle charging and discharging resource scheduling system based on power grid load data is also provided, the system comprising: Multi-source data aggregation module 1 is used to collect raw data from the power grid side, vehicle side and charging pile side to construct a multi-source heterogeneous dataset; The regional demand decomposition module 2 is used to extract the scheduling situation dataset from the multi-source heterogeneous dataset and generate the total regional demand. The total regional demand is decomposed into community-level scheduling task packages with the proportion of vehicle ownership and charging pile capacity in each community as weights. The single-vehicle instruction optimization module 3 is used to parse the vehicle dispatchable attributes of each community in the community-level scheduling task package, and form an initial charging and discharging task allocation scheme based on the vehicle dispatchable attributes. With the optimization objectives of maximizing the grid task completion rate, maximizing user net benefits, and minimizing battery loss, the initial charging and discharging task allocation scheme is iteratively optimized to obtain the optimal single-vehicle charging and discharging scheduling instruction set. The execution contribution settlement module 4 is used to send the optimal single-vehicle charging and discharging scheduling instruction set to the corresponding charging pile and vehicle for execution through a unified communication interface. It records the actual charging and discharging amount, response time and duration of the vehicle in real time during the execution process and forms an actual execution record. Based on the actual execution record, it calculates the peak shaving contribution and valley filling contribution of the vehicle. Feedback parameter update module 5 is used to analyze the actual response characteristics of vehicles by combining actual execution records and contribution calculation results, and update vehicle status parameters and power grid supply and demand prediction parameters. The updated parameters are fed back to the multi-source data aggregation module and merged with the original multi-source heterogeneous dataset as the basic dataset for the next scheduling cycle.

[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for scheduling electric vehicle charging and discharging resources based on power grid load data, characterized in that, The method includes: S1. Collect raw data from the power grid side, vehicle side and charging pile side to construct a multi-source heterogeneous dataset; S2. Extract scheduling situation dataset from multi-source heterogeneous dataset and generate regional total demand. Decompose regional total demand into community-level scheduling task packages with the proportion of vehicle ownership and charging pile capacity of each community as weights. S3. Analyze the vehicle dispatchable attributes of each community in the community-level scheduling task package, and form an initial charging and discharging task allocation scheme based on the vehicle dispatchable attributes. With the optimization objectives of maximizing the grid task completion rate, maximizing user net benefits, and minimizing battery loss, iteratively optimize the initial charging and discharging task allocation scheme to obtain the optimal single-vehicle charging and discharging scheduling instruction set. S4. The optimal single-vehicle charging and discharging scheduling instruction set is sent to the corresponding charging pile and vehicle for execution through a unified communication interface. The actual charging and discharging amount, response time and duration of the vehicle during the execution process are recorded in real time and an actual execution record is formed. Based on the actual execution record, the peak shaving contribution and valley filling contribution of the vehicle are calculated. S5. Combine the actual execution records and contribution calculation results to analyze the actual response characteristics of the vehicle, and update the vehicle status parameters and power grid supply and demand prediction parameters. The updated parameters are then fed back to step S1 and merged with the original multi-source heterogeneous dataset as the basic dataset for the next scheduling cycle.

2. The electric vehicle charging and discharging resource scheduling method based on power grid load data according to claim 1, characterized in that, S2 includes: S21. Extract scheduling status data from multi-source heterogeneous datasets, which include historical patterns of power grid load, characteristics of vehicle charging and discharging behavior, real-time supply and demand status of the power grid, and available capacity of the charging pile network. S22. Input the scheduling situation dataset into the preset regional demand calculation model and output the total regional demand in the current scheduling cycle. The total regional demand includes peak shaving demand, valley filling demand and ancillary service demand. S23. Extract the proportion of registered electric vehicles and the proportion of the total rated capacity of charging piles in each community from the multi-source heterogeneous dataset, and obtain the comprehensive undertaking capacity of each community for this scheduling task through weighted calculation. S24. Based on the total regional demand within the current scheduling cycle, and taking the comprehensive capacity of each community as the allocation basis, the peak shaving demand, valley filling demand, and auxiliary service demand in the total regional demand are allocated to each community according to their weight ratios, forming a community-level scheduling task package for each community.

3. The electric vehicle charging and discharging resource scheduling method based on power grid load data according to claim 1, characterized in that, S3 includes: S31. Receive and parse the community-level scheduling task package to obtain the target total charging and discharging power and execution time window of each community, and extract the vehicle scheduling attributes in each community from the multi-source heterogeneous dataset. S32. Divide the execution time window into consecutive scheduling time slots, and decompose the total task into charging and discharging power sub-tasks for each time slot based on the target total charging and discharging power of each community. S33. Based on the vehicle's schedulable attributes, select vehicles that meet the target state of charge and user travel constraints and calculate the vehicle scheduling priority. According to the vehicle scheduling priority from high to low, allocate the charging and discharging power sub-tasks of each time slot to the corresponding vehicles in sequence to form the initial charging and discharging task allocation scheme. S34. Taking the initial charging and discharging task allocation scheme as the initial solution, with the optimization objectives of maximizing the grid task completion rate, maximizing user net benefits, and minimizing battery loss, and introducing user travel plans as constraints, the initial charging and discharging task allocation scheme is iteratively optimized to obtain the time-slot-optimal charging and discharging power matrix. S35. The optimal charging and discharging power matrix is ​​converted into single-vehicle execution instructions containing vehicle ID, charging pile ID, start and end time and average charging and discharging power, and summarized to form the optimal single-vehicle charging and discharging scheduling instruction set.

4. The electric vehicle charging and discharging resource scheduling method based on power grid load data according to claim 3, characterized in that, S33 includes: S331. Construct a tree-like dispatch network structure with the community dispatch center as the root node, the charging pile as the intermediate node, and the connected electric vehicles as the leaf nodes. S332. Combining the leaf nodes, intermediate nodes and root nodes in the tree-like scheduling network structure, perform self-assessment of vehicle scheduling capabilities and layer-by-layer reporting of requirements to obtain the total time slot requirements of the community, and determine the superframe structure of the current scheduling cycle based on the total time slot requirements of the community. S333. Based on the total time slot demand of the community, determine all vehicles that have reported time slot demand, use the vehicle scheduling suitability index as the evaluation factor, calculate the vehicle scheduling priority in a weighted manner, and generate a list of schedulable vehicles arranged from high to low scheduling priority. S334. Based on the superframe structure and the list of schedulable vehicles, assign charging time slot sequences and discharging time slot sequences to each vehicle in the list of schedulable vehicles in turn. S335. Convert the charging time slot sequence into charging power commands for each vehicle in the charging time slot, convert the discharging time slot sequence into discharging power commands for each vehicle in the discharging time slot, and summarize the charging and discharging power commands of all vehicles to form an initial charging and discharging task allocation scheme.

5. The electric vehicle charging and discharging resource scheduling method based on power grid load data according to claim 4, characterized in that, S332 includes: S3321. Based on each leaf node, extract the target state of charge and user travel plan from the schedulable attributes, calculate the minimum number of charging time slots and the maximum number of discharging time slots required to reach the target state of charge within the scheduling time window, form the vehicle time slot demand and report it to the intermediate node. S3322. After all leaf nodes have reported their vehicle time slot demand vectors, the intermediate nodes summarize the total charging time slot demand and total discharging time slot demand of the vehicles under their jurisdiction. S3323. Verify and correct the total charging time slot requirement and total discharging time slot requirement based on the rated capacity of the charging pile itself, form the total charging time slot requirement and total discharging time slot requirement at the pile level, and report them to the root node. S3324. The root node summarizes the total charging time slot demand and total discharging time slot demand reported by all intermediate nodes at the pile level, and calculates the total time slot demand of the community, which includes the total charging time slot demand and the total discharging time slot demand. S3325. Determine the superframe length of this scheduling cycle based on the total time slot requirement of the community, and complete the time slot division of the scheduling time window to finally obtain the superframe structure of the current scheduling cycle, which includes charging time slots and discharging time slots.

6. The electric vehicle charging and discharging resource scheduling method based on power grid load data according to claim 5, characterized in that, S334 includes: S3341. Determine the start and end boundaries of the charging time slot and the discharging time slot; S3342. Within the charging time slot of the superframe structure, according to the total charging time slot demand of the community, charging time slots are allocated to each vehicle with charging needs in descending order of priority in the list of schedulable vehicles. The charging time slots of all vehicles are connected end to end to form a charging time slot sequence. S3343. Allocate consecutive dedicated discharge time slots to each vehicle with discharge capability according to the same priority order to form a discharge time slot sequence.

7. The electric vehicle charging and discharging resource scheduling method based on power grid load data according to claim 1, characterized in that, S4 includes: S41. The optimal single-vehicle charging and discharging scheduling instruction set is sent out one by one to the corresponding charging piles and vehicles for execution through a unified communication interface; S42. During the execution of the instruction, the actual charging and discharging power, response time and duration of each vehicle are collected in real time and aligned with the corresponding charging and discharging time slot to form an actual execution record containing vehicle ID, time slot number, actual charging and discharging amount and response time. S43. Combining the value coefficients corresponding to each charging and discharging time slot with the actual charging and discharging amounts in the actual execution records, and introducing the power grid supply and demand indicators in the scheduling situation dataset, the contribution calculation algorithm of dynamic game value is used to calculate the single-vehicle contribution settlement result of each vehicle. The single-vehicle contribution calculation result includes the single-vehicle peak shaving contribution and valley filling contribution.

8. The electric vehicle charging and discharging resource scheduling method based on power grid load data according to claim 7, characterized in that, S43 includes: S431. Extract power grid supply and demand indicators from the dispatch situation dataset to construct a master-slave game model. Use the backward induction method to solve the equilibrium solution of the master-slave game model in each charging and discharging time slot, and obtain the dynamic equilibrium value coefficient of each charging and discharging time slot. S432. Extract all vehicles that actually generate charging and discharging responses within each charging and discharging time slot to form a cooperative game alliance. S433. Use the Shapley value algorithm to enumerate all vehicle sub-alliances in the cooperative game alliance, calculate the filling degree of each vehicle sub-alliance to the total task based on the actual charging and discharging amount in the actual execution record, and obtain the marginal contribution of each vehicle in the current charging and discharging time slot. S434. Multiply the marginal contribution of each vehicle in the current charging / discharging time slot by the corresponding dynamic equilibrium value coefficient to obtain the peak shaving contribution and valley filling contribution of each vehicle; aggregate the peak shaving contribution and valley filling contribution by vehicle ID to obtain the single-vehicle contribution settlement result of each vehicle.

9. The electric vehicle charging and discharging resource scheduling method based on power grid load data according to claim 8, characterized in that, S433 includes: S4331. For the cooperative game alliance in the current charging and discharging time slot, use an exhaustive combination method to generate all non-empty subsets of the cooperative game alliance, each subset representing a vehicle cooperative sub-alliance. S4332. Extract the actual charging and discharging amounts of all member vehicles in each vehicle collaboration sub-alliance from the actual execution records, and summarize them to obtain the total charging and discharging amount of each vehicle collaboration sub-alliance. S4333. Compare the total charging and discharging amount of the alliance with the target adjustment power value, calculate the completion ratio of each vehicle cooperative sub-alliance for the peak shaving or valley filling task, and use it as the characteristic function value of each vehicle cooperative sub-alliance. S4334. For each target vehicle in the cooperative game alliance, traverse all vehicle cooperative sub-alliances that do not contain the target vehicle, and add the target vehicle to the vehicle cooperative sub-alliance to form a new alliance containing the target vehicle. Calculate the difference in the characteristic function values ​​of the vehicle cooperative sub-alliances before and after the target vehicle is added as the marginal filling improvement amount. S4335. The marginal fill increase of the target vehicle in all relevant vehicle cooperative sub-alliances is weighted and averaged according to the size of each vehicle cooperative sub-alliance to obtain the valley filling marginal contribution of the target vehicle in the current charging and discharging time slot and the peak shaving marginal contribution in the current discharging time slot.

10. An electric vehicle charging and discharging resource scheduling system based on power grid load data, used to implement the electric vehicle charging and discharging resource scheduling method based on power grid load data as described in any one of claims 1-9, characterized in that, The system includes: The multi-source data aggregation module is used to collect raw data from the power grid side, vehicle side and charging pile side to construct a multi-source heterogeneous dataset; The regional demand decomposition module is used to extract scheduling status datasets from multi-source heterogeneous datasets and generate total regional demand. It decomposes the total regional demand into community-level scheduling task packages based on the proportion of vehicle ownership and charging pile capacity in each community. The single-vehicle instruction optimization module is used to parse the vehicle dispatchable attributes of each community in the community-level scheduling task package, and form an initial charging and discharging task allocation scheme based on the vehicle dispatchable attributes. With the optimization objectives of maximizing the grid task completion rate, maximizing user net benefits, and minimizing battery loss, the initial charging and discharging task allocation scheme is iteratively optimized to obtain the optimal single-vehicle charging and discharging scheduling instruction set. The execution contribution settlement module is used to send the optimal single-vehicle charging and discharging scheduling instruction set to the corresponding charging pile and vehicle for execution through a unified communication interface. It records the actual charging and discharging amount, response time and duration of the vehicle in real time during the execution process and forms an actual execution record. Based on the actual execution record, it calculates the peak shaving contribution and valley filling contribution of the vehicle. The feedback parameter update module is used to analyze the actual response characteristics of vehicles by combining actual execution records and contribution calculation results, and update vehicle status parameters and power grid supply and demand prediction parameters. The updated parameters are fed back to the multi-source data aggregation module and merged with the original multi-source heterogeneous dataset as the basic dataset for the next scheduling cycle.