A voice processing method, device, apparatus and computer storage medium

By acquiring semantic information and dialogue context from voice conversations, determining matching status, creating temporary dialogue contexts, and pausing the current task, the problem of scene switching and resumption in voice conversations is solved, thus improving the user interaction experience.

CN116631388BActive Publication Date: 2026-03-03AVATR CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310603370.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2026-03-03
Estimated Expiration
2043-05-25

AI Technical Summary

Technical Problem

In multi-scenario and multi-domain voice dialogues, existing technologies cannot effectively handle the switching and recovery of dialogue scenarios, resulting in a poor user interaction experience.

Method used

By acquiring current semantic information and dialogue context information, the matching situation is determined, a temporary dialogue context is created and the current task is paused. The original dialogue context is restored after the temporary task ends.

Benefits of technology

It enables switching and resuming between different scenarios during voice conversations, improving the user interaction experience and ensuring that conversation tasks can be smoothly resumed after being interrupted.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116631388B_ABST
    Figure CN116631388B_ABST
Patent Text Reader

Abstract

This application discloses a speech processing method, apparatus, device, and computer storage medium. The method includes: acquiring current semantic information and current dialogue context information; determining temporary dialogue context information based on the current semantic information when the current semantic information and the current dialogue context information do not match, and pausing the dialogue task corresponding to the current dialogue context information; performing the dialogue task based on the temporary dialogue context information; and resuming the dialogue task corresponding to the current dialogue context information after the dialogue task based on the temporary dialogue context information has ended. This enables switching between different scenarios during a speech dialogue, and allows restoration to the current dialogue context information after the dialogue task has ended if the current dialogue context information is interrupted by the dialogue task corresponding to the temporary dialogue context information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computing power management technology, and in particular to a voice processing method, apparatus, device and computer storage medium. Background Technology

[0002] With the continuous development of speech recognition technology and mobile internet technology, voice input is widely used on mobile devices. As major internet companies release their own voice dialogue systems, the advantages of speech recognition technology are becoming increasingly apparent. It can understand users' needs and solve their problems through natural and low-cost voice input.

[0003] In related technologies, speech recognition may involve dialogues in multiple scenarios and domains, and it is necessary to solve the decision-making problem in the process of multi-domain and multi-turn dialogues. When most dialogue interactions involve different scenarios and domains, they simply choose to step out and start a new dialogue scenario. The interaction ends when the dialogue ends. For interrupted dialogues, the user's interactive experience will be relatively poor. Summary of the Invention

[0004] This application proposes a voice processing method, apparatus, device, and computer storage medium that enables switching between different scenarios during voice dialogue and restoration of previous dialogues after the dialogue task ends.

[0005] To achieve the above objectives, the technical solution of this application is implemented as follows:

[0006] In a first aspect, embodiments of this application provide a voice processing method, the method comprising:

[0007] Obtain current semantic information and current dialogue context information;

[0008] If the current semantic information does not match the current dialogue context information, temporary dialogue context information is determined based on the current semantic information, and the dialogue task corresponding to the current dialogue context information is paused.

[0009] Dialogue tasks are performed based on the temporary dialogue context information. If the dialogue task based on the temporary dialogue context information ends, the dialogue task corresponding to the current dialogue context information is restored.

[0010] In some embodiments, obtaining the current semantic information includes:

[0011] Obtain the audio file to be processed;

[0012] The audio file is subjected to automatic speech recognition processing to obtain the corresponding text information;

[0013] The text information is semantically understood to obtain the current semantic information.

[0014] In some embodiments, the method further includes:

[0015] If the current semantic information matches the current dialogue context information, the current dialogue context information is adjusted according to the current semantic information.

[0016] The dialogue task is performed based on the adjusted current dialogue context information.

[0017] In some embodiments, the method further includes:

[0018] The current semantic information and the current dialogue context information are compared semantically to obtain a semantic relevance; if the semantic relevance is greater than or equal to a preset threshold, then the current dialogue context information and the current semantic information are determined to match.

[0019] Alternatively, keywords can be extracted from the current semantic information; if the extracted keywords are the same as preset instructions, then the current dialogue context information and the current semantic information are determined to match.

