Knowledge base generation method, nonvolatile readable storage medium and electronic equipment

By using preset language models to process session content and cluster, the intelligent customer service knowledge base is automatically generated, which solves the problem of low efficiency in the construction and maintenance of knowledge bases in the existing technology, and improves the efficiency and accuracy of the knowledge base generation.

CN119514538APending Publication Date: 2025-02-25GUANGZHOU SHIRONG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311045435.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-17
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing technology is less efficient when building and maintaining an intelligent customer service knowledge base, and requires a large amount of human resources to collect, organize, update and optimize information.

Method used

By obtaining the session set, using the preset language model to process the session content, extract core problems, resolution steps and keywords, and cluster the session content based on these keywords to determine representative session content to generate a knowledge base.

Benefits of technology

The core problems and solutions of automatically extracting and parsing session content are realized, reducing the process of manual participation and improving the efficiency and accuracy of the knowledge base generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514538A_ABST
    Figure CN119514538A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing, and discloses a knowledge base generation method, a nonvolatile readable storage medium and electronic equipment. The method comprises the steps of obtaining a session set which comprises a plurality of session contents, processing the session contents based on a preset language model to obtain core problems corresponding to the session contents, solving steps corresponding to the core problems and keywords, performing clustering processing on the session contents according to the keywords of the core problems to obtain at least one clustering cluster, the session content used for representing the clustering cluster is determined as target session content according to the clustering cluster, the core problem of the target session content is the problem description, and the knowledge base is generated according to the problem description and the solving steps of the target session content. Manual participation in knowledge base generation and construction is reduced, and the knowledge base generation efficiency, accuracy and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of natural language processing, and in particular to a knowledge base generation method, a non-volatile readable storage medium, and an electronic device. Background Art

[0002] In the intelligent customer service scenario, the robot's response ability is closely related to the quality and size of the background knowledge base. The knowledge base usually organizes information in the form of FAQ (Frequently-Asked Questions) to better meet customer needs and solve customer problems. However, building a comprehensive and high-quality knowledge base requires a lot of human resources, because the establishment, maintenance and update of the knowledge base all require a professional team to complete.

[0003] First, in the initial stage, in order to build a knowledge base, the team needs to collect and organize relevant questions and their answers, including collecting common questions from customer consultation, user feedback, business departments, product managers, etc., and classifying these questions to form a logical and complete knowledge system. In addition, the team also needs to continuously update the knowledge base to adapt to changes in the industry and market and ensure the accuracy and timeliness of the information.

[0004] Secondly, in the process of building a knowledge base, diversity needs to be taken into account, that is, similar questions may be asked in different ways. In order to ensure that the robot can better understand and accurately answer customer questions, the team needs to build similar questions for each question, covering various possible forms of questions. This also requires a lot of manpower to complete, because each question may have multiple variants, and these variants may differ due to cultural, regional and language differences.

[0005] In addition, in order to improve the accuracy of the robot's answers, the team also needs to continuously optimize and improve the knowledge base, including analyzing users' question records, identifying deficiencies in the knowledge base, and promptly correcting or supplementing relevant content. This means that the knowledge base maintenance team needs to conduct regular assessments to ensure high-quality operation of the knowledge base. Summary of the invention

[0006] One purpose of the embodiments of the present disclosure is to provide a knowledge base generation method, a non-volatile readable storage medium and an electronic device, aiming to solve the technical problem of low efficiency in constructing a knowledge base in related technologies.

[0007] In a first aspect, an embodiment of the present disclosure provides a knowledge base generation method, comprising:

[0008] Acquire a session set, where the session set includes multiple session contents;

[0009] Processing the conversation content based on a preset language model to obtain core issues corresponding to the conversation content, and solution steps and keywords corresponding to the core issues;

[0010] Clustering the conversation contents according to the keywords of the core questions to obtain at least one cluster;

[0011] Determining, according to the clustering cluster, a conversation content used to represent the clustering cluster as a target conversation content, wherein a core question of the target conversation content is a question description;

[0012] A knowledge base is generated based on the problem descriptions and solution steps of the plurality of target conversation contents.

[0013] Optionally, the processing of the conversation content based on a preset language model to obtain a core problem corresponding to the conversation content and a solution step corresponding to the core problem includes:

[0014] Get customized demand content;

[0015] Encapsulating the demand content and the conversation content into a first model prompt instruction;

[0016] The first model prompt instruction is sent to the preset language model, so that the preset language model outputs a core question corresponding to the conversation content and a solution step corresponding to the core question according to the first model prompt instruction.

[0017] Optionally, the processing the conversation content based on a preset language model to obtain keywords corresponding to the conversation content includes:

