Intelligent questioning and answering method, system and equipment for electric power safety knowledge and storage medium
Through the intelligent question-and-answer method of power safety knowledge graph and natural language processing technology, the problem of power safety knowledge acquisition relying on manual query is solved, efficient and accurate information acquisition is achieved, and the safety management level and user satisfaction of the power system are improved.
Patent Information
- Application Number
- CN202411302331.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-14
AI Technical Summary
The existing methods of obtaining power safety knowledge mainly rely on manual inquiry and expert consultation, which is time-consuming and labor-intensive and vulnerable to human factors, making it difficult to ensure the accuracy and timeliness of information acquisition, and it is difficult to meet the rapid response and real-time requirements of modern power systems. Information requirements.
Using intelligent Q&A methods based on power safety knowledge graph and natural language processing technology, the highest-rated intelligent Q&A answers are generated by pre-processing, semantic analysis, keyword extraction and mapping matching of power safety knowledge data, reducing the burden of manual consultation and improving The efficiency and accuracy of information acquisition.
It achieves efficient and accurate acquisition of power safety knowledge, improves the safety management level and user satisfaction of the power system, ensures the accuracy and timeliness of the answers, and meets the rapid response needs of modern power systems.
Smart Images

Figure CN119311818A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power safety technology, and in particular to an intelligent question-answering method, system, device and storage medium for power safety knowledge. Background Art
[0002] As the scale and complexity of power systems increase, power safety has become a critical issue. However, the complexity and professionalism of power safety-related knowledge make it difficult for non-professionals to quickly and accurately obtain the required safety knowledge and countermeasures. This situation not only increases the risk of power system operation, but also restricts the improvement of the overall efficiency of the power industry. In order to solve this problem, it is particularly important to develop a power safety knowledge acquisition method based on an intelligent question-answering system.
[0003] The existing way of acquiring power safety knowledge mainly relies on manual query and expert consultation, which is not only time-consuming and laborious, but also easily affected by human factors, making it difficult to ensure the accuracy and timeliness of information acquisition. In addition, traditional power safety training and education methods also have problems of low efficiency and insufficient coverage, which makes it difficult to meet the needs of modern power systems for rapid response and instant information. Therefore, how to use advanced natural language processing and knowledge graph technology to realize intelligent question and answer of power safety knowledge has become a research topic that needs to be solved urgently.
[0004] In this context, an intelligent question-answering method based on power safety knowledge graph and natural language processing technology is proposed, which can not only improve the efficiency and accuracy of power safety knowledge acquisition, but also reduce the burden of manual consultation to a certain extent, thereby improving the safety management level of the entire power system. However, most of the existing research and applications remain at the theoretical level and lack verification and application in actual operations. How to effectively integrate these advanced technologies into actual power safety management still faces many challenges. Summary of the invention
[0005] The main purpose of the present invention is to provide an intelligent question-answering method, system, device and storage medium for power safety knowledge, which solves the technical problem that the existing power safety knowledge acquisition method mainly relies on manual query and expert consultation, which is not only time-consuming and labor-intensive, but also easily affected by human factors.
[0006] To achieve the above object, the present invention provides an intelligent question-answering method for power safety knowledge, comprising the following steps: Collecting data from a power safety knowledge database to obtain power safety knowledge data, and preprocessing the power safety knowledge data to obtain a standardized power safety knowledge text; Performing semantic analysis on the standardized power safety knowledge text to obtain a power safety knowledge graph; Obtaining a natural language question about power safety input by a user, and performing word segmentation and part-of-speech tagging on the natural language question about power safety to obtain keywords for the power safety question; Mapping and matching the power safety question keywords with the power safety knowledge graph to obtain a preliminary answer candidate set; The preliminary answer candidate set is scored, and the answer to the power safety question with the highest score is used as the intelligent question-answering answer to the power safety natural language question.
[0007] Furthermore, the power safety knowledge data is preprocessed to obtain a standardized power safety knowledge text, including: Using a preset natural language processing technology, extract information from unstructured documents in the power safety knowledge data to obtain preliminary power safety knowledge data; wherein the unstructured documents include free texts of power safety knowledge, power safety knowledge reports and power safety knowledge emails; Cleaning the preliminary power safety knowledge data to obtain cleaned power safety knowledge data; Converting the cleaned power safety knowledge data into a vector format to obtain vectorized power safety knowledge data; Performing principal component dimensionality reduction on the vectorized power safety knowledge data to obtain dimensionality-reduced power safety knowledge data; Performing topic identification and classification on the dimension-reduced power safety knowledge data to obtain power safety knowledge data with topic tags; The power safety knowledge data with subject tags is standardized to obtain standardized power safety knowledge text.
[0008] Furthermore, the standardized power safety knowledge text is semantically parsed to obtain a power safety knowledge graph, including: Extracting entities, attributes and relationships between entities and attributes in the standardized power safety knowledge text to obtain semantic power safety knowledge elements; Using multimodal fusion technology, the semanticized power safety knowledge elements are multimodally fused to obtain fused power safety knowledge entity elements; Mining implicit connections between entities in the fused electric power safety knowledge entity elements to obtain mined entity elements; Performing relational reasoning and expansion on the mined entity elements and the attributes to obtain an extended power safety knowledge relational network; Define the functional role of each entity in the context of the standardized power safety knowledge text, and perform semantic role annotation on the extended power safety knowledge relationship network based on the functional role to obtain a power safety knowledge network with role labels; wherein the power safety knowledge network with role labels is a network structure after role annotation, ensuring that the functional role of each entity in a specific context is clear; Performing formal logic reasoning on the power safety knowledge network with role labels to obtain a draft power safety knowledge graph; The draft power safety knowledge graph is subjected to graph optimization processing to obtain a power safety knowledge graph.
[0009] Furthermore, formal logic reasoning is performed on the power safety knowledge network with role labels to obtain a draft power safety knowledge graph, including: Applying first-order logic reasoning technology, transforming entities, attributes and their relationships in the power safety knowledge network with role labels into logical formulas to obtain a set of logical formulas; Performing closure reasoning on the set of logic formulas to obtain a set of extended logic formulas; Resolving conflicts and inconsistent logical relationships in the extended logic formula set using constraint satisfaction technology to obtain a consistent logic formula set; Performing a semantic consistency check on the consistent set of logical formulas to verify the correctness and completeness of the logical formulas, and obtaining a check set of logical formulas; Constructing a preliminary draft of the electric power safety knowledge graph based on the set of checking logic formulas; wherein the draft graph includes nodes and edges, the nodes are entities, the attributes are embedded in the entities, and the relationships are used as edges; The check logic formula set is logically verified to obtain a draft of the power safety knowledge graph.
[0010] Furthermore, the power safety natural language question is segmented and POS tagged to obtain power safety question keywords, including: The power safety natural language question is segmented into granularity using a preset adaptive word segmentation technology to obtain a preliminary word segmentation result; Performing part-of-speech tagging on the preliminary word segmentation results to obtain tagged word segmentations, and identifying the grammatical functions of the tagged word segmentations; Using dependency syntactic analysis technology, constructing dependency relationships for the preliminary word segmentation results based on the grammatical functions to obtain a dependency syntactic tree; Performing phrase structure analysis on the dependency syntax tree to extract a set of key phrases; Acquire a context-related key phrase set, and semantically expand the extracted key phrase set based on the context-related key phrase set to obtain expanded power safety issue keywords; The extended power safety issue keywords are semantically aggregated to obtain power safety issue keywords.
[0011] Furthermore, the power safety question keywords are mapped and matched with the power safety knowledge graph to obtain a preliminary answer candidate set, including: Performing semantic vectorization processing on the power safety issue keywords to obtain keyword vectors; Performing semantic vectorization processing on the electric power safety knowledge graph to obtain a graph vector; Calculating similarity between the keyword vector and the graph vector to identify entities similar to the keyword and obtain a set of related entities; Performing path search on each entity in the related entity set and the relationship corresponding to the entity to obtain a path set; Performing context-aware reasoning on the path set and the related entity set to obtain reasoning candidate answers; The inference candidate answers are merged by similarity to obtain a preliminary answer candidate set.
[0012] Furthermore, the preliminary answer candidate set is scored, and the answer to the power safety question with the highest score is used as the intelligent question-answering answer to the power safety natural language question, including: Scoring the preliminary answer candidate set from multiple dimensions to obtain scoring results for the candidate answers; Performing feature weighting processing on the scoring results of the candidate answers to obtain a weighted scoring result; Clustering the preliminary answer candidate set based on the weighted scoring result to obtain clustered candidate answer clusters; Selecting representative answers from the clustered candidate answer clusters to obtain a representative answer set; The ranked representative answers are scored and compared, and the ranked representative answer with the highest score is selected as the intelligent question-and-answer answer to the natural language question on power safety.
[0013] The present invention also provides an intelligent question-answering system for power safety knowledge, comprising: The acquisition module is used to collect data from the power safety knowledge database to obtain power safety knowledge data, and pre-process the power safety knowledge data to obtain a standardized power safety knowledge text; A parsing module, used for performing semantic parsing on the standardized power safety knowledge text to obtain a power safety knowledge graph; A tagging module is used to obtain the natural language questions about power safety input by the user, and perform word segmentation and part-of-speech tagging on the natural language questions about power safety to obtain keywords for the power safety questions; A matching module, used to map and match the power safety question keywords with the power safety knowledge graph to obtain a preliminary answer candidate set; The sorting module is used to score the preliminary answer candidate set and use the highest-scoring answer to the power safety question as the intelligent question-answering answer to the power safety natural language question.
[0014] The present invention also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the above methods when executing the computer program.
[0015] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods are implemented.
[0016] The intelligent question-and-answer method for power safety knowledge provided by the present invention comprises the following steps: collecting data from a power safety knowledge database to obtain power safety knowledge data, and preprocessing the power safety knowledge data to obtain a standardized power safety knowledge text; semantically parsing the standardized power safety knowledge text to obtain a power safety knowledge graph; obtaining a natural language question about power safety input by a user, and performing word segmentation and part-of-speech tagging on the natural language question about power safety to obtain keywords for the power safety question; mapping and matching the keywords for the power safety question with the power safety knowledge graph to obtain a preliminary answer candidate set; scoring the preliminary answer candidate set, and using the answer to the power safety question with the highest score as the intelligent question-and-answer answer to the natural language question about power safety; through the above-mentioned technical solution, the technical problem that the existing method for obtaining power safety knowledge mainly relies on manual query and expert consultation, which is not only time-consuming and labor-intensive, but also easily affected by human factors, is solved, and the preliminary answer candidate set is scored and the optimal answer is selected to ensure that the answer finally provided to the user is the most in line with the question requirements, thereby improving the accuracy of the intelligent question-and-answer system and the beneficial effect of user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the steps of an intelligent question-answering method for power safety knowledge in one embodiment of the present invention; Figure 2 is a structural block diagram of an intelligent question-answering system for power safety knowledge in one embodiment of the present invention; Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.
[0018] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0020] like Figure 1 As shown, Figure 1 It is a schematic diagram of the steps of an intelligent question-answering method for power safety knowledge in one embodiment of the present invention; In one embodiment of the present invention, an intelligent question-answering method for power safety knowledge is provided, comprising the following steps: Step S1, collecting data from a power safety knowledge database to obtain power safety knowledge data, and preprocessing the power safety knowledge data to obtain a standardized power safety knowledge text.
[0021] Specifically, when implementing the step of data collection for the power safety knowledge database, it is first necessary to clarify the source and type of the power safety knowledge database. These databases may include various power safety regulations, technical manuals, accident case analysis, expert papers and related regulatory documents. Through Internet crawler technology, API interface or manual collection, these scattered information are summarized to form a preliminary power safety knowledge data set. After the data collection is completed, the next step is to preprocess the power safety knowledge data. The purpose of preprocessing is to standardize and unify the data format to facilitate subsequent processing and analysis. The preprocessing steps include data cleaning, data format conversion and data completion. Specifically, data cleaning refers to removing irrelevant information, duplicate data and erroneous data to ensure the accuracy and integrity of the data. For example, remove HTML tags, advertisements and irrelevant links. Data format conversion refers to converting data from different sources into a unified text format, such as converting PDF and Word documents into plain text. Data completion involves reasonably filling in missing data to ensure the integrity of the data. After the preprocessing is completed, the standardized power safety knowledge text is obtained. These texts need to be further structured to provide a basis for subsequent semantic parsing and knowledge graph construction. For example, the text can be divided into chapters, clauses, definitions, rules and other structures, and corresponding labels and annotations can be added to each part to facilitate machine understanding and processing. For example, suppose the following information is collected from an electric power safety manual: "When performing high-voltage line maintenance, workers must wear insulating gloves and insulating shoes." Through the preprocessing step, the format information and irrelevant content in the manual are first removed to obtain a standardized text: "High-voltage line maintenance, insulating gloves and insulating shoes must be worn." Then, it is structured and may be labeled as "High-voltage line maintenance-safety equipment requirements" and labeled "insulating gloves" and "insulating shoes". Through these steps, not only the standardization and consistency of power safety knowledge data are guaranteed, but also a solid foundation is laid for subsequent semantic parsing and knowledge graph construction, so that the entire intelligent question-answering system can provide users with power safety knowledge services more accurately and efficiently.
[0022] Step S2: perform semantic analysis on the standardized power safety knowledge text to obtain a power safety knowledge graph.
[0023] Specifically, when implementing the step of "performing semantic analysis on the standardized power safety knowledge text to obtain a power safety knowledge graph", it is first necessary to perform in-depth natural language processing on the standardized power safety knowledge text. The purpose of semantic analysis is to understand the deep meaning of the text, identify key concepts and the relationships between them, and thus construct a structured knowledge graph.
[0024] Specifically, semantic parsing includes several key steps: word segmentation, part-of-speech tagging, named entity recognition, syntactic analysis, and relation extraction. First, word segmentation is to segment continuous text into independent words. For example, "Insulating gloves and insulating shoes must be worn for high-voltage line maintenance." can be segmented into "high-voltage line", "maintenance", "must", "wear", "insulating gloves" and "insulating shoes". Next, part-of-speech tagging is performed, that is, the part of speech of each word is marked, such as verb, noun, adjective, etc. For example, "maintenance" is a verb, and "insulating gloves" and "insulating shoes" are nouns. Then, named entity recognition is performed, which is a step to identify specific entities in the text, such as equipment names, operating steps, and procedural requirements. In the above example, "high-voltage line", "insulating gloves" and "insulating shoes" are all named entities. Next, syntactic analysis is to analyze the grammatical structure in the sentence and determine the dependency relationship between each word, such as subject-predicate relationship, modification relationship, etc. For example, in the sentence "Insulating gloves and insulating shoes must be worn for high-voltage line maintenance", "wear" is an action, and "insulating gloves" and "insulating shoes" are the direct objects of the action. Finally, relation extraction is to extract the relationship between entities from the sentence, such as the relationship between "high-voltage line maintenance" and "wearing insulating gloves and insulating shoes" is "required". Through these steps, we can structure the key information in the standardized power safety knowledge text, thereby constructing a power safety knowledge graph. The knowledge graph is a graph structure composed of nodes and edges, where the nodes represent the various entities of power safety knowledge, such as equipment, operating procedures, personnel, etc., and the edges represent the relationship between these entities. For example, in the above example, the nodes can be "high-voltage line", "insulating gloves", "insulating shoes", and the edges can be "required to wear". By organizing these nodes and edges together, a complete power safety knowledge graph is formed. For example, in the power safety knowledge graph, there can be the following nodes and relationships: node A (high-voltage line), node B (insulating gloves), node C (insulating shoes), edge AB (required to wear), edge AC (required to wear). In this way, when the user raises a safety question about high-voltage line maintenance, the system can quickly find the relevant safety requirements and operating specifications by querying the knowledge graph and generate accurate answers. Through this series of steps, not only the semantic parsing of standardized power safety knowledge text is achieved, but also the power safety knowledge graph is successfully constructed, thus providing a solid foundation for the intelligent question-answering system, enabling it to effectively understand and handle various power safety issues raised by users.
[0025] Step S3, obtaining the power safety natural language question input by the user, and performing word segmentation and part-of-speech tagging on the power safety natural language question to obtain keywords of the power safety question.
[0026] Specifically, when implementing the step of "obtaining the natural language problem of power safety input by the user, and performing word segmentation and part-of-speech tagging on the natural language problem of power safety to obtain keywords of the power safety problem", it is first necessary to establish a user interaction interface, which can accept the natural language problem input by the user. The natural language problem of power safety input by the user, such as "What safety measures should be paid attention to when maintaining high-voltage lines?", will be transmitted to the background processing system through the interface. Next, the system first performs word segmentation processing on the natural language problem of power safety input by the user. The purpose of word segmentation processing is to segment the continuous natural language text into independent vocabulary units for subsequent analysis and processing. In the above example, the word segmentation processing will segment "What safety measures should be paid attention to when maintaining high-voltage lines?" into multiple vocabulary units, such as "high-voltage lines", "maintenance", "time", "need", "attention", "what", "safety", and "measures". After completing the word segmentation processing, the system will perform part-of-speech tagging on these vocabulary units. Part-of-speech tagging refers to marking the corresponding part of speech for each vocabulary unit, such as noun, verb, adjective, etc. The purpose of part-of-speech tagging is to further understand the grammatical function and relationship of vocabulary in a sentence, so as to provide a basis for extracting keywords. In the above example, the results of part-of-speech tagging may be "high-voltage line (noun)", "maintenance (verb)", "when (conjunction)", "need (verb)", "attention (verb)", "what (pronoun)", "safety (noun)", "measures (noun)". After word segmentation and part-of-speech tagging, the system can extract keywords of power safety issues. These keywords are the most important words in the question and can represent the core content and intention of the question. In the above example, the keywords include "high-voltage line", "maintenance", "safety", and "measures". These keywords will be used in the subsequent knowledge retrieval and matching process so that the system can accurately find relevant information and answers from the power safety knowledge graph. For example, when the user enters "How to prevent the risk of electric shock in the maintenance of high-voltage lines?", the system first performs word segmentation on the question and obtains vocabulary units such as "how", "prevention", "high-voltage line", "maintenance", "in", "electric shock", and "risk". Then part-of-speech tagging is performed, and the tagging results are "how (adverb)", "prevention (verb)", "high-voltage line (noun)", "maintenance (verb)", "in (preposition)", "electric shock (verb)", and "risk (noun)". The system then extracts the keywords "prevention", "high-voltage line", "maintenance", "electric shock", and "risk". These keywords will be used for further semantic analysis and knowledge matching to find appropriate preventive measures and safety recommendations. Through this series of steps, the system can effectively process the natural language questions about power safety input by users, extract core keywords, and provide a basis for subsequent knowledge retrieval and answer generation, thereby achieving accurate understanding and response to user questions.
[0027] Step S4: Map and match the power safety question keywords with the power safety knowledge graph to obtain a preliminary answer candidate set.
[0028] Specifically, when implementing the step of "mapping and matching the power safety problem keywords with the power safety knowledge graph to obtain a preliminary answer candidate set", a pre-built power safety knowledge graph is first required. The power safety knowledge graph is a structured database containing a large amount of power safety-related knowledge, in which the knowledge is represented in the form of nodes and edges, and these nodes and edges are given specific semantics and relationships so that the system can perform effective knowledge retrieval and reasoning. After the user inputs a natural language question and extracts the power safety problem keywords, the system will use these keywords to map and match with the power safety knowledge graph. The mapping and matching process refers to associating the keywords in the user's question with the relevant nodes in the knowledge graph in order to find the knowledge nodes most relevant to these keywords. For example, when the keywords extracted by the system are "high-voltage line", "maintenance", "safety", and "measures", the system will search for nodes related to these keywords in the power safety knowledge graph, including "high-voltage line safety specifications", "high-voltage line maintenance methods", "high-voltage operation safety measures", etc. In order to achieve this mapping and matching, the system usually adopts a variety of technical means. First, the system needs to index the knowledge graph to quickly retrieve relevant nodes. Secondly, the system may use natural language processing technology and semantic analysis technology to ensure that keywords can be accurately matched to relevant nodes in the knowledge graph. For example, the system can use word vector models (such as Word2Vec, GloVe) or context embedding models (such as BERT) to calculate the semantic similarity between keywords and nodes in the knowledge graph to find the most relevant nodes. After completing the mapping and matching, the system will obtain a preliminary answer candidate set. The preliminary answer candidate set refers to the set of all knowledge nodes related to the user's question keywords, which contain information used to answer the user's questions. For example, for the keywords "high-voltage line", "maintenance", "safety", and "measures", the preliminary answer candidate set may include nodes "regular inspection of high-voltage lines", "precautions for maintenance of high-voltage lines", "safety operating procedures for high-voltage lines", etc. The knowledge in these nodes will be used as candidate answers, and the system will further screen, sort and process these candidate answers in subsequent steps to generate the final answer. For example, when a user inputs the question "How to prevent the risk of electric shock during high-voltage line maintenance?" and extracts the keywords "prevention", "high-voltage line", "maintenance", "electric shock", and "risk", the system will search for nodes related to these keywords in the power safety knowledge graph. Possible matching nodes include "electric shock protection measures for high-voltage equipment", "safety regulations for high-voltage line maintenance", and "first aid methods for electric shock". Through mapping and matching, the system collects these related nodes into a preliminary answer candidate set, ready for further processing to generate specific answers.In this way, by mapping and matching the keywords of power safety issues with the power safety knowledge graph, the system can effectively find the knowledge nodes related to the user's questions and form a preliminary set of answer candidates, providing the necessary foundation and data support for the subsequent answer generation steps.
[0029] Step S5, scoring the preliminary answer candidate set, and taking the highest-scoring answer to the power safety question as the intelligent question-answering answer to the power safety natural language question.
[0030] Specifically, when implementing the step of "scoring the preliminary answer candidate set and taking the highest-scoring answer to the power safety question as the intelligent question-answering answer to the power safety natural language question", we first need to clarify the composition of the preliminary answer candidate set. This set comes from the mapping and matching process in the previous step and contains multiple potential answers related to the keywords of the user's power safety question. In order to select the best intelligent question-answering answer from these candidate answers, the system needs to score each candidate answer. The scoring process is usually based on considerations of multiple dimensions, including but not limited to the relevance, accuracy, comprehensiveness and language fluency of the answer. In specific implementation, the system can use natural language processing and machine learning techniques to evaluate each candidate answer. For example, the relevance score can be achieved by calculating the semantic similarity between the user's question keywords and the candidate answer, using a word vector model (such as Word2Vec, GloVe) or a contextual embedding model (such as BERT) to measure the semantic distance between the two texts. The accuracy score can be based on the predefined knowledge reliability level in the knowledge graph, the comprehensiveness score can be obtained by checking how many relevant knowledge nodes or key points are covered in the answer, and the language fluency score can be evaluated by the language model to evaluate the readability and fluency of the answer text. After scoring each answer in the preliminary answer candidate set, the system will combine the scores of each dimension of each candidate answer to obtain a total score. In order to ensure the fairness and scientificity of the scoring, the system can use the weighted average method, and different weights can be set for the scores of different dimensions to reflect their importance in the final answer selection. For example, relevance and accuracy may be given higher weights because they are directly related to whether the answer can correctly answer the user's question. After the scoring is completed, the system will sort each answer in the preliminary answer candidate set according to the total score, identify the answer with the highest score as the best answer, and use it as the intelligent question and answer answer for the natural language question of power safety. In this way, the question raised by the user gets an optimal answer, which is not only relevant, but also accurate and comprehensive. For example, when a user asks the question "How to prevent the risk of electric shock in high-voltage line maintenance?" and gets multiple answers from the preliminary answer candidate set, such as "regular inspection of high-voltage lines", "precautions for high-voltage line maintenance", "electric shock protection measures for high-voltage equipment", etc., the system will score these answers. Assuming that through the scoring, "Protection measures for electric shock of high-voltage equipment" received the highest total score, because it not only directly answered the user's questions about the preventive measures for electric shock risks, but also had detailed content and fluent language, then the system would select this answer as the final intelligent question-and-answer answer to provide to the user. Through such a scoring and screening mechanism, the system can ensure that the answers to power safety questions provided to users are of the highest quality, thereby improving user satisfaction and the system's intelligent question-and-answer capabilities.
[0031] In a specific embodiment, the power safety knowledge data is preprocessed to obtain a standardized power safety knowledge text, including: Using a preset natural language processing technology, extract information from unstructured documents in the power safety knowledge data to obtain preliminary power safety knowledge data; wherein the unstructured documents include free texts of power safety knowledge, power safety knowledge reports and power safety knowledge emails; Cleaning the preliminary power safety knowledge data to obtain cleaned power safety knowledge data; Converting the cleaned power safety knowledge data into a vector format to obtain vectorized power safety knowledge data; Performing principal component dimensionality reduction on the vectorized power safety knowledge data to obtain dimensionality-reduced power safety knowledge data; Performing topic identification and classification on the dimension-reduced power safety knowledge data to obtain power safety knowledge data with topic tags; The power safety knowledge data with subject tags is standardized to obtain standardized power safety knowledge text.
[0032] Specifically, when implementing the step of "preprocessing the power safety knowledge data to obtain standardized power safety knowledge text", it is first necessary to extract information from the power safety knowledge data. This process uses a preset natural language processing technology, and its main purpose is to extract valuable information from unstructured documents. Unstructured documents include free text of power safety knowledge, power safety knowledge reports, and power safety knowledge emails. Through information extraction technologies, such as entity recognition and relationship extraction, these unstructured documents can be converted into structured preliminary power safety knowledge data. Next, it is crucial to clean the preliminary power safety knowledge data. The purpose of data cleaning is to remove noise data, duplicate data, and incomplete data to ensure the accuracy and consistency of the data. The cleaning process may include spelling checking, stop word removal, data completion, and other operations. For example, in the power safety knowledge report, there may be problems such as inconsistent formats and spelling errors. The cleaning step will correct these problems to obtain cleaned power safety knowledge data. Afterwards, the cleaned power safety knowledge data will be converted into a vector format so that the computer can process the data more efficiently. The process of vectorization usually uses word embedding technology, such as Word2Vec, GloVe or BERT, to convert text data into a fixed-length vector representation. These vectors can capture the semantic information of the text, making subsequent processing more convenient and effective. After obtaining the vectorized power safety knowledge data, principal component dimensionality reduction is required. Principal component analysis (PCA) is a commonly used dimensionality reduction technology that can remove redundant information and retain the main variation characteristics by reducing the dimension of the vector. This not only reduces the computational complexity, but also improves the speed and efficiency of data processing. The data after dimensionality reduction is the reduced dimensionality power safety knowledge data. Next, the topic identification and classification of the reduced dimensionality power safety knowledge data is to further organize and understand the data. Topic identification can use topic modeling methods such as latent Dirichlet allocation (LDA) to assign data to different topic categories and label each data item with corresponding topic labels. Classification is to classify data into different categories according to predefined categories. For example, power safety knowledge data can be divided into categories such as "electric shock protection", "high-voltage line maintenance", and "equipment inspection". The last step is to standardize the power safety knowledge data with subject tags to obtain standardized power safety knowledge text. Standardization includes unifying terminology, format, and expression to ensure that data from different sources have consistent representation. For example, "electric shock risk protection measures in high-voltage line maintenance" is uniformly expressed as "electric shock protection" and maintained consistent in the document. Through this series of preprocessing steps, the final standardized power safety knowledge text can be better used in the subsequent intelligent question-and-answer system to ensure that the system can accurately and efficiently provide answers to power safety questions.For example, when processing an electric safety knowledge report containing the question "How to prevent the risk of electric shock during high-voltage line maintenance?", the system will first extract relevant protective measures information, clean up redundant and erroneous data, convert it into a vector representation and perform dimensionality reduction, identify its theme as "electric shock protection", and finally standardize it into a standardized electric safety knowledge text so that when users ask relevant questions, the system can quickly retrieve and provide accurate answers.
[0033] In a specific embodiment, the standardized power safety knowledge text is semantically parsed to obtain a power safety knowledge graph, including: Extracting entities, attributes and relationships between entities and attributes in the standardized power safety knowledge text to obtain semantic power safety knowledge elements; Using multimodal fusion technology, the semanticized power safety knowledge elements are multimodally fused to obtain fused power safety knowledge entity elements; Mining implicit connections between entities in the fused electric power safety knowledge entity elements to obtain mined entity elements; Performing relational reasoning and expansion on the mined entity elements and the attributes to obtain an extended power safety knowledge relational network; Define the functional role of each entity in the context of the standardized power safety knowledge text, and perform semantic role annotation on the extended power safety knowledge relationship network based on the functional role to obtain a power safety knowledge network with role labels; wherein the power safety knowledge network with role labels is a network structure after role annotation, ensuring that the functional role of each entity in a specific context is clear; Performing formal logic reasoning on the power safety knowledge network with role labels to obtain a draft power safety knowledge graph; The draft power safety knowledge graph is subjected to graph optimization processing to obtain a power safety knowledge graph.
[0034] Specifically, when implementing the step of "semantically parsing the standardized power safety knowledge text to obtain the power safety knowledge graph", it is first necessary to extract the entities, attributes and relationships of the standardized power safety knowledge text. This step uses natural language processing (NLP) technology to identify key entities (such as equipment, operators), attributes (such as voltage level, safety measures) and the relationship between entities and attributes (such as "equipment-has-voltage level", "operator-performs-safety measures") in the text. This process is achieved through named entity recognition (NER) and relationship extraction technology to obtain semantic power safety knowledge elements. Next, multimodal fusion technology is used to perform multimodal fusion on the semantic power safety knowledge elements. Multimodal fusion technology usually combines multiple data sources such as text, images, and videos to enrich and verify the extracted information. For example, the description in the text can be fused with the corresponding equipment pictures and operation videos to enhance the accuracy and comprehensiveness of the knowledge elements and obtain fused power safety knowledge entity elements. After fusion of power safety knowledge entity elements, the implicit connections between entities in these elements are mined. This step uses data mining and machine learning technology to discover potential entity associations. For example, in the text of high-voltage line maintenance, there may be an implicit connection between "electric shock protection" and "equipment inspection", which can be revealed through mining technology to obtain mining entity elements. Subsequently, the mining entity elements and the attributes are subjected to relational reasoning and expansion. Relational reasoning uses knowledge graph reasoning technology to derive new relationships based on known relationships, thereby expanding the existing power safety knowledge network. For example, it is known that there is an implicit connection between "electric shock protection" and "equipment inspection", and the specific steps of "electric shock protection measures" included in "equipment inspection" are inferred to obtain an extended power safety knowledge relationship network. When defining the functional roles of each entity in the context of the standardized power safety knowledge text, the entities can be labeled with detailed roles based on the context. For example, in the text of high-voltage line maintenance, "operator" can be labeled as "executor", "equipment" is labeled as "operation object", and "safety measures" are labeled as "protection means". This annotation based on functional roles ensures that the functional role of each entity in a specific context is clear, thereby obtaining a power safety knowledge network with role labels. Next, formal logic reasoning is performed on the power safety knowledge network with role labels to ensure the logical consistency and integrity of the knowledge graph. For example, through formal logic reasoning, it can be verified whether "when the operator performs safety measures, the equipment must be in a power-off state" is logical, thereby forming a draft power safety knowledge graph. Finally, the draft power safety knowledge graph is optimized to improve the quality and application effect of the knowledge graph. The optimization process includes eliminating redundant relationships, correcting erroneous associations, and enhancing knowledge coverage. Through this series of steps, a high-quality power safety knowledge graph is finally obtained.For example, when processing the standardized power safety knowledge text "How to prevent the risk of electric shock during high-voltage line maintenance?", first extract the entities and attributes such as "high-voltage line", "maintenance", "electric shock risk" and related measures, and use multimodal fusion technology to combine the corresponding pictures and video information to dig out the potential connections between these entities, such as the relationship between "electric shock protection" and "equipment inspection". Then, through relational reasoning, expand new knowledge, such as "electric shock protection" is part of "equipment inspection", and define specific roles for each entity, such as "operator" as "executor" and "equipment" as "operation object". After formal logic reasoning and graph optimization, a clear, accurate and operational power safety knowledge graph is finally formed to ensure that the functional role of each entity in a specific context is clear, which helps to efficiently answer relevant questions raised by users.
[0035] In a specific embodiment, formal logic reasoning is performed on the power safety knowledge network with role labels to obtain a draft power safety knowledge graph, including: Applying first-order logic reasoning technology, transforming entities, attributes and their relationships in the power safety knowledge network with role labels into logical formulas to obtain a set of logical formulas; Performing closure reasoning on the set of logic formulas to obtain a set of extended logic formulas; Resolving conflicts and inconsistent logical relationships in the extended logic formula set using constraint satisfaction technology to obtain a consistent logic formula set; Performing a semantic consistency check on the consistent set of logical formulas to verify the correctness and completeness of the logical formulas, and obtaining a check set of logical formulas; Constructing a preliminary draft of the electric power safety knowledge graph based on the set of checking logic formulas; wherein the draft graph includes nodes and edges, the nodes are entities, the attributes are embedded in the entities, and the relationships are used as edges; The check logic formula set is logically verified to obtain a draft of the power safety knowledge graph.
[0036] Specifically, when implementing the step of "performing formal logic reasoning on the power safety knowledge network with role labels to obtain a draft of the power safety knowledge graph", it is first necessary to apply the first-order logic reasoning technology to convert the entities, attributes and their relationships in the power safety knowledge network with role labels into a set of logical formulas. This step accurately describes the various elements and their relationships in the power safety knowledge network through formal logic expressions. For example, assuming that there are operator A, equipment B and electric shock protection measures C in a high-voltage line maintenance scenario, these entities and their relationships can be converted into logical formulas, such as "operator A performs electric shock protection measures C" and "equipment B needs to perform electric shock protection measures C". Then, closure reasoning is performed on these sets of logical formulas. Closure reasoning aims to derive more implicit logical formulas from existing logical formulas, thereby expanding existing knowledge. For example, through reasoning, the implicit logical relationship of "if operator A performs electric shock protection measures C, then the safety of equipment B is guaranteed" can be obtained to form an extended set of logical formulas. However, in the extended set of logical formulas, there may be some conflicting and inconsistent logical relationships. At this time, constraint satisfaction technology is used to resolve these conflicts and inconsistencies to ensure the self-consistency of the logical formula. For example, if it is found during the reasoning process that the constraint "equipment B should not have current when performing electric shock protection measure C" conflicts with "equipment B needs to be powered on during maintenance", then it is necessary to adjust these formulas through constraint satisfaction technology to ensure their correctness under the same logical framework, and finally obtain a consistent set of logical formulas. Then, the consistent set of logical formulas is subjected to semantic consistency check to verify the correctness and completeness of the logical formulas. This step ensures that there are no contradictions by checking the semantic rationality of each logical formula. For example, when checking the rationality of "operator A performs electric shock protection measure C", it is necessary to ensure that "electric shock protection measure C" is indeed executable by "operator A" in this context and does not conflict with other related logical formulas. In this way, a set of check logic formulas is obtained through semantic consistency check. Based on the set of check logic formulas, a preliminary draft of the electric safety knowledge graph can be constructed. During the construction process, these logical formulas are converted into nodes and edges in the graph. Each node represents an entity, such as an operator, equipment, or safety measure, and embeds attributes into the entity, such as "Operator A" has the attribute "Qualification Level". Relationships connect these nodes as edges. For example, relationships such as "execution" or "need" constitute edges in the graph, and these edges connect related entities. Finally, the set of inspection logic formulas is logically verified to ensure the correctness of the entire draft of the power safety knowledge graph. During the logic verification process, each relationship and node in the graph is fully checked according to the defined logical rules and constraints.For example, verify whether "operator A" can indeed perform "electric shock protection measures C" related to "equipment B", and whether these relationships are logical in actual operation. After logical verification, ensure that each part of the graph complies with actual operation and safety specifications, so as to finally obtain a complete and consistent draft of the power safety knowledge graph. For example, when dealing with the standardized power safety knowledge text of "How to prevent the risk of electric shock during high-voltage line maintenance?", first convert the entities in the text such as "high-voltage line", "maintenance", "electric shock risk" and its related measures into logical formulas, such as "high-voltage line needs maintenance", "there is a risk of electric shock during maintenance", etc. Through closure reasoning, more implicit logical relationships can be derived, such as "in order to prevent the risk of electric shock, electric shock protection measures must be taken". When resolving conflicts, if it is found that "some equipment needs to be powered off during maintenance" conflicts with "equipment needs to be powered on during maintenance", these formulas are adjusted through constraint satisfaction technology to ensure consistency. After the semantic consistency check and confirmation of the semantic correctness of each formula, a preliminary draft of the knowledge graph was constructed, with "high-voltage lines", "maintenance", "electric shock protection measures" and other nodes, and relationships such as "need" and "execution" as edges. Finally, through logical verification, it was ensured that each relationship and entity in the graph conformed to the logic and safety specifications in actual operation, and finally a complete draft of the power safety knowledge graph was formed.
[0037] In a specific embodiment, the power safety natural language question is segmented and POS tagged to obtain power safety question keywords, including: The power safety natural language question is segmented into granularity using a preset adaptive word segmentation technology to obtain a preliminary word segmentation result; Performing part-of-speech tagging on the preliminary word segmentation results to obtain tagged word segmentations, and identifying the grammatical functions of the tagged word segmentations; Using dependency syntactic analysis technology, constructing dependency relationships for the preliminary word segmentation results based on the grammatical functions to obtain a dependency syntactic tree; Performing phrase structure analysis on the dependency syntax tree to extract a set of key phrases; Acquire a context-related key phrase set, and semantically expand the extracted key phrase set based on the context-related key phrase set to obtain expanded power safety issue keywords; The extended power safety issue keywords are semantically aggregated to obtain power safety issue keywords.
[0038] Specifically, when implementing the step of "segmenting and tagging the natural language problem of power safety to obtain keywords of the power safety problem", it is first necessary to segment the natural language problem of power safety into granularity through the preset adaptive segmentation technology to obtain a preliminary segmentation result. The adaptive segmentation technology plays a key role here. It can automatically adjust the segmentation granularity according to the different characteristics of the input problem. For example, for the input "What are the power line safety detection methods", the adaptive segmentation technology will segment it into "power / line / safety / detection / method / have / which". Next, the above preliminary segmentation results are tagged with parts of speech to obtain the tagged segmentation, and the grammatical function of the tagged segmentation is identified. Part of speech tagging can clarify the role of each word in the sentence by assigning a part of speech tag to each word, such as noun, verb, adjective, etc. For "power / line / safety / detection / method / have / which", the part of speech tagging will mark "power" as a noun, "line" as a noun, "safety" as an adjective, "detection" as a verb, "method" as a noun, "have" as a verb, and "which" as an interrogative pronoun. Then, the dependency syntactic analysis technology is used to construct the dependency relationship of the preliminary word segmentation results based on the grammatical function to obtain a dependency syntactic tree. Dependency syntactic analysis can reveal the dependency relationship between words and construct a syntactic structure tree of the sentence. For example, for "What are the safety detection methods for power lines", the dependency syntactic tree will indicate that "detection" is the core word and the dependency relationship between other words, such as "power line" as the modifying component of "detection", "safety" modifies "detection", "method" is the object of "detection", and "there are" and "which" are the supplementary components of the overall structure. Then, the dependency syntactic tree is subjected to phrase structure analysis to extract a set of key phrases. Phrase structure analysis can further extract phrases with important semantic functions. For example, in the power safety problem, the key phrases include "power line safety detection method", and these phrase sets are the basis for subsequent analysis. After obtaining the context-related key phrase set, the extracted key phrase set is semantically expanded based on the context-related key phrase set to obtain the extended power safety problem keywords. The purpose of semantic expansion is to enrich and improve the semantic scope of key phrases by considering context information. For example, through expansion, "power line safety detection method" can be expanded to "power line safety detection method and precautions", thereby covering more potential user issues. Finally, the expanded power safety problem keywords are semantically aggregated to obtain power safety problem keywords. Semantic aggregation integrates similar or related keywords to form a more concise and accurate keyword set. For example, the core keywords "power", "line", "safety", "detection", and "method" are extracted from the expanded phrases, and redundant components are removed to finally obtain a power safety problem keyword set.For example, when a user inputs "What are the safety detection methods for power lines?", through the above series of steps, the system will eventually extract and aggregate keywords such as "power", "line", "safety", "detection", and "method". These keywords can accurately reflect the core content of the user's question and help the subsequent knowledge graph matching and intelligent question-answering. In this way, the system can efficiently and accurately extract key information about power safety issues in complex natural language processing, laying the foundation for providing accurate answers.
[0039] In a specific embodiment, the power safety question keywords are mapped and matched with the power safety knowledge graph to obtain a preliminary answer candidate set, including: Performing semantic vectorization processing on the power safety issue keywords to obtain keyword vectors; Performing semantic vectorization processing on the electric power safety knowledge graph to obtain a graph vector; Calculating similarity between the keyword vector and the graph vector to identify entities similar to the keyword and obtain a set of related entities; Performing path search on each entity in the related entity set and the relationship corresponding to the entity to obtain a path set; Performing context-aware reasoning on the path set and the related entity set to obtain reasoning candidate answers; The inference candidate answers are merged by similarity to obtain a preliminary answer candidate set.
[0040] Specifically, when implementing the step of "mapping and matching the power safety problem keywords with the power safety knowledge graph to obtain a preliminary answer candidate set", it is first necessary to semantically vectorize the power safety problem keywords to obtain keyword vectors. This step mainly uses natural language processing technology to convert textual keywords into numerical forms that can be understood and processed by computers, that is, vectors. For example, for the keywords "prevention", "high-voltage line", "maintenance", and "electric shock risk", we can use a pre-trained word vector model (such as Word2Vec or BERT) to convert each keyword into a corresponding vector representation. Subsequently, the power safety knowledge graph is semantically vectorized to obtain a graph vector. The power safety knowledge graph is a graph structure containing a large amount of knowledge in the field of power safety, in which nodes represent entities (such as "high-voltage line", "maintenance measures") and relationships (such as "preventive measures", "risk factors"). By using graph embedding technology (such as Node2Vec, GraphSAGE), these entities and relationships can be mapped to vector representations to form graph vectors. After obtaining the keyword vector and the graph vector, similarity calculation is then performed on the keyword vector and the graph vector to identify entities with similarity to the keyword and obtain a set of related entities. Similarity calculation can be performed by methods such as cosine similarity and Euclidean distance, so as to identify the graph entity that is closest to the question keyword in the vector space. For example, for the keyword "prevention", similarity calculation may identify related entities such as "protective measures" and "safety regulations"; for "high-voltage line", similar entities such as "transmission line" and "power grid" may be identified. Subsequently, path search is performed on each entity in the set of related entities and the relationship corresponding to the entity to obtain a path set. This step finds all possible paths starting from the related entities by executing a path search algorithm (such as depth-first search and breadth-first search) in the knowledge graph, and these paths represent the association relationship between entities. For example, starting from the related entity "high-voltage line", the path search may find a set of paths such as "high-voltage line->maintenance->repair measures", "high-voltage line->risk->electric shock risk". Next, context-aware reasoning is performed on the path set and the set of related entities to obtain reasoning candidate answers. Context-aware reasoning is to combine the overall context of the question, use the structural information and entity relationships in the knowledge graph to reason, and derive possible candidate answers. For example, for the question "How to prevent the risk of electric shock during high-voltage line maintenance?", context-aware reasoning may combine entities such as "high-voltage line", "maintenance", "risk of electric shock" and their relationships to infer candidate answers such as "regular maintenance", "use of insulating tools", and "setting warning signs". Finally, the candidate answers are merged by similarity to obtain a preliminary answer candidate set.Similarity merging is to calculate the similarity between each inference candidate answer and the question keyword, merge the candidate answers with higher similarity together, and form a preliminary answer candidate set. For example, through similarity merging, it is possible to obtain a preliminary answer candidate set such as "Measures to prevent the risk of electric shock from high-voltage lines include regular maintenance, use of insulating tools, and setting of warning signs". In short, through the above steps, mapping and matching the keywords of power safety issues with the power safety knowledge graph can effectively mine entities and relationships related to the problem from the knowledge graph, and finally obtain a preliminary answer candidate set through path search and context-aware reasoning, combined with similarity merging, which provides an important reference and basis for solving power safety problems.
[0041] In a specific embodiment, the preliminary answer candidate set is scored, and the answer to the power safety question with the highest score is used as the intelligent question-answering answer to the power safety natural language question, including: Scoring the preliminary answer candidate set from multiple dimensions to obtain scoring results for the candidate answers; Performing feature weighting processing on the scoring results of the candidate answers to obtain a weighted scoring result; Clustering the preliminary answer candidate set based on the weighted scoring result to obtain clustered candidate answer clusters; Selecting representative answers from the clustered candidate answer clusters to obtain a representative answer set; The ranked representative answers are scored and compared, and the ranked representative answer with the highest score is selected as the intelligent question-and-answer answer to the natural language question on power safety.
[0042] Specifically, when implementing the step of "scoring the preliminary answer candidate set and taking the highest-scoring answer to the power safety question as the intelligent question-answering answer to the power safety natural language question", it is first necessary to score the preliminary answer candidate set from multiple dimensions to obtain the scoring results of the candidate answers. These scoring dimensions may include the accuracy, relevance, completeness, and reliability of the answers. For example, assuming that the preliminary answer candidate set includes answers such as "regular maintenance", "use of insulating tools", and "setting warning signs", the scoring system will give specific scores to each dimension of each answer. For example, "regular maintenance" has a high score in accuracy and relevance, but may have a low score in completeness. Next, the scoring results of the candidate answers are feature-weighted to obtain a weighted scoring result. This step is to combine the scores of each dimension by assigning different weights to different scoring dimensions. For example, in power safety questions, accuracy and relevance may be given higher weights, while completeness and reliability may be second. Assume that "regular maintenance" scores 8 in accuracy, 7 in relevance, 6 in completeness, and 7 in reliability. If the weights are 0.4, 0.3, 0.2, and 0.1 respectively, then its weighted score result is (8*0.4 + 7*0.3 + 6*0.2 + 7*0.1) = 7.2. Subsequently, the preliminary answer candidate set is clustered based on the weighted score result to obtain clusters of clustered candidate answers. The clustering process is to group similar answers into one cluster so that subsequent processing can be more efficient. Assuming that there are two similar answers "regular maintenance" and "regular inspection" in the preliminary answer candidate set, they will be classified into the same cluster candidate answer cluster, while "using insulating tools" and "wearing safety equipment" may be classified into another cluster. Then, representative answers are selected for the cluster candidate answer clusters to obtain a representative answer set. In each cluster candidate answer cluster, the most representative answer is selected as the representative answer of the cluster. For example, in a cluster containing "regular maintenance" and "regular inspection", "regular maintenance" may be selected as a representative answer because it scores higher in the weighted scoring result and is more representative in the cluster. In a cluster containing "using insulating tools" and "wearing safety equipment", "using insulating tools" may be selected as a representative answer. Finally, the ranked representative answers are scored and compared, and the ranked representative answer with the highest score is selected as the intelligent question and answer answer for the natural language question of power safety. This step is to compare the weighted scoring results of each representative answer and select the one with the highest score as the final answer. For example, if the weighted scoring result of "regular maintenance" is 7.2, and the weighted scoring result of "using insulating tools" is 6.8, then "regular maintenance" is finally selected as the intelligent question and answer answer for the power safety question. Through the above steps, the system can filter out the best answer from the preliminary answer candidate set, thereby providing high-quality intelligent question and answer services.In this process, the implementation of each step needs to combine natural language processing, machine learning, knowledge graphs and other technical means to ensure the accuracy and reliability of the answers. For example, in the scoring process, pre-trained models such as BERT can be used to calculate semantic similarity, and clustering algorithms such as K-means can be used in the clustering process. In the process of selecting representative answers and comparing the final scores, it is necessary to comprehensively consider the scores of various dimensions and their weights to ensure the high quality and high credibility of the final answers.
[0043] The above describes the intelligent question-answering method for power safety knowledge in the embodiment of the present invention. The following describes the intelligent question-answering system for power safety knowledge in the embodiment of the present invention. Figure 2 , an embodiment of the intelligent question-answering system for power safety knowledge in an embodiment of the present invention includes: The acquisition module 21 is used to acquire data from the power safety knowledge database to obtain power safety knowledge data, and to pre-process the power safety knowledge data to obtain a standardized power safety knowledge text; A parsing module 22, used for performing semantic parsing on the standardized power safety knowledge text to obtain a power safety knowledge graph; The tagging module 23 is used to obtain the natural language question about power safety input by the user, and perform word segmentation and part-of-speech tagging on the natural language question about power safety to obtain keywords for the power safety question; A matching module 24, configured to map and match the power safety question keywords with the power safety knowledge graph to obtain a preliminary answer candidate set; The sorting module 25 is used to score the preliminary answer candidate set and use the answer to the power safety question with the highest score as the intelligent question-answering answer to the power safety natural language question.
[0044] In this embodiment, for the specific implementation of each unit in the above system embodiment, please refer to the above method embodiment, which will not be repeated here.
[0045] Reference Figure 3 The present invention also provides a computer device in an embodiment, wherein the internal structure of the computer device can be as follows: Figure 3As shown. The computer device includes a processor, a memory, a display screen, an input device, a network interface and a database connected through a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above method is implemented.
[0046] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied.
[0047] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0048] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided by the present invention and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM.
[0049] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0050] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An intelligent question-answering method for power safety knowledge, characterized in that: The following steps are involved: Collecting data from a power safety knowledge database to obtain power safety knowledge data, and preprocessing the power safety knowledge data to obtain a standardized power safety knowledge text; Performing semantic analysis on the standardized power safety knowledge text to obtain a power safety knowledge graph; Obtaining a natural language question about power safety input by a user, and performing word segmentation and part-of-speech tagging on the natural language question about power safety to obtain keywords for the power safety question; Mapping and matching the power safety question keywords with the power safety knowledge graph to obtain a preliminary answer candidate set; The preliminary answer candidate set is scored, and the answer to the power safety question with the highest score is used as the intelligent question-answering answer to the power safety natural language question.
2. The intelligent question-answering method for power safety knowledge according to claim 1 is characterized in that: Data is collected from the power safety knowledge database to obtain power safety knowledge data, and the power safety knowledge data is preprocessed to obtain a standardized power safety knowledge text, including: Using a preset natural language processing technology, extract information from unstructured documents in the power safety knowledge database to obtain preliminary power safety knowledge data; wherein the unstructured documents include power safety knowledge free text, power safety knowledge reports and power safety knowledge emails; Cleaning the preliminary power safety knowledge data to obtain cleaned power safety knowledge data; Converting the cleaned power safety knowledge data into a vector format to obtain vectorized power safety knowledge data; Performing principal component dimensionality reduction on the vectorized power safety knowledge data to obtain dimensionality-reduced power safety knowledge data; Performing topic identification and classification on the dimension-reduced power safety knowledge data to obtain power safety knowledge data with topic tags; The power safety knowledge data with subject tags is standardized to obtain standardized power safety knowledge text.
3. The intelligent question-answering method for power safety knowledge according to claim 1 is characterized in that: The standardized power safety knowledge text is semantically parsed to obtain a power safety knowledge graph, including: Extracting entities, attributes and relationships between entities and attributes in the standardized power safety knowledge text to obtain semantic power safety knowledge elements; Using multimodal fusion technology, the semanticized power safety knowledge elements are multimodally fused to obtain fused power safety knowledge entity elements; Mining implicit connections between entities in the fused electric power safety knowledge entity elements to obtain mined entity elements; Performing relational reasoning and expansion on the mined entity elements and the attributes to obtain an extended power safety knowledge relational network; Define the functional role of each entity in the context of the standardized power safety knowledge text, and perform semantic role annotation on the extended power safety knowledge relationship network based on the functional role to obtain a power safety knowledge network with role labels; wherein the power safety knowledge network with role labels is a network structure after role annotation, ensuring that the functional role of each entity in a specific context is clear; Performing formal logic reasoning on the power safety knowledge network with role labels to obtain a draft power safety knowledge graph; The draft power safety knowledge graph is subjected to graph optimization processing to obtain a power safety knowledge graph.
4. The intelligent question-answering method for power safety knowledge according to claim 3 is characterized in that: Perform formal logic reasoning on the power safety knowledge network with role labels to obtain a draft power safety knowledge graph, including: Applying first-order logic reasoning technology, transforming entities, attributes and their relationships in the power safety knowledge network with role labels into logical formulas to obtain a set of logical formulas; Performing closure reasoning on the set of logic formulas to obtain a set of extended logic formulas; Resolving conflicts and inconsistent logical relationships in the extended logic formula set using constraint satisfaction technology to obtain a consistent logic formula set; Performing a semantic consistency check on the consistent set of logical formulas to verify the correctness and completeness of the logical formulas, and obtaining a check set of logical formulas; Constructing a preliminary draft of the electric power safety knowledge graph based on the set of checking logic formulas; wherein the draft graph includes nodes and edges, the nodes are entities, the attributes are embedded in the entities, and the relationships are used as edges; The check logic formula set is logically verified to obtain a draft of the power safety knowledge graph.
5. The intelligent question-answering method for power safety knowledge according to claim 1 is characterized in that: The power safety natural language question is segmented and POS tagged to obtain keywords of the power safety question, including: The power safety natural language question is segmented into granularity using a preset adaptive word segmentation technology to obtain a preliminary word segmentation result; Performing part-of-speech tagging on the preliminary word segmentation results to obtain tagged word segmentations, and identifying the grammatical functions of the tagged word segmentations; Using dependency syntactic analysis technology, constructing dependency relationships for the preliminary word segmentation results based on the grammatical functions to obtain a dependency syntactic tree; Performing phrase structure analysis on the dependency syntax tree to extract a set of key phrases; Acquire a context-related key phrase set, and semantically expand the extracted key phrase set based on the context-related key phrase set to obtain expanded power safety issue keywords; The extended power safety issue keywords are semantically aggregated to obtain power safety issue keywords.
6. The intelligent question-answering method for power safety knowledge according to claim 1 is characterized in that: Map and match the power safety question keywords with the power safety knowledge graph to obtain a preliminary answer candidate set, including: Performing semantic vectorization processing on the power safety issue keywords to obtain keyword vectors; Performing semantic vectorization processing on the electric power safety knowledge graph to obtain a graph vector; Calculating similarity between the keyword vector and the graph vector to identify entities similar to the keyword and obtain a set of related entities; Performing path search on each entity in the related entity set and the relationship corresponding to the entity to obtain a path set; Based on the path set and the related entity set, context-aware reasoning is performed on the keywords of the power safety problem to obtain reasoning candidate answers; The inference candidate answers are merged by similarity to obtain a preliminary answer candidate set.
7. The intelligent question-answering method for power safety knowledge according to claim 1, characterized in that: The preliminary answer candidate set is scored and sorted to obtain the highest-scoring answers to the power safety question, including: Scoring the preliminary answer candidate set from multiple dimensions to obtain scoring results for the candidate answers; Performing feature weighting processing on the scoring results of the candidate answers to obtain a weighted scoring result; Clustering the preliminary answer candidate set based on the weighted scoring result to obtain clustered candidate answer clusters; Selecting representative answers from the clustered candidate answer clusters to obtain a representative answer set; The ranked representative answers are scored and compared, and the ranked representative answer with the highest score is selected as the intelligent question-and-answer answer to the natural language question on power safety.
8. An intelligent question-answering system for power safety knowledge, characterized in that: include: The acquisition module is used to collect data from the power safety knowledge database to obtain power safety knowledge data, and pre-process the power safety knowledge data to obtain a standardized power safety knowledge text; A parsing module, used for performing semantic parsing on the standardized power safety knowledge text to obtain a power safety knowledge graph; A tagging module is used to obtain the natural language questions about power safety input by the user, and perform word segmentation and part-of-speech tagging on the natural language questions about power safety to obtain keywords for the power safety questions; A matching module, used to map and match the power safety question keywords with the power safety knowledge graph to obtain a preliminary answer candidate set; The sorting module is used to score and sort the preliminary answer candidate set to obtain the answer to the power safety question with the highest score.
9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Man-machine conversation data processing method for chronic disease management and related equipment
CN119761523A
Knowledge graph retrieval reasoning method and system based on big language model enhancement
CN120123487A
Question answer determination method and device, electronic equipment and computer storage medium
CN120508625A
Power grid safety answer text generation method and device, medium and program product
CN121092660A