Voice dialogue method, device, equipment, storage medium and product

By combining the text matching model and the large language model of the cloud service platform, the problem of inaccurate intent recognition in multi-turn conversation scenarios is solved, resulting in more efficient voice dialogue effects and user experience.

CN119314478BActive Publication Date: 2025-10-28SHENZHEN MAXTOP DIGITAL TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411401603.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-10-28
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

Existing technologies are unable to discern the user's actual intent when dealing with complex scenarios such as multi-turn conversations, resulting in poor voice dialogue quality.

Method used

By deploying a large language model through a cloud service platform, and using a text matching model to perform context matching between the user's historical dialogue information and the user's initial input text information, the target text information after matching is generated and then used as prompt words to be input into the large language model to generate response speech information.

Benefits of technology

It improves the accuracy of voice dialogue and user experience, can more accurately identify the user's actual intentions, and enhances the voice dialogue effect in multi-turn conversation scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119314478B_ABST
    Figure CN119314478B_ABST
Patent Text Reader

Abstract

This application discloses a voice dialogue method, apparatus, device, storage medium, and product, relating to the field of cloud computing technology. The disclosed voice dialogue method includes: acquiring user-input voice information and the user's historical dialogue information, and performing text recognition on the voice information to obtain initial text information; based on the historical dialogue information and the initial text information, performing context matching through a preset text matching model to obtain matched target text information; generating prompt words corresponding to the target text information; inputting the prompt words into a preset large language model, receiving and outputting the response voice information output by the large language model. This application, by performing context matching on historical dialogue information and initial text information, obtains target text information with a complete context connecting multiple rounds of conversation, enabling the large language model to more accurately identify the user's actual intent, thereby improving the effectiveness of voice dialogue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to voice dialogue methods, apparatus, devices, storage media and products. Background Technology

[0002] Currently, with the development of artificial intelligence, the functions of smartwatches are also increasing. Among them, the voice interaction function of smartwatches is a specific application of modern artificial intelligence technology in the field of wearable devices. It typically includes technologies such as speech recognition, natural language processing, and speech synthesis, allowing users to interact with the device through voice, perform various operations, and obtain information.

[0003] Related technologies typically employ Natural Language Processing (NLP) to understand users' natural language commands and generate corresponding text responses. Speech synthesis is then used to convert the text into speech, providing audio feedback and enhancing the user experience. However, NLP only focuses on the current user input and cannot discern the user's true intent in complex scenarios such as multi-turn conversations, resulting in poor voice dialogue quality.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main purpose of this application is to provide a voice dialogue method that aims to solve the technical problem of poor voice dialogue quality caused by the inability to identify the user's actual intention in complex scenarios such as multi-turn user conversations.

[0006] To achieve the above objectives, this application proposes a voice dialogue method applied to a cloud service platform, wherein a large language model is deployed in the cloud service platform, and the voice dialogue method includes:

[0007] Acquire the user's input voice information and the user's historical dialogue information, and perform text recognition on the voice information to obtain initial text information;

[0008] Based on the historical dialogue information and the initial text information, context matching is performed using a preset text matching model to obtain the matched target text information;

[0009] Generate prompt words corresponding to the target text information;

[0010] The prompt words are input into a preset large language model, and the corresponding voice information output by the large language model is received and output. The corresponding voice information is generated by the large language model from the prompt words based on the corresponding output instructions.

[0011] Optionally, the step of obtaining the matched target text information by performing context matching based on the historical dialogue information and the initial text information using a preset text matching model includes:

[0012] Determine the session scenario information of the initial text information;

[0013] Based on the conversation scenario information, the historical dialogue information is filtered to obtain filtered historical dialogue information, wherein the filtered historical dialogue information and the current initial text information belong to the same conversation scenario.

[0014] The filtered historical dialogue information is matched with the initial text information to obtain the correlation value of each filtered historical dialogue information. The historical dialogue information in the filtered historical dialogue information whose correlation value is greater than the preset correlation value threshold is retained to obtain the historical dialogue information after secondary filtering.

[0015] The historical dialogue information after secondary filtering is combined with the initial text information to form a matched target text information containing complete context information.

[0016] Optionally, before the step of acquiring the user's input voice information and the user's historical dialogue information, and performing text recognition on the voice information to obtain initial text information, the method includes:

[0017] Obtain text information samples, historical dialogue text samples of the text information samples, and matching text tags of the text information samples;

[0018] Based on the text information samples, the historical dialogue text samples, and the matching text tags, the preset training model is iteratively trained to obtain the text matching model.

[0019] Optionally, the step of iteratively training a preset model to obtain a text matching model based on the text information samples, the historical dialogue text samples, and the matching text tags includes:

[0020] Obtain the dialogue time information of the historical dialogue text sample;

[0021] Based on the dialogue time information, determine the time weight;

[0022] Based on the text information samples, the time weights, the historical dialogue text samples, and the matching text tags, the preset training model is iteratively trained to obtain the text matching model.

[0023] Optionally, the step of iteratively training a preset model to obtain a text matching model based on the text information samples, the time weights, the historical dialogue text samples, and the matching text tags includes:

[0024] Based on the text information samples, the time weights, and the historical dialogue text samples, context matching is performed using a preset training model to obtain the predicted matching result.

[0025] The difference between the predicted matching result and the matched text label is calculated to obtain the error result;

[0026] Based on the error result, determine whether the error result meets the error standard indicated by the preset error threshold range;

[0027] If the error result does not meet the error standard indicated by the preset error threshold range, the process returns to the step of performing context matching based on the text information sample, the time weight, and the historical dialogue text sample using the preset model to be trained to obtain the predicted matching result. Training stops when the error result meets the error standard indicated by the preset error threshold range, and a text matching model is obtained.

[0028] Optionally, the step of generating prompt words corresponding to the target text information includes:

[0029] Keyword extraction is performed on the target text information to obtain keyword information;

[0030] Based on a preset set of text expansion templates, the keyword information is matched to obtain the target expansion template;

[0031] The target text information and the target extended template are combined to obtain the prompt word.

[0032] Furthermore, to achieve the above objectives, this application also proposes a voice dialogue device, the voice dialogue device comprising:

[0033] The acquisition module is used to acquire the user's input voice information and the user's historical dialogue information, and to perform text recognition on the voice information to obtain initial text information;

[0034] The matching module is used to perform context matching based on the historical dialogue information and the initial text information, using a preset text matching model, to obtain the matched target text information.

[0035] The generation module is used to generate prompt words corresponding to the target text information;

[0036] The output module is used to input the prompt words into a preset large language model, receive the response speech information output by the large language model and output it, wherein the response speech information is generated by the large language model based on the response output instructions and the prompt words.

[0037] In addition, to achieve the above objectives, this application also proposes a voice dialogue device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the voice dialogue method as described above.

[0038] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and which, when executed by a processor, implements the steps of the voice dialogue method described above.

[0039] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the voice dialogue method described above.

[0040] One or more technical solutions proposed in this application have at least the following technical effects:

[0041] In contrast to related technologies, which typically employ Natural Language Processing (NLP) to understand user commands and generate corresponding text responses, followed by speech synthesis to convert the text into speech and provide feedback, thus enhancing the user experience, NLP in these technologies only focuses on the current user input. In complex scenarios involving multiple turns of conversation, it fails to discern the user's true intent, resulting in poor voice dialogue quality. This application addresses this by using a text matching model within a cloud service platform to perform contextual matching between the user's historical dialogue information and the initial user input. This results in a matched target text, and prompts from this target text are input into a pre-defined large language model to generate and output the generated response speech to the user. It is understood that upon receiving the current user input, the cloud service platform first needs to match historical dialogue information to obtain the matched target text. This matched target text incorporates the complete context from multiple turns of conversation. Prompts generated from this matched target text allow the large language model to more accurately identify the user's true intent, thereby improving the voice dialogue effect and ultimately enhancing the user experience. Attached Figure Description

[0042] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0043] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 This is a flowchart illustrating the first embodiment of the voice dialogue method of this application;

[0045] Figure 2 This is a flowchart illustrating the second embodiment of the voice dialogue method of this application;

[0046] Figure 3 This is a schematic diagram of the module structure of the voice dialogue device according to an embodiment of this application;

[0047] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the voice dialogue method in the embodiments of this application.

[0048] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0049] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0050] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0051] The main solution of this application embodiment is as follows: acquiring user-input voice information and the user's historical dialogue information, and performing text recognition on the voice information to obtain initial text information; based on the historical dialogue information and the initial text information, performing context matching through a preset text matching model to obtain matched target text information; generating prompt words corresponding to the target text information; inputting the prompt words into a preset large language model, receiving and outputting the response voice information output by the large language model, wherein the response voice information is generated by the large language model based on the response output instruction, and the prompt words are processed into sentences.

[0052] In this embodiment, a cloud service platform is used as the execution entity. For ease of description, it will be referred to as "platform" below.

[0053] Because related technologies typically employ Natural Language Processing (NLP) to understand users' natural language commands and generate corresponding text responses, followed by speech synthesis to convert the text into speech output, providing voice feedback and enhancing the user experience. However, NLP in these technologies only focuses on the single piece of information input by the user at any given moment. When handling complex scenarios such as multi-turn conversations, it fails to discern the user's actual intent, resulting in poor voice dialogue performance.

