Voice reply method, device and system
Patent Information
- Application Number
- CN202310808954.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-07-03
AI Technical Summary
[0004]本申请实施例提供了一种语音回复方法、装置及系统,以至少解决由于相关技术中无法对回复的内容进行自定义且无法确定通话阶段造成的无法针对特定业务场景进行适配的技术问题
[0016]在本申请实施例中,采用接收目标终端设备转发的第一通话文本;确定与第一通话文本对应的第一对话过程数据,其中,第一对话过程数据用于确定第一通话文本的语义信息和通话阶段;依据第一对话过程数据确定第一通话文本的语义信息和通话阶段,并依据第一通话文本的语义信息和通话阶段更新第一对话过程数据,得到第二对话过程数据;向目标终端设备发送依据第二对话过程数据确定的第二通话文本的方式,通过将通话文本转换为对话过程数据,并根据对话过程数据来确定语义信息和通话阶段,并依据通话阶段和语义信息修改通话数据来得到恢复的通话文本,达到了确定通话过程并依据通话过程和具体通话内容来确定回复内容的目的,从而实现了针对特定业务场景进行适配的技术效果,进而解决了由于相关技术中无法对回复的内容进行自定义且无法确定通话阶段造成的无法针对特定业务场景进行适配技术问题。
Smart Images

