Intelligent Query System and Method for Transmission and Distribution Production Data Based on Natural Language Interaction

By building a metadatabase and setting the semantic relationship between hard rules and soft rules, calculating the relationship strength and giving weights, cross-database interoperability and fuzzy query problems in power transmission and distribution production data query are solved, data fusion and accurate query results are realized, and user experience is improved.

CN120256451BActive Publication Date: 2025-08-01ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510750132.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-08-01
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

Traditional power transmission and distribution production data query methods are difficult to obtain the required information quickly and accurately, especially when the user query is vague or unclear, the result error is large and it is difficult to communicate between different databases.

Method used

By collecting multi-source database data, building metadatabases, setting up hard rules and soft rules to establish semantic associations across database fields, calculating relationship strength and giving weights, monitoring metadata increments for updates, and combining natural language processing to realize in-depth reasoning and visualization results display of user query intentions.

Benefits of technology

It realizes data fusion and sharing, improves query accuracy and efficiency, reduces user operation steps, and improves query success rate and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256451B_ABST
    Figure CN120256451B_ABST
Patent Text Reader

Abstract

The present invention discloses an intelligent query system and method for power transmission and distribution production data based on natural language interaction, which relates to the technical field of knowledge graphs. The present invention collects multi-source databases in power transmission and distribution production, constructs basic metadata units and calculates statistical features, and constructs a metadata database; sets hard rules and soft rules for the metadata database, uses the two rules to establish semantic associations across database fields, and constructs an initial dynamic data graph; assigns weights to the edges of the dynamic data graph using relationship strength; monitors metadata increments, sets update strategies to update the dynamic data graph; extracts entities in the query statement, determines the ambiguity, maps the entities to the dynamic data graph to formulate an active guidance strategy to obtain the user's query intention; infers query results in the dynamic data graph according to the user's query intention, and constructs a visualization chart using the query results to display the query results to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of knowledge graphs, and specifically to an intelligent query system and method for power transmission and distribution production data based on natural language interaction. Background Art

[0002] With the continuous expansion of the power grid scale and the improvement of the informatization level of the power system, a large amount of data has been generated in the power transmission and distribution production process, including equipment operation data, power grid topology data, maintenance records, fault reports, etc. These data are scattered in different systems and databases, with various formats, and it is difficult to quickly and accurately obtain the required information through traditional query methods. The power transmission and distribution business involves multiple professional fields and links. When staff conduct data queries, they often need to comprehensively consider multiple factors and conditions. For example, to query the operation status of specific types of equipment in a certain area, multiple data sources such as equipment ledgers, real-time monitoring data, and historical fault records need to be associated. The writing of traditional query statements is complex, and the technical requirements for business personnel are relatively high. With the continuous progress of artificial intelligence technologies such as natural language processing, knowledge graphs, and deep learning, new ideas and methods have been provided for solving the problem of power transmission and distribution production data query. NLP technology can understand human natural language and convert the user's query intention into instructions executable by a computer.

[0003] However, when using natural language processing technology to analyze the user's query intention and simplify the user's data query process today, when the user's question is vague and there are no clear keywords, it greatly affects the accuracy of intelligent query. Moreover, it is difficult to interoperate between different databases in power transmission and distribution production data, and the error of the generated results is relatively large when the user queries. Summary of the Invention

[0004] The purpose of the present invention is to provide an intelligent query system and method for power transmission and distribution production data based on natural language interaction to solve the problems raised in the prior art.

[0005] To achieve the above purpose, the present invention provides the following technical solutions:

[0006] An intelligent query method for power transmission and distribution production data based on natural language interaction, the method comprising the following steps:

[0007] S100. Collect data from multiple source databases in power transmission and distribution production, standardize all data in the multiple source databases, extract three types of metadata, namely field names, data types, and constraint conditions of the data in the multiple source databases, construct a basic metadata unit and calculate statistical features, and construct a metadata database;

[0008] Further, the specific steps for constructing a basic metadata unit and calculating statistical features are as follows:

[0009] S101. Collect multi-source databases in power transmission and distribution production. The multi-source databases include relational databases, time series databases, and GIS spatial databases. Scan the data in the three databases, and use the SQL query algorithm to extract the field names, data types, and constraint conditions of the data in the three databases, and construct the basic metadata unit M i ={name i ,type i ,constraints i}; where M i represents the basic metadata unit of the i-th data, name i represents the field name of the i-th data extracted, type i represents the data type of the i-th data extracted, constraints i represents the constraint condition of the i-th data extracted;

