Power intelligent customer service response method and system based on knowledge base multi-condition constraint

By constructing a knowledge base-based multi-condition constraint strategy, the problem of inaccurate responses in generative intelligent question-answering systems in the power industry was solved, enabling the generation and dynamic updating of high-quality response content, and improving the accuracy and flexibility of responses.

CN117435709BActive Publication Date: 2026-06-05STATE GRID HUBEI MARKETING SERVICE CENT (MEASUREMENT CENT)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID HUBEI MARKETING SERVICE CENT (MEASUREMENT CENT)
Filing Date
2023-10-26
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing generative intelligent question answering systems struggle to provide high-quality, accurate responses in the power industry. Traditional database matching strategies lack flexibility, while generative models, lacking knowledge base constraints, result in inaccurate responses.

Method used

A knowledge base-based multi-condition constraint strategy is constructed, including a power customer service generative response model, a sample library, and a thesaurus. Response content is generated through an RNN Encoder-Decoder model, and a relevance index and a sensitive word library are introduced to formulate constraint strategies for questions and responses, ensuring the accuracy of the response content.

Benefits of technology

It improved the accuracy of responses from the power industry, filtered out responses irrelevant to the industry, effectively constrained and dynamically updated the content of responses, and improved the quality of responses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117435709B_ABST
    Figure CN117435709B_ABST
Patent Text Reader

Abstract

The application discloses a kind of power intelligent customer service response method and system based on knowledge base multi-condition constraint, the method includes: constructing power customer service generative response model and sample library, synonym library;Power customer service knowledge base is constructed based on sample library and synonym library;Formulating the constraint strategy of power customer service knowledge base from the angle of question content constraint and response content constraint respectively;Under the constraint strategy of power customer service knowledge base, response content is generated according to question content.The application introduces the concept of contact degree based on knowledge base on the basis of generative response model, and formulates the constraint strategy by the size relation between the numerical value of contact degree and experience threshold value, thereby effectively limits generative content, realizes the constraint of generative response content by industry data, can effectively shield the response content irrelevant to industry, improves the accuracy of response content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of natural language processing technology, specifically relating to a power intelligent customer service response method and system based on knowledge base and multi-condition constraints. Background Technology

[0002] Natural Language Processing (NLP) is an important field within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. A typical application of NLP is intelligent customer service. Traditional intelligent customer service typically employs a database or knowledge base matching strategy. This involves segmenting the input question and extracting keywords to find pre-defined matching answers in the database or knowledge base. For example, the intelligent response system for power information operation and maintenance publicly available on the public account CN108491378A, while effectively achieving accurate responses to questions, suffers from immutability and rigidity due to pre-set answers stored in the database. Furthermore, the need for a pre-defined database or knowledge base prevents responses to questions outside of that database.

[0003] With the development of artificial intelligence technologies, represented by deep learning, in recent years, generative response models have emerged, such as ChatGPT. However, while these generative response models abandon traditional search-based response methods and can highly simulate human responses, they also introduce some new problems. The most prominent is that due to the lack of "supervised constraints" from a knowledge base, some responses tend to be rather "arbitrary," making them unsuitable for direct use in industries with high requirements for response quality and precise expression. For example, invention patent CN 115080739A discloses a method for training a dialogue model and a method for outputting response information. It uses a discriminative network in the model to determine the latent vector of empathic intent corresponding to a sample dialogue, and then generates response information corresponding to the sample dialogue for model training. While it can learn human empathy to some extent, its response quality still needs improvement in fields with high requirements, such as power systems. Summary of the Invention

[0004] In view of this, the present invention proposes a power intelligent customer service response method and system based on knowledge base and multiple conditions, which is used to solve the problem that existing generative intelligent question answering systems cannot be directly applied to the power industry, which has high requirements for response quality and precise expression of needs.

[0005] In a first aspect, this invention discloses a power intelligent customer service response method based on multiple conditions and constraints of a knowledge base, the method comprising:

[0006] Construct a generative response model and sample library, as well as a thesaurus, for power customer service.

[0007] A power customer service knowledge base was built based on a sample library and a thesaurus.

[0008] Constraint strategies for the power customer service knowledge base were developed from the perspectives of question content constraints and response content constraints, respectively.

