Human-computer interaction method and apparatus, device, storage medium and program product

By processing and expanding the basic corpus of chat robots, combining professional knowledge and user portraits, professional and reliable reply information is generated, and the problem of low reliability of chat robots in the professional field is solved, achieving more accurate and safe dialogue replies.

WO2025145520A1PCT designated stage expired Publication Date: 2025-07-10TSINGHUA UNIVERSITY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/095404
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-04
Filing Date
2024-05-27
Publication Date
2025-07-10

AI Technical Summary

Technical Problem

Existing chatbots are low in the professional field, and there are problems with hallucinating and harmful replies to generate content.

Method used

By reliably processing the basic corpus in the field to which the dialogue information belongs, expanding the corpus and making correctness and comprehensive corrections, building a knowledge database, using professional knowledge to calibrate and personalize the initial reply information, and generating professional and reliable reply information.

Benefits of technology

Improve the reliability and accuracy of chatbots, ensuring the professionalism and security of replying information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024095404_10072025_PF_FP_ABST
    Figure CN2024095404_10072025_PF_FP_ABST
Patent Text Reader

Abstract

A human-computer interaction method and apparatus, a device, a storage medium and a program product. The human-computer interaction method comprises: in response to dialogue information of a user, obtaining from a knowledge database a knowledge text corresponding to the dialogue information, wherein the knowledge database is constructed by performing reliability processing on basic corpus in the field to which the dialogue information belongs and on the basis of the corpus obtained after the reliability processing; and outputting reply information for the dialogue information according to the knowledge text corresponding to the dialogue information.
Need to check novelty before this filing date? Find Prior Art

Description

Human-computer interaction method, device, equipment, storage medium and program product

[0001] Related applications

[0002] This application claims priority to Chinese patent application number 202410010410.8, filed on January 4, 2024, entitled “Human-computer interaction method, device, equipment, storage medium and program product,” the entire text of which is hereby incorporated by reference. Technical Field

[0003] The present application relates to the technical field of chatbots, and in particular to a human-computer interaction method, apparatus, device, storage medium, and program product. Background Art

[0004] With the development of technologies such as artificial intelligence and the Internet, chatbots have been applied in multiple fields, including telecommunications, tourism, medical care, aviation, finance and other fields.

[0005] Taking the medical field as an example, in related technologies, chatbots are usually developed through large language models, which can simply answer keyword-based queries and have context-related conversations with users.

[0006] However, related technologies have technical problems such as low reliability of chatbots and illusions in generated content.

[0007] Summary of the Invention

[0008] Based on this, it is necessary to provide a human-computer interaction method, device, equipment, storage medium and program product to address the above technical problems, which can improve the reliability of chatbots.

[0009] In a first aspect, the present application provides a human-computer interaction method, comprising: in response to a user's dialogue information, obtaining a knowledge text corresponding to the dialogue information from a knowledge database; the knowledge database is constructed based on the reliability-processed corpus of basic corpus in the field to which the dialogue information belongs and outputting reply information of the dialogue information according to the knowledge text corresponding to the dialogue information.

[0010] In one embodiment, the process of constructing a knowledge database includes: performing corpus expansion processing on basic corpus in the field to which the dialogue information belongs to obtain expanded corpus; correcting the correctness and comprehensiveness of the expanded corpus based on professional knowledge in the field to which the dialogue information belongs to obtain corpus after reliability processing; and generating a knowledge database based on the corpus after reliability processing.

[0011] In one embodiment, a corpus expansion process is performed on a basic corpus in a field to which the dialogue information belongs to obtain an expanded corpus, including: retrieving text content related to the basic corpus; screening the text content for valid information to obtain valid text content; and integrating information between the basic corpus and the valid text content to obtain the expanded corpus.

[0012] In one embodiment, the extended corpus is corrected for correctness and comprehensiveness based on the professional knowledge of the field to which the dialogue information belongs to obtain the corpus after reliability processing, including: trimming the extended corpus through a language processing model to obtain an initial knowledge text; and supplementing and correcting the initial knowledge text based on the professional knowledge to obtain the corpus after reliability processing.

[0013] In one embodiment, outputting reply information of the dialogue information according to the knowledge text corresponding to the dialogue information includes: obtaining initial reply information of the dialogue information; generating reply information according to the initial reply information and the knowledge text; and outputting the reply information.

[0014] In one embodiment, obtaining initial reply information of a conversation message includes: inputting the conversation message into a preset conversation model to obtain candidate reply information; and filtering harmful information from the candidate reply information to obtain initial reply information.

[0015] In one embodiment, the reply information is generated based on the initial reply information and the knowledge text, including: decomposing the initial reply information to obtain multiple independent knowledge points; and performing knowledge verification on each independent knowledge point based on the knowledge text to obtain the reply information.