[0010] S102. Calculate the mean, variance, and skewness of each data. Use the mean, variance, and skewness of the data as the statistical features of each data, and construct enhanced metadata as M i * =M i ⋃{u i ,σ 2 i ,skewness i}, where M i * represents the i-th enhanced metadata, u i represents the mean of the i-th data, σ 2 i represents the variance of the i-th data, skewness i represents the skewness of the i-th data; Output the enhanced metadata of each data; Standardize the basic metadata unit and the enhanced metadata, and combine them to construct a metadata database.

[0011] By standardizing all the data in the multi-source database, it is possible to unify the data format and specification, reduce data inconsistency and errors, improve data accuracy and integrity, and thus provide a high-quality data foundation for subsequent data analysis and applications.

[0012] Extracting metadata such as field names, data types, and constraint conditions and constructing a metadata database makes the structure and attributes of the data clearer and more explicit, facilitating data managers and developers to understand the data, perform data maintenance, update, and management, and also helping new data users to get started quickly.

[0013] Calculating statistical features provides a basis for in-depth data analysis, enabling users to understand data distribution, trends and other characteristics, and providing strong support for decision-making. For example, in power transmission and distribution production, the rules of equipment operation data can be discovered through statistical analysis to perform maintenance and fault prevention in advance.

[0014] S200. Set hard rules and soft rules for the meta-database, establish semantic associations across database fields using the two rules, and construct an initial dynamic data graph using the data and semantic associations in the meta-database;

[0015] Furthermore, the specific steps for constructing an initial dynamic data graph using the data and semantic associations in the meta-database are as follows:

[0016] S201. Set hard rules, specifically: use a professional dictionary in the power field to search for field names in the meta-database, traverse the field names in the meta-database, and when a professional term identical to the field name in the meta-database is found in the professional dictionary in the power field, mark the field name in the meta-database using the data type and attributes of the professional term in the professional dictionary in the power field; judge the marks of each field name in the meta-database, mark the field names with the same marks as forced associations, and finally output a hard rule association list;

[0017] S202. Set soft rules, specifically: segment the field names in the meta-database and convert them into vector format, calculate the cosine similarity of different field name vectors in the meta-database, and the formula is:

[0018] ;

[0019] In the formula, S text represents the cosine similarity between the i-th and j-th field names, v i represents the i-th field name vector, and v j represents the j-th field name vector; calculate the distribution similarity between different field names using JS divergence, and calculate the comprehensive similarity between different field names by combining the cosine similarity and the distribution similarity. The formula is:

[0020] ;

[0021] In the formula, S ij represents the comprehensive similarity between the i-th and j-th field names, and JS(p i ||p j ) represents the distribution similarity between the i-th and j-th field names; set a similarity threshold Sy using experience. When S ij ≥Sy, establish an association between the i-th field name and the j-th field name; finally output a soft rule association matrix;

[0022] S203. Combine hard rules and soft rules to establish associations between field names in different multi-source databases, set priorities, with the priority of hard rules being higher than that of soft rules; when the associations established by hard rules and soft rules for the same field name are different, preferentially select the association of hard rules; use the metadata in different multi-source databases as nodes and the associations in the hard rule association list and soft rule association matrix as edges to construct an initial dynamic data graph.

[0023] Set hard rules and soft rules to establish semantic associations of cross-database fields, link the data originally scattered in different databases, break data islands, achieve data fusion and sharing, and improve the utilization value of data.

[0024] Constructing an initial dynamic data graph can visually display the relationships between data in a graphical way, facilitating users to quickly understand the associations and dependencies between data, discover potential patterns and rules, and provide a more comprehensive perspective for problem analysis and decision-making in power transmission and distribution production.

[0025] S300. Calculate the relationship strength between different nodes in the dynamic data graph, and use the relationship strength to assign weights to the edges of the dynamic data graph;

[0026] Further, the specific steps for using the relationship strength to assign weights to the edges of the dynamic data graph are as follows:

[0027] S301. Real-time collect the work logs in power transmission and distribution production within the past 24 hours, the co-occurrence times of different field names, where the co-occurrence times represent the number of times different field names appear simultaneously in the work logs, calculate the distance between different field names based on the GIS data in the GIS database, calculate the relationship strength of each edge in the dynamic data graph, and the formula is:

[0028] ;

[0029] In the formula, R ij represents the relationship strength of the edge between the i-th node and the j-th node, C(N i , N j ) represents the co-occurrence times of the i-th field name and the j-th field name, and L ij represents the distance between the field names of the i-th node and the j-th node;

[0030] Use the calculated relationship strength to assign weights to each edge in the dynamic data graph and output the weighted dynamic data graph.

[0031] Calculating the relationship strength between different nodes in the dynamic data graph and assigning edge weights can highlight the important relationships between data, enabling users to pay more attention to key associations when viewing the graph, improving the efficiency and pertinence of data analysis. For example, in fault troubleshooting, it is possible to quickly locate important devices and data related to the fault.

