Intelligent question answering system and method in field of electric power data security based on community detection

By introducing an intelligent question-and-answer system based on community detection into the power data security system, combining large language models and knowledge inference modules, the problem that existing systems are difficult to analyze and process dynamically changing power data in real time is solved, intelligent analysis and safety warning of power data are realized, and data analysis efficiency and safety protection capabilities are improved.

CN119646159APending Publication Date: 2025-03-18ECONOMIC TECH RES INST OF STATE GRID HENAN ELECTRIC POWER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411784536.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing power data security systems lack intelligent and automated response measures, making it difficult to analyze and process dynamically changing power data in real time, making it difficult to respond to data security threats in a timely manner.

Method used

An intelligent question-and-answer system based on community detection is adopted, combined with a large language model and knowledge reasoning module, to realize intelligent analysis and safety warning of power data. The system includes a large language model module, a knowledge inference module, a data security management module and a database module, which can automatically analyze the semantics of questions, generate answers, and perform permission verification.

Benefits of technology

Through intelligent large language model and knowledge inference module, power industry staff can quickly obtain the safety status and related analysis results of power system operation, improve data analysis efficiency, reduce the time and energy consumption of manual operation, and detect potential safety hazards in real time and provide intelligent early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646159A_ABST
    Figure CN119646159A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of energy power data security, and particularly relates to an intelligent question-answering system and method in the field of power data security based on community detection. Comprising a large language model module, a knowledge reasoning module, a data security management module and a database module. The large language model module is used for analyzing semantics of problems; the knowledge reasoning module is used for performing knowledge reasoning on the semantics of the question and generating an answer; the data security management module comprises a data encryption module, an identity authentication module, an authority control module and an audit tracking module; the database module comprises an energy power basic data sub-library, an equipment operation data sub-library, a historical question and answer record sub-library and a user behavior data sub-library; in the electric power data security analysis process, the big language model technology and professional knowledge reasoning are combined, automatic question answering of the electric power data security problem is achieved, electric power workers are assisted in rapidly obtaining needed information, the decision-making efficiency is improved, and manual operation errors are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of energy and power data security technology, and specifically relates to an intelligent question-answering system and method in the field of power data security based on community detection. Background Art

[0002] The power system contains a large amount of equipment status information, user power consumption data, and real-time monitoring data. These data are vital to power companies and users, but they are also easy targets for hacker attacks. Once the data is tampered with or lost, it may lead to equipment failure, energy waste, and even large-scale grid shutdown.

[0003] At present, most power companies rely on manual data analysis and security inspections when faced with massive amounts of power data. However, manual inspections are inefficient, subjective, and difficult to respond to in real time. In order to more effectively address these challenges, an intelligent question-answering system based on a large language model and knowledge reasoning has emerged. The system can interact with users through a large language to achieve intelligent data analysis and security warnings, improve the security protection capabilities of power data, and respond to various potential security threats in a timely manner.

[0004] Most of the existing power data security systems focus on traditional monitoring and firewall strategies, lacking intelligent and automated countermeasures. Moreover, most systems can only process static data and cannot perform intelligent analysis and security reasoning on dynamically changing data. Therefore, building an intelligent question-answering system that combines a large language model and knowledge reasoning has important practical application value in the field of power data security. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and to provide an intelligent question-answering system and a method of use in the field of power data security based on community detection, so as to combine large language model technology with professional knowledge reasoning in power data security analysis to realize automatic question-answering of power data security issues, assist power workers in quickly obtaining required information, improve decision-making efficiency, and reduce manual operation errors.

[0006] The object of the present invention is achieved as follows: an intelligent question-answering system in the field of power data security based on community detection comprises a large language model module, a knowledge reasoning module, a data security management module and a database module;

[0007] The large language model module is used to analyze the semantics of the question;

[0008] The knowledge reasoning module is used to perform knowledge reasoning on the semantics of the question and generate an answer;

[0009] The issues include energy and power data, specifically: operation data, status information or equipment information of the power system;

[0010] The data security management module includes a data encryption module, an identity authentication module, a permission control module and an audit tracking module;

[0011] The database module includes an energy and power basic data sub-library, an equipment operation data sub-library, a historical question and answer record sub-library and a user behavior data sub-library.

