A charging scheduling method based on a safety graph

By constructing a heterogeneous node and edge structure for the safety graph and introducing safety margin indicators and shielding factors, the problem of unified safety constraints and cross-domain risk perception in the power-transportation coupled system is solved. This enables joint optimization of electric vehicle path planning and charging/discharging scheduling, reducing system operating costs and improving safety and economy.

CN123070529APending Publication Date: 2026-11-10SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611116709.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing charging scheduling methods cannot effectively solve the problems of unified safety constraints, cross-domain risk perception and propagation in the power-transportation coupled system after the large-scale integration of electric vehicles into the power distribution network. This leads to local load peak increases, node voltage exceeding limits, branch power flow overload, charging station queuing congestion, and increased user costs.

Method used

A heterogeneous node and edge structure based on a security graph is constructed, and multiple types of security margin indicators and security state masking factors are introduced. Through adaptive calculation of security gating attention weights and a multi-head attention mechanism, security situation awareness and collaborative optimization decision-making of the power-transportation coupled system are realized.

Benefits of technology

It realizes the safety situation awareness and collaborative optimization of the power-transportation coupled system, reduces the total operating cost of the system, alleviates traffic congestion, improves the economy, safety and scalability of electric vehicle group dispatch, and meets the constraints of battery state of charge, charging and discharging power, road capacity and charging station service capacity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123070529A_ABST
    Figure CN123070529A_ABST
Patent Text Reader

Abstract

This application provides a charging scheduling method based on a security graph, belonging to the field of electric vehicle charging scheduling and power-transportation coupled system optimization control technology. The method includes: constructing a heterogeneous security graph containing distribution network nodes, traffic road nodes, and charging station nodes, and their associated edges; calculating the security margin of each node, including voltage security margin, traffic capacity security margin, and service capacity security margin; calculating a security state masking factor based on the security margins of the target node and adjacent nodes; calculating a security gating attention weight based on the security state masking factor; and weighted aggregation of neighboring node features based on the security gating attention weight, followed by fusion through a multi-head attention mechanism to obtain the final node embedding representation. This application achieves early perception and proactive avoidance of cross-domain security risks by explicitly embedding the multi-physical domain security boundary into the graph attention calculation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electric vehicle charging scheduling and power-transportation coupled system optimization control technology, and in particular to a charging scheduling method based on a safety graph. Background Technology

[0002] With the deepening of transportation electrification strategies and the rapid development of vehicle-to-grid (V2G) technology, electric vehicles are gradually transforming from simple transportation tools into mobile energy storage units with flexible charging and discharging capabilities. After large-scale integration of electric vehicles into the power distribution network, the randomness of their charging time, charging location, travel routes, and charging / discharging power has significantly increased. Without effective scheduling, this will trigger a series of cascading problems: local power distribution network load surges, node voltage exceeding limits, branch power flow overload, increased queuing congestion at charging stations, increased road traffic pressure, and rising charging costs for users. These problems indicate that the charging and discharging behavior of electric vehicles has formed a deep coupling relationship with the power network and transportation network. Independent optimization in a single physical domain can no longer meet the overall system operation requirements, necessitating joint optimization of path planning, charging station selection, and charging / discharging power control within the power-transportation coupled network framework.

[0003] Existing charging scheduling methods mainly include centralized mathematical optimization, heuristic algorithms, and ordinary reinforcement learning methods. Centralized optimization methods rely on accurate models and complete global information, but in scenarios involving increasing electric vehicle scale, dynamic traffic flow changes, fluctuating electricity prices, and uncertain renewable energy output, they suffer from high computational complexity, insufficient real-time performance, and poor scalability. Heuristic algorithms have simple rules, but struggle to simultaneously consider distribution network operating boundaries, road capacity, charging station service capacity, battery state of charge, and user economic costs. While ordinary reinforcement learning methods can learn scheduling strategies through environmental interaction, most primarily focus on economic benefits or traffic efficiency, lacking a unified graph structure characterizing safety constraints such as node voltage, branch current, battery state of charge, charging and discharging power, road capacity, and charging station service capacity. This makes it difficult to anticipate the correlation and propagation of safety risks in the power-transportation coupled network. Summary of the Invention

[0004] The main objective of this application is to propose a charging scheduling method, electronic device, storage medium, and program product based on a safety graph. By constructing a heterogeneous node and edge structure for the safety graph, and introducing multiple types of safety margin indices and safety state masking factors, the method achieves adaptive calculation of safety gating attention weights and directed aggregation of safety features, thereby providing a high-quality feature representation foundation for safety situation awareness and collaborative optimization decision-making in power-transportation coupled systems.

