Voice interaction method and device, equipment, storage medium and program product

By converting voice interaction requests into request text, and constructing response prompt text and generating target response text when matching fails, using a large language model to improve the reliability of response text, the problem of insufficient response rate of voice interaction in the prior art is solved. Improve user experience and interaction efficiency.

CN119132303APending Publication Date: 2024-12-13APOLLO INTELLIGENT CONNECTIVITY (BEIJING) TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411322108.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing voice interaction technology has shortcomings in response rate, especially when the voice request fails to match the preset interactive text, it is difficult to effectively construct the response prompt text and generate the target response text, resulting in the failure to meet user interaction needs in time.

Method used

By converting voice interaction requests into request text, the response prompt text is constructed according to the request text when matching failure occurs, and the target response text is generated based on the response prompt text, the large language model is used to improve the reliability and diversity of the response text, thereby outputting the response response.

Benefits of technology

It improves the response rate and user experience during voice interaction, avoids the situation where users receive a single repeated reply during interaction, and enhances the satisfaction of user interaction needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119132303A_ABST
    Figure CN119132303A_ABST
Patent Text Reader

Abstract

The invention provides a voice interaction method and device, electronic equipment, a computer readable storage medium and a computer program product, and relates to the field of artificial intelligence, in particular to the technical fields of intelligent voice, natural language processing, large language models and the like. The method comprises the following steps: converting a voice interaction request into a request text; in response to matching failure of the request text and the preset interaction text, constructing a response prompt text according to the request text; generating a target response text based on the response prompt text; and outputting a response response based on the target response text. According to the method, the richness and diversification of voice interaction reply are improved, and the user experience of voice interaction is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to technical fields such as intelligent speech, natural language processing and large language models, and in particular to a speech interaction method, device, electronic device, computer-readable storage medium and computer program product. Background Art

[0002] With the continuous development of artificial intelligence technology, voice interaction technology, as a means of human-computer interaction, has been widely used in multiple devices, such as vehicle-mounted equipment, smart phones, tablet computers, smart watches, etc. During the voice interaction process, smart devices can perform corresponding operations according to the received voice commands. Summary of the invention

[0003] The embodiments of the present disclosure provide a voice interaction method, device, electronic device, computer-readable storage medium, and computer program product, which can improve the response rate during the voice interaction process.

[0004] In a first aspect, an embodiment of the present disclosure proposes a voice interaction method, including: converting a voice interaction request into a request text; in response to a failure of the request text to match a preset interaction text, constructing a response prompt text according to the request text; generating a target response text based on the response prompt text; and outputting a response based on the target response text.

[0005] In the second aspect, an embodiment of the present disclosure proposes a voice interaction device, including: a conversion module, configured to convert a voice interaction request into a request text; a first matching module, configured to construct a response prompt text according to the request text in response to a failure of the request text to match a preset interaction text; a generation module, configured to generate a target response text based on the response prompt text; and a first output module, configured to output a response based on the target response text.

[0006] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: 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, and the instructions are executed by the at least one processor so that the at least one processor can implement the voice interaction method described in any implementation method in the first aspect when executing.

[0007] In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, which are used to enable a computer to implement the voice interaction method described in any implementation method in the first aspect when executed.

[0008] In a fifth aspect, an embodiment of the present disclosure provides a computer program product comprising a computer program, which, when executed by a processor, can implement the voice interaction method described in any implementation manner in the first aspect.

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

[0010] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0011] Figure 1 is an exemplary system architecture in which the present disclosure may be applied;

[0012] Figure 2 A flow chart of a voice interaction method provided by an embodiment of the present disclosure;

[0013] Figure 3 A flowchart of another voice interaction method provided by an embodiment of the present disclosure;

[0014] Figure 4 A flowchart of a voice interaction method in an application scenario provided by an embodiment of the present disclosure;

[0015] Figure 5 A structural block diagram of a voice interaction device provided in an embodiment of the present disclosure;

[0016] Figure 6 A schematic diagram of the structure of an electronic device suitable for executing a voice interaction method provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0017] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description. It should be noted that the embodiments in the present disclosure and the features in the embodiments may be combined with each other without conflict.

[0018] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0019] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the voice interaction method, apparatus, electronic device, and computer-readable storage medium of the present disclosure can be applied.

