A grid-connected starting scheme intelligent ticketing system and method
Patent Information
- Application Number
- CN202611197007.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]当前主流的并网成票技术主要分为三类:第一类为模板匹配法,通过预设不同场景的标准操作票模板,根据开票需求替换设备名称、间隔编号生成操作票,该方法生成速度快,但完全依赖预设模板,仅能适配标准化并网场景,面对检修后恢复并网、特殊运行方式并网、新能源汇集站并网等非标准场景时适配性差,易遗漏拓扑连锁约束,操作合规性难以保障
[0072]采用上述技术方案所带来的有益效果在于:本发明针对传统并网成票方法存在的模板适配性差、规则覆盖不全、拓扑感知不足、冲突消解滞后等缺陷,构建了全新的智能成票系统。
Smart Images

Figure CN122988992A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent dispatching technology for power systems, and in particular to an intelligent ticketing system and method for grid connection startup schemes. Background Technology
[0002] Grid connection startup is a core business of power system dispatch and operation, and the grid connection operation ticket is a core technical document that standardizes grid connection operation procedures, prevents electrical misoperation, and ensures the safe and stable operation of the power grid. With the continuous advancement of the construction of new power systems, the frequency of grid connection of new energy power plants has increased significantly, the power grid topology has become increasingly complex, and the operation mode has become more flexible and diverse, which places higher demands on the efficiency, compliance accuracy, and scenario adaptability of grid connection operation tickets.
[0003] Currently, mainstream grid connection ticketing technologies can be divided into three categories: The first category is the template matching method. This method generates operation tickets by pre-setting standard operation ticket templates for different scenarios and replacing equipment names and interval numbers according to ticketing requirements. This method is fast, but it relies entirely on pre-set templates and can only adapt to standardized grid connection scenarios. It has poor adaptability to non-standard scenarios such as grid connection after maintenance, grid connection under special operating modes, and grid connection of new energy collection stations. It is also prone to missing topological chain constraints, making it difficult to guarantee operational compliance. The second category is the rule engine method. This method builds a rule base based on manually compiled electrical five-prevention rules and scheduling safety procedures. It generates operation sequences through forward chain reasoning. This method improves compliance compared to the template method, but the rule base relies entirely on manual construction and maintenance, resulting in high development and expansion costs. It is difficult to cover long-distance chain constraints under complex topologies, and the long reasoning chain leads to low ticketing efficiency. Blind spots in rule coverage are prone to occur in boundary scenarios. The third category is purely data-driven sequence generation methods, which use sequence models such as LSTM to learn the sequence patterns of historical operation tickets. This method has better generalization ability than the template method, but it lacks explicit power grid topology constraints and safety rule guidance, and is prone to generating operation steps that violate scheduling procedures. Its interpretability and safety reliability are insufficient, and it can only be used as an auxiliary reference for manual compilation. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide an intelligent ticketing system and method for grid-connected startup scheme, which can overcome the shortcomings of the prior art and realize the automatic generation, security verification and dynamic optimization of operation tickets.
[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows.
[0006] A smart ticketing method for grid-connected startup schemes includes the following steps:
[0007] A. Construct and initialize a knowledge graph of power operation, resulting in the following structure: The knowledge storage structure is defined as follows: h is the head entity, r is the relation type, s is the device state in which the rule takes effect, and t is the tail entity. Knowledge embedding vectors for distinguishing different device operating states are obtained through iterative training.
[0008] B. Analyze the grid connection application requirements and map them to the corresponding entity nodes in the knowledge graph. Combine the real-time operation data of the power grid to construct the initial state matrix of the equipment. Based on the rule reasoning of the knowledge graph, obtain the target state vector of the fully associated equipment and complete the safety constraint verification. Generate the initial topology subgraph of the corresponding grid connection range.
[0009] C. Extract the spatial structure features of the power grid topology and the temporal evolution features of historical operations respectively, and fuse the two features through an adaptive gating mechanism to obtain the spatiotemporal joint features;
[0010] D. A hierarchical reinforcement learning decision architecture is adopted, in which the upper layer determines the operation stage and the lower layer selects the specific operation. The differential two-stream attention mechanism is embedded to calculate the conflict representation of operation semantics and topological constraints. Within the legal action space pre-pruned by the knowledge graph, the current step of the network operation is generated one after another.
[0011] E. Simulate the changes in the power grid state after the operation is executed, update the spatiotemporal characteristics, and calculate the immediate reward for reinforcement learning training;
[0012] F. Fine-grained conflict detection is achieved based on dual-stream difference degree, conflict types are inferred from knowledge graph, and dynamic resolution is achieved through backtracking reinforcement learning;
[0013] G. Perform three-level verification on the complete operation sequence, including logical verification, topology error prevention verification, and procedure consistency verification, and output the final operation ticket;
[0014] H. Update the knowledge graph and grid connection strategy.
[0015] Preferably, in step A, an entity set and a relation set are established. The entity set includes device entities, operation entities, and state entities, and the relation set includes topological connection relations, operation-action relations, state transition relations, security constraint relations, and temporal dependency relations.
[0016] Extract all valid rules verified by dispatching procedures from the power operation knowledge graph, generate a set of equipment states for which the rules are effective, and store the knowledge in the following structure: Where h is the head entity, containing equipment entities and operation entities; r is the relation type; s is the equipment status for which the rule is effective, taking values of four standard statuses: maintenance, cold standby, hot standby, and operation; t is the tail entity, containing status entities, rule entities, and equipment entities; and the set of all positive samples is denoted as . ;
[0017] Initialize all entity vectors, relation vectors, and state offset vectors so that all entity, relation, and state offset vectors follow a uniform distribution. , , Where h is the head entity vector, t is the tail entity vector, and r is the relation vector. Let be the state offset vector, γ be the margin hyperparameter of the hinge loss, used to control the score interval between positive and negative samples, and d be the vector dimension hyperparameter. After initialization, L2 normalization is performed on all vectors, with the initial magnitude constrained to 1. , , , ;
[0018] A negative sample set is constructed using a random replacement strategy. The driving model learns to distinguish between correct and incorrect rules. For each positive sample (h,r,s,t), the head entity h is randomly replaced with another entity h′ of the same type with probability p=0.5, and the tail entity t is randomly replaced with another entity t′ of the same type with probability 1−p=0.5. The relation r and the effective state s remain unchanged. Negative samples must satisfy the non-positive sample constraints. , ;
[0019] Calculate the score function ,in The score is the square of the L2 norm. During training, a score is calculated for each positive sample and its corresponding negative sample. The score for the positive sample is... negative sample score or ;
[0020] Using hinge loss as the training objective, the loss for a single "positive sample - negative sample" pair is... For all samples within a batch, the total loss is the average of the losses for all samples. Where B is the number of positive samples in the batch. This is the set of positive samples in the current batch. This corresponds to the generated set of negative samples;
[0021] Minimize the total loss using stochastic gradient descent For h, r, The gradients of the four types of trainable parameters t are calculated and updated respectively, and the intermediate variable is set as follows: The scoring function can be simplified as follows: ,when At that time, the gradient of the loss with respect to each parameter for a single sample is as follows:
[0022] The gradient of the head entity h is ,
[0023] The gradient of the tail entity t is ,
[0024] The gradient of relation r is ,
[0025] For the state offset vector The gradient is ,
[0026] The parameters are updated as follows:
[0027] ,
[0028] ,
[0029] ,
[0030] ,
[0031] After each round of parameter updates, L2 normalization is re-performed for all entities, relations, and state offset vectors;
[0032] Recalculate the loss function value and update the parameters until the following convergence condition is met.
[0033] If the decrease in the validation set loss is less than a set threshold for N consecutive rounds...
[0034] Alternatively, reach the preset maximum number of training rounds;
[0035] After training, the final set of knowledge samples is output. .
[0036] Preferably, in step B, the grid connection application form is parsed to obtain grid connection information such as the grid connection site, equipment range, target grid connection status, planned grid connection time, and special constraints. The equipment names in the grid connection information are mapped to entity nodes in the knowledge graph through entity links, and an equipment status matrix is constructed based on the current real-time power grid operation data. N represents the total number of devices involved, with values corresponding to four states: maintenance, cold standby, hot standby, and operation.
[0037] Based on the information mapped to the knowledge graph and the current device state matrix of the power grid, an initial topology subgraph is generated. Where υ is the complete set of all nodes in the topological subgraph, ε is the complete set of all associated edges between nodes, and R is the complete set of semantic types of all edges in the graph. For each core device... Based on the equipment type and grid connection mode, the initial target state semantic value is obtained by querying the knowledge graph. ,in For knowledge graph rule query functions, for core devices Traverse its topologically connected neighbor set ,in For the type of neighboring device, This describes the topological connection between the two devices.
[0038] Starting with the core equipment, in the topology subgraph Perform a breadth-first search, deriving the target state of all associated devices layer by layer until all device nodes within the subgraph are covered, thus obtaining a temporary full set of target states. For all security constraint triples in the knowledge graph The matching degree is calculated by calling the state enhancement score function. If the score is higher than the threshold θ, it means that the current target state violates the security constraint. Then, the target state of the corresponding device is corrected in reverse according to the rules until all constraints are satisfied.
[0039] The semantic states of all devices are mapped to a unified numerical code to form the final target state vector. .
[0040] Preferably, in step C, multi-layer heterogeneous graph convolution is performed on the initial topological subgraph to aggregate the features of neighbor nodes under different relation types. Among them, relation-aware attention weights , The self-loop characteristic transformation matrix, Let r be the neighbor feature transformation matrix. Let i be the set of neighboring nodes of node i under relation r. The number of neighbors under relation r, used for normalization. Let r be the attention query vector for relation r. Using the Sigmoid activation function, after L layers of spatial convolution, the spatial features of all nodes are obtained. And obtain the spatial global vector through the global readout layer. ;
[0041] By fusing spatial and temporal features through an adaptive gating mechanism, node-level spatiotemporal joint features are obtained. ,in represents the spatial feature weights of node i, used to adaptively adjust the ratio of spatial to temporal information. , This is a vector concatenation operation. To integrate the learnable parameters of gating, For the bias term of the gated linear layer, This is the timing operation feature vector corresponding to the i-th device node, which contains the historical operation logic and timing dependency information related to the device.
[0042] Preferably, in step D, the upper-level manager's strategy determines the current grid connection operation stage based on the current global state. ,in It is a stochastic policy for decision-making in the upper stages of a hierarchical reinforcement learning framework. Let be the global state vector at step t. The parameters of the upper-layer policy network are obtained by sampling according to the probability distribution to obtain the current operation stage;
[0043] Based on the current device status and the current stage The knowledge graph retrieves all operations that satisfy the state transition rules, forming a legal action space. ;
[0044] Semantic encoding is performed on historical operation sequences and candidate operations to capture the temporal logical relationships between operations. , , , ,in This is the semantic embedding matrix of the first t steps of operations. These are the query, key, and value transformation matrices for the semantic flow, respectively. For attention key-value dimension, The semantic stream is encoded as output, and the semantic features at step t are: ;
[0045] Constraint encoding is performed on the device subgraph involved in the current operation to capture the constraint effect of the topology on the operation. The constraint attention weights of the device nodes associated with the candidate operation at step t are then calculated. The constrained flow features at step t are obtained by aggregation. ,in This is a vector concatenation operation. Let α be the constraint flow feature transformation matrix, and α be the constraint flow attention weight vector. Let be the set of device nodes involved in the candidate operation at step t. Use the Sigmoid activation function;
[0046] Based on the power grid topology, a neighborhood set under the expansion coefficient d is defined for each device node i. For each expansion scale, weighted aggregation is performed based on the original node constraint features to obtain multi-scale enhanced node features. ,in Let be the eigenvalue transformation matrix corresponding to the expansion scale d. Using the Sigmoid activation function, dilation features at different scales are concatenated, and then double pooling is applied to obtain the global dilation enhancement constraint feature at step t. , , The global expansion topological constraint feature is the final output of step t. Average pooling represents the overall constraint level, and max pooling captures extremely strong constraint points.
[0047] The semantic feature matrix is element-wise masked using a sparse mask, and then multiplied by the original value matrix to obtain the sparsely filtered semantic features. , ,in, Let be the Top-k sparse mask vector at step t. The sparsely filtered semantic features are the final output of step t, which are aggregated only from the features of key historical operations;
[0048] The dilated topological features are aligned to the dimension of semantic features through a linear transformation. , For dimension alignment transformation matrix, To determine the uniform dilatational topological constraint features, the element-wise differences between the two feature paths are calculated as the basis for gating adjustment. Based on the concatenation of two feature vectors and difference vectors, a dimension-wise fusion weight calculation gate weight vector is generated through a fully connected layer. ,in For gating network parameters, is the bias vector of the gated network. This is the gating weight vector;
[0049] Final fusion features The conflict representation is obtained by weighting the difference vector based on gating weights and normalizing it. ,in It is the L2 norm. This is a dimension normalization factor used to eliminate the influence of feature dimensions on the numerical range.
[0050] Preferably, in step D, the lower-level executor strategy combines global state, stage embedding, and dual-stream fusion features to sample specific operations within the legal action space. ,in It is a stochastic policy for decision-making in lower-level stages of a hierarchical reinforcement learning framework. This is the embedding vector for the current operation phase. Here, ψ represents the parameters of the lower-level policy network, and ψ is the parameter set. The specific operation at step t is obtained by sampling according to the probability distribution. .
[0051] Preferably, in step E, according to the operation Type and target of action, update device state matrix get , will operate Add the historical operation sequence, update the node state attributes of the topological subgraph to the new global state vector;
[0052] Calculate real-time rewards Each item is defined as follows:
[0053] Correctness reward: When an operation conforms to the knowledge graph state transition rules. ;otherwise ;
[0054] Security Rewards: ,in To satisfy the number of safety constraints, This represents the total number of constraints.
[0055] Efficiency Reward: A fixed negative reward is applied for each additional operation to encourage streamlined operation sequences. ;
[0056] Conflict penalties: ,
[0057] This represents the weighting coefficient for each reward.
[0058] Preferably, in step F, a collision detection threshold is set. ,when If the operation in step t is deemed to have a potential conflict, the process proceeds to the subsequent classification and resolution stage; otherwise, the operation is deemed compliant, and the process returns to step four to generate the next operation.
[0059] The process of classifying and resolving conflicts involves calculating the scores of candidate conflict rules. , The set of candidate conflict rules includes four types of rules: topology conflict, timing conflict, state conflict, and security constraint conflict. The type corresponding to the rule with the lowest score is the current conflict type. At the same time, the device and rule entries associated with the conflict are output.
[0060] Determine the backtracking step size k based on the conflict type, and restart the operation decision from step t-k. Then, regenerate the operation sequence from step tk to step t, and repeat the state update in step 5, updating... Then, a conflict check is performed again to ensure that there are no constraint conflicts in all operations.
[0061] As a preferred option, in step H, new entities, relations, and rule entries are extracted based on the newly added operation ticket samples and added to the knowledge graph;
[0062] The upper and lower policy networks are jointly trained using a proximal policy optimization algorithm to minimize the policy gradient loss after pruning. To implement strategy updates, where For all policy network functions, The strategy before the update, For the updated strategy, `clip` is the dominant function, and `clip` is the clipping function. This is the cutting factor.
[0063] A smart ticketing system for a grid-connected startup scheme, used to implement the aforementioned smart ticketing method for a grid-connected startup scheme, includes,
[0064] The power operation knowledge graph generation module is used to construct and initialize the power operation knowledge graph.
[0065] The power grid status generation module is used to convert business requirements into structured inputs by parsing grid connection requirements and constructing initial operating states, and to determine the start and end points of invoicing.
[0066] The initial spatiotemporal heterogeneous graph feature extraction module is used to extract the spatial structural features of the power grid topology and the temporal evolution features of the operation history;
[0067] The grid connection operation step generation module is used to determine the current grid connection operation stage and generate specific grid connection operation steps.
[0068] The simulation module is used to simulate changes in the power grid state after the operation is executed, update spatiotemporal characteristics, and calculate immediate rewards;
[0069] The conflict detection and resolution module is used to detect and resolve conflicts based on simulation results.
[0070] The operation ticket output module is used to verify the complete operation sequence and output the final operation ticket;
[0071] The online iterative optimization module is used to update the knowledge graph and grid connection strategy.
[0072] The beneficial effects of adopting the above technical solution are as follows: This invention addresses the shortcomings of traditional online ticketing methods, such as poor template adaptability, incomplete rule coverage, insufficient topology awareness, and delayed conflict resolution, and constructs a brand-new intelligent ticketing system.
[0073] 1. This invention introduces knowledge graphs to construct the core of compliance constraints. Traditional knowledge graphs, with their "head entity-relationship-tail entity" triplet storage structure, only store device topology and basic operational relationships, failing to comprehensively cover the complete topological state of the power grid during grid connection startup. This invention introduces a device state dimension, constructing a state-enhanced knowledge representation using (h, r, s, t) quadruples; it designs a specialized state offset vector to dynamically modulate relation transitions, and trains knowledge embedding vectors that can distinguish different device operating states based on a hinge loss function, achieving accurate representation of "the same operation corresponding to different rule semantics in different device states."
[0074] 2. To address the problem that existing feature extraction methods cannot simultaneously consider both "topological spatial constraints" and "operational temporal logic," leading to the easy omission of long-distance topological chain constraints and confusion in operation temporal logic during ticket generation, this invention proposes a spatiotemporal heterogeneous graph neural network dual-domain feature extraction architecture. On the spatial side, multi-relationship heterogeneous graph convolution is used, and independent attention aggregation weights are designed for different relationships such as topological connections, state affiliation, and operation effects. On the temporal side, the sequential dependencies of operation sequences are encoded. Finally, the two-way features are dynamically fused through a node-level adaptive gating mechanism to output two-level standardized spatiotemporal joint features at the node and global levels.
[0075] 3. This invention expands the receptive field and captures long-distance electrical interlocking constraints by introducing a differential dual-stream attention mechanism and adding multi-scale graph dilation convolution. By sparsely masking the attention weights of historical operations, only the most critical historical operations with the highest weights are retained, filtering out noise interference from redundant temporal correlations. Based on the differences between the two features, fusion weights are dynamically assigned; dimensions with greater differences tend to favor topological constraint features, ultimately generating a weighted conflict representation, achieving single-step conflict pre-awareness. This invention achieves single-step conflict pre-awareness and pre-suppression, significantly reducing the rework rate of post-verification and technically compressing the risk space of misoperations.
[0076] 4. The ticket-issuing decision-making system of this invention adopts a two-layer reinforcement learning architecture of "upper-layer determining the stage, lower-layer selecting the operation". The upper-layer manager strategy determines the current grid connection operation stage based on the global spatiotemporal state, constrains the decision logic at the process level, and pre-prunes the action space based on the knowledge graph, retaining only the legal operations that conform to the current state and stage. The lower-layer executor strategy samples specific operations within the pruned action space. This can quickly generate the optimal operation sequence in complex scenarios such as grid connection of new energy collection stations and grid connection under special operating modes.
[0077] 5. Existing intelligent ticketing conflict detection only has conflict identification capabilities but lacks automatic resolution capabilities, and conflict correction still relies on manual intervention. This invention calculates the conflict representation quantity after each operation step; if it exceeds a threshold, conflict detection is triggered. Based on knowledge graph reasoning, the conflict type, associated equipment, and conflict level are used to determine the backtracking step size, and backtracking to the corresponding step for re-decision. This invention achieves real-time conflict identification and automatic resolution, significantly improving the first-time ticketing pass rate, significantly reducing the workload of dispatchers in reviewing and correcting, and shortening the overall compilation cycle of grid connection operation tickets.
[0078] 6. By introducing online iterative optimization, this invention can continuously and autonomously evolve with business operations, gradually improving rule coverage and ticketing accuracy, significantly reducing long-term manual maintenance costs, and adapting to the ever-evolving grid connection business needs under the new power system. Attached Figure Description
[0079] Figure 1 This is the system logic flowchart of the present invention. Detailed Implementation
[0080] In the following description of the embodiments, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary detail.
[0081] Traditional grid-connected startup operation tickets rely on manual creation, which suffers from low efficiency, poor rule consistency, easy omission of topology constraints, and operational conflicts under complex operating conditions. Existing intelligent ticketing methods are mostly based on rule matching or simple sequence models, making it difficult to simultaneously consider grid topology constraints, operational timing logic, multi-condition adaptability, and dynamic conflict resolution capabilities. Therefore, their accuracy is poor in grid-connected startup applications, and they can only serve as a preliminary reference for manually created operation tickets. Figure 1 This invention addresses the shortcomings of existing intelligent ticketing methods by introducing a knowledge graph model and designing a novel constraint conflict detection and resolution algorithm to construct an end-to-end intelligent ticketing system with a grid-connected startup scheme.
[0082] The first step is to construct and initialize a knowledge graph of power operations. Through structured modeling and vectorized representation of knowledge in the power operations domain, prior rule constraints and initial features are obtained.
[0083] An entity set and a relation set are established. The entity set includes equipment entities (circuit breakers, disconnectors, busbars, transformers, renewable energy power plants, etc.), operation entities (closing, opening, inspection, voltage testing, phase verification, etc.), and state entities (operation, hot standby, cold standby, maintenance, etc.). The relation set includes topological connections, operation-action relationships, state transition relationships, security constraints, and temporal dependencies. Based on the traditional knowledge graph triplet knowledge storage structure, we introduce state offset vectors to dynamically modulate the state dimension of relation transitions, ultimately learning entity, relation, and state vector representations that can distinguish different operating states of equipment. All valid rules verified by scheduling procedures are extracted from the power operation knowledge graph to generate a set of equipment states for which the rules are effective. The new knowledge storage structure is as follows: Where h is the head entity, containing equipment entities and operation entities; r is the relation type; s is the equipment status for which the rule is effective, taking values of four standard statuses: maintenance, cold standby, hot standby, and operation; and t is the tail entity, containing status entities, rule entities, and equipment entities. The set of all positive samples is denoted as . .
[0084] Initialize all entity vectors, relation vectors, and state offset vectors so that all entity, relation, and state offset vectors follow a uniform distribution. , , Where h is the head entity vector, t is the tail entity vector, and r is the relation vector. Let be the state offset vector, γ be the margin hyperparameter of the hinge loss, used to control the score interval between positive and negative samples, and d be the vector dimension hyperparameter. After initialization, L2 normalization is performed on all vectors, with the initial magnitude constrained to 1. , , , .
[0085] A negative sample set is constructed using a random replacement strategy. This drives the model to learn and distinguish between correct and incorrect rules. For each positive sample (h,r,s,t), the head entity h is randomly replaced with another entity h′ of the same type with probability p=0.5, and the tail entity t is randomly replaced with another entity t′ of the same type with probability 1−p=0.5, while keeping the relation r and the effective state s unchanged. Negative samples must satisfy the non-positive sample constraints. , .
[0086] Calculate the score function ,in This is the square of the L2 norm. During training, a score is calculated for each positive sample and its corresponding negative sample. Positive sample score. negative sample score or .
[0087] Using hinge loss as the training objective, the loss for a single "positive sample - negative sample" pair is... For all samples within a batch, the total loss is the average of the losses for all samples. Where B is the number of positive samples in the batch. This is the set of positive samples in the current batch. This is the corresponding set of negative samples generated.
[0088] Minimize the total loss using stochastic gradient descent For h, r, Calculate and update the gradients of the four types of trainable parameters t, y, t, and t respectively. Let the intermediate variable be... Then the scoring function can be simplified as follows: .when At that time, the gradient of the loss with respect to each parameter for a single sample is as follows:
[0089] The gradient of the head entity h is ,
[0090] The gradient of the tail entity t is ,
[0091] The gradient of relation r is ,
[0092] For the state offset vector The gradient is .
[0093] The parameters are updated as follows:
[0094] ,
[0095] ,
[0096] ,
[0097] ,
[0098] After each round of parameter updates, L2 normalization is re-executed for all entities, relations, and state offset vectors to constrain the vector magnitude and prevent training instability caused by the infinite increase of the vector magnitude during training.
[0099] Recalculate the loss function value and update the parameters until the following convergence condition is met.
[0100] If the decrease in the validation set loss is less than a set threshold for N consecutive rounds...
[0101] Alternatively, reach the preset maximum number of training rounds.
[0102] After training, the final set of knowledge samples is output. By training and learning specific offsets for different states, the model can accurately distinguish the semantic meaning of rules under different device states, thus achieving state-aware knowledge representation.
[0103] The second step involves analyzing grid connection requirements and constructing an initial operating state to transform business requirements into structured inputs that the algorithm can process, thereby determining the starting and ending points for invoicing.
[0104] The grid connection application form is parsed to obtain grid connection information such as the grid connection site, equipment scope, target grid connection status, planned grid connection time, and special constraints. Equipment names from the grid connection information are mapped to entity nodes in the knowledge graph through entity links. An equipment status matrix is constructed based on current real-time power grid operation data. , where N is the total number of devices involved, and the values correspond to four states: maintenance, cold standby, hot standby, and operation.
[0105] Based on the information mapped to the knowledge graph and the current device state matrix of the power grid, an initial topology subgraph is generated. Where υ is the universal set of all nodes in the topological subgraph, ε is the universal set of all edges connecting nodes, and R is the universal set of semantic types of all edges in the graph. For each core device... Based on the equipment type and grid connection mode, the initial target state semantic value is obtained by querying the knowledge graph. ,in This is a knowledge graph rule query function that outputs four standard statuses: maintenance, cold standby, hot standby, and operation. For core equipment... traverse its topologically connected neighbor set (Right now Neighboring nodes with a relationship type of "electrical connection" are linked via topology linkage functions. Calculate the target state of neighboring nodes ,in For the type of neighboring device, This represents the topological connection relationship between the two devices.
[0106] Starting with the core equipment, in the topology subgraph Perform a breadth-first search, deriving the target state of all associated devices layer by layer until all device nodes within the subgraph are covered, thus obtaining a temporary full set of target states. For all security constraint triples in the knowledge graph The matching degree is calculated by calling the state enhancement score function. If the score is higher than the threshold θ, it means that the current target state violates the security constraint. Then, the target state of the corresponding device is corrected in reverse according to the rules until all constraints are satisfied.
[0107] The semantic states of all devices are mapped to a unified numerical code to form the final target state vector. .
[0108] The third step is to extract the initial spatiotemporal heterogeneous graph features. We use the modified spatiotemporal heterogeneous graph neural network to simultaneously extract the spatial structural features of the power grid topology and the temporal evolution features of the operational history, generating a structured state representation.
[0109] Perform multi-layer heterogeneous graph convolution on the initial topological subgraph to aggregate neighbor node features under different relation types. Among them, relation-aware attention weights , The self-loop characteristic transformation matrix, Let r be the neighbor feature transformation matrix. Let be the set of neighboring nodes of node i under relation r. The number of neighbors under relation r, used for normalization. Let r be the attention query vector for relation r. The activation function is Sigmoid. After L layers of spatial convolution, the spatial features of all nodes are obtained. And obtain the spatial global vector through the global readout layer. .
[0110] By fusing spatial and temporal features through an adaptive gating mechanism, node-level spatiotemporal joint features are obtained. ,in represents the spatial feature weights of node i, used to adaptively adjust the ratio of spatial to temporal information. , This is a vector concatenation operation. To integrate the learnable parameters of gating, For the bias term of the gated linear layer, This is the timing operation feature vector corresponding to the i-th device node, which contains the historical operation logic and timing dependency information related to the device.
[0111] The fourth step involves a hierarchical reinforcement learning two-stage operation decision-making process that integrates differential attention mechanisms. We adopt a two-layer architecture of "upper layer determining the stage, lower layer selecting the operation" and embed a differential dual-stream attention mechanism to achieve collaborative perception of operation semantics and topological constraints.
[0112] The upper-level management strategy determines the current grid connection operation stage (such as preparation stage, closing stage, grid connection stage, verification stage, and closing stage) based on the current overall status. ,in It is a stochastic policy for decision-making in the upper stages of a hierarchical reinforcement learning framework. Let be the global state vector at step t. These are the parameters for the upper-layer policy network. The current operation stage is obtained by sampling based on the probability distribution. .
[0113] Based on the current device status and the current stage The knowledge graph retrieves all operations that satisfy the state transition rules, forming a legal action space. This filters out illegal actions that violate hard rules, significantly reducing the exploration space of reinforcement learning.
[0114] Semantic encoding is performed on historical operation sequences and candidate operations to capture the temporal logical relationships between operations. , , , ,in This is the semantic embedding matrix of the first t steps of operations. These are the query, key, and value transformation matrices for the semantic flow, respectively. For attention key-value dimension, The semantic stream is encoded as output, and the semantic features at step t are: .
[0115] Constraint encoding is performed on the device subgraph involved in the current operation to capture the constraints imposed by the topology on the operation. The constraint attention weights of the device nodes associated with the candidate operation at step t are then calculated. The constrained flow features at step t are obtained by aggregation. .in This is a vector concatenation operation. Let α be the constraint flow feature transformation matrix, and α be the constraint flow attention weight vector. Let be the set of device nodes involved in the candidate operation at step t. This is the Sigmoid activation function.
[0116] Based on the power grid topology, a neighborhood set under the expansion coefficient d is defined for each device node i. For each expansion scale, weighted aggregation is performed based on the original node constraint features to obtain multi-scale enhanced node features. ,in Let be the eigenvalue transformation matrix corresponding to the expansion scale d. The Sigmoid activation function is used. By appending multi-scale graph dilation convolution, the receptive field of topological constraints can be expanded to capture long-distance chained constraints. The dilated features at different scales are concatenated, and then double pooling is used to obtain the globally dilated and enhanced constraint features at step t. , , The final output of step t is the global expansion topological constraint feature. Average pooling represents the overall constraint level, while max pooling captures extremely strong constraint points.
[0117] The semantic feature matrix is element-wise masked using a sparse mask, and then multiplied by the original value matrix to obtain the sparsely filtered semantic features. , ,in, Let be the Top-k sparse mask vector at step t. The sparsely filtered semantic features are the final output of step t, which are aggregated only from the features of key historical operations. By appending adaptive sparse filtering to the original semantic features, redundant temporal correlations are filtered out, while core operation dependencies are retained.
[0118] The dilated topological features are aligned to the dimension of semantic features through a linear transformation. , For dimension alignment transformation matrix, The expanded topological constraint features are then defined. The element-wise differences between the two features are calculated as the basis for gating adjustment. Based on the concatenation of two feature vectors and difference vectors, a gating weight vector is calculated by generating dimension-wise fusion weights through a fully connected layer. ,in For gating network parameters, is the bias vector of the gated network. For the gating weight vector, the greater the difference in the dimension, the more the gating tends to be topological constraint features, thus strengthening the constraint verification effect.
[0119] Final fusion features The conflict representation is obtained by weighting the difference vector based on gating weights and normalizing it. ,in It is the L2 norm. This is a dimension normalization factor used to eliminate the influence of feature dimensions on the numerical range.
[0120] The lower-level executor strategy combines global state, stage embedding, and dual-stream fusion features to sample specific operations within the legal action space. ,in It is a stochastic policy for decision-making in lower-level stages of a hierarchical reinforcement learning framework. This is the embedding vector for the current operation phase. Here, ψ represents the parameters of the lower-level policy network. The specific operation at step t is obtained by sampling based on the probability distribution. .
[0121] The fifth step is to simulate the changes in the power grid state after the operation is executed, update the spatiotemporal features, and calculate the immediate reward for reinforcement learning training.
[0122] According to the operation Type and target of action, update device state matrix get The operation Add the historical operation sequence, update the node state attributes of the topological subgraph to the new global state vector.
[0123] Calculate real-time rewards Each item is defined as follows:
[0124] Correctness reward: When an operation conforms to the knowledge graph state transition rules. ;otherwise .
[0125] Security Rewards: ,in To satisfy the number of safety constraints, This represents the total number of constraints.
[0126] Efficiency Reward: A fixed negative reward is applied for each additional operation to encourage streamlined operation sequences. .
[0127] Conflict penalties: .
[0128] This represents the weighting coefficient for each reward.
[0129] The sixth step involves implementing fine-grained conflict detection based on dual-stream difference, combining knowledge graph reasoning to determine conflict types, and completing dynamic resolution through backtracking reinforcement learning.
[0130] Set collision detection threshold ,when If the operation in step t is deemed to have a potential conflict, the process proceeds to the subsequent classification and resolution stage; otherwise, the operation is deemed compliant, and the process returns to step four to generate the next operation.
[0131] The process of classifying and resolving conflicts involves calculating the scores of candidate conflict rules. , This is a set of candidate conflict rules, including four categories: topology conflicts, temporal conflicts, state conflicts, and security constraint conflicts. The rule with the lowest score corresponds to the current conflict type, and the associated devices and rule entries are also output.
[0132] Determine the backtracking step size k based on the conflict type, and restart the operation decision from step t-k. Then regenerate the operation sequence from step tk to step t, and repeat the state update in step 5. Update Then, a conflict check is performed again to ensure that there are no constraint conflicts in all operations.
[0133] The seventh step is to determine the termination of the operation ticket and output it in a standardized manner.
[0134] Current device status matrix Grid connection status with target Perform element-by-element comparison. If all device states match, the grid connection operation sequence is considered complete, and the decision loop is terminated.
[0135] The complete operation sequence undergoes three levels of verification: logic verification to prevent accidental opening and closing of circuit breakers and disconnection switches under load; topology verification to ensure electrical connectivity and safety before and after the operation based on the power grid topology; and procedure consistency verification to perform full matching verification with the dispatching procedure rules in the knowledge graph. If the verification fails, the process returns to step six to re-perform conflict detection.
[0136] Step 8: Online iterative optimization of the algorithm, including the following two aspects.
[0137] First, based on the newly added operation ticket samples, new entities, relationships, and rule entries are extracted and added to the knowledge graph to improve rule coverage and reasoning accuracy.
[0138] Second, a proximal policy optimization algorithm is used to jointly train the upper and lower policy networks to minimize the policy gradient loss after pruning. This enables policy updates. For all policy network functions, The strategy before the update, For the updated strategy, is the advantage function, representing the superiority or inferiority of the current action relative to the average level; clip is the clipping function. The pruning factor limits the policy update range and ensures training stability.
[0139] To implement the above-mentioned intelligent ticketing method, this invention establishes a corresponding intelligent ticketing system, including:
[0140] The power operation knowledge graph generation module is used to construct and initialize the power operation knowledge graph.
[0141] The power grid status generation module is used to convert business requirements into structured inputs by parsing grid connection requirements and constructing initial operating states, thereby determining the start and end points of invoicing.
[0142] The initial spatiotemporal heterogeneous graph feature extraction module is used to extract the spatial structural features of the power grid topology and the temporal evolution features of the operation history.
[0143] The grid connection operation step generation module is used to determine the current grid connection operation stage and generate specific grid connection operation steps.
[0144] The simulation module is used to simulate changes in the power grid state after the operation is executed, update spatiotemporal characteristics, and calculate immediate rewards.
[0145] The conflict detection and resolution module is used to detect and resolve conflicts based on simulation results.
[0146] The operation ticket output module is used to verify the complete operation sequence and output the final operation ticket.
[0147] The online iterative optimization module is used to update the knowledge graph and grid connection strategy.
[0148] A comparative experiment was conducted using the method provided by this invention and existing intelligent ticketing methods. The existing intelligent ticketing methods selected include:
[0149] Template matching method: By pre-setting standard operation ticket templates for different scenarios, operation tickets are generated by replacing the equipment name and interval number according to the invoicing requirements.
[0150] Rule engine method: Based on a manually constructed expert rule base, it generates operation sequences through forward chain reasoning.
[0151] LSTM sequence generation method: Based on pure data-driven deep learning, the operation tickets are treated as discrete sequences, and the operation step generation model is trained using an LSTM network.
[0152] Hardware configuration: CPU is Intel Xeon Gold 633, GPU is NVIDIA A100 24GB, RAM is 128GB, and storage is 2TB SSD.
[0153] Experimental Dataset: The data source consists of grid connection start-up operation tickets from the Guangxi Zhuang Autonomous Region Power Grid Dispatch Center from 2022 to 2025. These tickets cover four typical scenarios: conventional substation grid connection, post-maintenance grid restoration, new energy aggregation station grid connection, and grid connection under special operating modes. A total of 1280 standard operation tickets, approved by dispatching experts, are divided into a training set of 1024 tickets, a validation set of 128 tickets, and a test set of 128 tickets, in an 8:1:1 ratio. Supporting data includes the corresponding power grid topology, equipment ledger, dispatching safety regulations, and a five-prevention rule base, used to construct a power operation knowledge graph and a spatiotemporal heterogeneous graph dataset.
[0154] The overall performance comparison across 128 test set samples is shown in the table below:
[0155]
[0156] The following table compares the compliance accuracy rates for four typical grid connection scenarios:
[0157]
[0158] Therefore, this invention significantly reduces the risk of human error during grid connection operations, ensuring the safe and stable operation of the power grid. This invention can adapt to grid connection requirements of different voltage levels, wiring methods, and operating states, maintaining an accuracy rate of over 93% even in complex scenarios, and is suitable for the high-frequency and diverse grid connection operation needs of new power systems. This invention achieves an optimal balance between the speed and quality of operation ticket generation, eliminating redundant verification steps while ensuring safety, shortening the overall grid connection operation time, and improving power grid operating efficiency.
[0159] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this invention, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.
[0160] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0161] In various embodiments, the hardware implementation of the technology can directly utilize existing smart devices, including but not limited to industrial control computers, PCs, smartphones, handheld devices, and floor-standing devices. Its input device preferably uses an on-screen keyboard, its data storage and computing modules utilize existing memory, calculators, and controllers, its internal communication modules utilize existing communication ports and protocols, and its remote communication utilizes existing GPRS networks, the World Wide Web, etc.
[0162] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments 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. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0163] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of modules or units 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 shown or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms. Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, i.e., 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.
[0164] In the various embodiments of this invention, the functional units 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 units can be implemented in hardware or as software functional units. If the integrated module / 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, all or part of the processes in the methods of the above embodiments of this invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in computer-readable media may be appropriately added to or subtracted from the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, computer-readable media may not include electrical carrier signals and telecommunication signals, in accordance with legislation and patent practice.
[0165] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0166] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
Claims
1. A smart ticketing method for a grid-connected startup scheme, characterized in that... Includes the following steps: A. Construct and initialize a knowledge graph of power operation, resulting in the following structure: The knowledge storage structure is defined as follows: h is the head entity, r is the relation type, s is the device state in which the rule takes effect, and t is the tail entity. Knowledge embedding vectors for distinguishing different device operating states are obtained through iterative training. B. Analyze the grid connection application requirements and map them to the corresponding entity nodes in the knowledge graph. Combine the real-time operation data of the power grid to construct the initial state matrix of the equipment. Based on the rule reasoning of the knowledge graph, obtain the target state vector of the fully associated equipment and complete the safety constraint verification. Generate the initial topology subgraph of the corresponding grid connection range. C. Extract the spatial structure features of the power grid topology and the temporal evolution features of historical operations respectively, and fuse the two features through an adaptive gating mechanism to obtain the spatiotemporal joint features; D. A hierarchical reinforcement learning decision architecture is adopted, in which the upper layer determines the operation stage and the lower layer selects the specific operation. The differential two-stream attention mechanism is embedded to calculate the conflict representation of operation semantics and topological constraints. Within the legal action space pre-pruned by the knowledge graph, the current step of the network operation is generated one after another. E. Simulate the changes in the power grid state after the operation is executed, update the spatiotemporal characteristics, and calculate the immediate reward for reinforcement learning training; F. Fine-grained conflict detection is achieved based on dual-stream difference degree, conflict types are inferred from knowledge graph, and dynamic resolution is achieved through backtracking reinforcement learning; G. Perform three-level verification on the complete operation sequence, including logical verification, topology error prevention verification, and procedure consistency verification, and output the final operation ticket; H. Update the knowledge graph and grid connection strategy.
2. The intelligent ticketing method for grid-connected startup scheme according to claim 1, characterized in that: In step A, an entity set and a relation set are established. The entity set includes device entities, operation entities, and state entities. The relation set includes topological connection relations, operation-action relations, state transition relations, security constraint relations, and timing dependency relations. Extract all valid rules verified by dispatching procedures from the power operation knowledge graph, generate a set of equipment states for which the rules are effective, and store the knowledge in the following structure: Where h is the head entity, containing equipment entities and operation entities; r is the relation type; s is the equipment status for which the rule is effective, taking values of four standard statuses: maintenance, cold standby, hot standby, and operation; t is the tail entity, containing status entities, rule entities, and equipment entities; and the set of all positive samples is denoted as . ; Initialize all entity vectors, relation vectors, and state offset vectors so that all entity, relation, and state offset vectors follow a uniform distribution. , , Where h is the head entity vector, t is the tail entity vector, and r is the relation vector. Let be the state offset vector, γ be the margin hyperparameter of the hinge loss, used to control the score interval between positive and negative samples, and d be the vector dimension hyperparameter. After initialization, L2 normalization is performed on all vectors, with the initial magnitude constrained to 1. , , , ; A negative sample set is constructed using a random replacement strategy. The driving model learns to distinguish between correct and incorrect rules. For each positive sample (h,r,s,t), the head entity h is randomly replaced with another entity h′ of the same type with probability p=0.5, and the tail entity t is randomly replaced with another entity t′ of the same type with probability 1−p=0.
5. The relation r and the effective state s remain unchanged. Negative samples must satisfy the non-positive sample constraints. , ; Calculate the score function ,in The score is the square of the L2 norm. During training, a score is calculated for each positive sample and its corresponding negative sample. The score for the positive sample is... negative sample score or ; Using hinge loss as the training objective, the loss for a single "positive sample - negative sample" pair is... For all samples within a batch, the total loss is the average of the losses for all samples. Where B is the number of positive samples in the batch. This is the set of positive samples in the current batch. This corresponds to the generated set of negative samples; Minimize the total loss using stochastic gradient descent For h, r, The gradients of the four types of trainable parameters t are calculated and updated respectively, and the intermediate variable is set as follows: The scoring function can be simplified as follows: ,when At that time, the gradient of the loss with respect to each parameter for a single sample is as follows: The gradient of the head entity h is , The gradient of the tail entity t is , The gradient of relation r is , For the state offset vector The gradient is , The parameters are updated as follows: , , , , After each round of parameter updates, L2 normalization is re-performed for all entities, relations, and state offset vectors; Recalculate the loss function value and update the parameters until the following convergence condition is met. If the decrease in the validation set loss is less than a set threshold for N consecutive rounds... Or, reach the preset maximum number of training rounds; After training, the final set of knowledge samples is output. .
3. The intelligent ticketing method for grid-connected startup scheme according to claim 2, characterized in that: In step B, the grid connection application form is parsed to obtain grid connection information such as the grid connection site, equipment scope, target grid connection status, planned grid connection time, and special constraints. The equipment names in the grid connection information are mapped to entity nodes in the knowledge graph through entity links. An equipment status matrix is then constructed based on the current real-time power grid operation data. N represents the total number of devices involved, with values corresponding to four states: maintenance, cold standby, hot standby, and operation. Based on the information mapped to the knowledge graph and the current device state matrix of the power grid, an initial topology subgraph is generated. Where υ is the complete set of all nodes in the topological subgraph, ε is the complete set of all associated edges between nodes, and R is the complete set of semantic types of all edges in the graph. For each core device... Based on the equipment type and grid connection mode, the initial target state semantic value is obtained by querying the knowledge graph. ,in For knowledge graph rule query functions, for core devices Traverse its topologically connected neighbor set ,in For the type of neighboring device, This describes the topological connection between the two devices. Starting with the core equipment, in the topology subgraph Perform a breadth-first search, deriving the target state of all associated devices layer by layer until all device nodes within the subgraph are covered, thus obtaining a temporary full set of target states. For all security constraint triples in the knowledge graph The matching degree is calculated by calling the state enhancement score function. If the score is higher than the threshold θ, it means that the current target state violates the security constraint. Then, the target state of the corresponding device is corrected in reverse according to the rules until all constraints are satisfied. The semantic states of all devices are mapped to a unified numerical code to form the final target state vector. .
4. The intelligent ticketing method for grid-connected startup scheme according to claim 3, characterized in that: In step C, multi-layer heterogeneous graph convolution is performed on the initial topological subgraph to aggregate the features of neighbor nodes under different relation types. Among them, relation-aware attention weights , The self-loop characteristic transformation matrix, Let r be the neighbor feature transformation matrix. Let i be the set of neighboring nodes of node i under relation r. The number of neighbors under relation r, used for normalization. Let r be the attention query vector for relation r. Using the Sigmoid activation function, after L layers of spatial convolution, the spatial features of all nodes are obtained. And obtain the spatial global vector through the global readout layer. ; By fusing spatial and temporal features through an adaptive gating mechanism, node-level spatiotemporal joint features are obtained. ,in represents the spatial feature weights of node i, used to adaptively adjust the ratio of spatial to temporal information. , This is a vector concatenation operation. To integrate the learnable parameters of gating, For the bias term of the gated linear layer, This is the timing operation feature vector corresponding to the i-th device node, which contains the historical operation logic and timing dependency information related to the device.
5. The intelligent ticketing method for grid-connected startup scheme according to claim 4, characterized in that: In step D, the upper-level manager's strategy determines the current grid connection operation stage based on the current global state. ,in It is a stochastic policy for decision-making in the upper stages of a hierarchical reinforcement learning framework. Let be the global state vector at step t. The parameters of the upper-layer policy network are obtained by sampling according to the probability distribution to obtain the current operation stage; Based on the current device status and the current stage The knowledge graph retrieves all operations that satisfy the state transition rules, forming a legal action space. ; Semantic encoding is performed on historical operation sequences and candidate operations to capture the temporal logical relationships between operations. , , , ,in This is the semantic embedding matrix of the first t steps of operations. These are the query, key, and value transformation matrices for the semantic flow, respectively. For attention key-value dimension, The semantic stream is encoded as output, and the semantic features at step t are: ; Constraint encoding is performed on the device subgraph involved in the current operation to capture the constraint effect of the topology on the operation. The constraint attention weights of the device nodes associated with the candidate operation at step t are then calculated. The constrained flow features at step t are obtained by aggregation. ,in This is a vector concatenation operation. Let α be the constraint flow feature transformation matrix, and α be the constraint flow attention weight vector. Let be the set of device nodes involved in the candidate operation at step t. Use the Sigmoid activation function; Based on the power grid topology, a neighborhood set under the expansion coefficient d is defined for each device node i. For each expansion scale, weighted aggregation is performed based on the original node constraint features to obtain multi-scale enhanced node features. ,in Let be the eigenvalue transformation matrix corresponding to the expansion scale d. Using the Sigmoid activation function, dilation features at different scales are concatenated, and then double pooling is applied to obtain the global dilation enhancement constraint feature at step t. , , The global expansion topological constraint feature is the final output of step t. Average pooling represents the overall constraint level, and max pooling captures extremely strong constraint points. The semantic feature matrix is element-wise masked using a sparse mask, and then multiplied by the original value matrix to obtain the sparsely filtered semantic features. , ,in, Let be the Top-k sparse mask vector at step t. The sparsely filtered semantic features are the final output of step t, which are aggregated only from the features of key historical operations; The dilated topological features are aligned to the dimension of semantic features through a linear transformation. , For dimension alignment transformation matrix, To determine the uniform dilatational topological constraint features, the element-wise differences between the two feature paths are calculated as the basis for gating adjustment. Based on the concatenation of two feature vectors and difference vectors, a dimension-wise fusion weight calculation gate weight vector is generated through a fully connected layer. ,in For gating network parameters, is the bias vector of the gated network. This is the gating weight vector; Final fusion features The conflict representation is obtained by weighting the difference vector based on gating weights and normalizing it. ,in It is the L2 norm. This is a dimension normalization factor used to eliminate the influence of feature dimensions on the numerical range.
6. The intelligent ticketing method for grid-connected startup scheme according to claim 5, characterized in that: In step D, the lower-level executor strategy combines global state, stage embedding, and dual-stream fusion features to sample specific operations within the legal action space. ,in It is a stochastic policy for decision-making in lower-level stages of a hierarchical reinforcement learning framework. This is the embedding vector for the current operation phase. Here, ψ represents the parameters of the lower-level policy network, and ψ is the parameter set. The specific operation at step t is obtained by sampling according to the probability distribution. .
7. The intelligent ticketing method for grid-connected startup scheme according to claim 6, characterized in that: In step E, according to the operation Type and target of action, update device state matrix get , will operate Add the historical operation sequence, update the node state attributes of the topological subgraph to the new global state vector; Calculate real-time rewards Each item is defined as follows: Correctness reward: When an operation conforms to the knowledge graph state transition rules. ;otherwise ; Security Rewards: ,in To satisfy the number of safety constraints, This represents the total number of constraints. Efficiency Reward: A fixed negative reward is applied for each additional operation to encourage streamlined operation sequences. ; Conflict penalties: , This represents the weighting coefficient for each reward.
8. The intelligent ticketing method for grid-connected startup scheme according to claim 7, characterized in that: In step F, a collision detection threshold is set. ,when If a potential conflict exists in step t, then the subsequent classification and resolution process begins. Otherwise, the operation is deemed compliant, and the process returns to step four to generate the next operation. The process of classifying and resolving conflicts involves calculating the scores of candidate conflict rules. , The set of candidate conflict rules includes four types of rules: topology conflict, timing conflict, state conflict, and security constraint conflict. The type corresponding to the rule with the lowest score is the current conflict type. The device and rule entries associated with the conflict are also output. Determine the backtracking step size k based on the conflict type, and restart the operation decision from step t-k. Then, regenerate the operation sequence from step tk to step t, and repeat the state update in step 5, updating... Then, a conflict check is performed again to ensure that there are no constraint conflicts in all operations.
9. The intelligent ticketing method for grid-connected startup scheme according to claim 8, characterized in that: In step H, based on the newly added operation ticket samples, new entities, relations and rule entries are extracted and added to the knowledge graph; The upper and lower policy networks are jointly trained using a proximal policy optimization algorithm to minimize the policy gradient loss after pruning. To implement strategy updates, where For all policy network functions, The strategy before the update, For the updated strategy, `clip` is the dominant function, and `clip` is the clipping function. This is the cutting factor.
10. A smart ticketing system for a grid-connected startup scheme, used to implement the smart ticketing method for the grid-connected startup scheme as described in any one of claims 1 to 9, characterized in that: include, The power operation knowledge graph generation module is used to construct and initialize the power operation knowledge graph. The power grid status generation module is used to convert business requirements into structured inputs by parsing grid connection requirements and constructing initial operating states, and to determine the start and end points of invoicing. The initial spatiotemporal heterogeneous graph feature extraction module is used to extract the spatial structural features of the power grid topology and the temporal evolution features of the operation history; The grid connection operation step generation module is used to determine the current grid connection operation stage and generate specific grid connection operation steps. The simulation module is used to simulate changes in the power grid state after the operation is executed, update spatiotemporal characteristics, and calculate immediate rewards; The conflict detection and resolution module is used to detect and resolve conflicts based on simulation results. The operation ticket output module is used to verify the complete operation sequence and output the final operation ticket; The online iterative optimization module is used to update the knowledge graph and grid connection strategy.