Voice question answering method and device, electronic equipment and storage medium

By real-time recognition and processing of user voice information, and automatically answering and generating voice answers, the problem of low manual answering efficiency of existing voice customer service systems is solved, and the user experience is improved.

CN119646149APending Publication Date: 2025-03-18GUANGZHOU FANGZHOU INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411703259.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing voice customer service system relies on manual answering, resulting in low answering efficiency and unstable quality, making it difficult to ensure user experience.

Method used

By obtaining user voice information in real time, text recognition, emotional recognition and intention recognition are performed, user voice service categories are automatically recognized, and user voice responses are generated according to the categories.

Benefits of technology

It realizes automatic answering of user voice, improves the answering speed, response speed and answering quality of voice services, thereby improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646149A_ABST
    Figure CN119646149A_ABST
Patent Text Reader

Abstract

The invention discloses a voice question answering method and device, electronic equipment and a storage medium, and relates to the technical field of data processing. The method comprises the following steps: identifying user voice information to obtain a user voice text and a user emotion label; performing intention recognition on the user voice text and the user emotion label to obtain a user voice service category; when the user voice service category is complaint, user pacifying content is obtained; when the user voice service category is an order query state, querying a target order state in an order logistics system; when the user voice service category is medicine knowledge query, determining a user medicine knowledge answer; when the user voice service category is chat, obtaining user chat feedback content; and generating a user voice answer and feeding back to the user. According to the technical scheme provided by the embodiment of the invention, automatic answering of the voice of the user is realized, and the answering speed, the response speed and the answering quality of the voice service are improved, so that the experience feeling of the user on the voice service is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a voice question and answer method, device, electronic device and storage medium. Background Art

[0002] Voice customer service system is an essential system for e-commerce malls.

[0003] At this stage, voice customer service is basically answered manually and provides corresponding services.

[0004] However, manual answering has the disadvantages of slow efficiency and the quality of answering is greatly affected by the individual's business level, making it difficult to guarantee user experience. Summary of the invention

[0005] The present invention provides a voice question-and-answer method, device, electronic device and storage medium, which realize automatic answering of user voices, improve the answering speed, response speed and answering quality of voice services, and thus improve the user's experience of voice services.

[0006] According to one aspect of the present invention, a voice question-answering method is provided, the method comprising:

[0007] Get user voice information in real time;

[0008] Performing text recognition and emotion recognition on the user voice information to obtain user voice text and user emotion labels;

[0009] Performing intent recognition on the user voice text and the user emotion label to obtain a user voice service category;

[0010] When it is detected that the user voice service category is a complaint, a first content recognition model is used to perform semantic understanding on the user voice text and the user emotion label to obtain user comforting content;

[0011] When it is detected that the user voice service category is to query the order status, the user voice text is recognized to obtain order query information, and the target order status is queried in the order logistics system according to the order query information;

[0012] When it is detected that the user voice service category is to query drug knowledge, content extraction is performed on the user voice text to generate a user drug knowledge question, and the user drug knowledge question is used to query the drug knowledge base to determine the user drug knowledge answer corresponding to the user drug knowledge question;

[0013] When it is detected that the user voice service category is small talk, a second content recognition model is used to perform semantic understanding on the user voice text to obtain user small talk feedback content;

[0014] A user voice response is generated based on the user comforting content, the target order status, the user's drug knowledge answer or the user's chat feedback content, and the response is fed back to the user.

[0015] According to another aspect of the present invention, a voice question-answering device is provided, the device comprising:

[0016] User voice information acquisition module, used to acquire user voice information in real time;

[0017] A user voice information processing module, used to perform text recognition and emotion recognition on the user voice information to obtain user voice text and user emotion labels;

[0018] A user voice service intention recognition module is used to perform intention recognition on the user voice text and the user emotion label to obtain the user voice service category;

[0019] A user soothing content generation module is used to, when detecting that the user voice service category is a complaint, use a first content recognition model to perform semantic understanding on the user voice text and the user emotion label to obtain user soothing content;

[0020] A target order status query module is used to recognize the user voice text when it is detected that the user voice service category is to query the order status, obtain order query information, and query the target order status in the order logistics system according to the order query information;

[0021] A user drug knowledge query module is used to extract content from the user voice text when it is detected that the user voice service category is to query drug knowledge, generate user drug knowledge questions, and use the user drug knowledge questions to query the drug knowledge base to determine the user drug knowledge answer corresponding to the user drug knowledge question;

[0022] A user chat feedback module is used to use a second content recognition model to perform semantic understanding on the user voice text to obtain user chat feedback content when detecting that the user voice service category is chat;

[0023] The user voice answer generation module is used to generate a user voice answer and feed back to the user based on the user comfort content, the target order status, the user drug knowledge answer or the user chat feedback content.

[0024] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0025] at least one processor; and

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

[0027] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the voice question and answer method described in any embodiment of the present invention.

[0028] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the voice question-answering method described in any embodiment of the present invention when executed.

[0029] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the voice question and answer method described in any embodiment of the present invention is implemented.

[0030] The technical solution of the embodiment of the present invention obtains user voice information in real time, performs text recognition and emotion recognition on the user voice information, obtains user voice text and user emotion tags, performs intent recognition on the user voice text and user emotion tags, obtains the user voice service category, and when it is detected that the user voice service category is complaint, uses the first content recognition model to perform semantic understanding on the user voice text and user emotion tags to obtain user comforting content, and when it is detected that the user voice service category is to query the order status, recognizes the user voice text to obtain order query information, and queries the target order status in the order logistics system based on the order query information, and when it is detected that the user voice service category is When querying drug knowledge, the user's voice text is extracted to generate user drug knowledge questions, and the user's drug knowledge questions are used to query the drug knowledge base to determine the user's drug knowledge answers corresponding to the user's drug knowledge questions. When it is detected that the user's voice service category is chatting, the second content recognition model is used to perform semantic understanding of the user's voice text to obtain the user's chat feedback content. According to the user's soothing content, target order status, user drug knowledge answers or user chat feedback content, a user voice answer is generated and fed back to the user, thereby realizing automatic answering of user voices, improving the answering speed, response speed and answering quality of voice services, and thus improving the user's experience of voice services.