[0020] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0021] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 and server 105 can be installed with various applications for realizing information communication between the two, such as voice recognition applications, search applications, instant messaging applications, etc.

[0022] Terminal devices 101, 102, 103 and server 105 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with voice recognition functions, including but not limited to vehicle-mounted devices, smart phones, smart speakers, etc.; when terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above, which can be implemented as multiple software or software modules, or as a single software or software module, without specific limitation here. When server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server; when the server is software, it can be implemented as multiple software or software modules, or as a single software or software module, without specific limitation here.

[0023] The server 105 can provide various services through various built-in applications. For example, a voice interaction application that can generate responses based on voice requests can be provided. When the server 105 runs the voice interaction application, the following effects can be achieved: first, the voice interaction request is converted into a request text. In response to the request text failing to match the preset interaction text, a response prompt text can be constructed based on the request text. After that, a target response text is generated based on the response prompt text, and a response response is output based on the target response text.

[0024] It should be noted that, in addition to being obtained from the terminal devices 101, 102, 103 through the network 104, the preset interactive text can also be pre-stored locally in the server 105 in various ways. Therefore, when the server 105 detects that the data has been stored locally (for example, when starting to process the previously stored response generation task), it can choose to directly obtain the data locally. In this case, the exemplary system architecture 100 may also not include the terminal devices 101, 102, 103 and the network 104.

[0025] Since generating a response based on a voice request requires more computing resources and stronger computing power, the voice interaction method provided in the subsequent embodiments of the present disclosure is generally performed by a server 105 with stronger computing power and more computing resources, and accordingly, the voice interaction device is generally also set in the server 105. However, it should also be pointed out that when the terminal devices 101, 102, and 103 also have computing power and computing resources that meet the requirements, the terminal devices 101, 102, and 103 can also complete the above-mentioned various operations handed over to the server 105 through the voice interaction application installed thereon, and then output the same result as the server 105. Especially in the case where there are multiple terminal devices with different computing powers at the same time, but the voice interaction application determines that the terminal device where it is located has stronger computing power and more remaining computing resources, it can allow the terminal device to perform the above-mentioned operations, thereby appropriately reducing the computing pressure of the server 105, and accordingly, the voice interaction device can also be set in the terminal devices 101, 102, and 103. In this case, the exemplary system architecture 100 may also not include the server 105 and the network 104.

[0026] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0027] Please refer to Figure 2 , Figure 2 A flow chart of a voice interaction method provided by an embodiment of the present disclosure, wherein process 200 includes the following steps:

[0028] Step 201: Convert the voice interaction request into a request text.

