Electric power question answering method and system based on knowledge graph and related equipment
By using a knowledge graph-based entity and predicate recognition model, the problem of insufficient recognition accuracy in existing question-answering systems is solved, enabling efficient recognition and accurate answers to user-input questions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ORDOS INST OF APPLIED TECH
- Filing Date
- 2023-09-22
- Publication Date
- 2026-04-21
AI Technical Summary
Existing question-answering systems suffer from poor accuracy in recognizing user-inputted questions, especially due to the difficulty in identifying questions with text similarity exceeding a preset threshold in the pre-set database because users use different colloquial expressions.
Using a knowledge graph-based approach, the entity of the user's question is first determined by a pre-defined entity recognition model and a predicate recognition model. Then, the semantic similarity of multiple pre-defined text expressions is calculated, and the predicate with the highest semantic similarity and greater than a threshold is selected to determine the target answer from the knowledge graph.
It improves the accuracy of recognizing user-input questions by first finding the entity and then the predicate, thus enhancing the question-answering system's recognition capabilities.
Smart Images

Figure CN121901358A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to a knowledge graph-based question-answering method, system, and related equipment for the power industry. Background Technology
[0002] In their customer service, power companies in various regions typically need to answer questions users encounter regarding the power system. However, manually answering these questions would consume significant human resources. Therefore, question-and-answer systems have been developed. Users input questions into the system, and the system searches for relevant answers based on those questions, thus saving human resources.
[0003] The common implementation principle of current question-answering systems is usually a pre-set database that stores multiple pairs of questions and answers. Based on the question input by the user, the system finds questions in the pre-set database whose text similarity to the user's input question is higher than a preset threshold, and then outputs the corresponding answer to that question.
[0004] However, in actual operation, because each user has their own different colloquial expressions, it is difficult to find texts with similarity higher than the preset threshold from the preset database.
[0005] Therefore, existing technologies suffer from poor accuracy in recognizing user-input questions. Summary of the Invention
[0006] This application provides a knowledge graph-based power question answering method, system, and related equipment to address the problem of poor accuracy in recognizing user-inputted questions in related technologies.
[0007] In a first aspect, embodiments of this application provide a knowledge graph-based electricity question-answering method, the method comprising:
[0008] Receive a first question from a first terminal, the first question being a power problem;
[0009] The first question is input into a preset entity recognition model to obtain the first entity of the first question;
[0010] The first question is input into a preset predicate recognition model along with each of the multiple preset text expressions to calculate multiple semantic similarities.
[0011] The predicate corresponding to the target text expression is determined as the first predicate of the first question, and the target text expression is the preset text expression among the plurality of preset text expression forms that has the highest semantic similarity value to the first question and is greater than a preset threshold.
[0012] The target answer is determined from the knowledge graph based on the first entity and the first predicate.
[0013] The preset entity recognition model is a trie, and the first entity obtained by inputting the first question into the preset entity recognition model includes:
[0014] Obtain entity information in the power sector;
[0015] Based on the entity information, construct the trie;
[0016] Following the forward maximum matching principle, the first question is input into the trie to obtain the first entity of the first question.
[0017] The step of inputting the first question and each of the multiple preset text expressions into a preset predicate recognition model to calculate multiple semantic similarities includes:
[0018] The first question and each preset text expression are converted into word vectors to obtain a first word vector and a second word vector. The first word vector is the word vector of the first question, and the second word vector is the word vector of each preset text expression.
[0019] A recurrent neural network is used to encode the first word vector and the second word vector to obtain the target output;
[0020] The target output is encoded using a convolutional neural network to obtain a first vector for the first question and a second vector for each preset text expression form;
[0021] Semantic similarity is calculated between the first vector and each of the second vectors to obtain multiple semantic similarities.
[0022] The step of inputting the first question and each of the multiple preset text expressions into a preset predicate recognition model to calculate multiple semantic similarities includes:
[0023] Obtain all triple information related to the entity in the first question from the knowledge graph;
[0024] The first question and the triple information are input into the preset predicate recognition model to obtain character similarity. The triple information includes entity, candidate predicate and tail entity. The character similarity includes the character similarity between the first question and the candidate predicate and the character similarity between the first question and the tail entity.
[0025] The character similarity is encoded using a recurrent neural network to obtain the second target output;
[0026] Using a convolutional neural network, the output of the second target is encoded to obtain the third vector of the first question, the fourth vector of the candidate predicate, and the fifth vector of the tail entity;
[0027] The semantic similarity of the third vector with the fourth vector and the fifth vector is calculated to obtain the first semantic similarity and the second semantic similarity. The first semantic similarity is the semantic similarity between the third vector and the fourth vector, and the second semantic similarity is the semantic similarity between the third vector and the fifth vector.
[0028] Secondly, embodiments of this application provide a knowledge graph-based power question-answering system, the system comprising:
[0029] A receiving module is configured to receive a first question from a first terminal, wherein the first question is an electricity problem;
[0030] The module is used to input the first question into a preset entity recognition model to obtain the first entity of the first question;
[0031] The calculation module is used to input the first question and each of the multiple preset text expressions into the preset predicate recognition model to calculate multiple semantic similarities;
[0032] The first determining module is used to determine the predicate corresponding to the target text expression form as the first predicate of the first question, wherein the target text expression form is the preset text expression form among the plurality of preset text expression forms that has the highest semantic similarity value to the first question and is greater than a preset threshold;
[0033] The second determining module is used to determine the target answer from the knowledge graph based on the first entity and the first predicate.
[0034] The obtained module includes:
[0035] The acquisition submodule is used to acquire entity information in the power sector;
[0036] A construction submodule is used to construct the trie based on the entity information;
[0037] The input submodule is used to input the first question into the trie according to the forward maximum matching principle to obtain the first entity of the first question.
[0038] The computing module includes:
[0039] The first submodule is used to convert the first question and each preset text expression form into word vectors to obtain a first word vector and a second word vector, wherein the first word vector is the word vector of the first question and the second word vector is the word vector of each preset text expression form;
[0040] The second submodule is used to encode the first word vector and the second word vector using a recurrent neural network to obtain the target output;
[0041] The third submodule is used to encode the target output using a convolutional neural network to obtain a first vector for the first question and a second vector for each preset text expression form.
[0042] The fourth submodule is used to calculate the semantic similarity between the first vector and each of the second vectors to obtain multiple semantic similarities.
[0043] The computing module includes:
[0044] The acquisition submodule is used to retrieve all triple information related to the entity in the first question from the knowledge graph;
[0045] The fifth submodule is used to input the first question and the triple information into the preset predicate recognition model to obtain character similarity. The triple information includes entity, candidate predicate and tail entity. The character similarity includes the character similarity between the first question and the candidate predicate and the character similarity between the first question and the tail entity.
[0046] The sixth submodule is used to encode the character similarity using a recurrent neural network to obtain the second target output;
[0047] The seventh submodule is used to encode the second target output using a convolutional neural network to obtain the third vector of the first problem, the fourth vector of the candidate predicate, and the fifth vector of the tail entity.
[0048] The eighth submodule is used to calculate the semantic similarity between the third vector and the fourth vector and the fifth vector respectively, to obtain a first semantic similarity and a second semantic similarity. The first semantic similarity is the semantic similarity between the third vector and the fourth vector, and the second semantic similarity is the semantic similarity between the third vector and the fifth vector.
[0049] Thirdly, embodiments of the present invention also provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the medical image processing method described above.
[0050] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the medical image processing method described above.
[0051] The improvements in this application mainly include: (1) inputting the first question and each of the multiple preset text expressions into a preset predicate recognition model to calculate multiple semantic similarities; (2) determining the predicate corresponding to the target text expression as the first predicate of the first question, wherein the target text expression is the preset text expression with the highest semantic similarity value to the first question and greater than a preset threshold among the multiple preset text expressions; (3) determining the target answer from the knowledge graph based on the first entity and the first predicate; and (4) the algorithm set in the specification.
[0052] In this embodiment, a first question, which is an electricity-related question, is received from a first terminal. The first question is then input into a preset entity recognition model to obtain a first entity for the first question. The first question is then compared with each of a plurality of preset text expressions in a preset predicate recognition model to calculate multiple semantic similarities. The predicate corresponding to a target text expression is determined as the first predicate of the first question. The target text expression is the preset text expression among the plurality of preset text expressions whose semantic similarity value to the first question is the highest and greater than a preset threshold. Based on the first entity and the first predicate, a target answer is determined from a knowledge graph. This method of finding the entity first and then the predicate improves the accuracy of recognizing the user-inputted question. Attached Figure Description
[0053] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 A flowchart illustrating a knowledge graph-based electricity question-answering method provided in this application embodiment;
[0055] Figure 2 A schematic diagram of a trie structure provided in an embodiment of this application;
[0056] Figure 3A schematic diagram of the structure of a knowledge graph-based power question-answering system provided in an embodiment of this application;
[0057] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0058] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0059] like Figure 1 As shown in the figure, this application provides a knowledge graph-based electricity question-answering method, the method including:
[0060] Step 101: Receive a first question from the first terminal, the first question being a power problem;
[0061] The primary terminal could be a mobile phone, and the primary question could be: "What online service channels does the Ordos Power Supply Bureau offer?"
[0062] It should be understood that electricity issues refer to problems related to the vertical field of electricity.
[0063] Step 102: Input the first question into the preset entity recognition model to obtain the first entity of the first question;
[0064] It should be understood that the preset entity recognition model can be a trie or a prefix tree.
[0065] For example, the first entity in the first question refers to "Ordos Power Supply Bureau".
[0066] It should be noted that in natural language processing, an entity can be understood as an object within a concept.
[0067] The preset entity recognition model uses a prefix tree approach to identify entities in user queries because the number of entities in the power sector is small and they possess unique characteristics specific to this vertical sector.
[0068] Step 103: Input the first question and each of the multiple preset text expressions into the preset predicate recognition model to calculate multiple semantic similarities;
[0069] It should be noted that the preset predicate recognition model can be a pattern-based predicate recognition model.
[0070] It should be understood that the preset text expression form can be understood as a candidate pattern.
[0071] Pre-construct common predicate relations and their corresponding patterns, such as the predicate "steps" corresponding to the pattern "~ what is the process of ~", where "~" represents an entity placeholder.
[0072] The first question and the candidate pattern are input into the model respectively. The model first converts the first question and the candidate pattern into embeddings, denoted as and respectively. and Where t q and t p The vector lengths of the first question and the candidate pattern are given, where d represents the vector dimension, and they are encoded using a recurrent neural network (RNN):
[0073] s t =tanh(Ux t +Ws t-1 );
[0074] o t =Vs t ;
[0075] Where, x t The input at time t, i.e., x q or x p The t-th dimension feature, s t O represents the hidden layer value at time t. t This represents the output at time t, where U, W, and V are weighting parameters.
[0076] The features are further encoded using a convolutional neural network (CNN) to obtain vector representations q and p of the user's question and candidate pattern:
[0077] q j =weigh t q *o q [j:j+k-1]+bias q ;
[0078] p j =weifh t p *o p [j:j+k-1]+bias p ;
[0079] Where weight and bias represent the weight and bias terms of the convolutional network, respectively, k is the kernel size, and o q and o pThis represents the output of the first problem and candidate patterns of the RNN layer, where [j:j+k-1] represents the j-th to j+k-1-th dimensions of the vector. Finally, all q values are... j , j∈[0,t q The concatenation of -k+1] yields q.
[0080] Similarly, we can obtain p.
[0081] Step 104 is used to determine the predicate corresponding to the target text expression form as the first predicate of the first question, wherein the target text expression form is the preset text expression form among the plurality of preset text expression forms that has the highest semantic similarity value to the first question and is greater than a preset threshold;
[0082] Semantic similarity is calculated using q and p as features:
[0083] score=sigmoid(Linear[q;p]);
[0084] In this context, ";" represents a splicing symbol, "Linear" represents a linear layer, and "score" is a score between 0 and 1, representing the degree of matching between the two.
[0085] If a candidate pattern has the highest score that is greater than a preset threshold, then the corresponding predicate is returned.
[0086] If a candidate pattern has the highest score but is below a preset threshold, then the deep predicate recognition model that integrates word information is invoked.
[0087] Step 105: Determine the target answer from the knowledge graph based on the first entity and the first predicate.
[0088] In this embodiment, a first question, which is an electricity-related question, is received from a first terminal. The first question is then input into a preset entity recognition model to obtain a first entity for the first question. The first question is then compared with each of a plurality of preset text expressions in a preset predicate recognition model to calculate multiple semantic similarities. The predicate corresponding to a target text expression is determined as the first predicate of the first question. The target text expression is the preset text expression among the plurality of preset text expressions that has the highest semantic similarity value to the first question and is greater than a preset threshold. Based on the first entity and the first predicate, the target answer is determined from a knowledge graph. This method of finding the entity first and then the predicate improves the accuracy of recognizing the user-inputted question.
[0089] The preset entity recognition model is a trie, and the first entity obtained by inputting the first question into the preset entity recognition model includes:
[0090] Obtain entity information in the power sector;
[0091] Based on the entity information, construct the trie;
[0092] Following the forward maximum matching principle, the first question is input into the trie to obtain the first entity of the first question.
[0093] A trie is pre-constructed using all entities in the power domain, such as... Figure 2 As shown, when identifying entities in a question, the forward maximum matching principle is adopted. That is, when several entities with the same prefix in the prefix tree are matched, only the longest one is retained. For example, if the prefix tree contains both the entities "Erdos" and "Erdos Power Bureau", and the user's question contains "Erdos Power Bureau", then "Erdos Power Bureau" is matched, and "Erdos" is ignored.
[0094] The step of inputting the first question and each of the multiple preset text expressions into a preset predicate recognition model to calculate multiple semantic similarities includes:
[0095] The first question and each preset text expression are converted into word vectors to obtain a first word vector and a second word vector. The first word vector is the word vector of the first question, and the second word vector is the word vector of each preset text expression.
[0096] A recurrent neural network is used to encode the first word vector and the second word vector to obtain the target output;
[0097] The target output is encoded using a convolutional neural network to obtain a first vector for the first question and a second vector for each preset text expression form;
[0098] Semantic similarity is calculated between the first vector and each of the second vectors to obtain multiple semantic similarities.
[0099] The step of inputting the first question and each of the multiple preset text expressions into a preset predicate recognition model to calculate multiple semantic similarities includes:
[0100] Obtain all triple information related to the entity in the first question from the knowledge graph;
[0101] The first question and the triple information are input into the preset predicate recognition model to obtain character similarity. The triple information includes entity, candidate predicate and tail entity. The character similarity includes the character similarity between the first question and the candidate predicate and the character similarity between the first question and the tail entity.
[0102] The character similarity is encoded using a recurrent neural network to obtain the second target output;
[0103] Using a convolutional neural network, the output of the second target is encoded to obtain the third vector of the first question, the fourth vector of the candidate predicate, and the fifth vector of the tail entity;
[0104] The semantic similarity of the third vector with the fourth vector and the fifth vector is calculated to obtain the first semantic similarity and the second semantic similarity. The first semantic similarity is the semantic similarity between the third vector and the fourth vector, and the second semantic similarity is the semantic similarity between the third vector and the fifth vector.
[0105] The preset predicate recognition model can be a deep predicate recognition model that integrates word information. For the target entity s, all triple information related to the entity is obtained from the knowledge graph of the vertical domain.<s,p,o> The predicate p is then used as a candidate. The first question and triplet information are input into a deep predicate recognition model that integrates word information. This model first converts the first question and candidate predicates into embedding representations, denoted as […]. and Where t Q and t P d represents the vector length of the question and the candidate pattern, respectively, and d represents the vector dimension. Simultaneously, the model considers the character similarity between the first question Q, the candidate predicate P, and the corresponding tail entity O. Here, the longest common subsequence (LCS) length and the Jaccard distance are used as features, denoted as LCS(Q,P), LCS(Q,O), Jaccard(Q,P), and Jaccard(Q,O). Encoding is performed using a recurrent neural network:
[0106] s t =tanh(Ux t +Ws t-1 )
[0107] o t =Vs t
[0108] Wherein, the input x at time t t For: x Q or xP' =[x P ;LCS(Q,P);Jaccard(Q,P)] or x O' = [LCS(Q,O); Jaccard(Q,O)]'s t-th dimension feature.
[0109] Further encode features using convolutional neural networks:
[0110] Q j =weigh t Q *o Q [j:j+k-1]+bias Q
[0111] P j =weigh t P' *o P' [j:j+k-1]+bias P'
[0112] O j =weight O' *o O' [j:j+k-1]+bias O'
[0113] Where weight and bias represent the weight and bias terms of the convolutional network, respectively, k is the kernel size, and o Q o P' and o O' This represents the first problem of the RNN layer, the output of candidate predicates and tail entities, and finally all the Q values. j , j∈[0,t Q Concatenate [-k+1] to obtain Q_emb, and similarly obtain P_emb and O_emb. Use these three as features to calculate semantic similarity:
[0114] score Q-P =sigmoid(Linear) Q-P [Q_emb;P_emb]);
[0115] score Q-O =sigmoid(Linear) Q-O [Q_emb;O_emb]);
[0116] Among them, Linear Q-P and Linrar Q-O This is a linear layer. (score) Q-P The score represents the similarity score between the first question and the candidate predicates. Q-OLet α be the similarity score between the first question and the tail entity. Then, a weighted sum of these two similarity scores is taken as the final matching score, where α is a hyperparameter.
[0117] final_score = α * score Q-P +(1-α)*score Q-O ;
[0118] If a candidate predicate has the highest score that exceeds a predefined threshold, then that predicate is returned. If the score is below the threshold, it is assumed that the knowledge graph does not yet contain an answer to the question.
[0119] like Figure 3 As shown in the figure, this application provides a knowledge graph-based power question-answering system 300, the system comprising:
[0120] The receiving module 301 is used to receive a first question from the first terminal, wherein the first question is an electricity problem;
[0121] Module 302 is used to input the first question into a preset entity recognition model to obtain the first entity of the first question;
[0122] The calculation module 303 is used to input the first question and each of the multiple preset text expressions into the preset predicate recognition model to calculate multiple semantic similarities;
[0123] The first determining module 304 is used to determine the predicate corresponding to the target text expression form as the first predicate of the first question, wherein the target text expression form is the preset text expression form among the plurality of preset text expression forms that has the highest semantic similarity value to the first question and is greater than a preset threshold;
[0124] The second determining module 305 is used to determine the target answer from the knowledge graph based on the first entity and the first predicate.
[0125] The obtained module includes:
[0126] The acquisition submodule is used to acquire entity information in the power sector;
[0127] A construction submodule is used to construct the trie based on the entity information;
[0128] The input submodule is used to input the first question into the trie according to the forward maximum matching principle to obtain the first entity of the first question.
[0129] The computing module includes:
[0130] The first submodule is used to convert the first question and each preset text expression form into word vectors to obtain a first word vector and a second word vector, wherein the first word vector is the word vector of the first question and the second word vector is the word vector of each preset text expression form;
[0131] The second submodule is used to encode the first word vector and the second word vector using a recurrent neural network to obtain the target output;
[0132] The third submodule is used to encode the target output using a convolutional neural network to obtain a first vector for the first question and a second vector for each preset text expression form.
[0133] The fourth submodule is used to calculate the semantic similarity between the first vector and each of the second vectors to obtain multiple semantic similarities.
[0134] The computing module includes:
[0135] The acquisition submodule is used to retrieve all triple information related to the entity in the first question from the knowledge graph;
[0136] The fifth submodule is used to input the first question and the triple information into the preset predicate recognition model to obtain character similarity. The triple information includes entity, candidate predicate and tail entity. The character similarity includes the character similarity between the first question and the candidate predicate and the character similarity between the first question and the tail entity.
[0137] The sixth submodule is used to encode the character similarity using a recurrent neural network to obtain the second target output;
[0138] The seventh submodule is used to encode the second target output using a convolutional neural network to obtain the third vector of the first problem, the fourth vector of the candidate predicate, and the fifth vector of the tail entity.
[0139] The eighth submodule is used to calculate the semantic similarity between the third vector and the fourth vector and the fifth vector respectively, to obtain a first semantic similarity and a second semantic similarity. The first semantic similarity is the semantic similarity between the third vector and the fourth vector, and the second semantic similarity is the semantic similarity between the third vector and the fifth vector.
[0140] The knowledge graph-based power question-answering system 300 described herein can achieve the functionality described in the embodiments of this application. Figure 1 The various processes in the method embodiments, and the ways to achieve the same beneficial effects, will not be repeated here to avoid repetition.
[0141] This application also provides an electronic device. Please refer to [link to relevant documentation]. Figure 4 The electronic device may include a processor 401, a memory 402, and a program 4021 stored in the memory 402 and executable on the processor 401.
[0142] When program 4021 is executed by processor 401, it can achieve the following: Figure 1 Any steps in the corresponding method embodiments and the achievement of the same beneficial effects will not be repeated here.
[0143] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by hardware related to program instructions, and the program can be stored in a readable medium.
[0144] This application embodiment also provides a readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described functions. Figure 1 Any step in the corresponding method embodiment can achieve the same technical effect, and will not be repeated here to avoid repetition.
[0145] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0146] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A knowledge graph-based question-answering method for electricity, characterized in that, The method includes: Receive a first question from a first terminal, the first question being a power problem; The first question is input into a preset entity recognition model to obtain the first entity of the first question; The first question is input into a preset predicate recognition model along with each of the multiple preset text expressions to calculate multiple semantic similarities. The predicate corresponding to the target text expression is determined as the first predicate of the first question, and the target text expression is the preset text expression among the plurality of preset text expression forms that has the highest semantic similarity value to the first question and is greater than a preset threshold. The target answer is determined from the knowledge graph based on the first entity and the first predicate.
2. The method according to claim 1, characterized in that, The preset entity recognition model is a trie, and the first entity obtained by inputting the first question into the preset entity recognition model includes: Obtain entity information in the power sector; Based on the entity information, construct the trie; Following the forward maximum matching principle, the first question is input into the trie to obtain the first entity of the first question.
3. The method according to claim 1, characterized in that, The step of inputting the first question and each of the multiple preset text expressions into a preset predicate recognition model to calculate multiple semantic similarities includes: The first question and each preset text expression are converted into word vectors to obtain a first word vector and a second word vector. The first word vector is the word vector of the first question, and the second word vector is the word vector of each preset text expression. A recurrent neural network is used to encode the first word vector and the second word vector to obtain the target output; The target output is encoded using a convolutional neural network to obtain a first vector for the first question and a second vector for each preset text expression form; Semantic similarity is calculated between the first vector and each of the second vectors to obtain multiple semantic similarities.
4. The method according to claim 1, characterized in that, The step of inputting the first question and each of the multiple preset text expressions into a preset predicate recognition model to calculate multiple semantic similarities includes: Obtain all triple information related to the entity in the first question from the knowledge graph; The first question and the triple information are input into the preset predicate recognition model to obtain character similarity. The triple information includes entity, candidate predicate and tail entity. The character similarity includes the character similarity between the first question and the candidate predicate and the character similarity between the first question and the tail entity. The character similarity is encoded using a recurrent neural network to obtain the second target output; Using a convolutional neural network, the output of the second target is encoded to obtain the third vector of the first question, the fourth vector of the candidate predicate, and the fifth vector of the tail entity; The semantic similarity of the third vector with the fourth vector and the fifth vector is calculated to obtain the first semantic similarity and the second semantic similarity. The first semantic similarity is the semantic similarity between the third vector and the fourth vector, and the second semantic similarity is the semantic similarity between the third vector and the fifth vector.
5. A knowledge graph-based power question-answering system, characterized in that, The system includes: A receiving module is configured to receive a first question from a first terminal, wherein the first question is an electricity problem; The module is used to input the first question into a preset entity recognition model to obtain the first entity of the first question; The calculation module is used to input the first question and each of the multiple preset text expressions into the preset predicate recognition model to calculate multiple semantic similarities; The first determining module is used to determine the predicate corresponding to the target text expression form as the first predicate of the first question, wherein the target text expression form is the preset text expression form among the plurality of preset text expression forms that has the highest semantic similarity value to the first question and is greater than a preset threshold; The second determining module is used to determine the target answer from the knowledge graph based on the first entity and the first predicate.
6. The knowledge graph-based power question-answering system according to claim 5, characterized in that, The obtained module includes: The acquisition submodule is used to acquire entity information in the power sector; A construction submodule is used to construct the trie based on the entity information; The input submodule is used to input the first question into the trie according to the forward maximum matching principle to obtain the first entity of the first question.
7. The knowledge graph-based power question-answering system according to claim 5, characterized in that, The computing module includes: The first submodule is used to convert the first question and each preset text expression form into word vectors to obtain a first word vector and a second word vector, wherein the first word vector is the word vector of the first question and the second word vector is the word vector of each preset text expression form; The second submodule is used to encode the first word vector and the second word vector using a recurrent neural network to obtain the target output; The third submodule is used to encode the target output using a convolutional neural network to obtain a first vector for the first question and a second vector for each preset text expression form. The fourth submodule is used to calculate the semantic similarity between the first vector and each of the second vectors to obtain multiple semantic similarities.
8. The knowledge graph-based power question-answering system according to claim 5, characterized in that, The computing module includes: The acquisition submodule is used to retrieve all triple information related to the entity in the first question from the knowledge graph; The fifth submodule is used to input the first question and the triple information into the preset predicate recognition model to obtain character similarity. The triple information includes entity, candidate predicate and tail entity. The character similarity includes the character similarity between the first question and the candidate predicate and the character similarity between the first question and the tail entity. The sixth submodule is used to encode the character similarity using a recurrent neural network to obtain the second target output; The seventh submodule is used to encode the second target output using a convolutional neural network to obtain the third vector of the first problem, the fourth vector of the candidate predicate, and the fifth vector of the tail entity. The eighth submodule is used to calculate the semantic similarity between the third vector and the fourth vector and the fifth vector respectively, to obtain a first semantic similarity and a second semantic similarity. The first semantic similarity is the semantic similarity between the third vector and the fourth vector, and the second semantic similarity is the semantic similarity between the third vector and the fifth vector.
9. An electronic device, comprising: A transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor; characterized in that the processor is configured to read the program in the memory to implement the steps of the method as described in any one of claims 1 to 4.
10. A readable storage medium for storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 4.