[0020] In some embodiments, the method further includes:

[0021] If the semantic relevance is less than a preset threshold, then it is determined that the current dialogue context information and the current semantic information do not match.

[0022] Determining the temporary dialogue context information based on the current semantic information includes:

[0023] Create blank dialog context information;

[0024] The current semantic information is merged into the blank dialogue context information to obtain the temporary dialogue context information.

[0025] In some embodiments, adjusting the current dialogue context information according to the current semantic information and performing dialogue tasks based on the adjusted current dialogue context information includes:

[0026] The current semantic information is merged with the current dialogue context information as part of the current dialogue context information to obtain the adjusted current dialogue context information.

[0027] In some embodiments, pausing the dialogue task corresponding to the current dialogue context information includes:

[0028] Push the current dialogue context information onto the dialogue task stack;

[0029] The process of restoring the dialogue task corresponding to the current dialogue context information includes:

[0030] The current dialogue context information is extracted from the dialogue task stack and cached. The cached current dialogue context information is then used for dialogue tasks.

[0031] Secondly, embodiments of this application provide a voice processing device, which includes:

[0032] The acquisition unit is configured to acquire current semantic information and current dialogue context information;

[0033] The processing unit is configured to determine temporary dialogue context information based on the current semantic information and to pause the dialogue task corresponding to the current dialogue context information when the current semantic information does not match the current dialogue context information.

[0034] The recovery unit is configured to perform a dialogue task based on the temporary dialogue context information, and to perform recovery processing on the dialogue task corresponding to the current dialogue context information when the dialogue task based on the temporary dialogue context information ends.

[0035] Thirdly, embodiments of this application provide an electronic device, which includes a memory and a processor; wherein,

[0036] The memory is used to store computer programs that can run on the processor;

[0037] The processor is configured to execute the speech processing method as described in the first aspect when running the computer program.

[0038] Fourthly, embodiments of this application provide a computer storage medium storing a computer program that, when executed by at least one processor, implements the speech processing method as described in the first aspect.

[0039] This application provides a speech processing method, apparatus, device, and computer storage medium. The method includes: acquiring current semantic information and current dialogue context information; determining temporary dialogue context information based on the current semantic information when the current semantic information and the current dialogue context information do not match, and pausing the dialogue task corresponding to the current dialogue context information; performing the dialogue task based on the temporary dialogue context information; and resuming the dialogue task corresponding to the current dialogue context information after the dialogue task based on the temporary dialogue context information has ended. This enables switching between different scenarios during a speech dialogue, and allows restoration to the current dialogue context information after the dialogue task has ended if the current dialogue context information is interrupted by the dialogue task corresponding to the temporary dialogue context information. Attached Figure Description

[0040] Figure 1 A schematic flowchart of a speech processing method provided in an embodiment of this application;

[0041] Figure 2 A detailed flowchart illustrating another speech processing method provided in this application embodiment;

[0042] Figure 3 This is a schematic diagram of the composition structure of a voice processing device provided in an embodiment of this application;

[0043] Figure 4 This is a schematic diagram of the specific hardware composition structure of an electronic device provided in an embodiment of this application;

[0044] Figure 5 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0045] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.

[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0047] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first, second, third" used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0048] Understandably, most current dialogue interactions involve multi-turn cross-domain scenarios, and the interaction ends when the dialogue ends. This results in a poor interaction for interrupted dialogues. Therefore, we design a dialogue mechanism that uses different rules to decide whether to resume or not based on the interrupted dialogue and the specific scenario.

[0049] Based on this, this application provides a speech processing method. The basic idea of ​​this method is as follows: acquire current semantic information and current dialogue context information; when the current semantic information and current dialogue context information do not match, determine temporary dialogue context information based on the current semantic information and pause the dialogue task corresponding to the current dialogue context information; perform the dialogue task based on the temporary dialogue context information; and resume the dialogue task corresponding to the current dialogue context information after the dialogue task based on the temporary dialogue context information has ended. In this way, switching between different scenarios can be achieved during a speech dialogue, and if the current dialogue context information is interrupted by the dialogue task corresponding to the temporary dialogue context information, the current dialogue context information can be restored after the dialogue task ends.

