Semantic understanding driven question answering system of power grid standard
By using a question-and-answer system driven by the semantic understanding of power grid standards, the problem of inaccurate semantic understanding and difficulty in managing multi-turn dialogues in existing technologies for power grid information processing is solved. This enables efficient and accurate information retrieval and diversified question-and-answer services, thereby improving the user experience.
Patent Information
- Application Number
- CN202510658903.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-10-21
AI Technical Summary
Existing intelligent question-answering systems face problems such as inaccurate semantic understanding, low information retrieval efficiency, and difficulty in managing multi-turn dialogues when processing power grid information, especially in open-domain question answering where it is difficult to provide comprehensive answers.
A semantic understanding-driven question-answering system based on power grid standards was designed, including a user question receiving and preprocessing module, a question classification module, a real-time context integration module, a question processing and strategy selection module, and a response generation and user interaction module. The system performs text preprocessing, classification, and context modeling based on power grid industry standards, and adopts various processing strategies such as detailed questioning, conceptual questioning, comparative questioning, and summary questioning. It also utilizes natural language generation technology to provide accurate answers.
It improves the efficiency and accuracy of information retrieval, ensures the comprehensiveness and accuracy of information, provides detailed comparative analysis and summary answers, reduces user learning costs, and enhances user satisfaction.
Smart Images