[0005] To achieve the above objectives, one aspect of this application proposes a charging scheduling method based on a security graph, the method comprising: A security graph is constructed, which includes heterogeneous nodes and heterogeneous edges. The heterogeneous nodes include a first type of node representing distribution network nodes, a second type of node representing traffic road nodes, and a third type of node representing charging station nodes. The heterogeneous edges include a first type of edge representing the connection relationship of power grid lines, a second type of edge representing the connection relationship of road topology, a third type of edge representing the association relationship between charging stations and roads, and a fourth type of edge representing the electrical access relationship between charging stations and distribution network nodes. Calculate the safety margin of each of the heterogeneous nodes, the safety margin including the voltage safety margin of the first type of node, the traffic capacity safety margin of the second type of node, and the service capacity safety margin of the third type of node. Calculate the security state shielding factor based on the security margins of the target node and its neighboring nodes. The security status masking factor is used to characterize the degree of influence of the security status of adjacent nodes on the information aggregation of the target node; Based on the security state masking factor, calculate the security gating attention weight between the target node and the adjacent nodes under the preset security association propagation path. The security gating attention weight is positively correlated with the security state of the target node and the security state of the neighboring nodes; Based on the security gating attention weights, the features of the adjacent nodes are weighted and aggregated to obtain the security feature embedding representation of the target node. The final node embedding representation is obtained by fusing the data through a multi-head attention mechanism. It is used to implement charging scheduling.

[0006] In some embodiments, the method further includes the step of establishing a power-transportation coupled network model, the power-transportation coupled network model comprising: Distribution network model is used to describe node voltage, branch power flow, generation output, conventional power load, and charging station access load in the distribution network; A traffic network model is used to describe the road topology connections, real-time traffic flow, road travel time, and charging queue time in a traffic network. A charging station model is used to describe the geographical distribution of charging stations and their service capacity boundaries. Electric vehicle models are used to describe the real-time location, battery state of charge, path selection decisions, and charging and discharging power behavior of individual electric vehicles and groups of electric vehicles. Carbon emission flow models and local marginal electricity price models are used to calculate system environmental information in real time.

[0007] In some embodiments, the method further includes the step of constructing a partially observable Markov decision process framework: Based on the physical laws and operational logic of the power-transportation coupled network model, the system state variable set is determined. Action variable set and reward function ,in The total number of electric vehicle agents participating in the scheduling process in the system; Local observation status Represented as:

[0008] in, This refers to the road traffic time. For charging queue time, The state of charge of the electric vehicle. For the state characteristics of distribution network nodes, Road condition characteristics; Action variables ,in Select actions for discrete paths. This is the proportional control coefficient for continuous charge and discharge power.

[0009] In some embodiments, the distribution network node state characteristics Includes real-time local marginal electricity prices at nodes predicted through adversarial generative networks. and the nodal carbon emission intensity characteristics calculated through carbon emission flows. ; The road condition features Includes initial background traffic flow of the road and the dynamic aggregation number of controlled electric vehicles on the road. ; The actual charging power performed by the electric vehicle intelligent agent With discharge power Based on the continuous charge and discharge power proportional control coefficient The real-time state of charge of the battery is calculated according to the following logic:

[0010]

[0011] in, For the battery's rated capacity, For charge / discharge energy conversion efficiency, This is the minimum state of charge limit allowed for safe battery operation.

[0012] In some embodiments, the method further includes an online local marginal electricity price generation step based on generative adversarial networks: Obtain historical local marginal electricity price series and random Gaussian noise vector ; The historical local marginal electricity price sequence and the random Gaussian noise vector are input into the trained generator. Output the real-time local marginal electricity price of each charging station's corresponding distribution network node at the current moment. ; Wherein, the generator With discriminator Obtained through joint training using the following adversarial loss functions: Generator loss function:

[0013] Discriminator loss function:

[0014] in, This is a sample of real historical electricity price sequences.

[0015] In some embodiments, the method further includes the step of constructing a multi-agent proximal policy optimization deep neural network: The multi-agent proximal policy optimization deep neural network includes a shared feature layer, a discrete path selection action head, a continuous charge and discharge power action head, and a value evaluation network. The input to the shared feature layer is the node embedding representation output by the secure graph attention encoder. and the local observation state of the electric vehicle intelligent agent Its outputs are respectively connected to the discrete path selection action head, the continuous charge and discharge power action head, and the value evaluation network.

[0016] In some embodiments, the training of the multi-agent proximal policy optimization deep neural network adopts a centralized training and distributed execution framework, and the policy pruning objective function of the Actor network in the multi-agent proximal policy optimization deep neural network is... for:

[0017] in, The probability ratio between the old and new strategies. For the dominant function, Set the pruning threshold for the strategy; The comprehensive optimization objective function of the Actor network is:

[0018] in, Let be the mean squared error loss function of the value evaluation network. For the policy entropy term, and These are the weighting coefficients.

[0019] In some embodiments, the reward function Using piecewise function form: Define electricity consumption and low-carbon cost incentives for:

[0020] Define passage time penalty for:

[0021] Define local traffic congestion penalties ; Comprehensive reward function Through weighting factors The charging state, discharging state, invalid charging / discharging action state, and pure driving state are weighted and summed.

[0022] In some embodiments, the voltage safety margin Defined as the minimum deviation between the voltage at a distribution network node and its upper and lower limits:

[0023] The traffic capacity safety margin Defined as remaining traffic space on the road:

[0024] The service capacity safety margin Defined as the remaining service capacity available at the charging station:

[0025] in, Connecting electric vehicles to charging stations Indicator variables.

[0026] In some embodiments, the security state masking factor The calculation formula is:

[0027] in, The weight matrix is ​​a learnable matrix. and Target nodes With neighboring nodes Safety margin, This represents a vector concatenation operation; The security gating attention weight The calculation formula is:

[0028] in, To ensure secure propagation paths, For attention parameter vectors, Here is the weight transformation matrix. , They are nodes , eigenvectors, For nodes The set of neighboring nodes; The security feature embedding representation of the target node The calculation formula is:

[0029] in, For activation functions; The final node embedding representation for:

[0030] in, The number of heads in a multi-head attention mechanism.

[0031] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.

[0032] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above.

[0033] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer program product, including a computer program that, when executed by a processor, implements the method described above.

[0034] The embodiments of this application include at least the following beneficial effects: This application provides a charging scheduling method, electronic device, storage medium, and program product based on a security graph. This scheme constructs a heterogeneous security graph containing distribution network nodes, road nodes, and charging station nodes, and calculates the voltage safety margin, traffic capacity safety margin, and service capacity safety margin of each node based on this graph. Then, a safety state masking factor is generated according to the safety margins between nodes. This masking factor modulates the calculation of graph attention weights, and finally, a node embedding representation of the fused cross-domain security situation is obtained through multi-head attention mechanism aggregation. This scheme transforms the previously independent states of power, transportation, and charging facilities... By achieving structured associations within a unified graph structure and explicitly embedding physical safety boundaries into the feature extraction process, and utilizing safety shielding factors to proactively suppress low-margin neighborhood information, this approach addresses the technical challenges of unifying safety constraints and perceiving cross-domain risks in multi-domain coupled systems at the feature source. It provides a high-quality feature foundation with both physical interpretability and safety sensitivity for subsequent scheduling decisions. This effectively supports distributed collaborative optimization of electric vehicle path selection and charging / discharging control without relying on complete global observations, enabling early detection and proactive avoidance of safety risks. Simultaneously, it lays the data foundation for a comprehensive balance between system operational economy and safety. Attached Figure Description

[0035] Figure 1 This is a flowchart of a charging scheduling method based on a security graph provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a charging scheduling method based on security graph reinforcement learning provided in an embodiment of this application. Figure 3 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0038] Existing charging scheduling methods can be mainly divided into the following three categories: (I) Centralized Mathematical Optimization Methods. These methods are based on accurate power-transport coupling mathematical models and utilize techniques such as mixed-integer programming, dynamic programming, or convex optimization to solve for the globally optimal scheduling scheme. However, with the increasing number of electric vehicles and the expansion of system scale, these methods face problems such as an explosion in the dimensionality of decision variables and an exponential increase in computation time, making it difficult to meet real-time scheduling requirements. Furthermore, centralized methods rely on complete and accurate global information, and under uncertainties such as random fluctuations in traffic flow, intermittent changes in renewable energy output, and dynamic updates to electricity price signals, the robustness and adaptability of the optimization model are significantly insufficient.

[0039] (II) Heuristic Rule-Based Scheduling Methods. These methods formulate scheduling strategies based on expert experience or simple rules, such as first-come, first-served, shortest path priority, or lowest electricity price priority. While these methods are computationally efficient and easy to implement, the rules themselves lack global optimality guarantees. More importantly, heuristic methods struggle to simultaneously account for the complex coupling relationships between multiple physical constraints, including distribution network node voltage safety boundaries, branch current thermal stability limits, road capacity limits, charging station service capacity constraints, and battery state-of-charge lifetime protection. This often leads to safety hazards in other areas while addressing one aspect of the problem.

[0040] (III) Scheduling Methods Based on Ordinary Reinforcement Learning. In recent years, deep reinforcement learning has been gradually introduced into the field of electric vehicle charging scheduling due to its advantages of not requiring precise modeling and being adept at handling sequential decision problems. Existing research has used algorithms such as DQN, DDPG, and PPO to train charging scheduling strategies. However, existing reinforcement learning methods generally suffer from the following drawbacks: First, the expression of safety constraints is insufficient. Most methods superimpose safety constraints as penalty terms into the reward function, which is a reactive avoidance mechanism. The agent only receives negative feedback after actually violating the safety boundary, failing to achieve early detection and proactive avoidance of safety risks. When the number of safety constraints increases and the coupling relationships become complex, the design of the reward function becomes extremely difficult, and the training process also struggles to converge.

[0041] Second, cross-domain coupling relationships are difficult to characterize. Power networks and transportation networks belong to different physical systems, and their state variables have different physical dimensions and evolution laws. Existing methods mostly use isomorphic graphs or simple vector splicing to process multi-domain information, which cannot effectively preserve and transmit the topological associations and security situation propagation paths between power grid nodes and transportation nodes.

[0042] Third, the problem of information gaps under certain observation conditions is prominent. In actual scheduling scenarios, electric vehicle agents can only obtain limited local observation information (such as surrounding road conditions and the status of nearby charging stations), and it is difficult to obtain the global grid status (such as the voltage of all nodes in the network and the power flow distribution of branches). In particular, the real-time local marginal electricity price of each node, as a key economic signal guiding charging and discharging behavior, is difficult to obtain directly under certain observation conditions, which seriously restricts the economic optimization capability of scheduling strategies.