[0050] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0051] See Figure 1 This illustrates a flowchart of a speech processing method provided in an embodiment of this application. Figure 1 As shown, the method may include:

[0052] S101: Obtain the current semantic information and the current dialogue context information.

[0053] It should be noted that the voice processing method provided in this application embodiment can be applied to a voice processing device with voice processing requirements, or to an electronic device integrated with such a device. Here, the electronic device may be such as a computer, smartphone, tablet computer, laptop computer, PDA, portable media player (PMP), navigation device, wearable device, or a system composed of the above device nodes, etc., and this application embodiment does not specifically limit it in this regard.

[0054] It should also be noted that, in the embodiments of this application, the current semantic information may be a voice command issued by the user to the voice processing device, or a voice interaction information obtained after processing. It may be a continuous voice segment or a simple command, and no limitation is made here.

[0055] It should also be noted that, in this embodiment, the current dialogue context information refers to the dialogue context information corresponding to the most recent segment of voice interaction information stored in the super context information in the database. When storing the dialogue context information, it can be encoded to distinguish the dialogue context information corresponding to different scenarios and domains. The super context information can include dialogue context information from multiple different dialogue scenarios or domains, and the current dialogue context information is the closest dialogue context information to the current one among the multiple different dialogue scenario or domain dialogue context information.

[0056] In some embodiments, obtaining the current semantic information may include:

[0057] Obtain the audio file to be processed;

[0058] The audio file is subjected to automatic speech recognition processing to obtain the corresponding text information;

[0059] The text information is semantically understood to obtain the current semantic information.

[0060] It should be noted that, in this embodiment of the application, after obtaining the voice file to be processed sent by the user, the voice file is automatically processed by speech recognition to obtain the corresponding text information; and the text information is semantically understood to obtain the current semantic information. The current semantic information contains semantic information, and the current dialogue context also contains semantic information, so that the current semantic information and the current dialogue context information can be compared in subsequent processing.

[0061] S102: If the current semantic information does not match the current dialogue context information, determine the temporary dialogue context information based on the current semantic information, and suspend the dialogue task corresponding to the current dialogue context information.

[0062] It should be noted that, in the embodiments of this application, if the current semantic information does not match the current dialogue context information, it means that the current semantic information and the current dialogue context information are not the same dialogue scenario or the same dialogue domain. Therefore, it is necessary to create a new temporary dialogue context information to enter the dialogue task, and determine the current semantic information as the temporary dialogue context information to enter the new dialogue task. At the same time, the temporary dialogue context information can also be stored as super context information.

[0063] In other embodiments, the method may further include:

[0064] If the current semantic information matches the current dialogue context information, the current dialogue context information is adjusted according to the current semantic information.

[0065] The dialogue task is performed based on the adjusted current dialogue context information.

[0066] That is, the current semantic information is put into the current dialogue context information; and the dialogue task is entered based on the current dialogue context information after the semantic information is put in.

[0067] It should be noted that, in the embodiments of this application, if the current semantic information matches the current dialogue context information, it means that the current semantic information and the current dialogue context information are the same dialogue scenario or the same dialogue domain. Therefore, it is only necessary to enter the dialogue task based on the current context information and store the current semantic information as part of the current dialogue context information to obtain the latest current dialogue context information.

[0068] In some embodiments, the method may further include:

[0069] The current semantic information and the current dialogue context information are compared semantically to obtain a semantic relevance; if the semantic relevance is greater than or equal to a preset threshold, then the current dialogue context information and the current semantic information are determined to match.

[0070] Alternatively, keywords can be extracted from the current semantic information; if the extracted keywords are the same as preset instructions, then the current dialogue context information and the current semantic information are determined to match.

[0071] It should be noted that, in this embodiment of the application, the matching of the current semantic information with the current dialogue context information can be achieved when the semantic relevance between the current semantic information and the current dialogue context information is greater than or equal to a preset threshold. This indicates that the current dialogue context information and the current semantic information are in the same dialogue scenario. Therefore, it is only necessary to enter the dialogue task based on the current context information and merge the current semantic information as part of the current dialogue context information to obtain the latest merged current dialogue context information.

