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, the problem of insufficient adaptability to data processing of graph networks in the prior art is solved, and efficient and flexible graph network operation prediction is achieved.

CN119692424AActive Publication Date: 2025-03-25ALIBABA CLOUD FEITIAN (HANGZHOU) CLOUD COMPUTING TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510192153.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-03-25
Estimated Expiration
2045-02-21

AI Technical Summary

Technical Problem

When processing graph network data, the mathematical model is complex and has low scalability. When facing the dynamically changing graph network structure, the static prediction model cannot be updated in time, resulting in decision failure or reduction in accuracy.

Method used

By obtaining the initial graph network and its corresponding initial operation set, map it to the sample operation set to obtain the encoded vector, and input an operation prediction model to generate a target operation for the initial graph network. When the topology of the graph network changes, this method can still output effective target operations, which improves the scalability and flexibility of the operation prediction model.

Benefits of technology

The additional time and resource costs caused by the need to retrain the operation prediction model due to changes in the topology of graph networks are avoided, and the efficiency and effectiveness of graph network data processing is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119692424A_ABST
    Figure CN119692424A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an operation prediction method for a graph network and an operation prediction model training method.The operation prediction method for the graph network comprises the steps that an initial graph network is obtained, an initial operation set corresponding to the initial graph network is determined, and the initial operation set comprises operable graph elements in the initial graph network; the initial operation set is mapped to a sample operation set, coding vectors corresponding to target graph elements are obtained, the sample operation set is constructed based on operable graph elements in a sample graph network, and the target graph elements are graph elements, corresponding to graph elements of the initial graph network, in the sample graph network; and inputting the initial graph network and the coding vector into an operation prediction model to obtain a target operation for the initial graph network, the operation prediction model being obtained based on sample graph network training. Through the method, the expandability and the flexibility of the operation prediction model under the condition that the graph network structure changes are improved, and then the efficiency and the effectiveness of graph network data processing are improved.
Need to check novelty before this filing date? Find Prior Art

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 based on graph networks in the optimization of complex networks such as power, communication and transportation is becoming more and more widespread.

[0003] At present, when processing graph network data, the use of traditional graph theory methods and operations optimization methods often encounters problems such as complex mathematical model establishment and low scalability of the established mathematical models. In addition, when facing large-scale problems, the above methods will significantly increase the computational complexity and time consumption, resulting in low data processing efficiency. In order to solve these problems, a static prediction model can be constructed to process graph network data.

[0004] However, the above-mentioned method of constructing a static prediction model does not perform well when faced with dynamically changing graph network structures. When new nodes appear in the graph network or the connection relationship changes, the static prediction model often cannot update the processing strategy in time, resulting in the inability to operate the graph network under the changed new environment, which in turn leads to decision failure or reduced accuracy. Therefore, a more flexible and adaptable graph network operation prediction method is urgently needed. Summary of the invention

[0005] In view of this, an embodiment of the present specification provides an operation prediction method for a graph network. One or more embodiments of the present specification also involve 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 solve the technical defects existing in the prior art.

[0006] An embodiment of the present specification provides an operation prediction method for a graph network, including: 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; 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; 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.

[0007] 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 topological structure of the graph network changes, thereby improving the scalability and flexibility of the operation prediction model, avoiding the extra time cost and resources consumed by retraining the corresponding operation prediction model for the graph network with a changed topological structure, thereby improving the efficiency and effectiveness of graph network data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 is a flowchart of an operation prediction method for a graph network provided by an embodiment of this specification; Figure 2 is a schematic diagram of a graph network structure provided by an embodiment of this specification; Figure 3 It is a schematic diagram of a sample operation set to an internal coding vector of an operation prediction model provided by an embodiment of this specification; Figure 4 It is a schematic diagram of determining a coding vector of a target graph element based on an initial operation set and a sample operation set provided by an embodiment of this specification; Figure 5 It is a schematic diagram of a method for recording prediction operations during operation prediction model training provided by an embodiment of this specification; Figure 6 is a schematic diagram of a method for determining a target operation for a power network to be optimized provided by an embodiment of this specification; Figure 7 is a flowchart of an operation prediction model training method provided by an embodiment of this specification; Figure 8 is a flow chart of an operation prediction method for a power graph network provided by an embodiment of the present specification; Fig. 9 is a flowchart of an operation prediction model training method provided by an embodiment of this specification; Fig.10 It is a schematic diagram of an operation prediction model training and operation prediction model prediction method provided by an embodiment of this specification; Fig.11 is a processing flow chart of an operation prediction method for a graph network provided by an embodiment of the present specification; Fig.12 It is a structural schematic diagram of an operation prediction device for a graph network provided by an embodiment of this specification; Fig.13It is a structural schematic diagram of an operation prediction model training device provided by an embodiment of this specification; Fig.14 It is a structural schematic diagram of an operation prediction device for a power graph network provided by an embodiment of the present specification; Fig.15 It is a structural schematic diagram of an operation prediction model training device provided by an embodiment of this specification; Fig.16 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0009] Many specific details are described in the following description to facilitate a full 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 connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0010] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" 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 other meanings. 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.

[0011] 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, this 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".

[0012] 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 the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0013] First, the terms involved in one or more embodiments of this specification are explained.