[0032] S400. Monitor the metadata increment, and set an update strategy according to the metadata increment to update the dynamic data graph.

[0033] Furthermore, the specific steps for setting an update strategy according to the metadata increment to update the dynamic data graph are as follows:

[0034] S401. Real-time monitor the three types of metadata in the basic metadata unit in the metadata database and the statistical features in the enhanced metadata. When a new field is added and the statistical features deviate in the metadata database, recalculate the associations and association strengths in the dynamic data graph to update the dynamic data graph.

[0035] Monitoring the metadata increment and setting an update strategy according to the increment to update the dynamic data graph can timely reflect the changes in data, ensure the timeliness of data, keep the graph always consistent with the actual data, and provide accurate information for users. For example, in power transmission and distribution production, the real-time update of equipment operation data can help operation and maintenance personnel timely grasp the equipment status.

[0036] S500. Input the user's real-time query statement, extract the entities in the query statement, perform fuzziness determination, map the entities to the dynamic data graph to formulate an active guidance strategy, and obtain the user's query intention.

[0037] Furthermore, the specific steps for obtaining the user's query intention are as follows:

[0038] S501. Collect the user's real-time query statement, extract the query statement entities, match the query statement entities in the dynamic data graph using the field names to obtain the corresponding graph nodes, and calculate the fuzziness of the user's query statement. The formula is:

[0039] ;

[0040] In the formula, Fuzz represents the fuzziness of the user's query statement, T no represents the user query statement entities not found during the matching in the dynamic data graph, In c represents the information entropy of the user's query statement, and Tz represents the total number of nodes in the dynamic data graph.

[0041] S502. When it is determined that Fuzz > Fs (where Fs is the ambiguity threshold, set according to historical query experience), the system actively guides. The system uses natural language processing algorithms to generate active guidance statements to ask the user, determines the user's query target range based on the successfully matched graph nodes, and enumerates all targets within the user's query target range through the enumeration method to determine the user's query intention.

[0042] Extract the entities in the query statement, perform ambiguity determination, and map the entities to the dynamic data graph to formulate an active guidance strategy, which can more accurately understand the user's query intention, avoid inaccurate query results caused by unclear user expressions or incomplete query statements, and improve the success rate of user queries.

[0043] The active guidance strategy can help users express their needs more accurately, provide query results that better meet the user's expectations, reduce the user's query operation steps, improve query efficiency, enhance the user experience, and increase the user's satisfaction with the system.

[0044] S600. Infer the query result in the dynamic data graph according to the user's query intention, and use the query result to construct a visualization chart to display the query result to the user.

[0045] Furthermore, the specific steps for using the query result to construct a visualization chart to display the query result to the user are as follows:

[0046] S601. Search in the dynamic data graph according to the user's query intention to obtain the corresponding nodes, extract all the user query intention nodes and the associated metadata in the current dynamic data graph to form a data subgraph; extract each event node and timestamp in the data subgraph to generate a time-series-based user query result.

[0047] S602. Construct the generated user query result into a visualization chart and display it to the user.

[0048] Infer the query result in the dynamic data graph according to the user's query intention, and use the query result to construct a visualization chart to display it to the user, which can present the data in an intuitive way, making it easier for users to understand the query result and quickly obtain key information, so as to make more effective decisions. For example, in the production management of power transmission and distribution, the visualization chart can help managers quickly understand the production operation situation and make reasonable decisions.

[0049] The intelligent query system for power transmission and distribution production data based on natural language interaction. The intelligent query system for power transmission and distribution production data includes a data collection module, a meta-database construction module, a dynamic data graph module, a graph update module, a query statement analysis module, and a result generation module.

[0050] The data collection module is used to collect data from multi-source databases and standardize all the data in the multi-source databases;

[0051] The meta-database construction module is used to extract three types of metadata, namely field names, data types, and constraint conditions, from the data in the multi-source databases, construct basic metadata units, calculate statistical features, and construct a meta-database;

[0052] The dynamic data graph module is used to set hard rules and soft rules for the meta-database, establish semantic associations across database fields using the two rules, construct an initial dynamic data graph using the data and semantic associations in the meta-database, and assign weights to the graph edges;

[0053] The graph update module is used to monitor metadata increments and update the dynamic data graph according to the set update strategy based on the metadata increments;

[0054] The query statement analysis module is used to input the user's real-time query statement, extract entities in the query statement, determine the fuzziness, map the entities to the dynamic data graph to formulate an active guidance strategy, and obtain the user's query intention;

[0055] The result generation module is used to infer query results in the dynamic data graph according to the user's query intention, and construct a visualization chart using the query results to display the query results to the user.

[0056] The dynamic data graph module includes a rule setting unit and a weight calculation unit;

[0057] The rule setting unit is used to set hard rules and soft rules for the meta-database and establish semantic associations across database fields using the two rules;