[0018] Encapsulating the core questions corresponding to the conversation content into a second model prompt instruction;

[0019] The second model prompt instruction is sent to the preset language model, so that the preset language model outputs keywords corresponding to the conversation content according to the second model prompt instruction.

[0020] Optionally, clustering is performed on the conversation contents according to the keywords of the core questions to obtain at least one cluster including:

[0021] Generate a sentence vector based on the keywords of the core question;

[0022] The sentence vectors of each of the conversation contents are clustered according to a preset clustering algorithm to obtain at least one cluster, wherein the cluster includes a plurality of sentence vectors satisfying a clustering condition, and the sentence vectors are used to represent the corresponding conversation content.

[0023] Optionally, the core question corresponds to at least two keywords, and generating a sentence vector according to the keywords of the core question includes:

[0024] combining at least two keywords of the conversation content into a sentence;

[0025] According to a preset vector representation algorithm, the sentence is represented into a sentence vector.

[0026] Optionally, the cluster includes a plurality of sentence vectors satisfying a clustering condition, and determining, according to the cluster, a conversation content representing the cluster as the target conversation content includes:

[0027] Determining a sentence vector located at the center of the cluster as a center vector among the multiple sentence vectors of the cluster;

[0028] The conversation content corresponding to the central vector is determined as the target conversation content.

[0029] Optionally, the cluster includes a plurality of conversation contents satisfying a clustering condition, and determining, according to the cluster, a conversation content representing the cluster as a target conversation content includes:

[0030] Encapsulating the steps of solving the multiple conversation contents of the cluster into a third model prompt instruction;

[0031] Sending the third model prompt instruction to the preset language model, so that the preset language model outputs a target solution step according to the third model prompt instruction;

[0032] Determine the conversation content corresponding to the target solution step as the target conversation content.

[0033] Optionally, obtaining a session set includes:

[0034] Get multiple session contents;

[0035] Pre-classify the plurality of conversation contents to obtain at least one conversation set, wherein the conversation set includes at least one conversation content belonging to the same category.

[0036] In a second aspect, an embodiment of the present disclosure provides a non-volatile readable storage medium, wherein the non-volatile readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable an electronic device to execute the above-mentioned knowledge base generation method.

[0037] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:

[0038] at least one processor; and,

[0039] a memory communicatively connected to the at least one processor; wherein,

[0040] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor so that the at least one processor can perform the above-mentioned knowledge base generation method.

[0041] In the knowledge base generation method provided in the embodiment of the present disclosure, a conversation set is obtained, the conversation set includes multiple conversation contents, the conversation contents are processed based on a preset language model, the core issues corresponding to the conversation contents, the solution steps and keywords corresponding to the core issues are obtained, each conversation content is clustered according to the keywords of each core issue, and at least one cluster is obtained, and the conversation content used to represent the cluster is determined as the target conversation content according to the cluster, wherein the core issue of the target conversation content is the problem description, and the knowledge base is generated according to the problem descriptions and solution steps of multiple target conversation contents. Therefore, the present embodiment can automatically obtain multiple conversation contents of the conversation set, automatically extract and parse the core issues, solution steps and keywords of each conversation content, automatically determine the target conversation content used to represent each cluster, and automatically use the problem description and solution steps of the target conversation content as the problem description and solution steps of FAQ, so that a knowledge base in the form of FAQ can be obtained, reducing manual participation in the generation and construction of the FAQ knowledge base, reducing the probability of inappropriate problem descriptions or solution steps caused by human subjective factors, and helping to improve the accuracy and reliability of the knowledge base. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0043] Figure 1 A schematic diagram of a process for generating a knowledge base provided in an embodiment of the present disclosure;

[0044] Figure 2 A schematic diagram of constructing a model prompt instruction provided in an embodiment of the present disclosure and inputting the model prompt instruction into a GPT3.5 model;

[0045] Figure 3 A schematic diagram of the structure of a knowledge base generating device provided in an embodiment of the present disclosure;

[0046] Figure 4 A schematic diagram of a circuit structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not intended to limit the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0048] It should be noted that, if there is no conflict, the various features in the embodiments of the present disclosure can be combined with each other, all within the scope of protection of the present disclosure. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in the present disclosure do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0049] In addition to the method of building a FAQ knowledge base provided by the background technology, the author of the disclosure also found the following related technologies in the process of implementing the present disclosure, which are as follows:

[0050] (1) Agents record frequently asked questions in their daily work and then organize the recorded frequently asked questions into a FAQ knowledge base. This method relies on the professional knowledge and practical work experience of the customer service team. Agents can find out the most frequently asked questions by customers through actual customer consultation records and internal communication, and organize these questions into a FAQ knowledge base. The problem with this method is that there is a certain degree of duplication in the question records of different agents, so further sorting and classification work is required later.