[0012] Furthermore, the data encryption module is used to encrypt the transmitted and stored data using a symmetric encryption algorithm or an asymmetric encryption algorithm;

[0013] The identity authentication module is used to authenticate and ensure the legitimacy of the user's identity;

[0014] The authority control module is used to divide the authority of different data and operations according to user roles;

[0015] The audit tracking module is used to record the system's operation logs and data access conditions.

[0016] Furthermore, the energy and power basic data sub-database is used to store basic data, equipment information, and network topology of the power system;

[0017] The equipment operation data sub-library is used to store real-time operation data of various energy and power equipment, including voltage, current, and power;

[0018] The historical question and answer record sub-library is used to store the records of historical questions asked by users and answers given by the system;

[0019] The user behavior data sub-library is used to store user behavior logs and preference settings.

[0020] Furthermore, the intelligent question-answering system in the field of power data security based on community detection also includes a user interface module, which includes a question input box, an answer display box, a recommended question module and a historical question review module;

[0021] The question input box is used to receive questions input by the user and submit the questions to the large language model module through the user interaction interface;

[0022] The answer display box is used to display the answer output by the knowledge reasoning module;

[0023] The recommended question module is used to recommend relevant questions based on the user's historical questions and relevant domain knowledge;

[0024] The historical question review module displays questions previously asked by the user and the corresponding answers.

[0025] Furthermore, the large language model module includes a text preprocessing unit, a semantic analysis unit and a grammatical analysis unit;

[0026] The text preprocessing unit is used to perform word segmentation, stop word removal, and part-of-speech tagging on the question;

[0027] The semantic analysis unit is used to identify key entities, relations and intentions in the preprocessed questions;

[0028] The grammatical analysis unit is used to understand the syntactic structure of the sentence in the question and convert the preprocessed question into a reasonable semantic representation in the grammatical analysis unit;

[0029] The semantics includes the entities, relations, and actions in the question.

[0030] Furthermore, the knowledge reasoning module is used to compare the semantics extracted by the large language model module with the expert knowledge base in the field of energy and electricity, perform reasoning based on industry experience, and generate answers.

[0031] Furthermore, the intelligent question-answering system in the field of power data security based on community detection also includes an intelligent question-answering module, which includes a question classification unit, an intention recognition unit, and a context understanding unit;

[0032] The question classification unit is used to classify questions;

[0033] The intention recognition unit is used to determine the intention of asking the question, and analyze the relationship between the question and the context in conjunction with the context understanding unit, and then pass the relationship information to the knowledge reasoning module. The knowledge reasoning module adjusts the reasoning strategy based on the contextual relationship information to provide a more accurate answer.

[0034] Furthermore, the intelligent question and answer system in the field of power data security based on community detection also includes an artificial intelligence learning module, which is used to continuously optimize the large language model module and the knowledge reasoning module according to historical data, user feedback and expert input, so as to improve the system's question and answer accuracy and intelligence level.

[0035] The community detection-based intelligent question-answering method in the field of power data security comprises the following steps:

[0036] S1, receiving user questions and performing semantic analysis on the questions through the large language model module;

[0037] S2, the knowledge reasoning module performs reasoning based on the semantics of the question and the knowledge base information to generate a preliminary answer;

[0038] S3. Encrypt and verify the permissions of the generated answer according to the data security management module;

[0039] S4, returning the answer to the user interface module for display;

[0040] S5. The artificial intelligence learning module optimizes the large language model and knowledge reasoning module based on user feedback.

[0041] The knowledge reasoning module in step S2 performs reasoning based on the semantics of the question and the knowledge base information to generate a preliminary answer, including the following steps:

[0042] S2.1. Establish a corpus knowledge base;

[0043] S2.2, extract entities and relationships between entities from the corpus knowledge base;

[0044] S2.3. Build a knowledge graph based on the extracted entities and relationships;

[0045] S2.4. Perform community detection on the constructed knowledge graph to identify closely connected groups or sub-networks;

[0046] S2.5, extracting nodes and edges from the semantics of the question, and comparing them with the subnetwork identified in step 2.4; selecting the subnetwork that is closest to the nodes and edges in the semantics of the question, and extracting entities, relations, and sentences in the subnetwork that is closest;