[0058] The weight calculation unit is used to calculate the relationship strength between different nodes in the dynamic data graph and assign weights to the dynamic data graph edges using the relationship strength.

[0059] The query statement analysis module includes a fuzzy judgment unit and an active guidance unit;

[0060] The fuzzy judgment unit is used to calculate the fuzziness of the user's real-time query statement, judge whether the fuzziness is greater than the fuzziness threshold, and obtain whether the user's real-time query statement is fuzzy;

[0061] The active guidance unit is used to generate an active guidance statement to ask the user when it is judged that the user's real-time query statement is fuzzy, and obtain the query intention.

[0062] Compared with the prior art, the beneficial effects of the present invention are:

[0063] 1. The present invention sets up hard rules and soft rules to establish semantic associations across database fields, connects the data originally scattered in different databases, breaks data islands, realizes data fusion and sharing, and improves the utilization value of data.

[0064] 2. The present invention deeply infers the user's query intention through a dynamic data graph, obtains the query result of the user for output, provides a query result more in line with the user's expectations, and can also reduce the user's query operation steps and improve the query efficiency.

[0065] 3. The present invention extracts entities in the query statement, determines the fuzziness, and maps the entities to the dynamic data graph to formulate an active guidance strategy, which can more accurately understand the user's query intention, avoid inaccurate query results caused by unclear user expressions or incomplete query statements, and improve the success rate of user queries. Description of the Drawings

[0066] Figure 1 It is a module distribution diagram of the intelligent query system for power transmission and distribution production data based on natural language interaction of the present invention;

[0067] Figure 2 It is a step schematic diagram of the intelligent query method for power transmission and distribution production data based on natural language interaction of the present invention. Detailed Embodiments

[0068] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0069] Embodiment: As Figure 1 - Figure 2 shown, the present invention provides a technical solution,

[0070] An intelligent query method for power transmission and distribution production data based on natural language interaction, the method includes the following steps:

[0071] S100. Collect data from multi-source databases in power transmission and distribution production, standardize all data in the multi-source databases, extract three types of metadata, namely field names, data types, and constraint conditions of the data in the multi-source databases, construct a basic metadata unit and calculate statistical features, and construct a metadata database;

[0072] The specific steps for constructing a basic metadata unit and calculating statistical features are:

[0073] S101. Collect multi-source databases in power transmission and distribution production. The multi-source databases include relational databases, time series databases, and GIS spatial databases; scan the data in the three databases, and use the SQL query algorithm to extract the field names, data types, and constraint conditions of the data in the three databases, and construct the basic metadata unit M i ={name i ,type i ,constraints i}; where M i represents the basic metadata unit of the i-th data, name i represents the field name of the i-th data extracted, type i represents the data type of the i-th data extracted, constraints i represents the constraint condition of the i-th data extracted;

[0074] S102. Calculate the mean, variance, and skewness of each data. Use the mean, variance, and skewness of the data as the statistical features of each data, and use the statistical features to construct the enhanced metadata as M i * =M i ⋃{u i ,σ 2 i ,skewness i}, where M i * represents the i-th enhanced metadata, u i represents the mean of the i-th data, σ 2 i represents the variance of the i-th data, skewness i represents the skewness of the i-th data; Output the enhanced metadata of each data; Standardize the basic metadata unit and the enhanced metadata, and combine them to construct a metadata database.

[0075] By standardizing all the data in the multi-source database, it is possible to unify the data format and specifications, reduce data inconsistency and errors, improve data accuracy and integrity, and thus provide a high-quality data foundation for subsequent data analysis and applications.

[0076] Extracting metadata such as field names, data types, and constraint conditions and constructing a metadata database makes the structure and attributes of the data clearer and more explicit, facilitating data managers and developers to understand the data, perform data maintenance, update, and management, and also helping new data users to get started quickly.

[0077] Calculating statistical features provides a basis for in-depth data analysis, enabling users to understand data features such as distribution and trends, and providing strong support for decision-making. For example, in power transmission and distribution production, the rules of equipment operation data can be discovered through statistical analysis to perform maintenance and fault prevention in advance.

[0078] S200. Set hard rules and soft rules for the meta-database, establish semantic associations across database fields using the two rules, and construct an initial dynamic data graph using the data and semantic associations in the meta-database;

[0079] The specific steps for constructing an initial dynamic data graph using the data and semantic associations in the meta-database are as follows:

[0080] S201. Set hard rules, specifically: Use a professional dictionary in the power field to search for field names in the meta-database, traverse the field names in the meta-database, and when a professional term identical to the field name in the meta-database is found in the professional dictionary in the power field, mark the field name in the meta-database using the data type and attributes of the professional term in the professional dictionary in the power field; Judge the markings of each field name in the meta-database, mark the field names with the same markings as forced associations, and finally output a hard rule association list;