[0031] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0033] Figure 1 is a flow chart of a voice question-answering method provided according to Embodiment 1 of the present invention;

[0034] Figure 2 is a flow chart of a voice question-answering method provided according to Embodiment 2 of the present invention;

[0035] Figure 3 is a flow chart of a voice question-answering method provided according to Embodiment 2 of the present invention;

[0036] Figure 4 is a flow chart of a voice question-answering method provided according to Embodiment 2 of the present invention;

[0037] Figure 5 is a structural diagram of a voice question-and-answer device provided according to Embodiment 3 of the present invention;

[0038] Figure 6 It is a schematic diagram of the structure of an electronic device for implementing the voice question-answering method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0041] Embodiment 1

[0042] Figure 1 This is a flow chart of a voice question and answer method provided in Embodiment 1 of the present invention. The embodiment of the present invention can be applied to the situation of providing feedback on the user voice of an e-commerce mall. The method can be executed by a voice question and answer device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device that carries the voice question and answer function.

[0043] See also Figure 1 The voice question and answer method shown includes:

[0044] S101. Acquire user voice information in real time.

[0045] The user voice information may be a voice message sent by the user to the e-commerce mall. The user voice information may be used to represent the user's demand for voice services of the e-commerce mall. Optionally, the user voice information may be obtained by making a phone call or inputting in a dialog box.

[0046] Specifically, the user voice information input by the user by making a phone call or inputting in a dialog box may be obtained.

[0047] In an optional embodiment of the present invention, after obtaining the user voice information in real time, it also includes: detecting whether there is voice information at the next moment; when there is voice information at the next moment, detecting whether the voice information at the next moment is user voice information; when the voice information at the next moment is user voice information, stopping outputting the user voice answer and obtaining the user voice information at the next moment.

[0048] The voice information at the next moment may be the voice information at the next moment after the user voice information. The voice information at the next moment may include the user voice information or other voice information. Exemplarily, the other voice information may be noise.

[0049] Specifically, after obtaining the user voice information in real time, it can be detected whether there is voice information at the next moment. When it is detected that there is voice information at the next moment, the voice information at the next moment can be input into the user voice detection model to detect whether the voice information at the next moment is user voice information. When it is detected that the voice information at the next moment is user voice information, the output of the user voice answer is stopped, and the user voice information at the next moment is obtained. Exemplarily, the user voice detection model can be a VAD (Voice Activity Detection) model.

[0050] When the voice information at the next moment is detected, this solution stops outputting the user voice answer by identifying whether the voice information at the next moment is the user voice information and thus improving the user experience during the voice service process.

[0051] S102: Perform text recognition and emotion recognition on the user's voice information to obtain the user's voice text and the user's emotion label.

[0052] The user voice text may be the text content of the user voice information. Optionally, the user voice text may be a direct translation text of the user voice information or a text obtained by further sorting the direct translation text. The user emotion label may be used to characterize the tone emotion corresponding to the user voice information. Exemplarily, the user emotion label may include calm, sad, happy or angry, etc.

[0053] Specifically, the user voice information can be input into a pre-trained speech-to-text recognition model to obtain the user voice text. The user voice information can be input into a pre-trained tone and emotion recognition model to obtain a user emotion label. Among them, the speech-to-text recognition model can be used to perform text recognition on the user voice information. The input data of the speech-to-text recognition model can be the user voice information; the output result can be the user voice text. Exemplarily, the speech-to-text recognition model can be an ASR (Automatic Speech Recognition) model. The tone and emotion recognition model can be used to perform tone and emotion detection on the user voice information. The input data of the tone and emotion recognition model can be the user voice information; the output result can be the user emotion label extracted based on the tone information in the user voice information. Exemplarily, the tone and emotion recognition model can be a Sense Voice (emotional sound) model.

[0054] S103: Perform intent recognition on the user voice text and the user emotion tag to obtain the user voice service category.

[0055] The user voice service category may be a voice service category determined based on the user voice information. Exemplarily, the user voice service category may include complaints, order status inquiry, drug knowledge inquiry, and small talk. Among them, complaints may be a voice service for users to complain about an e-commerce mall. For example, complaints may include users being disappointed with the processing process or angry about being harassed by customers. Order status inquiry may be a voice service for users to inquire about the order status in an e-commerce mall. Drug knowledge inquiry may be a voice service for users to inquire about drug knowledge. Small talk may be a voice service for users to chat without purpose.

[0056] Specifically, the user voice text and the user emotion label can be input into the intent recognition model to obtain the user voice service category. Among them, the intent recognition model can be used to identify the user's voice service category. The input data of the intent recognition model can include the user voice text and the user emotion label; the output result can be the user voice service category. Exemplarily, the intent recognition model can be a neural network model, a random tree or a decision tree, etc. The intent recognition model can be trained using a supervised training method.

[0057] S104: When it is detected that the user voice service category is a complaint, a first content recognition model is used to perform semantic understanding on the user voice text and the user emotion tag to obtain user comforting content.

[0058] The first content recognition model can be used to semantically understand the user's voice text and the user's emotional tags, and generate user soothing content. Exemplarily, the first content recognition model can be a large language model. The user soothing content can be soothing content generated for the user's voice text and the user's emotional tags. The user soothing content can be used to soothe the user's complaints.

[0059] Specifically, when it is detected that the user voice service category is a complaint, the user voice text and the user emotion label can be directly spliced ​​to obtain the first content structured data. Optionally, the first input template corresponding to the first content recognition model can also be used to splice the user voice text and the user emotion label to obtain the first content structured data. The first content structured data can be input into the first content recognition model, and the first content recognition model can be used to perform semantic understanding on the first content structured data to obtain user soothing content. Among them, the first content structured data can be the splicing result of the user voice text and the user emotion label. The first content structured data can be used to characterize the text content and tone and emotion content in the user voice.