[0014] Tree network topology: Tree network topology evolved from bus topology, and is shaped like an inverted tree, with the root at the top and branches below the root, and each branch can have sub-branches. It is an extension of the bus structure, which is formed by adding branches to the bus network. Its transmission medium can have multiple branches, but it does not form a closed loop. The tree network is a hierarchical network, and its structure can be symmetrical, with fixed connections and a certain degree of fault tolerance.

[0015] Reinforcement learning: also known as incentive learning, evaluation learning or enhanced learning, is a paradigm and methodology of machine learning, which is used to describe and solve the problem of how an agent can maximize rewards or achieve specific goals through learning strategies during its interaction with the environment.

[0016] Deep reinforcement learning: A technology that combines deep learning and reinforcement learning. It can make decisions and control directly based on input data. It is an artificial intelligence method that is closer to human thinking. Deep reinforcement learning solves the problem of traditional reinforcement learning under high-dimensional data input by combining the perception ability of deep learning and the decision-making ability of reinforcement learning, enabling the intelligent agent to make reasonable decision outputs based on the input multi-dimensional data.

[0017] Tree network decision scenario: Adjust the complex network structure (including subnet rings or meshes) to a tree structure to ensure network efficiency and stability.

[0018] Main and distribution network decision-making scenario: involves the coordination and optimization operations between the main grid (transmission network) and the distribution grid (distribution network) 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.

[0019] Depth-First Search: Depth-First Search (DFS) is an algorithm used to traverse or search a tree or graph by exploring each branch as deeply as possible.

[0020] 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.

[0021] Union-Find algorithm: Union-Find algorithm is a data structure and related algorithms that support efficient set merging (union) and finding (find) operations, and is often used to manage and connect disjoint sets or subgraphs.

[0022] 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.

[0023] See also Figure 1 , Figure 1 A flowchart of an operation prediction method for a graph network provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0024] 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.

[0025] A graph network is a mathematical structure used to represent the relationship or connection between objects, where objects are a finite and non-empty set of vertices (also called nodes), and relationships or connections are a set of edges that describe the connection 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.

[0026] See also Figure 2 , Figure 2 A schematic diagram of a graph network structure provided according to an embodiment of the present specification is shown. Figure 2 As shown: A to G are nodes in the graph network, and k1 to k10 are edges in the graph network.

[0027] Graph networks can be divided into directed graphs and undirected graphs according to the direction type. In a directed graph, the edge has a specified direction, indicating a relationship from one node to another; while in an undirected graph, the edge has no direction, that is, two nodes can reach each other.

[0028] A graph network can be any network such as a social network, transportation network, power network, computer network, etc. A graph network includes graph elements, which are the basic components of a graph network, mainly nodes and edges.

[0029] 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.

[0030] 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. In a power network, an edge is usually directed, flowing from a power generation device (such as a power station) to a power user (such as a user terminal). In a computer network, an edge can represent a physical connection (such as an optical fiber, a cable, etc.) or a logical connection (such as a wireless connection, a network connection, etc.). In a computer network, an edge is usually undirected, but when it comes to scenarios such as data transmission, it can be directed.

[0031] 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 age and location of users; in a transportation network, edges can have weights to represent the distance and construction cost of the road, and nodes can have attributes, such as the altitude and coordinate position of the location; 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, and nodes can have labels, such as the IP address and protocol type of the device.

[0032] Operational graph elements refer to those graph elements in the graph network that can be added, removed or changed in specific tasks or operations. Operational graph elements can include operational nodes and operational edges. For example, in the power network, operational nodes can be newly built power stations or power terminals, or old distribution stations that need 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 the connection objects, etc.; in the transportation network, operational nodes can be a transportation hub that needs to be closed, or the intersection of new roads that need to be opened, or bus stops that need to update information, etc. Operational edges can be new highways that need to be built, or old bridges that need to be demolished, or mountain roads that need to be diverted, etc.

[0033] The operation set refers to the set of all possible operations that can be performed on all operable elements (i.e. nodes and edges) in the graph network. These operations do not have a specific purpose or expected result, but refer to the range of all changes that can be technically implemented on the graph network. The initial graph network is the acquired graph network that needs to be processed, such as a power network to be optimized or a traffic network to be scheduled. The initial operation set refers to the set of all operable graph elements in the initial graph network, and may also include the set of operations corresponding to all operable graph elements.

[0034] After the initial graph network is obtained, 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, in the case where 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 diverted, and bus stops 1 to 6 that can be built, demolished or moved, 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. In the case where 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 directions changed, and power equipment 1 to 3 that can be built, demolished or moved, 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.

[0035] Exemplarily, 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.

[0036] In this step, by analyzing the acquired initial graph network, identifying all operable graph elements, and constructing an initial operation set containing these operable elements, the feasible operation space range for the current state of the graph network is clarified, providing the necessary data basis for the subsequent selection and execution of target operations on the initial graph network.

[0037] 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.

[0038] The sample graph network is a comprehensive graph network, which contains 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 multiple networks covering different power equipment and transmission lines, such as the peak power network of City A, the North District power network 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.