[0054] This application provides a solution for enabling voice dialogue on smartwatches, improving the effectiveness of voice dialogue, and thus enhancing the user experience.

[0055] As can be seen from the above embodiments, this application uses a text matching model in a cloud service platform to perform contextual matching between the user's historical dialogue information and the initial text information input by the user, obtaining the matched target text information. The prompt words of the target text information are then input into a preset large language model to obtain and output the response speech information generated by the large language model to the user. It is understood that after receiving the text information input by the user, the cloud service platform first needs to match the historical dialogue information to obtain the matched target text information. The matched target text information is text information that connects the complete context obtained from multiple rounds of conversation. The prompt words generated based on the matched target text information enable the large language model to more accurately identify the user's actual intention, thereby improving the effect of voice dialogue and ultimately enhancing the user experience.

[0056] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or terminal system capable of performing the above functions. The following description uses a voice dialogue device as an example to illustrate this embodiment and the subsequent embodiments.

[0057] Based on this, embodiments of this application provide a voice dialogue method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the voice dialogue method of this application.

[0058] In this embodiment, the voice dialogue method includes steps S100~S400:

[0059] Step S100: Obtain the voice information input by the user and the user's historical dialogue information, and perform text recognition on the voice information to obtain initial text information;

[0060] It should be noted that the aforementioned voice dialogue method is applied to a cloud service platform, in which a large language model is deployed. The cloud service platform is an online platform that provides remote computing resources and services. It allows users to access and use computing resources such as storage, software, databases, networks, and servers via the internet without requiring significant capital investment or maintenance on local computers or servers. Specifically, the cloud service platform communicates with the user's smartwatch, providing voice dialogue services; that is, the cloud service platform receives the user's voice information, understands its meaning, and outputs corresponding response voice information.

[0061] In specific implementation, the user-input voice information refers to audio data recorded by the user through a voice input device or application. The user's historical dialogue information refers to the voice / or text dialogue information between the same user and the cloud service platform over a historical period, including but not limited to user input information, platform-output response information, and the user's satisfaction level with the response information.

[0062] In its implementation, the platform obtains users' voice information and historical dialogue information by providing API interfaces. Specifically, the platform can record and store users' historical dialogue information with intelligent robots or other services, and obtain users' historical dialogue information through the historical dialogue recording function.

[0063] In its implementation, the platform performs text recognition on the voice information to obtain initial text information. Specifically, the platform uses preset voice recognition technology to convert the user's voice input into text information in real time. For example, the platform supports single-sentence mode based on a pre-developed real-time voice recognition service, which is suitable for scenarios requiring interaction with the system, such as outbound calls and control commands.

[0064] Step S200: Based on the historical dialogue information and the initial text information, context matching is performed using a preset text matching model to obtain the matched target text information;

[0065] It should be noted that the text matching model refers to a pre-trained deep neural network model for text matching. Specifically, it is a text matching model obtained by iteratively training a preset model to be trained based on the text information sample, the historical dialogue text sample, and the matching text label.

[0066] In its specific implementation, the matched target text information refers to all other words or sentences in the text that are related to the currently processed word or phrase. Specifically, in this application, the matched target text information includes the user's historical questions and the user's latest questions. It is understood that user Q&A interactions often involve multiple rounds of conversation. In this scenario, the user's latest question is a follow-up to a historical question, i.e., the user's latest question is posed on top of a historical question. For example, the user's historical question might be "What is artificial intelligence?" while the user's latest question might be "What is a model?". In a multi-round conversation scenario, the user's actual intention is to explain the meaning of a model in the field of artificial intelligence. Therefore, this application needs to consider the combination of the user's historical questions and the user's latest questions, rather than only answering the user's latest question. If only the user's latest question is considered, the response text for the user's "What is a model?" will usually explain the meaning of a model in various fields, failing to accurately identify the user's actual intention, i.e., explaining the meaning of a model in the field of artificial intelligence. In this application, the cloud service platform considers the user's multi-round conversations, identifies the user's actual intention as explaining the meaning of a model in the field of artificial intelligence, and outputs accurate and satisfactory response voice to the user, thereby improving the effect of voice dialogue and ultimately enhancing the user experience.

[0067] In its specific implementation, the platform performs context matching based on the historical dialogue information and the initial text information using a preset text matching model to obtain the matched target text information. This process includes:

[0068] Determine the conversation scenario information of the initial text information; based on the conversation scenario information, filter the historical dialogue information to obtain filtered historical dialogue information, wherein the filtered historical dialogue information and the current initial text information belong to the same conversation scenario; perform relevance matching between the filtered historical dialogue information and the initial text information to obtain the relevance value of each filtered historical dialogue information, and retain the historical dialogue information in the filtered historical dialogue information whose relevance value is greater than a preset relevance value threshold to obtain the second-filtered historical dialogue information; combine the second-filtered historical dialogue information with the initial text information to form a matched target text information containing complete context information.

[0069] It should be noted that the conversation scenario information refers to the background information, situational settings, participant information, topic development, etc., involved in the dialogue. This information collectively constitutes the environment and context in which the dialogue occurs. The device extracts the corresponding conversation scenario information from the conversation to be extracted. For example, if the conversation to be extracted is: "Recommend the best route home", then the platform determines that the conversation scenario information is a route query-related scenario in the transportation field.

[0070] In the specific implementation, the platform filters out the corresponding historical dialogue information from the historical dialogue information based on the conversation scenario information of the initial text information. The filtered historical dialogue information belongs to the same conversation scenario as the current initial text information. That is, one filtering removes historical dialogue information that does not belong to the same conversation scenario and only retains historical dialogue information that belongs to the same conversation scenario as the initial text information.

[0071] In the specific implementation, after the platform filters out historical dialogue information with the same conversation scenario, it is necessary to perform relevance matching for multiple historical dialogue information. This relevance matching usually considers the knowledge association between the historical dialogue information and the initial text information, as well as the contextual fluency after text connection. The higher the knowledge association and contextual fluency, the greater the relevance value of the historical dialogue information. Through secondary filtering, the platform retains only historical dialogue information with a relevance value greater than the preset relevance value threshold, that is, the historical dialogue information after secondary filtering, so as to accurately find the contextual information related to the initial text information. Finally, the platform combines the historical dialogue information after secondary filtering with the initial text information to form the matched target text information containing complete contextual information.

[0072] It should be noted that the relevance matching between historical dialogue information and initial text information is influenced by time weight and dialogue satisfaction evaluation weight. The time weight is determined based on the time interval between the historical dialogue information and the initial text information. The closer the time interval, the stronger the relevance between the historical dialogue information and the initial text information, and the greater the time weight; conversely, the farther the time interval, the weaker the relevance between the historical dialogue information and the initial text information, and the smaller the time weight. The dialogue satisfaction evaluation weight is determined based on the user's satisfaction rating of the historical dialogue information. The higher the user's rating of the historical dialogue information, the more interested the user is in further engaging in conversation about related knowledge. Therefore, the stronger the relevance between the user's subsequent initial text information and the historical dialogue information, and the higher the dialogue satisfaction evaluation weight. Conversely, the lower the user's rating of the historical dialogue information, the less interested the user is in further engaging in conversation about related knowledge. Therefore, the weaker the relevance between the user's subsequent initial text information and the historical dialogue information, and the lower the dialogue satisfaction evaluation weight.

[0073] Furthermore, since the influence of the time dimension is more accurate than the influence of satisfaction, this application sets the time weight to be greater than the satisfaction evaluation weight, that is, the influence of the time weight on the relevant value is greater than the satisfaction evaluation weight.

[0074] Step S300: Generate prompt words corresponding to the target text information;

[0075] It's important to note that prompts are a method of input used to guide or stimulate artificial intelligence (AI) systems, particularly large language models (LLMs), to perform specific tasks. The platform deploys corresponding large language models; by converting the target text information into prompts, these models can more accurately identify the user's actual intent, thereby improving the effectiveness of voice dialogue and ultimately enhancing the user experience.

[0076] In its specific implementation, the platform generates prompt words corresponding to the target text information, including:

[0077] Keyword extraction is performed on the target text information to obtain keyword information; based on a preset set of text expansion templates, template matching is performed on the keyword information to obtain target expansion templates; the target text information and the target expansion templates are combined to obtain prompt words.

[0078] In practical implementation, keyword information in text refers to the most important words in the text, which represent the core meaning, theme, or concept of the text. Keyword identification and extraction are crucial for tasks such as text analysis, information retrieval, and content summarization. Keyword information typically includes meaningful nouns and verbs. The expanded template set refers to a pre-set set of templates used to expand the text into templates that are easier for large language models to understand.

[0079] In its implementation, after obtaining keyword information, the platform performs template matching based on a pre-set set of text expansion templates to obtain target expansion templates. Specifically, matching is based on the question classification information in the keyword information. For knowledge-based questions, the matching template is typically "What does it mean, and what is the logical derivation process?". For example, if a user inputs a description such as "In cross-neighborhood feature aggregation, a self-attention mechanism is used to aggregate features across neighboring sibling neighborhoods belonging to the same parent neighborhood," the matched template would be "What does this description mean, and what is the derivation logic?" Combining this with the prompt words results in the template "What does this description mean, and what is the derivation logic?". By automatically generating prompt words, the large language model can more accurately identify the user's actual intent, thereby improving the effectiveness of voice dialogue and ultimately enhancing the user experience.