[0072] It should also be noted that, in this embodiment of the application, preset instructions related to the dialogue task can be preset as needed. When the keywords extracted from the current semantic information are the same as the preset instructions, it is determined that the current dialogue context information and the current semantic information match, and the current semantic information is merged with the current dialogue context information as part of the current dialogue context information, and the dialogue task is performed based on the merged current dialogue context information.

[0073] It should also be noted that, in the embodiments of this application, the preset instructions can be set by the system or by the user's personalized selection. For example, the preset instructions can include "previous", "first", etc. If the same keyword as the preset instruction appears during the keyword extraction process of the current semantic information, it can be determined that the current dialogue context information and the current semantic information match, and the dialogue task can be re-entered.

[0074] In some embodiments, adjusting the current dialogue context information according to the current semantic information and performing dialogue tasks based on the adjusted current dialogue context information includes:

[0075] The current semantic information is merged with the current dialogue context information as part of the current dialogue context information to obtain the adjusted current dialogue context information.

[0076] In some embodiments, the method may further include:

[0077] If the semantic relevance is less than a preset threshold, then it is determined that the current dialogue context information and the current semantic information do not match.

[0078] Determining the temporary dialogue context information based on the current semantic information includes:

[0079] Create blank dialog context information;

[0080] The current semantic information is merged into the blank dialogue context information to obtain the temporary dialogue context information.

[0081] It should be noted that, in this embodiment, the mismatch between the current semantic information and the current dialogue context information can occur when the semantic relevance between the current semantic information and the current dialogue context information is less than a preset threshold. This indicates that the current dialogue context information and the current semantic information are from different dialogue scenarios, thus requiring the creation of blank dialogue context information. The dialogue task is then initiated based on this blank dialogue context information, and the current semantic information is used as the new temporary dialogue context information. This blank dialogue context information, compared to the current dialogue context information, does not carry scene information from the previous dialogue task. For example, this blank dialogue context information can be initial context information used to create a new dialogue scenario.

[0082] S103: Perform dialogue tasks based on temporary dialogue context information. If the dialogue task based on the temporary dialogue context information ends, perform recovery processing on the dialogue task corresponding to the current dialogue context information.

[0083] It should be noted that in this embodiment of the application, when a dialogue task is entered based on temporary dialogue context information, the dialogue scenario based on the current dialogue context information is paused or interrupted, and a dialogue task based on the temporary dialogue context information is carried out. Therefore, after the dialogue task based on the temporary dialogue context information ends, it is necessary to restore the dialogue task corresponding to the current dialogue context information so that the dialogue can be carried out again based on the current dialogue context information.

[0084] In some embodiments, pausing the dialogue task corresponding to the current dialogue context information may include:

[0085] Push the current dialogue context information onto the dialogue task stack;

[0086] It should be noted that, in this embodiment of the application, when the current semantic information does not match the current dialogue context information, it indicates that the user is starting a new round of dialogue. Temporary dialogue context information is determined based on the current semantic information, and a dialogue task is performed based on the temporary dialogue context information. The dialogue task corresponding to the current dialogue context information is paused, and the current dialogue context information is pushed into the dialogue task stack for later use.

[0087] The process of restoring the dialogue task corresponding to the current dialogue context information may include:

[0088] The current dialogue context information is extracted from the dialogue task stack and cached. The cached current dialogue context information is then used for dialogue tasks.

[0089] It should be noted that, in this embodiment of the application, after the dialogue task based on the temporary dialogue context information ends, it can be determined whether there is a dialogue scene corresponding to the current dialogue context information that has been suspended. If there is a dialogue scene corresponding to the current dialogue context information that has been suspended, the suspended current dialogue context information is restored. That is, the current dialogue context information is extracted from the dialogue task stack and the extracted current dialogue context information is cached. The cached current dialogue context information is used for dialogue tasks.