[0081] S202. Set soft rules, specifically: Segment the field names in the meta-database and convert them into vector format, calculate the cosine similarity of different field name vectors in the meta-database, and the formula is:

[0082] ;

[0083] In the formula, S text represents the cosine similarity between the i-th and j-th field names, v i represents the i-th field name vector, and v j [[ID=u25]]represents the j-th field name vector; Calculate the distribution similarity between different field names using JS divergence, and calculate the comprehensive similarity between different field names by combining cosine similarity and distribution similarity. The formula is:

[0084] ;

[0085] In the formula, S ij represents the comprehensive similarity between the i-th and j-th field names, and JS(p i ||p j ) represents the distribution similarity between the i-th and j-th field names; Set a similarity threshold Sy using experience. When S ij ≥Sy, establish an association between the i-th field name and the j-th field name; Finally, output a soft rule association matrix;

[0086] S203. Combine hard rules and soft rules to establish associations for field names in different multi-source databases, set priorities, with the priority of hard rules being higher than that of soft rules; when the associations established by hard rules and soft rules for the same field name are different, preferentially select the association of hard rules; use the metadata in different multi-source databases as nodes and the associations in the hard rule association list and soft rule association matrix as edges to construct an initial dynamic data graph.

[0087] Set hard rules and soft rules to establish semantic associations for cross-database fields, connect the data originally scattered in different databases, break data islands, achieve data integration and sharing, and improve the utilization value of data.

[0088] Constructing an initial dynamic data graph can visually display the relationships between data in a graphical manner, facilitating users to quickly understand the associations and dependencies between data, discover potential patterns and rules, and provide a more comprehensive perspective for problem analysis and decision-making in power transmission and distribution production.

[0089] S300. Calculate the relationship strength between different nodes in the dynamic data graph and assign weights to the edges of the dynamic data graph using the relationship strength.

[0090] The specific steps for assigning weights to the edges of the dynamic data graph using the relationship strength are as follows:

[0091] S301. Real-time collect the work logs in power transmission and distribution production within the past 24 hours, the co-occurrence times of different field names, where the co-occurrence times represent the number of times different field names appear simultaneously in the work logs, calculate the distance between different field names based on the GIS data in the GIS database, and calculate the relationship strength of each edge in the dynamic data graph. The formula is:

[0092] ;

[0093] In the formula, R ij represents the relationship strength of the edge between the i-th node and the j-th node, C(N i , N j ) represents the co-occurrence times of the i-th field name and the j-th field name, and L ij represents the distance between the field names of the i-th node and the j-th node.

[0094] Assign weights to each edge in the dynamic data graph using the calculated relationship strength and output the weighted dynamic data graph.

[0095] Calculating the relationship strength between different nodes in the dynamic data graph and assigning edge weights can highlight the important relationships between data, enabling users to pay more attention to key associations when viewing the graph, improving the efficiency and pertinence of data analysis. For example, in fault troubleshooting, it is possible to quickly locate important devices and data related to the fault.

[0096] S400. Monitor the metadata increment, and update the dynamic data graph according to the update policy set based on the metadata increment;

[0097] The specific steps for updating the dynamic data graph according to the update policy set based on the metadata increment are as follows:

[0098] S401. Real-time monitor the three types of metadata in the basic metadata unit in the metadata database and the statistical features in the enhanced metadata. When a new field is added and the statistical features deviate in the metadata database, recalculate the associations and association strengths in the dynamic data graph to update the dynamic data graph.

[0099] Monitoring the metadata increment and updating the dynamic data graph according to the increment-based update policy can timely reflect the data changes, ensure the timeliness of the data, keep the graph always consistent with the actual data, and provide accurate information for users. For example, in power transmission and distribution production, the real-time update of equipment operation data can help operation and maintenance personnel timely grasp the equipment status.

[0100] S500. Input the user's real-time query statement, extract the entities in the query statement, perform fuzziness determination, map the entities to the dynamic data graph to formulate an active guidance strategy, and obtain the user's query intention;

[0101] The specific steps for obtaining the user's query intention are as follows:

[0102] S501. Collect the user's real-time query statement, extract the query statement entities, match the query statement entities in the dynamic data graph using the field names to obtain the corresponding graph nodes, and calculate the fuzziness of the user's query statement. The formula is:

[0103] ;

[0104] In the formula, Fuzz represents the fuzziness of the user's query statement, T no represents the user query statement entities not found during the matching in the dynamic data graph, In c represents the information entropy of the user's query statement, and Tz represents the total number of nodes in the dynamic data graph;