[0039] The sample operation set is an operation set constructed based on all operable graph elements in the sample graph network. Since the sample graph network is a set of all training graph networks, the sample operation set also includes all operations that have been or may be performed in any training graph network, such as adding new nodes or edges, removing existing nodes or edges, adjusting the properties of nodes or edges, etc. The sample operation set provides a comprehensive operation library to the operation prediction model, reflecting all possible operations that can be predicted by the operation prediction model and their impact on the graph network. Specifically, the operations in the sample operation set are reflected as encoding vectors inside the operation prediction model during the training process of the operation prediction model.

[0040] See also Figure 3 , Figure 3 A schematic diagram of a sample operation set to an internal coding vector of an operation prediction model according to an embodiment of this specification is shown, as shown in 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.

[0041] 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 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 the 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.

[0042] See also Figure 4 , Figure 4 A schematic diagram of determining a coding 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 is shown. Figure 4 As shown: the initial operation set includes operable graph elements such as k0 and k1. 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.

[0043] The target graph element is the graph element in the sample graph network that corresponds to the graph element in the initial graph network. After the correspondence between the graph elements in the initial graph network and the graph elements in the sample graph network is determined, that is, after the target graph element is determined, the encoding vector of the target graph element can be obtained according to the correspondence. The encoding vector is used to enable the operation prediction model to identify the graph element to be operated.

[0044] Exemplarily, 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 power equipment and transmission lines in the currently acquired 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 in the original power network in the northern district of City A as target power equipment and transmission lines, and encode the target power equipment and transmission lines according to the corresponding relationship to obtain a coding vector.

[0045] 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 faced with a changed initial graph network.

[0046] 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.

[0047] The target operation is the operation output by the operation prediction model for the initial graph network, and the target operation corresponds to the target graph element. Since 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 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.

[0048] 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 reach 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.

[0049] For example, taking the power network to be optimized as an example, for the power network in the north district of City A to be optimized, the newly built power station X is connected to the original power network, and after passing through multiple transmission lines, it flows to the power station X itself, causing a loop in power transmission, which causes power transmission problems and needs to be optimized. Then the operation prediction model outputs the target operation based on the power network in the north district of City A to be optimized. The target operation is to disconnect certain transmission lines in the original power network in the north district of City A, so that the loop formed by the transmission lines is disconnected, and the optimization of the power network in the north district of City A to be optimized is completed.

[0050] 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, and based on the initial graph network and the coding vector, an operation prediction model is used to obtain the target operation, so that the operation prediction model can still output a valid target operation when the topological structure of the graph network changes, thereby avoiding the need to retrain the corresponding operation prediction model for a graph network with a changed topological structure. This improves the scalability and flexibility of the operation prediction model, thereby improving the efficiency and effectiveness of graph network data processing.

[0051] In an optional embodiment of the present specification, an initial operation set is mapped to a sample operation set to obtain a coding vector corresponding to a target graph element, including: performing graph element mapping according to identification information of operable graph elements in the initial operation set and identification information of operable graph elements in the sample operation set to determine a target graph element; encoding the target graph element to obtain a coding vector corresponding to the target graph element.

[0052] The identification information of the operable graph element is the identification of the operable element in the operation set, indicating the uniqueness of any operable element in the operation set corresponding to the graph network in which it is located. That is, the identification information of the operable graph element in the initial operation set indicates the unique identification of the graph element in the initial graph network in the initial operation set, and the identification information of the operable graph element in the sample operation set indicates the unique identification of the graph element in the sample graph network in the sample operation set.

[0053] 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.

[0054] 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.

[0055] Optionally, the encoding vector may include features or attribute information of the graph elements, such as the type of nodes in the graph network, the weight of the edges, etc. After determining the target graph element, the features or attribute information of the target graph element can be obtained accordingly, normalized, and then vectorized to complete the generation of the encoding vector. For vectorization, it can be achieved by using simple splicing, embedding methods or more complex neural network layers (such as autoencoders), and the embodiments of this specification do not make specific limitations on this.

[0056] Exemplarily, 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, and then encoding is performed according to the type of the target power equipment (such as a power station, a distribution station, etc.) and the attributes of the target transmission line (such as a high-voltage transmission line, a low-voltage transmission line, etc.) to obtain a corresponding encoding vector for processing by the operation prediction model.

[0057] In the embodiments of the present specification, by accurately mapping the operable graph element identification information in the initial operation set with the operable graph element identification information in the sample operation set, consistent identification of the same graph elements in different graph networks is ensured, thereby determining the target graph element, and encoding the feature or attribute information of the target graph element, generating a coding vector that can be processed by an operation prediction model, thereby improving the accuracy and reliability of graph element mapping, and by constructing a coding vector that includes graph element characteristics, enhancing the processing accuracy and efficiency of the operation prediction model, ultimately achieving improved efficiency and effectiveness in processing complex graph network data.

[0058] 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.

[0059] It has been explained in the above embodiments that the sample graph network is a comprehensive graph network, and the sample graph network includes all graph elements of the training graph network for training the operation prediction model. The sample graph network can be understood as including the connection mode and structural changes of all graph elements for training the operation prediction model, even if the graph elements are not in the same training graph network.