[0047] S2.6. Use the language model to process and analyze the extracted entities, relations, and selected sentences to generate preliminary answers.

[0048] Beneficial effects of the present invention: The intelligent question-answering system in the field of power data security based on community detection of the present invention, through an intelligent large language model and knowledge reasoning module, can enable power industry workers to quickly obtain the safety status of power system operation and related analysis results, greatly improving data analysis efficiency and reducing the time and energy consumption of manual operations.

[0049] The system can detect potential safety hazards in the power system in real time and provide intelligent warnings and suggestions to help power companies better protect the security of power data and guard against various potential network attacks or data tampering.

[0050] Through automated fault analysis and decision support, the system can reduce manual operation errors, especially when dealing with complex power equipment failures and data security issues, and can rely on intelligent reasoning to make accurate judgments and effective responses.

[0051] The system has good scalability and can be continuously optimized and upgraded according to the specific needs and technological development of the power industry to adapt to the operating environment of different power companies. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0053] Figure 1 Flowchart of the intelligent question-answering system in the field of power data security based on community detection.

[0054] Figure 2 The present invention is a flowchart of the implementation method of the intelligent question-answering system in the field of power data security based on community detection.

[0055] Figure 3 This is a flowchart of community detection in the knowledge reasoning module in the system of the present invention.

[0056] Figure 4 This is a comparison chart between LoRA in the prior art and LoRA in the present invention that introduces MoE. DETAILED DESCRIPTION

[0057] The present invention will be further described below in conjunction with the accompanying drawings.

[0058] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] It should be noted that all directional indications in the embodiments of the present invention (such as up-down-left-right-front-back...) are only used to explain the relative position relationship - movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly. The connection can be a direct connection or an indirect connection.

[0061] like Figure 1-4As shown, the intelligent question-answering system in the field of power data security based on community detection of the present invention includes an intelligent question-answering module, a data security management module, a large language model module, a knowledge reasoning module, a database module and a user interface module;

[0062] The intelligent question-answering module is used to receive questions raised by users and analyze the semantics of the questions through the large language model module. The large language model and the knowledge reasoning module work together, with the former responsible for understanding the questions and the latter responsible for reasoning and generating answers using domain knowledge. The two complement each other and jointly improve the accuracy and professionalism of the intelligent question-answering system, and finally generate answers;

[0063] The following is a simple formula example to represent the process of answer generation in the knowledge reasoning module:

[0064] Answer=f(Semantics,Knowledge)

[0065] Answer is the final answer, and Semantics is the semantics of the question analyzed by the large language model module, including vocabulary, grammar, semantic relations and other understanding results, providing a basic framework for reasoning, such as determining keywords, structure and logic through multiple analyses. Knowledge is the domain knowledge used by the knowledge reasoning module, such as knowledge graphs, knowledge base rules and historical cases. Function f represents the collaborative working mechanism of the two modules, integrating, converting and processing semantics and knowledge, and finally outputting the answer given to the user by the intelligent question-answering module;

[0066] The data security management module is used to ensure the security and privacy protection of energy and power data, and to encrypt and control access to data transmission and storage. "Energy and power data" is the input data of the intelligent question-answering system (such as power system operation data, status information, equipment information, etc.), and is also the core content of the reasoning process. "Answer" is the output generated based on these basic data. The system uses these data to infer the answer to the user's question;

[0067] The database module is used to store basic data related to energy and electricity, equipment operation data, historical question and answer records, and user query history, etc.;

[0068] The user interface module is used to provide a user interaction interface, so that users can conveniently submit questions and view answers.

[0069] The large language model module includes a text preprocessing unit, a semantic analysis unit and a grammatical analysis unit;

[0070] The text preprocessing unit is used to perform word segmentation, stop word removal, part-of-speech tagging, etc. on the original question input by the user; the semantic analysis unit is used to identify the key entities, relationships, and intentions in the question;