[0051] (2) Expert system and knowledge engineering: With the help of expert system and knowledge engineering methods, the expert knowledge and experience in related fields are sorted out and summarized to build a complete and structured knowledge system, and this knowledge is converted into a FAQ knowledge base. This method relies on the participation of experts in the field, is relatively cumbersome in the production process, and requires more manpower and time.

[0052] (3) Community collaboration and crowdsourcing: By encouraging users and community members to participate in the creation and maintenance of the FAQ knowledge base, crowdsourcing is used to build and improve the FAQ knowledge base. This method has certain instability issues in information quality and participant level, and requires subsequent review and screening.

[0053] (4) Gradual learning and optimization: During the operation of the intelligent customer service system, customers’ comments, feedback, and new consultation records are regularly collected to continuously update and improve the FAQ knowledge base. This method requires a certain amount of manpower and financial resources to regularly maintain and update the FAQ.

[0054] The knowledge base generation method provided in this embodiment can automatically extract FAQs from a large amount of conversation content to generate an FAQ knowledge base, reduce manpower input and dependence, improve the generation efficiency of the FAQ knowledge base and reduce maintenance costs.

[0055] Based on this, see Figure 1 This embodiment provides a knowledge base generation method. Figure 1 As shown, the knowledge base generation method includes the following steps:

[0056] S11: Acquire a session set, where the session set includes multiple session contents.

[0057] In this step, the conversation content is multiple questions and answers in which the agent helps the customer solve a complete problem. For example, the conversation content can be as follows:

[0058] Agent: Hello, I am customer service 8051. I am happy to serve you.

[0059] Customer: It won’t turn on.

[0060] Agent: Could you please record the video for me to see?

[0061] Client: https: / / ******.

[0062] Operator: Hello! Please wait a moment. We are checking the link you provided.

[0063] Agent: Have you tried changing the socket?

[0064] Customer: I can plug anything else into this socket.

[0065] Customer: Let me try.

[0066] Seat: Great! Thank you for your hard work.

[0067] It is understandable that this embodiment can record each conversation content in a table format.

[0068] Multiple conversation contents can form a conversation set, where the expression of the conversation set is M = {f 1 ,f 2 ,f 3 ,...,f i ,...f n}, f i is the content of the ith session.

[0069] In some embodiments, obtaining a conversation set includes the following steps: obtaining multiple conversation contents, performing pre-classification processing on the multiple conversation contents to obtain at least one conversation set, wherein the conversation set includes at least one conversation content belonging to the same category.

[0070] Multiple conversation contents under a conversation set belong to the same category, that is, the multiple conversation contents in each conversation set are facing the same object. The problem description and solution steps (i.e., generating FAQ) generated according to the conversation set will be more targeted and accurate.

[0071] The representation of the object can be customized by the designer. For example, if the object is a product, this embodiment aggregates multiple conversation contents associated with the reading machine to obtain a conversation set of the reading machine. For example, if the object is the fault state of the reading machine, this embodiment aggregates multiple conversation contents associated with the fault state of the reading machine to obtain a conversation set of the fault state of the reading machine. For example, if the object is the dark screen state of the reading machine screen, this embodiment aggregates multiple conversation contents associated with the dark screen state of the reading machine screen to obtain a conversation set of the dark screen state of the reading machine screen.

[0072] In some embodiments, before pre-classifying the plurality of conversation contents, the knowledge base generation method further includes: extracting partial contents satisfying the substantive conditions from each conversation content to obtain partial conversation contents. Then: pre-classifying the plurality of conversation contents to obtain at least one conversation set includes: pre-classifying the plurality of partial conversation contents to obtain at least one conversation set.

[0073] Extracting partial content satisfying the substantive condition from each conversation content to obtain partial conversation content includes: filtering partial content not satisfying the substantive condition from each conversation content according to a preset truncation algorithm to obtain partial conversation content.

[0074] In some embodiments, the preset truncation algorithm includes a fixed sentence number truncation algorithm, and according to the preset truncation algorithm, some content that does not meet the substantive conditions is filtered out in each conversation content, and obtaining partial conversation content includes: according to the fixed sentence number truncation algorithm, a specified number of sentences are removed from the first sentence of the conversation content to obtain partial conversation content.

[0075] In some embodiments, the preset truncation algorithm includes a keyword recognition algorithm. According to the preset truncation algorithm, partial content that does not meet the substantive conditions is filtered out in each conversation content, and obtaining partial conversation content includes: determining multiple target phrases for each conversation content according to the keyword recognition algorithm, traversing the conversation content in sentence order to eliminate sentences before the first target phrase, and obtaining partial conversation content.