[0090] It should also be noted that, in this embodiment of the application, while the dialogue task is not yet finished, the temporary dialogue context information needs to be continuously updated with corresponding current semantic information. Therefore, the updated temporary dialogue context information needs to be cached. Simultaneously, during the caching process, the encoding information corresponding to the temporary dialogue context information can also be stored. This encoding information is used to distinguish dialogue context information corresponding to different scenarios and domains. The current dialogue context information and the encoding information have a corresponding relationship, which can be a one-to-one correspondence or a one-to-many correspondence; no limitation is made here.

[0091] This embodiment provides a speech processing method that acquires current semantic information and current dialogue context information. When the current semantic information and current dialogue context information do not match, temporary dialogue context information is determined based on the current semantic information, and the dialogue task corresponding to the current dialogue context information is paused. The dialogue task is performed based on the temporary dialogue context information, and when the dialogue task based on the temporary dialogue context information ends, the dialogue task corresponding to the current dialogue context information is resumed. This allows for switching between different scenarios during a speech dialogue, and if the current dialogue context information is interrupted by the dialogue task corresponding to the temporary dialogue context information, the current dialogue context information can be restored after the dialogue task ends.

[0092] Based on the same inventive concept as the foregoing embodiments, see [link to previous document]. Figure 2 It illustrates a detailed flowchart of a speech processing method provided in an embodiment of this application, such as... Figure 2 As shown, the method may include:

[0093] Each user conversation is processed by Automatic Speech Recognition (ASR) and Natural Language Understanding (NLU) before entering the dialogue system. The dialogue system determines whether the conversation is a new dialogue scenario or a supplement to the previous one. If it is a supplement to the previous scenario, the unfinished dialogue continues. If it is a new dialogue scenario, the current dialogue context (Dialogue1) is cached locally and a new dialogue context (i.e., the temporary dialogue context in the aforementioned embodiment) (Dialogue2) is opened. After Dialogue2 ends, the dialogue system will determine whether to return to Dialogue1 based on the preset logic for resuming interrupted dialogue. If the configuration is to resume interrupted dialogue, Dialogue1 will be retrieved from the local cache. Based on the information in Dialogue1, the system will return to the interrupted process, and the user can continue to complete the unfinished process.

[0094] In some embodiments, the method may specifically include the following steps:

[0095] S201: Obtain user semantic information.

[0096] User semantic information is one type of information in speech information. Speech information can also include timbre information, text information, etc., without any limitations.

[0097] S202: Obtain the dialogue context (i.e., the current dialogue context information in the foregoing embodiments).

[0098] S203: Determine whether the current dialogue is a new dialogue or a re-entry dialogue based on the dialogue context and user semantic information.

[0099] S204: If the current dialogue is a new dialogue, create a temporary context (i.e., the temporary dialogue context information in the aforementioned embodiments), put it into the super context, and enter the temporary dialogue task.

[0100] S205: If the current dialogue is a reentrant dialogue, directly enter the dialogue task corresponding to the dialogue context.

[0101] S206: After entering the dialogue task, execute the dialogue tasks in sequence.

[0102] S207: Obtain the result of the dialogue task.

[0103] S208: Determine whether the dialogue task has ended based on the result of the dialogue task.

[0104] S209: Refresh the dialogue code (dialogue identifier, ID) if the dialogue task has not ended.

[0105] S210: Cache the dialogue context and dialogue encoding.

[0106] S211: If the dialogue task ends, determine whether to return to the original dialogue task flow (corresponding to the current dialogue context information in the aforementioned embodiments).

[0107] Execute S209 without restoring the original dialogue flow.

[0108] S212: If the original dialogue flow is restored, retrieve the previous dialogue flow from the super context.

[0109] S213: Determine if the original dialogue flow exists.

[0110] If the original dialogue process does not exist, execute S209.

[0111] S214: If the original dialogue flow exists, obtain the dialogue context and execute S210 to cache the dialogue context of the original dialogue flow.

[0112] S215: Call the UI of the original dialogue flow and broadcast the event.

[0113] In some embodiments, dialogue context information (i.e., current dialogue context information in the foregoing embodiments) is obtained through user semantic information (i.e., current semantic information in the foregoing embodiments). Based on the user semantic information and the dialogue context information, it is determined whether the current dialogue is a new dialogue or a re-entry dialogue. If the current dialogue is a re-entry dialogue, the user semantic information is put into the dialogue context information to obtain new dialogue context information, and the dialogue task is entered. If the current dialogue is a new dialogue, new dialogue context information is created and put into the super context information, and the dialogue task is entered.