[0029] This step is intended to be performed by the execution subject of the voice interaction method (such as Figure 1 The server 105 shown converts the voice interaction request into a request text. Specifically, the execution body may be equipped with a sound collection device, such as a microphone array, for collecting the user's voice interaction request in real time, recognizing the voice and converting the voice interaction request into a request text.

[0030] Step 202: In response to a failure in matching the request text with the preset interaction text, construct a response prompt text according to the request text.

[0031] In this embodiment, after converting the voice interaction request into a request text, the execution subject can match the request text with the preset interaction text, and construct a response prompt text according to the request text when the match fails. Among them, the preset interaction text can be a specific text pre-set according to historical human-computer interaction data, usually in the text form of instructions that the user will issue during the human-computer interaction process, such as "What time is it now", "What's the weather like today", "Turn on the music", etc. When matching the request text and the preset interaction text, a full match can be performed, that is, matching the request text with each word of the preset interaction text; keyword matching can also be performed, that is, extracting keywords from the request text and matching the keywords with preset keywords in the preset interaction text.

[0032] In this embodiment, the execution subject can use the user input (query) to construct different response prompt texts according to the request text. On this basis, the response prompt text can be constructed in combination with the actual scenario. The following example is given: Scenario 1, the constructed response prompt text can be: the user directly enters '{$query}', please provide the answer that best fits the question. Scenario 2, the user enters the query: recommend songs. On this basis, if the user can currently access the song song played by the user, the response prompt text can be constructed: the user who has listened to '{$song}' enters: '{$query}', please recommend a suitable song for him. Scenario 3, the number of times a user asks a certain query in a certain period of time can be recorded and added to the response prompt text. Scenario 4, if the current environment does not support the execution of the voice request sent by the user, the response prompt text can be constructed: the user enters: '{$query}', please provide a suitable reply to notify the user that the function is not supported yet", which is used to notify the user that the function is not supported. The preset actual scenarios are not limited to the examples given above. The execution subject uses the query in combination with certain data in the actual scenario to generate different response prompt texts for different user queries, thereby improving the pertinence and reliability of the response prompt text.

[0033] Step 203: Generate a target response text based on the response prompt text.

[0034] In this embodiment, the execution subject generates the target response text based on the response prompt text constructed in step 202. The response prompt text is used to indicate how to generate the target response text.

[0035] Step 204: Output a response based on the target response text.

[0036] In this embodiment, the execution subject outputs a response based on the target response text. Specifically, the execution subject can perform text recognition on the content of the target response text and output a corresponding response according to the recognition result.

[0037] The voice interaction method provided in this embodiment can construct a response prompt text using the request text when the request text does not match the preset interaction text, and generate a target response text based on the response prompt text. In this way, even if the preset interaction text does not correspond to the request text, the response text that meets the user's interaction needs can be obtained through the prompt text, thereby improving the response rate to the voice interaction request.

[0038] In some optional implementations of this embodiment, the execution subject can input the response prompt text into a large language model to generate a target response text. The large language model is a natural language processing technology based on a neural network, which can learn and predict the rules and patterns of natural language texts. In the large language model, the neural network model can automatically extract features and patterns in natural language texts by learning a large amount of corpus data, thereby realizing the understanding and generation of natural language. Using a large language model to generate a target response text can make the generated target response text more reliable.

[0039] In some optional implementations of this embodiment, when the target response text contains an operation instruction, the operation instruction is executed. Among them, the target response text can be converted into a continuous and natural response voice and output by existing sound synthesis technology, which is not limited here. And when the target response text contains an operation instruction, such as "turn on the speaker", "turn on the radio", etc., which require the device to perform a corresponding operation, the execution subject sends the operation instruction to the corresponding application to perform the corresponding operation, and can respond to the user request in a timely manner.

[0040] Please refer to Figure 3 , Figure 3 This is a flow chart of another voice interaction method provided by an embodiment of the present disclosure, wherein process 300 includes the following steps:

[0041] Step 301: Convert the voice interaction request into a request text.

[0042] In this embodiment, the specific operation of step 301 is already Figure 2 In the illustrated embodiment, step 201 is introduced in detail and will not be repeated here.

[0043] Step 302: In response to the request text successfully matching the preset interactive text, response information associated with the preset interactive text is obtained.

[0044] In this embodiment, after converting the voice interaction request into a request text, the execution subject may match the request text with a preset interaction text, and obtain response information associated with the preset interaction text when the match is successful.

[0045] In some optional implementations of this embodiment, the execution subject may match the request text with the preset interactive text according to the word slot. The execution subject may separate multiple candidate words from the request text according to the word slot of the preset interactive text, and if the candidate words match the word slot value of the preset interactive text, it is determined that the request text matches the preset interactive text successfully, and when it is determined that the request text matches the preset interactive text successfully, response information associated with the preset interactive text is obtained. Among them, a word slot may contain multiple word slot values.

[0046] In this embodiment, the execution subject determines whether the word slot value of the candidate word matches the word slot value of the preset interactive text in the following manner: if there is at least one candidate word that cannot match the word slot value of the preset sentence pattern, it is determined that the request text fails to match the preset interactive text. If all candidate words can match the word slot value of a preset sentence pattern, it is determined that the request text successfully matches the preset interactive text, and the preset sentence pattern is determined as the preset sentence pattern that matches the voice request. By matching the request text and the preset interactive text through word slots, the matching efficiency can be improved.

[0047] In this embodiment, when the request text successfully matches the preset interactive text, the response information associated with the preset interactive text is obtained. Each preset interactive text is associated with one response information, and one response information is associated with multiple preset interactive texts. For example, the response information associated with the preset interactive text "play music" may be an operation instruction for playing music, and the preset interactive text associated with the operation instruction for playing music may be "play music", "play music from xx application", "play car CD music", etc. By associating the preset interactive text with the response information, user needs can be accurately and quickly determined, and timely responses can be made.

[0048] After receiving the response information, the execution subject may output an interactive response based on the response information. For example, if the response information is an operation instruction to turn on the broadcast, the execution subject directly controls the device to turn on the broadcast according to the operation instruction, and outputs a response voice of "the broadcast has been turned on for you" to respond to the user. In some optional implementations of this embodiment, the specific implementation of outputting the interactive response based on the response information can refer to the description of the following steps 303-305.

[0049] Step 303: In response to the response information including the intention prompt text, determine the type of the request text.

[0050] In this embodiment, the response information includes an intent prompt text and / or an operation instruction. When the response information includes an intent prompt text, the type of the request text is determined. The intent prompt text refers to a prompt text that is set in advance and contains an intent corresponding to the above request text. For example, the intent prompt text may be "Music has been opened for you", "Query completed", etc. An operation instruction refers to an instruction that requires the device to perform a corresponding operation, such as an instruction to turn on music or turn on the radio.

[0051] In this embodiment, the types of request texts include query type requests and operation type requests. Query type requests refer to question type requests, and the responses to query type requests are usually not standardized and are determined based on the individual needs of the user. Operation type requests refer to requests with relatively clear requirements, and fixed responses can meet the needs of the user. For example, "recommend a good song" is a query type request, and "turn on the radio" is an operation type request. In this embodiment, the type of request text can be determined based on the specific text content included in the request text.

[0052] Step 304: In response to the request text being a query type request, construct a query prompt text according to the request text.

[0053] In this embodiment, when the request text is a query-type request, in order to meet the needs of different users, a diversified query prompt text is constructed according to the request text. Specifically, the execution subject can use the query to construct the query prompt text according to the request text, and on this basis, the query prompt text can be constructed in combination with the actual scenario. The following is a specific example: Scenario 1, the constructed query prompt text can be: the user directly enters '{$query}', please provide the answer that best fits the question; Scenario 2, the user enters the query: recommend songs, on this basis, if the user can currently access the song song played by the user, then the query prompt text can be constructed: the user who has listened to '{$song}' enters: '{$query}', please recommend a suitable song for him; Scenario 3, the number of times a user asks a query in a certain period of time can be recorded, and it can be added to the query prompt text to generate a query prompt text. ; Scenario 4: If the current environment does not support the voice request sent by the user, a query prompt text can be constructed: User input: '{$query}', please provide a suitable reply to inform the user that the function is not supported yet", which is used to notify the user that the function is not supported. The preset actual scenarios are not limited to the above examples. The execution subject uses the query in combination with certain data in the actual scenario to generate different query prompt texts for different user queries, so that the user no longer receives a single repetitive reply during the interaction process, which improves the richness and diversity of the query prompt text.

[0054] Step 305: Generate a query response text based on the query prompt text and output a corresponding query response voice.

[0055] In this embodiment, the query response text is generated based on the query prompt text and the corresponding query response voice is output, wherein the query prompt text is used to indicate how to generate the query response text.

[0056] In some optional implementations of this embodiment, the execution subject may input the query prompt text into the large language model to generate the query response text. Using the large language model to generate the query response text can make the generated query response text more reliable.

[0057] Step 306: In response to the request text being an operation-type request, output an operation response voice corresponding to the intention prompt text.

[0058] In this embodiment, in response to the request text being an operational request, an operation response voice corresponding to the intention prompt text is output. Specifically, since the user demand corresponding to the operational request is very clear, when the request text is an operational request, the corresponding operation response voice can be generated by the intention prompt text contained in the response information associated with the preset interactive text matching the request text.

[0059] For example, when the request text is "turn on the music", since this is an operational request, and the response information corresponding to the preset interactive text matching "turn on the music" includes the intention prompt text "OK, the music has been turned on for you", the corresponding operation response voice can be generated directly through the intention prompt text, thereby improving the timeliness of the response.

[0060] Step 307: In response to the response information not including the intended prompt text, constructing a response prompt text according to the request text.

[0061] In this embodiment, when the response information does not include the intention prompt text, the response prompt text is constructed according to the request text. That is to say, even if the response information does not include the intention prompt text, the response prompt text can be constructed according to the received request, and the target response text can be further generated based on the response prompt text, and then the response response can be output based on the target response text. For example, the corresponding response voice is output. The response text that meets the user's interaction needs is obtained through the prompt text, which improves the response rate to the voice interaction request.

[0062] Specifically, the response prompt text is constructed according to the request text, and after the response prompt text is constructed, the target response text is generated based on the response prompt text, and then the response response is output based on the target response text. Figure 2 In the illustrated embodiment, steps 202-204 are described in detail and will not be repeated here.

[0063] In some optional implementations of this embodiment, the voice interaction method further includes executing the operation instruction in response to the response information containing the operation instruction. Specifically, when the response information contains the operation instruction, the execution subject performs the corresponding operation according to the operation instruction. For example, when the response information contains the operation instruction to turn on the broadcast, the execution subject controls the device to turn on the broadcast. By presetting the operation instruction in the response information, the timeliness of the response is improved.

[0064] The voice interaction method provided in this embodiment determines whether it is necessary to use the query to construct different prompt texts according to the type of request text, introduces a large language model and generates a query response text based on the query prompt text, thereby improving the reliability of the query response text, and improving the richness and diversity of the voice interaction responses, avoiding the situation where users often receive a single and repetitive reply during the interaction process, thereby improving the user experience of voice interaction.

[0065] To deepen understanding, the present disclosure also provides a specific implementation solution in combination with a specific application scenario, see Figure 4 The process 400 shown. In this implementation, the execution subject of the voice interaction method can be an in-vehicle intelligent terminal, for example, an intelligent central control system. An in-vehicle voice APP 410 is installed on the in-vehicle intelligent terminal, and the in-vehicle voice APP 410 can communicate and interact with a cloud semantic parsing module 420, and the cloud semantic parsing module 420 can communicate and interact with a text generation model 430. The specific voice interaction process 400 includes:

[0066] Step 401: The user inputs a voice request through the in-vehicle voice APP 410.

[0067] Step 402 : The in-vehicle voice APP 410 sends the voice request to the cloud semantic analysis module 420 and converts it into a request text. Then steps 403 - 406 and step 409 are all executed by the cloud semantic analysis module 420 .

[0068] Step 403: Match the request text with the preset interactive text. Determine whether the preset interactive text is matched. If the match is successful, execute step 404, otherwise execute step 409.

[0069] Step 404: Obtain the corresponding response information and determine whether the response information includes the intention prompt text. If the response information includes the intention prompt text, execute step 405, otherwise execute step 409.

[0070] Step 405: Determine whether it is necessary to generate a diversified query prompt text according to the request text. If it is necessary to generate a query prompt text, execute step 406, otherwise execute step 408.

[0071] Step 406 : Generate query prompt text based on the request text and send it to the large language model 430 .

[0072] Step 407: After the query prompt text is input into the large language model 430, a query response text may be generated and returned to the vehicle voice APP 410 to output the corresponding query response voice.

[0073] Step 408: The in-vehicle voice APP 410 can directly output the operation response voice corresponding to the intention prompt text.

[0074] Step 409: construct a response prompt text according to the request text and send it to the large language model 430.

[0075] Step 410: After the answer prompt text is input into the large language model 430, a target answer text can be generated and returned to the in-vehicle voice APP 410 to output the corresponding target answer voice.

[0076] The voice interaction method provided in this embodiment utilizes query to perform different operations for different types of requests, constructs different types of prompt texts, and introduces a large language model to generate target response texts, thereby improving the reliability of the target response texts, and improving the richness and diversity of voice interaction responses, thereby avoiding the situation where users often receive single and repetitive replies during the interaction process, thereby improving the user experience of voice interaction.

[0077] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a voice interaction device, and the device embodiment is Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0078] like Figure 5 As shown, the voice interaction device 500 of this embodiment may include: a conversion module 501, a first matching module 502, a generation module 503, and a first output module 504.