[0060] Optionally, the user voice text and the user emotion tag are spliced ​​to obtain the first content structured data, including: performing keyword recognition on the user voice text to obtain user voice keywords; splicing the user voice keywords and the user emotion tags to obtain the first content structured data. Among them, the user voice keywords can be used to characterize the key information in the user's complaint content. Specifically, a keyword recognition model can be used to perform keyword recognition on the user voice text to obtain user voice keywords. The user voice keywords and the user emotion tags can be spliced ​​to obtain the first content structured data. Among them, the keyword recognition model can be used to recognize the user voice text to obtain user voice keywords. Exemplarily, the keyword recognition model can be a neural network model. By splicing the user voice keywords and the user emotion tags, compared with directly splicing the user voice text and the user emotion tags, the invalid information in the user voice text can be eliminated, thereby further improving the accuracy of the generated user comforting content.

[0061] S105. When it is detected that the user voice service category is to query the order status, the user voice text is recognized to obtain order query information, and according to the order query information, the target order status is queried in the order logistics system.

[0062] The order query information can be used to identify the order that the user needs to query. Exemplarily, the order query information may include an order identifier and / or a user identifier, etc. Among them, the order identifier can be used to uniquely identify the order. For example, the order identifier can be an order number. Optionally, the order identifier can include a complete order number or a partial order number. The user identifier can be used to uniquely identify the user. For example, the user identifier can include a user name or a user code, etc. The order logistics system can be used to query the order status. Optionally, the order logistics system can be used to store order query information and corresponding order status in real time. Exemplarily, the order logistics system can be a logistics database. The target order status can be the logistics status of the order that the user needs to query. Exemplarily, the target order status can include not picked up, picked up, in transit, in delivery, or delivered, etc.

[0063] Specifically, when it is detected that the user voice service category is to query the order status, the user voice text can be parsed to obtain the order query information. The order status corresponding to the order query information can be queried in the order logistics system to obtain the target order status.

[0064] S106. When it is detected that the user voice service category is to query drug knowledge, content is extracted from the user voice text to generate user drug knowledge questions, and the user drug knowledge questions are used to query the drug knowledge base to determine the user drug knowledge answers corresponding to the user drug knowledge questions.

[0065] The user's drug knowledge questions can be used to query the drug knowledge required by the user. The drug knowledge base can be used to store drug knowledge questions and drug knowledge answers. Among them, drug knowledge questions and drug knowledge answers can be stored accordingly. The user's drug knowledge answers can be the drug knowledge answers required by the user. The user's drug knowledge answers can be used to represent the user's drug knowledge answers corresponding to the user's drug knowledge questions.

[0066] Specifically, when it is detected that the user voice service category is to query drug knowledge, the user's drug knowledge question is used to perform similarity matching on the drug knowledge questions in the drug knowledge base. When the similarity is greater than or equal to the preset similarity threshold, the drug knowledge answer corresponding to the drug knowledge question corresponding to the maximum similarity value in the drug knowledge base can be determined as the user's drug knowledge answer corresponding to the user's drug knowledge question.

[0067] S107: When it is detected that the user voice service category is small talk, a second content recognition model is used to perform semantic understanding on the user voice text to obtain user small talk feedback content.

[0068] Detecting that the user voice service category is small talk can be understood as detecting that the user voice service category is not complaints, inquiry of order status, and inquiry of drug knowledge, that is, detecting that the user does not have the purpose of complaints, inquiry of order status, or inquiry of drug knowledge. The second content recognition model can be used to perform semantic understanding of the second content structured data and generate user small talk feedback content. The second content recognition model can be a large language model. The user small talk feedback content can be small talk content generated for the user voice text. The user small talk feedback content can be used to provide feedback on the user's small talk. Exemplarily, the form of the user small talk feedback content can include text or voice.

[0069] Specifically, when it is detected that the user voice service category is small talk, the user voice text can be converted to obtain the second content structured data. The second content structured data can be input into the second content recognition model, and the second content recognition model is used to perform semantic understanding on the second content structured data to obtain the user chat feedback content. Among them, the second content structured data can be used to characterize the text content in the user voice. Optionally, the second content structured data may include the user voice text or the conversion result of the user voice text. Exemplarily, the second content structured data may be the data obtained by converting the user voice text using the input data structure of the second content recognition model.

[0070] S108. Generate a user voice response based on the user comfort content, target order status, user drug knowledge answer or user chat feedback content, and feed it back to the user.

[0071] Specifically, the user soothing content, target order status, user drug knowledge answers, or user chat feedback content can be input into the real-time voice conversion model, and the user voice response corresponding to the user soothing content, target order status, user drug knowledge answers, or user chat feedback content can be output. Among them, the real-time voice conversion model can be used to perform real-time conversion of user soothing content, target order status, user drug knowledge answers, or user chat feedback content. For example, when a word of user soothing content, target order status, user drug knowledge answers, or user chat feedback content is generated, it is converted into the corresponding voice in real time, and a low-latency voice feedback effect can be achieved. Exemplarily, the real-time voice conversion model can be a TTS (Text To Speech) model.

[0072] The technical solution of the embodiment of the present invention obtains user voice information in real time, performs text recognition and emotion recognition on the user voice information, obtains user voice text and user emotion tags, performs intent recognition on the user voice text and user emotion tags, obtains the user voice service category, and uses different processing methods for different user voice service categories to generate user voice answers, thereby realizing automatic answering of user voices and improving the answering speed and response speed of voice services. Specifically, when it is detected that the user voice service category is complaint, a first content recognition model is used to perform semantic understanding of the user voice text and user emotion tags to obtain user comforting content. When it is detected that the user voice service category is to query the order status, the user voice text is recognized to obtain order query information, and the target order status is queried in the order logistics system based on the order query information. When it is detected that the user voice service category is to query drug knowledge, the user voice text is extracted to generate user drug knowledge questions, and the user drug knowledge questions are used to query the drug knowledge base to determine the user drug knowledge answers corresponding to the user drug knowledge questions. When it is detected that the user voice service category is chatting, the second content recognition model is used to perform semantic understanding on the user voice text to obtain the user chat feedback content. According to the user comforting content, the target order status, the user drug knowledge answer or the user chat feedback content, the user voice answer is generated and fed back to the user. By screening complaints, querying order status, querying drug knowledge and chatting as typical user voice service categories, user voice answers are flexibly generated for typical user voice service categories, which can improve the answering quality of voice services, thereby improving the user experience of voice services.