[0016] In one embodiment, knowledge verification is performed on each independent knowledge point based on the knowledge text to obtain reply information, including: if each independent knowledge point is consistent with the knowledge text, the initial reply information is determined as the reply information; if some knowledge points in each independent knowledge point are inconsistent with the knowledge text, the initial reply information is modified according to the knowledge text to obtain reply information.

[0017] In one embodiment, before outputting the reply information, the method further includes: obtaining a user portrait of the user; generating the user portrait based on the user's historical conversation records; and adjusting the reply information based on the user portrait to obtain reply information that matches the user.

[0018] In one embodiment, the initial knowledge text is supplemented and corrected based on the professional knowledge to obtain the reliability-processed corpus, including: supplementing the missing content in the initial knowledge text and correcting the erroneous information in the initial knowledge text based on the professional knowledge to obtain the reliability-processed corpus.

[0019] In one embodiment, the method of performing knowledge verification on each of the independent knowledge points based on the knowledge text to obtain the reply information also includes: corresponding to the inability to determine the authenticity of part of the content in the initial reply information based on the knowledge text, removing the part of the content in the initial reply information and using the remaining content in the initial reply information as the reply information.

[0020] In a second aspect, the present application also provides a human-computer interaction device, including: a text acquisition module and an information output module.

[0021] The text acquisition module is used to respond to the user's dialogue information and obtain the knowledge text corresponding to the dialogue information from the knowledge database; the knowledge database is constructed by reliability processing the basic corpus in the field to which the dialogue information belongs and based on the reliability processed corpus.

[0022] The information output module is used to output reply information of the dialogue information according to the knowledge text corresponding to the dialogue information.

[0023] In a third aspect, embodiments of the present application further provide a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any embodiment of the first aspect.

[0024] In a fourth aspect, embodiments of the present application further provide a non-volatile computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the embodiments of the first aspect above.

[0025] In a fifth aspect, embodiments of the present application further provide a computer program product, comprising an executable program that, when executed by a processor, implements the steps of any one of the embodiments of the first aspect.

[0026] The above-described human-computer interaction method, apparatus, device, storage medium, and program product, in response to a user's conversation information, retrieves the knowledge text corresponding to the conversation information from a knowledge database. The knowledge database is constructed based on reliability processing of basic corpus in the field to which the conversation information belongs, and then outputs a reply to the conversation information based on the knowledge text corresponding to the conversation information. In this method, by performing reliability processing on basic corpus in the field to which the conversation information belongs and constructing a knowledge database based on the reliability-processed corpus, the knowledge database includes professional and reliable knowledge in the relevant field. When a chatbot engages in a conversation with a user, the professional and reliable knowledge corresponding to the conversation information can be retrieved from the knowledge database and, based on the professional and reliable knowledge corresponding to the conversation information, a reply to the conversation information is generated. The resulting reply is more professional, accurate, and reliable, thereby improving the reliability of the chatbot. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0028] FIG1 is a diagram showing the internal structure of a computer device according to an embodiment of the present application;

[0029] FIG2 is a flow chart of a human-computer interaction method according to an embodiment of the present application;

[0030] FIG3 is a schematic diagram of a process for constructing a knowledge database in one embodiment of the present application;

[0031] FIG4 is a schematic diagram of a process for expanding basic corpus in one embodiment of the present application;

[0032] FIG5 is a schematic diagram of a process for obtaining a corpus after reliability processing in one embodiment of the present application;

[0033] FIG6 is a schematic diagram of a process for outputting reply information in one embodiment of the present application;

[0034] FIG7 is a schematic diagram of a process for obtaining initial reply information in one embodiment of the present application;

[0035] FIG8 is a schematic diagram of a process for generating reply information in one embodiment of the present application;

[0036] FIG9 is a schematic diagram of a process for adjusting reply information in one embodiment of the present application;

[0037] FIG10 is a flow chart of a human-computer interaction method in another embodiment of the present application;

[0038] FIG11 is a schematic structural diagram of a human-computer interaction device in one embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0040] The human-computer interaction method provided in the embodiment of the present application can be applied to a computer device. The computer device can be a chatbot, and its internal structure diagram can be shown in Figure 1. The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a human-computer interaction method is implemented. Those skilled in the art will understand that the structure shown in FIG1 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0041] Big language models are a deep learning-based natural language processing technology that uses pre-training on large amounts of text data to understand and generate natural language. With the widespread development of deep learning technology, models specific to text processing, especially big language models, have gained widespread attention and application in a variety of applications. Traditional natural language processing technologies rely on handcrafted rules or limited training data, while modern big language models, by learning from massive amounts of text, are able to better understand, generate, and manipulate natural language.

