Enhanced retrieval method and system for power vector knowledge base based on artificial intelligence

Through the enhanced search method of power vector knowledge base based on artificial intelligence, the problem of low text data management and retrieval efficiency in the power system is solved, efficient and accurate retrieval and analysis of information is achieved, intelligent question-and-answer system is built, and data in the power field is improved. Utilization efficiency.

CN118964648BActive Publication Date: 2025-01-17STATE GRID INFO TELECOM GREAT POWER SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411453052.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-01-17
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

The management and retrieval of large amounts of text data in the power system is inefficient, and it is difficult to extract and utilize key information quickly and accurately, which has become an important challenge in intelligent management.

Method used

Adopt the power vector knowledge base enhanced retrieval method based on artificial intelligence, including text data preprocessing, classification, named entity recognition, knowledge graph construction, self-supervised and supervised learning NLU model optimization, combined with domain knowledge and rules to sort, and build intelligence Q&A system.

Benefits of technology

It improves the efficiency and accuracy of information retrieval in the power field, automatically recognizes and extracts entities and relationships, builds a knowledge graph, and can quickly and accurately analyze user questions and generate answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964648B_ABST
    Figure CN118964648B_ABST
Patent Text Reader

Abstract

The present invention relates to an artificial intelligence-based electric power vector knowledge base enhanced retrieval method and system, S1: obtaining electric power text data and preprocessing; S2: based on a text classification model, automatically classifying and storing the preprocessed electric power data by type; S3: constructing a named entity recognition model of the electric power system to automatically identify and extract entities, and based on the entity acquisition relationship, constructing a knowledge graph of the electric power system; S4: combining self-supervised learning and supervised learning, using a self-supervised learning method to pre-train an NLU model on unlabeled data, and then based on the labeled data set, supervised fine-tuning is performed to obtain an optimized NLU model; S5: constructing an intelligent question-answering system based on the knowledge graph of the electric power system and the optimized NLU model; S6: combining the electric power system domain knowledge and rules to screen and pre-sort the results; and obtaining the final answer based on the sorting of the content and the secondary sorting based on collaborative filtering. The present invention improves the retrieval efficiency and accuracy of information in the electric power field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent question answering, and in particular to an artificial intelligence-based power vector knowledge base enhanced retrieval method and system. Background Art

[0002] With the continuous development of the power system and the advancement of the intelligent process, a large amount of power-related data is constantly generated and accumulated, including text data in multiple aspects such as transmission, distribution, power generation and equipment management. These data are not only of various types (such as fault reports, maintenance records, operation logs, etc.), but also contain complex time series information. How to effectively manage and utilize these data and quickly and accurately extract and retrieve key information from them has become an important challenge for the intelligent management of the power industry. Summary of the invention

[0003] In order to solve the above problems, the purpose of the present invention is to provide an artificial intelligence-based power vector knowledge base enhanced retrieval method to optimize the acquisition, processing, analysis and retrieval of power system data and improve the retrieval efficiency and accuracy of relevant information in the power field.

[0004] To achieve the above object, the present invention adopts the following technical solutions:

[0005] An artificial intelligence-based power vector knowledge base enhanced retrieval method comprises the following steps:

[0006] S1: Obtain various types of power text data including power transmission, distribution, power generation and power equipment management, remove noise and redundant information, unify the format of power text data (such as log data, work order data) and align the time series;

[0007] S2: Based on the text classification model, the pre-processed power data is automatically classified and stored by type (such as fault reports, maintenance records, operation logs, etc.);

[0008] S3: Build a named entity recognition model for the power system to automatically identify and extract entities, obtain relationships based on entities, and build a knowledge graph for the power system;

[0009] S4: Combining self-supervised learning and supervised learning, use self-supervised learning methods to pre-train the NLU model on unlabeled data, and then perform supervised fine-tuning based on the labeled data set to obtain the optimized NLU model;

[0010] S5: Based on the knowledge graph of the power system and the optimized NLU model, an intelligent question-answering system is constructed; user input is classified according to the text classification model to determine the type of user question, and then user input is parsed based on the optimized NLU model to extract key entities and relationships, and query statements are generated to obtain answers from the knowledge graph;