[0043] Graph Attention Network (GAT), as a graph neural network architecture capable of adaptively learning the importance weights of neighboring nodes, has demonstrated excellent performance in fields such as social network analysis and knowledge graph reasoning. However, when directly applied to feature extraction of power-transportation coupled networks, the following technical obstacles exist: (1) Standard GAT is designed only for homogeneous graphs and cannot distinguish the heterogeneous attributes and multi-dimensional relationships of power grid nodes, road nodes, and charging station nodes; (2) The attention weights of standard GAT are calculated only based on node features and do not consider the unique safety operation boundaries of each physical domain, thus failing to achieve explicit perception and attention modulation of safety hazards.

[0044] In view of this, this application provides a charging scheduling method, electronic device, storage medium, and program product based on a security graph. This scheme constructs a heterogeneous node and edge structure in the security graph, introduces multiple types of security margin indices and security state masking factors, and achieves adaptive calculation of security gating attention weights and directed aggregation of security features. This provides a high-quality feature representation foundation for security situation awareness and collaborative optimization decision-making in power-transport coupled systems. Furthermore, it realizes joint optimization of electric vehicle path planning, charging station selection, and charging / discharging power scheduling in power-transport coupled networks. While satisfying constraints such as battery state of charge, charging / discharging power, road capacity, charging station service capacity, and distribution network safety operation, it reduces the total system operating cost, alleviates traffic congestion, and improves the economy, safety, and scalability of electric vehicle group scheduling.

[0045] The charging scheduling method provided in this application relates to the field of electric vehicle charging scheduling and power-transportation coupling system optimization control technology. The charging scheduling method provided in this application can be applied to a terminal, a server, or software running on a terminal or server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the charging scheduling method, but is not limited to the above forms.

[0046] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0047] like Figure 1 As shown, this embodiment provides a charging scheduling method based on a security graph, specifically including the following steps: Step S1: Construct a security graph, which includes heterogeneous nodes and heterogeneous edges; the heterogeneous nodes include a first type of node representing distribution network nodes, a second type of node representing traffic road nodes, and a third type of node representing charging station nodes; the heterogeneous edges include a first type of edge representing the connection relationship of power grid lines, a second type of edge representing the connection relationship of road topology, a third type of edge representing the association relationship between charging stations and roads, and a fourth type of edge representing the electrical access relationship between charging stations and distribution network nodes; Step S2: Calculate the safety margin of each heterogeneous node, wherein the safety margin includes the voltage safety margin of the first type of node, the traffic capacity safety margin of the second type of node, and the service capacity safety margin of the third type of node. Step S3: Calculate the security state masking factor based on the security margins of the target node and its neighboring nodes. The security status masking factor is used to characterize the degree of influence of the security status of adjacent nodes on the information aggregation of the target node; Step S4: Based on the security state masking factor, calculate the security gating attention weight between the target node and the adjacent nodes under the preset security association propagation path. The security gating attention weight is positively correlated with the security state of the target node and the security state of the neighboring nodes; Step S5: Based on the security gating attention weights, perform weighted aggregation on the features of the neighboring nodes to obtain the security feature embedding representation of the target node. The final node embedding representation is obtained by fusing the data through a multi-head attention mechanism. ; Step S6: Based on the final node embedding representation By combining the local observation states of each electric vehicle agent, a path selection strategy and a charging / discharging power control strategy are generated. Each agent executes the strategy and acquires new observation states and safety graph features in the next time step. The process is iterated in a loop to achieve distributed online scheduling.

[0048] Below, in conjunction with the appendix Figure 2 The solutions of the embodiments of this application will be described in detail and explained with specific application examples.

[0049] See Figure 2 This embodiment provides a charging scheduling method based on security graph reinforcement learning, which specifically includes the following steps: Step 1: Establish a power-transportation coupled network model.

[0050] The power-transportation coupled network model includes a distribution network model, a transportation network model, a charging station model, an electric vehicle model, a carbon emission flow model, and a local marginal electricity price model. Among them, the distribution network model is used to describe node voltage, branch power flow, power generation output, power load, and charging station access load; the transportation network model is used to describe road connectivity, traffic flow, road travel time, and charging queuing time; and the electric vehicle model is used to describe vehicle location, battery state of charge (SoC), route selection, and charging and discharging behavior.

[0051] (I) Distribution Network Model The distribution network model is represented as a directed graph:

[0052] in, Represents the set of nodes in the distribution network. This represents the set of branches in the distribution network. The operation of the distribution network satisfies active power balance constraints, reactive power balance constraints, generator output constraints, node voltage constraints, and branch current constraints.

[0053] For any node in the distribution network The active power balance constraint is expressed as:

[0054] in, The equivalent set of nodes injected into the external power grid. It is a set of distributed generator nodes. This refers to the set of charging station load access nodes. This is a set of ordinary electrical load nodes; Indicates external power grid to node Injected active power, Represents a node The active power output of the generator. Represents a node The electrical load generated by the charging station Represents a node Ordinary user electrical load at the location, Indicates from node Flow to Node The branch power.

[0055] Meanwhile, the operation of the distribution network must also meet the constraints of reactive power balance, generator output upper and lower limits, node voltage safety range, and branch current overload.