[0042] These large language models have been shown to have excellent performance on a variety of tasks, including but not limited to text generation, text classification, and question-answering systems. In related technologies, chatbots are typically developed using large language models to simply answer keyword-based queries and engage in contextually relevant conversations with users.

[0043] However, chatbots in some professional fields face low reliability issues. For example, in the medical field, large language models used to build chatbots have not yet been effectively applied in medical scenarios. The main reasons for this are: ① Lack of specialized medical corpora for training large language models: The performance of large language models is highly dependent on the training corpus. Currently, large language models are rarely trained specifically on large medical corpora, resulting in poor performance in medical text processing tasks. ② Hallucinations: Large language models may experience hallucinations, where the generated results appear reasonable but are actually incorrect. ③ Harmful replies: The corpus trained on large language models is so large that it cannot be manually screened one by one, and therefore may contain various harmful information. Therefore, when responding, large language models may also generate replies containing harmful content.

[0044] Based on this, the present application proposes a human-computer interaction method, which performs reliability processing on the basic corpus in the field to which the dialogue information belongs, and constructs a knowledge database based on the corpus after reliability processing. In this way, the knowledge database includes professional and reliable knowledge in the relevant field. When the chat robot has a conversation with the user, the professional and reliable knowledge corresponding to the dialogue information can be obtained through the knowledge database, and reply information of the dialogue information can be generated based on the professional and reliable knowledge corresponding to the dialogue information. The reply information obtained in this way is more professional, accurate and reliable, thereby improving the reliability of the chat robot.

[0045] It should be noted that the beneficial effects or technical problems solved by the embodiments of the present application are not limited to this one, but may also include other implicit or related problems. For details, please refer to the description of the following embodiments.

[0046] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0047] In an exemplary embodiment, as shown in FIG2 , a human-computer interaction method is provided. The method is described by taking the application of the method to a computer device as an example, and includes the following steps 201 to 202 .

[0048] S201 , in response to the user's dialogue information, obtaining the knowledge text corresponding to the dialogue information from the knowledge database.

[0049] In the embodiment of the present application, the knowledge database is constructed by performing reliability processing on basic corpus in the field to which the dialogue information belongs and based on the reliability-processed corpus.

[0050] Conversational information refers to information manually entered by the user or voice input by the user. Conversational information can belong to fields such as medicine, law, and science. Knowledge text refers to professional knowledge information related to conversational information.

[0051] In the related art, the large language models used to build chatbots lack specialized corpus in the field to which the conversation information belongs, and are usually trained based on a small amount of general corpus. As a result, the chatbots constructed in this way give relatively inaccurate responses when engaging in conversations with users in related fields. Based on this, in the embodiments of the present application, a knowledge database is constructed based on the reliability-processed corpus after performing reliability processing on the basic corpus in the field to which the conversation information belongs. This database is used to calibrate the chatbot's conversation responses using the professional knowledge in the knowledge database, resulting in more reliable and accurate responses.

[0052] Exemplarily, in response to the user's dialogue information, the user's dialogue information may be input into a knowledge database for search to obtain knowledge text corresponding to the dialogue information.

[0053] S202: Outputting reply information of the dialogue information according to the knowledge text corresponding to the dialogue information.

[0054] In actual applications, when a chatbot receives dialogue information input by a user, it will first obtain an initial reply information based on the user's dialogue information. Whether this initial reply information can be used as the final accurate and reliable reply information needs to be verified based on the knowledge text.

[0055] For example, the initial reply information of the conversation message can be obtained, and then the initial reply information can be verified based on the knowledge text corresponding to the conversation message to obtain the reply information of the conversation message. For example, the initial reply information can be compared with the knowledge text. If the initial reply information and the knowledge text are consistent, the initial reply information can be used as the reply information of the conversation message and output. If the initial reply information and the knowledge text are inconsistent, the erroneous information in the initial reply information can be corrected based on the knowledge text to obtain the reply information of the conversation message and output it.

[0056] In the human-computer interaction method provided in an embodiment of the present application, in response to a user's conversation information, the knowledge text corresponding to the conversation information is obtained from a knowledge database. The knowledge database is constructed based on reliability processing of basic corpus in the field to which the conversation information belongs, and then a reply to the conversation information is output based on the knowledge text corresponding to the conversation information. In this method, the knowledge database is obtained by reliability processing the basic corpus in the field to which the conversation information belongs and constructing it based on the reliability-processed corpus. In this way, the knowledge database includes professional and reliable knowledge in the relevant field. When a chatbot engages in a conversation with a user, the professional and reliable knowledge corresponding to the conversation information can be obtained from the knowledge database, and a reply to the conversation information is generated based on the professional and reliable knowledge corresponding to the conversation information. The resulting reply information is more professional, accurate, and reliable, thereby improving the reliability of the chatbot.