[0114] In some embodiments, during the execution of the current dialogue task, if the dialogue task has not ended, the cached dialogue ID is refreshed and the new dialogue context information is cached. After the dialogue task ends, it is necessary to determine whether to restore the original process. If it is not necessary to restore the original process, the cached dialogue ID is refreshed and the new dialogue context information is cached. If the original process is restored, the previous dialogue process is obtained from the super context information, the dialogue context is obtained, the cached dialogue ID is refreshed, the new dialogue context information is cached, and the UI and broadcast events of the original process are called.

[0115] It should be noted that, in this embodiment, the reentrancy condition specifically refers to the current intent being part of the context's dialogue flow. For example, navigating to People's Square is a dialogue flow where commands such as "first," "previous page," and "next page" can be used, thus satisfying the reentrancy condition. However, opening the car door is not an intent within this dialogue flow and therefore does not satisfy the reentrancy condition. The super context information maintains a stack of multi-turn dialogue contexts, popping the most recent dialogue flow.

[0116] For example, due to the complexity of the in-vehicle voice environment, users can easily interrupt the current conversation, either actively or passively. To return to the interrupted process, they need to start the conversation again, which results in a poor user experience.

[0117] Q: Navigate to People's Square

[0118] A: We have found 3 relevant addresses for you.

[0119] Q: Choose the first one

[0120] A: Okay, I'm sure I want to go to XXX.

[0121] Q: (A passenger wants to board) Open the front passenger door.

[0122] A: The car door is open. (End of conversation; navigation interrupted)

[0123] During interactions with a voice assistant, users may experience interruptions to the current conversation, either actively or passively, due to various external circumstances. When the next conversation ends, the system supports returning to the original flow to complete the subsequent conversation. In the dialogue system, each multi-turn conversation maintains a dialogue context. When a conversation is interrupted, the system can return to the interrupted flow based on the dialogue context.

[0124] This application provides a voice processing method that, after a user is interrupted, automatically resumes the dialogue by caching the dialogue context information. The resume mechanism is configuration-based and dynamically updated, enabling switching between different scenarios during a voice conversation. If the current dialogue context is interrupted by a dialogue task corresponding to a temporary dialogue context, the current dialogue context can be restored after the dialogue task ends.

[0125] Based on the same inventive concept as the foregoing embodiments, see [link to previous document]. Figure 3 This document illustrates a schematic diagram of the composition of a speech processing device 30 provided in an embodiment of this application. The speech processing device 30 is used to implement any of the speech processing methods described in the foregoing embodiments, specifically, such as... Figure 3 As shown, the voice processing device 30 may include:

[0126] The acquisition unit 301 is configured to acquire current semantic information and current dialogue context information;

[0127] The processing unit 302 is configured to determine temporary dialogue context information based on the current semantic information and to pause the dialogue task corresponding to the current dialogue context information when the current semantic information does not match the current dialogue context information.

[0128] The recovery unit 303 is configured to perform a dialogue task based on the temporary dialogue context information, and to perform recovery processing on the dialogue task corresponding to the current dialogue context information when the dialogue task based on the temporary dialogue context information ends.

[0129] In some embodiments, the acquisition unit 301 is specifically configured to acquire a speech file to be processed; perform automatic speech recognition processing on the speech file to obtain corresponding text information; and perform semantic understanding on the text information to obtain the current semantic information.

[0130] In some embodiments, the processing unit 302 is further configured to, when the current semantic information matches the current dialogue context information, adjust the current dialogue context information according to the current semantic information; and perform a dialogue task based on the adjusted current dialogue context information.

[0131] In some embodiments, the apparatus further includes a comparison unit configured to perform semantic information comparison on the current semantic information and the current dialogue context information to obtain a semantic relevance; and a determination unit configured to determine that the current dialogue context information and the current semantic information match if the semantic relevance is greater than or equal to a preset threshold.

[0132] Alternatively, the device may further include an extraction unit configured to extract keywords from the current semantic information; and a determination unit configured to determine that the current dialogue context information and the current semantic information match if the extracted keywords are the same as a preset instruction.