[0071] The grammatical analysis unit is used to understand the syntactic structure of the sentence and transform the original question into a semantic representation that can be further reasoned in the grammatical analysis unit. The semantics that can be further reasoned are also called reasonable semantics. "Reasonable semantics" means that the grammatical analysis unit transforms the original question into a semantic structure that can support subsequent reasoning. This structure contains the key information in the sentence (such as entities, relationships, actions, etc.) and provides a basis for the reasoning process. Through semantics, the system can perform logical reasoning, associative reasoning, or rule-based reasoning to generate reasonable answers that meet the user's intentions. The information entropy formula is given as follows:

[0072] H(X)=-sum{i=1}^{n}p(xi)log2p(xi)

[0073] In energy and power data security, when the big language model module deals with issues such as data security risk assessment, information entropy can be used to measure the uncertainty or confusion of the data. Here X represents a random variable, such as different types of data security events, xi is the value of X, that is, a specific type of data security event, and p(xi) is the probability of the event occurring. The higher the information entropy H(X) value, the greater the uncertainty of the data security event, and the system needs to understand and infer the relevant big language description more accurately in order to provide users with accurate risk assessment and response suggestions.

[0074] Chatglm2-6b and Llama2-Chinese-7b-Chat were selected for fine-tuning using the lora and freeze fine-tuning methods respectively. The same parameters were set for comparative experiments to obtain a fine-tuning model that was more suitable for the dataset.

[0075] Improvements have been made to the LoRA module, such as Figure 4 (a) shows LoRA in the prior art, where the weights are dense and all parameters are activated for each sample. Figure 4 (b) shows LoRA combined with the Mixed Experts (MoE) framework. Multiple parallel LoRA weights (i.e., multiple expert models in MoE) are inserted into each layer, and the Router outputs the activation probability of each expert to determine which LoRA modules to activate. Using the improved LoRA fine-tuning, the QA task performance is significantly better than the initial version of LoRA, effectively solving the problem of catastrophic forgetting in the fine-tuning process of large models.

[0076] When fine-tuning the model, the following parameters are selected: the training phase is Supervised Fine-Tuning, the learning rate is 5e-5, the number of training rounds is 200 rounds (100 rounds were tested in the early stage of the study, and the final evaluation and prediction results were not ideal), the maximum gradient norm is 1, the maximum number of samples is 1000000, and other parameters are retained as default values.

[0077] As shown in Table 1, by comparing the data of the fine-tuning process and the data of the prediction and evaluation results, the BLEU-4 value reached a maximum of 80.574, indicating that the predicted text is similar to the reference text and the text is also relatively fluent. The values ​​of predict rouge-1, predict_rouge-1 and predict_rouge-2 are high, which also shows that the generated single word segment and two-word sequence can have a high similarity with the reference text. It can be seen that the fine-tuning speed of Chatglm2-6b is faster than that of llama2, the missing rate is not much different, and the loss curves are very similar. However, in the prediction and evaluation results, it can be seen that many data of Chatglm2-6b are much better than llama2, indicating that Chatglm2-6b is more suitable for the current data set, so Chatglm2-6b-LoRA is used as the large language model of the knowledge base.

[0078] Table 1. Performance comparison of fine-tuning models

[0079]

[0080] The knowledge reasoning module is used to compare the semantics extracted by the large language model module that can be further reasoned with the expert knowledge base in the field of energy and power, and to reason with the existing industry experience to generate accurate answers. Then the answers will be passed to the response generation module, so that the reasoning results can be converted into a large language form suitable for user understanding and finally output; the knowledge reasoning module further supports multiple reasoning methods such as rule-based reasoning, case-based reasoning and model reasoning. In the intelligent question-answering system in the field of energy and power, the knowledge reasoning module is extremely critical. It compares the reasonable semantics extracted by the large language model module with the expert knowledge base, combines industry experience, and reasoning and generates answers in multiple ways such as rule-based reasoning, case-based reasoning and model reasoning, and then passes it to the response generation module to convert it into a large language output. The following is a knowledge reasoning generation formula Answer = R (Semantics, KB, M), where Answer is the final output answer. Semantics is the semantic information extracted by the large language model module. As the starting basis for knowledge reasoning, KB is the expert knowledge base in the field of energy and power, and provides knowledge support for comparison with Semantics. M covers models or frameworks corresponding to reasoning methods such as rules, cases and models. For example, rule reasoning is derived from knowledge base rules, case reasoning is analogous to historical cases, and model reasoning uses data to train models. Function R integrates comparison and collaborative processing of multiple reasoning methods, generates answers and converts them into large language outputs through the response generation module.