[0009] Under the constraints of the power customer service knowledge base, response content is generated based on the question.

[0010] Based on the above technical solutions, preferably, the power customer service generative response model is established based on the RNN Encoder-Decoder model.

[0011] Based on the above technical solutions, preferably, the construction of the power customer service knowledge base based on the sample library and the thesaurus specifically includes:

[0012] The sample database is divided into an answer sample database and a question-and-answer sample database; each sample in the question-and-answer sample database includes a question statement and an answer statement;

[0013] Each sample in the question-and-answer sample library is segmented into words, and keywords are extracted from the question and answer statements respectively.

[0014] Search and expand keywords in the thesaurus to obtain the question keyword sequence and the answer keyword sequence for each sample in the question-and-answer sample library.

[0015] Determine the question-and-answer relationship between keywords in the question keyword sequence and the answer keyword sequence, and set a correlation index between question keywords and different answer keywords;

[0016] A power customer service knowledge base is constructed based on question keywords, corresponding response keywords, and contact indexes.

[0017] Based on the above technical solutions, preferably, the step of determining the question-answer relationship between keywords in the question keyword sequence and the response keyword sequence, and setting the correlation index between question keywords and different response keywords, specifically includes:

[0018] The keywords corresponding to all questions in the statistical question-and-answer sample database will be recorded uniquely in the knowledge base;

[0019] In the entire sample, count the response keywords that match each question keyword. For each successful match, increment the correlation index between the response keyword and its corresponding question keyword by 1.

[0020] Repeat the above statistical process until every question keyword corresponds to one or more response keywords, and each response keyword and its corresponding question keyword have different correlation indicators.

[0021] Based on the above technical solutions, preferably, the constraint strategy of the power customer service knowledge base includes the following specific constraints on the question content:

[0022] Build a sensitive word constraint library, and match each word in the question content against the sensitive word constraint library. If a match is successful, terminate all subsequent steps and prompt the user to re-enter the question content.

[0023] Based on the above technical solutions, preferably, the constraint strategy of the power customer service knowledge base includes the following specific constraints on response content:

[0024] Keywords are extracted from both the question and answer content. A correlation index is then extracted between the question and answer keywords. All correlation indices are combined to determine whether the following two constraints are simultaneously satisfied:

[0025] ① The sum of the correlation index between each question keyword and each answer keyword is greater than the first preset threshold;

[0026] ② The maximum value of the connectivity index is greater than the second preset threshold;

[0027] If satisfied, then the response content constraint is met.

[0028] Based on the above technical solutions, preferably, after generating the response content based on the question content, the method further includes:

[0029] The question and answer content that conforms to the constraint policy of the power customer service knowledge base is compared with the content in the question and answer sample library. If there is no duplication, the question and answer content is added to the question and answer sample library.

[0030] In a second aspect, this invention discloses a power intelligent customer service response system based on knowledge base and multiple conditional constraints, the system comprising:

[0031] Power Customer Service Generative Response Model Construction Module: Used to build power customer service generative response models, sample libraries, and thesaurus;

[0032] Electricity Customer Service Knowledge Base Construction Module: Used to build an electricity customer service knowledge base based on a sample library and a thesaurus;

[0033] Knowledge base multi-condition constraint strategy formulation module: used to formulate constraint strategies for the power customer service knowledge base from the perspectives of question content constraints and response content constraints respectively;

[0034] Generative response module with multi-condition constraints in the knowledge base: used to generate response content based on the question content under the constraint strategy of the power customer service knowledge base;

[0035] The module for filtering and storing response content is used to compare the question and response content that conforms to the constraint strategy of the power customer service knowledge base with the content in the question and answer sample library. If there is no duplication, the question and response content is added to the question and answer sample library.

[0036] A third aspect of the present invention discloses an electronic device comprising: at least one processor, at least one memory, a communication interface, and a bus;

[0037] The processor, memory, and communication interface communicate with each other through the bus.

[0038] The memory stores program instructions that can be executed by the processor, which invokes the program instructions to implement the method as described in the first aspect of the present invention.

[0039] In a fourth aspect, the present invention discloses a computer-readable storage medium storing computer instructions that cause a computer to perform the method described in the first aspect of the present invention.