[0079] The conversion module 501 is configured to convert the voice interaction request into a request text.

[0080] The first matching module 502 is configured to construct a response prompt text according to the request text in response to a failure in matching the request text with the preset interaction text.

[0081] The generating module 503 is configured to generate a target response text based on the response prompt text.

[0082] The first output module 504 is configured to output a response based on the target response text.

[0083] In some optional implementations of this embodiment, the generation module 503 includes: a generation unit configured to input the response prompt text into the large language model to generate a target response text.

[0084] In some optional implementations of this embodiment, the first output module 504 includes: a first output unit configured to output a response voice based on the target response text; and / or a second output unit configured to execute the operation instructions contained in the target response text.

[0085] In this embodiment, in the voice interaction device 500, the specific processing of the conversion module 501, the first matching module 502, the generation module 503, and the first output module 504 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of steps 201 - 204 in the corresponding embodiment are not repeated here.

[0086] In some optional implementations of this embodiment, the voice interaction device 500 of this embodiment may also include: a second matching module 505, configured to obtain response information associated with the preset interaction text in response to a successful match between the request text and the preset interaction text; and a second output module 506, configured to output an interaction response based on the response information.

[0087] In some optional implementations of this embodiment, the second output module 506 includes: a type determination unit, configured to determine the type of the request text in response to the response information including intention prompt text; a first text construction unit, configured to construct a query prompt text according to the request text in response to the request text being a query-type request; and a first voice output unit, configured to generate a query response text based on the query prompt text and output a corresponding query response voice.