[0073] In an optional embodiment of the present invention, after generating a user voice answer and feeding back to the user, it also includes: detecting the conversation time interval between the user voice answer and the historical conversation information; when the conversation time interval is less than or equal to a preset time interval, using the user voice answer to update the historical conversation information; when obtaining the user voice information at the next moment, splicing the historical conversation information with the user voice information at the next moment, and updating the user voice information at the next moment.

[0074] The conversation time interval may be the time interval between the user's voice answer and the historical conversation information. Exemplarily, the conversation time interval may be the time interval between the moment of obtaining the user's voice information in real time and the latest update time of the historical conversation information. The conversation time interval may be used to characterize the correlation between the user's voice answer and the historical conversation information. The preset time interval may be a reference detection value for detecting the correlation between the conversation time interval and the historical conversation information. If the conversation time interval is less than or equal to the preset time interval, it may be understood that there is a correlation between the user's voice answer and the historical conversation information; if the conversation time interval is greater than the preset time interval, it may be understood that there is no correlation between the user's voice answer and the historical conversation information. Exemplarily, the preset time interval may be 5 minutes.

[0075] Specifically, after generating a user voice answer and feeding back to the user, the collection time of the user voice information corresponding to the user voice answer and the latest update time of the historical conversation information can be obtained, and the conversation time interval between the collection time of the user voice information and the latest update time of the historical conversation information can be calculated. The conversation time interval can be compared with the preset time interval, and when the conversation time interval is less than or equal to the preset time interval, the user voice answer can be added to the historical conversation information. When obtaining the user voice information at the next moment, the historical conversation information can be spliced ​​with the user voice information at the next moment to update the user voice information at the next moment.

[0076] After generating a user voice answer and feeding back the user, this solution detects the conversation time interval between the user voice answer and the historical conversation information. When the conversation time interval is less than or equal to the preset time interval, the user voice answer is used to update the historical conversation information, and the historical conversation information is spliced ​​with the user voice information at the next moment to update the user voice information at the next moment. This further considers the relevant historical conversation information when understanding the user voice information at the next moment, which can facilitate a better understanding of the user's intention during multiple voice interactions.

[0077] Embodiment 2

[0078] Figure 2A flow chart of a voice question-and-answer method provided for the second embodiment of the present invention. Based on the above embodiments, the embodiment of the present invention concretizes "when it is detected that the user voice service category is to query drug knowledge, the user voice text is extracted to generate user drug knowledge questions, and the user drug knowledge questions are used to query the drug knowledge base to determine the user drug knowledge answers corresponding to the user drug knowledge questions" as "when it is detected that the user voice service category is to query drug knowledge, a knowledge question template is obtained, and the knowledge question template is used to extract the content of the user voice text to generate user drug knowledge questions; the user drug knowledge questions are used to match the alternative drug knowledge questions in the drug knowledge base for consistency questions; according to the consistency question matching results, the user drug knowledge answers corresponding to the user drug knowledge questions are determined in the alternative drug knowledge answers corresponding to the alternative drug knowledge questions". The knowledge question template is introduced to generate user drug knowledge questions, which can improve the accuracy of drug knowledge queries. It should be noted that for the parts not described in detail in the embodiments of the present invention, please refer to the descriptions of other embodiments.

[0079] See also Figure 2 The voice question and answer method shown includes:

[0080] S201. Acquire user voice information in real time.

[0081] S202: Perform text recognition and emotion recognition on the user voice information to obtain the user voice text and the user emotion label.

[0082] S203: Perform intent recognition on the user voice text and the user emotion tag to obtain the user voice service category.

[0083] S204: When it is detected that the user voice service category is a complaint, a first content recognition model is used to perform semantic understanding on the user voice text and the user emotion tag to obtain user comforting content.

[0084] S205. When it is detected that the user voice service category is to query the order status, the user voice text is recognized to obtain order query information, and the target order status is queried in the order logistics system according to the order query information.

[0085] S206. When it is detected that the user voice service category is to query drug knowledge, a knowledge question template is obtained, and the knowledge question template is used to extract content from the user voice text to generate a user drug knowledge question.

[0086] The knowledge question template can be used to normalize the user's voice text, so as to facilitate the query of drug knowledge, thereby improving the accuracy of drug knowledge query. User drug knowledge questions can be normalized query questions of the drug knowledge base. That is, drug knowledge questions that may be stored in the drug knowledge base. For example, the user's voice text can be "How do I take XX?" Where XX is a drug identifier, such as the drug name, drug common name or drug number. The knowledge question template can be "What is the usage and dosage of [drug identifier]?" Correspondingly, the user's drug knowledge question can be "What is the usage and dosage of XX?" For example, the user's voice text can be "I have YY, what should I do with ZZ?" Where YY is the name of a disease; ZZ is a symptom description. The knowledge question template can be "How to treat [disease name] [symptom description]?" Correspondingly, the user's drug knowledge question can be "How to treat YYZZ?" For example, YY is a cold; ZZ is a headache; the user's drug knowledge question can be "How to treat a cold and a headache?"

[0087] Specifically, when it is detected that the user voice service category is to query drug knowledge, a pre-stored knowledge question template can be obtained. The knowledge question template can be used to extract the query key information in the user voice text, fill the extracted query key information into the knowledge question template, and generate the user drug knowledge question. Among them, the query key information can be used to identify the key information associated with drug knowledge in the user voice text. Exemplarily, the query key information may include drug identification, disease identification or symptom description, etc.

