Operation prediction method for graph network and operation prediction model training method
By mapping the operation set of the initial graph network to the sample operation set and generating coding vectors, using the operation prediction model to process the graph network, the decision failure problem of the static model in a dynamic environment is solved, and efficient and flexible graph network data processing is achieved.
Patent Information
- Application Number
- CN202510192153.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-02-21
AI Technical Summary
When processing graph network data, the static prediction model cannot be updated in time when facing the dynamically changing graph network structure, resulting in decision failure or accuracy reduction, and high computational complexity and resource consumption.
By obtaining the operation set of the initial graph network, mapping it to the sample operation set, obtaining the encoded vector of the target graph elements, and processing it using the operation prediction model, ensuring that the model can still output effective operations when the topological structure changes, improving the scalability and flexibility of the model.
It improves the efficiency and effectiveness of graph network data processing, avoids the time and resource cost of retraining the model, and enhances the adaptability and accuracy of the model in a dynamic environment.
Smart Images

Figure CN119692424B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer science and technology, and in particular to an operation prediction method for a graph network and an operation prediction model training method. Background Art
[0002] With the development of science and technology, the application of intelligent decision-making technology using graph networks in the optimization of complex networks such as power, communication and transportation is becoming increasingly widespread.
[0003] Currently, traditional graph theory and operations research optimization methods for processing graph network data often encounter problems such as complex mathematical model establishment and low scalability. Furthermore, these methods significantly increase computational complexity and time consumption when dealing with larger-scale problems, resulting in inefficient data processing. To address these issues, static prediction models can be constructed to process graph network data.
[0004] However, the aforementioned static prediction model approach performs poorly when faced with dynamically changing graph network structures. When new nodes appear or connections change in the graph network, the static prediction model often fails to update its processing strategy in a timely manner, making it unable to operate on the newly modified graph network. This in turn leads to ineffective decisions or decreased accuracy. Therefore, a more flexible and adaptable graph network operation prediction method is urgently needed. Summary of the Invention
[0005] In view of this, embodiments of this specification provide an operation prediction method for a graph network. One or more embodiments of this specification also relate to an operation prediction model training method, an operation prediction method for a power graph network, another operation prediction model training method, an operation prediction device for a graph network, an operation prediction device for a power graph network, a computing device, a computer-readable storage medium, and a computer program to address technical deficiencies in the prior art.
[0006] One embodiment of this specification provides an operation prediction method for a graph network, including:
[0007] Obtaining an initial graph network and determining an initial operation set corresponding to the initial graph network, wherein the initial operation set includes operable graph elements in the initial graph network;
[0008] Mapping the initial operation set to the sample operation set to obtain the encoding vector corresponding to the target graph element, wherein the sample operation set is constructed based on the operable graph elements in the sample graph network;
[0009] The initial graph network and the encoding vector are input into the operation prediction model to obtain the target operation for the initial graph network, wherein the operation prediction model is trained based on the sample graph network.
[0010] By mapping the initial operation set to the sample operation set constructed based on the sample graph network, obtaining the encoding vector corresponding to the target graph element, and obtaining the target operation based on this, the operation prediction model can still output valid target operations when the topology of the graph network changes, thereby improving the scalability and flexibility of the operation prediction model, avoiding the additional time cost and resources consumed by retraining the corresponding operation prediction model for the graph network with a changed topology, and thus improving the efficiency and effectiveness of graph network data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 This is a flowchart of an operation prediction method for a graph network provided by one embodiment of this specification;
[0012] Figure 2 This is a schematic diagram of a graph network structure provided by an embodiment of this specification;
[0013] Figure 3 This is a schematic diagram of a sample operation set to an internal coding vector of an operation prediction model provided by one embodiment of this specification;
[0014] Figure 4 This is a schematic diagram of determining an encoding vector of a target graph element based on an initial operation set and a sample operation set, provided by one embodiment of this specification;
[0015] Figure 5 This is a schematic diagram of a method for recording predicted operations during operation prediction model training provided by one embodiment of this specification;
[0016] Figure 6 This is a schematic diagram of a method for determining a target operation for a power network to be optimized, provided by one embodiment of this specification;
[0017] Figure 7 This is a flowchart of an operation prediction model training method provided by one embodiment of this specification;
[0018] Figure 8 This is a flowchart of an operation prediction method for a power graph network provided by one embodiment of this specification;
[0019] Figure 9 This is a flowchart of an operation prediction model training method provided by one embodiment of this specification;
[0020] Figure 10This is a schematic diagram of an operation prediction model training and operation prediction model prediction method provided by one embodiment of this specification;
[0021] Figure 11 This is a flowchart of a processing process of an operation prediction method for a graph network provided by one embodiment of this specification;
[0022] Figure 12 This is a schematic diagram of the structure of an operation prediction device for a graph network provided by one embodiment of this specification;
[0023] Figure 13 This is a schematic diagram of the structure of an operation prediction model training device provided by one embodiment of this specification;
[0024] Figure 14 This is a schematic diagram of the structure of an operation prediction device for a power graph network provided by an embodiment of this specification;
[0025] Figure 15 This is a schematic diagram of the structure of an operation prediction model training device provided by one embodiment of this specification;
[0026] Figure 16 This is a structural block diagram of a computing device provided by one embodiment of this specification. DETAILED DESCRIPTION
[0027] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0028] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0029] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0030] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0031] First, the terms involved in one or more embodiments of this specification are explained.
[0032] Tree network topology: Evolved from bus topology, the tree network topology resembles an inverted tree, with a root at the top and branches below it, each of which can have sub-branches. It is an extension of the bus structure, adding branches to the bus. The transmission medium can have multiple branches, but they do not form a closed loop. A tree network is a hierarchical network with a symmetrical structure, fixed connections, and a certain degree of fault tolerance.
[0033] Reinforcement learning: also known as incentive learning, evaluation learning or enhanced learning, is a paradigm and methodology of machine learning that is used to describe and solve the problem of how an agent can maximize rewards or achieve specific goals by learning strategies during its interaction with the environment.
[0034] Deep reinforcement learning: A technology that combines deep learning and reinforcement learning. It enables decision-making and control based directly on input data, making it an AI approach closer to human thinking. By combining the perception capabilities of deep learning with the decision-making capabilities of reinforcement learning, deep reinforcement learning addresses the challenges of traditional reinforcement learning with high-dimensional data input, enabling intelligent agents to make reasonable decisions based on multi-dimensional input data.
[0035] Tree network decision scenario: Adjust complex network structures (including subnet rings or meshes) to a tree structure to ensure network efficiency and stability.
[0036] Main and distribution network decision-making scenarios involve the coordination and optimization of the main grid (transmission grid) and distribution grid (distribution grid) in the power system. The goal of this process is to ensure the safe, stable, and efficient operation of the power system while meeting the electricity needs of users.
[0037] Depth-First Search: Depth-First Search (DFS) is an algorithm for traversing or searching a tree or graph by exploring each branch as deeply as possible.
[0038] Breadth-First Search: Breadth-First Search (BFS) is an algorithm used to traverse or search a tree or graph, exploring nodes layer by layer from near to far.
[0039] Union-Find algorithm: Union-Find algorithm is a data structure and related algorithms that supports efficient set merging (union) and finding (find) operations, and is often used to manage and connect disjoint sets or subgraphs.
[0040] The embodiments of this specification provide an operation prediction method for a graph network. This specification also relates to an operation prediction model training method, an operation prediction method for a power graph network, another operation prediction model training method, an operation prediction device for a graph network, an operation prediction device for a power graph network, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
[0041] See also Figure 1 , Figure 1 A flowchart of an operation prediction method for a graph network provided according to an embodiment of this specification is shown, which specifically includes the following steps.
[0042] Step 102: Obtain an initial graph network and determine an initial operation set corresponding to the initial graph network, wherein the initial operation set includes operable graph elements in the initial graph network.
[0043] A graph network is a mathematical structure used to represent relationships or connections between objects. An object is a finite, non-empty set of vertices (also called nodes), and a relationship or connection is a set of edges that describe the connections between these vertices. Formally, a graph network G can be represented as G = (V, E), where V is the set of vertices and E is the set of edges.
[0044] See also Figure 2 , Figure 2 A schematic diagram of a graph network structure provided according to an embodiment of this specification is shown. Figure 2As shown: A to G are nodes in the graph network, and k1 to k10 are edges in the graph network.
[0045] Graph networks can be divided into directed graphs and undirected graphs based on their direction. In a directed graph, edges have a specified direction, indicating a relationship from one node to another; in an undirected graph, edges have no direction, meaning that two nodes can reach each other.
[0046] A graph network can be any network, including social networks, transportation networks, power grids, computer networks, and so on. A graph network consists of graph elements, which are the basic components of a graph network, primarily nodes and edges.
[0047] Nodes are basic entities in graph networks, representing specific objects or locations. For example, in a social network graph, a node can represent a user; in a transportation network graph, a node can represent a place (such as a school, a shopping mall, a city, etc.); in a power network graph, a node can represent a power station, a substation, a user terminal, etc.; in a computer network, a node can represent a router, a server, a switch, and other network devices.
[0048] An edge is a line segment connecting two nodes in a graph network, representing the relationship or connection between objects. For example, in a social network, an edge can represent a friendship between users. If two users are friends, then there is an edge connecting them. In a transportation network, an edge can represent a road segment, which can be directed (such as a one-way street) or undirected (such as a two-way street). An edge can also represent a public transportation route, such as a subway line or a bus line. In a power network, an edge can represent a transmission line or a distribution line. Edges in a power network are usually directed, flowing from power generation equipment (such as a power station) to the power consumption end (such as a user terminal). In a computer network, an edge can represent a physical connection (such as an optical fiber, cable, etc.) or a logical connection (such as a wireless connection, a network connection, etc.). Edges in a computer network are usually undirected, but can be directed when it comes to scenarios such as data transmission.
[0049] Graph elements in graph networks, namely edges and nodes, can have features such as weights, labels or attributes to describe the different meanings represented by these elements. For example, in a social network graph, edges can have weights, such as the frequency of interaction between users, the number of common friends, etc., and nodes can have attributes, such as the user's age and location, etc.; in a transportation network, edges can have weights to represent the distance and construction cost of the road, etc., and nodes can have attributes, such as the altitude and coordinate position of the location, etc.; in a power network, edges can have attributes, such as the transmission capacity and loss cost of the transmission line, and nodes can have attributes, such as the setting method and output power of the power equipment; in a computer network, edges can have weights, such as fiber bandwidth and latency, etc., and nodes can have labels, such as the IP address and protocol type of the device.
[0050] Operational graph elements refer to those graph elements in a graph network that can be added, removed, or changed during specific tasks or operations. Operational graph elements can include operationable nodes and operationable edges. For example, in a power network, an operationable node can be a newly built power station or electricity terminal, or an old distribution station that needs to be demolished, etc. Operational edges can be new transmission lines that need to be established, old transmission lines that need to be disconnected, or existing transmission lines that need to change their connection objects, etc. In a transportation network, an operationable node can be a transportation hub that needs to be closed, a new road intersection that needs to be opened, or a bus stop that needs to have its information updated, etc. Operational edges can be a new highway that needs to be built, an old bridge that needs to be demolished, or a mountain road that needs to be diverted, etc.
[0051] The operation set is the set of all possible operations that can be performed on all operable elements (i.e., nodes and edges) in a graph network. These operations do not have a specific purpose or expected result, but rather represent the range of changes that are technically possible to implement on the graph network. The initial graph network is the acquired graph network that needs to be processed, such as a power grid to be optimized or a transportation network to be scheduled. The initial operation set refers to the set of all operable graph elements in the initial graph network, and can also include the set of operations corresponding to all operable graph elements.
[0052] After obtaining the initial graph network, the initial graph network can be identified, all operable graph elements therein can be determined, and an initial operation set can be constructed based on all operable graph elements. For example, if the initial graph network is a traffic network to be scheduled, the operable elements therein are determined to be road segments 1 to 8 that can be built, demolished, or rerouted, and bus stops 1 to 6 that can be built, demolished, or relocated. Then, the initial operation set of the traffic network to be scheduled can be constructed based on road segments 1 to 8 and bus stops 1 to 6. If the initial graph network is a power network to be optimized, the operable elements therein are determined to be transmission lines 1 to 5 that can be built, demolished, or have their connection direction changed, and power equipment 1 to 3 that can be built, demolished, or relocated. Then, the initial operation set of the power network to be optimized can be constructed based on transmission lines 1 to 5 and power equipment 1 to 3.
[0053] For example, taking the power network to be optimized as an example, the power network to be optimized is obtained as the initial graph network, and the operation set corresponding to the power network to be optimized is determined. The operation set may include all power equipment and transmission lines that can be added, removed or changed in the power network to be optimized.
[0054] In this step, by analyzing the obtained initial graph network, all operable graph elements are identified, and an initial operation set containing these operable elements is constructed, which clarifies the feasible operation space range for the current state of the graph network, and provides the necessary data basis for the subsequent selection and execution of target operations on the initial graph network.
[0055] Step 104: Map the initial operation set to the sample operation set to obtain the encoding vector corresponding to the target graph element, wherein the sample operation set is constructed based on the operable graph elements in the sample graph network, and the target graph element is the graph element in the sample graph network corresponding to the graph element of the initial graph network.
[0056] The sample graph network is a comprehensive graph network that includes all graph elements of all training graph networks used to train the operation prediction model. The sample graph network can be understood as including the connection methods and structural changes of all graph elements used to train the operation prediction model, even if the graph elements are not in the same training graph network. Each training graph network is a subset of the sample graph network. For example, in the power network, multiple training graph networks can be various networks covering different power equipment and transmission lines, such as the peak power network of City A, the power network of the northern district of City A, and the night power supply network of City A, while the sample graph network is the total power network composed of all power equipment and transmission lines in City A.
[0057] The sample operation set is a collection of operations constructed based on all operable graph elements in the sample graph network. Since the sample graph network is the set of all trained graph networks, the sample operation set also includes all operations that have been or may be performed in any trained graph network, such as adding new nodes or edges, removing existing nodes or edges, and adjusting node or edge properties. The sample operation set provides the operation prediction model with a comprehensive operation library, reflecting all possible operations that the operation prediction model can predict and their impact on the graph network. Specifically, the operations in the sample operation set are reflected as encoding vectors within the operation prediction model during its training.
[0058] See also Figure 3 , Figure 3 FIG. 1 shows a schematic diagram of a sample operation set to an internal coding vector of an operation prediction model according to an embodiment of the present specification, as shown in FIG. Figure 3 As shown: There are operable graph elements with edges k1 to k12 in the sample operation set, which correspond to encoding vectors from 1 to 12 inside the operation prediction model.
[0059] The sample graph network is the complete set of training graph networks in the operation prediction model training process, that is, the operation prediction model predicts the corresponding operation based on the sample operation set corresponding to the sample graph network. The initial graph network is the graph network that currently needs to be processed using the operation prediction model. The initial graph network may include newly added graph elements that are not in the sample graph network. The initial graph network may also lack original graph elements that are already in the sample graph network. That is, the topological structure of the initial graph network may be different from the topological structure in the sample graph network, that is, the topological structure of the initial graph network has changed. Therefore, it is necessary to map the initial operation set of the initial graph network to the sample operation set of the sample graph network. Mapping refers to mapping the initial operation set of the initial graph network to the sample operation set. Specifically, it is the process of establishing a connection between the operable elements in the initial operation set and the operable elements in the sample operation set, that is, determining which operable graph element in the sample graph network corresponds to any operable graph element in the initial graph network.
[0060] See also Figure 4 , Figure 4 FIG. 1 shows a schematic diagram of determining an encoding vector of a target graph element based on an initial operation set and a sample operation set according to an embodiment of the present specification. Figure 4 As shown: the initial operation set includes operable graph elements such as k0 and k1, and the graph elements existing in the initial operation set are mapped to the sample operation set. For k13 and k14 that exist in the initial operation set but not in the sample operation set, no mapping is performed. For k2, k5, k9, and k11 that exist in the sample operation set but not in the initial operation set, the default graph elements in the sample operation set are retained in the sample operation set, and encoding vectors 1 to 12 are constructed inside the operation prediction model.
[0061] The target graph element is the graph element in the sample graph network that corresponds to the graph element in the initial graph network. Once the correspondence between the graph elements in the initial graph network and the graph elements in the sample graph network is determined, that is, the target graph element is determined, the encoding vector of the target graph element can be obtained based on the correspondence. The encoding vector is used by the operation prediction model to identify the graph element to be operated on.
[0062] For example, taking the power network to be optimized as an example, after obtaining the power network in the northern district of City A to be optimized, since a new power station X was built in the northern district of City A and connected to the original power network in the northern district of City A for power supply, it is necessary to optimize the power network in the northern district of City A. It is necessary to map the various power equipment and transmission lines in the currently obtained power network in the northern district of City A to be optimized with the total power network composed of all power-consuming equipment and transmission lines in City A, and use the power equipment and transmission lines existing in the original power network in the northern district of City A as target power equipment and transmission lines, and according to the corresponding relationship, encode the target power equipment and transmission lines to obtain a coding vector.
[0063] In this step, by mapping the initial operation set to the sample operation set and determining the encoding vector corresponding to the target graph element, a data basis is provided for the operation prediction model to perform operation prediction, so that the operation prediction model can still accurately identify and process graph elements when facing a changed initial graph network.
[0064] Step 106: Input the initial graph network and the encoding vector into the operation prediction model to obtain the target operation for the initial graph network, wherein the operation prediction model is trained based on the sample graph network.
[0065] The target operation is the operation output by the operation prediction model for the initial graph network. The target operation corresponds to the target graph element. Because the operation prediction model is trained based on the sample graph network, the operation set corresponding to the graph elements it can process is the sample operation set corresponding to the sample graph network. Therefore, the operation prediction model cannot output operations for graph elements that are not included in the sample operation set of the initial graph network. After obtaining the encoding vector of the target graph element, the encoding vector and the initial graph network can be input into the operation prediction model to obtain the target operation output by the operation prediction model.
[0066] The target operation is a series of operations on the operable graph elements in the initial graph network, including adding, removing or changing nodes or edges. The target operation is purposeful, and the initial graph network is operated through the target operation so that the initial graph network can achieve a certain performance or target state. For example, for the power network to be optimized, the target operation can be the power network optimization method, so that after the power network to be optimized is optimized by the power network optimization method, the power flow error of the transmission network is avoided and the transmission performance is improved; for the traffic network to be scheduled, the target operation can be the traffic network scheduling method, so that after the traffic network to be scheduled is scheduled by the traffic network scheduling method, traffic congestion is reduced and transportation capacity is improved.
[0067] For example, in the power grid to be optimized, in the northern district of City A, newly built power station X is connected to the existing power grid. After passing through multiple transmission lines, power flows back to power station X itself, creating a power transmission loop and causing power transmission issues that require optimization. The operation prediction model then outputs a target operation based on the power grid in the northern district of City A. The target operation is to disconnect certain transmission lines in the original power grid, breaking the loop and completing the optimization of the power grid in the northern district of City A.
[0068] In the embodiments of the present specification, an initial operation set is mapped to a sample operation set constructed based on a sample graph network, and a coding vector corresponding to a target graph element is obtained. Based on the initial graph network and the coding vector, an operation prediction model is used to obtain a target operation, so that the operation prediction model can still output a valid target operation when the topological structure of the graph network changes. This avoids the need to retrain the corresponding operation prediction model for a graph network with a changed topological structure, thereby improving the scalability and flexibility of the operation prediction model and thereby improving the efficiency and effectiveness of graph network data processing.
[0069] In an optional embodiment of the present specification, the initial operation set is mapped to the sample operation set to obtain a coding vector corresponding to the target graph element, including: performing graph element mapping based on identification information of the operable graph elements in the initial operation set and identification information of the operable graph elements in the sample operation set to determine the target graph element; encoding the target graph element to obtain a coding vector corresponding to the target graph element.
[0070] The identification information of an operable graph element is the identifier of the operable element in the operation set, indicating the uniqueness of any operable element within the operation set corresponding to the graph network in which it resides. That is, the identification information of the operable graph element in the initial operation set indicates the unique identifier of the graph element in the initial graph network within the initial operation set, and the identification information of the operable graph element in the sample operation set indicates the unique identifier of the graph element in the sample graph network within the sample operation set.
[0071] Mapping the initial operation set to the sample operation set means mapping the identification information corresponding to the graph elements in the initial operation set and the identification information in the sample operation set, and determining the same graph elements in the initial graph network and the sample graph network as target graph elements, and representing them with the same identification information.
[0072] After determining the target graph element, the target graph element can be encoded to obtain the encoding vector of the target graph element, so that the operation prediction model can process the graph element according to the encoding vector.
[0073] Optionally, the encoding vector may include features or attribute information of graph elements, such as node types and edge weights in the graph network. After determining the target graph element, the corresponding features or attribute information of the target graph element can be obtained, normalized, and then vectorized to complete the generation of the encoding vector. Vectorization can be achieved using simple concatenation and embedding methods or more complex neural network layers (such as autoencoders), and this embodiment of the present specification does not specifically limit this.
[0074] For example, taking the power network to be optimized as an example, the identification information of each power equipment and transmission line in the power network in the northern district of City A to be optimized is mapped with the identification information of each power equipment and transmission line in the total power network composed of all power-consuming equipment and transmission lines in City A to determine the target power equipment and target transmission line. Subsequently, encoding is performed according to the type of target power equipment (such as power station, distribution station, etc.) and the attributes of the target transmission line (such as high-voltage transmission line, low-voltage transmission line, etc.) to obtain the corresponding encoding vector for processing by the operation prediction model.
[0075] In the embodiments of this specification, by accurately mapping the identification information of the operable graph elements in the initial operation set with the identification information of the operable graph elements in the sample operation set, the consistent identification of the same graph elements in different graph networks is ensured, thereby determining the target graph elements, and encoding the characteristics or attribute information of the target graph elements, generating a coding vector that can be processed by the operation prediction model, thereby improving the accuracy and reliability of the graph element mapping, and by constructing a coding vector that includes the characteristics of the graph elements, enhancing the processing accuracy and efficiency of the operation prediction model, and ultimately achieving improved efficiency and effectiveness in processing complex graph network data.
[0076] In an optional embodiment of the present specification, before inputting the initial graph network and the encoding vector into the operation prediction model to obtain the target operation for the initial graph network, it also includes: obtaining a sample graph network; extracting any training graph network based on the sample graph network; inputting the training graph network into the initial operation prediction model to obtain the predicted operation for the training graph network; and training the operation prediction model based on the predicted operation.
[0077] As described in the preceding embodiments, the sample graph network is a comprehensive graph network that includes all graph elements in the training graph network used to train the operation prediction model. The sample graph network can be understood as including the connectivity and structural changes of all graph elements used to train the operation prediction model, even if these graph elements are not in the same training graph network.
[0078] The training graph network is a subset of the sample graph network. A subgraph or specific connection pattern within the sample graph network can be used as a training graph network to train the operation prediction model. For example, if the sample graph network is the overall traffic network of City A, then the sample graph network includes all road segments 1 to 720 and all locations 1 to 360 in City A. Then, bus route 1, which includes road segments 1 to 18 and locations 1 to 19, can be extracted as training graph network 1. Alternatively, the traffic network of City A's East District, which includes road segments 100 to 200 and locations 150 to 200, can be extracted as training graph network 2.
[0079] An initial action prediction model refers to an action prediction model that has not been fully trained. It can be a reinforcement learning model combined with a deep neural network. This type of model combines reinforcement learning (RL) algorithms with deep neural networks (DNNs) to handle complex decision-making problems. Different reinforcement learning algorithms can be selected based on the scale and complexity of different problems, such as Deep Q-Network (DQN), Deep Deterministic Policy Gradient (DDPG), and Proximal Policy Optimization (PPO). DQN is suitable for discrete action spaces, while DDPG and PPO are suitable for continuous and large-scale action spaces. Prediction operations are a set of operations performed on operational graph elements in the training graph network, such as adding, removing, or changing nodes or edges in the training graph network.
[0080] Using the initial operation prediction model, prediction operations are generated for each training graph network based on each training graph network. For example, using the above example, if the sample graph network is the overall traffic network of City A, and the bus route 1, consisting of road segments 1 to 18 and locations 1 to 19, is used as training graph network 1, the generated prediction operation, i.e., the traffic network scheduling method, is: cancel location 10 and road segment 11, and change road segment 10 from location 9 to location 10 instead of connecting from location 9 to location 11, thus reducing traffic congestion on bus route 1. For the traffic network of City A's East District, consisting of road segments 100 to 200 and locations 150 to 200, as training graph network 2, the generated prediction operation, i.e., the traffic network scheduling method, is: close road segments 115 to 120, eliminating loops in the traffic network of City A's East District, avoiding congestion caused by traffic conflicts and improving transportation capacity.
[0081] After obtaining the predicted operation, the prediction operation model can be trained based on the predicted operation. Specifically, there are multiple methods for training the prediction operation model. One optional method is to obtain standard operations as labels and use supervised learning to complete the training of the operation prediction model by minimizing the loss value between the predicted operation and the standard operation. Another optional method is to use self-supervised learning to distinguish the effectiveness of the output predicted operation through comparative learning without explicit labels, thereby completing the training of the operation prediction model. Yet another optional method is to use reinforcement learning to evaluate the training graph network processed by the predicted operation and return corresponding adjustment information (such as reward or penalty values returned by an internal or external reward system) to the operation prediction model based on the evaluation results. The parameters of the operation prediction model are adjusted to complete the training of the operation prediction model. The specific training method used to train the prediction operation model can be determined based on the actual graph network properties or the problem to be solved, and the embodiments of this specification do not specifically limit this.
[0082] In practical applications, the sample graph network can be a power network, such as the total power network composed of all electrical equipment and transmission lines in City A. Correspondingly, the training graph network can be the peak power network of City A, the power network of the northern district of City A, the night power supply network of City A, etc.; the sample graph network can be a traffic graph network, such as the total traffic network composed of all traffic locations and roads in City A. Correspondingly, the training graph network can be the bus network of City A, the highway network of City A, the bicycle riding network of City A, etc.
[0083] In the embodiments of this specification, through a systematic training process, the initial operation prediction model is trained using multiple training graph networks included in the sample graph network to obtain predicted operations, and the operation prediction model is trained based on the predicted operations, thereby improving the accuracy and adaptability of the operation prediction model when processing complex and dynamically changing graph networks, enhancing the generalization ability of the model, and enabling the operation prediction model to still output effective operation suggestions when facing changing and unseen graph network structures.
[0084] In an optional embodiment of the present specification, an operation prediction model is trained based on a predicted operation, including: obtaining a prediction graph network for performing operations on the training graph network based on the predicted operation; determining first evaluation information of the operation prediction model based on the prediction graph network; and adjusting model parameters of the operation prediction model based on the first evaluation information.
[0085] The prediction graph network is a new graph network generated after any training graph network is operated by the prediction operation output by the operation prediction model for the training graph network. The prediction graph network reflects the state of the graph network after the operation that the operation prediction model of the current training state believes should be taken is processed. The first evaluation information refers to the information obtained by evaluating the operation prediction model based on the prediction graph network. The first evaluation information may include but is not limited to the feasibility, effectiveness, optimization ability or other measurement criteria of the prediction operation output by the operation prediction model. The model parameters of the operation prediction model refer to a series of variables or weights used to make decisions within the operation prediction model. The model parameters determine how the operation prediction model obtains the output prediction operation from the input graph network data. For the operation prediction model in the training process, the model parameters are the part that needs to be continuously optimized during the model learning process so that the operation prediction model can better fit the data and make accurate predictions.
[0086] After determining the first evaluation information, the model parameters of the operation prediction model can be updated according to a certain adjustment algorithm (such as a spiral gradient algorithm, etc.) according to a set standard (such as minimizing the loss function, maximizing the reward value, etc.).
[0087] In practical applications, the first evaluation information of the operation prediction model can be determined based on the network performance of the prediction graph network. For example, for a power network, whether the prediction operation is effective in optimizing the power network can be determined based on the transmission performance of the power network to be optimized after the prediction operation compared to the transmission performance of the power network to be optimized before the prediction operation. If the transmission performance of the power network to be optimized after the prediction operation improves, corresponding valid first evaluation information is generated, and the model parameters of the operation prediction model are adjusted based on the first evaluation information.
[0088] In the embodiments of this specification, by generating a prediction graph network based on the predicted operation, determining first evaluation information according to the evaluation results of the prediction graph network, and then optimizing the model parameters of the operation prediction model according to the first evaluation information, effective training and performance improvement of the operation prediction model are achieved, ensuring that the predicted operation output by the operation prediction model is feasible and effective in practical applications, thereby significantly improving the accuracy and generalization ability of the operation prediction model.
[0089] In an optional embodiment of the present specification, first evaluation information of the operation prediction model is determined based on the prediction graph network, including: identifying whether the prediction graph network conforms to a tree structure; if so, calling a preset evaluation function to evaluate the graph network indicators of the prediction graph network, and determining the first evaluation information of the operation prediction model based on the graph network indicators.
[0090] A tree structure is a special type of acyclic connected graph. Specifically, there are no closed paths in a tree-structured graph network. There is only one path connecting any two nodes. A tree-structured graph network usually has a root node without a parent node, and other nodes can be branch nodes (with child nodes) or leaf nodes (without child nodes).
[0091] Determining whether a graph network has a tree structure can be done in the following ways: First, determine whether all nodes in the graph network are connected by edges, that is, whether there are no isolated nodes or subgraphs. Specifically, breadth-first search (BFS) and depth-first search (DFS) can be used to determine this. Second, determine whether there are loops in the graph network, that is, whether there is one and only one path connecting any two nodes, and no parallel paths. Specifically, the entire graph network can be traversed using BFS or DFS. If previously visited nodes are found during the traversal, it indicates that there is a loop in the graph network. A union-find algorithm can also be used to detect loops. A preset evaluation function is a set of mathematical formulas or logical rules used to measure the performance of a predicted graph network. The preset evaluation function can evaluate various metrics of the graph network and output a score or evaluation result. Preset evaluation functions can be of various types, depending on the actual graph network properties or the problem to be solved, and can measure the characteristics of the predicted graph network from different perspectives. For example, a prediction evaluation function can be a loss function, an indicator function, a multi-objective optimization function, a reward function, etc., but this embodiment of the present specification does not specifically limit this. Graph network metrics are a set of quantitative standards used to describe and measure graph network performance. There are many different types of graph network metrics, reflecting different performance indicators of graph networks from different perspectives. For example, graph network metrics can include connectivity, stability, cost, weight, etc.
[0092] Based on the evaluation results of the graph network indicators of the prediction graph network, that is, the graph network performance of the prediction graph network, the feasibility, effectiveness, optimization ability, etc. of the operation prediction model to generate prediction operations for the training graph network can be determined, and then the first evaluation information of the prediction operation model can be determined.
[0093] When it is determined that the predicted graph network conforms to a tree structure, a preset evaluation function is called to evaluate the graph network indicators of the predicted graph network, and corresponding first evaluation information is determined based on the graph network indicators. For example, for the traffic network in the eastern district of City A, which includes road segment 100 to road segment 200 and location 150 to location 200, as training graph network 2, the prediction operation generated by the operation prediction model, namely, the traffic network scheduling method, is: closing road segment 115 to road segment 120. This traffic network scheduling method eliminates loops in the traffic network in the eastern district of City A, making the traffic network in the eastern district of City A conform to a tree structure and avoiding congestion caused by traffic conflicts. At the same time, the traffic network indicators of the traffic network in the eastern district of City A after scheduling are evaluated using the preset evaluation function, and the traffic graph network indicators of the traffic network in the eastern district of City A are obtained, namely, transportation capacity is increased by 25%, road maintenance costs are reduced by 15%, etc. Based on the traffic graph network indicators, the first evaluation information generated by the operation prediction model for the traffic network in the eastern district of City A is determined to be valid.
[0094] Optionally, when it is identified that the prediction graph network does not conform to the tree structure, the prediction graph network and the corresponding prediction operation are discarded, and prediction failure information is returned to the operation prediction model. The parameters of the operation prediction model are adjusted based on the prediction failure information, so that the operation prediction model avoids outputting prediction operations that make the prediction graph network not conform to the tree structure.
[0095] For example, taking the power network to be optimized as an example, if the predicted power network after the prediction operation of the model is a tree structure, the reward function as the preset evaluation function is called to evaluate the power network index of the predicted power network. The power network index can be the transmission loss value. If the transmission loss value of the predicted power network is smaller than the initial power network (i.e., the power network to be optimized), it means that the prediction operation is valid, and then it is judged that the output of the operation prediction model is valid. The reward function outputs the reward value to the operation prediction model based on the first evaluation information to adjust the model parameters of the operation prediction model, so that the subsequent output prediction operation of the operation prediction model is improved in the direction of higher effectiveness. The specific reward value can be determined according to the degree of reduction of the transmission loss value.
[0096] In the embodiments of this specification, by first performing tree structure verification and then combining the preset evaluation function to determine the first evaluation information of the model, it is ensured that the prediction graph network generated by the operation prediction model meets the tree structure requirements while achieving performance optimization, thereby improving the feasibility and effectiveness of the operations output by the operation prediction model, and iteratively optimizing the model parameters through the feedback mechanism, making the operation prediction model more accurate and reliable.
[0097] In an optional embodiment of the present specification, the initial graph network and the encoding vector are input into the operation prediction model to obtain a target operation for the initial graph network, including: inputting the initial graph network and the encoding vector into the operation prediction model to obtain an initial operation for the initial graph network; identifying whether the graph elements corresponding to the initial operation belong to the initial operation set; and determining the initial operation as the target operation when all the graph elements corresponding to the initial operation belong to the initial operation set.
[0098] Initial operations are the set of operations that the operation prediction model outputs for the initial graph network after receiving the initial graph network and encoding vector as input. Initial operations can include adding new nodes, removing nodes or edges in the initial graph network, and adjusting them. After the operation prediction model receives the initial graph network and encoding vector, it obtains the initial operations for the initial graph network.
[0099] Since the operation prediction model is trained based on the sample graph network, the initial operation it outputs is also determined according to the operable graph elements in the sample graph network. There are differences in changes between the initial graph network and the sample graph network. Therefore, it is necessary to determine whether the graph element corresponding to the output initial operation belongs to the initial operation set, that is, to determine whether the initial operation includes operations on graph elements not included in the initial graph network.
[0100] When all graph elements corresponding to the initial operation belong to the initial operation set, it means that the initial operation is feasible for the initial graph network. Therefore, the initial operation can be determined as the target operation as the output of the operation prediction model.
[0101] For example, taking the power network to be optimized as an example, for the power network in the northern district of City A to be optimized, the demolished old power station Y is connected to the original power network through transmission lines k2 and k5. After the old power station Y is demolished, the transmission lines k2 and k5 are included in the total power network composed of all the original power equipment and transmission lines in City A, but are not included in the power network in the northern district of City A to be optimized. In this case, after the operation prediction model obtains the initial operation for the power network in the northern district of City A to be optimized, it is necessary to determine whether the initial operation includes operations on transmission lines k2 or k5. If operations on k2 or k5 are not included, that is, all power equipment and transmission lines corresponding to the initial operations are included in the power network in the northern district of City A to be optimized, then the initial operation is feasible for the power network in the northern district of City A to be optimized, and the initial operation is output as the target operation.
[0102] In the embodiments of this specification, a graph element verification mechanism is used to identify whether the graph element corresponding to the initial operation belongs to the initial operation set. Only when all corresponding graph elements belong to the initial operation set will the initial operation be confirmed as the target operation, ensuring the feasibility and effectiveness of the initial operation output by the operation prediction model in actual applications, improving the accuracy of operation prediction, and enhancing the reliability and adaptability of the system.
[0103] In an optional embodiment of the present specification, after identifying whether the graph element corresponding to the initial operation belongs to the initial operation set, it also includes: when the graph element corresponding to any initial operation does not belong to the initial operation set, searching for a target operation whose graph elements all belong to the initial operation set from multiple pre-recorded prediction operations, wherein the prediction operation is obtained by training the operation prediction model, and the prediction operation makes the training graph network on which the training operation prediction model is based conform to a tree structure after operation.
[0104] Prediction operations are operations performed on the output of a training graph network during model training. Prerecorded prediction operations are sequences of operations generated and saved during the training of a prediction model by performing operations on a large number of training graph networks. Recorded prediction operations are those that have been verified to convert a training graph network into a tree-like graph network.
[0105] If the initial operation output by the operation prediction model contains graph elements that are not part of the initial operation set, this indicates that the graph element targeted by the initial operation is missing from the initial graph network. This means that the initial operation is not feasible in the initial graph network and cannot serve as the target operation of the initial graph network. To find a feasible and effective operation plan, it is necessary to search for qualified operations from multiple pre-recorded prediction operations. This means that the graph elements being operated on must all be part of the target operation set, ensuring that the initial graph network supports the target operation.
[0106] For example, taking the power network to be optimized as an example, following the above example, for the power network in the northern district of City A to be optimized, the demolished old power station Y is connected to the original power network through transmission lines k2 and k5. After the old power station Y is demolished, the transmission lines k2 and k5 are included in the total power network composed of all the original power equipment and transmission lines in City A, but are not included in the power network in the northern district of City A to be optimized. In this case, after the operation prediction model obtains the initial operation for the power network in the northern district of City A to be optimized, it is determined that the initial operation includes the operation of the transmission line k2 and k5. 2 and k5 operations, that is, the transmission lines corresponding to the initial operations exist but are not included in the North District Power Network of City A to be optimized, then the initial operations are not feasible for the North District Power Network of City A to be optimized. At this time, it is necessary to use the training graph networks included in the total power network composed of all the original electrical equipment and transmission lines in City A to train the operation prediction model, and search in the recorded prediction operations that can make each training graph network conform to the tree structure. The corresponding graph elements all belong to the prediction operations in the North District Power Network of City A to be optimized, which are used as target operations.
[0107] In the embodiments of this specification, by introducing a set of pre-recorded prediction operations, when the graph element corresponding to the initial operation does not belong to the initial operation set, a qualified target operation is searched from multiple prediction operations saved during the training process that have been verified to be able to convert the training graph network into a tree structure, thereby ensuring that the operation model can output the target operation that can be used in the initial graph network, improving the feasibility and effectiveness of the operation, and enhancing the flexibility and adaptability of the system.
[0108] In an optional embodiment of the present specification, searching for a target operation whose graph elements all belong to an initial operation set from a plurality of pre-recorded prediction operations includes: searching for candidate operations whose graph elements all belong to the initial operation set from a plurality of pre-recorded prediction operations; based on the candidate operations, obtaining a candidate graph network for operating on the initial graph network; determining second evaluation information of an operation prediction model based on the candidate graph network; and determining the target operation from the candidate operations based on the second evaluation information.
[0109] The second evaluation information refers to the result obtained after evaluating the candidate operations found from multiple pre-recorded prediction operations. The second evaluation information is used to measure the effectiveness of these candidate operations and serve as the basis for determining the target operation. Specifically, the second evaluation information may include but is not limited to the feasibility, effectiveness, optimization ability or other measurement criteria of the prediction operation output by the operation prediction model. Candidate operations refer to multiple operations in which the graph elements screened out from the prediction operations all belong to the initial operation set. Different candidate operations are obtained based on different training graph networks, so the effects of these candidate operations on the processing of the initial graph network, that is, the effectiveness, are also different. Therefore, it is necessary to determine the most effective candidate operation from multiple candidate operations as the target operation.
[0110] Specifically, after obtaining multiple candidate operations, a candidate graph network that operates on the initial graph network can be obtained based on the candidate operations, that is, the candidate operations are applied to the initial graph network respectively to obtain multiple candidate graph networks.
[0111] The second evaluation information of the operation prediction model is determined based on the multiple candidate graph networks. Optionally, the second evaluation information can be determined based on the graph network indicators of the candidate graph networks. Graph network indicators refer to a series of quantitative standards used to describe and measure the performance of graph networks. There are many graph network indicators that can reflect different performance indicators of graph networks from different angles. For example, graph network indicators can include connectivity, stability, cost value, weight value, etc. The corresponding second evaluation information is calculated based on the graph network indicators of each candidate graph network.
[0112] For example, taking the power network to be optimized as an example, for the power network to be optimized, multiple candidate operations are found from multiple pre-recorded prediction operations, and the power network to be optimized is processed based on these candidate operations to obtain the processed power network to be optimized, and the transmission loss value of each processed power network to be optimized is determined. For the processed power network to be optimized with the smallest transmission loss value, second evaluation information is determined, and based on the second evaluation information, the candidate operation corresponding to the processed power network to be optimized is used as the target operation.
[0113] In the embodiments of the present specification, candidate operations whose graph elements all belong to the initial operation set are screened out from multiple pre-recorded prediction operations, and a candidate graph network is generated based on these candidate operations. Then, the most effective target operation is determined by evaluating the graph network indicators of the candidate graph network, thereby ensuring the feasibility and effectiveness of all target operations, optimizing the performance of the graph network, and improving the flexibility and adaptability of the system.
[0114] In an optional embodiment of the present specification, searching for candidate operations whose graph elements all belong to the initial operation set from a plurality of pre-recorded prediction operations includes: searching for at least one initial candidate operation whose graph elements all belong to the initial operation set from a plurality of pre-recorded prediction operations; obtaining the candidate operation according to the number of records of the at least one initial candidate operation, wherein the number of records is the number of times the prediction operation corresponding to the initial candidate operation is recorded during the training process of the operation prediction model.
[0115] The number of records refers to the number of times the predicted operation corresponding to a certain initial candidate operation is recorded during the training of the operation prediction model. Specifically, during the training process, the operation prediction model records predicted operations because they can make the training graph network conform to the tree structure after the operation. When operating on a large number of training graph networks, some predicted operations may be used multiple times due to their effectiveness and applicability, and thus recorded multiple times. The number of records for these predicted operations reflects the frequency of their successful application in different scenarios.
[0116] See also Figure 5 , Figure 5 A schematic diagram of a method for recording predicted operations during operation prediction model training according to an embodiment of this specification is shown. Figure 5 As shown: During the training process of the initial operation prediction model, the initial operation prediction model outputs a predicted operation, then it is determined whether the prediction graph network corresponding to the predicted operation conforms to the tree structure. If so, the predicted operation is recorded. The recorded predicted operations include: predicted operation 1 (k1, k2), predicted operation 2 (k2, k3, k5), predicted operation 3 (k1, k3, k7), predicted operation 4 (k4, k7), and predicted operation 5 (k5, k8); if not, it is determined whether the training of the operation prediction model is completed. If so, the trained prediction operation model is obtained; if not, the next training is continued.
[0117] The higher the number of times a predicted operation is recorded, the more effective the predicted operation is for the training graph network. However, due to structural differences between the initial graph network and the sample graph networks including the training graph network, the number of records does not reflect the effectiveness of the predicted operation for the initial graph network. Therefore, it is necessary to apply the candidate operations corresponding to these predicted operations to the initial graph network, obtain the candidate graph network, and determine the second evaluation information. For multiple candidate operations, the candidate operations can be obtained according to the number of records, and the candidate graph networks can be obtained by operating on the initial graph network in sequence.
[0118] For example, taking the power network to be optimized as an example, following the above example, for the power network in the northern district of City A to be optimized, there are transmission lines k1, k3, k4 and k7, and they are all included in the total power network composed of all the original power equipment and transmission lines in City A. The candidate operation 1 obtained is (k1, k3, k7), and the number of records is 13; the candidate operation 2 is (k4, k7), and the number of records is 6; the candidate operations are obtained in the order of the number of records from most to least, and the candidate operation 1 is first obtained to operate on the power network in the northern district of City A to be optimized, and the first candidate graph network is obtained, and then the candidate operation 2 is obtained to operate on the power network in the northern district of City A to be optimized, and the second candidate graph network is obtained.
[0119] In the embodiments of the present specification, initial candidate operations whose graph elements all belong to the initial operation set are screened out from multiple pre-recorded prediction operations, and candidate operations are obtained based on the number of records of these initial candidate operations during the training process. The number of records reflects the frequency of successful application of the prediction operation. In order to ensure the effectiveness of the initial graph network, the system will apply these candidate operations to the initial graph network respectively, generate a candidate graph network and evaluate its graph network indicators, and determine the most effective target operation based on the evaluation results, thereby ensuring the feasibility and effectiveness of all target operations. By combining the number of records and actual performance evaluation, the reliability and optimization effect of the selected candidate operations are improved.
[0120] In an optional embodiment of the present specification, determining second evaluation information of the operation prediction model according to the candidate graph network includes:
[0121] Identify whether the candidate graph network conforms to the tree structure; if so, call a preset evaluation function to evaluate the graph network indicators of the candidate graph network, and determine the second evaluation information of the operation prediction model based on the graph network indicators.
[0122] The method for determining whether a graph network has a tree structure has been described in the aforementioned embodiment and will not be repeated here.
[0123] Meanwhile, the relevant introduction of the preset evaluation function has been explained in the aforementioned embodiment and will not be repeated here.
[0124] After obtaining the candidate graph network, it is also necessary to ensure that the candidate graph network conforms to the tree structure, that is, the candidate operation can solve the problem of loops and subgraphs in the initial graph network.
[0125] When it is determined that the candidate graph network conforms to the tree structure, the feasibility, effectiveness, optimization ability, etc. of the candidate operation determined by the operation prediction model can be determined based on the evaluation results of the graph network indicators of the candidate graph network, that is, the graph network performance of the candidate graph network, and then the second evaluation information of the prediction operation model can be determined.
[0126] Furthermore, after determining that the candidate graph network conforms to a tree structure, a preset evaluation function can be called to evaluate the graph network metrics of the candidate graph network, thereby calculating the second evaluation information of the operation prediction model. For example, for the traffic network in the western district of City A to be scheduled, including road segment 300 to road segment 500 and location 250 to location 300, the candidate operations determined by the operation prediction model, namely, the traffic network scheduling methods, include: Traffic Network Scheduling Method 1: Closing road segments 320 to 325; Traffic Network Scheduling Method 2: Closing road segments 330 to 340 and canceling locations 280 to 285. Both of the aforementioned traffic network scheduling methods eliminate loops in the traffic network of City A's West District, making it conform to a tree structure and avoiding congestion caused by traffic conflicts. Preset evaluation functions are then used to evaluate the traffic network of City A's West District after each of the two scheduling methods. The traffic graph network indicators for the traffic network in City A's West District, after scheduling using Traffic Network Method 1, are obtained. These indicators include a 25% increase in transportation capacity and a 10% reduction in road maintenance costs. The second evaluation information from Traffic Network Method 1, as determined by the operation prediction model, is determined to be 30% effective. The second evaluation information from Traffic Network Method 2, as determined by the operation prediction model, is determined to be 20% effective. Based on this second evaluation information, a more effective candidate operation is determined, namely, Traffic Network Method 1, as the target operation.
[0127] For example, taking the power network to be optimized as an example, following the above example, see Figure 6 , Figure 6 FIG. 1 shows a schematic diagram of a method for determining a target operation of a power network to be optimized according to an embodiment of the present specification. Figure 6As shown: for the operation set of the power network in the northern district of City A to be optimized, there are transmission lines k0, k1, k3, k4, k6, k7 and k8, and they are all included in the total power network composed of all the original power equipment and transmission lines in City A. The prediction operations obtained that can make the training graph network in the training process conform to the tree structure include: prediction operation 1 (k1, k2), prediction operation 2 (k2, k3, k5), prediction operation 3 (k1, k3, k7), prediction operation 4 (k4, k7), prediction operation 5 (k5, k8); the candidate operations that are determined to conform to the operation set of the power network in the northern district of City A to be optimized include: candidate operation 1 (k1, k3, k7), candidate operation 2 (k4, k7); candidate operation 1 operates on the power network in the northern district of City A to be optimized to obtain the first candidate graph network, and candidate operation 2 operates on the power network in the northern district of City A to be optimized to obtain the second candidate graph network. Then determine whether the first candidate graph network and the second candidate graph network conform to the tree structure. If both the first candidate graph network and the second candidate graph network conform to the tree structure, call the preset evaluation function, evaluate the transmission loss values of the first candidate graph network and the second candidate graph network, and determine that the transmission loss value of the second candidate graph network is the smallest. Then, take the candidate operation 2 (k4, k7) corresponding to the second candidate graph network as the target operation.
[0128] In the embodiments of the present specification, by calling a preset evaluation function based on the candidate graph network to calculate the second evaluation information when the candidate graph network conforms to the tree structure, the effectiveness and performance of the candidate operations are accurately evaluated, thereby ensuring the feasibility and effectiveness of all candidate operations in practical applications. A reasonable operation plan is selected through quantitative evaluation, thereby improving the management and optimization of complex graph networks and ensuring the effective utilization of resources and maximization of system performance.
[0129] In an optional embodiment of this specification, a method for training an operation prediction model is provided. Figure 7 , Figure 7 A flowchart of an operation prediction model training method provided according to an embodiment of this specification is shown, which specifically includes the following steps.
[0130] Step 702: Obtain a sample graph network, wherein the sample graph network is used to construct a sample operation set, and the sample operation set is used to map the initial operation set to determine a target graph element, wherein the initial operation set includes operable graph elements in the initial graph network, and the target graph element is a graph element in the sample graph network corresponding to a graph element in the initial graph network;
[0131] Step 704: extract any training graph network based on the sample graph network;
[0132] Step 706: Input the training graph network into the initial operation prediction model to obtain the predicted operation for the training graph network;
[0133] Step 708: Based on the predicted operation, train the operation prediction model.
[0134] The operation prediction model can be trained using any training graph network extracted from the sample graph network. Specifically, the relevant technical features of the sample graph network and the technical solution for extracting any training graph network from the sample graph network can be found in the description of the technical solution in the operation prediction method for the graph network, and will not be further described in this embodiment.
[0135] After obtaining the training graph network, the training graph network can be input into the initial operation prediction model to obtain the predicted operation, and the operation prediction model can be trained based on the predicted operation. Specifically, regarding the relevant technical features of the initial operation prediction model, as well as the technical solution for obtaining the predicted operation and training the operation prediction model based on the predicted operation, please refer to the description of the technical solution in the operation prediction method for the graph network above, and will not be repeated in this embodiment of the specification.
[0136] In the embodiments of this specification, by obtaining a sample graph network, constructing a sample operation set, extracting a training graph network and inputting an initial operation prediction model to obtain predicted operations, and then training the model based on these predicted operations, the accuracy and generalization ability of the model are improved, and the model performance is optimized, so that it can have high accuracy and adaptability when processing complex and dynamically changing graph networks. At the same time, the generalization ability of the model is enhanced, so that the operation prediction model can still output effective operation suggestions when facing changing and unseen graph network structures.
[0137] In an optional embodiment of the present specification, a method for predicting the operation of a power graph network is provided. Figure 8 , Figure 8 A flowchart of an operation prediction method for a power graph network provided according to an embodiment of this specification is shown, which specifically includes the following steps.
[0138] Step 802: Acquire an initial power graph network and determine an initial operation set corresponding to the initial power graph network, wherein the initial operation set includes operable graph elements in the initial power graph network;
[0139] Step 804: Map the initial operation set to the sample operation set to obtain an encoding vector corresponding to a target graph element, wherein the sample operation set is constructed based on the operable graph elements in the sample power graph network, and the target graph element is a graph element in the sample power graph network corresponding to a graph element in the initial power graph network;
[0140] Step 806: Input the initial power graph network and the encoding vector into an operation prediction model to obtain a target operation for the initial power graph network, wherein the operation prediction model is trained based on the sample power graph network.
[0141] The initial power graph network is the power graph network that has been obtained and needs to be processed, for example, it can be the power network to be optimized. The operable graph elements corresponding to the initial power graph network can include power equipment as nodes and transmission lines as edges, and the initial operation set of the initial power graph network can include all power equipment and transmission lines that can be added, removed or changed in the power network to be optimized. The sample power graph network can be the total power network composed of all power equipment and transmission lines in a certain city. The sample power graph network includes multiple training power graph networks. The training power graph network can be a city's peak power network, a city's northern district power network, a city's nighttime power supply power network, and other networks covering different power equipment and transmission lines. The target operation can be a method for optimizing the power network, including adding, removing or changing power equipment and transmission lines.
[0142] In the embodiments of the present specification, by obtaining an initial power graph network and determining its corresponding initial operation set, the initial operation set is mapped to a sample operation set to obtain a coding vector, and then the initial power graph network and the coding vector are input into an operation prediction model trained based on the sample power graph network, thereby obtaining a target operation for the initial power graph network, ensuring the feasibility and reliability of all target operations for the initial power graph network, and also by using a fully trained operation prediction model, significantly improving the management and optimization effects of complex power graph networks, ensuring the effective utilization of resources and maximization of system performance.
[0143] In an optional embodiment of this specification, another operation prediction model training method is provided, see Figure 9 , Figure 9 A flowchart of an operation prediction model training method provided according to an embodiment of this specification is shown, which specifically includes the following steps.
[0144] Step 902: Acquire a sample power graph network, wherein the sample power graph network is used to construct a sample operation set, and the sample operation set is used to map an initial operation set to determine a target graph element, wherein the initial operation set includes operable graph elements in the initial power graph network, and the target graph element is a graph element in the sample power graph network corresponding to a graph element in the initial power graph network;
[0145] Step 904: extracting any training power graph network based on the sample power graph network;
[0146] Step 906: Input the trained power graph network into the initial operation prediction model to obtain a predicted operation for the trained power graph network;
[0147] Step 908: Based on the predicted operation, train the operation prediction model.
[0148] The operation prediction model for predicting operations on the power graph network can be trained using any training graph network extracted from the sample graph network. After obtaining the training graph network, it can be input into the initial operation prediction model to obtain the predicted operation, and the operation prediction model can be trained based on the predicted operation.
[0149] Specifically, regarding the relevant technical features such as the initial power graph network, the operational graph elements corresponding to the initial power graph network, the initial operation set of the initial power graph network, the sample power graph network, the training power graph network, and how to extract any training graph network from the sample graph network, how to obtain the predicted operation, and the technical solution for training the operation prediction model based on the predicted operation, please refer to the description of the technical solution in the operation prediction method for the power graph network above, and the embodiments of this specification will not be repeated here.
[0150] In the embodiments of this specification, by obtaining a sample power graph network, constructing a sample operation set, extracting a training power graph network and inputting an initial operation prediction model to obtain predicted operations, and then training the model based on these predicted operations, the accuracy and generalization ability of the model are improved, and the model performance is optimized, so that it can have high accuracy and adaptability when processing complex and dynamically changing power graph network operation tasks such as optimizing transmission line configuration, reducing power loss, and improving system stability, thereby ensuring the effective utilization of resources and efficient operation of the power system.
[0151] See also Figure 10 , Figure 10 A schematic diagram of an operation prediction model training and operation prediction model prediction method provided according to an embodiment of this specification is shown. Figure 10 As shown:
[0152] During the operation prediction model training phase, a sample graph network and sample parameters are obtained. The sample parameters are parameters corresponding to the sample graph network, indicating the state of the sample graph network. A sample operation set is determined based on the sample graph network, and the sample graph network, sample parameters, and sample operation set are input into the operation prediction model. The operation prediction model includes an operation prediction model configuration strategy, and the operation prediction model is trained according to the operation prediction model configuration strategy. At the beginning of training, the system module inputs the current state s(t) of the training graph network included in the sample graph network into the operation prediction model. The operation prediction model obtains a predicted operation a(t) based on the state s(t), and determines whether a(t) makes the training graph network conform to the tree structure. If so, the predicted operation a(t) is recorded in the predicted operation. A reward r(t) is calculated based on the reward function configured in the system module and returned to the operation prediction model. The operation prediction model configuration strategy is updated based on the reward r(t). The system model also inputs the state s(t+1) of the training graph network after processing a(t) into the operation prediction model, and continues training until the preset training stop condition is met.
[0153] In the prediction stage of the operation prediction model, the initial graph network is obtained, and the initial operation set is determined based on the graph elements in the initial graph network. The encoding vector corresponding to the target element is determined based on the mapping relationship between the initial operation set and the sample operation set; the encoding vector corresponding to the target element and the initial graph network are input into the operation prediction model; the operation prediction model outputs the initial operation; it is determined whether the graph element corresponding to the initial operation meets the initial operation set; if so, the initial operation is output as the target operation; if not, the candidate operations recorded during the training process of the operation prediction model are determined to determine the initial candidate operation, and the target operation output that meets the initial operation set is queried among the initial candidate operations.
[0154] The following combined Figure 11 , taking the application of the operation prediction method for graph network provided in this specification in the power network scenario as an example, the operation prediction method for graph network is further explained. Figure 11 A flowchart of a processing process of an operation prediction method for a graph network provided according to an embodiment of this specification is shown, which specifically includes the following steps.
[0155] Step 1102: Acquire an initial power graph network, and determine an initial operation set corresponding to the initial power graph network, wherein the initial operation set includes operable graph elements in the initial power graph network.
[0156] Step 1104: Map graph elements based on the identification information of the operable graph elements in the initial operation set and the identification information of the operable graph elements in the sample operation set to determine the target graph element, wherein the sample operation set is constructed based on the operable graph elements in the sample power graph network, and the target graph element is the graph element in the sample graph network corresponding to the graph element of the initial graph network.
[0157] Step 1106: Encode the target graph element to obtain the encoding vector corresponding to the target graph element.
[0158] Step 1108: Input the initial power graph network and the encoding vector into the operation prediction model to obtain an initial operation for the initial power graph network.
[0159] Step 1110: Identify whether the graph element corresponding to the initial operation belongs to the initial operation set.
[0160] Step 1112: When all graph elements corresponding to the initial operation belong to the initial operation set, determine the initial operation as the target operation.
[0161] Step 1114: When the graph element corresponding to any initial operation does not belong to the initial operation set, search for at least one initial candidate operation whose graph elements all belong to the initial operation set from multiple pre-recorded prediction operations, wherein the prediction operation is obtained by training the operation prediction model, and the prediction operation makes the training power graph network on which the training operation prediction model is based conform to the tree structure after operation.
[0162] Step 1116: Obtain a candidate operation according to the number of records of at least one initial candidate operation, wherein the number of records is the number of times the predicted operation corresponding to the initial candidate operation is recorded during the operation prediction model training process.
[0163] Step 1118: Based on the candidate operations, obtain a candidate power graph network that operates on the initial power graph network.
[0164] Step 1120: Identify whether the candidate power graph network conforms to the tree structure. If so, call a preset evaluation function to evaluate the graph network index of the candidate graph network, and determine second evaluation information of the operation prediction model based on the graph network index.
[0165] Step 1122: Determine a target operation from the candidate operations based on the second evaluation information.
[0166] In the embodiment of this specification, by obtaining the initial power graph network and determining its corresponding initial operation set, performing graph element mapping and encoding to generate an encoding vector, inputting the operation prediction model to obtain the initial operation and verifying its feasibility, and when the initial operation is not feasible, searching for a suitable candidate operation from the pre-recorded prediction operations, generating a candidate power graph network and verifying its tree structure, calling a preset evaluation function to calculate the second evaluation information, and finally determining the target operation for the initial power graph network. This method not only ensures the feasibility and reliability of all candidate operations for the power graph network, but also selects a reasonable target operation scheme through quantitative evaluation, significantly improving the management and optimization of complex power graph networks in power network scenarios, and ensuring the effective utilization of resources and maximization of system performance.
[0167] Corresponding to the above method embodiment, this specification also provides an embodiment of an operation prediction device for a graph network. Figure 12 FIG1 shows a schematic diagram of a structure of an operation prediction device for a graph network according to an embodiment of the present specification. Figure 12 As shown, the device includes: a first acquisition module 1202, configured to acquire an initial graph network and determine an initial operation set corresponding to the initial graph network, wherein the initial operation set includes operable graph elements in the initial graph network; a first mapping module 1204, configured to map the initial operation set to a sample operation set, and obtain an encoding vector corresponding to a target graph element, wherein the sample operation set is constructed based on the operable graph elements in the sample graph network, and the target graph element is a graph element in the sample graph network corresponding to a graph element of the initial graph network; a first prediction module 1206, configured to input the initial graph network and the encoding vector into an operation prediction model, and obtain a target operation for the initial graph network, wherein the operation prediction model is trained based on the sample graph network.
[0168] Optionally, the first mapping module 1204 is further configured to: perform graph element mapping based on the identification information of the operable graph elements in the initial operation set and the identification information of the operable graph elements in the sample operation set to determine the target graph element; encode the target graph element to obtain the encoding vector corresponding to the target graph element.
[0169] Optionally, the device also includes a training module configured to: obtain a sample graph network; extract any training graph network based on the sample graph network; input the training graph network into the initial operation prediction model to obtain a predicted operation for the training graph network; and train the operation prediction model based on the predicted operation.
[0170] Optionally, the training module is further configured to: obtain a prediction graph network that operates on the training graph network based on the prediction operation; determine first evaluation information of the operation prediction model based on the prediction graph network; and adjust model parameters of the operation prediction model based on the first evaluation information.
[0171] Optionally, the training module is further configured to: identify whether the prediction graph network conforms to the tree structure; if so, call a preset evaluation function to evaluate the graph network indicators of the prediction graph network, and determine the first evaluation information of the operation prediction model based on the graph network indicators.
[0172] Optionally, the first prediction module 1206 is further configured to: input the initial graph network and the encoding vector into the operation prediction model to obtain the initial operation for the initial graph network; identify whether the graph elements corresponding to the initial operation belong to the initial operation set; and when all the graph elements corresponding to the initial operation belong to the initial operation set, determine the initial operation as the target operation.
[0173] Optionally, the first prediction module 1206 is further configured to: when the graph element corresponding to any initial operation does not belong to the initial operation set, search for a target operation whose graph elements all belong to the initial operation set from multiple pre-recorded prediction operations, wherein the prediction operation is obtained by training the operation prediction model, and the prediction operation makes the training graph network on which the training operation prediction model is based conform to the tree structure after operation.
[0174] Optionally, the first prediction module 1206 is further configured to: search for candidate operations whose graph elements all belong to the initial operation set from a plurality of pre-recorded prediction operations; based on the candidate operations, obtain a candidate graph network for operating on the initial graph network; based on the candidate graph network, determine second evaluation information of the operation prediction model; based on the second evaluation information, determine the target operation from the candidate operations.
[0175] Optionally, the first prediction module 1206 is further configured to: search for at least one initial candidate operation whose graph elements all belong to the initial operation set from a plurality of pre-recorded prediction operations; obtain the candidate operation according to the number of records of at least one initial candidate operation, wherein the number of records is the number of times the prediction operation corresponding to the initial candidate operation is recorded during the training process of the operation prediction model.
[0176] Optionally, the first prediction module 1206 is further configured to: identify whether the candidate graph network conforms to the tree structure; if so, call a preset evaluation function to evaluate the graph network indicators of the candidate graph network, and determine the second evaluation information of the operation prediction model based on the graph network indicators.
[0177] The above is a schematic diagram of an operation prediction device for a graph network according to this embodiment. It should be noted that the technical solution of the operation prediction device for a graph network is based on the same concept as the technical solution of the above-mentioned method for predicting operation of a graph network. For details not described in detail in the technical solution of the operation prediction device for a graph network, please refer to the description of the technical solution of the above-mentioned method for predicting operation of a graph network.
[0178] Corresponding to the above method embodiment, this specification also provides an operation prediction model training device embodiment, Figure 13 FIG. 1 shows a schematic diagram of the structure of an operation prediction model training device provided according to an embodiment of this specification. Figure 13 As shown, the device includes: a second acquisition module 1302, configured to acquire a sample graph network, wherein the sample graph network is used to construct a sample operation set, the sample operation set is used to map the initial operation set to determine the target graph element, the initial operation set includes the operable graph elements in the initial graph network, and the target graph element is the graph element in the sample graph network corresponding to the graph element of the initial graph network; a first extraction module 1304, configured to extract any training graph network based on the sample graph network; a first input module 1306, configured to input the training graph network into the initial operation prediction model to obtain the predicted operation for the training graph network; a first training module 1308, configured to train the operation prediction model based on the predicted operation.
[0179] The above is a schematic diagram of an operation prediction model training device according to this embodiment. It should be noted that the technical solution of this operation prediction model training device and the technical solution of the aforementioned operation prediction model training method are based on the same concept. For details not described in detail in the technical solution of the operation prediction model training device, please refer to the description of the technical solution of the aforementioned operation prediction model training method.
[0180] Corresponding to the above method embodiment, this specification also provides an operation prediction device embodiment for a power graph network. Figure 14 FIG1 shows a schematic diagram of a structure of an operation prediction device for a power graph network according to an embodiment of the present specification. Figure 14 As shown, the device includes: a third acquisition module 1402, configured to acquire an initial power graph network, determine an initial operation set corresponding to the initial power graph network, wherein the initial operation set includes operable graph elements in the initial power graph network; a second mapping module 1404, configured to map the initial operation set to a sample operation set, and obtain an encoding vector corresponding to a target graph element, wherein the sample operation set is constructed based on the operable graph elements in the sample power graph network; a second prediction module 1406, configured to input the initial power graph network and the encoding vector into an operation prediction model, and obtain a target operation for the initial power graph network, wherein the operation prediction model is trained based on the sample power graph network.
[0181] The above is a schematic diagram of an operation prediction device for a power graph network according to this embodiment. It should be noted that the technical solution of this operation prediction device for a power graph network is based on the same concept as the technical solution of the aforementioned operation prediction method for a power graph network. For details not described in detail in the technical solution for the operation prediction device for a power graph network, please refer to the description of the technical solution for the aforementioned operation prediction method for a power graph network.
[0182] Corresponding to the above method embodiment, this specification also provides another operation prediction model training device embodiment, Figure 15 FIG. 1 shows a schematic diagram of the structure of an operation prediction model training device provided according to an embodiment of this specification. Figure 15 As shown, the device includes: a fourth acquisition module 1502, configured to acquire a sample power graph network, wherein the sample power graph network is used to construct a sample operation set, the sample operation set is used to map the initial operation set to determine the target graph element, the initial operation set includes the operable graph elements in the initial power graph network, and the target graph element is the graph element in the sample power graph network corresponding to the graph element of the initial power graph network; a second extraction module 1504, configured to extract any training power graph network based on the sample power graph network; a second input module 1506, configured to input the training power graph network into the initial operation prediction model to obtain the predicted operation for the training power graph network; a second training module 1508, configured to train the operation prediction model based on the predicted operation.
[0183] The above is a schematic diagram of an operation prediction model training device according to this embodiment. It should be noted that the technical solution of this operation prediction model training device and the technical solution of the aforementioned operation prediction model training method are based on the same concept. For details not described in detail in the technical solution of the operation prediction model training device, please refer to the description of the technical solution of the aforementioned operation prediction model training method.
[0184] Figure 16 16 shows a block diagram of a computing device 1600 according to one embodiment of the present disclosure. Components of the computing device 1600 include, but are not limited to, a memory 1610 and a processor 1620. The processor 1620 is connected to the memory 1610 via a bus 1630, and a database 1650 is used to store data.
[0185] Computing device 1600 also includes an access device 1640 that enables computing device 1600 to communicate via one or more networks 1660. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. Access device 1640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, or a near field communication (NFC) interface.
[0186] In one embodiment of the present specification, the above components of the computing device 1600 and Figure 16 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 16 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art may add or replace other components as needed.
[0187] Computing device 1600 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 1600 can also be a mobile or stationary server.
[0188] The processor 1620 is configured to execute the following computer program / instructions, which implement the steps of the above method when executed by the processor.
[0189] The above is a schematic solution of a computing device of this embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above method belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above method.
[0190] One embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described method. The above is an illustrative embodiment of a computer-readable storage medium of this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above-described method are based on the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-described method.
[0191] One embodiment of this specification also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described method. The above is an illustrative embodiment of a computer program of this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the above-described method are based on the same concept. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solution of the above-described method.
[0192] The foregoing description of specific embodiments of this specification describes other embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are possible or may be advantageous. The computer instructions include computer program code, which may be in source code form, object code form, executable files, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a removable hard drive, a magnetic disk, an optical disk, computer memory, read-only memory (ROM), random access memory (RAM), an electrical carrier signal, a telecommunications signal, and software distribution media. It should be noted that the content of the computer-readable medium may be appropriately expanded or reduced based on the requirements of patent practice. For example, in some jurisdictions, according to patent practice, computer-readable media does not include electrical carrier signals or telecommunications signals.
[0193] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the embodiments of this specification.
[0194] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0195] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A method for predicting operations on a graph network, comprising: Obtain an initial graph network, and determine an initial operation set corresponding to the initial graph network, wherein the initial operation set includes operable graph elements in the initial graph network. Graph networks include social networks, transportation networks, power networks, and computer networks. Graph elements include nodes and edges. The nodes include basic entities in the graph network and represent specific objects. In the social network, the nodes include users. In the transportation network, the nodes represent locations, including schools, shopping malls, and cities. In the power network, the nodes represent power equipment, including power stations, substations, and power terminals. In the computer network, the nodes represent network equipment, including routers, servers, and switches. The edges represent relationships between the objects. Mapping the initial operation set to a sample operation set to obtain an encoding vector corresponding to a target graph element, wherein the sample operation set is constructed based on operable graph elements in the sample graph network, and the target graph element is a graph element in the sample graph network corresponding to a graph element in the initial graph network; The initial graph network and the encoding vector are input into an operation prediction model to obtain a target operation for the initial graph network, wherein the operation prediction model is trained based on the sample graph network.
2. The method according to claim 1, wherein mapping the initial operation set to a sample operation set to obtain an encoding vector corresponding to a target graph element comprises: Performing graph element mapping according to identification information of the operable graph elements in the initial operation set and identification information of the operable graph elements in the sample operation set to determine a target graph element; The target graph element is encoded to obtain an encoding vector corresponding to the target graph element.
3. The method according to claim 1, before inputting the initial graph network and the encoding vector into an operation prediction model to obtain a target operation for the initial graph network, further comprising: Get the sample graph network; Based on the sample graph network, extract any training graph network; Inputting the training graph network into an initial operation prediction model to obtain a predicted operation for the training graph network; The operation prediction model is trained based on the predicted operation.
4. The method according to claim 3, wherein training the operation prediction model based on the predicted operation comprises: Based on the prediction operation, obtaining a prediction graph network that operates on the training graph network; determining first evaluation information of the operation prediction model according to the prediction graph network; Based on the first evaluation information, model parameters of the operation prediction model are adjusted.
5. The method according to claim 4, wherein determining first evaluation information of the operation prediction model based on the prediction graph network comprises: Identifying whether the prediction graph network conforms to a tree structure; If so, a preset evaluation function is called to evaluate the graph network index of the prediction graph network, and based on the graph network index, the first evaluation information of the operation prediction model is determined.
6. The method according to any one of claims 1 to 5, wherein inputting the initial graph network and the encoding vector into an operation prediction model to obtain a target operation for the initial graph network comprises: Inputting the initial graph network and the encoding vector into an operation prediction model to obtain an initial operation for the initial graph network; Identifying whether the graph element corresponding to the initial operation belongs to the initial operation set; In a case where all graph elements corresponding to the initial operation belong to the initial operation set, the initial operation is determined to be the target operation.
7. The method according to claim 6, further comprising, after identifying whether the graph element corresponding to the initial operation belongs to the initial operation set: In the case that the graph element corresponding to any of the initial operations does not belong to the initial operation set, a target operation whose graph elements all belong to the initial operation set is searched from a plurality of pre-recorded prediction operations, wherein the prediction operation is obtained by training the operation prediction model, and the prediction operation makes the training graph network on which the operation prediction model is based conform to a tree structure after operation.
8. The method according to claim 7, wherein searching for a target operation whose graph elements all belong to the initial operation set from the pre-recorded plurality of predicted operations comprises: Searching for candidate operations whose graph elements all belong to the initial operation set from a plurality of pre-recorded prediction operations; Based on the candidate operation, obtaining a candidate graph network for performing the operation on the initial graph network; determining second evaluation information of the operation prediction model based on the candidate graph network; A target operation is determined from the candidate operations based on the second evaluation information.
9. The method according to claim 8, wherein searching for candidate operations whose graph elements all belong to the initial operation set from a plurality of pre-recorded predicted operations comprises: Searching for at least one initial candidate operation whose graph elements all belong to the initial operation set from a plurality of pre-recorded prediction operations; According to the number of records of the at least one initial candidate operation, a candidate operation is obtained, wherein the number of records is the number of times the predicted operation corresponding to the initial candidate operation is recorded during the training process of the operation prediction model.
10. The method according to claim 8, wherein determining second evaluation information of the operation prediction model based on the candidate graph network comprises: Identifying whether the candidate graph network conforms to a tree structure; If so, a preset evaluation function is called to evaluate the graph network index of the candidate graph network, and based on the graph network index, second evaluation information of the operation prediction model is determined.
11. A computing device comprising: memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 10 are implemented.
12. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.
13. A computer program product comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Power grid key node identification method
CN116502381A
Fault positioning method and system for real-model experiment distribution line
CN119438786A