[0056] (II) Transportation Network Model The transportation network model is represented as a bidirectional connected graph:

[0057] in, Represents the set of traffic nodes. This represents a set of roads. The road set includes ordinary roads and charging roads containing charging stations.

[0058] Road traffic flow is shown in the following formula:

[0059] in, This indicates the initial traffic flow on the road. As a binary indicator variable, when electric vehicles Located on the road Shangshi Otherwise, it is 0. This refers to the set of all electric vehicles participating in the scheduling process in the system.

[0060] The road traffic hours are shown in the following formula:

[0061] in, For road arcs Free circulation time, Represented as road arcs The free circulation time.

[0062] (III) Charging Station Model Charging queue time in the charging station model Based on the real-time ratio of charging demand to service capacity, the following structure is constructed:

[0063] in, Indicates free charging time. Indicates location on road Maximum service capacity limit of charging stations at associated nodes. The shape parameter is used to characterize the queuing delay growth characteristics.

[0064] (iv) Electric vehicle model Electric vehicle models are used to characterize the state evolution of individual vehicles in a spatiotemporally coupled environment, including their battery state of charge. The changes at the next time step are categorized into three states based on the vehicle's current behavior: charging, discharging, and driving. The specific formulas are as follows:

[0065] in, For time steps electric vehicles The state of charge, The energy conversion efficiency of the battery during charging and discharging. For the battery's rated capacity, This represents the charging and discharging power (positive for charging and negative for discharging). The scheduling time step; The energy consumption rate per unit distance traveled by an electric vehicle. This represents the distance traveled within that time step. For the decision variable of whether a vehicle connects to a charging station, when This indicates that the vehicle is inside the charging station. This indicates that the vehicle is in a driving or parked state on the road.

[0066] (v) Carbon emission flow model and local marginal electricity price model The above model is used to calculate the carbon emission intensity of each node in real time. and local marginal electricity price (The latter is generated online via a generative adversarial network in step three), providing a basis for calculating electricity consumption and low-carbon costs in the subsequent reward function.

[0067] Step 2: Construct a partially observable Markov decision process framework and determine the state variables, action variables, and reward function.

[0068] Based on the aforementioned power-transportation coupled network model, an optimization model for electric vehicle route planning and charging / discharging scheduling is established, defining system variables, operational constraints, and optimization indices. A partially observable Markov decision process framework is constructed based on the variables, constraints, and indices, i.e., the set of state variables for multi-agent reinforcement learning is designed. Action variable set and reward function , where (m) represents the number of intelligent agents in the electric vehicle.

[0069] (a) Definition of state variables State variables in a partially observable Markov decision process Integrating multi-dimensional features from the transportation network, power grid, and the vehicle itself, its vector structure is as follows:

[0070] in, Indicates the road's open time. Indicates the charging queue time. Indicates the state of charge of the electric vehicle. Indicates the state characteristics of distribution network nodes. It indicates the characteristics of road conditions.

[0071] The state characteristics of distribution network nodes are shown in the following formula:

[0072] in, This represents the local marginal electricity price obtained from the online generation model. This indicates the carbon emission intensity at a node.

[0073] The road condition characteristics are shown in the following formula:

[0074] in, Indicates the initial traffic flow. This indicates the number of electric vehicles on the road.

[0075] (ii) Definition of action variables Action variables It includes discrete action components and continuous action components, among which The discrete path selection action is used to determine the road topology direction for the vehicle's next stage of travel; This indicates continuous charge / discharge control action, used to control the charge / discharge power ratio of the electric vehicle. When Time indicates charging behavior, when Time indicates discharge behavior, when This indicates that charging and discharging are not performed.

[0076] The formula for calculating charging power is as follows:

[0077] The formula for calculating discharge power is as follows:

[0078] in, Indicates charging power. Indicates discharge power. This represents the minimum state of charge limit allowed for safe battery operation. The above formula ensures that charge and discharge commands are within physical boundaries and battery life protection limits.

[0079] (III) Definition of reward function reward function Constructed using a piecewise function, it aims to comprehensively balance user economic costs with system operating efficiency. Electricity and low-carbon cost incentives are included. According to the definition of action symbols:

[0080] in, This indicates the price of carbon.

[0081] Passage time penalty As shown in the following formula:

[0082] in, This represents the time cost conversion factor. This indicates the penalty weight for exceeding the maximum passage time.

[0083] Local traffic congestion penalties As shown in the following formula:

[0084] Comprehensive reward function As shown in the following formula:

[0085] in, As a weighting factor, through weighting factors A weighted summation is performed, corresponding to charging state, discharging state, invalid charging / discharging action state, and pure driving state, respectively, to guide the agent to make multi-objective optimal decisions.

[0086] Step 3: Construct a multi-agent PPO training network structure based on a secure graph attention encoder.