[0040] The present invention has the following advantages over the prior art:

[0041] 1) Based on the generative response model, this invention constructs a constraint strategy for the power customer service knowledge base, which realizes the constraint of industry data on the content of generative responses, effectively improving the accuracy of response content and filtering out response content that is irrelevant to the industry.

[0042] 2) In the construction of the knowledge base, this invention introduces the concept of a connectivity index, which reduces the dimensionality of the sentence connection between questions and answers to word connections, making subsequent data processing easier;

[0043] 3) In terms of constraint strategy, this invention introduces numerical constraints based on the degree of connection index, which effectively restricts the content of generative responses. For response content that does not meet the requirements, it is regenerated to improve the quality of the response.

[0044] 4) This invention enables dynamic updating of the sample library, avoiding duplicate entry of samples into the library. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a flowchart of the intelligent power customer service response method based on knowledge base and multiple conditions of the present invention.

[0047] Figure 2 This is a schematic diagram of the structure of the intelligent power customer service response system based on knowledge base and multiple conditions of the present invention. Detailed Implementation

[0048] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0049] Please see Figure 1 This invention proposes a power intelligent customer service response method based on multiple conditions and constraints of a knowledge base, the method comprising:

[0050] S1, the steps for constructing a generative response model for power customer service, which is used to build a generative response model for power customer service, a sample library, and a thesaurus.

[0051] S11. The sample library required to construct the generative response model for power customer service.

[0052] A sample library (corpus) is formed by screening Chinese dialogue samples. The sample library is divided into an answer sample library and a question-and-answer sample library. The answer sample library contains all the Chinese sentences of the answers, and one sentence is a sample of the answer sample library. Each sample in the question-and-answer sample library contains two Chinese sentences: one is the question sentence and the other is the corresponding answer sentence.

[0053] S12. Construct a generative response model for power customer service based on the RNN-based Encoder-Decoder model.

[0054] This invention uses deep learning frameworks, such as TensorFlow, to build an RNN-based Encoder-Decoder model to generate new text from input text.

[0055] S13. Construct a thesaurus.

[0056] To avoid the vanishing gradient problem in traditional Encoder-Decoder models with long input sentences, a thesaurus is built to reduce the length of the input sentences. For example, "How's the weather this afternoon?" can be transformed into "How's the weather?" using the thesaurus.

[0057] At this point, the generative response model, sample library, and thesaurus for power customer service have been completed.

[0058] S2, the steps for building an electricity customer service knowledge base, which is used to build an electricity customer service knowledge base based on a sample library and a thesaurus.

[0059] S21. Use the jieba word segmenter to segment each sample in the question-and-answer sample library.

[0060] S22. Extract keywords from the question and response statements respectively.

[0061] The specific process of step S22 is as follows:

[0062] First, the TF-IDF (Term Frequency–Inverse Document Frequency) algorithm is used to extract keywords from all words after word segmentation;

[0063] Then, perform part-of-speech analysis on the keywords. If the keywords are function words, such as adverbs, prepositions, conjunctions, auxiliary words, interjections, onomatopoeia, etc., then re-extract the keywords; if the keywords are content words, such as nouns, verbs, adjectives, quantifiers, pronouns, etc., then the keyword extraction is complete.

[0064] S23. Search and expand keywords in the thesaurus to obtain the question keyword sequence and response keyword sequence corresponding to each sample in the question-and-answer sample library.

[0065] Each keyword is searched in the thesaurus to expand the keyword list. Let a keyword be w1, then its expanded keywords are: w1, w2, ..., w N N represents the total number of synonym keywords.

[0066] Performing steps S21 to S23 on the question and answer statements of each sample in the question-and-answer sample database yields the extracted question keyword sequence for each sample: q i w1,q i w2,…,q i w N and response keyword sequence a i w1,a i w2,…,a i w N, i = 1, 2, ..., M, where M is the total number of samples in the question-and-answer sample library.

[0067] S24. Determine the question-and-answer relationship between keywords in the question keyword sequence and the answer keyword sequence, and set a correlation index between question keywords and different answer keywords.

[0068] Specifically, the question keywords corresponding to all samples in the statistical question-and-answer sample database will be recorded uniquely in the knowledge base;