[0105] S502. When it is determined that Fuzz > Fs, where Fs is the ambiguity threshold set according to historical query experience, the system actively guides. The system uses natural language processing algorithms to generate active guidance statements to ask the user, determines the user's query target range based on the successfully matched graph nodes, and enumerates all targets within the user's query target range by the enumeration method to determine the user's query intention.

[0106] Extract the entities in the query statement, perform ambiguity determination, and map the entities to the dynamic data graph to formulate an active guidance strategy, which can more accurately understand the user's query intention, avoid inaccurate query results caused by unclear user expressions or incomplete query statements, and improve the success rate of user queries.

[0107] The active guidance strategy can help users express their needs more accurately, provide query results that better meet the user's expectations, reduce the user's query operation steps, improve query efficiency, enhance the user experience, and increase the user's satisfaction with the system.

[0108] S600. Infer the query result in the dynamic data graph according to the user's query intention, and use the query result to construct a visualization chart to display the query result to the user.

[0109] The specific steps of using the query result to construct a visualization chart to display the query result to the user are as follows:

[0110] S601. Search in the dynamic data graph according to the user's query intention to obtain the corresponding nodes, extract all the user query intention nodes and the associated metadata in the current dynamic data graph to form a data subgraph; extract each event node and timestamp in the data subgraph to generate a time-series-based user query result.

[0111] S602. Construct the generated user query result into a visualization chart and display it to the user.

[0112] Infer the query result in the dynamic data graph according to the user's query intention, and use the query result to construct a visualization chart to display it to the user, which can present the data in an intuitive way, make it easier for the user to understand the query result, quickly obtain key information, and thus make more effective decisions. For example, in the power transmission and distribution production management, the visualization chart can help managers quickly understand the production operation situation and make reasonable decisions.

[0113] The intelligent query system for power transmission and distribution production data based on natural language interaction. The intelligent query system for power transmission and distribution production data includes a data collection module, a metadata database construction module, a dynamic data graph module, a graph update module, a query statement analysis module, and a result generation module.

[0114] The data collection module is used to collect data from multi-source databases and standardize all the data in the multi-source databases;

[0115] The meta-database construction module is used to extract three types of metadata, namely field names, data types, and constraint conditions, from the data in the multi-source databases, construct basic metadata units and calculate statistical features, and construct a meta-database;

[0116] The dynamic data graph module is used to set hard rules and soft rules for the meta-database, establish semantic associations across database fields using the two rules, construct an initial dynamic data graph using the data and semantic associations in the meta-database, and assign weights to the graph edges;

[0117] The graph update module is used to monitor metadata increments and update the dynamic data graph according to the set update strategy based on the metadata increments;

[0118] The query statement analysis module is used to input a user's real-time query statement, extract entities in the query statement, perform fuzziness determination, map the entities to the dynamic data graph to formulate an active guidance strategy, and obtain the user's query intention;

[0119] The result generation module is used to infer a query result in the dynamic data graph according to the user's query intention, and construct a visualization chart using the query result to display the query result to the user.

[0120] The dynamic data graph module includes a rule setting unit and a weight calculation unit;

[0121] The rule setting unit is used to set hard rules and soft rules for the meta-database and establish semantic associations across database fields using the two rules;

[0122] The weight calculation unit is used to calculate the relationship strength between different nodes in the dynamic data graph and assign weights to the dynamic data graph edges using the relationship strength.

[0123] The query statement analysis module includes a fuzzy judgment unit and an active guidance unit;

[0124] The fuzzy judgment unit is used to calculate the fuzziness of the user's real-time query statement and determine whether the fuzziness is greater than the fuzziness threshold to obtain whether the user's real-time query statement is fuzzy;

[0125] The active guidance unit is used to generate an active guidance statement to ask the user when it is determined that the user's real-time query statement is fuzzy, and obtain the query intention.

[0126] Example 1: Extraction and association of transformer temperature fields;

[0127] Extract the field temp from the transformer table in InfluxDB, with the type being Float and the constraint being non-null.

[0128] Calculate the statistical features, with the average being 85.3 degrees Celsius, the variance being 4.1, and the skewness being 2; standardize the field name to transformer_temp;

[0129] Using the hard rule, no corresponding professional terms are found in the professional dictionary in the power field; select the soft rule to calculate the similarity, and the comprehensive similarity with the device_temp field name in the relational database is 0.72. Set the similarity threshold to 0.6, and it is determined that there is an association between the field names transformer_temp and device_temp.

[0130] Example 2: The user's query statement is "Which area has the most faults recently?" The extracted entities are "faults, areas, etc."

[0131] Match keywords such as "faults" and "areas" to the graph nodes, calculate the fuzziness to be 0.64, set the fuzziness threshold to 0.5, and determine that the user's query is fuzzy.