[0011] S6: Combine power system domain knowledge and rules (such as equipment priority, fault severity) to screen and initially sort the results; and perform content-based sorting and collaborative filtering-based secondary sorting to balance hot and cold data and improve the accuracy of recommendations to obtain the final answer.

[0012] Furthermore, the text classification model is built based on the pre-trained BERT model, and a classification layer is added to the output layer of BERT as follows:

[0013] Tokenize the electric power text data and add the [CLS] tag at the beginning and the [SEP] tag at the end;

[0014] Calculate the hidden state through the BERT model, pass the tokenized input through the pre-trained BERT model, and obtain the hidden state vector of each token, including the hidden state of the [CLS] token ;

[0015] exist Add a linear layer W and bias b, and calculate the category probability through a softmax layer;

[0016]

[0017] Where x is the input text, BERT(x) is the vector representation of the input text by BERT, and y is the classification label;

[0018] Use the cross entropy loss function to calculate the gap between the predicted results and the true labels;

[0019] ;

[0020] Among them, y i is the true label of the i-th sample, P(y i ∣x i ) is the value of the ith input sample x i The predicted probability of , N is the number of samples;

[0021] The model parameters are adjusted through back propagation and optimization algorithms to minimize the loss function and thus improve the classification performance.

[0022] Furthermore, the named entity recognition model of the power system is as follows: a named entity recognition model is constructed based on BERT and CRF, including an input layer, a BERT layer, a fully connected layer, and a CRF layer;

[0023] The input layer inputs the classified and stored text data and forms an input sequence X after tokenization;

[0024] The BERT layer obtains the contextual representation of the text through the BERT model. After inputting the sequence X, the BERT model outputs the hidden state matrix:

[0025] ;

[0026] in, For the The output of words, n is the number of words;

[0027] Use a fully connected layer to map each hidden state to the labeled category space:

[0028] ;

[0029] Among them, W q 、b q are the weights and biases of the fully connected layer respectively;

[0030] The score of the entire tag sequence is calculated through the CRF layer, and the Viterbi algorithm is used for decoding to find the tag sequence with the highest score;

[0031] The final recognized tag sequence is associated with the original input text and stored in the database.

[0032] Furthermore, the score of the entire tag sequence is calculated through the CRF layer, and the Viterbi algorithm is used for decoding to find the tag sequence with the highest score, as follows:

[0033] Defining a tag sequence The score is:

[0034] ;

[0035] Among them, z is the score matrix, For marking With mark The transfer matrix between Indicates Word corresponding tags The score of; define two matrices and ,in Indicates that at position t, marked The best score at the end; Indicates that at position t, marked The previous marker in the optimal path at the end;

[0036] According to the token score of the first word, for the first token, it is initialized as:

[0037] ;

[0038] For positions t=2 to T:

[0039] ;

[0040] Where j is the index, Indicates The transfer matrix between the word and the jth word;

[0041] And record the previous mark in the optimal path:

[0042] ;

[0043] Find the last position The optimal labeling is the labeling sequence with the highest score:

[0044] .

[0045] Furthermore, based on the entity acquisition relationship, the knowledge graph of the power system is constructed as follows:

[0046] Using the identified entities and identifying the relationship between entities through the classifier, two entities and The hidden states of are aggregated to form entity pair representations:

[0047]

[0048] Predict the relationship between entity pairs through a relation classifier;

[0049] ;

[0050] ;

[0051] in, is the weight matrix of the relation classifier; is the bias vector of the relation classifier; is the linear transformation result of the entity pair in the relational category space; is the predicted probability distribution of entity pairs belonging to each relationship category;

[0052] Using the identified entities and relationships, a knowledge graph of the power system is constructed. The knowledge graph is represented as a graph structure, with entities represented as nodes and relationships as edges:

[0053] ;

[0054] Among them, G represents the graph structure, is a collection of nodes, is a set of edges.

[0055] Furthermore, S4 is specifically:

[0056] Obtain unlabeled domain-related text data with a data volume greater than the preset standard, and based on the BERT model architecture;