[0081] Among them, the expert knowledge base is a database containing a large amount of industry knowledge, rules, experience and decision support information, which is the basis for the knowledge reasoning module to work effectively. In the field of energy and power, this knowledge includes various types of information ranging from technology, policies, operating procedures to best practices, which can help the system make more accurate and reasonable reasoning and decisions when facing complex problems; industry experience refers to the knowledge, technology, rules, standards and common sense accumulated through long-term practice and research in the field of energy and power, which can help the system better understand and deal with complex situations in specific scenarios, thereby providing valuable reasoning support for the large language model module. For example, power load forecasting: Based on historical power load data and meteorological data, power companies usually use empirical formulas to predict future load demand. For example, summer load is usually closely related to rising temperatures, while winter load is related to heating demand. Through these regular experiences, power dispatchers can predict power demand during certain periods of time.

[0082] The data security management module includes a data encryption module, an identity authentication module, a permission control module and an audit tracking module; wherein the data encryption module uses symmetric encryption or asymmetric encryption algorithms to encrypt the transmitted and stored data. For example, in an intelligent question-answering system, the user's input (such as questions) will be processed, and the knowledge reasoning module will reason and generate answers based on the existing knowledge base. The generated "accurate answer" belongs to the transmitted data because it is usually transmitted from the server to the user end through the network. If these "accurate answers" need to be stored for future use (such as log records, user history records, question answer archives, etc.), they can also be counted as stored data. This type of data storage is usually saved in a database or log system for subsequent auditing, analysis, or user behavior tracking operations; the following is a data security encryption mapping formula:

[0083] Secure Data=E(D,K,M)

[0084] Among them, Secure Data is the data after security processing, D is the original data generated by the knowledge reasoning module in the intelligent question-answering system, K is the encryption key, the key element corresponding to the symmetric or asymmetric encryption algorithm, and M is the encryption mode or method, which determines the encryption operation mode. Function E processes the original data according to the selected encryption algorithm and key in a specific mode and converts it into secure data to ensure confidentiality and integrity during transmission and storage, prevent data from being illegally accessed, tampered with or leaked, and ensure the security and reliability of system data.

[0085] The database module includes an energy and power basic data sub-library, an equipment operation data sub-library, a historical question and answer record sub-library and a user behavior data sub-library; among them, the energy and power basic data sub-library stores the basic data of the power system (mainly refers to the basic information and structured data related to the energy and power system, as the basis for system operation and analysis. These basic data help the system understand the basic situation of power equipment, network topology, etc., and provide support for subsequent operations, analysis and decision-making), equipment information, network topology structure, etc. The equipment operation data sub-library stores the real-time operation data of various energy and power equipment, such as voltage, current, power, etc. The historical question and answer record sub-library stores the records of user historical questions and system answers, and the user behavior data sub-library stores user behavior logs and preference settings.

[0086] The user interface module includes a question input box, an answer display box, a recommended question module and a historical question review module; the question input box is used to receive questions input by the user, the answer display box is used to display the answers generated by the system, the recommended question module recommends relevant questions based on the user's historical questions and related field knowledge, and the historical question review module displays the questions asked by the user before and the corresponding answers.

[0087] The intelligent question-answering module also includes a question classification unit, an intention recognition unit, and a context understanding unit; wherein the question classification unit is used to classify the user's questions, the intention recognition unit is used to determine the user's intention to ask questions, and analyzes the relationship between the question and the context in combination with the context understanding unit, and then passes these relationship information to the knowledge reasoning module, which adjusts the reasoning strategy according to the context relationship information. If the context indicates that the question arises under specific environmental or operating conditions, then the rules, cases, and models related to these conditions will be given priority during reasoning, thereby providing a more accurate answer.