[0133] In some embodiments, the determining unit is configured to determine that the current dialogue context information and the current semantic information do not match if the semantic relevance is less than a preset threshold.

[0134] Processing unit 302 is configured to create blank dialogue context information; and to merge the current semantic information into the blank dialogue context information to obtain the temporary dialogue context information.

[0135] In some embodiments, the processing unit 302 is configured to merge the current semantic information as part of the current dialogue context information with the current dialogue context information to obtain the adjusted current dialogue context information.

[0136] In some embodiments, the processing unit 302 is further configured to push the current dialogue context information into the dialogue task stack.

[0137] In some embodiments, the recovery unit 303 is specifically configured to extract the current dialogue context information from the dialogue task stack and cache the extracted current dialogue context information, and the cached current dialogue context information is used for dialogue tasks.

[0138] Understandably, in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular component. Furthermore, the components in this embodiment 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 module.

[0139] If the integrated unit is implemented as a software functional module and not 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 embodiment, in essence, or the part that contributes to the prior art, 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.) or processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0140] Therefore, this embodiment provides a computer storage medium storing a voice processing program, which, when executed by at least one processor, implements the steps of the method described in any of the foregoing embodiments.

[0141] Based on the composition of the aforementioned voice processing device 30 and the computer storage medium, see [link to relevant documentation]. Figure 4 This illustrates a schematic diagram of the structural composition of an electronic device 40 provided in an embodiment of this application. For example... Figure 4As shown, it may include: a communication interface 401, a memory 402, and a processor 403; the various components are coupled together through a bus system 404. It is understood that the bus system 404 is used to implement communication between these components. In addition to a data bus, the bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 4 All buses are labeled as bus system 404. Among them, communication interface 401 is used for receiving and sending signals during information exchange with other external network elements;

[0142] Memory 402 is used to store computer programs that can run on processor 403;

[0143] Processor 403, when running the computer program, performs the following:

[0144] Obtain current semantic information and current dialogue context information;

[0145] If the current semantic information does not match the current dialogue context information, temporary dialogue context information is determined based on the current semantic information, and the dialogue task corresponding to the current dialogue context information is paused.

[0146] Dialogue tasks are performed based on the temporary dialogue context information. If the dialogue task based on the temporary dialogue context information ends, the dialogue task corresponding to the current dialogue context information is restored.

[0147] It is understood that the memory 402 in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory, which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 402 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0148] The processor 403 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 403 or by instructions in software form. The processor 403 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 402, and the processor 403 reads the information in memory 402 and, in conjunction with its hardware, completes the steps of the above method.

[0149] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0150] For software implementation, the techniques described herein can be achieved through modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented within the processor or externally.

[0151] Alternatively, as another embodiment, the processor 403 is further configured to perform the steps of the method described in any of the foregoing embodiments when running the computer program.

[0152] In some embodiments, based on the composition of the above-described voice processing device 30, see [reference needed]. Figure 5 This illustrates a schematic diagram of the composition structure of another electronic device 40 provided in an embodiment of this application. For example... Figure 5 As shown, the electronic device 40 may include the voice processing device 30 as described in any of the foregoing embodiments.

[0153] In this embodiment, the electronic device 40 acquires current semantic information and current dialogue context information. If the current semantic information and current dialogue context information do not match, temporary dialogue context information is determined based on the current semantic information, and the dialogue task corresponding to the current dialogue context information is paused. The dialogue task is performed based on the temporary dialogue context information, and when the dialogue task based on the temporary dialogue context information ends, the dialogue task corresponding to the current dialogue context information is resumed. This allows for switching between different scenarios during voice dialogue, and if the current dialogue context information is interrupted by the dialogue task corresponding to the temporary dialogue context information, the current dialogue context information can be restored after the dialogue task ends.