[0060] The training graph network is a subset of the sample graph network, and a subgraph or a specific connection mode in the sample graph network can be used as a training graph network to train the operation prediction model. For example, when the sample graph network is the total traffic network of City A, the sample graph network includes all road segments 1 to 720 and all locations 1 to 360 in City A. Then, bus route 1 including road segments 1 to 18 and locations 1 to 19 can be extracted as training graph network 1; the traffic network of the eastern district of City A including road segments 100 to 200 and locations 150 to 200 can also be extracted as training graph network 2, etc.

[0061] The initial operation prediction model refers to an operation prediction model that has not been fully trained. The initial operation prediction model can be a reinforcement learning model combined with a deep neural network. This type of model is constructed by combining the reinforcement learning (RL) algorithm with the deep neural network (DNNs) to handle complex decision-making problems. Different reinforcement learning algorithms can be selected according to the scale and complexity of different problems, such as Deep Q-Network (DQN), Deep Deterministic Policy Gradient (DDPG), Proximal Policy Optimization (PPO), etc. Among them, DQN is suitable for discrete action spaces, and DDPG and PPO are suitable for continuous and large-scale action spaces. The prediction operation is a set of operations on the operational graph elements in the training graph network, such as adding, removing or changing nodes or edges in the training graph network.

[0062] Using the initial operation prediction model, based on each training graph network, a prediction operation for each training graph network is generated. For example, following the above example, when the sample graph network is the total traffic network of City A, for bus route 1 including road segment 1 to road segment 18 and location 1 to location 19 as training graph network 1, the generated prediction operation, i.e., the method of dispatching the traffic network, is: cancel location 10 and road segment 11, and change the road segment 10 from location 9 to location 10 to location 11 from location 9, thereby reducing the traffic congestion of bus route 1; for the traffic network of the eastern district of City A including road segment 100 to road segment 200 and location 150 to location 200 as training graph network 2, the generated prediction operation, i.e., the method of dispatching the traffic network, is: close road segment 115 to road segment 120, thereby eliminating the loop existing in the traffic network of the eastern district of City A, thereby avoiding the congestion caused by traffic conflicts, and improving the transportation capacity, etc.

[0063] After the predicted operation is obtained, the predicted operation model can be trained based on the predicted operation. Specifically, there are many methods for training the predicted operation model. One optional method is to obtain the standard operation as a label, and to complete the training of the operation prediction model by minimizing the loss value between the predicted operation and the standard operation through supervised learning; another optional method is to use self-supervised learning to distinguish the effectiveness of the output predicted operation through the model's own comparative learning in the absence of explicit labels, thereby completing the training of the operation prediction model; another optional method is to use reinforcement learning to evaluate the training graph network processed by the predicted operation, and return the corresponding adjustment information (such as the reward value or penalty value returned by the internal or external reward system) to the operation prediction model according to the evaluation results, adjust the parameters of the operation prediction model, and complete the training of the operation prediction model. The specific training method used to train the predicted operation model can be determined according to the actual graph network properties or the problem to be solved, and the embodiments of this specification do not make specific limitations on this.

[0064] In practical applications, the sample graph network can be a power network, such as the total power network composed of all power-consuming equipment and transmission lines in City A. Correspondingly, the training graph network can be the peak power network of City A, the power network in 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.

[0065] In the embodiments of the present 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.

[0066] In an optional embodiment of the present specification, an operation prediction model is trained based on the predicted operation, including: based on the predicted operation, obtaining a prediction graph network that operates on the training graph network; 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.

[0067] 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 in the model learning process so that the operation prediction model can better fit the data and make accurate predictions.

[0068] After determining the first evaluation information, the model parameters of the operation prediction model can be updated according to a set standard (such as minimizing the loss function, maximizing the reward value, etc.) through a certain adjustment algorithm (such as a spiral gradient algorithm, etc.).

[0069] 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 the power network, the transmission performance of the power network to be optimized after the prediction operation is processed and the transmission performance of the power network to be optimized without the prediction operation can be used to determine whether the prediction operation can optimize the power network to be optimized. If the transmission performance of the power network to be optimized after the prediction operation is improved, the corresponding valid first evaluation information is generated, and based on the first evaluation information, the model parameters of the operation prediction model are adjusted.

[0070] In the embodiments of the present specification, by generating a prediction graph network based on the predicted operation, determining the first evaluation information according to the evaluation result 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.

[0071] 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 the 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.

[0072] A tree structure is a special type of acyclic connected graph. Specifically, there is no closed path 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).

[0073] To determine whether a graph network is a tree structure, it can be determined 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, it can be determined by breadth-first search (BFS) and depth-first search (DFS); second, determine whether there is a loop in the graph network, that is, whether there is one and only one path between any two nodes, and there is no parallel path. Specifically, the entire graph network can be traversed by BFS or DFS. If a node that has been visited is found during the traversal process, it means that there is a loop in the graph network. The Union-Find algorithm can also be used to detect whether there is a loop. The preset evaluation function is a set of mathematical formulas or logical rules for measuring the performance of the predicted graph network. The preset evaluation function can evaluate various indicators of the graph network and output a score or evaluation result. The preset evaluation function can be of multiple types, which can be determined according to the actual graph network attributes or the problem to be solved, and the characteristics of the predicted graph network can be measured from different angles. For example, the prediction evaluation function can be a loss function, an indicator function, a multi-objective optimization function, a reward function, etc., and the embodiments of this specification do not make specific limitations on this. Graph network metrics refer to a series of quantitative standards used to describe and measure the performance of graph networks. There are many types of graph network metrics, which can reflect different performance indicators of graph networks from different angles. For example, graph network metrics can include connectivity, stability, cost value, weight value, etc.