[0057] Pre-training on unlabeled data through the MLM task enables the model to learn domain-specific language representations;

[0058] Based on the data set classified by the text classification model, the pre-trained model is fine-tuned on the data set of specific tasks according to different types, and finally the optimized NLU model corresponding to several specific tasks is obtained.

[0059] Furthermore, the model is pre-trained on unlabeled data through the MLM task, so that it can learn domain-specific language representations, as follows:

[0060] Randomly select some words and replace them with [MASK] token;

[0061] The BERT model consists of multiple Transformer encoder layers, each of which contains a multi-head self-attention mechanism and a feed-forward neural network;

[0062] ;

[0063] Among them, E(w1) ...E(w n ) are words w1 ...w n word embedding, P is the positional encoding, is the hidden state of the lth layer; E([CLS]) and E([SEP]) are the word embedding vectors of the [CLS] and [SEP] tags respectively; Represents the l-th layer Transformer encoder;

[0064] Loss Function :

[0065] ;

[0066] Among them, D is the domain text dataset, M is the set of masked locations, It is the output of the last layer of BERT; represents the expectation of all samples x in the entire data set D; For a given hidden state , the computational model predicts the correct word The logarithmic probability of Represents an index into a collection of locations.

[0067] Furthermore, step S6 is specifically as follows:

[0068] According to the importance of the equipment, the fault reports are screened, and according to the severity of the fault, the reports are screened. For each prediction result y pred , define a preliminary screening score:

[0069] ;

[0070] Among them, priority(device) is the priority score of the device; severity(fault) is the severity score of the fault; α and β are weight parameters;

[0071] Based on the initial screening results, sort the fault description according to the degree of match with the historical records, identify the fault mode based on historical data, and calculate the similarity with the known mode, using the content sorting score content As a supplement:

[0072] ;

[0073] Among them, similarity(description,history) is the similarity between the current fault description and the historical record; pattern(fault) is the matching degree of the current fault in the known pattern; γ and δ are weight parameters;

[0074] Construct the user-equipment matrix R, where each element represents the maintenance record or fault handling record that the user has performed on a certain device:

[0075] ;

[0076] Calculate the similarity matrix S between devices:

[0077] ;

[0078] in, represents the first List: represents the first Column; superscript T indicates transposition; is the Euclidean norm;

[0079] Use collaborative filtering to sort the scores CF :

[0080] ;

[0081] in, is a set of devices, history_score(d) is the score of device d in the history records, is the similarity between the current device and device d;

[0082] Finally, the comprehensive ranking score is obtained by combining the initial screening score, content ranking score and collaborative filtering score:

[0083] ;

[0084] Among them: λ1, λ2, λ3 are weight parameters.

[0085] An artificial intelligence-based power vector knowledge base enhanced retrieval system includes a processor, a memory, and a computer program stored in the memory. When the processor executes the computer program, it specifically performs the steps in the artificial intelligence-based power vector knowledge base enhanced retrieval method as described above.

[0086] The present invention has the following beneficial effects:

[0087] 1. The present invention optimizes the acquisition, processing, analysis and retrieval of power system data, and improves the efficiency and accuracy of retrieval of relevant information in the power field;

[0088] 2. Based on the pre-processed power data, the present invention uses a text classification model to automatically classify and store data, which greatly improves the management and utilization efficiency of data, makes the retrieval of relevant data more efficient, and automatically identifies and extracts entities and relationships in the power system through a named entity recognition (NER) model, constructs a knowledge graph, and can well display various key information in the power system and the connections between them;

[0089] 3. The present invention uses unlabeled data for pre-training through self-supervised learning, which can make full use of a large amount of unlabeled data to establish a powerful initial model, and then use labeled data for supervised fine-tuning to improve the generalization ability and accuracy of the model. Through this step-by-step optimization method, the NLU model can acquire more domain knowledge and language features, making it more accurate and comprehensive when parsing user input questions; and use the knowledge graph and the optimized NLU model to parse user questions, extract key entities and relationships, and generate query statements to quickly and accurately obtain answers from the knowledge graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0091] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0092] refer to Figure 1 In this embodiment, a power vector knowledge base enhanced retrieval method based on artificial intelligence is provided, comprising the following steps:

[0093] S1: Obtain various types of power text data including transmission, distribution, generation and power equipment management, such as power system technical documents, fault reports, maintenance records, logs, monitoring data, etc. Remove noise and redundant information, such as HTML tags, non-text characters, and repeated content. Unify the format of power text data (such as log data and work order data) and align the time series;

[0094] S2: Based on the text classification model, the pre-processed power data is automatically classified and stored by type (such as fault reports, maintenance records, operation logs, etc.);

[0095] S3: Build a named entity recognition model for the power system to automatically identify and extract entities (such as equipment names, geographic locations, technical terms, etc.), obtain relationships based on entities, and build a knowledge graph for the power system;

[0096] S4: Combining self-supervised learning and supervised learning, use self-supervised learning methods to pre-train the NLU model on unlabeled data, and then perform supervised fine-tuning based on the labeled data set (such as fault report classification and equipment fault prediction) to obtain the optimized NLU model;

[0097] S5: Based on the knowledge graph of the power system and the optimized NLU model, an intelligent question-answering system is built. The knowledge graph provides semantic network and reasoning support, and the NLU model parses questions and generates answers. The user input is classified according to the text classification model to determine the type of user questions. Then, the user input is parsed based on the optimized NLU model, key entities and relationships are extracted, and query statements are generated to obtain answers from the knowledge graph.

[0098] S6: Combine power system domain knowledge and rules (such as equipment priority, fault severity) to screen and initially sort the results; and perform content-based sorting and collaborative filtering-based secondary sorting to balance hot and cold data and improve the accuracy of recommendations to obtain the final answer.

[0099] In this embodiment, the text classification model is built based on the pre-trained BERT model, and a classification layer is added to the output layer of BERT, as follows:

[0100] Tokenize the electric power text data and add the [CLS] tag at the beginning and the [SEP] tag at the end;

[0101] Calculate the hidden state through the BERT model, pass the tokenized input through the pre-trained BERT model, and obtain the hidden state vector of each token, including the hidden state of the [CLS] token ;

[0102] exist Add a linear layer W and bias b, and calculate the category probability through a softmax layer;

[0103]

[0104] Where x is the input text, BERT(x) is the vector representation of the input text by BERT, and y is the classification label;

[0105] Use the cross entropy loss function to calculate the gap between the predicted results and the true labels;

[0106] ;

[0107] Among them, y i is the true label of the i-th sample, P(y i ∣x i ) is the value of the ith input sample x i The predicted probability of , N is the number of samples;

[0108] The model parameters are adjusted through back propagation and optimization algorithms to minimize the loss function and thus improve the classification performance.

[0109] In this embodiment, the named entity recognition model of the power system is as follows: a named entity recognition model is constructed based on BERT and CRF, including an input layer, a BERT layer, a fully connected layer and a CRF layer;

[0110] The input layer inputs the classified and stored text data and forms an input sequence X after tokenization;

[0111] The BERT layer obtains the contextual representation of the text through the BERT model. After inputting the sequence X, the BERT model outputs the hidden state matrix:

[0112] ;

[0113] in, For the The output of words, n is the number of words;

[0114] Use a fully connected layer to map each hidden state to the labeled category space:

[0115] ;

[0116] Among them, W q 、b q are the weights and biases of the fully connected layer respectively;

[0117] The score of the entire tag sequence is calculated through the CRF layer, and the Viterbi algorithm is used for decoding to find the tag sequence with the highest score;

[0118] The final recognized tag sequence is associated with the original input text and stored in the database.

[0119] In this embodiment, the score of the entire tag sequence is calculated through the CRF layer, and the Viterbi algorithm is used for decoding to find the tag sequence with the highest score, as follows:

[0120] Defining a tag sequence The score is:

[0121] ;

[0122] Among them, z is the score matrix, For marking With mark The transfer matrix between Indicates Word corresponding tags The score of; define two matrices and ,in Indicates that at position t, marked The best score at the end; Indicates that at position t, marked The previous marker in the optimal path at the end;

[0123] According to the token score of the first word, for the first token, it is initialized as:

[0124] ;

[0125] For positions t=2 to T:

[0126] ;

[0127] Where j is the index, Indicates The transfer matrix between the word and the jth word;

[0128] And record the previous mark in the optimal path:

[0129] ;

[0130] Find the last position The optimal labeling is the labeling sequence with the highest score:

[0131] .

[0132] In this embodiment, the knowledge graph of the power system is constructed based on the entity acquisition relationship, as follows:

[0133] Using the identified entities and identifying the relationship between entities through the classifier, two entities and The hidden states of are aggregated (e.g., concatenated) to form entity pair representations:

[0134]

[0135] Predict the relationship between entity pairs through a relation classifier;

[0136] ;

[0137] ;

[0138] in, is the weight matrix of the relation classifier; is the bias vector of the relation classifier; is the linear transformation result of the entity pair in the relational category space; is the predicted probability distribution of entity pairs belonging to each relationship category;

[0139] Using the identified entities and relationships, a knowledge graph of the power system is constructed. The knowledge graph is represented as a graph structure, with entities represented as nodes and relationships as edges:

[0140] ;

[0141] Among them, G represents the graph structure, is a collection of nodes, is a set of edges.

[0142] In this embodiment, S4 is specifically:

[0143] Obtain unlabeled domain-related text data with a data volume greater than the preset standard, and based on the BERT model architecture;

[0144] Pre-training on unlabeled data through the MLM task enables the model to learn domain-specific language representations;

[0145] Based on the data set classified by the text classification model, the pre-trained model is fine-tuned on the data set of specific tasks according to different types (such as fault report classification and equipment fault prediction), and finally the optimized NLU models corresponding to several specific tasks are obtained.

[0146] For text classification tasks, such as fault report classification, BERT output is mapped to category labels through a linear classifier;

[0147] ;

[0148] Among them, H [CLS] is the vector of the [CLS] token in the BERT output, W cls and b cls are the weights and biases of the classifier; different tasks use different loss functions; z is the unnormalized category score; P class Represents the probability distribution of the input text belonging to each category;

[0149] For equipment failure prediction tasks, you may need to input the BERT output vector into a regression model or sequence processing model for prediction;

[0150] y pred =MLP(H [CLS] )

[0151] Among them, y pred is the prediction output; MLPMLP is a multi-layer perceptron for continuous output of fault prediction.

[0152] In this embodiment, the model is pre-trained on unlabeled data through the MLM task, so that the model can learn domain-specific language representations, as follows:

[0153] Randomly select some words and replace them with [MASK] token;

[0154] The BERT model consists of multiple Transformer encoder layers, each of which contains a multi-head self-attention mechanism and a feed-forward neural network;

[0155] ;

[0156] Among them, E(w1) ...E(w n ) are words w1 ...w n word embedding, P is the positional encoding, is the hidden state of the lth layer; E([CLS]) and E([SEP]) are the word embedding vectors of the [CLS] and [SEP] tags respectively; Represents the l-th layer Transformer encoder;

[0157] Loss Function :

[0158] ;

[0159] Among them, D is the domain text dataset, M is the set of masked locations, It is the output of the last layer of BERT; represents the expectation of all samples x in the entire data set D; For a given hidden state , the computational model predicts the correct word The logarithmic probability of Represents an index into a collection of locations.

[0160] In this embodiment, step S6 is specifically as follows:

[0161] According to the importance of the equipment, the fault reports are screened, and according to the severity of the fault, the reports are screened. For each prediction result y pred , define a preliminary screening score:

[0162] ;

[0163] Among them, priority(device) is the priority score of the device; severity(fault) is the severity score of the fault; α and β are weight parameters;

[0164] Based on the initial screening results, sort the fault description according to the degree of match with the historical records, identify the fault mode based on historical data, and calculate the similarity with the known mode, using the content sorting score content As a supplement:

[0165] ;

[0166] Among them, similarity(description,history) is the similarity between the current fault description and the historical record; pattern(fault) is the matching degree of the current fault in the known pattern; γ and δ are weight parameters;