[0088] In some optional implementations of this embodiment, the second output module 506 also includes: a second text construction unit, configured to, in response to the response information not including the intention prompt text, execute construction of a response prompt text according to the request text.

[0089] In some optional implementations of this embodiment, the second output module 506 also includes: a second voice output unit, configured to output an operation response voice corresponding to the intention prompt text in response to the request text being an operation-type request.

[0090] In some optional implementations of this embodiment, the first speech output unit in the second output module 506 is further configured to: input the query prompt text into the large language model to generate a query response text.

[0091] In some optional implementations of this embodiment, the second output module 506 further includes: an instruction execution unit, configured to execute the operation instruction in response to the response information containing the operation instruction.

[0092] In some optional implementations of the present embodiment, the voice interaction device 500 of the present embodiment may further include: a candidate word determination module 507, configured to determine a candidate word from the request text according to a word slot of a preset interactive text; a word slot matching module 508, configured to determine that the request text successfully matches the preset interactive text in response to the candidate word matching the word slot value of the preset interactive text.

[0093] This embodiment exists as an apparatus embodiment corresponding to the above-mentioned method embodiment. The voice interaction apparatus provided by this embodiment determines whether it is necessary to use the query to construct different types of prompt texts according to the type of request text, introduces a large language model and generates a response text based on the prompt text, thereby improving the reliability of the response text, and improving the richness and diversity of the voice interaction response, avoiding the situation where users often get a single and repetitive reply during the interaction process, thereby improving the user experience of voice interaction.