[0057] The reliability of a chatbot is closely related to its knowledge database. In addition to ensuring professional and reliable content, a knowledge database must also be comprehensive and complete. Therefore, when building a knowledge database, the basic corpus can be expanded to ensure comprehensiveness. Based on this, the following example illustrates how to build a knowledge database.

[0058] In an exemplary embodiment, as shown in FIG3 , the human-computer interaction method of the present application further includes constructing a knowledge database, specifically including steps S301 to S303 , before obtaining the knowledge text corresponding to the dialogue information from the knowledge database in response to the user's dialogue information in step S201 .

[0059] S301: Perform corpus expansion processing on the basic corpus in the field to which the dialogue information belongs to, to obtain expanded corpus.

[0060] In the embodiment of the present application, some relevant text content can be retrieved based on the basic corpus, and the basic corpus and the retrieved text content can be integrated to obtain the expanded corpus.

[0061] S302: Based on the professional knowledge of the field to which the dialogue information belongs, the expanded corpus is corrected for correctness and comprehensiveness to obtain a corpus after reliability processing.

[0062] For example, the professional knowledge of the field to which the dialogue information belongs and the expanded corpus can be input into a pre-trained corpus processing model, and the corpus processing model can correct the correctness and comprehensiveness of the expanded corpus to obtain reliability-processed corpus.

[0063] S303: Generate a knowledge database based on the corpus after reliability processing.

[0064] After obtaining the reliability-processed corpus, the reliability-processed corpus is added to the knowledge database.

[0065] In the human-computer interaction method provided in the embodiments of the present application, a base corpus in the field to which the dialogue information belongs is subjected to corpus expansion processing to obtain an expanded corpus. The expanded corpus is then corrected for correctness and comprehensiveness based on the professional knowledge in the field to which the dialogue information belongs, resulting in a corpus that has been processed for reliability. Finally, a knowledge database is generated based on the processed corpus. In this method, by expanding the base corpus to obtain a more comprehensive expanded corpus, and then correcting the expanded corpus for correctness and comprehensiveness based on the professional knowledge, a more reliable corpus can be obtained. A comprehensive and reliable knowledge database can be constructed based on the processed corpus.

[0066] By searching for text content related to the basic corpus, the basic corpus can be expanded. Based on this, the following embodiment describes a method for expanding the basic corpus.

[0067] In an exemplary embodiment, as shown in FIG4 , step S301 performs corpus expansion processing on the basic corpus in the field to which the dialogue information belongs to obtain expanded corpus, including steps S401 to S403 .

[0068] S401, searching for text content related to the basic corpus.

[0069] When retrieving text content related to the basic corpus, the reliability of the content needs to be ensured.

[0070] For example, text content related to the basic corpus can be searched on professional and reliable websites in related fields. For example, in the medical field, the search can be conducted on literature search websites, medical professional websites, and online education websites.

[0071] S402: Screen the text content for valid information to obtain valid text content.

[0072] In practical applications, the retrieved text content related to the basic corpus usually includes some content that is irrelevant to the basic corpus. The text content can be screened for effective information to obtain valid text content.

[0073] S403: Integrate the basic corpus and the valid text content to obtain the expanded corpus.

[0074] After obtaining the valid text content, the basic corpus and the valid text content can be integrated to obtain the expanded corpus. For example, the basic corpus and the valid text content can be integrated using information integration software.

[0075] In the human-computer interaction method provided in the embodiment of the present application, text content related to the basic corpus is retrieved, and then the text content is screened for valid information to obtain valid text content. Finally, the basic corpus and the valid text content are integrated to obtain an expanded corpus. This method provides an optional method for obtaining the expanded corpus, which is to retrieve text content related to the basic corpus, remove invalid information therein, obtain valid text content, and finally integrate the basic corpus and the valid text content to obtain the expanded corpus.

[0076] After the expanded corpus is obtained, the expanded corpus is supplemented with corresponding knowledge and content corrections are performed on the expanded corpus through relevant professional knowledge to obtain the corpus after reliability processing. Based on this, the following embodiment describes the method of obtaining the corpus after reliability processing.

[0077] In an exemplary embodiment, as shown in FIG5 , step S302 corrects the correctness and comprehensiveness of the expanded corpus based on the professional knowledge of the field to which the dialogue information belongs to, to obtain the corpus after reliability processing, including steps S501 and S502 .

[0078] S501: Prune the expanded corpus through the language processing model to obtain the initial knowledge text.