[0069] In the entire sample, count the response keywords that match each question keyword. For each successful match, increment the correlation index between the response keyword and its corresponding question keyword by 1.

[0070] Repeat the above statistical process until all question / response keywords have been traversed, so that each question keyword corresponds to one or more response keywords, and each response keyword and its corresponding question keyword have different correlation indicators.

[0071] S25. Construct an electricity customer service knowledge base based on question keywords, corresponding response keywords, and contact indexes.

[0072] With this, the power customer service knowledge base has been completed.

[0073] In the construction of the knowledge base, this invention introduces the concept of a connectivity index, which reduces the dimensionality of the statement-level connection between "question" and "answer" to the word-level connection, facilitating subsequent data processing.

[0074] S3, the steps for formulating multi-condition constraint strategies for the knowledge base, are used to formulate constraint strategies for the power customer service knowledge base from the perspectives of question content constraints and response content constraints, respectively.

[0075] S31. Establish constraints on the content of questions.

[0076] Build a sensitive word constraint library, which contains common sensitive words such as confidential, violent, and pornographic words.

[0077] The system matches each word in the question content against a sensitive word constraint library. If a match is found, all subsequent steps are terminated and the user is prompted to re-enter the question content.

[0078] S32. Define constraints on response content.

[0079] After the question content is processed by the power customer service generative response model to obtain the response content, keywords are extracted from both the question content and the response content to obtain the extracted question keywords and response keywords corresponding to this question content.

[0080] Suppose that n keywords were extracted from the question and denoted as pq1, pq2, ..., pqn m keywords were extracted from the response content and denoted as pa1, pa2, ..., pa m The correlation index between question keywords and answer keywords is extracted from the power customer service knowledge base. The correlation between the nth question keyword and the mth answer keyword is denoted as cq. n a m Combine all connectivity indicators, calculate the sum of all connectivity scores, denoted as sc; calculate cq. n a m The maximum degree of connection is denoted as c. max .

[0081] Determine whether the following two constraints are satisfied simultaneously:

[0082] ① The sum of the correlation index (sc) between each question keyword and each answer keyword is greater than the first preset threshold;

[0083] ② The maximum value c in the connectivity index max Greater than the second preset threshold;

[0084] If both ① and ② are satisfied, it means that the response content generated by the power customer service generative response model meets the response content constraints, and the response content is output. Otherwise, the response content is regenerated and it is determined whether it meets the response content constraints.

[0085] The first preset threshold and the second preset threshold are both empirical thresholds. In specific implementation, the first preset threshold can be set to 15 and the second preset threshold can be set to 3.

[0086] This invention, based on the generative response model, introduces the concept of relevance degree using a knowledge base. By formulating a constraint strategy based on the relationship between the value of the relevance degree and an empirical threshold, it effectively restricts generative content, enabling industry data to constrain generative response content. This can effectively improve the accuracy of response content and filter out response content irrelevant to the industry.

[0087] S4, the generative response step with multi-condition constraints in the knowledge base, is used to generate response content based on the question content under the constraint strategy of the power customer service knowledge base.

[0088] S41. Perform data preprocessing on the question content to remove redundant words.

[0089] Specifically, the system checks for reduplicated words in the question statement; if any are found, the redundant reduplicated words are removed, and a new question statement is generated.

[0090] A library of application-independent adjectives is constructed to detect whether there are application-irrelevant adjectives in the query statements, and if so, they are removed. For example, "beautiful" and "handsome" are adjectives that are not related to the power customer service application; while "fast" and "convenient" are defined as application-related adjectives.

[0091] S42. Using the power customer service generative response model constructed in step S1, generate response content based on the question content.

[0092] S43. For the generated response content, apply the constraint strategy of step S3 to optimize and update the response content.

[0093] S44. If the response content is generated repeatedly 3 times and fails to meet the constraint policy of step S3, then terminate the response and notify the user that "inaccurate response is not possible".

[0094] S5, the step of screening and storing response content, is used to compare the question and response content that conforms to the constraint strategy of the power customer service knowledge base with the content in the question and answer sample library. If there is no duplication, the question and response content is added to the question and answer sample library.

[0095] S51. After step S4, if the result is "unable to respond accurately", it means that the data cannot be entered into the database, and the subsequent database entry steps are terminated; otherwise, continue.