[0076] In some embodiments, the preset truncation algorithm includes a keyword recognition algorithm, and according to the preset truncation algorithm, partial content that does not meet the substantive conditions is filtered out in each conversation content, and obtaining partial conversation content includes: determining the intent of each conversation content according to the intent recognition algorithm, eliminating sentences that do not match the intent, and obtaining partial conversation content.

[0077] Ordinary conversations between customers and agents usually contain a lot of content that is not related to question answering, such as small talk, opening remarks, closing remarks, etc. This embodiment can filter out the part of each conversation content that does not meet the substantive conditions before generating a conversation set, so as to retain the truly valuable question and answer parts. The conversation content forming the conversation set can be more concise and have substantive content, avoiding interference from other noise content, which is conducive to generating a more accurate and reliable knowledge base.

[0078] In some embodiments, the knowledge base generation method further includes: desensitizing each session content of the session set according to a preset desensitization algorithm. The preset desensitization algorithm includes a regular expression matching algorithm or an entity recognition algorithm. This embodiment can delete or replace personal information associated with customer privacy contained in the session content, which is conducive to protecting the privacy of the customer and improving the security and non-disclosure of the knowledge base.

[0079] In some embodiments, the knowledge base generation method further includes: detecting whether each session content of the session set contains a multimedia file, if so, preprocessing the multimedia file to obtain multimedia information, and if not, continuing to detect whether another session content contains a multimedia file. The multimedia file may be in a picture format, a voice format, or a video format.

[0080] In some embodiments, preprocessing the multimedia file to obtain the multimedia information includes: if the format of the multimedia file is a picture format or a video format, generating text according to the multimedia file, and the file is multimedia information.

[0081] In some embodiments, generating text according to a multimedia file includes: if the format of the multimedia file is a picture format, recognizing the multimedia file according to an OCR recognition algorithm to obtain the text.

[0082] In some embodiments, generating text based on a multimedia file includes: inputting the multimedia file into a preset AI model, so that the preset AI model parses the media file to obtain the text.

[0083] In some embodiments, preprocessing the multimedia file to obtain multimedia information includes: if the format of the multimedia file is a voice format, converting the multimedia file into text according to a preset voice recognition algorithm, and the file is multimedia information.

[0084] In some embodiments, preprocessing the multimedia file to obtain multimedia information also includes: uploading the multimedia file to a preset file server so that the file server returns an access link to the multimedia file, and adding the access link to the position corresponding to the multimedia file in the session content.

[0085] In general, when the conversation content contains multimedia files, that is, the conversation content contains multimedia files as noise, the present embodiment can convert the multimedia files and match the multimedia files with corresponding texts, thereby enriching the content of each conversation, which is conducive to the subsequent preset language model to more effectively understand the meaning of the conversation content, and is also conducive to obtaining a more accurate and reliable knowledge base.

[0086] S12: Process the conversation content based on a preset language model to obtain core issues corresponding to the conversation content, and solution steps and keywords corresponding to the core issues.

[0087] In this step, the preset language model may be a large language model (LLM), which includes a chatGPT model, a GPT-3 model, or BERT, etc.

[0088] The core question is the main problem that the customer raises or needs to solve in the conversation content. For example, the core question of conversation content f1 is: Why can't my reading machine read this set of books? The core question of conversation content f2 is: Why does my reading machine have a dark screen? The core question of conversation content f3 is: Why can't my reading machine automatically turn pages?

[0089] The solution step is a solution for solving the core problem. For example, when the core problem of the conversation content f1 is: Why can't my reading machine read this set of books? The solution step can be any of the following:

[0090] Solution steps 1. Take a picture of the system setup device.

[0091] Solution 2: The agent found that the book could not be identified.

[0092] Solution step 3. Provide a link for customers to view.

[0093] Solution step 4. It is recommended to use Smart Xiaoxi for consultation.

[0094] It is understandable that a core problem may correspond to one or more than two solution steps.

[0095] Keywords are phrases used to describe the main meaning of the core question. For example, when the core question of the conversation content f1 is: Why can't my reading machine read this set of books? The two keywords are reading machine and reading. It can be understood that the number of keywords corresponding to the core question can be 1 or more than 2.

[0096] In some embodiments, the conversation content is processed based on a preset language model to obtain the core issues corresponding to the conversation content and the solution steps corresponding to the core issues, including the following steps: obtaining customized demand content, encapsulating the demand content and the conversation content into a first model prompt instruction, and sending the first model prompt instruction to the preset language model, so that the preset language model outputs the core issues corresponding to the conversation content and the solution steps corresponding to the core issues according to the first model prompt instruction.