[0080] Step S400: Input the prompt word into a preset large language model, receive and output the response speech information output by the large language model, wherein the response speech information is generated by the large language model based on the response output instruction, and the prompt word is processed into a sentence.

[0081] It should be noted that the target large language model refers to an artificial intelligence model that has been trained on a large amount of data and has the ability to understand and generate natural language text. In this embodiment, the target large language model is specifically a generative code large model. This generative code large model adopts an autoregressive decoding model. Since the traditional code large model generally has a poor response effect to instructions of business knowledge type, this application has made fine adjustments to the large model's ability based on business knowledge to enhance the model's ability to follow instructions of business knowledge when outputting response statements.

[0082] In a specific implementation, the platform inputs the prompt words into a preset large language model, receives and outputs the response voice information output by the large language model, wherein the response voice information is generated by the large language model based on the response output instructions, and the prompt words are processed into sentences.

[0083] Furthermore, the platform can also identify whether the text information of the prompt words contains target feature questions. Target feature questions refer to text information containing multiple questions or questions that can be converted into multiple response steps. Based on the response output instructions, the large language model performs multi-step intermediate process deduction on the prompt words, generating response speech information containing multiple step deductions. The response speech information derived from multiple step deductions contains multi-level question logic. Through this multi-step deduction, users can more easily understand the answers to the questions, thereby improving the effectiveness of voice dialogue and ultimately enhancing the user experience.

[0084] In contrast to related technologies, which typically employ Natural Language Processing (NLP) to understand user commands and generate corresponding text responses, followed by speech synthesis to convert the text into speech and provide feedback, thus enhancing the user experience, NLP in these technologies only focuses on the current user input. In complex scenarios involving multiple turns of conversation, it fails to discern the user's true intent, resulting in poor voice dialogue quality. This application addresses this by using a text matching model within a cloud service platform to perform contextual matching between the user's historical dialogue information and the initial user input. This results in a matched target text, and prompts from this target text are input into a pre-defined large language model to generate and output the generated response speech to the user. It is understood that upon receiving the current user input, the cloud service platform first needs to match historical dialogue information to obtain the matched target text. This matched target text incorporates the complete context from multiple turns of conversation. Prompts generated from this matched target text allow the large language model to more accurately identify the user's true intent, thereby improving the voice dialogue effect and ultimately enhancing the user experience.

[0085] Based on the first embodiment described above, this application also proposes another embodiment, which is referred to below. Figure 2 The voice dialogue method includes:

[0086] Step A100: Obtain a text information sample, a historical dialogue text sample of the text information sample, and a matching text tag of the text information sample;

[0087] It should be noted that the text information sample refers to the sample with text information used for model training; the historical dialogue text sample of the text information sample is the sample with historical dialogue text corresponding to the text information sample used for model training; and the matching text label of the text information sample refers to the matching result label between the manually labeled text information sample and the historical dialogue text sample.

[0088] Step A200: Based on the text information sample, the historical dialogue text sample, and the matching text label, the preset training model is iteratively trained to obtain the text matching model.

[0089] It is understood that the text matching model of this application is trained based on the text information sample, the historical dialogue text sample, and the matching text label. By training a neural network model, it is possible to perform fast and accurate one-to-many matching between the text information sample and its corresponding historical dialogue text sample, so as to match one or more historical dialogue text samples with the highest relevance from the historical dialogue text sample, thereby improving the accuracy of text matching.

[0090] In its specific implementation, the platform iteratively trains a pre-defined training model based on the text information samples, the historical dialogue text samples, and the matching text tags to obtain a text matching model. This process includes:

[0091] Obtain the dialogue time information of the historical dialogue text samples; determine the time weight based on the dialogue time information; iteratively train the preset training model based on the text information samples, the time weight, the historical dialogue text samples, and the matching text tags to obtain the text matching model.

[0092] It should be noted that the correlation between historical dialogue information and initial text information is affected by time weight, which is determined by the time interval between the dialogue information and the initial text information. The closer the time interval, the stronger the correlation between the historical dialogue information and the initial text information, and the greater the time weight; the farther the time interval, the weaker the correlation between the historical dialogue information and the initial text information, and the smaller the time weight.

[0093] This application improves the accuracy of identifying the correlation between historical dialogue information and initial text information by incorporating time weights.

