Voice interaction method and device, electronic equipment and storage medium
By generating multiple candidate acceptance speeches based on input voice and historical interaction information in the outgoing call scenario, and selecting low repetitions in historical interactions for broadcasting, the problem of delay in generating reply information in large language models is solved, and the real-timeness of speech interaction is improved.
Patent Information
- Application Number
- CN202411896982.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-18
AI Technical Summary
In the outgoing call scenario, there is a delay of several seconds before the large language model generates reply information, which is difficult to meet the real-time requirements.
In response to receiving the input voice, a plurality of first generation requests are initiated based on the input voice and historical interaction information, and a plurality of candidate acceptance speeches are obtained, and a candidate acceptance speech that meets the preset requirements of the historical acceptance speech repetition is determined as the target acceptance speech, and a voice broadcast is performed.
Before the large language model generates reply information, it can quickly broadcast natural and smooth reception speech, reduce user waiting time and improve the real-timeness of voice interaction.
Smart Images

Figure CN119649816A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and more particularly to the fields of large language models and speech processing technology, applicable to the field of intelligent outbound calling. More specifically, this disclosure provides a voice interaction method, apparatus, electronic device, storage medium, and computer program product. Background Technology
[0002] In outbound calling scenarios, the outbound call robot can automatically dial a user. After the user answers, it receives the user's voice, and the large model generates a response message, engaging in voice interaction with the user. However, in this process, there is a delay of a few seconds before the large model generates the response message, making it difficult to meet real-time requirements. Summary of the Invention
[0003] This disclosure provides a voice interaction method, apparatus, electronic device, storage medium, and computer program product.
[0004] According to a first aspect, a voice interaction method is provided, the method comprising: responding to receiving input voice, initiating multiple first generation requests based on the input voice and historical interaction information, obtaining multiple candidate successors corresponding to the multiple first generation requests respectively, wherein the historical interaction information includes historical input text, historical successors, and historical reply text used to reply to the historical input text; determining from the multiple candidate successors a candidate successor whose repetition with the historical successor meets a preset requirement, as a target successor; and outputting the voice of the target successor.
[0005] According to a second aspect, a voice interaction device is provided, comprising: a candidate successor generation module, configured to, in response to receiving input voice, initiate multiple first generation requests based on the input voice and historical interaction information, and obtain multiple candidate successors corresponding to the multiple first generation requests respectively, wherein the historical interaction information includes historical input text, historical successors, and historical reply text used to reply to the historical input text; a target successor determination module, configured to determine, from the multiple candidate successors, a candidate successor whose repetition with the historical successor meets a preset requirement, as the target successor; and a first output module, configured to output the voice of the target successor.
[0006] According to a third aspect, an electronic device is provided, 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, the instructions being executed by the at least one processor to enable the at least one processor to perform a method provided according to the present disclosure.
[0007] According to a fourth aspect, a non-transitory computer-readable storage medium is provided that stores computer instructions for causing a computer to perform the methods provided in this disclosure.
[0008] According to a fifth aspect, a computer program product is provided, comprising a computer program stored on at least one of a readable storage medium and an electronic device, wherein the computer program, when executed by a processor, implements the method provided in this disclosure.
[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0011] Figure 1 This is an exemplary system architecture diagram of a voice interaction method and apparatus applicable according to an embodiment of the present disclosure;
[0012] Figure 2 This is a flowchart of a voice interaction method according to an embodiment of the present disclosure;
[0013] Figure 3 This is a system schematic diagram of a voice interaction method according to an embodiment of the present disclosure;
[0014] Figure 4 This is an optimized schematic diagram of a continuation generation model according to an embodiment of the present disclosure;
[0015] Figure 5 This is a block diagram of a voice interaction device according to an embodiment of the present disclosure; and
[0016] Figure 6 This is a block diagram of an electronic device using a voice interaction method according to an embodiment of the present disclosure. Detailed Implementation
[0017] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0018] The voice interaction process in outbound calling scenarios is a series of processes involving speech recognition, large language model generation, and text-to-speech technology. Specifically, after receiving the user's voice, it is converted into text, the converted text is input into the large language model to generate the response text, and then the response text is converted into speech for broadcast.
[0019] However, large language models, which can contain hundreds of billions of characters, may have a delay of 1.5 to 2 seconds for the first character, and the overall time from speaking to receiving a response can exceed 3 seconds.
[0020] To reduce user waiting time, current solutions include the following methods.
[0021] One approach is to play a fixed voice message before the large language model generates a response.
[0022] Another approach is to set up a list of successor words and poll or randomly select successor words from the list for voice playback before the large language model generates a response.
[0023] Another approach is to set up a list of successor words, collect historical dialogue information, train a classification model based on this information, and assign labels to the values in the successor word list. When applying the classification model, it determines the successor word from the list based on the model's classification results, and then plays the selected successor word aloud.
[0024] All of the above methods suffer from issues such as unnatural and disjointed transitions, and a tendency to be out of context. Even with classification models, the results are still determined from a fixed list, leading to awkward interactions due to a lack of diversity in transitions. Furthermore, classification models have insufficient generalization ability and struggle to adapt to various language scenarios.
[0025] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0026] In the technical solution disclosed herein, the user's authorization or consent is obtained before acquiring or collecting the user's personal information.
[0027] Figure 1 This is a schematic diagram of an exemplary system architecture for applying voice interaction methods and devices according to an embodiment of this disclosure. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.
[0028] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.
[0029] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Terminal devices 101, 102, and 103 can be various electronic devices, including but not limited to smartphones, tablets, laptops, etc.
[0030] The voice interaction method provided in this disclosure can generally be executed by server 105. Correspondingly, the voice interaction device provided in this disclosure can generally be located in server 105. The voice interaction method provided in this disclosure can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the voice interaction device provided in this disclosure can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105.
[0031] Figure 2 This is a flowchart of a voice interaction method according to an embodiment of the present disclosure.
[0032] like Figure 2 As shown, the voice interaction method 200 includes operations S210 to S230.
[0033] In operation S210, in response to receiving input voice, multiple first generation requests are initiated based on the input voice and historical interaction information, and multiple candidate continuation phrases corresponding to the multiple first generation requests are obtained.
[0034] For example, in outbound calling scenarios, outbound call robots can engage in multi-round voice interactions with users. After receiving the user's voice input in the current round, it can obtain historical interaction information from multiple rounds of interactions. This historical interaction information can include historical input text, historical concluding phrases, and historical response text used to reply to historical input text.
[0035] For example, the historical interaction information for one round might be: [User: Who are you? Outbound robot: Hello, sir, I am XXX.] In this historical interaction information, the user's input "Who are you?" can be historical input text, the outbound robot's output "Hello, I am XXX" can be historical reply text used to answer "Who are you?", and the robot's output "Sir" can be a historical continuation phrase generated and output before "Hello, I am XXX".
[0036] After obtaining the aforementioned historical interaction information, this information can be integrated into the prompt words used to generate the continuation phrase for the current round. Additionally, the input speech for the current round can be converted into text and also integrated into the prompt words. Then, based on these prompt words, a first generation request is initiated, which requests the large language model to generate the continuation phrase for the current round.
[0037] For example, multiple initial generation requests can be initiated in parallel based on the aforementioned prompts, requesting the large language model to generate multiple candidate successors. This allows for the selection of a more natural, flowing, and context-appropriate successor from among the multiple candidate successors.
[0038] In operation S220, candidate successors that meet the preset requirements for repetition with historical successors are selected from multiple candidate successors and used as target successors.
[0039] The repetition between candidate and historical successors can refer to the percentage of identical characters in the two phrases, such as the ratio of the number of identical characters to the total number of characters in the candidate successor. A preset requirement is that the repetition rate be less than a threshold (e.g., 20%).
[0040] For example, a candidate phrase with a repetition degree of less than a threshold with the historical phrase can be selected from multiple candidate phrases as the target phrase. If there are multiple candidate phrases with a repetition degree of less than the threshold, the candidate phrase with the lowest repetition degree with the historical phrase can be selected from multiple candidate phrases as the target phrase, which can improve the naturalness of the phrase.
[0041] For example, the large language model generates multiple candidate conjugates for the current round, including: "Sir," "Okay," and "That's right." Since "Sir" has already appeared in the historical conjugates, the target conjugate can be selected from "Okay" and "That's right." Specifically, the target conjugate can be selected from "Okay" and "That's right" based on the context, choosing one that is more in line with the context or flows more naturally.
[0042] For example, there can be multiple rounds of historical interaction and multiple historical continuation phrases. Multiple candidate continuation phrases in the current round may have appeared in historical continuation phrases. In this case, the candidate continuation phrase that appears the least in historical continuation phrases can be selected as the target continuation phrase.
[0043] When operating S230, the voice of the target continuation is output.
[0044] After determining the target continuation phrase, it can be read aloud. Since the continuation phrase is shorter than the response message and can be generated quickly, it can be played before the large language model generates the response message, thus reducing the user's waiting time.
[0045] In response to receiving input voice, embodiments of this disclosure initiate multiple first generation requests in parallel based on historical interaction information to request the generation of multiple candidate successive phrases. From the multiple candidate successive phrases, a target successive phrase with the lowest repetition with historical successive phrases is selected for voice playback. This enables the playback of natural and smooth successive phrases to the user before the large language model generates a response, reducing user waiting time and improving the real-time performance of voice interaction.
[0046] Figure 3 This is a system schematic diagram of a voice interaction method according to an embodiment of the present disclosure.
[0047] like Figure 3 As shown, the system in this embodiment includes a speech recognition module 310, a first large language model 320, a second large language model 330, and a speech broadcasting module 340.
[0048] After receiving the user's voice input, the speech recognition module 310 can convert the user's voice input into text. The primary language model 320 can then be invoked to generate multiple candidate phrases based on the input text and historical interaction information.
[0049] For example, historical interaction information and input text can be integrated into prompts used to generate successors. Then, based on the prompts, multiple first generation requests are sent in parallel to the first language model 320. The first language model 320 responds to each first generation request by generating multiple candidate successors. For example, the multiple candidate successors include candidate successor 1, candidate successor 2, ..., candidate successor N. Where N can be an integer greater than 2.
[0050] According to embodiments of this disclosure, a large language model is invoked to generate multiple candidate phrases that satisfy a preset degree of diversity based on the input speech and historical interaction information, according to preset diversity parameters.
[0051] Since multiple first generation requests initiated in parallel may cause the first language model 320 to generate the same candidate successor, a diversity parameter can be set for the first language model 320 to make the successors more diverse. This diversity parameter is used to control the degree of diversity among the multiple candidate successors generated by the first language model 320.
[0052] For example, the diversity parameter can range from 0 to 1. The larger the diversity parameter, the higher the degree of diversity among the multiple candidate phrases generated by the first large language model 320. The smaller the diversity parameter, the lower the degree of diversity among the multiple candidate phrases generated by the first large language model 320.
[0053] After obtaining multiple candidate successors generated by the first language model 320, the candidate successor with a repetition degree that meets the preset requirements (e.g., the repetition degree is less than the threshold) can be selected from the multiple candidate successors as the target successor 321. If there are multiple candidate successors with a repetition degree that meets the preset requirements, the candidate successor with the lowest repetition degree can be selected as the target successor 321.
[0054] For example, in historical multi-turn interactions, the first language model 320 has generated multiple historical continuations. By selecting the target continuation with the lowest repetition with the historical continuation from among the multiple candidate continuations, the naturalness of the dialogue can be improved.
[0055] Furthermore, compared to the methods used in related technologies that employ fixed messages or determine successors from a fixed list, the embodiments of this disclosure generate successors by calling a large language model (first large language model 320), which can generate successors that are more context-appropriate and relevant to the surrounding text, thereby improving the fluency of the interaction.
[0056] Next, the target phrase 321 can be input into the voice broadcast module 340, which can convert the target phrase 321 into speech and broadcast it.
[0057] According to embodiments of this disclosure, in response to receiving input voice, a second generation request is initiated based on the input voice and historical interaction information to obtain a target response text for replying to the input voice; and the voice of the target response text is output.
[0058] After the user's input speech is converted into input text by the speech recognition module 310, the second language model 330 can be called to generate the target response text 331 based on the input text and historical interaction information.
[0059] For example, historical interaction information includes [User: Who are you? Outbound robot: Hello, sir, this is XXX.], and the input text obtained from the speech conversion of the current round is "What can I do for you?". The input text of the current round and the historical interaction information can be integrated into the prompt words used to generate the response information. Then, the prompt words are input to the second language model 330, which generates the target response text 331. For example, the target response text 331 could be "We would like you to fill out a questionnaire."
[0060] Next, the target reply text 331 can be input into the voice broadcast module 340, which can convert the target reply text 331 into speech and broadcast it.
[0061] It's important to note that the successor phrases are relatively short. The first language model 320, used to generate candidate successor phrases, can generate them in just a few hundred milliseconds, while the second language model 330, used to generate the target response text, may take several seconds. Therefore, the generation speed of candidate successor phrases is exceptionally fast, and the operation of determining the target successor phrase from the candidate phrases takes almost no time. Consequently, the output of the target successor phrase 321 precedes the output of the target response text 331. In other words, generating the target successor phrase before generating the target response text for replying to the input speech and then broadcasting it to the user reduces user waiting time and improves the user experience.
[0062] The first language model 320 used to generate candidate successors can be called a successor generation model. This model can be trained using historical interaction information and can be optimized through data feedback. The following section combines... Figure 4 The optimization of the continuation generation model in the embodiments of this disclosure will be described.
[0063] Figure 4 This is an optimized schematic diagram of a continuation generation model according to an embodiment of the present disclosure.
[0064] like Figure 4 As shown, this embodiment includes a data collection module 410, a data processing module 420, a model training module 430, an online inference module 440, and a data feedback module 450.
[0065] According to embodiments of this disclosure, sample interaction information is integrated into a prompt word template to obtain prompt words, wherein the sample interaction information includes sample input text, sample continuation phrases, and sample response text for replying to the sample input text; the prompt words are input into a large language model to obtain output interaction information, wherein the output interaction information includes output continuation phrases and output response text; a loss is determined based on the difference between the sample continuation phrases and the output continuation phrases; and the parameters of the large language model are adjusted based on the loss.
[0066] The data collection module 410 is used to collect historical interaction information in various language scenarios as sample interaction information. The sample interaction information includes sample input text, sample concluding phrases, and sample response text.
[0067] The data processing module 420 integrates sample interaction information into the prompt word template to obtain prompt words. During the integration process, the sample interaction information can be modified to make the sample continuation phrases and sample response texts more context-appropriate. Then, the modified sample continuation phrases in the sample interaction information can be used as training labels.
[0068] The model training module 430 is used to train the model based on the prompt words processed by the data processing module 420. For example, the prompt words are input into the large language model, and the large language model outputs the generated result, which includes the output continuation words and the output response text. The large language model can be fine-tuned based on the difference between the sample continuation words and the output continuation words generated by the large language model. After multiple rounds of fine-tuning, a large language model that can generate continuation words that meet expectations can be obtained, i.e., a continuation word generation model.
[0069] The online reasoning module 440 is used to generate the concluding phrase and response text for the current round based on the input text of the current round and historical interaction information during actual interaction. The input text can be obtained by converting input speech. The online reasoning module 440 can generate concluding phrases and response texts for multiple rounds. The concluding phrase for each round can be a candidate concluding phrase selected from multiple candidate concluding phrases, whose repetition with historical concluding phrases meets preset requirements.
[0070] According to embodiments of this disclosure, historical interaction information in multiple contexts is obtained; for the historical interaction information in the context, interaction information that does not meet the context requirements is determined from the historical interaction information; the interaction information that does not meet the context requirements is corrected to obtain corrected interaction information; and the corrected interaction information is determined as sample interaction information.
[0071] For example, the input text, follow-up phrases, and response text from multiple rounds in different contexts can be saved as a dataset, which can then be used in the data feedback module 450 to optimize the follow-up phrase generation model.
[0072] The data feedback module 450 can select inappropriate consonants from the saved dataset as examples, and then correct them, such as changing inappropriate consonants to appropriate ones. These corrected examples can then be returned to the data collection module 410 as new sample interaction information to retrain the consonant generation model. This process can be called reinforcement learning. Optimizing the consonant generation model using reinforcement learning can result in a model with stronger generalization ability.
[0073] The embodiments of this disclosure collect historical interaction information, use the historical interaction information to train a large language model to obtain a continuation phrase generation model, and select samples from the online generation results of the continuation phrase generation model for feedback to optimize the continuation phrase generation model. This can improve the generalization ability of the continuation phrase generation model and make it adaptable to more outbound call scenarios.
[0074] According to embodiments of this disclosure, this disclosure also provides a voice interaction device.
[0075] Figure 5 This is a block diagram of a voice interaction device according to an embodiment of the present disclosure.
[0076] like Figure 5 As shown, the voice interaction device 500 includes a candidate conjunctive phrase generation module 510, a target conjunctive phrase determination module 520, and a first output module 530.
[0077] The candidate successor generation module 510 is used to respond to the received input voice, initiate multiple first generation requests based on the input voice and historical interaction information, and obtain multiple candidate successors corresponding to the multiple first generation requests respectively. The historical interaction information includes historical input text, historical successors, and historical reply text used to reply to historical input text.
[0078] The target continuation word determination module 520 is used to determine the candidate continuation words from multiple candidate continuation words whose repetition with historical continuation words meets the preset requirements, and use them as the target continuation words.
[0079] The first output module 530 is used to output the speech of the target continuation phrase.
[0080] The candidate continuation phrase generation module 510 is used to generate multiple candidate continuation phrases that meet the preset diversity level by calling a large language model based on the input speech and historical interaction information and according to preset diversity parameters.
[0081] The voice interaction device 500 also includes a target response text generation module and a second output module.
[0082] The target response text generation module is used to respond to received input voice by initiating a second generation request based on the input voice and historical interaction information to obtain the target response text for replying to the input voice.
[0083] The second output module is used to output the audio of the target reply text.
[0084] The target response text generation module includes a first conversion unit and a target response text generation unit.
[0085] The first conversion unit is used to convert the input speech into text.
[0086] The target response text generation unit is used to generate target response text for replying to the input speech by calling a large language model based on the text of the input speech and historical interaction information.
[0087] The candidate successor generation module 510 includes a second conversion unit and a candidate successor generation unit.
[0088] The second conversion unit is used to convert the input speech into text.
[0089] The candidate successor generation unit is used to generate multiple candidate successors corresponding to multiple first generation requests by calling the large language model based on the text of the input speech and historical interaction information.
[0090] The voice interaction device 500 also includes a sample interaction information determination module, a prompt word determination module, a loss determination module, and an adjustment module.
[0091] The sample interaction information determination module is used to integrate the sample interaction information into the prompt word template to obtain the prompt word. The sample interaction information includes the sample input text, the sample continuation phrase, and the sample reply text used to reply to the sample input text.
[0092] The prompt word determination module is used to input prompt words into the large language model and obtain output interaction information, which includes output continuation words and output response text.
[0093] The loss determination module is used to determine the loss based on the difference between the sample concatenation and the output concatenation.
[0094] The tuning module is used to adjust the parameters of the large language model based on the loss.
[0095] The voice interaction device 500 also includes a historical interaction information determination module, a filtering module, a correction module, and a feedback module.
[0096] The historical interaction information determination module is used to obtain historical interaction information in multiple contexts.
[0097] The filtering module is used to identify interaction information that does not meet the requirements of the context from historical interaction information.
[0098] The correction module is used to correct interactive information that does not meet the requirements of the context, and obtain the corrected interactive information.
[0099] The reflow module is used to identify the corrected interaction information as sample interaction information.
[0100] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0101] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments 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 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0102] like Figure 6 As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded into random access memory (RAM) 603 from storage unit 608. RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0103] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0104] The computing unit 601 can be a variety of general-purpose and / or special-purpose 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 special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as voice interaction methods. For example, in some embodiments, the voice interaction method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on 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 by any other suitable means (e.g., by means of firmware).
[0105] Various embodiments 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-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0106] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0107] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on 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 of the foregoing.
[0108] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).
[0109] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0110] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
[0111] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0112] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A voice interaction method, comprising: In response to receiving an input voice, initiating a plurality of first generation requests according to the input voice and historical interaction information, and obtaining a plurality of candidate continuation phrases corresponding to the plurality of first generation requests, wherein the historical interaction information includes a historical input text, a historical continuation phrase, and a historical reply text for replying to the historical input text; Determining, from the plurality of candidate continuation terms, a candidate continuation term whose degree of repetition with the historical continuation term meets a preset requirement as a target continuation term; and The target connecting word is outputted.
2. The method according to claim 1, wherein: The initiating a plurality of first generation requests according to the input speech and the historical interaction information, and obtaining a plurality of candidate continuation phrases respectively corresponding to the plurality of first generation requests comprises: According to the input speech and historical interaction information, a large language model is called to generate a plurality of candidate continuation words that meet a preset diversity level according to a preset diversity parameter.
3. The method according to claim 1, further comprising: In response to receiving an input voice, initiating a second generation request according to the input voice and the historical interaction information to obtain a target reply text for replying to the input voice; as well as Output the target reply text.
4. The method according to claim 3, wherein: The initiating a second generation request according to the input voice and the historical interaction information to obtain a target reply text for replying to the input voice comprises: Converting the input speech into text; and According to the text of the input speech and the historical interaction information, a large language model is called to generate a target reply text for replying to the input speech.
5. The method according to claim 1, wherein: The initiating a plurality of first generation requests according to the input speech and the historical interaction information, and obtaining a plurality of candidate continuation phrases respectively corresponding to the plurality of first generation requests comprises: Converting the input speech into text; and According to the text of the input speech and the historical interaction information, a large language model is called to generate a plurality of candidate continuation words corresponding to the plurality of first generation requests respectively.
6. The method according to claim 1, further comprising: Integrate the sample interaction information into a prompt word template to obtain a prompt word, wherein the sample interaction information includes a sample input text, a sample follow-up word, and a sample reply text for replying to the sample input text; Inputting the prompt word into the large language model to obtain output interaction information, wherein the output interaction information includes an output continuation word and an output reply text; determining a loss based on a difference between the sample continuation language and the output continuation language; and According to the loss, parameters of the large language model are adjusted.
7. The method according to claim 6, further comprising: Obtain historical interaction information in multiple contexts; For the historical interaction information in the context, determining the interaction information that does not meet the context requirement from the historical interaction information; Correcting the interaction information that does not meet the context requirement to obtain corrected interaction information; as well as The modified interaction information is determined as the sample interaction information.
8. A voice interaction device, comprising: a candidate continuation phrase generation module, configured to, in response to receiving an input voice, initiate a plurality of first generation requests according to the input voice and historical interaction information, and obtain a plurality of candidate continuation phrases respectively corresponding to the plurality of first generation requests, wherein the historical interaction information includes a historical input text, a historical continuation phrase, and a historical reply text for replying to the historical input text; a target continuation phrase determination module, configured to determine, from the plurality of candidate continuation phrases, a candidate continuation phrase whose degree of repetition with the historical continuation phrase meets a preset requirement, as a target continuation phrase; and The first output module is used to output the speech of the target transition language.
9. 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 to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, wherein the computer program is stored on at least one of a readable storage medium and an electronic device, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Joint decision model-based undertaking word acquisition method and system
CN120509495A
Method and system for obtaining a continuation word based on a joint decision model
CN120509495B