[0087] First, distribution network nodes, traffic road nodes, and charging station nodes are treated as different types of nodes in the security graph. Power grid lines, road connections, charging station-road associations, and charging station-distribution network node access relationships are treated as different types of edges. A security graph is constructed by combining the boundary constraints of power grid and transportation network security operations. A security graph attention encoder is used to extract cross-domain coupling information between power and transportation, incorporating security situation characteristics. Second, an online local marginal electricity price generation mechanism based on generative adversarial networks is constructed to generate electricity price signals for each charging station's corresponding distribution network node. Finally, a multi-agent PPO network is constructed, comprising a shared feature layer, a discrete path selection action head, a continuous charging / discharging power action head, and a value evaluation network.

[0088] (a) Safety graph construction First, distribution network nodes, traffic road nodes, and charging station nodes are abstracted as heterogeneous nodes in the security graph. Then, the topological connections of power grid lines and roads, the geographical relationships between charging stations and roads, and the electrical connections between charging stations and distribution network nodes are abstracted as heterogeneous edges in the security graph. Specifically, the voltage safety margin is integrated into the characteristics of distribution network nodes. :

[0089] The voltage safety margin of a distribution network node is defined as the minimum deviation between the node voltage and its upper and lower limits.

[0090] The safety node characteristics of a charging station are represented as (fusion capacity safety margin). ):

[0091] Among them, charging stations The service capacity security margin is defined as:

[0092] The characteristics of traffic road safety nodes are represented as (integrated traffic capacity safety margin). ):

[0093] Among them, roads The capacity safety margin is defined as:

[0094] Define the set of cross-domain secure coupling interaction matrices as follows:

[0095] in, It represents the Hadamah accumulation. This represents the physical association matrix between different network nodes. This represents the corresponding safety margin transfer matrix. Through the topological association of the safety graph, collaborative awareness of the safety situation is achieved across the "road-charging station-distribution network node-charging station-road" chain.

[0096] (ii) Safety Graph Attention Encoder Define secure association propagation path Next node With neighboring nodes The security gating attention weights between them are:

[0097] in, The safety state shielding factor is calculated using the following formula:

[0098] In the formula, These are learnable weight parameters. They are nodes With neighboring nodes The security margin. If the security margin of the associated nodes is low, the security state masking factor... It will automatically decrease to suppress the generation of actions on that path.

[0099] The normalized safety attention coefficient is shown in the following formula:

[0100] Based on secure association propagation path The node security aggregation feature is represented by the following formula:

[0101] The final secure graph node embedding representation is obtained through multi-head attention aggregation:

[0102] (III) Online Local Marginal Electricity Price Generation Mechanism Based on Generative Adversarial Networks The online local marginal electricity price generation mechanism based on generative adversarial networks includes a generator and a discriminator. The generator takes historical local marginal electricity price sequences and random noise as input and outputs the generated local marginal electricity price. The discriminator is used to determine whether the input local marginal electricity price is a real sample or a generated sample.

[0103] The local marginal electricity price generation model is expressed as follows:

[0104] in, This represents historical local marginal electricity price data. Indicates random noise. This represents a generator.

[0105] The adversarial loss function of the generator is expressed as:

[0106] The adversarial loss function of the discriminator is expressed as:

[0107] (iv) Multi-agent PPO network structure A multi-agent proximal policy optimization deep neural network is constructed, comprising a shared feature layer, a discrete path selection action head, a continuous charge / discharge power action head, and a value evaluation network. The input to the shared feature layer is the node embedding representation output by the safety graph attention encoder. and the local observation state of the electric vehicle intelligent agent Its outputs are respectively connected to the discrete path selection action head, the continuous charge and discharge power action head, and the value evaluation network.

[0108] Step 4: Training and executing the distributed scheduling strategy.

[0109] By interacting with the electric vehicle intelligent agent and the power-transportation coupled network environment, the agent is trained to learn path selection, charging station selection, and charging and discharging power control strategies under the conditions of traffic flow, charging demand, charging queuing time, local marginal electricity price, carbon emission intensity, and uncertainty of distribution network operation status, in order to maximize the reward function. In this way, the total operating cost of the system is minimized and safe scheduling is achieved under the premise of satisfying the battery state of charge, charging and discharging power, road capacity, charging station service capacity, and distribution network safety constraints.

[0110] Specifically, the policy pruning objective function of the multi-agent PPO network is shown in the following equation: in, Represents the dominance function. Indicates the policy cutoff ratio. This represents the ratio of the probability of the new strategy to the probability of the old strategy.

[0111] The probabilities of the old and new strategies are shown in the following formula:

[0112] The loss function for the value evaluation network is shown in the following formula:

[0113] The comprehensive optimization objective function of the Actor network is shown in the following equation:

[0114] in, and These are the weighting coefficients. This represents the strategy entropy term, used to enhance exploration capabilities.

[0115] During training, the electric vehicle agents continuously interact with the power-transportation coupled network environment. Under strict constraints of battery state-of-charge boundaries, charging / discharging power limits, road capacity, charging station service capacity, and power grid safety operation boundaries, they learn optimal driving path selection, charging station location selection, and real-time charging / discharging power control strategies to maximize the cumulative reward function. In the training phase, the global power-transportation coupled network information is used to train and evaluate the network. In the execution phase, each electric vehicle agent independently outputs path selection and charging / discharging power control actions based solely on its own local observations, generated local marginal electricity prices, and safety graph embedding features. Ultimately, this achieves coordinated control that minimizes the total system operating cost, alleviates traffic congestion, and ensures the safe and stable operation of the power grid.