[0097] The requirement content is used to represent the designer's various requirements for the preset language model to process the conversation content. In the requirement content, the requirement content declares what the preset language model needs to do, the format of the output content, and the corpus provided for the preset language model (that is, the corpus is the conversation content). The requirement content declares that what the preset language model needs to do includes: extracting a core question raised by the customer in the conversation content, extracting a preset number of important original words answered by the agent to answer the customer's core question, and extracting links in the agent's reply, where the preset number is 10, 5, 4, etc. The format of the output content includes the output format of the core question, the output format of the preset number of important original words to answer the customer's core question, and the output format of the link extracted from the agent's reply.

[0098] The model prompt command is a prompt command of the preset language model. Prompt is a prompt word for the AI ​​model. It is a method of using natural language to guide or inspire the AI ​​model to complete a specific task. The prompt command can prompt the AI ​​model with the context of the input information and the parameter information of the input model. When training a supervised learning or unsupervised learning model, the prompt command can help the AI ​​model better understand the intent of the input and respond accordingly.

[0099] The structure of the first model prompt instruction is as follows:

[0100] {Customized requirements content

[0101] Conversation content

[0102] }

[0103] Specifically, in some embodiments, the structure of the first model prompt instruction is as follows:

[0104] {Based on the conversation between the given customer and the agent, extract a core question of the customer. The output format is: <core question: xxxx>;

[0105] Extract the important original words of the agent (no more than 10) to answer the user's core questions and output them in the form of a list;

[0106] Extract the links in the agent's reply and output them in a list;

[0107] The following is the conversation between the customer and the agent: XXXX

[0108] }

[0109] This embodiment utilizes the characteristic that the preset language model is good at summarizing the text. By constructing a first model prompt instruction and sending the first model prompt instruction to the preset language model, the preset language model can obtain the core problem corresponding to the conversation content and the solution steps corresponding to the core problem. This process does not need to rely on manual work to refine the core problem or find the solution steps, and reduces the problem of inconsistency in refining the core problem or finding the solution due to different knowledge backgrounds. That is, it is conducive to improving consistency and can also improve the efficiency of finding the core problem and the solution steps.

[0110] In some embodiments, the customized requirement content includes an access link, so that the first model prompt instruction will also be encapsulated with an access link, and the solution steps output by the preset language model can also include an access link. Therefore, the solution steps can not only be text, but also an access link. This can improve the modal diversity of the solution steps, which is conducive to enriching the diversity of the solution steps of the knowledge base, and subsequently providing users with more ways to provide solution steps to answer problems.

[0111] In some embodiments, the conversation content is processed based on a preset language model to obtain keywords corresponding to the conversation content, including: encapsulating the core questions corresponding to the conversation content into a second model prompt instruction, and sending the second model prompt instruction to the preset language model, so that the preset language model outputs the keywords corresponding to the conversation content according to the second model prompt instruction.

[0112] In some embodiments, the structure of the second model prompt instruction is as follows:

[0113] {XXXXX} This sentence is the core demand of the user. Extracting the two most important keywords from it can express the meaning of the original sentence.

[0114] }

[0115] As mentioned above, this embodiment utilizes the characteristic that the preset language model is good at summarizing the text. By constructing a second model prompt instruction and sending the second model prompt instruction to the preset language model, the preset language model can obtain the keywords corresponding to the core question, which is conducive to improving efficiency.

[0116] See also Figure 2 The preset language model is the GPT3.5 model. This embodiment encapsulates the customized demand content 21 and the conversation content 22 into a first model prompt instruction 23, sends the first model prompt instruction 23 to the GPT3.5 model 24, and the GPT3.5 model 24 outputs the core question 25 corresponding to the conversation content 22 and multiple solution steps 26 corresponding to the core question 25.

[0117] Next, this embodiment encapsulates the core question 25 into a second model prompt instruction 27, sends the second model prompt instruction 27 to the GPT3.5 model 24, and the GPT3.5 model 24 outputs keywords 28 according to the second model prompt instruction.

[0118] S13: Clustering the conversation contents according to the keywords of each core question to obtain at least one cluster.

[0119] In this step, in some embodiments, the cluster is a set of multiple sentence vectors that meet the clustering condition, and the sentence vector is generated by the keywords of the core question. In some embodiments, the cluster is a set of multiple conversation contents that meet the clustering condition.

