A power grid dispatching method and system based on a graph database
By using a graph database-based power grid dispatching method, power grid data is collected, preprocessed, and constructed, and dispatching tasks are identified and executed. This solves the problem of the single human-computer interaction mode in the power system dispatching and control system, and improves the efficiency and quality of power grid dispatching.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED
- Filing Date
- 2025-07-18
- Publication Date
- 2026-04-14
AI Technical Summary
The current human-machine interaction mode of the power system dispatch and control system is too simple, resulting in low work efficiency and quality of dispatch personnel. There is a need for an efficient power grid dispatching method to handle dispatching tasks in power grid operation.
A power grid dispatching method based on graph database is adopted. By collecting power grid data, preprocessing it, performing word segmentation, constructing a graph database, and matching query statements, dispatching tasks can be identified and executed.
It enables efficient handling of dispatching tasks in power grid operation, improving the work efficiency and quality of dispatching personnel.
Smart Images

Figure CN120873248B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power grid dispatching technology, and more specifically to a power grid dispatching method and system based on a graph database. Background Technology
[0002] Power system dispatching involves numerous power plants supplying electricity to a wide range of users through transmission, transformation, distribution, and supply networks. It is a complex system where production, supply, and consumption processes are completed and balanced simultaneously. Therefore, its dispatching tasks differ from general industrial production dispatching. Power system dispatching must maintain a constant balance between power generation and load, requiring every department within its jurisdiction to strictly complete dispatching tasks with high quality and quantity. Current dispatching control systems still rely on relatively simple human-machine interaction methods, which urgently need improvement to significantly enhance the work efficiency and quality of dispatching personnel. Therefore, a graph database-based power grid dispatching method is needed to efficiently handle dispatching tasks during power grid operation. Summary of the Invention
[0003] The purpose of this invention is to provide a power grid dispatching method and system based on a graph database, which can efficiently handle dispatching tasks during power grid operation.
[0004] To achieve the above objectives, embodiments of the present invention provide a power grid dispatching method based on a graph database, the power grid dispatching method comprising:
[0005] Collect power grid data from the power grid dispatching system and preprocess the power grid data, wherein the power grid data includes the power grid dispatching scheme;
[0006] The preprocessed power grid data is then segmented into words to divide the text data of the power grid data into multiple words.
[0007] The segmented text data is fed into the network node extraction model to extract entities from the text data and construct relationships between entities, thereby building a graph database about the power grid dispatching system.
[0008] The matching module obtains the query statement and identifies the corresponding scheduling task in the graph database based on the query statement;
[0009] Identify the scheduled tasks that need to be executed and then execute them.
[0010] Optionally, power grid data is collected from the power grid dispatching system, and the power grid data is preprocessed, including:
[0011] Acquire the power grid data;
[0012] Remove irrelevant tags from the power grid data;
[0013] Delete duplicate text, blank characters, and invalid symbols from the power grid data;
[0014] Words that have no real meaning in the power grid data are deleted to reduce dimensionality.
[0015] Optionally, the segmented text data is fed into a network node extraction model to extract entities from the text data and construct relationships between entities, thereby building a graph database about the power grid dispatching system, including:
[0016] Select a preset graph database;
[0017] The text data after word segmentation is obtained, and entity recognition is performed on the text data;
[0018] Based on the identified entities, determine the text containing different entities, and then extract the relationships between the entities from the text containing the entities.
[0019] The extracted entities and relationships are mapped to nodes and edges in the graph database and loaded into the graph database, where the nodes and edges represent different scheduling tasks in the power grid.
[0020] Optionally, a graph database of the power grid dispatching system can be constructed, including:
[0021] Retrieve the nodes and edges from the graph database;
[0022] The range of the number of edges between the nodes is preset;
[0023] Get the number of edges between the nodes;
[0024] The distance between the nodes is obtained using formula (1):
[0025] Formula (1),
[0026] in, Indicates the distance between nodes. Represents the ideal distance between nodes. , This represents the maximum and minimum values within a range of quantities. This indicates the number of edges between nodes. Represents the step function, in Greater than hour, The remaining terms are 0. Less than hour, The remaining terms are 0. exist and When the interval is between, all other terms are 0.
[0027] Optionally, the matching module obtains the query statement and identifies the corresponding scheduling task in the graph database based on the query statement, including:
[0028] Obtain the query statement and perform entity recognition on the query statement to obtain the entities in the query statement;
[0029] Determine whether the number of entities in the query statement exceeds one;
[0030] If the number of entities in the query statement exceeds one, the entities in the query statement are matched with the nodes in the graph database;
[0031] After the matching is completed, calculate the shortest distance between the corresponding nodes in the query statement, as well as the nodes traversed by the shortest distance;
[0032] The nodes traversed by the shortest distance are used as the matching nodes in the query statement.
[0033] Optionally, the matching module obtains the query statement and identifies the corresponding scheduling task in the graph database based on the query statement, including:
[0034] If the number of entities in the query statement does not exceed one, the entities in the query statement are matched with the nodes in the graph data, and the edges corresponding to the matched nodes are combined.
[0035] The scheduling tasks corresponding to the matching combinations of nodes and edges are selected as candidate scheduling tasks.
[0036] The candidate scheduling tasks are filtered to determine the scheduling task corresponding to the query statement.
[0037] Optionally, the matching module obtains the query statement and identifies the corresponding scheduling task in the graph database based on the query statement, including:
[0038] Retrieve the matching nodes in the query statement;
[0039] For each matching node and its corresponding edge, construct a set of combinations of matching nodes and edges;
[0040] The combinations of matching nodes and edges in the set are sorted, and the similarity between the query statement and the combinations of matching nodes and edges is used as the relevance.
[0041] Calculate the ranking score according to formula (2):
[0042] Formula (2),
[0043] in, This indicates the score for sorting. The positional parameter represents the combination of matching nodes and edges in the sorting process. This indicates the number of combinations of matching nodes and edges in the sorted sequence. Indicates the first The relevance of a combination of matching nodes and edges;
[0044] The matching nodes and edges are arranged in an ideal order, and the relevant position parameters and relevance are substituted into formula (2) to obtain the ideal score;
[0045] Calculate the normalized cumulative gain based on formula (3):
[0046] Formula (3),
[0047] in, This represents the normalized cumulative gain. Indicates the ideal score;
[0048] The matching module is trained with the goal of maximizing the cumulative gain of the normalized loss, so that the matching module can find the corresponding node in the graph database according to the query statement and generate the optimal sorting of the combination of matching nodes and edges.
[0049] Optionally, the matching module obtains the query statement and identifies the corresponding scheduling task in the graph database based on the query statement, including:
[0050] Obtain the optimal sorting of the combinations of matching nodes and edges generated by the matching module;
[0051] Filter the combinations of matching nodes and edges that are at the top of the optimal sort;
[0052] The corresponding scheduling task is obtained based on the combination of matching nodes and edges obtained through filtering.
[0053] The obtained scheduling tasks are further filtered to determine the scheduling tasks that match the query statement.
[0054] Optionally, the graph database of the power grid dispatching system includes: dispatching specification graph, dispatching plan graph, power grid event graph, and abnormal event graph.
[0055] On the other hand, the present invention also provides a power grid dispatching system based on a graph database, the power grid dispatching system comprising:
[0056] The data acquisition module is used to acquire power grid data from the power grid dispatching system and to preprocess the power grid data.
[0057] The word processing module is used to perform word segmentation on the preprocessed power grid data to divide the text data of the power grid data into multiple words;
[0058] The graph database construction module is used to input the word-segmented text data into the network node extraction model to extract entities from the text data and build relationships between entities, thereby constructing a graph database about the power grid dispatching system.
[0059] The matching module is used to obtain the query statement and identify the corresponding scheduling task in the graph database based on the query statement;
[0060] The execution module is used to determine the scheduled tasks that need to be executed and to carry them out.
[0061] Through the above technical solution, the present invention provides a power grid dispatching method and system based on a graph database. This method collects power grid data from a power grid dispatching system and preprocesses the data to meet subsequent computational requirements. The power grid data may include power grid dispatching schemes. After preprocessing, the preprocessed data can be segmented into multiple words. The segmented text data is then fed into a network node extraction model to extract entities and construct relationships between them, thereby building a graph database of the power grid dispatching system. After obtaining the graph database, a matching module can acquire a query statement and identify corresponding nodes and edges in the database. The corresponding dispatching task can then be determined based on the combination of these nodes and edges. Once the dispatching task is obtained, it can be executed. This power grid dispatching method can efficiently handle dispatching tasks during power grid operation.
[0062] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0063] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:
[0064] Figure 1 This is a flowchart of a power grid dispatching method based on a graph database according to an embodiment of the present invention;
[0065] Figure 2 This is a flowchart of the preprocessing of a power grid dispatching method based on a graph database according to an embodiment of the present invention;
[0066] Figure 3 This is a flowchart illustrating the construction of a graph database in a power grid dispatching method based on a graph database according to an embodiment of the present invention;
[0067] Figure 4 This is a flowchart illustrating the process of obtaining the distance between nodes in a power grid dispatching method based on a graph database according to an embodiment of the present invention.
[0068] Figure 5 This is a first flowchart of a power grid dispatching method based on a graph database according to an embodiment of the present invention, which describes the acquisition of matching nodes.
[0069] Figure 6 This is a first flowchart of a graph database-based power grid dispatching method for obtaining dispatching tasks according to an embodiment of the present invention.
[0070] Figure 7 This is a second flowchart of a power grid dispatching method based on a graph database according to an embodiment of the present invention, illustrating the acquisition of dispatching tasks. Detailed Implementation
[0071] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0072] In the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned. These should be regarded as exemplary and are only intended to illustrate the feasibility of implementing the technical solution of this application. However, they do not mean that the applicant has used or necessarily used the solution.
[0073] Figure 1 This is a flowchart of a power grid dispatching method based on a graph database according to an embodiment of the present invention. In this invention, the power grid dispatching method may include the following steps:
[0074] In step S1, power grid data from the power grid dispatching system is collected and preprocessed, wherein the power grid data includes the power grid dispatching scheme.
[0075] In step S2, the preprocessed power grid data is segmented into words to divide the text data of the power grid data into multiple words.
[0076] In step S3, the segmented text data is fed into the network node extraction model to extract entities from the text data and build relationships between entities, thereby constructing a graph database about the power grid dispatching system.
[0077] In step S4, the matching module obtains the query statement and identifies the corresponding scheduling task in the graph database based on the query statement.
[0078] In step S5, the scheduled tasks to be executed are determined and then executed.
[0079] In this invention, when determining the required scheduling task, power grid data from the power grid dispatching system can be collected. This data can then be preprocessed to meet subsequent computational requirements. The power grid data may include the power grid's dispatching scheme. After preprocessing, the preprocessed data can be segmented into multiple words. The segmented text data can then be fed into the network node extraction model to extract entities and construct relationships between them, thereby building a graph database of the power grid dispatching system. After obtaining the graph database, the matching module can acquire a query statement and identify corresponding nodes and edges in the database. The corresponding scheduling task can then be determined based on the combination of these nodes and edges. Once the corresponding scheduling task is obtained, it can be executed. This power grid dispatching method can efficiently handle dispatching tasks during power grid operation.
[0080] In one embodiment of the present invention, such as Figure 2 As shown, the preprocessing flow may include:
[0081] In step S6, power grid data is acquired.
[0082] In step S7, irrelevant tags in the power grid data are deleted.
[0083] In step S8, duplicate text, blank characters, and invalid symbols in the power grid data are deleted.
[0084] In step S9, words that have no substantial meaning in the power grid data are deleted to reduce dimensionality.
[0085] In the present invention, when performing subsequent calculations on power grid data, the power grid data can be preprocessed first. During preprocessing, irrelevant tags in the power grid data can be deleted first to avoid subsequent impacts. After deletion, duplicate texts, blank fonts, and invalid symbols in the power grid data can be deleted, and then meaningless words in the power grid data, such as "de", etc., can be deleted, thereby reducing the dimension.
[0086] In an embodiment of the present invention, as Figure 3 shown, the process of constructing a graph database may include:
[0087] In step S10, a preset graph database is selected.
[0088] In step S11, the text data after word segmentation is obtained, and entity recognition is performed on the text data.
[0089] In step S12, according to the recognized entities, the texts where different entities are located are determined, and then the relationships between the entities are extracted from the texts where the entities are located.
[0090] In step S13, the extracted entities and relationships are mapped to the nodes and edges of the graph database and loaded into the graph database. The nodes and edges represent different scheduling tasks in the power grid.
[0091] In the present invention, after preprocessing and word segmentation of the power grid data, the word-segmented power grid data can be extracted to construct a graph database. When constructing the graph database, a preset graph database can be selected first. The preset graph database can be a commonly used graph database in the existing market. The text data after word segmentation is obtained, and entity recognition can be performed on the text data. After entity recognition is completed, according to the recognized entities, the texts where different entities are located are determined, and then the relationships between the entities can be extracted from the texts where the entities are located, thereby extracting the relationships between the entities. According to the extracted entities and the relationships between the entities, they are mapped to the nodes and edges of the graph database and can be loaded into the graph database, thereby completing the construction of the graph database. In this graph database, the nodes and edges can represent different scheduling tasks in the power grid.
[0092] In an embodiment of the present invention, as Figure 4 shown, the process of obtaining the distance between nodes may include:
[0093] In step S14, the nodes and edges in the graph database are obtained.
[0094] In step S15, a range interval of the number of edges between nodes is preset.
[0095] In step S16, the number of edges between nodes is obtained.
[0096] In step S17, the distance between nodes is obtained using formula (1):
[0097] Formula (1),
[0098] in, Indicates the distance between nodes. Represents the ideal distance between nodes. , This represents the maximum and minimum values within a range of quantities. This indicates the number of edges between nodes. Represents the step function, in Greater than hour, The remaining terms are 0. Less than hour, The remaining terms are 0. exist and When the interval is between, all other terms are 0.
[0099] In this invention, after constructing the graph database of the power grid dispatching system, the distances between nodes within the graph database can be calculated to facilitate subsequent calculations. When calculating the distances between nodes, the nodes and edges in the graph database can be obtained first, and then the range of the number of edges between the nodes can be preset. Because the relationships between nodes may be varied, the number of edges between nodes may also be multiple. After obtaining the number of edges between nodes, the distance between nodes can be obtained according to formula (1). In the graph database, the distance between nodes is determined based on the number of edges between them, making nodes with more relationships closer together, thus facilitating subsequent node searches.
[0100] In one embodiment of the present invention, such as Figure 5 As shown, the process of obtaining matching nodes may include:
[0101] In step S18, the query statement is obtained, and entity recognition is performed on the query statement to obtain the entities in the query statement.
[0102] In step S19, it is determined whether the number of entities in the query statement exceeds one.
[0103] In step S20, if the number of entities in the query statement exceeds one, the entities in the query statement are matched with nodes in the graph database.
[0104] In step S21, after the matching is completed, the shortest distance between the corresponding nodes in the query statement and the nodes traversed by the shortest distance are calculated.
[0105] In step S22, the node traversed by the shortest distance is used as the matching node in the query statement.
[0106] In this invention, when obtaining matching nodes, the query statement can be obtained first, and then entity recognition can be performed on the query statement to obtain the entities in the query statement. After obtaining the entities, it can be determined whether the number of entities in the query statement exceeds one. If the number of entities in the query statement exceeds one, the entities in the query statement can be matched with nodes in the graph database. After the matching is completed, the shortest distance between the corresponding nodes in the query statement and the nodes traversed by the shortest distance can be calculated. After obtaining the nodes traversed by the shortest distance, these nodes can be used as matching nodes in the query statement. This method can uncover nodes not indicated in the query statement, thereby obtaining a more complete scheduling task.
[0107] In one embodiment of the present invention, such as Figure 6 As shown, the process of obtaining matching nodes may also include:
[0108] In step S23, if the number of entities in the query statement does not exceed one, the entities in the query statement are matched with the nodes in the graph data, and the edges corresponding to the matched nodes are combined.
[0109] In step S24, the scheduling tasks corresponding to the matching combinations of nodes and edges are taken as candidate scheduling tasks;
[0110] In step S25, candidate scheduling tasks are filtered to determine the scheduling task corresponding to the query statement.
[0111] In this invention, if the number of entities in the query statement does not exceed one, the entities in the query statement can be matched with nodes in the graph database, and the matched nodes and their corresponding edges can be combined. After combination, the scheduling tasks corresponding to the combinations of matched nodes and edges can be used as candidate scheduling tasks. After obtaining the candidate scheduling tasks, they can be filtered to determine the scheduling task corresponding to the query statement. This filtering method can be performed manually by staff to obtain the most suitable scheduling task.
[0112] In one embodiment of the present invention, such as Figure 6 As shown, the first step in obtaining a scheduled task may include:
[0113] In step S26, the matching nodes in the query statement are obtained.
[0114] In step S27, for each matching node and its corresponding edge, a set of combinations of matching nodes and edges is constructed.
[0115] In step S28, the combinations of matching nodes and edges in the set are sorted, and the similarity between the query statement and the combination of matching nodes and edges is used as the relevance.
[0116] In step S29, the ranking score is calculated according to formula (2):
[0117] Formula (2),
[0118] in, This indicates the score for sorting. The positional parameter represents the combination of matching nodes and edges in the sorting process. This indicates the number of combinations of matching nodes and edges in the sorted sequence. Indicates the first The correlation of a combination of matching nodes and edges.
[0119] In step S30, the combination of matching nodes and edges is arranged in an ideal order and the relevant position parameters and relevance are substituted into formula (2) to obtain the ideal score.
[0120] In step S31, the normalized cumulative gain of loss is calculated according to formula (3):
[0121] Formula (3),
[0122] in, This represents the normalized cumulative gain. This indicates the ideal score.
[0123] In step S32, the matching module is trained with the goal of maximizing the cumulative gain of normalized loss, so that the matching module can find the corresponding node in the graph database according to the query statement and generate the optimal sorting of the combination of matching nodes and edges.
[0124] In this invention, after obtaining the matching nodes in the query statement, since the relationships between nodes can be varied, there can also be multiple edges between nodes, and thus multiple combinations of nodes and edges. Therefore, a set of combinations of matching nodes and edges can be constructed for the matching nodes and their corresponding edges. After obtaining the set, the combinations of matching nodes and edges in the set can be sorted, and the similarity between the query statement matching and the combination of the matching node and edge can be used as the relevance. After obtaining the relevance, the sorting score can be calculated according to formula (2). After obtaining the score, the normalized cumulative gain can be calculated according to formula (3). After obtaining the normalized cumulative gain, the matching module can be trained with the normalized cumulative gain as the maximum target, so that the matching module can query the corresponding node in the graph database according to the query statement and generate the optimal sorting of the combination of matching nodes and edges.
[0125] In one embodiment of the present invention, such as Figure 7 As shown, the second process for obtaining the scheduled task may include:
[0126] In step S33, the optimal sorting of the combinations of matching nodes and edges generated by the matching module is obtained.
[0127] In step S34, the combinations of matching nodes and edges at the top of the optimal sort are filtered.
[0128] In step S35, the corresponding scheduling task is obtained based on the combination of matching nodes and edges obtained through filtering.
[0129] In step S36, the obtained corresponding scheduling tasks are further filtered to determine the corresponding scheduling tasks that match the query statement.
[0130] In this invention, after obtaining the optimal ranking of the combinations of matching nodes and edges generated by the matching module, the top-ranking combinations of matching nodes and edges in this optimal ranking can be filtered. Based on the filtered combinations of matching nodes and edges, the corresponding scheduling tasks can be obtained. After obtaining the corresponding scheduling tasks, further filtering can be performed on these tasks to determine the scheduling tasks that match the query statement. This further filtering can be done manually by staff.
[0131] In one embodiment of the present invention, the graph database of the power grid dispatching system may include: dispatching specification graph, dispatching plan graph, power grid event graph, and abnormal event graph.
[0132] On the other hand, the present invention can also provide a power grid dispatching system based on a graph database. The power grid dispatching system includes: a data acquisition module, a word processing module, a graph database construction module, a matching module, and an execution module. The data acquisition module is used to acquire power grid data from the power grid dispatching system and preprocess the power grid data. The word processing module is used to segment the preprocessed power grid data into words, dividing the text data of the power grid data into multiple words. The graph database construction module is used to input the segmented text data into a network node extraction model to extract entities from the text data and construct relationships between entities, thereby constructing a graph database about the power grid dispatching system. The matching module is used to obtain query statements and identify corresponding dispatching tasks in the graph database based on the query statements. The execution module is used to determine the dispatching tasks to be executed and perform them.
[0133] Through the above technical solution, the present invention provides a power grid dispatching method and system based on a graph database. This method collects power grid data from a power grid dispatching system and preprocesses the data to meet subsequent computational requirements. The power grid data may include power grid dispatching schemes. After preprocessing, the preprocessed data can be segmented into multiple words. The segmented text data is then fed into a network node extraction model to extract entities and construct relationships between them, thereby building a graph database of the power grid dispatching system. After obtaining the graph database, a matching module can acquire a query statement and identify corresponding nodes and edges in the database. The corresponding dispatching task can then be determined based on the combination of these nodes and edges. Once the dispatching task is obtained, it can be executed. This power grid dispatching method can efficiently handle dispatching tasks during power grid operation.
[0134] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0135] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0136] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0137] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0138] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0139] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0140] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0141] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0142] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A power grid dispatching method based on a graph database, characterized in that, The power grid dispatching method includes: Collect power grid data from the power grid dispatching system and preprocess the power grid data, wherein the power grid data includes the power grid dispatching scheme; The preprocessed power grid data is then segmented into words to divide the text data of the power grid data into multiple words. The segmented text data is fed into the network node extraction model to extract entities from the text data and construct relationships between entities, thereby building a graph database about the power grid dispatching system. The matching module obtains the query statement and identifies the corresponding scheduling task in the graph database based on the query statement; Identify the scheduled tasks that need to be executed and then execute them. The segmented text data is fed into a network node extraction model to extract entities from the text data and construct relationships between entities, thereby building a graph database about the power grid dispatching system, including: Select a preset graph database; The text data after word segmentation is obtained, and entity recognition is performed on the text data; Based on the identified entities, determine the text containing different entities, and then extract the relationships between the entities from the text containing the entities. The extracted entities and relationships are mapped to nodes and edges in the graph database and loaded into the graph database, where the nodes and edges represent different scheduling tasks in the power grid; Construct a graph database for the power grid dispatching system, including: Retrieve the nodes and edges from the graph database; The range of the number of edges between the nodes is preset; Get the number of edges between the nodes; The distance between the nodes is obtained using formula (1): Official (1), in, Indicates the distance between nodes. Represents the ideal distance between nodes. , This represents the maximum and minimum values within a range of quantities. This indicates the number of edges between nodes. Represents the step function, in Greater than hour, The remaining terms are 0. Less than hour, The remaining terms are 0. exist and When the interval is between, all other terms are 0.
2. The power grid dispatching method according to claim 1, characterized in that, Collect power grid data from the power grid dispatching system and preprocess the power grid data, including: Acquire the power grid data; Remove irrelevant tags from the power grid data; Delete duplicate text, blank characters, and invalid symbols from the power grid data; Words that have no real meaning in the power grid data are deleted to reduce dimensionality.
3. The power grid dispatching method according to claim 1, characterized in that, The matching module obtains the query statement and identifies the corresponding scheduling task in the graph database based on the query statement, including: Obtain the query statement and perform entity recognition on the query statement to obtain the entities in the query statement; Determine whether the number of entities in the query statement exceeds one; If the number of entities in the query statement exceeds one, the entities in the query statement are matched with the nodes in the graph database; After the matching is completed, calculate the shortest distance between the corresponding nodes in the query statement, as well as the nodes traversed by the shortest distance; The nodes traversed by the shortest distance are used as the matching nodes in the query statement.
4. The power grid dispatching method according to claim 3, characterized in that, The matching module obtains the query statement and identifies the corresponding scheduling task in the graph database based on the query statement, including: If the number of entities in the query statement does not exceed one, the entities in the query statement are matched with the nodes in the graph data, and the edges corresponding to the matched nodes are combined. The scheduling tasks corresponding to the matching combinations of nodes and edges are selected as candidate scheduling tasks. The candidate scheduling tasks are filtered to determine the scheduling task corresponding to the query statement.
5. The power grid dispatching method according to claim 3, characterized in that, The matching module obtains the query statement and identifies the corresponding scheduling task in the graph database based on the query statement, including: Retrieve the matching nodes in the query statement; For each matching node and its corresponding edge, construct a set of combinations of matching nodes and edges; The combinations of matching nodes and edges in the set are sorted, and the similarity between the query statement and the combinations of matching nodes and edges is used as the relevance. Calculate the ranking score according to formula (2): Official (2), in, This indicates the score for sorting. The positional parameter represents the combination of matching nodes and edges in the sorting process. This indicates the number of combinations of matching nodes and edges in the sorted sequence. Indicates the first The relevance of a combination of matching nodes and edges; The matching nodes and edges are arranged in an ideal order, and the relevant position parameters and relevance are substituted into formula (2) to obtain the ideal score; Calculate the normalized cumulative gain based on formula (3): Official (3), in, This represents the normalized cumulative gain. Indicates the ideal score; The matching module is trained with the goal of maximizing the cumulative gain of the normalized loss, so that the matching module can find the corresponding node in the graph database according to the query statement and generate the optimal sorting of the combination of matching nodes and edges.
6. The power grid dispatching method according to claim 5, characterized in that, The matching module obtains the query statement and identifies the corresponding scheduling task in the graph database based on the query statement, including: Obtain the optimal sorting of the combinations of matching nodes and edges generated by the matching module; Filter the combinations of matching nodes and edges that are at the top of the optimal sort; The corresponding scheduling task is obtained based on the combination of matching nodes and edges obtained through filtering. The obtained scheduling tasks are further filtered to determine the scheduling tasks that match the query statement.
7. The power grid dispatching method according to claim 1, characterized in that, The graph database of the power grid dispatching system includes: dispatching specification graph, dispatching plan graph, power grid event graph, and abnormal event graph.
8. A power grid dispatching system based on a graph database, characterized in that, The power grid dispatching system includes: The data acquisition module is used to acquire power grid data from the power grid dispatching system and to preprocess the power grid data. The word processing module is used to perform word segmentation on the preprocessed power grid data to divide the text data of the power grid data into multiple words; The graph database construction module is used to input the word-segmented text data into the network node extraction model to extract entities from the text data and build relationships between entities, thereby constructing a graph database about the power grid dispatching system. The matching module is used to obtain the query statement and identify the corresponding scheduling task in the graph database based on the query statement; The execution module is used to determine the scheduled tasks that need to be executed and to perform them. The segmented text data is fed into a network node extraction model to extract entities from the text data and construct relationships between entities, thereby building a graph database about the power grid dispatching system, including: Select a preset graph database; The text data after word segmentation is obtained, and entity recognition is performed on the text data; Based on the identified entities, determine the text containing different entities, and then extract the relationships between the entities from the text containing the entities. The extracted entities and relationships are mapped to nodes and edges in the graph database and loaded into the graph database, where the nodes and edges represent different scheduling tasks in the power grid; Construct a graph database for the power grid dispatching system, including: Retrieve the nodes and edges from the graph database; The range of the number of edges between the nodes is preset; Get the number of edges between the nodes; The distance between the nodes is obtained using formula (1): Official (1), in, Indicates the distance between nodes. Represents the ideal distance between nodes. , This represents the maximum and minimum values within a range of quantities. This indicates the number of edges between nodes. Represents the step function, in Greater than hour, The remaining terms are 0. Less than hour, The remaining terms are 0. exist and When the interval is between, all other terms are 0.
Citation Information
Patent Citations
Power grid dispatching method and system based on graph database
CN112418736A