[0116] In one embodiment, a set of security constraints is introduced into the power-transportation coupled network model, which includes distribution network node voltage constraints, branch current constraints, battery state of charge constraints, charging and discharging power constraints, road capacity constraints, and charging station service capacity constraints, specifically expressed as follows:

[0117]

[0118]

[0119] In summary, this application has the following significant advantages over the prior art: (1) This application utilizes a security graph structure and a security-gated attention mechanism to achieve a unified representation and directed propagation of security constraints across multiple physical domains. Unlike existing technologies that model distribution networks and transportation networks separately or simply superimpose security penalty terms into reinforcement learning reward functions, this application constructs a heterogeneous security graph containing distribution network nodes, road nodes, and charging station nodes. It explicitly embeds the node voltage safety margin, road capacity safety margin, and charging station service capacity safety margin into the calculation process of attention weights. By dynamically adjusting the aggregation weights of neighborhood information through a security state masking factor, the security state directly participates in the feature extraction and decision generation process, realizing a paradigm shift from the traditional "passive punishment after the fact" to "active perception before the fact".

[0120] (2) This application achieves accurate perception of cross-domain security situation and effective suppression of risk transmission paths through the collaborative design of security state shielding factor and security gating attention weight. When the security margin of adjacent nodes decreases, the shielding factor automatically decreases, and the information aggregation weight in the corresponding direction is adaptively suppressed, effectively preventing the excessive propagation of risks along the topological path. Compared with the standard graph attention network mechanism that calculates weights based solely on feature similarity, this application explicitly introduces physical security boundaries in attention calculation, making security feature extraction have clear physical interpretability while maintaining the flexibility of end-to-end learning of graph neural networks.

[0121] (3) This application solves the problem of unified modeling of multiple types of nodes and multi-element associations in power-transportation coupled networks by designing a heterogeneous graph structure. Power grid nodes, road nodes, and charging station nodes are treated as different types of nodes, and each is given its own physical domain-specific state characteristics and safety margin index. Cross-domain coupled topology is established through four types of heterogeneous edges: power grid lines, road connections, charging station-road associations, and charging station-power grid access. This realizes the organic integration of information from different physical domains under a unified graph structure, and provides a high-quality joint feature representation for subsequent multi-agent collaborative decision-making.

[0122] (4) The deep coupling architecture of the multi-agent proximal policy optimization network and the safety graph attention encoder constructed in this application realizes end-to-end joint optimization of safety feature extraction and policy learning. The node embedding representation output by the safety graph encoder is used as part of the input of the shared feature layer, and is input into the policy network and the value network together with the agent's local observations. Safety constraint information participates in decision-making at the feature level, rather than imposing restrictions only at the output layer. This architecture design enables the policy network to perceive the safety boundary at the early stage of decision-making, which significantly improves the safety reliability of scheduling.

[0123] (5) This application generates local marginal electricity prices online through generative adversarial networks, which effectively alleviates the problem of information loss in some observation environments. Even when the complete global grid state cannot be obtained, the electric vehicle intelligent agent can still make economical and reasonable charging and discharging decisions based on the generated electricity price signal, which reduces user charging costs and grid peak and valley load pressure to a certain extent, and achieves synergistic optimization of economy and safety.

[0124] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0125] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0126] Please see Figure 3 , Figure 3 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 301 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 302 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 302 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 302 and is called and executed by the processor 301 using the methods described above in the embodiments of this application. Input / output interface 303 is used to implement information input and output; The communication interface 304 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 305 transmits information between various components of the device (e.g., processor 301, memory 302, input / output interface 303, and communication interface 304); The processor 301, memory 302, input / output interface 303, and communication interface 304 are connected to each other within the device via bus 305.

[0127] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0128] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0129] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0130] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0131] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented in the embodiments of this program product are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments. The executable computer program code or "code" used to perform the various embodiments can be written in high-level programming languages ​​such as C, C++, Python, Smalltalk, Java, JavaScript, Visual Basic, Structured Query Language (e.g., Transact-SQL), Perl, or in various other programming languages.

[0132] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0133] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0134] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0135] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0136] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0137] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0138] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0139] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0140] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0141] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0142] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A charging scheduling method based on a safety graph, characterized in that, The method includes the following steps: A security graph is constructed, which includes heterogeneous nodes and heterogeneous edges. The heterogeneous nodes include a first type of node representing distribution network nodes, a second type of node representing traffic road nodes, and a third type of node representing charging station nodes. The heterogeneous edges include a first type of edge representing the connection relationship of power grid lines, a second type of edge representing the connection relationship of road topology, a third type of edge representing the association relationship between charging stations and roads, and a fourth type of edge representing the electrical access relationship between charging stations and distribution network nodes. Calculate the safety margin of each of the heterogeneous nodes, the safety margin including the voltage safety margin of the first type of node, the traffic capacity safety margin of the second type of node, and the service capacity safety margin of the third type of node. Calculate the security state shielding factor based on the security margins of the target node and its neighboring nodes. The security status masking factor is used to characterize the degree of influence of the security status of adjacent nodes on the information aggregation of the target node; Based on the security state masking factor, calculate the security gating attention weight between the target node and the adjacent nodes under the preset security association propagation path. The security gating attention weight is positively correlated with the security state of the target node and the security state of the neighboring nodes; Based on the security gating attention weights, the features of the adjacent nodes are weighted and aggregated to obtain the security feature embedding representation of the target node. The final node embedding representation is obtained by fusing the data through a multi-head attention mechanism. It is used to implement charging scheduling.