[0074] 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, thereby determining the first evaluation information of the prediction operation model.

[0075] When the predicted graph network is identified to conform to the tree structure, the preset evaluation function is called to evaluate the graph network index of the predicted graph network, and the corresponding first evaluation information is determined based on the graph network index. 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 the training graph network 2, the prediction operation generated by the operation prediction model, that is, the method of scheduling the traffic network is: closing road segment 115 to road segment 120. The method of scheduling the traffic network eliminates the loops existing in the traffic network in the eastern district of City A, so that the traffic network in the eastern district of City A conforms to the tree structure and avoids the congestion caused by traffic conflicts. At the same time, the traffic network in the eastern district of City A after scheduling is evaluated by the preset evaluation function to obtain the traffic graph network index of the traffic network in the eastern district of City A, that is, the transportation capacity is increased by 25%, the road maintenance cost is reduced by 15%, etc., then the first evaluation information of the method of scheduling the traffic network generated by the operation prediction model for the traffic network in the eastern district of City A is determined to be valid based on the traffic graph network index.

[0076] 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.

[0077] Exemplarily, 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 may be a transmission loss value. If the transmission loss value of the predicted power network is smaller than that of 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 a 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 prediction operation of the operation prediction model in the subsequent output is improved in the direction of higher effectiveness. The specific reward value can be determined according to the degree of reduction in the transmission loss value.

[0078] In the embodiments of the present specification, by first performing tree structure verification and then combining a 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 optimization in performance, thereby improving the feasibility and effectiveness of the operation output by the operation prediction model, and iteratively optimizing the model parameters through a feedback mechanism, making the operation prediction model more accurate and reliable.

[0079] 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 element corresponding to the initial operation belongs to the initial operation set; when the graph elements corresponding to the initial operation all belong to the initial operation set, determining the initial operation as the target operation.

[0080] The initial operation refers to the set of operations for the initial graph network output by the operation prediction model after receiving the initial graph network and the encoding vector as input. The initial operation may include adding new nodes, removing and adjusting nodes or edges in the initial graph network, etc. After the operation prediction model receives the initial graph network and the encoding vector, the initial operation for the initial graph network can be obtained.

[0081] 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.

[0082] 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.

[0083] Exemplarily, 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 the operation of the transmission line k2 or k5. If the operation on k2 or k5 is not included, that is, all the power equipment and transmission lines corresponding to the initial operation 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.

[0084] In the embodiments of the present 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, thereby 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.

[0085] 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 an 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.

[0086] Prediction operations are operations that the model performs on the output of the training graph network during training. The pre-recorded multiple prediction operations refer to the sequence of operations that are generated and saved by operating on a large number of training graph networks during the training of the prediction model. The recorded prediction operations are operations that have been verified to be able to convert the training graph network into a graph network that conforms to the tree structure.

[0087] When there are graph elements that do not belong to the initial operation set in the initial operation output by the operation prediction model, it means that the graph elements to be operated by the initial operation are missing in the initial graph network, that is, the initial operation is not feasible in the initial graph network and cannot be used as the target operation of the initial graph network. In order to find a feasible and effective operation plan, it is necessary to find qualified operations from multiple pre-recorded prediction operations, that is, the operated graph elements all belong to the target operation of the initial operation set, so as to ensure the target operation determined by the support of the initial graph network.

[0088] 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 power-consuming equipment and transmission lines in the original 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, that is, if there are transmission lines corresponding to the initial operation that are not included in the North District of A City power network to be optimized, then the initial operation is not feasible for the North District of A City power network 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 power equipment and transmission lines in City A to train the operation prediction model, and search in the prediction operations recorded to make each training graph network conform to the tree structure. The corresponding graph elements all belong to the prediction operations in the North District of A City power network to be optimized, as the target operation.

[0089] In the embodiments of the present 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.

[0090] 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.

[0091] 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 a basis for determining the target operation. Specifically, the second evaluation information may include but is not limited to the feasibility, effectiveness, optimization capability 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.

[0092] Specifically, after obtaining multiple candidate operations, a candidate graph network for operating 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.

[0093] 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. Among them, 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, which can reflect different performance indicators of graph networks from different angles. For example, graph network indicators may 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.

[0094] Exemplarily, 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 respectively 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.

[0095] 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.

[0096] In an optional embodiment of the present specification, searching for candidate operations whose graph elements all belong to an 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.

[0097] The number of records refers to the number of times the prediction operation corresponding to a certain initial candidate operation is recorded during the training process of the operation prediction model. Specifically, when the operation prediction model is in the training process, the prediction operation will be recorded because the prediction operation can make the training graph network conform to the tree structure after the operation. When operating a large number of training graph networks, some prediction operations may be used multiple times due to their effectiveness and applicability, and thus recorded multiple times. The number of records of these prediction operations reflects their successful application frequency in different scenarios.