[0132] Start the active guidance. Based on the graph nodes of the user's query, the user's query target range is obtained as "East China, a certain city, one month, one week, etc." Use the natural language processing algorithm to generate the active guidance question as "Please select the area range: A. East China region B. Distribution network of a certain city", and ask in turn using the enumeration method; obtain the user's query intention as "Count the number of faults in the East China region in the past 7 days."

[0133] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any reference signs in the claims should not be regarded as limiting the claimed rights.

Claims

1. An intelligent query method for power transmission and distribution production data based on natural language interaction, characterized in that: The method includes the following steps: S100. Collect a multi-source database in power transmission and distribution production, standardize all data in the multi-source database, extract three types of metadata, namely field names, data types, and constraint conditions of the data in the multi-source database, construct a basic metadata unit and calculate statistical features, and construct a metadata database; S200. Set hard rules and soft rules for the metadata database, establish semantic associations across database fields using the two rules, and construct an initial dynamic data graph using the data and semantic associations in the metadata database; The specific steps for constructing an initial dynamic data graph using the data and semantic associations in the metadata database are as follows: S201. Set hard rules, specifically: Use a professional dictionary in the power field to search for field names in the metadata database, traverse the field names in the metadata database, and when a professional term identical to the field name in the metadata database is found in the professional dictionary in the power field, mark the field name in the metadata database using the data type and attributes of the professional term in the professional dictionary in the power field; Judge the marks of each field name in the metadata database, mark the field names with the same marks as forcibly associated, and finally output a hard rule association list; S202. Set soft rules, specifically: Segment the field names in the metadata database and convert them into a vector format, calculate the cosine similarity of the vectors of different field names in the metadata database, and the formula is: ; In the formula, S text represents the cosine similarity between the i-th and j-th field names, v i represents the i-th field name vector, v j represents the j-th field name vector; the distribution similarity between different field names is calculated using the JS divergence, and the comprehensive similarity between different field names is calculated by combining the cosine similarity and the distribution similarity. The formula is as follows: ; In the formula, S ij represents the comprehensive similarity between the i-th and j-th field names, and JS(p i ||p j ) represents the distribution similarity between the i-th and j-th field names; the similarity threshold Sy is set empirically. When S ij ≥Sy, an association is established between the i-th and j-th field names; finally, a soft rule association matrix is output; S203. Combine the hard rules and soft rules to construct associations of field names in different multi-source databases, set priorities, with the priority of hard rules being higher than that of soft rules; When the associations constructed by hard rules and soft rules for the same type of field name are different, preferentially select the association of hard rules; Use the metadata in different multi-source databases as nodes, and use the associations in the hard rule association list and soft rule association matrix as edges to construct an initial dynamic data graph; S300. Calculate the relationship strength between different nodes in the dynamic data graph, and assign weights to the edges of the dynamic data graph using the relationship strength; S400. Monitor metadata increments, and set an update strategy according to the metadata increments to update the dynamic data graph; S500. Input a user's real-time query statement, extract the entities in the query statement, perform fuzziness determination, map the entities to the dynamic data graph to formulate an active guidance strategy, and obtain the user's query intention; S600. Infer a query result in the dynamic data graph according to the user's query intention, and use the query result to construct a visualization chart to display the query result to the user.

2. The intelligent query method for power transmission and distribution production data based on natural language interaction according to claim 1, characterized in that: The specific steps for constructing a basic metadata unit and calculating statistical features in S100 are as follows: S101. Collect multi-source databases in power transmission and distribution production. The multi-source databases include relational databases, time-series databases, and GIS spatial databases. Scan the data in the three databases, and use the SQL query algorithm to extract the field names, data types, and constraint conditions of the data in the three databases to construct the basic metadata unit M i ={name i , type i , constraints i}; where M i represents the basic metadata unit of the i-th data, name i represents the field name of the i-th data extracted, type i represents the data type of the i-th data extracted, and constraints i represents the constraint condition of the i-th data extracted; S102. Calculate the mean, variance, and skewness of each data. Use the mean, variance, and skewness of the data as the statistical features of each data, and construct enhanced metadata using the statistical features as , where represents the i-th enhanced metadata, u i represents the mean of the i-th data, σ 2 i represents the variance of the i-th data, skewness i represents the skewness of the i-th data; Output the enhanced metadata of each data; Standardize the basic metadata unit and the enhanced metadata, and combine them to construct a metadata database.

3. The intelligent query method for power transmission and distribution production data based on natural language interaction according to claim 2, characterized in that: The specific steps for assigning weights to the edges of the dynamic data graph using the relationship strength in S300 are as follows S301. Collect the work logs in power transmission and distribution production within the past 24 hours in real time, the co-occurrence times of different field names, where the co-occurrence times represent the number of times different field names appear simultaneously in the work logs, calculate the distances between different field names based on the GIS data in the GIS database, and calculate the relationship strength of each edge in the dynamic data graph. The formula is as follows: ; In the formula, R ij represents the relationship strength of the edge between the i-th node and the j-th node, and C(N i , N j ) represents the co-occurrence times of the i-th field name and the j-th field name, and L ij represents the distance between the field names of the i-th node and the j-th node; Assign weights to each edge in the dynamic data graph using the calculated relationship strength, and output the weighted dynamic data graph.