2. The method according to claim 1, characterized in that, The method further includes the step of establishing a power-transportation coupled network model, wherein the power-transportation coupled network model includes: Distribution network model is used to describe node voltage, branch power flow, generation output, conventional power load, and charging station access load in the distribution network; A traffic network model is used to describe the road topology connections, real-time traffic flow, road travel time, and charging queue time in a traffic network. A charging station model is used to describe the geographical distribution of charging stations and their service capacity boundaries. Electric vehicle models are used to describe the real-time location, battery state of charge, path selection decisions, and charging and discharging power behavior of individual electric vehicles and groups of electric vehicles. Carbon emission flow models and local marginal electricity price models are used to calculate system environmental information in real time.

3. The method according to claim 2, characterized in that, The method also includes the step of constructing a partially observable Markov decision process framework: Based on the physical laws and operational logic of the power-transportation coupled network model, the system state variable set is determined. Action variable set and reward function ,in The total number of electric vehicle agents participating in the scheduling process in the system; Local observation status Represented as: in, This refers to the road traffic time. For charging queue time, The state of charge of the electric vehicle. For the state characteristics of distribution network nodes, Road condition characteristics; Action variables ,in Select actions for discrete paths. This is the proportional control coefficient for continuous charge and discharge power.

4. The method according to claim 3, characterized in that, The state characteristics of the distribution network nodes Includes real-time local marginal electricity prices at nodes predicted through adversarial generative networks. and the nodal carbon emission intensity characteristics calculated through carbon emission flows. ; The road condition features Includes initial background traffic flow of the road and the dynamic aggregation number of controlled electric vehicles on the road. ; The actual charging power performed by the electric vehicle intelligent agent With discharge power Based on the continuous charge and discharge power proportional control coefficient The real-time state of charge of the battery is calculated according to the following logic: in, For the battery's rated capacity, For charge / discharge energy conversion efficiency, This is the minimum state of charge limit allowed for safe battery operation.

5. The method according to claim 1, characterized in that, The method also includes an online local marginal electricity price generation step based on generative adversarial networks: Obtain historical local marginal electricity price series and random Gaussian noise vector ; The historical local marginal electricity price sequence and the random Gaussian noise vector are input into the trained generator. Output the real-time local marginal electricity price of each charging station's corresponding distribution network node at the current moment. ; Wherein, the generator With discriminator Obtained through joint training using the following adversarial loss functions: Generator loss function: Discriminator loss function: in, This is a sample of real historical electricity price sequences.

6. The method according to claim 1, characterized in that, The method also includes the step of constructing a multi-agent proximal policy optimization deep neural network: The multi-agent proximal policy optimization deep neural network includes a shared feature layer, a discrete path selection action head, a continuous charge and discharge power action head, and a value evaluation network. The input to the shared feature layer is the node embedding representation output by the secure graph attention encoder. and the local observation state of the electric vehicle intelligent agent Its outputs are respectively connected to the discrete path selection action head, the continuous charge and discharge power action head, and the value evaluation network.

7. The method according to claim 6, characterized in that, The training of the multi-agent proximal policy optimization deep neural network adopts a centralized training and distributed execution framework. The policy pruning objective function of the Actor network in the multi-agent proximal policy optimization deep neural network... for: in, The probability ratio between the old and new strategies. For the dominant function, Set the pruning threshold for the strategy; The comprehensive optimization objective function of the Actor network is: in, Let be the mean squared error loss function of the value evaluation network. For the policy entropy term, and These are the weighting coefficients.

8. The method according to claim 3, characterized in that, The reward function Using piecewise function form: Define electricity consumption and low-carbon cost incentives for: Define passage time penalty for: Define local traffic congestion penalties ; Comprehensive reward function Through weighting factors The charging state, discharging state, invalid charging / discharging action state, and pure driving state are weighted and summed.

9. The method according to claim 1, characterized in that, The voltage safety margin Defined as the minimum deviation between the voltage at a distribution network node and its upper and lower limits: The traffic capacity safety margin Defined as remaining traffic space on the road: The service capacity safety margin Defined as the remaining service capacity available at the charging station: in, Connecting electric vehicles to charging stations Indicator variables.

10. The method according to claim 1, characterized in that, The security state shielding factor The calculation formula is: in, The weight matrix is ​​a learnable matrix. and Target nodes With neighboring nodes Safety margin, This represents a vector concatenation operation; The security gating attention weight The calculation formula is: in, To ensure secure propagation paths, For attention parameter vectors, Here is the weight transformation matrix. , They are nodes , eigenvectors, For nodes The set of neighboring nodes; The security feature embedding representation of the target node The calculation formula is: in, For activation functions; The final node embedding representation for: in, The number of heads in a multi-head attention mechanism.