[0088] S207: Use the user's drug knowledge questions to match the candidate drug knowledge questions in the drug knowledge base for consistency.

[0089] The drug knowledge base can be used to store candidate drug knowledge questions and candidate drug knowledge answers. Among them, the candidate drug knowledge questions and the candidate drug knowledge answers can be stored correspondingly. The candidate drug knowledge questions can be drug knowledge questions stored in the drug knowledge base. The candidate drug knowledge answers can be drug knowledge answers corresponding to the candidate drug knowledge questions in the drug knowledge base.

[0090] Specifically, the user's drug knowledge questions may be used to perform consistency matching on the drug knowledge questions in the drug knowledge base.

[0091] S208. Determine the user drug knowledge answer corresponding to the user drug knowledge question from among the alternative drug knowledge answers corresponding to the alternative drug knowledge question based on the consistency question matching result.

[0092] The consistency question matching results may include consistency and inconsistency. Consistency can be understood as the existence of alternative drug knowledge questions that are consistent with the user's drug knowledge questions; inconsistency can be understood as the absence of alternative drug knowledge questions that are consistent with the user's drug knowledge questions.

[0093] Specifically, when the consistency question matching result is consistent, the alternative drug knowledge answer corresponding to the alternative drug knowledge question consistent with the user drug knowledge question in the drug knowledge base can be determined as the user drug knowledge answer corresponding to the user drug knowledge question.

[0094] In an optional embodiment of the present invention, based on the consistency question matching result, the user drug knowledge answer corresponding to the user drug knowledge question is determined from the alternative drug knowledge answers corresponding to the alternative drug knowledge question, including: when the consistency question matching result is inconsistent, keyword matching is performed on the user drug knowledge question and the alternative drug knowledge questions in the drug knowledge base to obtain a keyword matching result; vector matching is performed on the user drug knowledge question and the alternative drug knowledge questions in the drug knowledge base to obtain a vector matching result; and the keyword matching results and the vector matching results are screened to obtain the user drug knowledge answer corresponding to the user drug knowledge question.

[0095] The keyword matching result may be an alternative drug knowledge answer obtained by matching the first keyword of the user's drug knowledge question with the second keyword of the alternative drug knowledge question in the drug knowledge base. Optionally, the number of keyword matching results may be at least one. Optionally, the keyword matching result may include the alternative drug knowledge question that best matches the user's drug knowledge question or multiple alternative drug knowledge answers that are relatively matched with the user's drug knowledge question. Among them, the first keyword may be a keyword included in the user's drug knowledge question; the second keyword may be a keyword included in a single alternative drug knowledge question. Exemplarily, the keyword matching result may be the similarity between the first keyword and the second keyword. The vector matching result may be an alternative drug knowledge answer obtained by matching the first vector of the user's drug knowledge question with the second vector of the alternative drug knowledge question in the drug knowledge base. Optionally, the number of vector matching results may be at least one. Optionally, the vector matching result may include the alternative drug knowledge question that best matches the user's drug knowledge question or multiple alternative drug knowledge answers that are relatively matched with the user's drug knowledge question. Among them, the first vector may be a vectorized result of the user's drug knowledge question; the second vector may be a vectorized result of a single alternative drug knowledge question. Exemplarily, the vector matching result may be the similarity between the first vector and the second vector. In comparison, the vector matching result may characterize the matching between the user's drug knowledge question and the candidate drug knowledge question from the overall perspective of the user's drug knowledge question; the keyword matching result may characterize the matching between the user's drug knowledge question and the candidate drug knowledge question from the perspective of the key information of the user's drug knowledge question.

[0096] Specifically, when the consistency problem matching result is inconsistent, a keyword extraction may be performed on the user's drug knowledge question to obtain a first keyword of the user's drug knowledge question. A keyword extraction may be performed on the alternative drug knowledge question in the drug knowledge base to obtain a second keyword of the alternative drug knowledge question. A similarity calculation may be performed on the first keyword and the second keyword to obtain a keyword similarity. The keyword similarity may be compared with a preset keyword similarity. When the keyword similarity is greater than or equal to the preset keyword similarity, the alternative drug knowledge answer to the alternative drug knowledge question corresponding to the maximum value of the keyword similarity may be determined as the keyword matching result. The user's drug knowledge question may be vectorized to obtain a first vector. The alternative drug knowledge question in the drug knowledge base may be vectorized to obtain a second vector. A similarity calculation may be performed between the first vector and the second vector to obtain a vector similarity. The vector similarity may be compared with a preset vector similarity. When the vector similarity is greater than or equal to the preset vector similarity, the alternative drug knowledge answer to the alternative drug knowledge question corresponding to the maximum value of the vector similarity may be determined as the vector matching result. The keyword matching result and the vector matching result may be tested for consistency. When the keyword matching result and the vector matching result are consistent, the keyword matching result or the vector matching result may be determined as the user drug knowledge answer corresponding to the user drug knowledge question.

[0097] In an optional embodiment of the present invention, the number of keyword matching results is multiple; the number of vector matching results is multiple; accordingly, the keyword matching results and the vector matching results are screened to obtain user drug knowledge answers corresponding to user drug knowledge questions, including: performing correlation detection on each keyword matching result, each vector matching result and the user drug knowledge question to obtain ranking results of each keyword matching result and each vector matching result; and determining the user drug knowledge answer corresponding to the user drug knowledge question based on the ranking results.

[0098] The number of keyword matching results is multiple, which can be understood as the keyword matching results are multiple candidate drug knowledge answers that are relatively matched with the user's drug knowledge question. The number of vector matching results is multiple, which can be understood as the vector matching results are multiple candidate drug knowledge answers that are relatively matched with the user's drug knowledge question. The ranking results of each keyword matching result and each vector matching result can be the result of ranking the candidate drug knowledge answers corresponding to each candidate drug knowledge question according to the correlation between the user's drug knowledge question and the candidate drug knowledge question.