[0094] In another embodiment, the correlation between historical dialogue information and initial text information is also affected by the dialogue satisfaction evaluation weight. The dialogue satisfaction evaluation weight is determined based on the user's satisfaction evaluation of historical dialogue information. The higher the user's evaluation of historical dialogue information, the more interested the user is in further engaging in conversations about related knowledge. Therefore, the stronger the correlation between the initial text information subsequently entered by the user and the historical dialogue information, the higher the dialogue satisfaction evaluation weight. Conversely, the lower the user's evaluation of historical dialogue information, the less interested the user is in further engaging in conversations about related knowledge. Therefore, the weaker the correlation between the initial text information subsequently entered by the user and the historical dialogue information, the lower the dialogue satisfaction evaluation weight.

[0095] Furthermore, since the influence of the time dimension is more accurate than the influence of satisfaction, this application sets the time weight to be greater than the satisfaction evaluation weight, that is, the influence of the time weight on the relevant value is greater than the satisfaction evaluation weight.

[0096] In another embodiment, the platform obtains the dialogue time information and user satisfaction evaluation value of the historical dialogue text sample; determines the time weight based on the dialogue time information, and determines the dialogue satisfaction evaluation weight based on the user satisfaction evaluation value; and iteratively trains the preset training model based on the text information sample, the dialogue satisfaction evaluation weight, the time weight, the historical dialogue text sample, and the matching text tag to obtain the text matching model.

[0097] In its implementation, this application further improves the accuracy of identifying the correlation between historical dialogue information and initial text information by incorporating time weight and satisfaction evaluation weight.

[0098] In its specific implementation, the platform iteratively trains a pre-defined training model based on the text information samples, the time weights, the historical dialogue text samples, and the matching text tags to obtain a text matching model. This process includes:

[0099] Based on the text information samples, the time weights, and the historical dialogue text samples, context matching is performed using a preset training model to obtain a predicted matching result. The difference between the predicted matching result and the matched text tags is calculated to obtain an error result. Based on the error result, it is determined whether the error result meets the error standard indicated by a preset error threshold range. If the error result does not meet the error standard indicated by the preset error threshold range, the process returns to the step of performing context matching using the preset training model based on the text information samples, the time weights, and the historical dialogue text samples to obtain a predicted matching result. Training stops when the error result meets the error standard indicated by the preset error threshold range, thus obtaining a text matching model.

[0100] It should be noted that, firstly, the platform performs context matching based on the text information samples, the time weights, and the historical dialogue text samples using a preset training model to obtain a predicted matching result. The training model is a preset initial model that has basic matching capabilities with the text information samples and the historical dialogue text samples, and the predicted matching result is the predicted matching result generated by the training model matching and recognizing the text information samples, the time weights, and the historical dialogue text samples.

[0101] Understandably, the platform then calculates the difference between the predicted matching result and the matched text label to obtain the error result. This verifies whether the result obtained by the model during training is consistent with the known result, and calculates the difference between the results to obtain the error result.

[0102] It should be noted that, based on the error results, the platform determines whether the error results meet the error standard indicated by the preset error threshold range. Specifically, since there is an error between the model training results and the actual results, the error results are allowed to be within the preset error threshold range, thereby further determining whether the error results meet the error standard indicated by the preset error threshold range.

[0103] Understandably, if the error result does not meet the error standard indicated by the preset error threshold range, it means that the model has too large an error in this training. The platform returns the step of performing context matching based on the text information sample, the time weight, and the historical dialogue text sample, and obtaining the predicted matching result through the preset model to be trained. That is, iterative training is performed until the error result meets the error standard indicated by the preset error threshold range, and then training stops to obtain the text matching model, thereby improving the accuracy of the text matching model.

[0104] It should be noted that the above examples are only for understanding the present invention and do not constitute a limitation on the method of utilizing spare capacity of the present invention. Any simple modifications based on this technical concept are within the protection scope of the present invention.

[0105] This application also provides a voice dialogue device, please refer to... Figure 3 The voice interaction device includes:

[0106] The acquisition module 10 is used to acquire the user's input voice information and the user's historical dialogue information, and to perform text recognition on the voice information to obtain initial text information;

[0107] The matching module 20 is used to perform context matching based on the historical dialogue information and the initial text information, using a preset text matching model, to obtain the matched target text information.

[0108] The generation module 30 is used to generate prompt words corresponding to the target text information;

[0109] The output module 40 is used to input the prompt words into a preset large language model, receive the response speech information output by the large language model and output it, wherein the response speech information is generated by the large language model based on the response output instructions and the prompt words are processed into sentences.

[0110] Optionally, the matching module 20 includes:

[0111] The determining module is used to determine the session scenario information of the initial text information;

[0112] A primary filtering module is used to filter the historical dialogue information based on the conversation scenario information to obtain filtered historical dialogue information, wherein the filtered historical dialogue information and the current initial text information belong to the same conversation scenario.