[0098] See also Figure 5 , Figure 5 A schematic diagram of a method for recording prediction operations during operation prediction model training according to an embodiment of the present 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), predicted operation 5 (k5, k8); if not, it is determined whether this round of training for the operation prediction model is completed. If so, the trained prediction operation model is obtained; if not, the next training is continued.

[0099] The higher the number of records for the prediction operation, the higher the effectiveness of the prediction operation for the training graph network. However, due to the difference in structure between the initial graph network and the sample graph network including the training graph network, the number of records cannot reflect the effectiveness of the prediction operation for the initial graph network. Therefore, it is necessary to apply the candidate operations corresponding to these prediction 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 initial graph network operations can be operated in turn to obtain the candidate graph network.

[0100] Exemplarily, 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 order from the most to the least number of records, and the candidate operation 1 is first obtained to operate 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 the power network in the northern district of City A to be optimized, and the second candidate graph network is obtained.

[0101] 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 operations. 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.

[0102] In an optional embodiment of the present specification, determining second evaluation information of the operation prediction model according to the candidate graph network includes: Identify whether the candidate 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 the second evaluation information of the operation prediction model based on the graph network index.

[0103] The method for determining whether a graph network is a tree structure has been described in the above embodiments and will not be repeated here.

[0104] Meanwhile, the relevant introduction of the preset evaluation function has been explained in the aforementioned embodiment and will not be repeated here.

[0105] 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.

[0106] When it is determined that the candidate graph network conforms to the tree structure, the feasibility, effectiveness, optimization capability, 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, thereby determining the second evaluation information of the prediction operation model.

[0107] Further, after determining that the candidate graph network conforms to the tree structure, the preset evaluation function can be called to evaluate the graph network index of the candidate graph network, and then calculate the second evaluation information of the operation prediction model. For example, for the traffic network in the west 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, that is, the method of scheduling the traffic network, include: Traffic network scheduling method 1: closing road segment 320 to road segment 325; Traffic network scheduling method 2: closing road segment 330 to road segment 340, and canceling location 280 to location 285. The above two traffic network scheduling methods both eliminate the loops existing in the traffic network of the west district of City A, making the traffic network of the west district of City A conform to the tree structure and avoiding the congestion caused by traffic conflicts. At the same time, the traffic network of the west district of City A scheduled by the two traffic network scheduling methods is evaluated by the preset evaluation function, and the traffic map network index of the traffic network of the west district of City A to be scheduled after the traffic network scheduling method 1 is obtained, that is, the transportation capacity is increased by 25%, the road maintenance cost is reduced by 10%, etc., then the second evaluation information of the traffic network scheduling method 1 determined by the operation prediction model is determined to be 30% effective; the traffic map network index of the traffic network of the west district of City A to be scheduled after the traffic network scheduling method 2 is scheduled, that is, the transportation capacity is increased by 15%, the road maintenance cost is reduced by 20%, etc., then the second evaluation information of the traffic network scheduling method 2 determined by the operation prediction model is determined to be 20% effective. Then, according to the second evaluation information, a more effective candidate operation is determined, that is, the traffic network scheduling method 1 is used as the target operation.

[0108] For example, taking the power network to be optimized as an example, following the above example, see Figure 6 , Figure 6 A schematic diagram of a method for determining a target operation for a power network to be optimized according to an embodiment of the present specification is shown. Figure 6As shown: in 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 meet the operation set of the power network in the northern district of City A to be optimized are determined to 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. It is determined 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, a preset evaluation function is called to evaluate the transmission loss values ​​of the first candidate graph network and the second candidate graph network, and it is determined that the transmission loss value of the second candidate graph network is the smallest. The candidate operation 2 (k4, k7) corresponding to the second candidate graph network is used as the target operation.

[0109] 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, and selecting reasonable operation plans through quantitative evaluation, thereby improving the management and optimization of complex graph networks and ensuring the effective use of resources and maximization of system performance.

[0110] 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 the present specification is shown, which specifically includes the following steps.

[0111] 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, 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; Step 704: extract any training graph network based on the sample graph network; Step 706: input the training graph network into the initial operation prediction model to obtain the predicted operation for the training graph network; Step 708: Based on the predicted operation, train the operation prediction model.

[0112] The training of the operation prediction model can be performed using any training graph network extracted based on the sample graph network. Specifically, regarding the relevant technical features of the sample graph network and the technical solution of how to extract any training graph network from the sample graph network, please refer to the description of the technical solution in the operation prediction method for the graph network, and the embodiments of this specification will not be repeated.

[0113] After the training graph network is obtained, 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, the relevant technical features of the initial operation prediction model, and how to obtain the predicted operation and train the operation prediction model based on the predicted operation can be found in the description of the technical solution in the operation prediction method for the graph network, and the embodiments of this specification will not be repeated.

[0114] In the embodiments of the present 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 changed and unseen graph network structures.

[0115] In an optional embodiment of the present specification, a method for predicting 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 the present specification is shown, which specifically includes the following steps.

[0116] 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; Step 804: Mapping the initial operation set to the sample operation set to obtain a coding vector corresponding to a target graph element, wherein the sample operation set is constructed based on 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 of the initial power graph network; Step 806: Input the initial power graph network and the encoding vector into the operation prediction model to obtain the target operation for the initial power graph network, wherein the operation prediction model is trained based on the sample power graph network.