[0088] Community detection is a technical means for discovering the intrinsic community structure in complex networks (such as knowledge graphs). Its main purpose is to identify groups of nodes in the network that are more closely connected. The connection density of nodes within these groups is relatively high, while the connection with nodes outside the group is relatively sparse. Specifically, community detection is implemented through specific algorithms, such as the Louvain algorithm. The Louvain algorithm focuses on optimizing modularity, which is used to measure the difference between the tightness of links within a community and the links between communities. The algorithm starts by treating each node as a separate community, gradually iteratively merges communities, and continuously optimizes modularity until it reaches the optimal state. At this time, the graph structure abstracted by the complex network (such as the knowledge graph) is divided into multiple different communities.

[0089] In order to effectively prioritize communities for deeper analysis, the communities with the top δ% relevance scores are selected. The selection threshold N is determined as follows: , where |M| represents the total number of communities. Therefore, the subset of communities most relevant to statement c is defined as:

[0090] M*c={m∈M:rank(r(c,m))≤N}

[0091] Among them, M represents the set of communities, that is, it covers all the communities that need to be analyzed and considered. Subsequent operations, such as screening communities with high relevance scores, are all carried out within the set of all communities; c represents a claim. In the process of prioritizing communities and analyzing their relevance, the relevance of communities to them is measured around a specific claim. Under different claims, the relevance ranking of communities will be different accordingly. N represents a threshold, which is a value determined by a specific calculation method. It is used to screen out communities with relevance scores ranked in the top certain proportion (top δ%), that is, to define which communities belong to the community subset most relevant to claim c based on this threshold.

[0092] Each community m is regarded as a subgraph Gm = (Em, Rm), which contains a set of entity nodes Em and their relations Rm. The embedding representation of each community is It is obtained by averaging the BERT embeddings of the nodes in Em:

[0093]

[0094] Where |Em| is the number of nodes in community m, and ei represents the word embedding of node i obtained from the BERT model. This approach aggregates the collective semantic properties of the community and encapsulates a comprehensive semantic representation.

[0095] The relevance score r(c,m) between statement c and community m is calculated by the dot product of their embedding vectors: In order to measure the correlation between statement c and community m, we introduce the correlation score r(c,m). It is calculated by embedding vector of statement c With the embedding vector of community m The specific calculation method is to find the dot product of the two embedded vectors. and The corresponding elements are multiplied and then summed up, and the result is the correlation score r(c,m) between the two. Through such calculation, the degree of association between statement c and community m can be intuitively displayed in a quantitative form.

[0096] The system of the present invention also includes an artificial intelligence learning module, which is used to continuously optimize the large language model and knowledge reasoning algorithm based on historical data, user feedback and expert input, so as to improve the accuracy and intelligence level of the system's question and answer.

[0097] The data security management module, large language model module, knowledge reasoning module and user interface module of the present invention, and the implementation method of the intelligent question-answering system applied to the field of energy and power data security, such as Figure 1 As shown, the following steps are included:

[0098] Step 1: Receive user questions and perform semantic analysis on the questions through the large language model module;

[0099] Step 2: Based on the semantic analysis results and the knowledge base information stored in the system, the knowledge reasoning module is combined to perform reasoning and generate a preliminary answer, wherein the knowledge base is a corpus knowledge base;

[0100] Step 3: Encrypt and verify the permissions of the generated answer according to the data security management module;

[0101] Step 4: Return the answer to the user interface module for display and viewing by the user;

[0102] Step 5: Adjust and optimize the large language model module and knowledge reasoning module based on user feedback to improve the accuracy and intelligence of question answering.

[0103] Based on the large language model and knowledge reasoning, the implementation method of the intelligent question-answering system applied to the field of energy and power data security of the present invention can also be as follows Figure 2 As shown, the following steps are included:

[0104] Step 1, the user inputs the question;

[0105] Users input questions through the user interface module, which may be about power system safety, equipment status or fault diagnosis.

[0106] Step 2: Large language model module processing problem

[0107] The large language model module segments user questions, removes stop words, tags parts of speech, and performs semantic and syntactic analysis to extract key information and intent from the questions.

[0108] Step 3: In the knowledge reasoning module, according to the semantic analysis results and the knowledge base information stored in the system, analysis and reasoning are performed through rule reasoning, case reasoning and model reasoning to generate a preliminary answer;

[0109] Step 4: The data security management module encrypts the generated answer and verifies the user's authority;