[0096] S52. Extract keywords from the response content generated in step S4 and the corresponding question content.

[0097] S53. Compare the keyword sequence extracted from the question with the keyword content in the question-and-answer sample library. If there is a completely identical question (i.e., all the question keywords are the same), then continue to compare whether the answer content is in the answer sample library. If both are in the sample library, then do not add them to the library.

[0098] S54. Excluding the cases of samples not being entered into the database as described in steps S51 and S53 above, enter the question content and its corresponding response content into the database for all other cases.

[0099] This completes the process of adding new samples to the database, enabling dynamic updates to the original sample database.

[0100] Corresponding to the above method embodiments, this invention also proposes a power intelligent customer service response system based on knowledge base multi-condition constraints. Please refer to [link / reference]. Figure 2 The system includes:

[0101] Power Customer Service Generative Response Model Construction Module 10: Used to construct power customer service generative response models, sample libraries, and thesaurus;

[0102] Electricity Customer Service Knowledge Base Construction Module 20: Used to build an electricity customer service knowledge base based on a sample library and a thesaurus;

[0103] Knowledge Base Multi-Condition Constraint Strategy Formulation Module 30: Used to formulate constraint strategies for the power customer service knowledge base from the perspectives of question content constraints and response content constraints respectively;

[0104] Generative response module 40 with multi-condition constraints in the knowledge base: used to generate response content based on the question content under the constraint strategy of the power customer service knowledge base;

[0105] The response content filtering and storage module 50 is used to compare the question and response content that conforms to the constraint strategy of the power customer service knowledge base with the content in the question and answer sample library. If there is no duplication, the question and response content is added to the question and answer sample library.

[0106] The above system embodiments and method embodiments are one-to-one correspondences. For a brief description of the system embodiments, please refer to the method embodiments.

[0107] The present invention also discloses an electronic device, comprising: at least one processor, at least one memory, a communication interface, and a bus; wherein the processor, memory, and communication interface communicate with each other through the bus; the memory stores program instructions executable by the processor, and the processor calls the program instructions to implement the aforementioned method of the present invention.

[0108] The present invention also discloses a computer-readable storage medium that stores computer instructions, which cause the computer to implement all or part of the steps of the method described in the embodiments of the present invention. The storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0109] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, meaning they can be distributed across multiple network units. Those skilled in the art can select some or all of the modules to achieve the purpose of this embodiment without any inventive effort, based on actual needs.