[0120] In some embodiments, clustering the conversation contents according to the keywords of each core question to obtain at least one cluster includes the following steps: generating sentence vectors according to the keywords of the core question, clustering the sentence vectors of each conversation content according to a preset clustering algorithm to obtain at least one cluster, the cluster including multiple sentence vectors that meet the clustering conditions, and the sentence vectors are used to represent the corresponding conversation content.

[0121] The core question corresponds to at least two keywords, and generating a sentence vector based on the keywords of the core question includes: combining at least two keywords of the conversation content into a sentence, and representing the sentence into a sentence vector based on a preset vector representation algorithm. The preset vector representation algorithm includes a Word2Vec algorithm or a BERT algorithm.

[0122] In this embodiment, the keywords of the core questions are vectorized. Since the keywords can reflect the core questions and the core questions can reflect the main meaning of the conversation content, the sentence vector can quantitatively represent the corresponding conversation content.

[0123] The preset clustering algorithms include K-means algorithm, DBSCAN algorithm or hierarchical clustering algorithm, etc. This embodiment clusters multiple similar conversation contents through clustering processing, which is conducive to finding more accurate and reliable core issues and solutions. At the same time, it also avoids the situation where the corresponding core issues and solutions are configured separately for each conversation content when the conversation content is similar, resulting in duplication of core issues or solutions, that is, it is conducive to achieving a more concise and accurate match between conversation content, core issues and solutions.

[0124] S14: Determine, according to the clustering clusters, the conversation content used to represent the clustering cluster as the target conversation content, wherein the core question of the target conversation content is the question description.

[0125] In this step, when there are multiple clusters, the number of target conversation contents is also multiple. For example, the expression of the conversation set is M = {f 1 ,f 2 ,f 3 ,...,f i ,...f n}, after clustering processing, three clusters are obtained, among which cluster Ω 1 ={k 1 ,k 2 ,k 3 ,k 4 ,k 5}, cluster Ω 2 ={k 6 ,k 7 ,k 8 ,k 9 ,k 10}, cluster Ω 3 ={k 11 ,k 12 ,k 13 ,k 14 ,k 15}, where k i is the sentence vector of the i-th conversation content, that is, the sentence vector k i Used to characterize the content of the conversation i .

[0126] Conversation content 2 Can represent cluster Ω 1 , so the session content f 2 is the cluster Ω 1 The target session content. Session content f 8 Can represent cluster Ω 2 , so the session content f 8 is the cluster Ω 2 The target session content. Session content f 14Can represent cluster Ω 3 , so the session content f 14 is the cluster Ω 3 The target session content.

[0127] In some embodiments, the cluster includes multiple sentence vectors that meet the clustering conditions, and determining the conversation content used to represent the cluster as the target conversation content based on the cluster includes the following steps: determining the sentence vector located at the center of the cluster as the center vector among the multiple sentence vectors of the cluster, and determining the conversation content corresponding to the center vector as the target conversation content.

[0128] Determining a sentence vector located at the cluster center among multiple sentence vectors of the cluster cluster as the central vector includes: determining the cluster center among multiple sentence vectors of the cluster cluster according to the K-means algorithm, and selecting the sentence vector corresponding to the cluster center as the central vector.

[0129] In some embodiments, a cluster includes multiple conversation contents that meet the clustering conditions, and determining the conversation content used to represent the cluster as the target conversation content based on the cluster includes the following steps: encapsulating the solution steps of the multiple conversation contents of the cluster into a third model prompt instruction, sending the third model prompt instruction to the preset language model so that the preset language model outputs the target solution step according to the third model prompt instruction, and determining the conversation content corresponding to the target solution step as the target conversation content.

[0130] The problem description is content used to describe the core problem in a knowledge base in the form of FAQ. It can be understood that the problem description is a representative core problem of multiple conversation contents that meet the clustering conditions.

[0131] S15: Generate a knowledge base based on the problem descriptions and solution steps of multiple target conversation contents.

[0132] In this step, the knowledge base organizes information in the form of FAQ, as shown in Table 1:

[0133] Problem Description Solution steps -- --

[0134] As shown in Table 1, the knowledge base organizes information according to problem descriptions and solution steps. In this embodiment, the problem descriptions and solution steps of each category can be recorded in the knowledge base.

[0135] In general, this embodiment can automatically obtain multiple conversation contents of a conversation set, automatically extract and parse the core issues, solution steps and keywords of each conversation content, automatically determine the target conversation content used to represent each cluster, and automatically use the problem description and solution steps of the target conversation content as the problem description and solution steps of the FAQ, so as to obtain a knowledge base in the form of FAQ, reduce manual participation in the generation and construction of the FAQ knowledge base, and reduce the probability of problems caused by inappropriate problem descriptions or solution steps due to human subjective factors, which is conducive to improving the accuracy and reliability of the knowledge base.