[0167] Construct the user-equipment matrix R, where each element represents the maintenance record or fault handling record that the user has performed on a certain device:

[0168] ;

[0169] Calculate the similarity matrix S between devices:

[0170] ;

[0171] in, represents the first List: represents the first Column; superscript T indicates transposition; is the Euclidean norm;

[0172] Use collaborative filtering to sort the scores CF :

[0173] ;

[0174] in, is a set of devices, history_score(d) is the score of device d in the history records; is the similarity between the current device and device d;

[0175] Finally, the comprehensive ranking score is obtained by combining the initial screening score, content ranking score and collaborative filtering score:

[0176] ;

[0177] Among them: λ1, λ2, λ3 are weight parameters.

[0178] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0179] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0180] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0181] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0182] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.

Claims

1. An artificial intelligence-based power vector knowledge base enhanced retrieval method, characterized in that: The following steps are involved: S1: Obtain various types of power text data including power transmission, distribution, power generation and power equipment management, remove noise and redundant information, unify the format of power text data and align the time series; S2: Based on the text classification model, the pre-processed power data is automatically classified and stored by type; S3: Build a named entity recognition model for the power system to automatically identify and extract entities, obtain relationships based on entities, and build a knowledge graph for the power system; S4: Combining self-supervised learning and supervised learning, use self-supervised learning methods to pre-train the NLU model on unlabeled data, and then perform supervised fine-tuning based on the labeled data set to obtain the optimized NLU model; S5: Build an intelligent question-answering system based on the knowledge graph of the power system and the optimized NLU model; Classify user input based on the text classification model to determine the type of user question, then parse the user input based on the optimized NLU model, extract key entities and relationships, and generate query statements to obtain answers from the knowledge graph; S6: Combine power system domain knowledge and rules to screen and preliminarily sort the results; sort based on content and secondary sort based on collaborative filtering to balance hot and cold data and improve the accuracy of recommendations to obtain the final answer; The text classification model is built based on the pre-trained BERT model, and a classification layer is added to the output layer of BERT, as follows: Tokenize the electric power text data and add the [CLS] tag at the beginning and the [SEP] tag at the end; Calculate the hidden state through the BERT model, pass the tokenized input through the pre-trained BERT model, and obtain the hidden state vector of each token, including the hidden state of the [CLS] token ; exist Add a linear layer W and bias b, and calculate the category probability through a softmax layer; Where x is the input text, BERT(x) is the vector representation of the input text by BERT, and y is the classification label; Use the cross entropy loss function to calculate the gap between the predicted results and the true labels; ; Among them, y i is the true label of the i-th sample, P(y i ∣x i ) is the value of the ith input sample x i The predicted probability of , N is the number of samples; Adjust model parameters through back propagation and optimization algorithms to minimize the loss function and thus improve classification performance; The named entity recognition model of the power system is as follows: a named entity recognition model is constructed based on BERT and CRF, including input layer, BERT layer, fully connected layer and CRF layer; The input layer inputs the classified and stored text data and forms an input sequence X after tokenization; The BERT layer obtains the contextual representation of the text through the BERT model. After inputting the sequence X, the BERT model outputs the hidden state matrix: ; in, For the The output of words, n is the number of words; Use a fully connected layer to map each hidden state to the labeled category space: ; Among them, W q , b q are the weights and biases of the fully connected layer respectively; The score of the entire tag sequence is calculated through the CRF layer, and the Viterbi algorithm is used for decoding to find the tag sequence with the highest score; The final recognized token sequence is associated with the original input text and stored in the database; The score of the entire tag sequence is calculated through the CRF layer, and the Viterbi algorithm is used for decoding to find the tag sequence with the highest score, as follows: Defining a tag sequence The score is: ; Among them, z is the score matrix, For marking With mark The transfer matrix between Indicates Word corresponding to the tag The score of; define two matrices and ,in Indicates that at position t, marked The best score at the end; Indicates that at position t, marked The previous marker in the optimal path at the end; According to the token score of the first word, for the first token, it is initialized as: ; For positions t=2 to T: ; Where j is the index, Indicates The transfer matrix between the word and the jth word; And record the previous mark in the optimal path: ; Find the last position The optimal labeling is the labeling sequence with the highest score: 。 2. The method for enhancing the retrieval of a power vector knowledge base based on artificial intelligence according to claim 1, characterized in that: The entity-based acquisition relationship is used to construct a knowledge graph of the power system, as follows: Using the identified entities and identifying the relationship between entities through the classifier, two entities and The hidden states of are aggregated to form entity pair representations: Predict the relationship between entity pairs through a relation classifier; ; ; in, is the weight matrix of the relation classifier; is the bias vector of the relation classifier; is the linear transformation result of the entity pair in the relational category space; is the predicted probability distribution of entity pairs belonging to each relationship category; Using the identified entities and relationships, a knowledge graph of the power system is constructed. The knowledge graph is represented as a graph structure, with entities represented as nodes and relationships as edges: ; Among them, G represents the graph structure, is a collection of nodes, is a set of edges.