Figure CN120821795A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of document information extraction, and in particular to a semantic understanding-driven question-answering system for power grid standards. Background Art
[0002] The power grid system is a critical infrastructure in modern society, and its stable operation is crucial to social production and people's livelihoods. With the continuous growth of electricity demand and the increasing complexity of the grid structure, grid operation and maintenance face numerous challenges. To ensure the safe and stable operation of the grid, power grid companies need to monitor and analyze large amounts of grid data in real time, such as grid load, equipment status, fault records, and maintenance history. At the same time, they also need to promptly respond to various user inquiries and needs, such as handling grid faults, predicting power loads, and optimizing power dispatch.
[0003] Traditional power grid information processing systems typically rely on manual methods for data analysis and problem solving, which is inefficient and prone to errors. With the rapid development of artificial intelligence (AI) technology, intelligent question-answering systems based on semantic understanding and natural language processing are becoming an important means of solving power grid information processing problems. Existing task-based dynamic question-answering systems based on state knowledge graphs can handle user questions through a semantic understanding module and a dialogue decision module. The semantic understanding module is responsible for extracting the inquiry intent and relevant state information from the user's input text; the dialogue decision module constructs a state information dataset based on this information and determines the next action by calculating the Gini coefficient of the state information. This system can effectively handle complex task-based question-answering, but may face challenges when handling open-domain question-answering due to the diversity and complexity of state information. Other technologies provide flexible semantic interaction services, allowing developers to define and maintain semantic events through semantic interface configuration tools and automatically generate semantic rules based on the semantic interface. The system performs semantic analysis based on the user's natural language expression and triggers corresponding semantic event response codes, enabling functions such as control, query, and automatic question-answering. This approach addresses complex configuration, inconvenient use, and inaccurate understanding, but may encounter efficiency and accuracy issues when handling multi-turn dialogues and dynamic contextual interactions. Some approaches use intent classification and feature extraction models to analyze the intent and key elements of user questions or answers, and then promote each round of dialogue through multi-turn dialogue management and decision-making mechanisms. This approach can automatically initiate, guide, and limit multi-turn dialogues, increasing the probability of successful human-computer interaction. However, when handling open-domain question answering, this approach may not provide comprehensive answers due to the limited scope of the task. Other approaches utilize large language models and military knowledge graphs to answer military questions through reasoning chain exploration and path evaluation. While this approach performs well in military question answering, its applicability and scalability in other fields may be limited. Existing systems can understand the user's inquiry intent by performing semantic analysis on natural language text input, retrieve relevant information from power grid databases, and generate accurate answers. However, existing intelligent question answering systems still face many challenges when handling complex question answering tasks, such as inaccurate semantic understanding, low information recall efficiency, and difficulty managing multi-turn dialogues.
[0004] In view of this, a grid-standard semantic understanding-driven question-answering system is needed. Summary of the Invention
[0005] To address the difficulty of managing multi-round conversations in existing technologies, this invention provides a grid-standard semantic understanding-driven question-answering system that can accurately understand the user's inquiry intent and provide precise answers based on the actual situation. The specific technical solution is as follows:
[0006] A semantic understanding-driven question-answering system for power grid standards, including:
[0007] The user question receiving and preprocessing module receives questions submitted by users through the front-end interface and performs text preprocessing in accordance with the national standards of the power grid industry. The preprocessing includes cleaning and standardizing the input text to meet the standards.
[0008] The question classification module classifies questions based on user input and determines the question type;
[0009] Real-time context integration module, which monitors and analyzes relevant data in real time and builds the current context model in accordance with national grid standards and industry standards;
[0010] The problem handling and strategy selection module selects appropriate strategies to handle problems based on the problem type and real-time context. All strategies and solutions comply with national and industry standards for power grids. Strategies include accessing standard-verified maintenance data or fault records, or extracting explanations of relevant concepts from standard-compliant document libraries.
[0011] The answer generation and user interaction module uses natural language generation technology to construct answers based on the processing results and presents them to users through the user interface.
[0012] Preferably, the text cleaning in the user question receiving and pre-processing module includes the following processing steps:
[0013] Special Character Removal: Remove special characters from text. The formula is:
[0014]
[0015] Among them, Text1 is the text after removing special characters; Text is the original text; Char i Represents the i-th character in the text; Indicates that the character Char i It takes 1 if it belongs to the special character set, otherwise it takes 0;
[0016] Case normalization: Convert all characters in the text to lowercase. The formula is:
[0017]
[0018] Among them, Text2 is the standardized text, Char i ' represents the character after converting the i-th character in the text to lowercase, and n is the total number of characters;
[0019] Stop word removal: Use the stop word list to remove stop words in the text. The formula is:
[0020]
[0021] Among them, Text3 is the text after removing stop words; Word i Represents the i-th word in the text, and m is the total number of words; Indicates when the word Word i It takes 1 if it does not belong to the stop word set, otherwise it takes 0.
[0022] Preferably, the pre-processing module in the user question receiving and pre-processing module includes the following processing steps:
[0023] S1: Feature function definition: define a feature function for each word to represent the context information of the word. The calculation formula is:
[0024] f k (w i ,t i ,context)=δ(t i =k)
[0025] Among them, f k represents the characteristic function; w i represents the i-th word; t i represents the part-of-speech tag of the i-th word, context represents context information; k represents the possible part-of-speech tags; δ is the indicator function, when t i =k takes 1, otherwise takes 0;
[0026] S2: Train the CRF model. Use the training data set to train the CRF model and obtain the parameter weight θ. The calculation formula is:
[0027]
[0028] Among them, N represents the number of samples in the training data set, context i Represents the context information of the i-th word, θ k is the weight of the feature function;
[0029] S3: Conditional probability calculation. For a given word sequence, calculate the conditional probability of the part-of-speech tag of each word. The calculation formula is:
[0030]
[0031] Among them, w represents the word sequence, represents the set of all possible part-of-speech tags, and exp represents the exponential function;
[0032] S4: Viterbi algorithm decoding: Use the Viterbi algorithm to find the part-of-speech tag sequence that maximizes the conditional probability. The calculation formula is:
[0033]
[0034] Among them, t * represents the optimal part-of-speech tag sequence, and n represents the length of the word sequence.
[0035] Preferably, the user question classification module is used to classify user questions, and the classification includes four preset types: detail questions, concept questions, comparison questions, and summary questions. The user question classification module includes:
[0036] Detailed question classification unit, used to identify and classify user questions that require specific detailed information;
[0037] Concept Question Classification Unit, used to identify and classify user questions that require explanation of concepts or definitions;
[0038] Comparative Question Classification Unit, used to identify and classify user questions involving comparison of two or more objects;
[0039] The summary question classification unit is used to identify and classify user questions that require summarizing or generalizing information.
[0040] Preferably, the real-time context integration module is used to monitor and analyze relevant data in real time and build a current context model. The relevant data includes power grid data, weather conditions, and maintenance records. Building the context model specifically includes the following steps:
[0041] S01: Data collection: In accordance with national and industry standards for power grids, relevant data is collected in real time from the power grid monitoring system, meteorological monitoring system, and maintenance management system to ensure that the collected power grid load, weather conditions, and maintenance record data meet standard requirements, thereby improving data reliability and the accuracy of system responses. The specific calculation formula is:
[0042]
[0043] Among them, D t represents all data collected at time point t, Represents the data of the i-th data source. The collected data is input into the data preprocessing through the data interface;
[0044] S02: Data preprocessing, preprocessing the collected data, including data cleaning, data format conversion and missing data filling. The specific calculation formula is:
[0045]
[0046] Among them, D t' represents the preprocessed data, RemoveNoise represents the data noise removal function, ConvertFormat represents the data format conversion function, and FillMissing represents the missing data filling function. The preprocessed data will be input into the feature extraction;
[0047] S03: Feature extraction: extract features from the preprocessed data. The features include grid load, temperature, humidity, wind speed, and maintenance records. The specific calculation formula is:
[0048] F t ={L t ,T t ,H t ,W t ,M t}
[0049] Among them, L t It represents the grid load at time point t, and the calculation formula is:
[0050]
[0051] Among them, P j,t represents the load of the jth load point at time t, and m is the number of load points;
[0052] T t represents the temperature at time point t, and the calculation formula is:
[0053]
[0054] Among them, T i,t represents the temperature value of the i-th temperature sensor at time point t, and n is the number of temperature sensors;
[0055] H t Represents the humidity at time point t, and the calculation formula is:
[0056]
[0057] Among them, H i,t represents the humidity value of the i-th humidity sensor at time point t, and n is the number of humidity sensors;
[0058] W t It represents the wind speed at time point t, and the calculation formula is:
[0059]
[0060] Among them, W i,t represents the wind speed value of the i-th wind speed sensor at time point t, and n is the number of wind speed sensors;
[0061] Mt It represents the wind speed at time point t, and the calculation formula is:
[0062]
[0063] Among them, M t represents the record of the kth maintenance event at time point t, and p is the number of maintenance events;
[0064] S04: Context modeling: Based on the extracted features, the current context model is constructed. The specific formula is:
[0065] C t =context_model(F t )
[0066] Among them, C t represents the context model constructed at time point t, F t Represents input data, context_model represents the context modeling function, and the detailed calculation is:
[0067] C t =αL t +βT t +γH t +δW t +òM t
[0068] Among them, α, β, γ, δ, ∈ are feature weight parameters.
[0069] Preferably, the problem handling and strategy selection module specifically includes the following steps:
[0070] S10: Semantic understanding based on the ChatGLM model. This model uses a ChatGLM-based model and fine-tunes the model to achieve semantic understanding of the question. All semantic parsing operations comply with national standards for the power grid industry. The specific steps include the following:
[0071] For a given input text input={input1,...,input n}, sampling multiple text fragments {piece1,...,piece n}, each segment is replaced with a single [Mask] to form a "damaged" text, and the model predicts the missing content in the segment in an autoregressive manner based on the damaged text;
[0072] S20: Corpus preparation: prepare corpus for model fine-tuning to train the model to classify different types of questions;
[0073] S30: Maximum likelihood function optimization. The goal of this task is to maximize the likelihood function under the model parameters θ. The specific formula is:
[0074]
[0075] Among them, z represents the randomly sampled fragment, Z m Represents a collection of fragments, represents the label of the i-th segment, x corrupt Indicates damaged text, S z<i Represents all labels before the i-th segment, conditional probability P θ It represents the probability of predicting the current segment label given the damaged text and the previous segment label. The specific formula is:
[0076]
[0077] Among them, l i Representation fragment Length, S i,j Representation fragment The label of the jth word in ;
[0078] S40: nonlinear activation function, which is used in the model to gate linear units. The specific formula is:
[0079]
[0080] Among them, x is the input, W and V are weight matrices, b and c are bias terms, σ is the Sigmoid function, Represents element-wise multiplication;
[0081] S5: Model fine-tuning: freeze the baseline model parameters, introduce the LoRA method to fine-tune the model, and update the parameters until the loss function continues to decrease to a basically stable level. The loss function is designed as follows:
[0082]
[0083] Among them, p represents the probability predicted by the model, y is the actual label, α and γ are adjustment parameters. This loss function improves the robustness and performance of the model by increasing the penalty for misclassification.
[0084] Preferably, the user question receiving and pre-processing module adopts different processing strategies for different types of questions, specifically including the following strategies:
[0085] Detailed question processing strategy: For detailed questions, the system uses small document slices for information recall. This strategy reduces redundant text information.
[0086] Concept question processing strategy: For concept questions, the system uses both large and small category slices for information recall;
[0087] Comparative question processing strategy: For comparative questions, the system first extracts information from the user's question, extracts different comparison objects, and then recalls information separately. The obtained information is sent to the question processing and strategy selection module for summary and comparative analysis, providing the comparative information required by the user;
[0088] Summary question processing strategy: For summary questions, the system adds guidance when designing the prompt of the question processing and strategy selection module, so as to obtain summary answers.
[0089] A computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the semantic understanding driven question-answering system of the power grid standard as described above.
[0090] A processor is used to run a program, wherein the program, when running, executes the semantic understanding driven question-answering system of the power grid standard as described above.
[0091] Compared with the prior art, the present invention has the following beneficial effects:
[0092] According to the different types of user questions, the present invention adopts a variety of processing strategies such as detailed questions, conceptual questions, comparative questions and summary questions. For detailed questions, small document slices are used to recall information, reduce redundant text information, and improve the efficiency and accuracy of information retrieval. For conceptual questions, a combination of large and small slices is used to ensure the comprehensiveness and accuracy of information. For comparative questions, the system can extract and compare information of different objects and provide detailed comparative analysis. For summary questions, through the design of reasonable prompts, the system is guided to generate summary answers, which improves the generality of the answers and the user's understanding effect. In addition, the present invention also provides high-quality question-and-answer services through precise semantic understanding, diversified processing strategies and fast response speed. Users can interact with the system directly through natural language, and the system can accurately understand the user's needs and provide corresponding answers, reducing the user's learning cost and difficulty of use, and enhancing user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly describes the drawings required for the specific embodiments or the description of the prior art. Similar elements or parts are generally identified by similar reference numerals throughout the drawings. Elements or parts in the drawings are not necessarily drawn to scale.
[0094] Figure 1 A system architecture diagram of the semantic understanding-driven question-answering system for power grid standards provided by the present invention;
[0095] Figure 2 This is a flowchart of the problem handling and strategy selection module operation of the embodiment provided by the present invention. DETAILED DESCRIPTION
[0096] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0097] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0098] It should also be understood that the terms used in the present specification are only for the purpose of describing particular embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0099] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0100] Example 1:
[0101] In one embodiment of the present invention, a semantic understanding-driven question-answering system for power grid standards is provided, comprising:
[0102] The user question receiving and preprocessing module receives questions submitted by users through the front-end interface and performs text preprocessing in accordance with the national standards of the power grid industry. The preprocessing includes cleaning and standardizing the input text to meet the standards.
[0103] The question classification module classifies questions based on user input and determines the question type;
[0104] Real-time context integration module, which monitors and analyzes relevant data in real time and builds the current context model in accordance with national grid standards and industry standards;
[0105] The problem handling and strategy selection module selects appropriate strategies to handle problems based on the problem type and real-time context. All strategies and solutions comply with national and industry standards for power grids. Strategies include accessing standard-verified maintenance data or fault records, or extracting explanations of relevant concepts from standard-compliant document libraries.
[0106] The answer generation and user interaction module uses natural language generation technology to construct answers based on the processing results and presents them to users through the user interface.
[0107] Preferably, the text cleaning in the user question receiving and pre-processing module includes the following processing steps:
[0108] Special Character Removal: Remove special characters from text. The formula is:
[0109]
[0110] Among them, Text1 is the text after removing special characters; Text is the original text; Char i Represents the i-th character in the text; Indicates that the character Char i It takes 1 if it belongs to the special character set, otherwise it takes 0;
[0111] Case normalization: Convert all characters in the text to lowercase. The formula is:
[0112]
[0113] Among them, Text2 is the standardized text, Char i ' represents the character after converting the i-th character in the text to lowercase, and n is the total number of characters;
[0114] Stop word removal: Use the stop word list to remove stop words in the text. The formula is:
[0115]
[0116] Among them, Text3 is the text after removing stop words; Word i Represents the i-th word in the text, and m is the total number of words; Indicates when the word Word i It takes 1 if it does not belong to the stop word set, otherwise it takes 0.
[0117] Preferably, the pre-processing module in the user question receiving and pre-processing module includes the following processing steps:
[0118] S1: Feature function definition: define a feature function for each word to represent the context information of the word. The calculation formula is:
[0119] f k (w i ,t i ,context)=δ(t i =k)
[0120] Among them, f k represents the characteristic function; w i represents the i-th word; t i represents the part-of-speech tag of the i-th word, context represents context information; k represents the possible part-of-speech tags; δ is the indicator function, when t i =k takes 1, otherwise takes 0;
[0121] S2: Train the CRF model. Use the training data set to train the CRF model and obtain the parameter weight θ. The calculation formula is:
[0122]
[0123] Among them, N represents the number of samples in the training data set, context i Represents the context information of the i-th word, θ k is the weight of the feature function;
[0124] S3: Conditional probability calculation. For a given word sequence, calculate the conditional probability of the part-of-speech tag of each word. The calculation formula is:
[0125]
[0126] Among them, w represents the word sequence, represents the set of all possible part-of-speech tags, and exp represents the exponential function;
[0127] S4: Viterbi algorithm decoding: Use the Viterbi algorithm to find the part-of-speech tag sequence that maximizes the conditional probability. The calculation formula is:
[0128]
[0129] Among them, t * represents the optimal part-of-speech tag sequence, and n represents the length of the word sequence.
[0130] Preferably, the user question classification module is used to classify user questions, and the classification includes four preset types: detail questions, concept questions, comparison questions, and summary questions. The user question classification module includes:
[0131] Detailed question classification unit, used to identify and classify user questions that require specific detailed information;
[0132] Concept Question Classification Unit, used to identify and classify user questions that require explanation of concepts or definitions;
[0133] Comparative Question Classification Unit, used to identify and classify user questions involving comparison of two or more objects;
[0134] The summary question classification unit is used to identify and classify user questions that require summarizing or generalizing information.
[0135] Preferably, the real-time context integration module is used to monitor and analyze relevant data in real time and build a current context model. The relevant data includes power grid data, weather conditions, and maintenance records. Building the context model specifically includes the following steps:
[0136] S01: Data collection: In accordance with national and industry standards for power grids, relevant data is collected in real time from the power grid monitoring system, meteorological monitoring system, and maintenance management system to ensure that the collected power grid load, weather conditions, and maintenance record data meet standard requirements, thereby improving data reliability and the accuracy of system responses. The specific calculation formula is:
[0137]
[0138] Among them, D t represents all data collected at time point t, Represents the data of the i-th data source. The collected data is input into the data preprocessing through the data interface;
[0139] S02: Data preprocessing, preprocessing the collected data, including data cleaning, data format conversion and missing data filling. The specific calculation formula is:
[0140]
[0141] Among them, D t ' represents the preprocessed data, RemoveNoise represents the data noise removal function, ConvertFormat represents the data format conversion function, and FillMissing represents the missing data filling function. The preprocessed data will be input into the feature extraction;
[0142] S03: Feature extraction: extract features from the preprocessed data. The features include grid load, temperature, humidity, wind speed, and maintenance records. The specific calculation formula is:
[0143] F t ={L t ,T t ,H t ,W t ,M t}
[0144] Among them, L t It represents the grid load at time point t, and the calculation formula is:
[0145]
[0146] Among them, P j,t represents the load of the jth load point at time t, and m is the number of load points;
[0147] T t represents the temperature at time point t, and the calculation formula is:
[0148]
[0149] Among them, T i,t represents the temperature value of the i-th temperature sensor at time point t, and n is the number of temperature sensors;
[0150] H t Represents the humidity at time point t, and the calculation formula is:
[0151]
[0152] Among them, H i,t represents the humidity value of the i-th humidity sensor at time point t, and n is the number of humidity sensors;
[0153] W t It represents the wind speed at time point t, and the calculation formula is:
[0154]
[0155] Among them, W i,t represents the wind speed value of the i-th wind speed sensor at time point t, and n is the number of wind speed sensors;
[0156] M t It represents the wind speed at time point t, and the calculation formula is:
[0157]
[0158] Among them, M t represents the record of the kth maintenance event at time point t, and p is the number of maintenance events;
[0159] S04: Context modeling: Based on the extracted features, the current context model is constructed. The specific formula is:
[0160] C t =context_model(F t )
[0161] Among them, C trepresents the context model constructed at time point t, F t Represents input data, context_model represents the context modeling function, and the detailed calculation is:
[0162] C t =αL t +βT t +γH t +δW t +òM t
[0163] Among them, α, β, γ, δ, ∈ are feature weight parameters.
[0164] Preferably, the problem handling and strategy selection module specifically includes the following steps:
[0165] S10: Semantic understanding based on the ChatGLM model. This model uses a ChatGLM-based model and fine-tunes the model to achieve semantic understanding of the question. All semantic parsing operations comply with national standards for the power grid industry. The specific steps include the following:
[0166] For a given input text input={input1,...,input n}, sampling multiple text fragments {piece1,...,piece n}, each segment is replaced with a single [Mask] to form a "damaged" text, and the model predicts the missing content in the segment in an autoregressive manner based on the damaged text;
[0167] S20: Corpus preparation: prepare corpus for model fine-tuning to train the model to classify different types of questions;
[0168] S30: Maximum likelihood function optimization. The goal of this task is to maximize the likelihood function under the model parameters θ. The specific formula is:
[0169]
[0170] Among them, z represents the randomly sampled fragment, Z m Represents a collection of fragments, represents the label of the i-th segment, x corrupt Indicates damaged text, S z<i Represents all labels before the i-th segment, conditional probability P θ It represents the probability of predicting the current segment label given the damaged text and the previous segment label. The specific formula is:
[0171]
[0172] Among them, li Representation fragment Length, S i,j Representation fragment The label of the jth word in ;
[0173] S40: nonlinear activation function, which is used in the model to gate linear units. The specific formula is:
[0174]
[0175] Among them, x is the input, W and V are weight matrices, b and c are bias terms, σ is the Sigmoid function, Represents element-wise multiplication;
[0176] S5: Model fine-tuning: freeze the baseline model parameters, introduce the LoRA method to fine-tune the model, and update the parameters until the loss function continues to decrease to a basically stable level. The loss function is designed as follows:
[0177]
[0178] Among them, p represents the probability predicted by the model, y is the actual label, α and γ are adjustment parameters. This loss function improves the robustness and performance of the model by increasing the penalty for misclassification.
[0179] Preferably, the user question receiving and pre-processing module adopts different processing strategies for different types of questions, specifically including the following strategies:
[0180] Detailed question processing strategy: For detailed questions, the system uses small document slices for information recall. This strategy reduces redundant text information.
[0181] Concept question processing strategy: For concept questions, the system uses both large and small category slices for information recall;
[0182] Comparative question processing strategy: For comparative questions, the system first extracts information from the user's question, extracts different comparison objects, and then recalls information separately. The obtained information is sent to the question processing and strategy selection module for summary and comparative analysis, providing the comparative information required by the user;
[0183] Summary question processing strategy: For summary questions, the system adds guidance when designing the prompt of the question processing and strategy selection module, so as to obtain summary answers.
[0184] The implementation steps of the present invention are further described below through specific data examples:
[0185] like Figure 1As shown in Figure 1, this embodiment demonstrates the application of a semantic understanding-driven question-answering system based on power grid standards in solving power grid load forecasting problems. By simulating power grid data, weather conditions, and maintenance records, it demonstrates how the system monitors and analyzes data in real time, builds a context model, and generates accurate answers. Figure 2 As shown in Figure 2, the question processing and strategy selection module specifically includes the following processes for power grid semantic question answering:
[0186] Data is collected in real time from the power grid monitoring system, meteorological monitoring system, and maintenance management system. The simulated data is as follows:
[0187] Grid load data (unit: MW): P 1,t =150,P 2,t =200,P 3,t =180,P 4,t =210,P 5,t =190.
[0188] Wherein, t represents the current time point, and the number of load points m=5.
[0189] Temperature data (unit: °C): T1, t = 25, T2, t = 26, T3, t = 24, T4, t = 27, T5, t = 25
[0190] The number of temperature sensors n=5.
[0191] Humidity data (unit: %): H 1,t =60,H 2,t =65,H 3,t =62,H 4,t =63,H 5,t =61.
[0192] Wind speed data (unit: m / s): W 1,t =3,W 2,t =3.5,W 3,t =3.2,W 4,t =3.1,W 5,t =3.3.
[0193] Maintenance record: M 1,t =1,M 2,t =0,M 3,t =1,M 4,t =0,M 5,t =0.
[0194] 1 indicates that a maintenance event has occurred, and 0 indicates that no maintenance event has occurred.
[0195] Preprocess the collected data, including data cleaning, data format conversion and missing data filling.
[0196] Data cleaning: remove noise and erroneous data from the data.
[0197] Data format conversion: Convert data into a unified format to ensure data consistency.
[0198] Missing data filling: fill in the missing data, assuming that there is no missing data this time.
[0199] Extract features from preprocessed data. The specific calculation process is as follows:
[0200]
[0201] F t ={L t ,T t ,H t ,W t ,M t}={930MW,25.4℃,62.2%,3.22m / s,2}
[0202] Based on the extracted features, the current context model is constructed. The calculation formula is as follows:
[0203] C t =αL t +βT t +γH t +δW t +òM t
[0204] Assume that the feature weight parameters are:
[0205] α=0.5
[0206] β=0.2
[0207] γ=0.1
[0208] δ=0.15
[0209] ò=0.05
[0210] The calculation results are as follows:
[0211] Ct
[0212] =0.5×930+0.2×25.4+0.1×62.2+0.15×3.22+0.05×2
[0213] =465+5.08+6.22+0.483++0.1
[0214] =476.883
[0215] In the question handling and strategy selection module, the system selects the most appropriate strategy to handle the question based on the context model Ct and the question type. For example, if a user asks, "What is the current grid load?" the system identifies this as a detailed question, uses small document slices to retrieve information, and generates an answer. Using natural language generation technology, the system generates an answer based on the processing results: "The current grid load is 930MW, the temperature is 25.4°C, the humidity is 62.2%, the wind speed is 3.22m / s, and there are two maintenance events." The user views the system-generated answer through the front-end interface, and the system can further interact with the user based on additional questions, such as "What is the grid load forecast for the next two hours?"
[0216] In summary, this embodiment demonstrates the application of a semantic understanding-driven question-answering system based on power grid standards in processing power grid load forecasting problems. By real-time monitoring and analysis of power grid data, the system can generate accurate answers to meet user needs.
[0217] Example 2: When developing an embodiment of a power grid semantic understanding-driven question-answering system, the key is to ensure the reliability and accuracy of the system in accordance with the specific standards of the power grid industry. These standards are usually issued by power grid companies or relevant power industry regulatory agencies and cover many aspects such as power grid data management, equipment operation and maintenance, and safety regulations. Here, we will cite two important standards of the Chinese power industry: the "Power Grid Technical Operation Regulations" and the "Power System Data Exchange Standard", and combine these standards to describe in detail an embodiment of a question-answering system designed based on these specifications.
[0218] "Technical Operational Procedures for Power Grids" (GB / T 15622-2008): This standard describes the operational safety procedures for power grids, including regulations for grid monitoring, fault handling, and equipment maintenance. This standard ensures safe and stable grid operation and provides a framework for the Q&A system to address technical issues such as fault analysis and predictive maintenance.
[0219] The Power System Data Exchange Standard (DL / T 634.5101-2002) specifies data formats and exchange protocols within power systems, ensuring compatibility and data consistency across different systems and devices. These specifications are crucial for the data collection and preprocessing modules of the question-answering system, particularly for processing and analyzing grid data from diverse sources in the real-time context integration module.
[0220] This question-answering system is designed to be highly modular, and each module operates strictly in accordance with the above standards to ensure the integrity and effectiveness of the system. Specifically, the following modules are used:
[0221] User Question Reception and Preprocessing Module: This module first receives user input through the front-end interface. It then standardizes the input data, including removing special characters, unifying uppercase and lowercase letters, and filtering out non-informative words, to ensure that all text input complies with the Power System Data Exchange Standard.
[0222] Problem Classification Module: This module uses deep neural networks combined with machine learning technology to classify problems, ensuring that each problem is accurately categorized as a technical issue, customer service request, or emergency response. The classification process adheres to the guidelines for problem response in the Power Grid Technical Operation Procedures.
[0223] Real-time Context Integration Module: This module collects grid operation data, meteorological information, and equipment maintenance records in real time. Based on the Power System Data Exchange Standard, this module formats and analyzes the collected data in real time, building an accurate context model to support subsequent problem resolution.
[0224] Problem Handling and Strategy Selection Module: This module selects the most appropriate handling strategy based on the problem type and real-time context. This strategy includes retrieving information from a database, applying predictive models to forecast grid load changes, and invoking fault diagnosis tools. All strategies comply with the "Power Grid Technical Operation Regulations."
[0225] Answer generation and user interaction module: This module uses natural language generation technology to convert processing results into clear and accurate answers. Answers should not only accurately reflect the solution to the problem but also be presented in a way that is easy for users to understand, enhancing the user experience.
[0226] Assume a typical application scenario: during peak hours, the user inquires about the current grid load status through the system interface and requests a load forecast report.
[0227] Question reception: Users submit questions through the system interface: "What is the current grid load? What changes are expected during the evening peak period?"
[0228] The system immediately pre-processes the question, cleaning and formatting the text data.
[0229] Data classification and processing: The system automatically classifies the issue as a "technical issue," which involves grid load analysis. Simultaneously, it invokes the real-time context integration module to obtain the latest load data from the grid monitoring system.
[0230] Strategy Selection and Analysis: Based on real-time data and historical trends, the system uses machine learning models to predict load changes during the evening peak period. All calculations and predictions are performed in accordance with the "Power Grid Technical Operation Regulations" to ensure the accuracy and reliability of the prediction results.
[0231] Generate answers and interact with users: The generated answer is: "The current overall load of the power grid is 4500MW. According to our model prediction, the load during the evening peak period is expected to increase to 5000MW. Please make corresponding preparations." Users can further inquire about specific scheduling suggestions or take preventive measures.
[0232] In summary, according to the different types of user questions, the present invention adopts a variety of processing strategies such as detailed questions, conceptual questions, comparative questions and summary questions. For detailed questions, small document slices are used to recall information, reduce redundant text information, and improve the efficiency and accuracy of information retrieval. For conceptual questions, a combination of large and small slices is used to ensure the comprehensiveness and accuracy of information. For comparative questions, the system can extract and compare information of different objects and provide detailed comparative analysis. For summary questions, through the design of reasonable prompts, the system is guided to generate summary answers, which improves the generality of the answers and the user's understanding effect. In addition, the present invention also provides high-quality question-and-answer services through precise semantic understanding, diversified processing strategies and fast response speed. Users can interact with the system directly through natural language, and the system can accurately understand the user's needs and provide corresponding answers, reducing the user's learning cost and difficulty of use, and enhancing user satisfaction.
[0233] Those skilled in the art will appreciate that the units of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition of each example has been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0234] In the embodiments provided by the present invention, it should be understood that the division of units is merely a logical function division, and there may be other division methods in actual implementation, for example, multiple units can be combined into one unit, one unit can be split into multiple units, or some features can be ignored, etc.
[0235] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0236] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-0nly Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc., various media that can store program code.
[0237] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and description of the present invention.
Claims
1. A semantic understanding driven question answering system for power grid standards, characterized by: include: The user question receiving and preprocessing module receives questions submitted by users through the front-end interface and performs text preprocessing in accordance with the national standards of the power grid industry. The preprocessing includes cleaning and standardizing the input text to meet the standards. The question classification module classifies questions based on user input and determines the question type; Real-time context integration module, which monitors and analyzes relevant data in real time and builds the current context model in accordance with national grid standards and industry standards; The problem handling and strategy selection module selects appropriate strategies to handle problems based on the problem type and real-time context. All strategies and solutions comply with national and industry standards for power grids. Strategies include accessing standard-verified maintenance data or fault records, or extracting explanations of relevant concepts from standard-compliant document libraries. The answer generation and user interaction module uses natural language generation technology to construct answers based on the processing results and presents them to users through the user interface.
2. A semantic understanding driven question-answering system for power grid standards according to claim 1, characterized in that: The text cleaning in the user question reception and preprocessing module includes the following processing steps: Special Character Removal: Remove special characters from text. The formula is: Among them, Text1 is the text after removing special characters; Char i Represents the i-th character in the text, and n is the total number of characters; Indicates that the character Char i It takes 1 if it belongs to the special character set, otherwise it takes 0; Case normalization: Convert all characters in the text to lowercase. The formula is: Among them, Text2 is the standardized text, Char′ i Indicates converting the i-th character in the text to lowercase characters; Stop word removal: Use the stop word list to remove stop words in the text. The formula is: Among them, Text3 is the text after removing stop words; Word i Represents the i-th word in the text, and m is the total number of words; Indicates when the word Word i It takes 1 if it does not belong to the stop word set, otherwise it takes 0.
3. The semantic understanding driven question-answering system for power grid standards according to claim 1, characterized in that: The preprocessing module in the user question receiving and preprocessing module includes the following processing steps: S1: Feature function definition: define a feature function for each word to represent the context information of the word. The calculation formula is: f k (w i ,t i ,context)=δ(t i =k) Among them, f k represents the characteristic function; w i represents the i-th word; t i represents the part-of-speech tag of the i-th word, context represents context information; k represents the possible part-of-speech tags; δ is the indicator function, when t i =k takes 1, otherwise takes 0; S2: Train the CRF model. Use the training data set to train the CRF model and obtain the parameter weight θ. The calculation formula is: Among them, N represents the number of samples in the training data set, context i Represents the context information of the i-th word, θ k is the weight of the feature function; S3: Conditional probability calculation. For a given word sequence, calculate the conditional probability of the part-of-speech tag of each word. The calculation formula is: Where w represents a word sequence, T represents the set of all possible part-of-speech tags, t' represents a part-of-speech tag, and exp represents an exponential function; S4: Viterbi algorithm decoding: Use the Viterbi algorithm to find the part-of-speech tag sequence that maximizes the conditional probability. The calculation formula is: Among them, t * represents the optimal part-of-speech tag sequence, and n represents the length of the word sequence.
4. The semantic understanding driven question-answering system for power grid standards according to claim 1, characterized in that: The user question classification module is used to classify user questions into four preset types: detail questions, concept questions, comparison questions, and summary questions. The user question classification module includes: Detailed question classification unit, used to identify and classify user questions that require specific detailed information; Concept Question Classification Unit, used to identify and classify user questions that require explanation of concepts or definitions; Comparative Question Classification Unit, used to identify and classify user questions involving comparison of two or more objects; The summary question classification unit is used to identify and classify user questions that require summarizing or generalizing information.
5. The semantic understanding driven question-answering system for power grid standards according to claim 1, characterized in that: The real-time context integration module is used to monitor and analyze relevant data in real time and build a current context model. The relevant data includes power grid data, weather conditions, and maintenance records. Building the context model specifically includes the following steps: S01: Data collection: In accordance with national and industry standards for power grids, relevant data is collected in real time from the power grid monitoring system, meteorological monitoring system, and maintenance management system to ensure that the collected power grid load, weather conditions, and maintenance record data meet standard requirements, thereby improving data reliability and the accuracy of system responses. The specific calculation formula is: Among them, D t represents all data collected at time point t, Represents the data of the i-th data source. The collected data is input into the data preprocessing through the data interface; S02: Data preprocessing, preprocessing the collected data, including data cleaning, data format conversion and missing data filling. The specific calculation formula is: Among them, D t ' represents the preprocessed data, RemoveNoise represents the data noise removal function, ConvertFormat represents the data format conversion function, and FillMissing represents the missing data filling function. The preprocessed data will be input into the feature extraction; S03: Feature extraction: extract features from the preprocessed data. The features include grid load, temperature, humidity, wind speed, and maintenance records. The specific calculation formula is: F t ={L t ,T t ,H t ,W t ,M t } Among them, L t It represents the grid load at time point t, and the calculation formula is: Among them, P j,t represents the load of the jth load point at time t, and m is the number of load points; T t represents the temperature at time point t, and the calculation formula is: Among them, T i,t represents the temperature value of the i-th temperature sensor at time point t, and n is the number of temperature sensors; H t Represents the humidity at time point t, and the calculation formula is: Among them, H i,t represents the humidity value of the i-th humidity sensor at time point t, and n is the number of humidity sensors; W t It represents the wind speed at time point t, and the calculation formula is: Among them, W i,t represents the wind speed value of the i-th wind speed sensor at time point t, and n is the number of wind speed sensors; M t It represents the wind speed at time point t, and the calculation formula is: Among them, M t represents the record of the kth maintenance event at time point t, and p is the number of maintenance events; S04: Context modeling: Based on the extracted features, the current context model is constructed. The specific formula is: C t =context_model(F t ) Among them, C t represents the context model constructed at time point t, F t Represents input data, context_model represents the context modeling function, and the detailed calculation is: C t =αL t +βT t +γH t +δW t +òM t Among them, α, β, γ, δ, ∈ are feature weight parameters.
6. The semantic understanding driven question-answering system for power grid standards according to claim 1, characterized in that: The problem handling and strategy selection module specifically includes the following steps: S10: Semantic understanding based on the ChatGLM model. This model uses a ChatGLM-based model and fine-tunes the model to achieve semantic understanding of the question. All semantic parsing operations comply with national standards for the power grid industry. The specific steps include the following: For a given input text input={input1,...,input n }, sampling multiple text fragments {piece1,...,piece n }, each segment is replaced with a single [Mask] to form a "damaged" text, and the model predicts the missing content in the segment in an autoregressive manner based on the damaged text; S20: Corpus preparation: prepare corpus for model fine-tuning to train the model to classify different types of questions; S30: Maximum likelihood function optimization. The goal of the task is to maximize the likelihood function under the model parameters θ. The specific formula is: Among them, z represents the randomly sampled fragment, Z m Represents a collection of fragments, represents the label of the i-th segment, x corrupt Indicates damaged text, S z<i Represents all labels before the i-th segment, conditional probability P θ It represents the probability of predicting the current segment label given the damaged text and the previous segment label. The specific formula is: Among them, l i Representation fragment Length, S i,j Representation fragment The label of the jth word in ; S40: nonlinear activation function, which is used in the model to gate linear units. The specific formula is: Among them, x is the input, W and V are weight matrices, b and c are bias terms, σ is the Sigmoid function, Represents element-wise multiplication; S5: Model fine-tuning: freeze the baseline model parameters, introduce the LoRA method to fine-tune the model, and update the parameters until the loss function continues to decrease to a basically stable level. The loss function is designed as follows: Among them, p represents the probability predicted by the model, y is the actual label, α and γ are adjustment parameters. This loss function improves the robustness and performance of the model by increasing the penalty for misclassification.
7. The semantic understanding driven question-answering system for power grid standards according to claim 1, characterized in that: The user question receiving and pre-processing module adopts different processing strategies for different types of questions, including the following strategies: Detailed question processing strategy: For detailed questions, the system uses small document slices for information recall. This strategy reduces redundant text information. Concept question processing strategy: For concept questions, the system uses both large and small category slices for information recall; Comparative question processing strategy: For comparative questions, the system first extracts information from the user's question, extracts different comparison objects, and then recalls information separately. The obtained information is sent to the question processing and strategy selection module for summary and comparative analysis, providing the comparative information required by the user; Summary question processing strategy: For summary questions, the system adds guidance when designing the prompt of the question processing and strategy selection module, so as to obtain summary answers.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein when the program is run, the device where the computer-readable storage medium is located is controlled to execute the semantic understanding driven question-answering system for power grid standards according to any one of claims 1 to 7.
9. A processor, characterized in that: The processor is configured to run a program, wherein the program, when running, executes the semantic understanding driven question-answering system for power grid standards according to any one of claims 1 to 7.
Citation Information
Cited By
Intelligent interaction method and system based on end-to-end multi-mode instruction understanding
CN121260158A