[0136] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of the present disclosure, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, may be executed interchangeably, and so on.

[0137] As another aspect of the embodiments of the present disclosure, the embodiments of the present disclosure provide a knowledge base generation device, wherein the knowledge base generation device may be a software module, the software module includes a number of instructions, which are stored in a memory, and the processor may access the memory and call the instructions for execution to complete the knowledge base generation method described in each of the above embodiments.

[0138] In some embodiments, the knowledge base generation device can also be constructed by hardware devices. For example, the knowledge base generation device can be constructed by one or more chips, and each chip can work in coordination with each other to complete the knowledge base generation method described in each of the above embodiments. For another example, the knowledge base generation device can also be constructed by various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.

[0139] See also Figure 3 The knowledge base generating device 300 includes a session acquisition module 31, a session processing module 32, a session clustering module 33, a content determination module 34 and a knowledge base generating module 35.

[0140] The conversation acquisition module 31 is used to obtain a conversation set, which includes multiple conversation contents. The conversation processing module 32 is used to process the conversation content based on a preset language model to obtain the core issues corresponding to the conversation content, the solution steps and keywords corresponding to the core issues. The conversation clustering module 33 is used to cluster each conversation content according to the keywords of each core issue to obtain at least one cluster cluster. The content determination module 34 is used to determine that the conversation content representing the cluster cluster is the target conversation content based on the cluster cluster, wherein the core issue of the target conversation content is the problem description. The knowledge base generation module 35 is used to generate a knowledge base based on the problem descriptions and solution steps of multiple target conversation contents.

[0141] This embodiment can automatically obtain multiple conversation contents of a conversation set, automatically extract and parse the core issues, solution steps and keywords of each conversation content, automatically determine the target conversation content used to represent each cluster, and automatically use the problem description and solution steps of the target conversation content as the problem description and solution steps of the FAQ, thereby obtaining a knowledge base in the form of FAQ, reducing manual participation in the generation and construction of the FAQ knowledge base, and reducing the probability of problems caused by inappropriate problem descriptions or solution steps due to human subjective factors, which is conducive to improving the accuracy and reliability of the knowledge base.

[0142] In some embodiments, the conversation processing module 32 is specifically used to: obtain customized demand content, encapsulate the demand content and conversation content into a first model prompt instruction, and send the first model prompt instruction to the preset language model so that the preset language model outputs the core issues corresponding to the conversation content and the solution steps corresponding to the core issues according to the first model prompt instruction.

[0143] In some embodiments, the conversation processing module 32 is also specifically used to: encapsulate the core questions corresponding to the conversation content into second model prompt instructions, and send the second model prompt instructions to the preset language model so that the preset language model outputs keywords corresponding to the conversation content according to the second model prompt instructions.

[0144] In some embodiments, the conversation clustering module 33 is specifically used to include: generating sentence vectors based on the keywords of the core questions, clustering the sentence vectors of each conversation content according to a preset clustering algorithm to obtain at least one clustering cluster, the clustering cluster includes multiple sentence vectors that meet the clustering conditions, and the sentence vector is used to represent the corresponding conversation content.

[0145] In some embodiments, the core question corresponds to at least two keywords, and the conversation clustering module 33 is further specifically used to include: combining at least two keywords of the conversation content into a sentence, and representing the sentence into a sentence vector according to a preset vector representation algorithm.

[0146] In some embodiments, the cluster includes multiple sentence vectors that meet the clustering conditions, and the content determination module 34 is specifically used to: determine the sentence vector located at the center of the cluster as the central vector among the multiple sentence vectors of the cluster, and determine the conversation content corresponding to the central vector as the target conversation content.

[0147] In some embodiments, the clustering cluster includes multiple conversation contents that meet the clustering conditions, and the content determination module 34 is also specifically used to: encapsulate the solution steps of the multiple conversation contents of the clustering cluster into a third model prompt instruction, and send the third model prompt instruction to the preset language model, so that the preset language model outputs the target solution step according to the third model prompt instruction, and determines that the conversation content corresponding to the target solution step is the target conversation content.

[0148] In some embodiments, the session acquisition module 31 is specifically used to: acquire multiple session contents, perform pre-classification processing on the multiple session contents, and obtain at least one session set, where the session set includes at least one session content belonging to the same category.

[0149] It should be noted that the above-mentioned knowledge base generation device can execute the knowledge base generation method provided in the embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the embodiment of the knowledge base generation device, please refer to the knowledge base generation method provided in the embodiment of the present disclosure.