[0154] It should be noted that, in this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0155] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0156] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0157] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0158] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0159] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A speech processing method, characterized in that, The method includes: Obtain current semantic information and current dialogue context information; If the current semantic information does not match the current dialogue context information, temporary dialogue context information is determined based on the current semantic information, and the dialogue task corresponding to the current dialogue context information is paused; the pause process includes pushing the current dialogue context information into the dialogue task stack; the dialogue task stack is used to store dialogue context information in a paused state. Dialogue tasks are performed based on the temporary dialogue context information. When the dialogue task based on the temporary dialogue context information ends, the dialogue task corresponding to the current dialogue context information is restored. The restoration process includes extracting the current dialogue context information from the dialogue task stack and caching the extracted current dialogue context information. The cached current dialogue context information is used to perform dialogue tasks. The current dialogue context information is located at the top of the dialogue task stack. If the current semantic information matches the current dialogue context information, the current dialogue context information is adjusted according to the current semantic information. The dialogue task is performed based on the adjusted current dialogue context information; the dialogue task is the dialogue task corresponding to the current dialogue context information. Specifically, the current semantic information and the current dialogue context information are compared semantically to obtain a semantic relevance; if the semantic relevance is greater than or equal to a preset threshold, then the current dialogue context information and the current semantic information are determined to match. Alternatively, keywords can be extracted from the current semantic information; if the extracted keywords are the same as the preset instructions, then the current dialogue context information and the current semantic information are determined to match; the preset instructions are either pre-set by the system or set by the user.

2. The method according to claim 1, characterized in that, The step of obtaining the current semantic information includes: Obtain the audio file to be processed; The audio file is subjected to automatic speech recognition processing to obtain the corresponding text information; The text information is semantically understood to obtain the current semantic information.

3. The method according to claim 1, characterized in that, The method further includes: If the semantic relevance is less than a preset threshold, then it is determined that the current dialogue context information and the current semantic information do not match. Determining the temporary dialogue context information based on the current semantic information includes: Create blank dialog context information; The current semantic information is merged into the blank dialogue context information to obtain the temporary dialogue context information.

4. The method according to any one of claims 1 or 3, characterized in that, The current dialogue context information is adjusted based on the current semantic information; Dialogue tasks are performed based on the adjusted current dialogue context information, including: The current semantic information is merged with the current dialogue context information as part of the current dialogue context information to obtain the adjusted current dialogue context information.

5. A voice processing device, characterized in that, The voice processing device includes: The acquisition unit is configured to acquire current semantic information and current dialogue context information; The processing unit is configured to, when the current semantic information does not match the current dialogue context information, determine temporary dialogue context information based on the current semantic information, and pause the dialogue task corresponding to the current dialogue context information; the pause processing includes pushing the current dialogue context information onto a dialogue task stack; the dialogue task stack is used to store dialogue context information in a paused state; and is configured to, when the current semantic information matches the current dialogue context information, adjust the current dialogue context information based on the current semantic information; and perform a dialogue task based on the adjusted current dialogue context information; the dialogue task is the dialogue task corresponding to the current dialogue context information. The recovery unit is configured to perform a dialogue task based on the temporary dialogue context information. If the dialogue task based on the temporary dialogue context information ends, it performs recovery processing on the dialogue task corresponding to the current dialogue context information. The recovery processing includes extracting the current dialogue context information from the dialogue task stack and caching the extracted current dialogue context information. The cached current dialogue context information is used for performing the dialogue task. The current dialogue context information is located at the top of the dialogue task stack. The comparison unit is configured to perform semantic information comparison between the current semantic information and the current dialogue context information to obtain semantic relevance. The determining unit is configured to determine that the current dialogue context information and the current semantic information match if the semantic relevance is greater than or equal to a preset threshold. The extraction unit is configured to extract keywords from the current semantic information; The determining unit is configured to determine that the current dialogue context information and the current semantic information match if the extracted keyword is the same as the preset instruction; the preset instruction is set by the system or by the user.

6. An electronic device, characterized in that, The electronic device includes a memory and a processor; wherein... The memory is used to store computer programs that can run on the processor; The processor is configured to execute the speech processing method as described in any one of claims 1 to 4 when running the computer program.

7. A computer storage medium, characterized in that, The computer storage medium stores a computer program that, when executed by at least one processor, implements the speech processing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Voice conversation execution method, electronic equipment and storage medium

    CN115862619A