[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A power intelligent customer service response method based on knowledge base and multiple conditional constraints, characterized in that, The method includes: Construct a generative response model and sample library, as well as a thesaurus, for power customer service. A power customer service knowledge base was built based on a sample library and a thesaurus. Constraint strategies for the power customer service knowledge base were developed from the perspectives of question content constraints and response content constraints, respectively. Under the constraints of the power customer service knowledge base, the response content is generated based on the question content; The construction of the power customer service knowledge base based on the sample library and the thesaurus specifically includes: The sample database is divided into an answer sample database and a question-and-answer sample database; each sample in the question-and-answer sample database includes a question statement and an answer statement; Each sample in the question-and-answer sample library is segmented into words, and keywords are extracted from the question and answer statements respectively. Search and expand keywords in the thesaurus to obtain the question keyword sequence and the answer keyword sequence for each sample in the question-and-answer sample library. Determine the question-and-answer relationship between keywords in the question keyword sequence and the answer keyword sequence, and set a correlation index between question keywords and different answer keywords; A power customer service knowledge base is constructed based on question keywords, corresponding response keywords, and contact indexes. The process of determining the question-and-answer relationship between keywords in the question keyword sequence and the answer keyword sequence, and setting a correlation index between question keywords and different answer keywords, specifically includes: The keywords corresponding to all questions in the statistical question-and-answer sample database will be recorded uniquely in the knowledge base; In the entire sample, count the response keywords that match each question keyword. For each successful match, increment the correlation index between the response keyword and its corresponding question keyword by 1. Repeat the above statistical process until every question keyword corresponds to one or more answer keywords, and each answer keyword and its corresponding question keyword have different correlation indicators; The constraint strategy of the power customer service knowledge base includes the following specific constraints on the question content: Build a sensitive word constraint library, match each word in the question content against the sensitive word constraint library, and if a match is successful, terminate all subsequent steps and prompt the user to re-enter the question content; The constraint strategy of the power customer service knowledge base includes the following specific constraints on response content: Keywords are extracted from both the question and answer content. A correlation index is then extracted between the question and answer keywords. All correlation indices are combined to determine whether the following two constraints are simultaneously satisfied: ① The sum of the correlation index between each question keyword and each answer keyword is greater than the first preset threshold; ② The maximum value of the connectivity index is greater than the second preset threshold; If satisfied, then the response content constraint is met.

2. The intelligent power customer service response method based on knowledge base and multiple conditions as described in claim 1, characterized in that, The generative response model for electricity customer service is based on the Encoder-Decoder model of RNN.

3. The intelligent power customer service response method based on knowledge base and multiple conditions as described in claim 1, characterized in that, After generating the response content based on the question content, the process also includes: The question and answer content that conforms to the constraint policy of the power customer service knowledge base is compared with the content in the question and answer sample library. If there is no duplication, the question and answer content is added to the question and answer sample library.

4. A power intelligent customer service response system based on knowledge base and multiple conditional constraints, characterized in that, The system includes: Power Customer Service Generative Response Model Construction Module: Used to build power customer service generative response models, sample libraries, and thesaurus; Electricity Customer Service Knowledge Base Construction Module: Used to build an electricity customer service knowledge base based on a sample library and a thesaurus; Knowledge Base Multi-Constraint Strategy Formulation Module: Used to formulate constraint strategies for the power customer service knowledge base from the perspectives of question content constraints and response content constraints respectively; Generative response module with multi-condition constraints in the knowledge base: used to generate response content based on the question content under the constraint strategy of the power customer service knowledge base; The module for filtering and storing response content is used to compare the question and response content that conforms to the constraint strategy of the power customer service knowledge base with the content in the question and answer sample library. If there is no duplication, the question and response content is added to the question and answer sample library. The construction of the power customer service knowledge base based on the sample library and the thesaurus specifically includes: The sample database is divided into an answer sample database and a question-and-answer sample database; each sample in the question-and-answer sample database includes a question statement and an answer statement; Each sample in the question-and-answer sample library is segmented into words, and keywords are extracted from the question and answer statements respectively. Search and expand keywords in the thesaurus to obtain the question keyword sequence and the answer keyword sequence for each sample in the question-and-answer sample library. Determine the question-and-answer relationship between keywords in the question keyword sequence and the answer keyword sequence, and set a correlation index between question keywords and different answer keywords; A power customer service knowledge base is constructed based on question keywords, corresponding response keywords, and contact indexes. The process of determining the question-and-answer relationship between keywords in the question keyword sequence and the answer keyword sequence, and setting a correlation index between question keywords and different answer keywords, specifically includes: The keywords corresponding to all questions in the statistical question-and-answer sample database will be recorded uniquely in the knowledge base; In the entire sample, count the response keywords that match each question keyword. For each successful match, increment the correlation index between the response keyword and its corresponding question keyword by 1. Repeat the above statistical process until every question keyword corresponds to one or more answer keywords, and each answer keyword and its corresponding question keyword have different correlation indicators; The constraint strategy of the power customer service knowledge base includes the following specific constraints on the question content: Build a sensitive word constraint library, match each word in the question content against the sensitive word constraint library, and if a match is successful, terminate all subsequent steps and prompt the user to re-enter the question content; The constraint strategy of the power customer service knowledge base includes the following specific constraints on response content: Keywords are extracted from both the question and answer content. A correlation index is then extracted between the question and answer keywords. All correlation indices are combined to determine whether the following two constraints are simultaneously satisfied: ① The sum of the correlation index between each question keyword and each answer keyword is greater than the first preset threshold; ② The maximum value of the connectivity index is greater than the second preset threshold; If satisfied, then the response content constraint is met.

5. An electronic device, characterized in that, include: At least one processor, at least one memory, a communication interface, and a bus; The processor, memory, and communication interface communicate with each other through the bus. The memory stores program instructions that can be executed by the processor, and the processor invokes the program instructions to implement the method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause the computer to perform the method as described in any one of claims 1 to 3.