[0099] Specifically, the keyword matching results or vector matching results and the user's drug knowledge questions can be input into the relevance detection model, and the relevance detection can be performed on each keyword matching result and the user's drug knowledge question, or the relevance detection can be performed on each keyword matching result and the user's drug knowledge question, to obtain the matching similarity between each keyword matching result or each vector matching result and the user's drug knowledge question; the matching similarity corresponding to each keyword matching result and the matching similarity corresponding to each vector keyword matching result can be sorted to obtain the sorting results of each keyword matching result and each vector matching result. The alternative drug knowledge answer corresponding to the maximum matching similarity can be used to determine the user drug knowledge answer corresponding to the user's drug knowledge question.

[0100] Optionally, before performing correlation detection on each keyword matching result, each vector matching result and the user's drug knowledge question and obtaining the ranking results of each associated word matching result and each vector matching result, each keyword matching result and each vector matching result are deduplicated and updated. In this way, duplicate candidate drug knowledge answers in each keyword matching result and each vector matching result can be eliminated, which can improve the detection efficiency of the user's drug knowledge answer.

[0101] This solution performs correlation detection on each keyword matching result, each vector matching result and the user's drug knowledge question to obtain the ranking result of each keyword matching result and each vector matching result. According to the ranking result, the user drug knowledge answer corresponding to the user drug knowledge question is determined. The correlation between each keyword matching result, each vector matching result and the user's drug knowledge question is taken into account, which can improve the detection accuracy of the user drug knowledge answer.

[0102] This solution introduces keyword matching and vector matching between the user's drug knowledge question and the alternative drug knowledge questions in the drug knowledge base when the consistency question matching results are inconsistent. By further screening the keyword matching results and the vector matching results, the user drug knowledge answer corresponding to the user drug knowledge question is obtained, and the user drug knowledge answer is determined when the consistency question matching results are inconsistent, thereby improving the accuracy of the user drug knowledge answer, thereby improving the accuracy of voice question and answer.

[0103] S209: When it is detected that the user voice service category is small talk, a second content recognition model is used to perform semantic understanding on the user voice text to obtain user small talk feedback content.

[0104] S210: Generate a user voice response based on the user comforting content, target order status, user drug knowledge answer or user chat feedback content, and feed back to the user.

[0105] The technical solution of the embodiment of the present invention introduces a knowledge question template to standardize user drug knowledge questions, thereby generating user drug knowledge questions, which can improve the accuracy of drug knowledge query.

[0106] Figure 3 FIG. 1 is a flow chart of a voice question-answering method. Based on the above embodiment, Figure 3 This is a preferred embodiment of the present invention. Figure 3 The voice question-and-answer method shown includes: obtaining user voice information (i.e., user voice) in real time; using a VAD model to detect whether there is user voice information at the next moment; if there is no user voice information at the next moment, using an ASR model to perform text recognition on the user voice information to obtain a user voice text (voice text); using a Sense recognition model to perform emotion recognition on the user voice information to obtain a user emotion tag (i.e., tone, emotion). The user voice text and the user emotion tag can be used for intention recognition to determine the user voice service category. When the user voice service category is complaint and complaint (i.e., complaint / complaint), LLM (large language model) is used to perform semantic understanding on the user voice text and the user emotion tag, generate user comfort content (i.e., comfort content), and record relevant content. When the user voice service category is to query the order status, LLM (large language model) is used to query the target order status in the order logistics system and record relevant content. When the user voice service category is chatting, LLM (large language model) is used to generate user chat feedback content and provide it to the chat robot. When the user voice service category is to query drug knowledge (i.e. drug-related content), LLM (large language model) is used to enhance the knowledge base retrieval and obtain the user's drug knowledge answer. The TTS model is used to generate user voice questions and answers (i.e. voice questions and answers) based on the user's soothing content, target order status, user chat feedback content or user drug knowledge answers, and record historical conversation information (i.e. historical information) based on the user's voice questions and answers. The historical conversation information is spliced ​​with the user's voice information at the next moment, and the user's voice information at the next moment is updated. And user voice questions and answers are generated for the user's voice information at the next moment. Among them, Figure 4 is a flow chart of a voice question answering method. Specifically, Figure 4 The specific process of enhancing knowledge base retrieval. Figure 4As shown, a knowledge question template is used to extract the content of the user's voice text to generate a user's drug knowledge question (i.e., query rewriting). The user's drug knowledge question can be used to match the alternative drug knowledge question in the drug knowledge base with the alternative drug knowledge question in the drug knowledge base; when the consistency problem matching result is consistent, the alternative drug knowledge answer corresponding to the alternative drug knowledge question consistent with the user's drug knowledge question in the drug knowledge base is determined as the user drug knowledge answer corresponding to the user's drug knowledge question (i.e., question matching). When the consistency problem matching result is inconsistent, the user's drug knowledge question and the alternative drug knowledge question in the drug knowledge base are keyword matched to obtain a keyword matching result (i.e., keyword matching). The user's drug knowledge question and the alternative drug knowledge question in the drug knowledge base are vector matched to obtain a vector matching result (i.e., vector matching). De-duplicate each keyword matching result and each vector matching result, and update each keyword matching result and each vector matching result (i.e., document filtering). The updated keyword matching results and each vector matching results are subjected to correlation detection with the user's drug knowledge question to obtain the ranking results of each keyword matching result and each vector matching result. The keyword matching result or vector matching result most relevant to the user's drug knowledge question is determined as the user's drug knowledge answer corresponding to the user's drug knowledge question.

[0107] This solution can achieve fast voice response and answer without manual answering.

[0108] Embodiment 3

[0109] Figure 5 This is a schematic diagram of the structure of a voice question-and-answer device provided in Embodiment 3 of the present invention. The embodiment of the present invention can be applied to the situation of providing feedback on the user voice of an e-commerce mall. The device can execute a voice question-and-answer method. The device can be implemented in the form of hardware and / or software. The device can be configured in an electronic device that carries a voice question-and-answer function.