[0110] The encryption and permission verification steps include encrypting the generated answers and verifying the user's permissions through the permission control module to ensure that the user can only access data and information within the scope of his or her permission.

[0111] Step 5, the encrypted and verified answer will be displayed to the user through the user interface module, and the user can view the final answer content;

[0112] Step 6: The user reviews the answers given by the system and asks further questions or provides interactive feedback based on his or her needs.

[0113] Step 7: Analyze user feedback and behavior through the artificial intelligence learning module, and automatically adjust the parameters of the large language model and knowledge reasoning model to continuously improve the system's response accuracy and intelligent reasoning capabilities.

[0114] The intelligent question-and-answer system in the field of power data security based on community detection of the present invention can support multiple rounds of dialogue and maintain the consistency and coherence of questions and answers based on contextual information. The flowchart shows the workflow of the entire intelligent question-and-answer system, from user input of questions to the final generation of answers, and continuously optimizes system performance in combination with data security management and feedback learning mechanisms to ensure that the question-and-answer system can effectively and accurately respond to user needs.

[0115] Based on the community detection method, in the intelligent question-answering system applied to the field of energy and power data security of the present invention, when the user asks a question through the user interface, the intelligent question-answering module receives and preliminarily analyzes the question, and transmits the question related to the community detection requirement to the large language model module for semantic understanding, and inputs the semantics into the knowledge reasoning module. Then the knowledge reasoning module defines the community category under the energy and power data security scenario according to predefined rules, and screens out the possible community scope in combination with the semantics, and comprehensively obtains the community detection result to generate an answer. The intelligent question-answering module integrates the community detection results into a large language form, and then displays it to the user through the user interface. The user can continue to interact, and the system repeats the process to respond to new requirements. The whole process will be optimized and adjusted according to the actual system situation.

[0116] The knowledge reasoning module of the present invention performs reasoning based on the semantic analysis results and knowledge base information to generate a preliminary answer, such as Figure 3 As shown, the following steps are included:

[0117] Step 1: First, establish a corpus knowledge base to store various types of data. This knowledge base can accommodate a large amount of information and provide a data basis for subsequent processing steps;

[0118] Step 2: Use specific technologies and tools (such as natural language processing technology (such as named entity recognition, part-of-speech tagging, dependency syntax analysis), machine learning technology (classification, clustering algorithms), data mining technology (association rules, sequence pattern mining) and knowledge graph construction tools (such as Protégé, Neo4j), etc.) to extract entities and the relationship between entities from the corpus knowledge base. This step is the key link in converting unstructured data into structured information, preparing for the construction of the knowledge graph;

[0119] Step 3: Build a knowledge graph based on the extracted entities and relationships. The knowledge graph graphically displays the connections between different entities, making the information more intuitive and easy to understand;

[0120] Step 4: Perform community detection on the constructed knowledge graph to identify closely connected groups or sub-networks. Community detection helps discover potential structures and patterns in data.

[0121] Step 5: extract nodes and edges from the semantics of the question and compare them with the subnetwork identified in step 4; select the subnetwork closest to the nodes and edges in the question, and extract entities, relations, and sentences in the subnetwork closest to the question;

[0122] Step 6. Finally, the language model is used to process and analyze the extracted entities, relations, and selected sentences to obtain a preliminary answer. The language model can help improve the accuracy and comprehensibility of information and provide support for various applications.

[0123] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0124] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.

Claims

1. An intelligent question-answering system in the field of power data security based on community detection, characterized in that: It includes large language model module, knowledge reasoning module, data security management module and database module; The large language model module is used to analyze the semantics of the question; The knowledge reasoning module is used to perform knowledge reasoning on the semantics of the question and generate an answer; The data security management module includes a data encryption module, an identity authentication module, a permission control module and an audit tracking module; The database module includes an energy and power basic data sub-library, an equipment operation data sub-library, a historical question and answer record sub-library and a user behavior data sub-library.

2. The intelligent question-answering system in the field of power data security based on community detection according to claim 1, characterized in that: The data encryption module is used to encrypt the transmitted and stored data using a symmetric encryption algorithm or an asymmetric encryption algorithm; The identity authentication module is used to authenticate and ensure the legitimacy of the user's identity; The authority control module is used to divide the authority of different data and operations according to user roles; The audit tracking module is used to record the system's operation logs and data access conditions.