[0113] The secondary filtering module is used to perform correlation matching between the filtered historical dialogue information and the initial text information to obtain the correlation value of each filtered historical dialogue information, and to retain the historical dialogue information in the filtered historical dialogue information whose correlation value is greater than a preset correlation value threshold, thus obtaining the historical dialogue information after secondary filtering.

[0114] The combination module is used to combine the historical dialogue information after secondary filtering with the initial text information to form a matched target text information containing complete context information.

[0115] Optionally, the voice interaction device further includes:

[0116] The sample acquisition module is used to acquire text information samples, historical dialogue text samples of the text information samples, and matching text tags of the text information samples;

[0117] The training module is used to iteratively train a preset model to be trained based on the text information samples, the historical dialogue text samples, and the matching text tags to obtain a text matching model.

[0118] Optionally, the training module includes:

[0119] The dialogue time information acquisition module is used to acquire the dialogue time information of the historical dialogue text sample;

[0120] The weight determination module is used to determine the time weight based on the dialogue time information;

[0121] The text matching model training module is used to iteratively train a preset model to be trained based on the text information samples, the time weights, the historical dialogue text samples, and the matching text tags to obtain a text matching model.

[0122] Optionally, the text matching model training module includes:

[0123] The prediction matching module is used to perform context matching based on the text information sample, the time weight, and the historical dialogue text sample, using a preset training model to obtain the prediction matching result.

[0124] The difference calculation module is used to calculate the difference between the predicted matching result and the matched text label to obtain the error result.

[0125] The judgment module is used to determine, based on the error result, whether the error result meets the error standard indicated by the preset error threshold range;

[0126] The iterative training module is used to return the step of performing context matching based on the text information sample, the time weight, and the historical dialogue text sample, and obtaining the predicted matching result through the preset model to be trained, if the error result does not meet the error standard indicated by the preset error threshold range. Training is stopped when the error result meets the error standard indicated by the preset error threshold range, and a text matching model is obtained.

[0127] Optionally, the generation module 30 includes:

[0128] The keyword extraction module is used to extract keywords from the target text information to obtain keyword information;

[0129] The template matching module is used to perform template matching on the keyword information based on a preset set of text expansion templates to obtain the target expansion template;

[0130] The text combination module is used to combine the target text information and the target extended template to obtain prompt words.

[0131] The voice dialogue device provided in this application, employing the voice dialogue method in the above embodiments, can solve the technical problem of voice dialogue in smartwatches. Compared with the prior art, the beneficial effects of the voice dialogue device provided in this application are the same as those of the voice dialogue method provided in the above embodiments, and other technical features in the voice dialogue device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0132] This application provides a voice dialogue device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the voice dialogue method in Embodiment 1 above.

[0133] The following is for reference. Figure 4 The diagram illustrates a structural schematic suitable for implementing the voice dialogue device in the embodiments of this application. The voice dialogue device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The voice interaction device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0134] like Figure 4As shown, the voice interaction device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the voice interaction device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the voice interaction device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows voice interaction devices with various systems, it should be understood that it is not required to implement or possess all of the systems shown. More or fewer systems may be implemented alternatively.

[0135] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0136] The voice dialogue device provided in this application, employing the voice dialogue method in the above embodiments, can solve the technical problems of voice dialogue. Compared with the prior art, the beneficial effects of the voice dialogue device provided in this application are the same as those of the voice dialogue method provided in the above embodiments, and other technical features of the voice dialogue device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0137] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0138] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0139] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the voice dialogue method in the above embodiments.

[0140] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0141] The aforementioned computer-readable storage medium may be included in the voice interaction device; or it may exist independently and not assembled into the voice interaction device.

[0142] The aforementioned computer-readable storage medium carries one or more programs that, when executed by the voice dialogue device, enable the voice dialogue device to engage in voice dialogue.

[0143] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0144] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0145] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0146] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described voice dialogue method, thereby solving the technical problems of voice dialogue. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the voice dialogue method provided in the above embodiments, and will not be repeated here.

[0147] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the voice dialogue method described above.

[0148] The computer program product provided in this application can solve the technical problems of voice dialogue. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the voice dialogue method provided in the above embodiments, and will not be repeated here.