3. The artificial intelligence-based power vector knowledge base enhanced retrieval method according to claim 1 is characterized in that: The S4 is specifically: Obtain unlabeled domain-related text data with a data volume greater than the preset standard, and based on the BERT model architecture; Pre-training on unlabeled data through the MLM task enables the model to learn domain-specific language representations; Based on the data set classified by the text classification model, the pre-trained model is fine-tuned on the data set of specific tasks according to different types, and finally the optimized NLU model corresponding to several specific tasks is obtained.

4. The artificial intelligence-based power vector knowledge base enhanced retrieval method according to claim 3 is characterized in that: The MLM task is pre-trained on unlabeled data to enable the model to learn domain-specific language representations, as follows: Randomly select some words and replace them with [MASK] token; The BERT model consists of multiple Transformer encoder layers, each of which contains a multi-head self-attention mechanism and a feed-forward neural network; ; Among them, E(w1) ...E(w n ) are words w1 ...w n word embedding, P is the positional encoding, is the hidden state of the lth layer; E([CLS]) and E([SEP]) are the word embedding vectors of the [CLS] and [SEP] tags respectively; Represents the l-th layer Transformer encoder; Loss Function : ; Among them, D is the domain text dataset, M is the set of masked locations, It is the output of the last layer of BERT; represents the expectation of all samples x in the entire data set D; For a given hidden state , the computational model predicts the correct word The logarithmic probability of Represents an index into a collection of locations.

5. The artificial intelligence-based power vector knowledge base enhanced retrieval method according to claim 1 is characterized in that: The step S6 is specifically as follows: According to the importance of the equipment, the fault reports are screened, and according to the severity of the fault, the reports are screened. For each prediction result y pred , define a preliminary screening score: ; Among them, priority(device) is the priority score of the device; severity(fault) is the severity score of the fault; α and β are weight parameters; Based on the initial screening results, sort the fault description according to the degree of match with the historical records, identify the fault mode based on historical data, and calculate the similarity with the known mode, using the content sorting score content As a supplement: ; Among them, similarity(description,history) is the similarity between the current fault description and the historical record; pattern(fault) is the matching degree of the current fault in the known pattern; γ and δ are weight parameters; Construct the user-equipment matrix R, where each element represents the maintenance record or fault handling record that the user has performed on a certain device: ; Calculate the similarity matrix S between devices: ; in, represents the first List; represents the first Column; superscript T indicates transposition; is the Euclidean norm; Use collaborative filtering to sort the scores CF : ; in, is a set of devices, history_score(d) is the score of device d in the history records; is the similarity between the current device and device d; Finally, the comprehensive ranking score is obtained by combining the initial screening score, content ranking score and collaborative filtering score: ; Among them: λ1, λ2, λ3 are weight parameters.

6. An artificial intelligence-based power vector knowledge base enhanced retrieval system, characterized in that: It comprises a processor, a memory and a computer program stored in the memory. When the processor executes the computer program, it specifically performs the steps in the artificial intelligence-based power vector knowledge base enhanced retrieval method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Knowledge graph intelligent question and answer information identification method based on improved deep learning algorithm

    CN117891929A

  • Integrated circuit knowledge graph extraction and construction method based on deep learning ALBERT model

    CN118396104A