4. The intelligent query method for power transmission and distribution production data based on natural language interaction according to claim 3, characterized in that: The specific steps for updating the dynamic data graph according to the metadata increment setting update strategy in S400 are as follows: S401. Monitor the three types of metadata in the basic metadata unit and the statistical features in the enhanced metadata in the metadata database in real time. When a new field addition and statistical feature deviation are detected in the metadata database, recalculate the associations and association strengths in the dynamic data graph to update the dynamic data graph.

5. The intelligent query method for power transmission and distribution production data based on natural language interaction according to claim 4, characterized in that: The specific steps for obtaining the user's query intention in S500 are as follows: S501. Collect the user's real-time query statement, extract the query statement entity, match the query statement entity with the field names in the dynamic data graph to obtain the corresponding graph nodes, and calculate the fuzziness of the user's query statement. The formula is as follows: ; In the formula, Fuzz represents the fuzziness of the user query statement, and T no represents the user query statement entity that cannot be found during the matching in the dynamic data graph. In c represents the information entropy of the user query statement, and Tz represents the total number of nodes in the dynamic data graph; S502. When it is determined that Fuzz > Fs (where Fs is the fuzziness threshold set according to historical query experience), trigger the system's active guidance. Use natural language processing algorithms to generate an active guidance statement to ask the user, determine the user's query target range based on the successfully matched graph nodes, and enumerate all the targets within the user's query target range by the enumeration method to determine the user's query intention.

6. The intelligent query method for power transmission and distribution production data based on natural language interaction according to claim 5, wherein: The specific steps for constructing a visualization chart using the query results to display the query results in S600 are as follows: S601. Search in the dynamic data graph according to the user's query intention to obtain the corresponding nodes, extract all the user's query intention nodes and the associated metadata in the current dynamic data graph to form a data subgraph; extract each event node and time stamp in the data subgraph to generate the user's query results based on the time series. S602. Construct the generated user's query results into a visualization chart and display it to the user.

7. An intelligent query system for power transmission and distribution production data based on natural language interaction, characterized in that: The intelligent query system for power transmission and distribution production data includes a data collection module, a metadata database construction module, a dynamic data graph module, a graph update module, a query statement analysis module, and a result generation module; The data collection module is used to collect data from multi-source databases and standardize all the data in the multi-source databases; The metadata database construction module is used to extract the three types of metadata, namely the field names, data types, and constraint conditions, from the data in the multi-source databases, construct the basic metadata unit and calculate the statistical features, and construct the metadata database; The dynamic data graph module is used to set hard rules and soft rules for the metadata database, establish semantic associations between cross-database fields using the two rules, construct an initial dynamic data graph using the data and semantic associations in the metadata database, and assign weights to the graph edges; The graph update module is used to monitor the metadata increment and update the dynamic data graph according to the metadata increment setting update strategy; The query statement analysis module is used to input the user's real-time query statement, extract the entities in the query statement, determine the ambiguity, map the entities to the dynamic data graph to formulate an active guidance strategy, and obtain the user's query intention; The result generation module is used to infer the query result in the dynamic data graph according to the user's query intention, and use the query result to construct a visualization chart to display the query result to the user.

8. The intelligent query system for power transmission and distribution production data based on natural language interaction according to claim 7, characterized in that: The dynamic data graph module includes a rule setting unit and a weight calculation unit; The rule setting unit is used to set hard rules and soft rules for the meta-database, and establish semantic associations across database fields using the two rules; The weight calculation unit is used to calculate the relationship strength between different nodes in the dynamic data graph, and assign weights to the edges of the dynamic data graph using the relationship strength.

9. The intelligent query system for power transmission and distribution production data based on natural language interaction according to claim 7, characterized in that: The query statement analysis module includes a fuzzy judgment unit and an active guidance unit; The fuzzy judgment unit is used to calculate the ambiguity of the user's real-time query statement, and judge whether the ambiguity is greater than the ambiguity threshold to obtain whether the user's real-time query statement is ambiguous; The active guidance unit is used to generate an active guidance statement to ask the user using natural language processing algorithms when it is judged that the user's real-time query statement is ambiguous, and obtain the query intention.

Citation Information

Patent Citations

  • Power data intelligent search method based on resource map

    CN119336831A

  • Composite symbolic and non-symbolic artificial intelligence system for advanced reasoning and semantic search

    US20240386015A1