[0094] According to an embodiment of the present disclosure, the present disclosure also provides an electronic 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, and the instructions are executed by the at least one processor so that the voice interaction method described in any of the above embodiments can be implemented when the at least one processor executes.

[0095] According to an embodiment of the present disclosure, the present disclosure further provides a readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to implement the voice interaction method described in any of the above embodiments when executed.

[0096] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which, when executed by a processor, can implement the voice interaction method described in any of the above embodiments.

[0097] Figure 6A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure 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, 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 disclosure described and / or required herein.

[0098] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 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.

[0099] A number of components in the 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 device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0100] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 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 computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as the voice interaction method. For example, in some embodiments, the voice interaction method may be implemented as a computer software program, which is tangibly contained in a machine-readable 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 device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the voice interaction method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the voice interaction method in any other appropriate manner (e.g., by means of firmware).

[0101] 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), load 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.

[0102] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code 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.

[0103] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. 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.

[0104] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer 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 pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0105] The systems and techniques described herein may be implemented in a computing system that includes back-end 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 front-end 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 back-end components, middleware components, or front-end 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), and the Internet.

[0106] A computer 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 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 virtual private servers (VPS) services.

[0107] According to the technical solution of the embodiment of the present disclosure, queries are used to perform different operations on different types of requests, different types of prompt texts are constructed, and a large language model is introduced to generate target response texts, thereby improving the richness and diversity of voice interaction responses, avoiding the situation where users often receive single and repetitive replies during the interaction process, and thus improving the user experience of voice interaction.