Figure CN116825103B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of speech recognition, and more specifically, to a speech response method, apparatus, and system. Background Technology
[0002] The voice assistants provided in related technologies that can recognize speech and respond based on the recognition results usually cannot allow customers to customize the content of the response, nor can they determine the current stage of the call based on the voice. As a result, existing voice assistants can only provide simple responses and cannot adapt to specific business scenarios.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This application provides a voice response method, apparatus, and system to at least solve the technical problem that the inability to customize the content of the response and the inability to determine the stage of the call in related technologies makes it impossible to adapt to specific business scenarios.
[0005] According to one aspect of the embodiments of this application, a voice response method is provided, comprising: receiving a first call text forwarded by a target terminal device; determining first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; determining the semantic information and call stage of the first call text based on the first dialogue process data, and updating the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; and sending the second call text determined based on the second dialogue process data to the target terminal device.
[0006] Optionally, the call phase types include a call start phase, a call middle phase, and a call end phase; the steps of determining the semantic information of the first call text and the call phase based on the first dialogue process data include: determining the phase type of the call phase corresponding to the first call text based on the phase identifier in the first dialogue process data; the steps of updating the first dialogue process data based on the semantic information of the first call text and the call phase include: determining the target functional module corresponding to the first call text from the functional module set based on the phase type of the call phase corresponding to the first call text, wherein the functional module includes an initial module, a response module, and an end control module; calling the target functional module to update the first dialogue process data based on the semantic information to obtain the second dialogue process data.
[0007] Optionally, when the target functional module is a response module, the step of calling the target functional module to update the first dialogue process data based on semantic information to obtain the second dialogue process data includes: extracting semantic information from the first dialogue process data through the response module, wherein the semantic information includes the emotional information and business scenario information of the first call text; determining a preset text set corresponding to the business scenario based on the business scenario information, and determining the target preset text from the preset text set based on the emotional information; updating the first dialogue process data based on the target preset text to obtain the second dialogue process data.
[0008] Optionally, before the step of extracting semantic information from the first dialogue process data through the reply module, the voice reply method further includes: determining whether the first call text is silent text based on the first dialogue process data, wherein silent text is text in which the proportion of blank content or unrecognized content is greater than a preset proportion; if the first call text is silent text, providing feedback to the target terminal device to indicate the end of the call; after the steps of determining a preset text set corresponding to the business scenario based on the business scenario information, and determining the target preset text from the preset text set based on emotion information, the voice reply method further includes: determining whether the target preset text has been used in the current call, and if it has been determined to be used, determining whether to provide feedback to the target terminal device to indicate the end of the call based on the first dialogue process data.
[0009] Optionally, when the target functional module is the initial module, the voice response method further includes: instructing the target terminal device to play preset audio through the initial module, and calling the response module as the target functional module after the playback is completed.
[0010] Optionally, when the target functional module is the end control module, the voice response method further includes: acquiring all first dialogue process data and all second dialogue process data contained in the call; performing error correction processing on the text data in all first dialogue process data and all second dialogue process data; and generating a summary information of the call process based on all first dialogue process data and all second dialogue process data after the error correction processing is completed.
[0011] Optionally, the step of generating a summary of the call process based on all first dialogue process data and all second dialogue process data includes: determining each dialogue round in the call process, and the first and second dialogue process data corresponding to each dialogue round; determining the dialogue text corresponding to each dialogue round based on the first and second dialogue process data corresponding to each dialogue round, wherein the dialogue text contains multiple delimiters, and the number of characters between any two adjacent delimiters does not exceed a preset threshold; determining the target character count, wherein the target character count is the maximum number of characters between two adjacent punctuation marks in the summary information; extracting the summary text from the dialogue text corresponding to each dialogue round based on the target character count, and concatenating the summary text corresponding to each dialogue round to obtain the summary information.
[0012] According to another aspect of the embodiments of this application, a voice response method is also provided, comprising: receiving a first audio and determining a first call text corresponding to the first audio; sending the first call text to a target server and obtaining a second call text fed back by the target server, wherein the target server is configured to: determine first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; sending the second call text determined based on the second dialogue process data to a target terminal device; and generating and playing a second audio corresponding to the second call text based on the second call text.
[0013] According to another aspect of the embodiments of this application, a voice response device is also provided, comprising: a first processing module, configured to receive a first call text forwarded by a target terminal device; a second processing module, configured to determine first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; a third processing module, configured to determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; and a fourth processing module, configured to send the second call text determined based on the second dialogue process data to the target terminal device.
[0014] According to another aspect of the embodiments of this application, a voice response device is also provided, comprising: a first processing module, configured to receive a first call text forwarded by a target terminal device; a second processing module, configured to determine first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; a third processing module, configured to determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; and a fourth processing module, configured to send the second call text determined based on the second dialogue process data to the target terminal device.
[0015] According to another aspect of the embodiments of this application, a voice response system is also provided, including a target terminal device and a server. The target terminal device is configured to receive a first audio signal and determine a first call text corresponding to the first audio signal; send the first call text to a target server and obtain a second call text fed back by the target server; generate and play a second audio signal corresponding to the second call text based on the second call text; the server is configured with a target database and a set of functional modules, wherein the target database is configured to store first dialogue process data corresponding to the first call text and second dialogue process data corresponding to the second call text; the set of functional modules is configured to determine the first dialogue process data, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; and send the second call text determined based on the second dialogue process data to the target terminal device.
[0016] In this embodiment, the method involves receiving a first call text forwarded by a target terminal device; determining first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; determining the semantic information and call stage of the first call text based on the first dialogue process data, and updating the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; and sending the second call text determined based on the second dialogue process data to the target terminal device. By converting the call text into dialogue process data, determining the semantic information and call stage based on the dialogue process data, and modifying the call data based on the call stage and semantic information to obtain the recovered call text, the method achieves the purpose of determining the call process and determining the reply content based on the call process and specific call content. This achieves the technical effect of adapting to specific business scenarios and solves the technical problem that related technologies cannot customize the reply content and cannot determine the call stage, thus preventing adaptation to specific business scenarios. Attached Figure Description
[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0018] Figure 1 This is a schematic diagram of the structure of a computer device (mobile terminal) according to an embodiment of this application;
[0019] Figure 2 This is a flowchart illustrating a voice response method according to an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of the overall functional architecture of various functional modules according to an embodiment of this application;
[0021] Figure 4 This is a flowchart illustrating a voice response process according to an embodiment of this application;
[0022] Figure 5 This is a flowchart illustrating another voice response method according to an embodiment of this application;
[0023] Figure 6 This is a schematic diagram of the structure of a voice response device according to an embodiment of this application;
[0024] Figure 7 This is a schematic diagram of the structure of a voice response system according to an embodiment of this application. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] Currently, the application scenarios of intelligent communication assistants in the mobile communication field are becoming increasingly widespread. In intelligent communication assistants, the semantic module, involving semantic understanding and intelligent dialogue, is the core of the intelligent communication assistant business, determining its practicality, necessity, level of intelligence, and development potential. However, existing semantic recognition technologies face the following problems when applied to communication assistants: First, current semantic recognition technologies cannot easily set response messages and determine call stages, making them unsuitable for specific scenarios such as operator business scenarios; second, related semantic recognition modules are typically task-oriented, question-and-answer (QA), and open-domain, but are less commonly used in reverse question-and-answer scenarios and cannot accommodate the diverse special business needs of various call-making roles; third, they cannot quickly accommodate market-customized welcomes, personalized dialogues, and the ability to intelligently jump between closed dialogue spaces while also skipping certain queries and extracting summaries; finally, they cannot quickly adapt to remote deployment and invocation, or to the decoupling and hierarchical processing of large-scale network voice streams and conversations.
[0028] To address the aforementioned issues, this application provides relevant solutions, which are detailed below.
[0029] According to an embodiment of this application, a method embodiment for a voice response method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0030] The methods and embodiments provided in this application can be executed on mobile terminals, computer terminals, or similar computing devices. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a voice response method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0031] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0032] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the voice response method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the voice response method of the aforementioned application. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0033] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0034] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0035] Under the above operating environment, this application embodiment provides a voice response method, such as... Figure 2 As shown, the method includes the following steps:
[0036] Step S202: Receive the first call text forwarded by the target terminal device;
[0037] In the technical solution provided in step S202, the target terminal device can call the API interface to use the running... Figure 2The server, as shown in the voice response method, obtains the second call text corresponding to the first call text. Specifically, when the target terminal device calls the API interface, it can send the first call text to the server through the API interface. The first call text may include the call identifier information (CALLID) and the first call text obtained by converting the call audio using methods such as ASR (Audio Recognition). The target terminal device then obtains the second call text returned by the server, as well as indication information for whether to terminate the current call. This indication information can be stored in the second call text in the form of a specific identifier. After receiving the second call text, the target terminal device can play the corresponding audio information or choose to end the call based on the second call text.
[0038] Step S204: Determine the first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text;
[0039] In the technical solution provided in step S304, when determining the first dialogue process data, the latest generated dialogue process data corresponding to the current round of the call, i.e., the first dialogue process data, can be retrieved from the server's database using CALLID. The first dialogue process data can then be sent to the server's functional module for generating response information for further processing.
[0040] It should be noted that the data structure type of the first dialogue process data mentioned above is DPDS (Dialogue Process Data Structure), which is a data structure specifically used for semantic recognition and generating response information provided in the embodiments of this application. This type of data structure can interactively decouple various functional modules within a dialogue cycle, allowing the various functional modules to be interconnected to meet the requirements of API front-end and back-end separation and data function separation.
[0041] Specifically, the DPDS data in this application embodiment may include the following fields:
[0042] record_dtl_info: Records every message sent by the user;
[0043] end_flag: Used to control whether the conversation ends;
[0044] current_reply: Used to reply to the current user's conversation;
[0045] e2e_pred: Used to determine and record the current scenario based on all contextual information;
[0046] intent_record: Used to determine and record the current scene dialogue flow based on all context information. It can be in script form in sequence or in any other form.
[0047] call_id: A unique identifier used to record the user's call in this round;
[0048] service_type: Records the current call phase and determines which functional module should handle the DPDS data. When the call starts, the default setting is a welcome message.
[0049] firstAnswer: Used to implement a custom welcome message function;
[0050] intent_slot_dst: Used to record and determine the current scenario and keyword extraction based on all contextual information of the user's call.
[0051] cus_intent_reply: Used to record and determine user-defined reply rules, enabling personalized replies for different scenarios.
[0052] In some embodiments of this application, in addition to the fields mentioned above, users can also define the required fields and their functions according to their own actual needs.
[0053] In some embodiments of this application, the DPDS data structure described above can also be used to conveniently configure and broadcast user-defined personalized welcome messages. For example, at the start of a call, the user-defined personalized welcome message can be retrieved from the backend database using the CALLID and firstAnswer fields of the DPDS, initialized in the current_reply field of the DPDS, and then returned.
[0054] Step S206: Determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain the second dialogue process data.
[0055] In the technical solution provided in step S206, the phase types of the call phase include the call start phase, the call middle phase, and the call end phase; the steps of determining the semantic information of the first call text and the call phase based on the first dialogue process data include: determining the phase type of the call phase corresponding to the first call text based on the phase identifier in the first dialogue process data; the steps of updating the first dialogue process data according to the semantic information of the first call text and the call phase include: determining the target functional module corresponding to the first call text from the functional module set based on the phase type of the call phase corresponding to the first call text, wherein the functional module includes an initial module, a reply module, and an end control module; calling the target functional module to update the first dialogue process data according to the semantic information to obtain the second dialogue process data.
[0056] As an optional implementation, when the target functional module is a response module, the step of calling the target functional module to update the first dialogue process data based on semantic information to obtain the second dialogue process data includes: extracting semantic information from the first dialogue process data through the response module, wherein the semantic information includes the emotional information and business scenario information of the first call text; determining a preset text set corresponding to the business scenario based on the business scenario information, and determining a target preset text from the preset text set based on the emotional information; updating the first dialogue process data based on the target preset text to obtain the second dialogue process data.
[0057] Specifically, the response module can process the first dialogue process data based on fields within the first dialogue process data. For example, it can determine whether to proceed with the intelligent response function modules sequentially according to the above process based on the DPDS end_flag field. If the DPDS end_flag field is set to end call, the intelligent response function will not be accessed, and the module controlling the end of the call will be accessed instead.
[0058] In some embodiments of this application, before the step of extracting semantic information from the first dialogue process data through the reply module, the voice reply method further includes: determining whether the first call text is silent text based on the first dialogue process data, wherein silent text is text in which the proportion of blank content or unrecognized content is greater than a preset proportion; if the first call text is silent text, providing feedback to the target terminal device with indication information to indicate the end of the call; after the steps of determining a preset text set corresponding to the business scenario based on business scenario information and determining the target preset text from the preset text set based on emotion information, the voice reply method further includes: determining whether the target preset text has been used in the current call, and if it is determined that it has been used, providing feedback to the target terminal device with indication information to indicate the end of the call based on the first dialogue process data.
[0059] In some embodiments of this application, when the target functional module is the initial module, the voice response method further includes: instructing the target terminal device to play preset audio through the initial module, and calling the response module as the target functional module after the playback is completed.
[0060] As an optional implementation, when the target functional module is an end control module, the voice response method further includes: acquiring all first dialogue process data and all second dialogue process data contained in the call; performing error correction processing on the text data in all first dialogue process data and all second dialogue process data; and generating summary information of the call process based on all first dialogue process data and all second dialogue process data after the error correction processing is completed.
[0061] In some embodiments of this application, the step of generating summary information of a call process based on all first dialogue process data and all second dialogue process data includes: determining each dialogue round in the call process, and the first and second dialogue process data corresponding to each dialogue round; determining the dialogue text corresponding to each dialogue round based on the first and second dialogue process data corresponding to each dialogue round, wherein the dialogue text contains multiple delimiters, and the number of characters between any two adjacent delimiters does not exceed a preset threshold; determining the target character count, wherein the target character count is the maximum number of characters between two adjacent punctuation marks in the summary information; extracting summary text from the dialogue text corresponding to each dialogue round based on the target character count, and concatenating the summary text corresponding to each dialogue round to obtain the summary information.
[0062] In some embodiments of this application, the functions of the above-mentioned functional modules are as follows: Figure 3 As shown. From Figure 3 As can be seen, the initialization module can be used to initialize call process data and obtain default or user-defined welcome messages. The response module can extract valid information from the call process to determine whether the call can proceed to the next dialogue. Specifically, the response module can confirm that the next dialogue can proceed if valid information is extracted; otherwise, it can confirm the end of the dialogue or perform subsequent silence detection and goodbye intent recognition. The silence detection includes checking whether the recognition result of the call content of the caller recorded in the first dialogue process data is clear, whether the dialogue information is clear, and whether the caller has not spoken for a certain period of time. The goodbye intent recognition includes determining whether the caller is about to hang up based on the call content.
[0063] The response module can also extract key information from the dialogue process data and perform further analysis and identification based on the extracted key information, including the identification of valid information. Additionally, after determining the text to be played to the caller, the response module can check whether the text has already been played in the current round of the conversation. If it confirms that the text has already been played, the call can be terminated.
[0064] Specifically, when identifying valid information in the dialogue, the response module can use various machine learning or deep learning methods. If no valid information is identified, it can stop responding and directly return an ending statement, recording relevant information in the `current_reply` and `end_flag` fields of the dialogue process data. If valid information is found, the next stage of silence detection can proceed.
[0065] When performing silence detection, any machine learning or deep learning recognition model can be used; this embodiment does not impose any limitations. The purpose of silence detection is to determine whether the content of the call is clear, whether the information is explicit, and whether the caller has remained silent for a period of time. If so, a backup dialogue is provided or the call is ended, and these are recorded in the current_reply and end_flag fields, respectively; otherwise, the goodbye intent recognition continues.
[0066] When identifying goodbye intent, any machine learning or deep learning method can be used to determine if the user intends to hang up, provide an appropriate response, and end the call. If so, the information is recorded in the current_reply and end_flag fields respectively; otherwise, scenario identification continues.
[0067] Specifically, scene recognition refers to identifying the business scene of a call based on the call content in the call process data. Recognition can be performed using various fields in the call process data. Upon successful recognition, the corresponding scene's playback text is determined based on the recognition result, a pre-playback dialogue is set, and the recognized scene is recorded in the `e2e_pred` field of the dialogue process data. If recognition fails, the pre-playback dialogue is recorded in the `current_reply` field, and key dialogue information is identified simultaneously.
[0068] When identifying key information in a conversation, key words and phrases can be retrieved. Based on the entire content of the conversation, the corresponding key information is identified to determine whether the pre-playback dialogue is appropriate. If all key information has been collected at this point, the current pre-playback text can be skipped, and the next pre-playback text can be continued. This process is repeated until the pre-playback text is determined, and finally, the pre-playback dialogue is recorded in the current_reply field.
[0069] During the call end recognition phase, the system can determine whether all (multiple) text messages for the corresponding scenario have been used in a loop. If all have been used, the current scenario can be ended. If it is determined that all or a preset number of text messages have been used in a loop, the call ends, and the end-of-call flag is added to the end_flag field. Otherwise, the call ends, the recognition process ends, and the intelligent reply function module for this round also ends. Finally, the content of the current_reply field in the dialogue process data is played.
[0070] The end-of-call control module is used to summarize all call data generated during the call and perform text correction on the summarized data after the current call ends. After correction, a summary of the current call is generated based on the summarized data.
[0071] Specifically, when performing text correction, various pre-trained models such as Ernie, BERT, and GPT can be used as text correction models, or a method with preset correction rules can be used to complete text correction. This application does not impose any restrictions on this.
[0072] When generating the summary, methods such as sentence concatenation, extraction, or a summary model can be used. Specifically, the sentence concatenation process includes: dividing the user's dialogue into N sentence forms (SEQ) according to the dialogue rounds; then further dividing each sentence into multiple sentence forms (seq) according to punctuation marks; determining the maximum length (maxlen) that each SEQ can be truncated by dividing the maximum length (MAXLEN) required by the business by the number of SEQs; truncating each sentence set (seq) of each round according to maxlen; sequentially taking the largest subset of seqs within each SEQ that meets the business requirements, and reconcatenating them using commas as delimiters to generate a new SEQ; finally, concatenating all the SEQs of all rounds with periods to generate the final summary.
[0073] Extractive summarization refers to generating extractive summaries using sequence labeling or other existing algorithms. The summarization model can be a SEQ-TO-SEQ generation model trained using various pre-trained models such as ernie-gen and chatgpt.
[0074] Step S208: Send the second call text determined based on the second dialogue process data to the target terminal device.
[0075] In summary, the complete response process of the voice response method provided in this application is as follows: Figure 4 As shown. The terminal device calls the API structure to send the interface call text and CALLID to the server database. The server database then looks up the corresponding DPDS data based on the CALLID, sends the retrieved data to the corresponding functional module, and the functional module updates the DPDS data and returns it to the server database. The server database then generates a reply text based on the updated DPDS data and sends it to the API interface. The API interface then broadcasts the reply text.
[0076] As can be seen, by receiving the first call text forwarded by the target terminal device; determining the first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; determining the semantic information and call stage of the first call text based on the first dialogue process data, and updating the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; and sending the second call text determined based on the second dialogue process data to the target terminal device, the call text is converted into dialogue process data, and the semantic information and call stage are determined based on the dialogue process data. The call data is then modified based on the call stage and semantic information to obtain the recovered call text. This achieves the purpose of determining the call process and determining the reply content based on the call process and specific call content, thereby realizing the technical effect of adapting to specific business scenarios. This solves the technical problem that related technologies cannot customize the reply content and cannot determine the call stage, which prevents adaptation to specific business scenarios.
[0077] The voice response method provided in this application embodiment offers a solution that uses the call CALLID as the primary key, simplifies input / output parameter settings, quickly invokes the semantic interface of the communication assistant, and decouples the large-scale voice stream from the conversation processing. Furthermore, this application embodiment also provides a DPDS data structure, which allows for the interactive decoupling of various functional modules throughout the entire dialogue lifecycle, enabling interconnected functions to meet the requirements of API front-end / back-end separation and data / function separation.
[0078] In addition, the voice response method provided in this application embodiment can be composed of an overall architecture consisting of an API structure, a server-side database, and functional modules in the server side, and executed accordingly. Specifically, the DPDS state storage, query, and change are implemented by the AI server of the communication assistant, which consists of a server-side database and three major functional modules.
[0079] This application provides another voice response method applicable to terminal devices. Figure 5 This is a flowchart illustrating the voice response method, as shown below. Figure 5 As shown, it includes the following steps:
[0080] Step S502: Receive the first audio and determine the first call text corresponding to the first audio.
[0081] Step S504: Send the first call text to the target server and obtain the second call text fed back by the target server. The target server is used to: determine the first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain the second dialogue process data; and send the second call text determined based on the second dialogue process data to the target terminal device.
[0082] Step S506: Generate and play the second audio corresponding to the second call text based on the second call text.
[0083] This application provides a voice response device. Figure 6 This is a schematic diagram of the device, as shown below. Figure 6 As shown, the device includes: a first processing module 60, used to receive a first call text forwarded by a target terminal device; a second processing module 62, used to determine first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; a third processing module 64, used to determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; and a fourth processing module 66, used to send the second call text determined based on the second dialogue process data to the target terminal device.
[0084] In some embodiments of this application, the phase types of a call phase include a call start phase, a call middle phase, and a call end phase; the steps of the second processing module 62 in determining the semantic information of the first call text and the call phase based on the first dialogue process data include: determining the phase type of the call phase corresponding to the first call text based on the phase identifier in the first dialogue process data; the steps of the second processing module 62 in updating the first dialogue process data based on the semantic information of the first call text and the call phase include: determining the target functional module corresponding to the first call text from the functional module set based on the phase type of the call phase corresponding to the first call text, wherein the functional module includes an initial module, a reply module, and an end control module; and calling the target functional module to update the first dialogue process data based on the semantic information to obtain the second dialogue process data.
[0085] In some embodiments of this application, when the target functional module is a response module, the step of the second processing module 62 calling the target functional module to update the first dialogue process data based on semantic information to obtain the second dialogue process data includes: extracting semantic information from the first dialogue process data through the response module, wherein the semantic information includes the emotion information and business scenario information of the first call text; determining a preset text set corresponding to the business scenario based on the business scenario information, and determining a target preset text from the preset text set based on the emotion information; updating the first dialogue process data based on the target preset text to obtain the second dialogue process data.
[0086] In some embodiments of this application, before the step of extracting semantic information from the first dialogue process data through the reply module, the voice reply device is further configured to: determine whether the first call text is silent text based on the first dialogue process data, wherein silent text is text in which the proportion of blank content or unrecognized content is greater than a preset proportion; if the first call text is silent text, provide feedback to the target terminal device with instruction information to indicate the end of the call; after the steps of determining a preset text set corresponding to the business scenario based on the business scenario information and determining the target preset text from the preset text set based on the emotion information, the voice reply device is further configured to: determine whether the target preset text has been used in the current call, and if it is determined that it has been used, determine whether it has been used based on the first dialogue process data, and provide feedback to the target terminal device with instruction information to indicate the end of the call.
[0087] In some embodiments of this application, when the target functional module is the initial module, the voice response device is further configured to: instruct the target terminal device to play preset audio through the initial module, and call the response module as the target functional module after the playback is completed.
[0088] In some embodiments of this application, when the target functional module is an end control module, the voice response device is further configured to: acquire all first dialogue process data and all second dialogue process data contained in the call; perform error correction processing on the text data in all first dialogue process data and all second dialogue process data; and after the error correction processing is completed, generate summary information of the call process based on all first dialogue process data and all second dialogue process data.
[0089] In some embodiments of this application, the step of generating summary information of a call process based on all first dialogue process data and all second dialogue process data includes: determining each dialogue round in the call process, and the first and second dialogue process data corresponding to each dialogue round; determining the dialogue text corresponding to each dialogue round based on the first and second dialogue process data corresponding to each dialogue round, wherein the dialogue text contains multiple delimiters, and the number of characters between any two adjacent delimiters does not exceed a preset threshold; determining the target character count, wherein the target character count is the maximum number of characters between two adjacent punctuation marks in the summary information; extracting summary text from the dialogue text corresponding to each dialogue round based on the target character count, and concatenating the summary text corresponding to each dialogue round to obtain the summary information.
[0090] It should be noted that each module in the above-mentioned voice response device can be a program module (for example, a set of program instructions to implement a certain function) or a hardware module. For the latter, it can be manifested in the following forms, but is not limited to them: each of the above modules is manifested as a processor, or the functions of each of the above modules are implemented by a processor.
[0091] This application provides a voice response system. Figure 7 This is a schematic diagram of the system structure. For example... Figure 7As shown, the system includes a target terminal device and a server. The target terminal device is used to receive a first audio message and determine the first call text corresponding to the first audio message; send the first call text to the target server and obtain a second call text fed back by the target server; generate and play a second audio message corresponding to the second call text based on the second call text; the server is equipped with a target database and a set of functional modules, wherein the target database is used to store first dialogue process data corresponding to the first call text and second dialogue process data corresponding to the second call text; the set of functional modules is used to determine the first dialogue process data, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain the second dialogue process data; and send the second call text determined based on the second dialogue process data to the target terminal device.
[0092] This application provides a non-volatile storage medium. The non-volatile storage medium stores a program that, when executed, controls the device containing the non-volatile storage medium to perform the following voice response method: receiving a first call text forwarded by a target terminal device; determining first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; determining the semantic information and call stage of the first call text based on the first dialogue process data, and updating the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; and sending the second call text determined based on the second dialogue process data to the target terminal device.
[0093] In some embodiments of this application, the program may also control the device containing the non-volatile storage medium to perform the following voice response method during runtime: receiving a first audio and determining a first call text corresponding to the first audio; sending the first call text to a target server and obtaining a second call text fed back by the target server, wherein the target server is configured to: determine first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; send the second call text determined based on the second dialogue process data to the target terminal device; and generate and play a second audio corresponding to the second call text based on the second call text.
[0094] This application provides an electronic device, including a processor and a memory. The memory stores a program, and the processor runs the program stored in the memory, executing the following voice response method during runtime: receiving a first call text forwarded by a target terminal device; determining first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; determining the semantic information and call stage of the first call text based on the first dialogue process data, and updating the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; and sending the second call text determined based on the second dialogue process data to the target terminal device.
[0095] In some embodiments of this application, the following voice response method can also be executed at runtime: receiving a first audio and determining a first call text corresponding to the first audio; sending the first call text to a target server and obtaining a second call text fed back by the target server, wherein the target server is used to: determine first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text; determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; send the second call text determined based on the second dialogue process data to a target terminal device; and generate and play a second audio corresponding to the second call text based on the second call text.
[0096] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0097] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0098] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0099] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0100] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to related technologies, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0101] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A voice response method, characterized in that, include: Receive the first call text forwarded by the target terminal device; First dialogue process data corresponding to the first call text is determined, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text, and the stage type of the call stage includes call start stage, call middle stage and call end stage. Based on the first dialogue process data, determine the semantic information and call stage of the first call text, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain the second dialogue process data. Send the second call text determined based on the second dialogue process data to the target terminal device; Determining the semantic information and call stage of the first call text based on the first dialogue process data includes: The stage type of the call stage corresponding to the first call text is determined based on the stage identifier in the first dialogue process data. Updating the first dialogue process data based on the semantic information of the first call text and the call stage includes: Based on the stage type of the call stage corresponding to the first call text, a target functional module corresponding to the first call text is determined from the functional module set, wherein the functional module includes an initial module, a reply module, and an end control module; The target function module is invoked to update the first dialogue process data based on the semantic information, thereby obtaining the second dialogue process data.
2. The voice response method according to claim 1, characterized in that, When the target functional module is the response module, the step of calling the target functional module to update the first dialogue process data according to the semantic information to obtain the second dialogue process data includes: The semantic information is extracted from the first dialogue process data by the reply module, wherein the semantic information includes the emotional information and business scenario information of the first call text; Based on the business scenario information, a preset text set corresponding to the business scenario is determined, and based on the emotion information, a target preset text is determined from the preset text set; The first dialogue process data is updated based on the target preset text to obtain the second dialogue process data.
3. The voice response method according to claim 2, characterized in that, Prior to the step of extracting the semantic information from the first dialogue process data via the response module, the voice response method further includes: Based on the first dialogue process data, determine whether the first call text is silent text, wherein the silent text is text in which the proportion of blank content or unrecognized content is greater than a preset proportion; if the first call text is silent text, send an instruction message to the target terminal device to indicate the end of the call; After the steps of determining a preset text set corresponding to the business scenario based on the business scenario information, and determining the target preset text from the preset text set based on the emotion information, the voice response method further includes: Determine whether the target preset text has been used during the current call, and if it has been used, determine whether to send the instruction information for ending the call to the target terminal device based on the first dialogue process data.
4. The voice response method according to claim 1, characterized in that, When the target functional module is the initial module, the voice response method further includes: The initial module instructs the target terminal device to play a preset audio, and after the playback is completed, it calls the response module as the target functional module.
5. The voice response method according to claim 1, characterized in that, When the target functional module is the end control module, the voice response method further includes: Obtain all first dialogue process data and all second dialogue process data contained during the call; Error correction processing is performed on all text data in the first dialogue process data and all text data in the second dialogue process data. After the error correction process is completed, a summary of the call process is generated based on all the first dialogue process data and all the second dialogue process data.
6. The voice response method according to claim 5, characterized in that, The step of generating a summary of the call process based on all the first dialogue process data and all the second dialogue process data includes: Determine each dialogue round in the call process, and the first dialogue process data and the second dialogue process data corresponding to each dialogue round; Based on the first dialogue process data and the second dialogue process data corresponding to each dialogue round, the dialogue text corresponding to each dialogue round is determined, wherein the dialogue text contains multiple separators, and the number of characters between any two adjacent separators does not exceed a preset number threshold. Determine the target character count, wherein the target character count is the maximum number of characters between two adjacent punctuation marks in the summary information; Based on the target number of characters, extract summary text from the dialogue text corresponding to each dialogue round, and concatenate the summary text corresponding to each dialogue round to obtain the summary information.
7. A voice response method, characterized in that, include: Receive the first audio and determine the first call text corresponding to the first audio; The first call text is sent to the target server, and the second call text fed back by the target server is obtained. The target server is configured to: determine first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text, and the stage type of the call stage includes a call start stage, a call middle stage, and a call end stage; determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain second dialogue process data; and send the second call text determined based on the second dialogue process data to the target terminal device. Generate and play the second audio corresponding to the second call text based on the second call text; Determining the semantic information and call stage of the first call text based on the first dialogue process data includes: The stage type of the call stage corresponding to the first call text is determined based on the stage identifier in the first dialogue process data. Updating the first dialogue process data based on the semantic information of the first call text and the call stage includes: Based on the stage type of the call stage corresponding to the first call text, a target functional module corresponding to the first call text is determined from the functional module set, wherein the functional module includes an initial module, a reply module, and an end control module; The target function module is invoked to update the first dialogue process data based on the semantic information, thereby obtaining the second dialogue process data.
8. A voice response device, characterized in that, include: The first processing module is used to receive the first call text forwarded by the target terminal device; The second processing module is used to determine the first dialogue process data corresponding to the first call text, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text, and the stage type of the call stage includes the call start stage, the call middle stage and the call end stage. The third processing module is used to determine the semantic information and call stage of the first call text based on the first dialogue process data, and update the first dialogue process data based on the semantic information and call stage of the first call text to obtain the second dialogue process data. The fourth processing module is used to send the second call text determined based on the second dialogue process data to the target terminal device; The third processing module is further configured to determine the stage type of the call stage corresponding to the first call text based on the stage identifier in the first dialogue process data. The third processing module is further configured to determine the target functional module corresponding to the first call text from the functional module set according to the stage type of the call stage corresponding to the first call text, wherein the functional module includes an initial module, a reply module and an end control module; The target function module is invoked to update the first dialogue process data based on the semantic information, thereby obtaining the second dialogue process data.
9. A voice response system, characterized in that, This includes the target terminal device and the server, among which, The target terminal device is configured to receive a first audio message and determine a first call text corresponding to the first audio message; send the first call text to a target server and obtain a second call text fed back by the target server; generate and play a second audio message corresponding to the second call text based on the second call text. The server is equipped with a target database and a set of functional modules. The target database is used to store the first dialogue process data corresponding to the first call text and the second dialogue process data corresponding to the second call text. The set of functional modules is used to determine the first dialogue process data, wherein the first dialogue process data is used to determine the semantic information and call stage of the first call text, and the call stage type includes call start stage, call middle stage and call end stage; determine the semantic information and call stage of the first call text based on the first dialogue process data, update the first dialogue process data based on the semantic information and call stage of the first call text to obtain the second dialogue process data; and send the second call text determined based on the second dialogue process data to the target terminal device. Determining the semantic information and call stage of the first call text based on the first dialogue process data includes: The stage type of the call stage corresponding to the first call text is determined based on the stage identifier in the first dialogue process data. Updating the first dialogue process data based on the semantic information of the first call text and the call stage includes: Based on the stage type of the call stage corresponding to the first call text, a target functional module corresponding to the first call text is determined from the functional module set, wherein the functional module includes an initial module, a reply module, and an end control module; The target function module is invoked to update the first dialogue process data based on the semantic information, thereby obtaining the second dialogue process data.
Citation Information
Patent Citations
Speech recognition-based dialogue management method, apparatus, device and medium
WO2021135534A1