[0079] For example, the expanded corpus is input into a language processing model, which performs content pruning on the expanded corpus to obtain the initial knowledge text. The expanded corpus can be pruned using a language model fine-tuned based on instructions.

[0080] S502: supplement and revise the initial knowledge text based on professional knowledge to obtain a corpus after reliability processing.

[0081] For example, based on professional knowledge, missing content in the initial knowledge text is supplemented and erroneous information in the initial knowledge text is corrected to obtain a corpus that has been processed for reliability. The professional knowledge can be provided by professionals in the relevant field. For example, in the medical field, the professional knowledge can be provided by doctors.

[0082] In the human-computer interaction method provided in the embodiments of this application, an expanded corpus is pruned using a language processing model to obtain an initial knowledge text. This initial knowledge text is then supplemented and corrected based on professional knowledge to obtain a corpus that has been processed for reliability. In this method, by supplementing and correcting the pruned expanded corpus based on professional knowledge, the resulting corpus can be made more accurate and reliable, providing data support for building a reliable knowledge database.

[0083] When generating a reply to a conversation, in addition to the support of the knowledge text, the chatbot also needs the initial reply to the conversation. That is, the reply to the conversation is generated based on the initial reply and the knowledge text. Based on this, the following embodiment describes the method of outputting the reply.

[0084] In an exemplary embodiment, as shown in FIG6 , step S202 outputs reply information of the dialogue information according to the knowledge text corresponding to the dialogue information, including steps S601 to S603 .

[0085] S601: Obtain initial reply information of the conversation information.

[0086] Exemplarily, the dialogue information may be input into a preset dialogue model to obtain initial response information of the dialogue information.

[0087] S602: Generate reply information based on the initial reply information and the knowledge text.

[0088] Knowledge text can correct inaccurate information in the initial response information to obtain accurate response information.

[0089] For example, the initial reply information can be compared with the knowledge text. If the initial reply information is consistent with the knowledge text, the initial reply information will be used as the reply information of the dialogue information; if the initial reply information is inconsistent with the knowledge text, the erroneous information in the initial reply information can be corrected according to the knowledge text to obtain the reply information of the dialogue information.

[0090] S603: Output reply information.

[0091] After obtaining accurate reply information, output the reply information.

[0092] In the human-computer interaction method provided in the embodiments of the present application, initial response information is obtained from the conversation message, and then a response message is generated based on the initial response information and knowledge text, and finally the response message is output. In this method, the chat robot's initial response information to the conversation message is obtained, and then the final response information is obtained by combining it with the knowledge text obtained from the knowledge database, and the response information is output, providing an optional method for quickly outputting response information.

[0093] By inputting the conversation information into the conversation model, candidate reply information can be obtained from the model output. In order to prevent the chatbot's reply information from including harmful information, the candidate reply information can be filtered for harmful information. Based on this, the following embodiment describes a method for obtaining initial reply information.

[0094] In an exemplary embodiment, as shown in FIG7 , step S601 of acquiring initial reply information of a conversation message includes steps S701 and S702 .

[0095] S701: Input the dialogue information into a preset dialogue model to obtain candidate reply information.

[0096] The dialogue information is first input into a preset dialogue model, and the dialogue model can first generate a reply message, ie, candidate reply information, based on the dialogue information.

[0097] S702: Filter the candidate reply information for harmful information to obtain initial reply information.

[0098] After obtaining the candidate reply information output by the dialogue model, the candidate reply information can be optimized, that is, harmful information can be filtered out of the candidate reply information to obtain reply information that does not include harmful information, that is, initial reply information.

[0099] In the human-computer interaction method provided in the embodiments of the present application, dialogue information is input into a preset dialogue model to obtain candidate response information, which is then filtered for harmful information to obtain initial response information. In this method, after obtaining the candidate response information output by the dialogue model, filtering the candidate response information for harmful information can obtain more reliable response information, further improving the reliability of the chatbot.

[0100] Generating a reply message based on the knowledge text and the initial reply message is the process of verifying the reliability of the initial reply message based on the knowledge text. The initial reply message can be broken down into multiple independent knowledge points, and each independent knowledge point is verified based on the knowledge text. Based on this, the following embodiment illustrates the method of generating a reply message.

[0101] In an exemplary embodiment, as shown in FIG8 , step S602 generates reply information according to the initial reply information and the knowledge text, including step S801 and step S802 .

[0102] S801, decompose the initial reply information to obtain multiple independent knowledge points.

[0103] For example, the initial response information can be input into a pre-trained decomposition model, which then outputs multiple independent knowledge points. The decomposition model can be constructed using network models such as error back propagation neural networks, recurrent neural networks, deep neural networks, and convolutional neural networks.