[0149] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A voice dialogue method, characterized in that, The method is applied to a cloud service platform, in which a large language model is deployed, and includes: Acquire the user's input voice information and the user's historical dialogue information, and perform text recognition on the voice information to obtain initial text information; Determine the session scenario information of the initial text information; Based on the conversation scenario information, the historical dialogue information is filtered to obtain filtered historical dialogue information, wherein the filtered historical dialogue information and the current initial text information belong to the same conversation scenario, and the conversation scenario information includes background information, scenario setting information, participant information and topic development information. The filtered historical dialogue information is matched with the initial text information to obtain the relevance value of each filtered historical dialogue information. Historical dialogue information with a relevance value greater than a preset relevance value threshold is retained to obtain historical dialogue information after secondary filtering. The relevance matching is affected by the knowledge association between the historical dialogue information and the initial text information, as well as the contextual fluency after text connection. The knowledge association is affected by the time weight and dialogue satisfaction evaluation weight of the historical dialogue information and the initial text information. The historical dialogue information after secondary filtering is combined with the initial text information to form a matched target text information containing complete context information; Generate prompt words corresponding to the target text information; The prompt words are input into a preset large language model, and the corresponding voice information output by the large language model is received and output. The corresponding voice information is generated by the large language model from the prompt words based on the corresponding output instructions.

2. The voice dialogue method as described in claim 1, characterized in that, Before the step of acquiring user-input voice information and the user's historical dialogue information, and performing text recognition on the voice information to obtain initial text information, the method includes: Obtain text information samples, historical dialogue text samples of the text information samples, and matching text tags of the text information samples; Based on the text information samples, the historical dialogue text samples, and the matching text tags, the preset training model is iteratively trained to obtain the text matching model.

3. The voice dialogue method as described in claim 2, characterized in that, The step of iteratively training a preset model to obtain a text matching model based on the text information samples, the historical dialogue text samples, and the matching text tags includes: Obtain the dialogue time information of the historical dialogue text sample; Based on the dialogue time information, determine the time weight; Based on the text information samples, the time weights, the historical dialogue text samples, and the matching text tags, the preset training model is iteratively trained to obtain the text matching model.

4. The voice dialogue method as described in claim 3, characterized in that, The step of iteratively training a preset model to obtain a text matching model based on the text information samples, the time weights, the historical dialogue text samples, and the matching text tags includes: Based on the text information samples, the time weights, and the historical dialogue text samples, context matching is performed using a preset training model to obtain the predicted matching result. The difference between the predicted matching result and the matched text label is calculated to obtain the error result; Based on the error result, determine whether the error result meets the error standard indicated by the preset error threshold range; If the error result does not meet the error standard indicated by the preset error threshold range, the process returns to the step of performing context matching based on the text information sample, the time weight, and the historical dialogue text sample using the preset model to be trained to obtain the predicted matching result. Training stops when the error result meets the error standard indicated by the preset error threshold range, and a text matching model is obtained.

5. The voice dialogue method as described in claim 1, characterized in that, The step of generating prompt words corresponding to the target text information includes: Keyword extraction is performed on the target text information to obtain keyword information; Based on a preset set of text expansion templates, the keyword information is matched to obtain the target expansion template; The target text information and the target extended template are combined to obtain the prompt word.

6. A voice dialogue device, characterized in that, The device comprises: The acquisition module is used to acquire the user's input voice information and the user's historical dialogue information, and to perform text recognition on the voice information to obtain initial text information; The determining module is used to determine the session scenario information of the initial text information; A primary filtering module is used to filter the historical dialogue information based on the conversation scenario information to obtain filtered historical dialogue information, wherein the filtered historical dialogue information belongs to the same conversation scenario as the current initial text information, and the conversation scenario information includes background information, scenario setting information, participant information and topic development information. A secondary filtering module is used to perform relevance matching between the filtered historical dialogue information and the initial text information to obtain the relevance value of each filtered historical dialogue information, and to retain the historical dialogue information in the filtered historical dialogue information whose relevance value is greater than a preset relevance value threshold, thereby obtaining the historical dialogue information after secondary filtering. The relevance matching is affected by the knowledge association between the historical dialogue information and the initial text information, as well as the contextual fluency after text connection. The knowledge association is affected by the time weight and dialogue satisfaction evaluation weight of the historical dialogue information and the initial text information. The combination module is used to combine the historical dialogue information after secondary filtering with the initial text information to form a matched target text information containing complete context information. The generation module is used to generate prompt words corresponding to the target text information; The output module is used to input the prompt words into a preset large language model, receive the response speech information output by the large language model and output it, wherein the response speech information is generated by the large language model based on the response output instructions and the prompt words.

7. A voice dialogue device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the voice dialogue method as described in any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the voice dialogue method as described in any one of claims 1 to 5.

9. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the voice dialogue method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Voice interaction method and device and terminal equipment

    CN111428483A

  • Anthropomorphic dialogue method and device based on natural language model and electronic equipment

    CN117493529A

  • Conversation processing method and device, electronic equipment and storage medium

    CN117932036A