3. The intelligent question-answering system in the field of power data security based on community detection as claimed in claim 1, characterized in that: The energy and power basic data sub-library is used to store basic data, equipment information, and network topology of the power system; The equipment operation data sub-library is used to store real-time operation data of various energy and power equipment, including voltage, current, and power; The historical question and answer record sub-library is used to store the records of historical questions asked by users and answers given by the system; The user behavior data sub-library is used to store user behavior logs and preference settings.

4. The intelligent question-answering system in the field of power data security based on community detection as claimed in claim 3, characterized in that: It also includes a user interface module, which includes a question input box, an answer display box, a recommended question module and a historical question review module; The question input box is used to receive questions input by the user and submit the questions to the large language model module through the user interaction interface; The answer display box is used to display the answer output by the knowledge reasoning module; The recommended question module is used to recommend relevant questions based on the user's historical questions and relevant domain knowledge; The historical question review module displays questions previously asked by the user and the corresponding answers.

5. The intelligent question-answering system in the field of power data security based on community detection as claimed in claim 1, characterized in that: The large language model module includes a text preprocessing unit, a semantic analysis unit and a grammatical analysis unit; The text preprocessing unit is used to perform word segmentation, stop word removal, and part-of-speech tagging on the question; The semantic analysis unit is used to identify key entities, relations and intentions in the preprocessed questions; The grammatical analysis unit is used to understand the syntactic structure of the sentence in the question and convert the preprocessed question into a reasonable semantic representation in the grammatical analysis unit; The semantics includes the entities, relations, and actions in the question.

6. The intelligent question-answering system in the field of power data security based on community detection as claimed in claim 1, characterized in that: The knowledge reasoning module is used to compare the semantics extracted by the large language model module with the expert knowledge base in the field of energy and electricity, perform reasoning based on industry experience, and generate answers.

7. The intelligent question-answering system in the field of power data security based on community detection according to claim 1, characterized in that: It also includes an intelligent question-answering module, which includes a question classification unit, an intention recognition unit, and a context understanding unit; The question classification unit is used to classify questions; The intention recognition unit is used to determine the intention of asking the question, and analyze the relationship between the question and the context in conjunction with the context understanding unit, and then pass the relationship information to the knowledge reasoning module, and the knowledge reasoning module adjusts the reasoning strategy according to the context relationship information.

8. The intelligent question-answering system in the field of power data security based on community detection as claimed in claim 5, characterized in that: It also includes an artificial intelligence learning module for continuously optimizing the large language model module and the knowledge reasoning module based on historical data, user feedback and expert input.

9. An intelligent question-answering method in the field of power data security based on community detection, based on the intelligent question-answering system in the field of power data security based on community detection as claimed in claim 8, characterized in that: The following steps are involved: S1, receiving user questions and performing semantic analysis on the questions through the large language model module; S2, the knowledge reasoning module performs reasoning based on the semantics of the question and the knowledge base information to generate a preliminary answer; S3. Encrypt and verify the permissions of the generated answer according to the data security management module; S4, returning the answer to the user interface module for display; S5. The artificial intelligence learning module optimizes the large language model and knowledge reasoning module based on user feedback.

10. The intelligent question-answering method in the field of power data security based on community detection according to claim 9, characterized in that: The knowledge reasoning module in step S2 performs reasoning based on the semantics of the question and the knowledge base information to generate a preliminary answer, including the following steps: S2.

1. Establish a corpus knowledge base; S2.2, extract entities and relationships between entities from the corpus knowledge base; S2.

3. Build a knowledge graph based on the extracted entities and relationships; S2.

4. Perform community detection on the constructed knowledge graph to identify closely connected groups or sub-networks; S2.5, extracting nodes and edges from the semantics of the question, and comparing them with the subnetwork identified in step 2.4; selecting the subnetwork that is closest to the nodes and edges in the semantics of the question, and extracting entities, relations, and sentences in the subnetwork that is closest; S2.

6. Use the language model to process and analyze the extracted entities, relations, and selected sentences to generate preliminary answers.