[0117] The initial power graph network is the power graph network that is obtained and needs to be processed, for example, it can be a power network to be optimized. The operable graph elements corresponding to the initial power graph network may include power equipment as nodes and transmission lines as edges, then the initial operation set of the initial power graph network may 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 may 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 peak power network of a certain city, a power network in the northern district of a certain city, a night power supply power network of a certain city, 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.

[0118] In the embodiments of the present specification, an initial power graph network is obtained and its corresponding initial operation set is determined, 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 significantly improving the management and optimization of complex power graph networks by using a fully trained operation prediction model, ensuring the effective use of resources and maximization of system performance.

[0119] In an optional embodiment of this specification, another operation prediction model training method is provided, see Fig. 9 , Fig. 9 A flowchart of an operation prediction model training method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0120] Step 902: 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 a target graph element, 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; Step 904: extracting any training power graph network based on the sample power graph network; Step 906: input the training power graph network into the initial operation prediction model to obtain a predicted operation for the training power graph network; Step 908: Based on the predicted operation, train the operation prediction model.

[0121] The training of the operation prediction model for predicting the operation of the power graph network can be performed using any training graph network extracted based on the sample graph network. 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.

[0122] Specifically, regarding 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 other related technical features, as well as how to extract any training graph network from the sample graph network, how to obtain predicted operations, and the technical solution for training the operation prediction model based on the predicted operations, please refer to the description of the technical solution in the operation prediction method for the power graph network mentioned above, and the embodiments of this specification will not be repeated here.

[0123] In the embodiments of the present 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 prediction operations, and then training the model based on these prediction 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 use of resources and efficient operation of the power system.

[0124] See also Fig.10 , Fig.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, as shown in Fig.10 As shown: In the operation prediction model training phase, the sample graph network and sample parameters are obtained. The sample parameters are the parameters of the corresponding sample graph network, indicating the state of the sample graph network. The sample operation set is determined according to 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 the 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. The reward r(t) is calculated according to the reward function configured in the system module and returned to the operation prediction model. The operation prediction model configuration strategy is updated according to the reward r(t). The system model also inputs the state s(t+1) of the training graph network after being processed by a(t) into the operation prediction model, and continues training until the preset stop training condition is reached.

[0125] In the prediction stage of the operation prediction model, the initial graph network is obtained, and the initial operation set is determined according to the graph elements in the initial graph network. The encoding vector corresponding to the target element is determined according to 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, and the target operation output that meets the initial operation set is queried among the initial candidate operations.

[0126] The following combination Fig.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 described. Fig.11 A processing flow chart of an operation prediction method for a graph network provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0127] 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.

[0128] Step 1104: Map graph elements according to 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.

[0129] Step 1106: Encode the target graph element to obtain the encoding vector corresponding to the target graph element.

[0130] 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.

[0131] Step 1110: Identify whether the graph element corresponding to the initial operation belongs to the initial operation set.

[0132] 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.

[0133] 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.

[0134] 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.

[0135] Step 1118: Based on the candidate operations, obtain a candidate power graph network that operates on the initial power graph network.

[0136] 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 the second evaluation information of the operation prediction model based on the graph network index.

[0137] Step 1122: Determine a target operation from candidate operations based on the second evaluation information.

[0138] 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 a coding vector, inputting the operation prediction model to obtain the initial operation and verifying its feasibility, searching for suitable candidate operations from the pre-recorded prediction operations when the initial operation is not feasible, 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 plan through quantitative evaluation, significantly improving the management and optimization of complex power graph networks in power network scenarios, and ensuring the effective use of resources and maximization of system performance.

[0139] Corresponding to the above method embodiment, this specification also provides an operation prediction device embodiment for a graph network. Fig.12 FIG. 1 is a schematic diagram showing a structure of an operation prediction device for a graph network provided according to an embodiment of the present specification. Fig.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.

[0140] Optionally, the first mapping module 1204 is further configured to: perform 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 the target graph element; encode the target graph element to obtain an encoding vector corresponding to the target graph element.

[0141] 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 an 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.

[0142] Optionally, the training module is further configured to: based on the prediction operation, obtain a prediction graph network that operates on the training graph network; 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.

[0143] 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.

[0144] 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 an 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.

[0145] 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.

[0146] 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 multiple 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.

[0147] 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; and 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.

[0148] 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.

[0149] The above is a schematic scheme of an operation prediction device for a graph network of this embodiment. It should be noted that the technical scheme of the operation prediction device for a graph network and the technical scheme of the operation prediction method for a graph network are of the same concept. For details not described in detail in the technical scheme of the operation prediction device for a graph network, please refer to the description of the technical scheme of the operation prediction method for a graph network.

[0150] Corresponding to the above method embodiment, this specification also provides an operation prediction model training device embodiment, Fig.13 FIG. 2 shows a schematic diagram of a structure of an operation prediction model training device provided according to an embodiment of the present specification. Fig.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.

[0151] The above is a schematic scheme of an operation prediction model training device of this embodiment. It should be noted that the technical scheme of the operation prediction model training device and the technical scheme of the above operation prediction model training method belong to the same concept, and the details not described in detail in the technical scheme of the operation prediction model training device can be found in the description of the technical scheme of the above operation prediction model training method.