[0110] See also Figure 5The voice question and answer device shown includes: a user voice information acquisition module 501, a user voice information processing module 502, a user voice service intention recognition module 503, a user soothing content generation module 504, a target order status query module 505, a user drug knowledge query module 506, a user chat feedback module 507 and a user voice answer generation module 508. Among them, the user voice information acquisition module 501 is used to acquire user voice information in real time; the user voice information processing module 502 is used to perform text recognition and emotion recognition on the user voice information to obtain user voice text and user emotion tags; the user voice service intention recognition module 503 is used to perform intention recognition on the user voice text and the user emotion tags to obtain the user voice service category; the user soothing content generation module 504 is used to use the first content recognition model to semantically understand the user voice text and the user emotion tags when it is detected that the user voice service category is complaint and complain, so as to obtain user soothing content; the target order status query module 505 is used to recognize the user voice text when it is detected that the user voice service category is to query the order status, obtain order query information, and generate user soothing content according to the user voice service category; The order query information is used to query the target order status in the order logistics system; the user drug knowledge query module 506 is used to extract the content of the user voice text when it is detected that the user voice service category is to query drug knowledge, generate user drug knowledge questions, and use the user drug knowledge questions to query the drug knowledge base to determine the user drug knowledge answers corresponding to the user drug knowledge questions; the user chat feedback module 507 is used to use the second content recognition model to semantically understand the user voice text when it is detected that the user voice service category is chatting, and obtain the user chat feedback content; the user voice answer generation module 508 is used to generate user voice answers based on the user comfort content, the target order status, the user drug knowledge answers or the user chat feedback content, and feed back to the user.

[0111] The technical solution of the embodiment of the present invention obtains user voice information in real time, performs text recognition and emotion recognition on the user voice information, obtains user voice text and user emotion tags, performs intent recognition on the user voice text and user emotion tags, obtains the user voice service category, and uses different processing methods for different user voice service categories to generate user voice answers, thereby realizing automatic answering of user voices and improving the answering speed and response speed of voice services. Specifically, when it is detected that the user voice service category is complaint, a first content recognition model is used to perform semantic understanding of the user voice text and user emotion tags to obtain user comforting content. When it is detected that the user voice service category is to query the order status, the user voice text is recognized to obtain order query information, and the target order status is queried in the order logistics system based on the order query information. When it is detected that the user voice service category is to query drug knowledge, the user voice text is extracted to generate user drug knowledge questions, and the user drug knowledge questions are used to query the drug knowledge base to determine the user drug knowledge answers corresponding to the user drug knowledge questions. When it is detected that the user voice service category is chatting, the second content recognition model is used to perform semantic understanding on the user voice text to obtain the user chat feedback content. According to the user comforting content, the target order status, the user drug knowledge answer or the user chat feedback content, the user voice answer is generated and fed back to the user. By screening complaints, querying order status, querying drug knowledge and chatting as typical user voice service categories, user voice answers are flexibly generated for typical user voice service categories, which can improve the answering quality of voice services, thereby improving the user experience of voice services.

[0112] In an optional embodiment of the present invention, the user drug knowledge query module 506 includes: a user drug knowledge question generation unit, which is used to obtain a knowledge question template when it is detected that the user voice service category is to query drug knowledge, and use the knowledge question template to extract content from the user voice text to generate a user drug knowledge question; a drug knowledge question consistency detection unit, which is used to use the user drug knowledge question to match the alternative drug knowledge questions in the drug knowledge base with consistency questions; and a user drug knowledge answer generation unit, which is used to determine the user drug knowledge answer corresponding to the user drug knowledge question from the alternative drug knowledge answers corresponding to the alternative drug knowledge question based on the consistency question matching result.

[0113] In an optional embodiment of the present invention, the user drug knowledge answer generation unit includes: a keyword matching subunit, which is used to perform keyword matching on the user drug knowledge question and the alternative drug knowledge questions in the drug knowledge base when the consistency question matching result is inconsistent, to obtain a keyword matching result; a vector matching subunit, which is used to perform vector matching on the user drug knowledge question and the alternative drug knowledge questions in the drug knowledge base, to obtain a vector matching result; and a user drug knowledge answer generation subunit, which is used to screen the keyword matching result and the vector matching result to obtain a user drug knowledge answer corresponding to the user drug knowledge question.

[0114] In an optional embodiment of the present invention, the number of the keyword matching results is multiple; the number of the vector matching results is multiple; accordingly, the user drug knowledge answer generation subunit includes: a matching result sorting subunit, which is used to perform correlation detection on each of the keyword matching results, each of the vector matching results and the user drug knowledge question, and obtain a sorting result of each of the keyword matching results and each of the vector matching results; a user drug knowledge answer generation subunit, which is used to determine the user drug knowledge answer corresponding to the user drug knowledge question according to the sorting result.

[0115] In an optional embodiment of the present invention, the device also includes: a conversation time interval detection module, which is used to detect the conversation time interval between the user voice answer and the historical conversation information after the user voice answer is generated and fed back to the user; a historical conversation information updating module, which is used to use the user voice answer to update the historical conversation information when the conversation time interval is less than or equal to a preset time interval; and a user voice information updating module, which is used to splice the historical conversation information with the user voice information at the next moment when acquiring the user voice information at the next moment, and update the user voice information at the next moment.

[0116] In an optional embodiment of the present invention, the device also includes: a next-moment voice information detection module, which is used to detect whether there is voice information at the next moment after the real-time acquisition of user voice information; a user voice information detection module, which is used to detect whether the voice information at the next moment is user voice information when the voice information at the next moment exists; and a next-moment user voice information acquisition module, which is used to stop outputting the user voice answer and acquire the user voice information at the next moment when the voice information at the next moment is user voice information.

[0117] The voice question and answer device provided in the embodiment of the present invention can execute the voice question and answer method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0118] In the technical solution of the embodiment of the present invention, the acquisition, storage and application of user voice information, knowledge question templates, voice information at the next moment and user voice information at the next moment, etc., all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0119] Embodiment 4

