Power grid operation order ordering method and device, terminal equipment and storage medium
By constructing a feature matrix of power grid topology and operation steps, and using graph convolutional networks and multilayer perceptrons to calculate confidence levels, the correct sequence of power grid operation orders is generated. This solves the problem that human experience is insufficient to meet the requirements of efficient and accurate scheduling in existing technologies, and achieves efficient and accurate power grid operation order sequencing.
Patent Information
- Application Number
- CN202511478379.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2026-01-13
AI Technical Summary
The existing power grid operation ticket order sorting method, which relies on human experience, is difficult to meet the needs of efficient and accurate scheduling, resulting in a high sorting error rate.
By acquiring the topological feature matrix and operation step feature matrix of the power grid, the confidence of the operation ticket is calculated using graph convolutional networks and multilayer perceptrons, and the sequence is repeatedly sorted using a preset sorting model until the correct sequence of steps is generated.
This reduces the error rate caused by manual sorting and improves the efficiency and accuracy of power grid operation order sorting.
Smart Images

Figure CN121329331A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power grid operation order sorting, and particularly relates to a power grid operation order sorting method and device, a terminal equipment and a storage medium. BACKGROUND
[0002] The power grid operation order is a core technical document for guiding device operation in power system operation and dispatching, and the correctness and sequence rationality of the operation steps directly relate to the safe and stable operation of the power grid. The correctness of the operation steps is crucial for the safe operation of the power grid.
[0003] With the expansion of the power grid scale, the complication of the topological structure and the increase of the proportion of new energy access, the number of operation order steps increases, and the logical association is enhanced. In the prior art, the sorting method relying on manual experience cannot meet the efficient and accurate dispatching requirements, and is prone to cause high sorting error rate. SUMMARY
[0004] The present application provides a power grid operation order sorting method, device, terminal equipment and storage medium, which can solve the problem that the sorting method relying on manual experience in the prior art cannot meet the efficient and accurate dispatching requirements, and is prone to cause high sorting error rate.
[0005] An embodiment of the present application provides a power grid operation order sorting method, comprising:
[0006] obtaining a power grid topological feature matrix of the power grid and an operation step feature matrix of the operation order to be sorted;
[0007] inputting the power grid topological feature matrix and the operation step feature matrix into a preset sorting model, so that the preset sorting model calculates the confidence degree of each operation order to be sorted according to the power grid topological feature matrix and the operation step feature matrix;
[0008] repeatedly sorting the operation order to be sorted according to the confidence degree and the power grid topological feature matrix until the current step sequence contains all the operation order to be sorted, taking the current step sequence as the operation order sorting result, and dispatching the power grid according to the operation order sorting result;
[0009] The sorting operation is as follows:
[0010] obtaining the current step sequence; wherein the initial step sequence is empty;
[0011] determining the current operation order to be sorted and the corresponding current confidence degree according to the current step sequence;
[0012] According to the power grid topology feature matrix, a safety score of each unsorted current to-be-sorted operation order is calculated, and a current to-be-selected order corresponding to a current safety score greater than a preset score threshold is taken as a current to-be-selected order;
[0013] The current to-be-selected order corresponding to the maximum current confidence is taken as a current selected operation order, and the current selected operation order is added to the current step sequence to obtain an updated step sequence.
[0014] Further, the power grid topology feature matrix of the power grid and the operation step feature matrix of the to-be-sorted operation order are obtained by:
[0015] The power grid topology feature matrix is constructed by taking the power grid equipment of the power grid as nodes and the connection relationship between the power grid equipment as edges;
[0016] The text corresponding to the to-be-sorted operation order is subjected to word segmentation embedding processing to obtain the operation step feature matrix.
[0017] Further, the preset sorting model calculates a confidence of each to-be-sorted operation order according to the power grid topology feature matrix and the operation step feature matrix, including:
[0018] The graph convolution network in the preset sorting model performs convolution processing on the power grid topology feature matrix to extract power grid topology global features;
[0019] The multi-layer perceptron in the preset sorting model performs feature extraction on the operation step feature matrix to obtain operation step global features;
[0020] The power grid topology global features and the operation step global features are spliced to obtain a fusion feature matrix, and the confidence is obtained according to the fusion feature matrix.
[0021] Further, the training of the preset sorting model includes:
[0022] A historical topology feature matrix of the power grid and a historical step feature matrix of the historical to-be-sorted operation order are obtained;
[0023] The historical topology feature matrix and the historical step feature matrix are input into the to-be-trained sorting model for iterative training until a loss function converges, and the preset sorting model is generated;
[0024] Wherein, in each iteration training, the current sample confidence and the current sample target confidence are calculated according to the current historical topology feature matrix and the historical step feature matrix; the current loss function is calculated according to the current sample confidence and the current sample target confidence, and whether the current loss function converges is judged; if converges, the current ranking model is taken as the above-mentioned preset ranking model; otherwise, after adjusting the model parameters in the current ranking model, the training is continued.
[0025] On the basis of the above method embodiment, the application correspondingly provides a device embodiment;
[0026] The application provides a power grid operation order sorting device, comprising:
[0027] The matrix construction module, the confidence calculation module and the order sorting module;
[0028] The above-mentioned matrix construction module is used for acquiring a power grid topology feature matrix of a power grid and an operation step feature matrix of a to-be-sequenced operation order;
[0029] The above-mentioned confidence calculation module is used for inputting the power grid topology feature matrix and the operation step feature matrix into a preset ranking model, so that the preset ranking model calculates the confidence of each to-be-sequenced operation order according to the power grid topology feature matrix and the operation step feature matrix;
[0030] The above-mentioned order sorting module is used for repeatedly sequencing the to-be-sequenced operation order according to the confidence and the power grid topology feature matrix until the current step sequence contains all the to-be-sequenced operation orders, taking the current step sequence as an operation order sequencing result, and scheduling the power grid according to the operation order sequencing result;
[0031] The above-mentioned sequencing operation is:
[0032] The current step sequence is acquired; wherein, the step sequence at the beginning is empty; the current to-be-sequenced operation order not sequenced and the corresponding current confidence are determined according to the current step sequence; the safety score of each current to-be-sequenced operation order not sequenced is calculated according to the power grid topology feature matrix, and the current to-be-sequenced operation order not sequenced corresponding to the current safety score greater than a preset score threshold value is taken as a current selected order; the current selected order corresponding to the maximum current confidence is taken as a current selected operation order, and the current selected operation order is added to the current step sequence to obtain an updated step sequence.
[0033] Further, the above-mentioned matrix construction module comprises:
[0034] The power grid topology feature matrix construction unit and the operation step feature matrix construction unit.
[0035] The power grid topology feature matrix construction unit is configured to construct the power grid topology feature matrix by taking the power grid devices of the power grid as nodes and the connection relationships between the power grid devices as edges.
[0036] The operation step feature matrix construction unit is configured to perform word segmentation embedding processing on the text corresponding to the to-be-sequenced operation order to obtain the operation step feature matrix.
[0037] Further, the confidence degree calculation module comprises:
[0038] The power grid topology global feature extraction unit, the operation step global feature extraction unit, and the feature calculation unit.
[0039] The power grid topology global feature extraction unit is configured to perform convolution processing on the power grid topology feature matrix by using a graph convolution network in the preset sequencing model to extract power grid topology global features.
[0040] The operation step global feature extraction unit is configured to perform feature extraction on the operation step feature matrix by using a multilayer perceptron in the preset sequencing model to obtain operation step global features.
[0041] The feature calculation unit is configured to concatenate the power grid topology global features and the operation step global features to obtain a fusion feature matrix, and to obtain the confidence degree according to the fusion feature matrix.
[0042] Further, the confidence degree calculation module further comprises:
[0043] The historical matrix acquisition unit and the model training unit.
[0044] The historical matrix acquisition unit is configured to acquire a historical topology feature matrix of the power grid and a historical step feature matrix of a historical to-be-sequenced operation order.
[0045] The model training unit is configured to input the historical topology feature matrix and the historical step feature matrix into a to-be-trained sequencing model for iterative training until a loss function converges, thereby generating the preset sequencing model.
[0046] In each iteration, the current sample confidence degree and the current sample target confidence degree are calculated according to the current historical topology feature matrix and the current historical step feature matrix. The current loss function is calculated according to the current sample confidence degree and the current sample target confidence degree, and it is determined whether the current loss function converges. If the current loss function converges, the current sequencing model is taken as the preset sequencing model. Otherwise, the model parameters in the current sequencing model are adjusted, and the training is continued.
[0047] Based on the above method embodiments, the present invention provides a corresponding terminal device embodiment;
[0048] The present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a power grid operation ticket order sorting method as described in any embodiment of the present invention.
[0049] Based on the above method embodiments, the present invention provides a corresponding storage medium embodiment;
[0050] The present invention provides a storage medium including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a power grid operation ticket order sorting method according to any embodiment of the present invention.
[0051] The embodiments of the present invention have the following beneficial effects:
[0052] This invention provides a method, apparatus, and terminal device for sorting power grid operation tickets. The method includes: acquiring a power grid topology feature matrix and an operation step feature matrix of the operation tickets to be sorted; then inputting the power grid topology feature matrix and the operation step feature matrix into a preset sorting model, so that the preset sorting model calculates the confidence level of each operation ticket to be sorted based on the power grid topology feature matrix and the operation step feature matrix; finally, repeating the sorting operation on the operation tickets to be sorted based on the confidence level and the power grid topology feature matrix until the current step sequence contains all the operation tickets to be sorted, taking the current step sequence as the sorting result, and scheduling the power grid according to the sorting result. Therefore, the entire sorting process of operation tickets in this invention does not require manual sorting; it only requires inputting the constructed power grid topology feature matrix and the operation step feature matrix into a trained preset sorting model to obtain the sorting result, thus greatly reducing the problem of high sorting error rate caused by manual sorting. Attached Figure Description
[0053] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0054] Figure 1 This is a flowchart illustrating a power grid operation ticket order sorting method according to an embodiment of the present invention.
[0055] Figure 2 Figure 1 is a structural schematic diagram of a power grid operation order sequencing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the scope of protection of the present application.
[0057] 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 the present application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application; the terms "include" and "have" and any variations thereof used in the specification and the claims and the above description of drawings are intended to cover the process of inclusion without limitation of exclusivity.
[0058] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise explicitly and specifically limited.
[0059] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, or necessarily alternatives to other embodiments. It will be explicitly and implicitly appreciated by those of ordinary skill in the art that the embodiments described herein can be combined with other embodiments.
[0060] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in the present application generally represents an "or" relationship between the associated objects.
[0061] In the description of the embodiments of the present application, the term "multiple" refers to two or more (including two), and similarly, "multiple groups" refers to two or more groups (including two groups), and "multiple pieces" refers to two or more pieces (including two pieces).
[0062] In the description of the embodiments of the present application, unless otherwise explicitly specified and limited, the technical terms "mounting", "connection", "connecting", "fixing" and the like should be understood in a broad sense, for example, can be fixedly connected, or can be detachably connected, or can be integrated; can be mechanically connected, or can be electrically connected; can be directly connected, or can be indirectly connected through an intermediate medium, or can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0063] Referring to Figure 1 To solve the problem that the existing technology relies on manual experience for sorting, it is difficult to meet the efficient and accurate scheduling requirements, and is prone to cause high sorting error rate. An embodiment of the present application provides a power grid operation order sorting method, comprising:
[0064] Step S101: obtaining a power grid topology feature matrix of a power grid, and an operation step feature matrix of a to-be-sorted operation order;
[0065] Specifically, the power grid topology feature matrix is a matrix obtained by converting the attributes (type, state, etc.) of the power grid equipment into vectors using a node embedding algorithm after representing the power grid in a graph structure, and is used to depict the static structure attributes of the power grid.
[0066] In a preferred embodiment, the obtaining of the power grid topology feature matrix of the power grid and the operation step feature matrix of the to-be-sorted operation order comprises:
[0067] The power grid topology feature matrix is constructed by taking the power grid equipment as nodes and the connection relationship between the power grid equipment as edges;
[0068] Specifically, the power grid topology feature matrix is obtained by taking the power grid equipment as nodes and the connection relationship as edges, and converting the attributes (type, state, etc.) of the equipment into vectors using a node embedding algorithm. Illustratively, assuming that the power grid contains n power grid equipment, the power grid topology feature matrix is:
[0069]
[0070] In the formula, G represents the power grid topology feature matrix, g1, g2,..., g n represent the feature vectors of the power grid equipment, d1 represents the feature vector dimension of the power grid topology feature matrix, represent the feature matrix shape of the power grid topology feature matrix.
[0071] The text corresponding to the to-be-sorted operation order is subjected to word segmentation embedding processing to obtain the operation step feature matrix.
[0072] Specifically, the text is segmented and embedded, assuming that there are m steps, and the feature vector of the jth step is The operation step feature matrix is:
[0073]
[0074] In the formula, S represents the operation step feature matrix, s1, s2,..., s m represent the feature vectors of each step, d2 represents the feature vector dimension of the operation step feature matrix, represent the feature matrix shape of the operation step feature matrix.
[0075] In this preferred embodiment, by encoding the text of the power grid structure and the operation order to be sorted, the power grid topology feature matrix and the operation step feature matrix are obtained.
[0076] Step S102: input the power grid topology feature matrix and the operation step feature matrix into a preset sorting model, so that the preset sorting model calculates the confidence of each operation order to be sorted according to the power grid topology feature matrix and the operation step feature matrix;
[0077] Specifically, the preset sorting model is a Q network, which realizes step decision by constructing a topology and operation feature fusion Q network, and the confidence is the Q value.
[0078] In a preferred embodiment, the preset sorting model calculates the confidence of each operation order to be sorted according to the power grid topology feature matrix and the operation step feature matrix, including:
[0079] The graph convolution network in the preset sorting model performs convolution processing on the power grid topology feature matrix to extract the power grid topology global feature;
[0080] Specifically, a 3-layer graph convolution network is used to process the power grid topology feature matrix, and the global feature is extracted through the graph convolution layer:
[0081]
[0082] In the formula, F G represents the power grid topology global feature, GCN represents the graph convolution network, W1 represents the weight of the first layer graph convolution layer, W2 represents the weight of the second layer graph convolution layer, W3 represents the weight of the third layer graph convolution layer, d G represents the feature matrix dimension of the power grid topology global feature, and Conv represents the convolution operation.
[0083] The multi-layer perceptron in the preset sorting model extracts features from the operation step feature matrix to obtain the operation step global feature;
[0084] Specifically, a 2-layer MLP (Multilayer Perceptron) is used to process the operation step feature matrix, and a ReLU activation function is used to extract global features:
[0085]
[0086] In the formula, F S represents the global feature of the operation step, MLP represents the Multilayer Perceptron, W5 represents the weight of the first layer MLP, W4 represents the weight of the second layer MLP, ReLU represents the activation function, d S represents the feature dimension of the global feature of the operation step.
[0087] The power grid topology global feature and the operation step global feature are spliced to obtain a fusion feature matrix, and the confidence is obtained according to the fusion feature matrix.
[0088] Specifically, the power grid topology global feature and the operation step global feature are spliced, and a Q value vector of the action space dimension is output through a 1-layer MLP. The Q value vector contains each Q value, and each Q value corresponds to an action in the action space dimension:
[0089]
[0090] In the formula, Q represents the Q value vector, MLP out represents the MLP output, A represents the action space size, represents the matrix shape of the Q value vector.
[0091] In this preferred embodiment, the confidence of each operation order to be sorted is obtained by global feature extraction and feature fusion on the power grid topology feature matrix and the operation step feature matrix.
[0092] In another preferred embodiment, the training of the preset sorting model comprises:
[0093] Obtain the historical topology feature matrix of the power grid and the historical step feature matrix of the historical operation order to be sorted;
[0094] The historical topology feature matrix and the historical step feature matrix are input into the sorting model to be trained for iterative training until the loss function converges, and the preset sorting model is generated;
[0095] In each iteration of training, the confidence level of the current sample and the target confidence level of the current sample are calculated based on the current historical topology feature matrix and the historical step feature matrix. The current loss function is calculated based on the current sample confidence level and the target confidence level of the current sample, and it is determined whether the current loss function has converged. If it has converged, the current ranking model is used as the above-mentioned preset ranking model. Otherwise, the model parameters in the current ranking model are adjusted and training continues.
[0096] Specifically, training samples are first generated using the ranking model to be trained: First, the state s0 = (G1, S1, mask0) is initialized, where mask marks unselected steps, "mask0" represents the unselected steps in the initial state, "G1" represents the historical topological feature matrix, and "S1" represents the historical step feature matrix; then, at step t, based on Q(s_t) from s_t (i.e., the state at step t), training samples are generated... t (The confidence level of the sample corresponding to step t) Select action a t (Index of the step selected in step t); Finally, the judging system combines the power grid topology and the selected steps to evaluate a. t Scoring t (The security score corresponding to step t) yields several samples for iterative training:
[0097] If r t >-20: Mark the step as "selected" and update the mask. t+1 This step is disabled; the sample (s) is saved. t ,a t ,r t ,s t+1 );
[0098] If r t ≤-20: Mark the step as "selected but invalid", and backtrack to step s. t Select again, and record the trajectory of the sample back.
[0099] Specifically, after executing the current action, the current operating status of the power grid is determined based on the current topology feature matrix, and a score is assigned based on this status. For illustration, the initial score is set to 100 points. If executing the current action causes two or more main devices in the power grid to lose power, the corresponding penalty value is 900 (i.e., 900 points are deducted from the initial 100 points); if executing the current action causes a passive network to lose power, the corresponding penalty value is 1200; if executing the current action causes a main device that should have been operating to lose power, the corresponding penalty value is 300; if executing the current action additionally causes two or more busbars of the same 220kV substation to lose power, the corresponding penalty value is 180. If the final safety score is not greater than -20, it indicates that this step is invalid.
[0100] Specifically, the current sample confidence (current sample Q value) corresponding to the sample and the current sample target Q value (current sample target confidence) are calculated subsequently:
[0101]
[0102] In the formula, y represents the current sample Q value corresponding to the selected action a, and y represents the current sample target Q value corresponding to the selected action a. t r represents the sample target Q value corresponding to the t-th step, and r represents the safety score corresponding to the t-th step. t γ represents a discount factor, and the value is 0.9. Q'(s t+1 a') represents the sample Q value corresponding to the selected action a' in the next step.
[0103] Specifically, the mean square error is taken as the loss function, and the following formula is used for calculation:
[0104]
[0105] In the formula, L represents the value of the loss function, B represents the number of samples, r represents the sample target Q value corresponding to the i-th sample, y represents the sample Q value corresponding to the i-th sample at the t-th step.
[0106] Specifically, when performing iterative training, an Asam optimizer can be used for iterative training, the learning rate is 1e-4, and the training is performed until the value L of the loss function is less than 1e-3.
[0107] In this preferred embodiment, the ranking model is iteratively trained by using the historical topology feature matrix and the historical step feature matrix of the power grid, and a trained preset ranking model is obtained.
[0108] Step S103: According to the above confidence and the power grid topology feature matrix, the above to-be-sequenced operation order is repeatedly sequenced until the current step sequence contains all the above to-be-sequenced operation orders, the current step sequence is taken as the operation order sequencing result, and the power grid is dispatched according to the operation order sequencing result.
[0109] The above sequencing operation is:
[0110] The current step sequence is obtained; wherein the initial step sequence is empty;
[0111] According to the current step sequence, the current to-be-sequenced operation order which has not been sequenced and the corresponding current confidence are determined.
[0112] Specifically, according to the current step sequence, it can be determined that the to-be-sequenced operation order is still not sequenced, and further, the confidence of the to-be-sequenced operation order which is not sequenced can be determined.
[0113] According to the power grid topology feature matrix, the safety score of each unsequenced current to-be-sequenced operation order is calculated, and the unsequenced current to-be-sequenced operation order corresponding to the current safety score greater than the preset score threshold is taken as the current candidate order.
[0114] Specifically, the preset score threshold is set to -20.
[0115] The current candidate order corresponding to the maximum current confidence is taken as the current selected operation order, and the current selected operation order is added to the current step sequence to obtain an updated step sequence.
[0116] Specifically, after the current selected operation order is determined, the current selected operation order is arranged in the current step sequence according to the adding order to obtain an updated step sequence.
[0117] Specifically, taking the sequencing process of the line outage operation order of the 110kV substation as an example, the corresponding to-be-sequenced operation order includes a total of 8 steps, such as "open the circuit breaker 101", "open the disconnector 101-1", etc. According to the topology structure of the substation and the text corresponding to the line outage operation order, a power grid topology feature matrix and an operation step feature matrix are constructed.
[0118] Then, the two matrices are input into a preset sequencing model, the preset sequencing model first outputs the "open the circuit breaker 101" step, the score is 80, which is greater than -20, and is marked as selected; the second step outputs the "open the disconnector 101-1" step, the score is 75, which is greater than -20, and the sequencing continues; the iteration is continued until the 8th step to complete the sequencing process, and the sequencing result conforming to the rule of "opening the circuit breaker first and then opening the disconnector" is generated, which takes 0.8 seconds (5 minutes for traditional manual operation), greatly improving the sequencing efficiency and the sequencing accuracy.
[0119] On the basis of the above method embodiment, the application provides a device embodiment.
[0120] As shown in Figure 2 An embodiment of the application provides a power grid operation order sequencing device, which comprises:
[0121] a matrix construction module, a confidence calculation module and an order sequencing module;
[0122] The matrix construction module is used to acquire a power grid topology feature matrix of a power grid and an operation step feature matrix of a to-be-sequenced operation order.
[0123] The confidence calculation module is configured to input the power grid topology feature matrix and the operation step feature matrix into a preset ranking model, so that the preset ranking model calculates a confidence of each operation order to be ranked according to the power grid topology feature matrix and the operation step feature matrix.
[0124] The order ranking module is configured to repeatedly rank the operation order to be ranked according to the confidence and the power grid topology feature matrix until the current step sequence contains all the operation orders to be ranked, take the current step sequence as an operation order ranking result, and dispatch the power grid according to the operation order ranking result.
[0125] The ranking operation includes:
[0126] obtain a current step sequence; the step sequence is empty initially; determine a current operation order to be ranked and a corresponding current confidence according to the current step sequence; calculate a safety score of each current operation order to be ranked according to the power grid topology feature matrix, and take a current operation order to be ranked corresponding to a current safety score greater than a preset score threshold as a current candidate order; take a current candidate order corresponding to a maximum current confidence as a current selected operation order, and add the current selected operation order to the current step sequence to obtain an updated step sequence.
[0127] In a preferred embodiment, the matrix construction module includes:
[0128] a power grid topology feature matrix construction unit and an operation step feature matrix construction unit.
[0129] The power grid topology feature matrix construction unit is configured to take power grid devices of the power grid as nodes and connection relationships between the power grid devices as edges to construct the power grid topology feature matrix.
[0130] The operation step feature matrix construction unit is configured to perform word segmentation and embedding processing on a text corresponding to the operation order to be ranked to obtain the operation step feature matrix.
[0131] In another preferred embodiment, the confidence calculation module includes:
[0132] a power grid topology global feature extraction unit, an operation step global feature extraction unit, and a feature calculation unit.
[0133] The power grid topology global feature extraction unit is configured to perform convolution processing on the power grid topology feature matrix by a graph convolution network in the preset ranking model to extract power grid topology global features.
[0134] The global feature extraction unit of the above operation steps is used by the multilayer perceptron in the above preset sorting model to extract features from the feature matrix of the above operation steps to obtain the global features of the operation steps.
[0135] The aforementioned feature calculation unit is used to concatenate the aforementioned global features of the power grid topology and the global features of the operation steps to obtain a fused feature matrix, and to obtain the aforementioned confidence level based on the aforementioned fused feature matrix.
[0136] In another preferred embodiment, the confidence calculation module further includes:
[0137] Historical matrix acquisition unit and model training unit;
[0138] The aforementioned historical matrix acquisition unit is used to acquire the historical topology feature matrix of the power grid and the historical step feature matrix of historical unordered operation orders;
[0139] The aforementioned model training unit is used to input the aforementioned historical topology feature matrix and historical step feature matrix into the ranking model to be trained for iterative training until the loss function converges, thereby generating the aforementioned preset ranking model.
[0140] In each iteration of training, the confidence level of the current sample and the target confidence level of the current sample are calculated based on the current historical topology feature matrix and the historical step feature matrix. The current loss function is calculated based on the current sample confidence level and the target confidence level of the current sample, and it is determined whether the current loss function has converged. If it has converged, the current ranking model is used as the above-mentioned preset ranking model. Otherwise, the model parameters in the current ranking model are adjusted and training continues.
[0141] It should be noted that the device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; 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. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without creative effort. The above schematic diagram is merely an example of a power grid operation ticket order sorting device and does not constitute a limitation on a power grid operation ticket order sorting device. It may include more or fewer components than shown, or combine certain components, or use different components.
[0142] On the basis of the above method embodiment, the application provides a terminal device embodiment.
[0143] Another embodiment of the application provides a terminal device, which comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor executes the computer program to implement the power grid operation order sorting method of any one of the embodiments of the application.
[0144] For example, in this embodiment, the computer program can be divided into one or more modules, the one or more modules are stored in the memory and executed by the processor to complete the application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the device.
[0145] The terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and other computing devices. The device can include, but is not limited to, a processor and a memory.
[0146] The processor can be a central processing module (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the device, and is connected with various parts of the device through various interfaces and lines.
[0147] The memory can be used to store the computer program and / or the modules, and the processor can realize various functions of the device by running or executing the computer program and / or the modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required by a function, and the like; in addition, the memory can include a high-speed random access memory, and can also include a nonvolatile memory, for example, a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.
[0148] On the basis of the method embodiment, the application provides a storage medium embodiment.
[0149] Another embodiment of the application provides a storage medium, which includes a stored computer program, wherein the computer program controls a device where the storage medium is located to perform the power grid operation order sorting method according to any one of the embodiments of the application when the computer program is running.
[0150] In this embodiment, the storage medium is a computer-readable storage medium, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer-readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, a software distribution medium, and the like.
[0151] The above is the preferred embodiment of the application, and it should be noted that, for those skilled in the art, without departing from the principles of the application, a number of improvements and refinements can be made, and these improvements and refinements are also considered to be within the protection scope of the application.
Claims
1. A method for sorting power grid operation tickets, characterized in that, include: Obtain the power grid topology feature matrix and the operation step feature matrix of the operation tickets to be sorted; The power grid topology feature matrix and the operation step feature matrix are input into a preset sorting model so that the preset sorting model can calculate the confidence level of each operation ticket to be sorted based on the power grid topology feature matrix and the operation step feature matrix. Based on the confidence level and the power grid topology feature matrix, the operation tickets to be sorted are repeatedly sorted until the current step sequence contains all the operation tickets to be sorted. The current step sequence is then used as the operation ticket sorting result, and the power grid is dispatched according to the operation ticket sorting result. The sorting operation is as follows: Get the current step sequence; the initial step sequence is empty. Based on the current step sequence, determine the currently unsorted operation tickets and their corresponding current confidence levels; Based on the power grid topology feature matrix, calculate the security score of each unsorted current pending operation order, and take the unsorted current pending operation orders corresponding to the current security scores that are greater than the preset score threshold as the current pending operation orders. The current pending vote corresponding to the highest current confidence level is taken as the currently selected operation vote, and the currently selected operation vote is added to the current step sequence to obtain the updated step sequence.
2. The power grid operation ticket order sorting method according to claim 1, characterized in that, The acquisition of the power grid topology feature matrix and the operation step feature matrix of the operation tickets to be sorted includes: Using the power grid equipment as nodes and the connection relationships between the power grid equipment as edges, the topology feature matrix of the power grid is constructed. The text corresponding to the operation ticket to be sorted is segmented and embedded to obtain the feature matrix of the operation steps.
3. The power grid operation ticket order sorting method according to claim 2, characterized in that, The preset sorting model calculates the confidence level of each operation ticket to be sorted based on the power grid topology feature matrix and the operation step feature matrix, including: The graph convolutional network in the preset sorting model performs convolution processing on the power grid topology feature matrix to extract global features of the power grid topology. The multilayer perceptron in the preset sorting model extracts features from the feature matrix of the operation steps to obtain global features of the operation steps. The global features of the power grid topology and the global features of the operation steps are concatenated to obtain a fused feature matrix, and the confidence level is obtained based on the fused feature matrix.
4. The power grid operation ticket order sorting method according to claim 3, characterized in that, The training of the preset ranking model includes: Obtain the historical topology feature matrix of the power grid, and the historical step feature matrix of the historical unordered operation tickets; The historical topological feature matrix and the historical step feature matrix are input into the ranking model to be trained for iterative training until the loss function converges, thereby generating the preset ranking model. In each iteration of training, the confidence level of the current sample and the target confidence level of the current sample are calculated based on the current historical topology feature matrix and the historical step feature matrix. The current loss function is calculated based on the current sample confidence level and the target confidence level of the current sample, and it is determined whether the current loss function has converged. If it has converged, the current ranking model is used as the preset ranking model. Otherwise, the model parameters in the current ranking model are adjusted, and training continues.
5. A power grid operation ticket order sorting device, characterized in that, include: Matrix construction module, confidence calculation module, and vote sorting module; The matrix construction module is used to obtain the power grid topology feature matrix of the power grid and the operation step feature matrix of the operation tickets to be sorted. The confidence calculation module is used to input the power grid topology feature matrix and the operation step feature matrix into a preset sorting model, so that the preset sorting model can calculate the confidence of each operation order to be sorted based on the power grid topology feature matrix and the operation step feature matrix. The ticket order sorting module is used to repeatedly sort the operation tickets to be sorted according to the confidence level and the power grid topology feature matrix until the current step sequence contains all the operation tickets to be sorted, and take the current step sequence as the operation ticket order sorting result, and dispatch the power grid according to the operation ticket order sorting result. The sorting operation is as follows: Obtain the current step sequence; initially, the step sequence is empty; based on the current step sequence, determine the unsorted current pending operation orders and their corresponding current confidence levels; based on the power grid topology feature matrix, calculate the security score of each unsorted current pending operation order, and take the unsorted current pending operation orders corresponding to the current security scores that are greater than a preset score threshold as the current pending operation orders; take the current pending operation order corresponding to the highest current confidence level as the currently selected operation order, and add the currently selected operation order to the current step sequence to obtain the updated step sequence.
6. The power grid operation ticket order sorting device according to claim 5, characterized in that, The matrix construction module includes: Power grid topology feature matrix construction unit and operation step feature matrix construction unit; The power grid topology feature matrix construction unit is used to construct the power grid topology feature matrix by using the power grid equipment as nodes and the connection relationship between the power grid equipment as edges. The operation step feature matrix construction unit is used to perform word segmentation and embedding processing on the text corresponding to the operation ticket to be sorted, so as to obtain the operation step feature matrix.
7. A power grid operation ticket order sorting device according to claim 6, characterized in that, The confidence calculation module includes: The system comprises a global feature extraction unit for power grid topology, a global feature extraction unit for operation steps, and a feature calculation unit. The power grid topology global feature extraction unit is used to perform convolution processing on the power grid topology feature matrix by the graph convolutional network in the preset sorting model to extract the power grid topology global features. The global feature extraction unit for the operation steps is used by the multilayer perceptron in the preset sorting model to extract features from the feature matrix of the operation steps to obtain global features of the operation steps. The feature calculation unit is used to concatenate the global features of the power grid topology and the global features of the operation steps to obtain a fused feature matrix, and to obtain the confidence level based on the fused feature matrix.
8. A power grid operation ticket order sorting device according to claim 7, characterized in that, The confidence calculation module further includes: Historical matrix acquisition unit and model training unit; The historical matrix acquisition unit is used to acquire the historical topology feature matrix of the power grid and the historical step feature matrix of historical unordered operation orders. The model training unit is used to input the historical topological feature matrix and the historical step feature matrix into the ranking model to be trained for iterative training until the loss function converges, thereby generating the preset ranking model. In each iteration of training, the confidence level of the current sample and the target confidence level of the current sample are calculated based on the current historical topology feature matrix and the historical step feature matrix. The current loss function is calculated based on the current sample confidence level and the target confidence level of the current sample, and it is determined whether the current loss function has converged. If it has converged, the current ranking model is used as the preset ranking model. Otherwise, the model parameters in the current ranking model are adjusted, and training continues.
9. A terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements a power grid operation ticket order sorting method as described in any one of claims 1 to 4.
10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform a power grid operation ticket order sorting method as described in any one of claims 1 to 4.