[0152] Corresponding to the above method embodiment, this specification also provides an operation prediction device embodiment for a power graph network. Fig.14 FIG. 1 shows a schematic diagram of a structure of an operation prediction device for a power graph network provided according to an embodiment of the present specification. Fig.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.

[0153] The above is a schematic scheme of an operation prediction device for a power graph network of this embodiment. It should be noted that the technical scheme of the operation prediction device for a power graph network and the technical scheme of the operation prediction method for a power graph network belong to the same concept, and the details not described in detail in the technical scheme of the operation prediction device for a power graph network can be referred to the description of the technical scheme of the operation prediction method for a power graph network.

[0154] Corresponding to the above method embodiment, this specification also provides another operation prediction model training device embodiment, Fig.15 FIG. 2 shows a schematic diagram of a structure of an operation prediction model training device provided according to an embodiment of the present specification. Fig.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.

[0155] The above is a schematic scheme of an operation prediction model training device of this embodiment. It should be noted that the technical scheme of the operation prediction model training device and the technical scheme of the above operation prediction model training method belong to the same concept, and the details not described in detail in the technical scheme of the operation prediction model training device can be found in the description of the technical scheme of the above operation prediction model training method.

[0156] Fig.16 The block diagram of a computing device 1600 according to one embodiment of the present specification is shown. The 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 the database 1650 is used to store data.

[0157] The computing device 1600 also includes an access device 1640 that enables the computing device 1600 to communicate via one or more networks 1660. Examples of these 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. The access device 1640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0158] In one embodiment of the present specification, the above components of the computing device 1600 and Fig.16 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.16 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0159] The computing device 1600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1600 may also be a mobile or stationary server.

[0160] The processor 1620 is used to execute the following computer program / instructions, which implement the steps of the above method when executed by the processor.

[0161] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above method belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can all be referred to the description of the technical scheme of the above method.

[0162] An embodiment of this specification also provides a computer-readable storage medium, which stores a computer program / instruction, and the steps of the above method are implemented when the computer program / instruction is executed by the processor. The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the above method belong to the same concept, and the details of the technical solution of the storage medium that are not described in detail can be found in the description of the technical solution of the above method.

[0163] An embodiment of this specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above method when executed by a processor. The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical solution of the computer program and the technical solution of the above method belong to the same concept, and the details of the technical solution of the computer program that are not described in detail can be found in the description of the technical solution of the above method.

[0164] The above describes a specific embodiment of the present specification. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in a different order from that in the embodiments and still achieve the desired results. In addition, the process depicted in the drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-tasking and parallel processing are also possible or may be advantageous. The computer instructions include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0165] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all described 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, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the embodiments of this specification.

[0166] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0167] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to 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 technicians in the relevant technical field can understand and use this specification well. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. An operation prediction method for a graph network, comprising: 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; 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 a 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; 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. According to the method of claim 1, mapping the initial operation set to the sample operation set to obtain the encoding vector corresponding to the 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 the operation prediction model to obtain the 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; Based on the predicted operation, the operation prediction model is trained.

4. The method according to claim 3, wherein the training of 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 the first evaluation information of the operation prediction model according to the prediction graph network comprises: Identify 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. According to the method according to any one of claims 1 to 5, 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; Identify 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 a target operation.

7. The method according to claim 6, after identifying whether the graph element corresponding to the initial operation belongs to the initial operation set, further comprising: 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 a plurality of pre-recorded prediction 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 operating on the initial graph network; Determining second evaluation information of the operation prediction model according to the candidate graph network; Based on the second evaluation information, a target operation is determined from the candidate operations.

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 prediction 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 the second evaluation information of the operation prediction model according to the candidate graph network comprises: Identify whether the candidate graph network conforms to the tree structure; If so, a preset evaluation function is called to evaluate the graph network indicators of the candidate graph network, and based on the graph network indicators, second evaluation information of the operation prediction model is determined.

11. A method for training an operation prediction model, comprising: 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 an initial operation set to determine a target graph element, 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; 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; Based on the predicted operation, the operation prediction model is trained.

12. An operation prediction method for a power graph network, comprising: 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; 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 a sample power graph network, and the target graph element is a graph element in the sample power graph network corresponding to a graph element of the initial power graph network; The initial power graph network and the encoding vector are input 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.

13. A method for training an operation prediction model, comprising: 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 an initial operation set to determine a target graph element, 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 of the initial power graph network; Based on the sample power graph network, extract any training power graph network; Inputting the trained power graph network into an initial operation prediction model to obtain a predicted operation for the trained power graph network; Based on the predicted operation, the operation prediction model is trained.

14. 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 programs / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 11 are implemented.

15. 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 11.

16. 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 11.

Citation Information

Patent Citations

  • Method for providing agent for creating graph neural network architecture and method for creating graph neural network architecture by agent

    CN115049049A

  • Lung cancer pathology high risk factor prediction method and device based on graph convolutional neural network

    CN115631387A

  • Power grid key node identification method

    CN116502381A

  • Human body different structure motion data prediction method driven by graph attention network

    CN118230415A

  • Training scoring method based on natural language

    CN118467985A