[0104] S802: Perform knowledge verification on each independent knowledge point based on the knowledge text to obtain reply information.

[0105] The knowledge text is compared with each independent knowledge point to realize the process of knowledge verification.

[0106] In one embodiment, if all independent knowledge points are consistent with the knowledge text, the initial reply information is determined as the reply information; if some of the independent knowledge points are inconsistent with the knowledge text, the initial reply information is modified according to the knowledge text to obtain the reply information.

[0107] If all independent knowledge points are consistent with the knowledge text, it means that the initial reply information is accurate and reliable reply information, and the initial reply information can be determined as the reply information; if some knowledge points in the independent knowledge points are inconsistent with the knowledge text, it means that there is wrong information in the initial reply information, and the wrong information in the initial reply information can be modified according to the knowledge text to obtain the reply information.

[0108] It should be noted that if the authenticity of some content in the initial reply information cannot be determined based on the knowledge text, the content in the initial reply information that cannot be distinguished from the authenticity will be directly removed, and the remaining content in the initial reply information will be used as the reply information.

[0109] In the human-computer interaction method provided in the embodiments of the present application, the initial reply message is decomposed to obtain multiple independent knowledge points, and then the knowledge of each independent knowledge point is verified based on the knowledge text to obtain the reply message. In this method, by decomposing the initial reply message into multiple independent knowledge points, the reliability and authenticity of each independent knowledge point can be verified based on the knowledge text to obtain reliable and accurate reply information, thereby improving the reliability of the chatbot.

[0110] If the user currently in a conversation has previously engaged in conversations with the chatbot, the chatbot will construct a user profile based on the user's historical conversation history. When generating a reply, the chatbot can then generate personalized responses based on the user profile, specifically tailoring them to the current user. The following example illustrates the process leading up to the output of a reply.

[0111] In an exemplary embodiment, as shown in FIG9 , before outputting the reply information in step S202 , the method further includes steps S901 and S902 .

[0112] S901, obtaining a user profile of the user.

[0113] Among them, the user portrait is generated based on the user's historical conversation records.

[0114] The content of the user's conversation with the chatbot in historical time will be constructed into a user portrait and saved in the database. The chatbot can obtain the user portrait of the user from the database based on the user information.

[0115] S902: Adjust the reply information according to the user portrait to obtain reply information that matches the user.

[0116] After obtaining the user profile, the reply can be adjusted based on the user profile to obtain a reply that matches the user. For example, if the user's conversation message is "I have symptoms of sneezing, runny nose, and sore throat. What medicine should I take?" and the reply message is "You can take Ganmaoling granules and cephalosporins," and the user profile includes that the user is allergic to cephalosporins, then the "cephalosporins" in the reply message needs to be removed and "You can take Ganmaoling granules" will be output as the final reply message.

[0117] It should be noted that in the embodiment of the present application, the reply information is adjusted according to the user portrait in order to modify the information in the output reply information that looks reasonable but is actually wrong, thereby further improving the reliability of the chat robot.

[0118] In the human-computer interaction method provided in the embodiments of the present application, a user profile is obtained, which is generated based on the user's historical conversation records. The reply information is then adjusted based on the user profile to obtain a reply information that matches the user. In this method, by adjusting the reply information based on the user's user profile to obtain a reply information that matches the user, the accuracy and reliability of the reply information are further improved, thereby improving the reliability of the chatbot.

[0119] In addition, in an exemplary embodiment, the present application also provides an optional example of a human-computer interaction method, as shown in FIG10 , which may include the following steps S1001 to S1014 .

[0120] S1001, searching for text content related to the basic corpus.

[0121] S1002: Screen the text content for valid information to obtain valid text content.

[0122] S1003: Integrate the basic corpus and the valid text content to obtain the expanded corpus.

[0123] S1004: Prune the expanded corpus through the language processing model to obtain the initial knowledge text.

[0124] S1005: Based on professional knowledge, the initial knowledge text is supplemented and revised to obtain a corpus after reliability processing.

[0125] S1006: Generate a knowledge database based on the reliability-processed corpus.

[0126] S1007: In response to the user's dialogue information, obtain the knowledge text corresponding to the dialogue information from the knowledge database.

[0127] S1008: Input the dialogue information into a preset dialogue model to obtain candidate reply information.

[0128] S1009: Filter the candidate reply information for harmful information to obtain initial reply information.

[0129] S1010, decomposing the initial reply information to obtain multiple independent knowledge points.

[0130] S1011: Based on the knowledge text, each independent knowledge point is verified to obtain reply information.

[0131] S1012, obtaining the user's user portrait.