[0120] Figure 6 A schematic diagram of the structure of an electronic device 600 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0121] like Figure 6 As shown, the electronic device 600 includes at least one processor 601, and a memory connected to the at least one processor 601, such as a read-only memory (ROM) 602, a random access memory (RAM) 603, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 601 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 602 or the computer program loaded from the storage unit 608 to the random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0122] Multiple components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0123] Processor 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of processor 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. Processor 601 performs the various methods and processes described above, such as a voice question answering method.

[0124] In some embodiments, the voice question and answer method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the processor 601, one or more steps of the voice question and answer method described above may be performed. Alternatively, in other embodiments, the processor 601 may be configured to perform the voice question and answer method in any other suitable manner (e.g., by means of firmware).

[0125] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0126] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0127] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0128] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0129] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0130] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS (Virtual Private Server) services.

[0131] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0132] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A voice question-answering method, characterized in that: The method comprises: Get user voice information in real time; Performing text recognition and emotion recognition on the user voice information to obtain user voice text and user emotion labels; Performing intent recognition on the user voice text and the user emotion label to obtain a user voice service category; When it is detected that the user voice service category is a complaint, a first content recognition model is used to perform semantic understanding on the user voice text and the user emotion label to obtain user comforting content; When it is detected that the user voice service category is to query the order status, the user voice text is recognized to obtain order query information, and the target order status is queried in the order logistics system according to the order query information; When it is detected that the user voice service category is to query drug knowledge, content extraction is performed on the user voice text to generate a user drug knowledge question, and the user drug knowledge question is used to query the drug knowledge base to determine the user drug knowledge answer corresponding to the user drug knowledge question; When it is detected that the user voice service category is small talk, a second content recognition model is used to perform semantic understanding on the user voice text to obtain user small talk feedback content; A user voice response is generated based on the user comforting content, the target order status, the user's drug knowledge answer or the user's chat feedback content, and the response is fed back to the user.

2. The method according to claim 1, characterized in that When it is detected that the user voice service category is to query drug knowledge, content extraction is performed on the user voice text to generate a user drug knowledge question, and the user drug knowledge question is used to query the drug knowledge base to determine the user drug knowledge answer corresponding to the user drug knowledge question, including: When it is detected that the user voice service category is to query drug knowledge, a knowledge question template is obtained, and the knowledge question template is used to extract content from the user voice text to generate a user drug knowledge question; Using the user's drug knowledge questions, matching candidate drug knowledge questions in a drug knowledge base with consistency questions; According to the consistency question matching result, the user drug knowledge answer corresponding to the user drug knowledge question is determined from the alternative drug knowledge answers corresponding to the alternative drug knowledge question.

3. The method according to claim 2, characterized in that The step of determining, based on the consistency question matching result, the user drug knowledge answer corresponding to the user drug knowledge question from the candidate drug knowledge answers corresponding to the candidate drug knowledge question, includes: When the consistency question matching result is inconsistent, keyword matching is performed on the user's drug knowledge question and the candidate drug knowledge questions in the drug knowledge base to obtain a keyword matching result; Perform vector matching on the user's drug knowledge questions and the candidate drug knowledge questions in the drug knowledge base to obtain vector matching results; The keyword matching results and the vector matching results are screened to obtain a user drug knowledge answer corresponding to the user drug knowledge question.

4. The method according to claim 3, characterized in that The number of the keyword matching results is multiple; the number of the vector matching results is multiple; Accordingly, the keyword matching results and the vector matching results are screened to obtain the user drug knowledge answer corresponding to the user drug knowledge question, including: Performing correlation detection on each of the keyword matching results, each of the vector matching results and the user's drug knowledge question to obtain a ranking result of each of the keyword matching results and each of the vector matching results; According to the ranking result, the user drug knowledge answer corresponding to the user drug knowledge question is determined.

5. The method according to claim 1, characterized in that After generating the user voice answer and feeding back to the user, the method further includes: Detecting the conversation time interval between the user's voice answer and the historical conversation information; When the conversation time interval is less than or equal to a preset time interval, using the user voice answer to update the historical conversation information; When acquiring the user voice information at the next moment, the historical conversation information is concatenated with the user voice information at the next moment to update the user voice information at the next moment.

6. The method according to claim 1, characterized in that After acquiring the user voice information in real time, the method further includes: Detect whether there is voice information at the next moment; When the voice information at the next moment exists, detecting whether the voice information at the next moment is user voice information; When the voice information at the next moment is user voice information, stop outputting the user voice answer and obtain the user voice information at the next moment.

7. A voice question-answering device, characterized in that: The device comprises: User voice information acquisition module, used to acquire user voice information in real time; A user voice information processing module, used to perform text recognition and emotion recognition on the user voice information to obtain user voice text and user emotion labels; A user voice service intention recognition module is used to perform intention recognition on the user voice text and the user emotion label to obtain the user voice service category; A user soothing content generation module is used to, when detecting that the user voice service category is a complaint, use a first content recognition model to perform semantic understanding on the user voice text and the user emotion label to obtain user soothing content; A target order status query module is used to recognize the user voice text when it is detected that the user voice service category is to query the order status, obtain order query information, and query the target order status in the order logistics system according to the order query information; A user drug knowledge query module is used to extract content from the user voice text when it is detected that the user voice service category is to query drug knowledge, generate user drug knowledge questions, and use the user drug knowledge questions to query the drug knowledge base to determine the user drug knowledge answer corresponding to the user drug knowledge question; A user chat feedback module is used to use a second content recognition model to perform semantic understanding on the user voice text to obtain user chat feedback content when detecting that the user voice service category is chat; The user voice answer generation module is used to generate a user voice answer and feed back to the user based on the user comfort content, the target order status, the user's drug knowledge answer or the user's chat feedback content.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the voice question-answering method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the voice question-answering method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the voice question-answering method according to any one of claims 1 to 6 is implemented.