[0108] 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 recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0109] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. 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 disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A voice interaction method, comprising: Convert voice interaction requests into request text; In response to a failure in matching the request text with the preset interaction text, constructing a response prompt text according to the request text; Generate a target response text based on the response prompt text; A response is output based on the target response text.

2. The method according to claim 1, wherein: Generating a target response text based on the response prompt text comprises: The response prompt text is input into a large language model to generate a target response text.

3. The method according to claim 1 or 2, wherein: Outputting a response based on the target response text includes: Outputting a response voice based on the target response text; and / or Execute the operation instructions contained in the target response text.

4. The method according to claim 1, further comprising: In response to the request text successfully matching the preset interactive text, obtaining response information associated with the preset interactive text; An interactive response is output based on the response information.

5. The method according to claim 4, wherein: Outputting an interactive response based on the response information includes: In response to the response information including the intention prompt text, determining the type of the request text; In response to the request text being a query type request, constructing a query prompt text according to the request text; A query response text is generated based on the query prompt text and a corresponding query response voice is output.

6. The method according to claim 4, wherein outputting an interactive response based on the response information further comprises: In response to the response information not including the intended prompt text, constructing the response prompt text according to the request text is performed.

7. The method according to claim 4, further comprising: In response to the request text being an operation-type request, an operation response voice corresponding to the intention prompt text is output.

8. The method according to claim 4, wherein: Generating the query response text based on the query prompt text comprises: The query prompt text is input into a large language model to generate a query response text.

9. The method according to claim 4, wherein outputting an interactive response based on the response information comprises: In response to the response information including an operation instruction, the operation instruction is executed.

10. The method according to any one of claims 1 to 9, further comprising: Determining candidate words from the request text according to the word slots of the preset interactive text; In response to the candidate word matching the word slot value of the preset interactive text, it is determined that the request text matches the preset interactive text successfully.

11. A voice interaction device, comprising: A conversion module, configured to convert a voice interaction request into a request text; A first matching module is configured to construct a response prompt text according to the request text in response to a failure in matching the request text with the preset interaction text; A generating module, configured to generate a target answering text based on the answering prompting text; The first output module is configured to output a response based on the target response text.

12. The device according to claim 11, wherein The generation module comprises: The generating unit is configured to input the response prompt text into a large language model to generate a target response text.

13. The device according to claim 11 or 12, wherein: The first output module comprises: A first output unit is configured to output a response voice based on the target response text; and / or The second output unit is configured to execute the operation instructions contained in the target response text.

14. The apparatus according to claim 11, further comprising: A second matching module is configured to obtain response information associated with the preset interactive text in response to the request text successfully matching the preset interactive text; The second output module is configured to output an interactive response based on the response information.

15. The device according to claim 14, wherein: The second output module comprises: a type determination unit, configured to determine the type of the request text in response to the response information including the intention prompt text; A first text construction unit is configured to construct a query prompt text according to the request text in response to the request text being a query type request; The first voice output unit is configured to generate a query response text based on the query prompt text and output a corresponding query response voice.

16. The device according to claim 14, wherein the second output module further comprises: The second text construction unit is configured to execute the construction of the response prompt text according to the request text in response to the response information not including the intended prompt text.

17. The device according to claim 14, wherein the second output module further comprises: The second voice output unit is configured to output an operation response voice corresponding to the intention prompt text in response to the request text being an operation-type request.

18. The device according to claim 14, wherein: The first speech output unit is further configured to: The query prompt text is input into a large language model to generate a query response text.

19. The method according to claim 14, wherein the second output module further comprises: The instruction execution unit is configured to execute the operation instruction in response to the response information containing the operation instruction.

20. The device according to any one of claims 11 to 19, further comprising: A candidate word determination module, configured to determine a candidate word from the request text according to a word slot of the preset interactive text; The word slot matching module is configured to determine that the request text successfully matches the preset interactive text in response to the candidate word matching the word slot value of the preset interactive text.

21. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the voice interaction method described in any one of claims 1-10.

22. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the voice interaction method according to any one of claims 1 to 10.

23. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the voice interaction method according to any one of claims 1 to 10 are implemented.

Citation Information

Cited By

  • Text processing method and apparatus, terminal device, storage medium, and program product

    WO2026214177A1