[0132] Among them, the user portrait is generated based on the user's historical conversation records.

[0133] S1013, adjusting the reply information according to the user portrait to obtain reply information that matches the user.

[0134] S1014: Output reply information.

[0135] The process of the above steps S1001-S1014 can refer to the description of the above method embodiment. The implementation principles and technical effects are similar and will not be repeated here.

[0136] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0137] Based on the same inventive concept, the present application also provides a human-computer interaction device for implementing the aforementioned human-computer interaction method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations in one or more human-computer interaction device embodiments provided below can be found in the above-mentioned limitations on the human-computer interaction method and will not be repeated here.

[0138] In an exemplary embodiment, as shown in FIG11 , a human-computer interaction device 1 is provided, including: a text acquisition module 10 and an information output module 20 .

[0139] The text acquisition module 10 is used to respond to the user's dialogue information and obtain the knowledge text corresponding to the dialogue information from the knowledge database; the knowledge database is constructed based on the reliability processed basic corpus in the field to which the dialogue information belongs.

[0140] The information output module 20 is used to output reply information of the dialogue information according to the knowledge text corresponding to the dialogue information.

[0141] In one embodiment, the human-computer interaction device 1 further includes: a corpus expansion module, a corpus processing module and a database generation module.

[0142] The corpus expansion module is used to perform corpus expansion processing on the basic corpus in the field to which the dialogue information belongs to, so as to obtain expanded corpus.

[0143] The corpus processing module is used to correct the correctness and comprehensiveness of the expanded corpus based on the professional knowledge of the field to which the dialogue information belongs, and obtain the corpus after reliability processing.

[0144] The database generation module is used to generate a knowledge database based on the corpus after reliability processing.

[0145] In one embodiment, the corpus expansion module is used to: retrieve text content related to the basic corpus; screen the text content for valid information to obtain valid text content; and integrate information between the basic corpus and the valid text content to obtain expanded corpus.

[0146] In one embodiment, the corpus processing module is used to: prune the expanded corpus through a language processing model to obtain an initial knowledge text; and supplement and correct the initial knowledge text based on professional knowledge to obtain a reliability-processed corpus.

[0147] In one embodiment, the information output module 20 is further configured to: obtain initial reply information of the dialogue information; generate reply information based on the initial reply information and the knowledge text; and output the reply information.

[0148] In one embodiment, the information output module 20 is further configured to: input the conversation information into a preset conversation model to obtain candidate reply information; and filter harmful information from the candidate reply information to obtain initial reply information.

[0149] In one embodiment, the information output module 20 is further configured to: decompose the initial reply information to obtain a plurality of independent knowledge points; and perform knowledge verification on each independent knowledge point according to the knowledge text to obtain reply information.

[0150] In one embodiment, the above-mentioned information output module 20 is also used to: if each independent knowledge point is consistent with the knowledge text, the initial reply information is determined as the reply information; if some knowledge points in each independent knowledge point are inconsistent with the knowledge text, the initial reply information is modified according to the knowledge text to obtain the reply information.

[0151] In one embodiment, the information output module 20 is further used to: obtain a user portrait of the user; generate the user portrait based on the user's historical conversation records; and adjust the reply information based on the user portrait to obtain reply information that matches the user.

[0152] Each module in the above-mentioned human-computer interaction device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0153] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented: in response to a user's conversation information, obtaining a knowledge text corresponding to the conversation information from a knowledge database; the knowledge database is constructed based on the reliability-processed corpus obtained by reliability processing basic corpus in the field to which the conversation information belongs; and reply information to the conversation information is output according to the knowledge text corresponding to the conversation information.

[0154] The implementation principles and technical effects of each step implemented by the processor in the embodiment of the present application are similar to the principles of the above-mentioned human-computer interaction method and will not be repeated here.

[0155] In one embodiment, a non-volatile computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: in response to a user's conversation information, a knowledge text corresponding to the conversation information is obtained from a knowledge database; the knowledge database is constructed based on the reliability-processed basic corpus in the field to which the conversation information belongs and the reliability-processed corpus; and reply information to the conversation information is output based on the knowledge text corresponding to the conversation information.

[0156] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned human-computer interaction method and will not be repeated here.

[0157] In one embodiment, a computer program product is provided, comprising executable instructions, which, when executed by a processor, implement the following steps: in response to a user's conversation information, obtaining knowledge text corresponding to the conversation information from a knowledge database; the knowledge database is constructed based on the reliability-processed basic corpus in the field to which the conversation information belongs after reliability processing; and outputting reply information to the conversation information based on the knowledge text corresponding to the conversation information.