[0150] See also Figure 4 , Figure 4 The circuit structure diagram of an electronic device provided by an embodiment of the present disclosure, wherein the electronic device includes a server, a computer, a mobile phone, or other device or electronic product with logic calculation and analysis functions. Figure 4 As shown, the electronic device 400 includes one or more processors 41 and a memory 42. Figure 4 A processor 41 is taken as an example.

[0151] The processor 41 and the memory 42 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.

[0152] The memory 42 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the knowledge base generation method in the embodiment of the present disclosure. The processor 41 executes various functional applications and data processing of the knowledge base generation device by running the non-volatile software programs, instructions and modules stored in the memory 42, that is, realizes the knowledge base generation method provided in the above method embodiment and the functions of each module or unit in the above device embodiment.

[0153] The memory 42 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 42 may optionally include a memory remotely arranged relative to the processor 41, and these remote memories may be connected to the processor 41 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0154] The program instructions / modules are stored in the memory 42 and when executed by the one or more processors 41 , the knowledge base generation method in any of the above method embodiments is executed.

[0155] The present disclosure also provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors, such as Figure 4 A processor 41 in the embodiment may enable the one or more processors to execute the knowledge base generation method in any of the above method embodiments.

[0156] The embodiments of the present disclosure also provide a computer program product, which includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by an electronic device, the electronic device executes any one of the knowledge base generation methods described.

[0157] The above described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0158] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Under the concept of the present disclosure, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present disclosure as described above, which are not provided in detail for the sake of simplicity. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. A knowledge base generation method, characterized in that: include: Acquire a session set, where the session set includes multiple session contents; Processing the conversation content based on a preset language model to obtain core issues corresponding to the conversation content, and solution steps and keywords corresponding to the core issues; Clustering the conversation contents according to the keywords of the core questions to obtain at least one cluster; Determining, according to the clustering cluster, a conversation content used to represent the clustering cluster as a target conversation content, wherein a core question of the target conversation content is a question description; A knowledge base is generated based on the problem descriptions and solution steps of the plurality of target conversation contents.

2. The method according to claim 1, characterized in that The processing of the conversation content based on the preset language model to obtain the core problem corresponding to the conversation content and the solution steps corresponding to the core problem include: Get customized demand content; Encapsulating the demand content and the conversation content into a first model prompt instruction; The first model prompt instruction is sent to the preset language model, so that the preset language model outputs a core question corresponding to the conversation content and a solution step corresponding to the core question according to the first model prompt instruction.

3. The method according to claim 2, characterized in that The processing of the conversation content based on a preset language model to obtain keywords corresponding to the conversation content includes: Encapsulating the core questions corresponding to the conversation content into a second model prompt instruction; The second model prompt instruction is sent to the preset language model, so that the preset language model outputs keywords corresponding to the conversation content according to the second model prompt instruction.

4. The method according to claim 1, characterized in that: Clustering the conversation contents according to the keywords of the core questions to obtain at least one cluster includes: Generate a sentence vector based on the keywords of the core question; The sentence vectors of each of the conversation contents are clustered according to a preset clustering algorithm to obtain at least one cluster, wherein the cluster includes a plurality of sentence vectors satisfying a clustering condition, and the sentence vectors are used to represent the corresponding conversation content.

5. The method according to claim 4, characterized in that The core question corresponds to at least two keywords, and generating a sentence vector according to the keywords of the core question includes: combining at least two keywords of the conversation content into a sentence; According to a preset vector representation algorithm, the sentence is represented into a sentence vector.

6. The method according to any one of claims 1 to 5, characterized in that: The cluster includes a plurality of sentence vectors satisfying the clustering condition, and determining, according to the cluster, a conversation content representing the cluster as the target conversation content includes: Determining a sentence vector located at the center of the cluster as a center vector among the multiple sentence vectors of the cluster; The conversation content corresponding to the central vector is determined as the target conversation content.

7. The method according to any one of claims 1 to 5, characterized in that: The cluster includes a plurality of conversation contents satisfying a clustering condition, and determining, according to the cluster, a conversation content representing the cluster as a target conversation content includes: Encapsulating the steps of solving the multiple conversation contents of the cluster into a third model prompt instruction; Sending the third model prompt instruction to the preset language model, so that the preset language model outputs a target solution step according to the third model prompt instruction; Determine the conversation content corresponding to the target solution step as the target conversation content.

8. The method according to any one of claims 1 to 5, characterized in that: The acquiring of the session set comprises: Get multiple session contents; Pre-classify the plurality of conversation contents to obtain at least one conversation set, wherein the conversation set includes at least one conversation content belonging to the same category.

9. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable an electronic device to execute the knowledge base generation method according to any one of claims 1 to 8.

10. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the knowledge base generation method according to any one of claims 1 to 8.