[0158] The implementation principles and technical effects of the various steps implemented when the computer program in the embodiment of the present application is executed by the processor are similar to the principles of the above-mentioned human-computer interaction method and will not be repeated here.

[0159] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0160] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0161] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0162] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A human-computer interaction method, characterized in that, The method includes: In response to the user's conversation information, obtaining a knowledge text corresponding to the conversation information from a knowledge database, where the knowledge database is constructed based on the basic corpus in the field to which the conversation information belongs after reliability processing; Outputting a reply message for the conversation information according to the knowledge text corresponding to the conversation information.

2. The method according to claim 1, wherein Before responding to the user's conversation information and obtaining the knowledge text corresponding to the conversation information from the knowledge database, the method further includes constructing the knowledge database, and the constructing of the knowledge database includes: Performing corpus expansion processing on the basic corpus in the field to which the conversation information belongs to obtain an expanded corpus; Performing correctness and comprehensiveness correction processing on the expanded corpus according to the professional knowledge in the field to which the conversation information belongs to obtain the corpus after reliability processing; Generating the knowledge database according to the corpus after reliability processing.

3. The method according to claim 2, wherein The performing corpus expansion processing on the basic corpus in the field to which the conversation information belongs to obtain an expanded corpus includes: Retrieving text content related to the basic corpus; Performing effective information screening on the text content to obtain effective text content; Integrating the information of the basic corpus and the effective text content to obtain the expanded corpus.

4. The method according to claim 2 or 3, characterized in that, The performing correctness and comprehensiveness correction processing on the expanded corpus according to the professional knowledge in the field to which the conversation information belongs to obtain the corpus after reliability processing includes: Pruning the expanded corpus through a language processing model to obtain an initial knowledge text; Performing supplementary correction processing on the initial knowledge text according to the professional knowledge to obtain the corpus after reliability processing.

5. The method according to any one of claims 1 to 4, characterized in that The outputting a reply message for the conversation information according to the knowledge text corresponding to the conversation information includes: Obtaining an initial reply message for the conversation information; Generating the reply message according to the initial reply message and the knowledge text; Outputting the reply message.

6. The method according to claim 5, characterized in that, The obtaining an initial reply message for the conversation information includes: Inputting the conversation information into a preset conversation model to obtain candidate reply messages; Filtering harmful information from the candidate reply messages to obtain the initial reply message.

7. The method according to claim 5 or 6, characterized in that, The generating the reply message according to the initial reply message and the knowledge text includes: Decomposing the initial reply message to obtain multiple independent knowledge points; Performing knowledge verification on each of the independent knowledge points according to the knowledge text to obtain the reply message.

8. The method according to claim 7, characterized in that The performing knowledge verification on each of the independent knowledge points according to the knowledge text to obtain the reply message includes: When each of the independent knowledge points is consistent with the knowledge text, determining the initial reply message as the reply message; When there are some inconsistent knowledge points among the independent knowledge points, modifying the initial reply message according to the knowledge text to obtain the reply message.

9. The method according to any one of claims 5-8, characterized in that, Before outputting the reply message, the method further includes: Obtaining a user portrait of the user, where the user portrait is generated according to the user's historical conversation records; Adjust the reply information according to the user profile to obtain reply information that matches the user.

10. The method according to claim 4, wherein The supplementing and correcting the initial knowledge text according to the professional knowledge to obtain the corpus after reliability processing includes: Supplement the content missing in the initial knowledge text according to professional knowledge, and correct the error information in the initial knowledge text to obtain the corpus after reliability processing.

11. The method according to claim 8, characterized in that The verifying the knowledge of each independent knowledge point according to the knowledge text to obtain the reply information further includes: Corresponding to the authenticity of some content in the initial reply information that cannot be judged according to the knowledge text, remove the part of the content in the initial reply information, and use the remaining content in the initial reply information as the reply information.

12. A human-computer interaction device, characterized in that, The device includes: A text acquisition module, configured to obtain the knowledge text corresponding to the conversation information from the knowledge database in response to the user's conversation information, where the knowledge database is constructed based on the corpus after reliability processing of the basic corpus in the field to which the conversation information belongs; An information output module, configured to output the reply information of the conversation information according to the knowledge text corresponding to the conversation information.

13. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.

14. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer program product comprising executable instructions, characterized in that, When the executable instruction is executed by the processor, the steps of the method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Machine reading understanding method for electric power professional technical knowledge

    CN117216201A

  • Natural language understanding method based on deep learning and AI teaching assisting system

    CN117252259A

  • Intelligent property question and answer method and related product

    CN117271753A

  • Human-computer interaction method and device, equipment, storage medium and program product

    CN117874195A

  • Creating coordinated multi-chatbots using natural dialogues by means of knowledge base

    US20180025726A1