A method and apparatus for generating a visual multi-turn conversation through voice instructions

The method of generating visual multi-turn dialogues through voice commands solves the problem of complex scenarios for writing multi-turn dialogues between robots and users. It enables quick and efficient voice input of multi-turn dialogue scenarios, reduces the training cost for trainers, and generates an aesthetically pleasing interface that conforms to user habits.

CN114299959BActive Publication Date: 2025-11-18BEIJING SINOVOICE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111525976.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2025-11-18
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

In existing technologies, the creation of multi-turn dialogue scenarios between robots and users is complex, tedious, difficult to find function formulas, and challenging to format. It also results in high costs for trainers and requires a high level of proficiency in regular expressions and function formulas from the writers.

Method used

A method for generating visualized multi-turn dialogues through voice commands is used to acquire dialogue voice, determine the target dialogue scenario, and generate visualized multi-turn dialogues on a graphical interface. Semantic understanding is used to convert text into corresponding text content, including text, regular expressions, function formulas, and pattern codes. Based on the text content, the target dialogue scenario is determined, a logic script is constructed and corrected, and multi-turn dialogue content is generated.

Benefits of technology

It enables convenient and quick voice input for multi-turn dialogue scenarios, reduces the training cost for trainers, generates a clean and beautiful interface that conforms to user habits, improves scene maintenance efficiency, and reduces manpower waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114299959B_ABST
    Figure CN114299959B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for generating visual multi-turn conversation through voice instructions. The method comprises the following steps: obtaining conversation voice, and determining a target conversation scene according to the conversation voice; obtaining a graphical interface corresponding to the target conversation scene and a logic script corresponding to the target conversation scene, wherein the logic script contains a conversation flow under the target conversation scene, and the conversation flow comprises a plurality of conversation nodes; and generating a visual multi-turn conversation on the graphical interface according to the conversation voice and the plurality of conversation nodes in the logic script. Through the application, the problem of complex writing scene of multi-turn conversation between a robot and a user in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of speech recognition, and more specifically, to a method and apparatus for generating visual multi-turn dialogues through voice commands. Background Technology

[0002] In related technologies, applications such as intelligent voice navigation, outbound calling, and customer service often involve more than just simple question-and-answer questions; they require understanding the contextual semantics. This necessitates that machines be able to comprehend customer needs by combining the contextual semantics. Current solutions involve the front-end page editing dialogue nodes and the jump relationships between them, with the back-end automatically generating machine-processable logic scripts by parsing the content edited on the front-end page. However, this approach has many drawbacks, especially when it involves inputting regular expressions, function formulas, and API calls. The time spent by users inputting, formatting, and organizing functions can account for more than half of the trainer's time, undoubtedly resulting in wasted time and increased labor costs.

[0003] The solutions in related technologies have problems such as cumbersome scenario writing, difficulty in finding function formulas, difficulty in typesetting, and high training costs for trainers to write scenarios. At the same time, the writing process also has the disadvantage of requiring the writers to have a high degree of mastery of regular expressions and function formulas.

[0004] There is currently no effective solution to the aforementioned problems in the relevant technologies. Summary of the Invention

[0005] The main objective of this invention is to provide a method and apparatus for generating visual multi-turn dialogues through voice commands, so as to solve the problem of complex scenarios for writing multi-turn dialogues between robots and users in related technologies.

[0006] To achieve the above objectives, according to one aspect of the present invention, a method for generating a visual multi-turn dialogue via voice commands is provided. The invention includes: acquiring dialogue voice and determining a target dialogue scenario based on the dialogue voice; acquiring a graphical interface corresponding to the target dialogue scenario and a logic script corresponding to the target dialogue scenario, wherein the logic script contains a dialogue flow under the target dialogue scenario, and the dialogue flow includes multiple dialogue nodes; and generating a visual multi-turn dialogue on the graphical interface based on the dialogue voice and the multiple dialogue nodes in the logic script.

[0007] Furthermore, acquiring the dialogue speech and determining the target dialogue scenario based on the dialogue speech includes: identifying the instruction speech contained in the dialogue speech and converting the instruction speech into text; converting the text into corresponding text content through semantic understanding, wherein the specific content contained in the text content includes at least one of the following: text, regular expression, function formula, and pattern code; and determining the target dialogue scenario based on the text content.

[0008] Furthermore, based on the text content, the target dialogue scenario is determined, including: extracting information from the text content and matching the information with matching information contained in multiple scenario trigger nodes to obtain multiple matching scores; and determining the dialogue scenario associated with the scenario trigger node corresponding to the highest matching score as the target dialogue scenario.

[0009] Furthermore, before acquiring the graphical interface corresponding to the target dialogue scenario and the logic script corresponding to the target dialogue scenario, the method further includes: acquiring multiple content texts converted from multiple dialogue voices; determining multiple node recognition rules corresponding to multiple dialogue nodes in the logic script corresponding to the target dialogue scenario based on the multiple content texts, wherein the node recognition rules at least include matching information and matching format used to trigger dialogue nodes; constructing an initial logic script based on the multiple node recognition rules; performing a correction operation on the constructed initial logic script, determining the corrected initial logic script as the logic script, and saving the logic script.

[0010] Furthermore, based on the dialogue voice and logic script, a visual multi-turn dialogue is generated on the graphical interface, including: obtaining the text content converted from the dialogue voice and extracting the information contained in the text content; determining whether the information contained in the text content matches the matching information corresponding to the dialogue node; generating the response content corresponding to the node when the information matches the matching information; generating the content corresponding to the multi-turn dialogue based on the text content converted from the dialogue voice and the response content; and displaying the content corresponding to the multi-turn dialogue on the graphical interface to form a visual multi-turn dialogue.

[0011] Furthermore, in the case where the information does not match the matching information, the method further includes: determining whether the information matches any one of the intents in the intent library, and that there is a preset similarity between the intent library information and the matching information corresponding to the dialogue node; if any one of the intents matches the information, identifying and triggering the dialogue node associated with the intent library information; generating the response content corresponding to the dialogue node, and generating the content corresponding to the multi-turn dialogue based on the text content converted from the dialogue speech and the response content; and displaying the content corresponding to the multi-turn dialogue on the graphical interface to form a visual multi-turn dialogue.

[0012] To achieve the above objectives, according to another aspect of the present invention, an apparatus for generating a visual multi-turn dialogue via voice commands is provided. The apparatus includes: a first acquisition unit for acquiring dialogue voice and determining a target dialogue scenario based on the dialogue voice; a second acquisition unit for acquiring a graphical interface corresponding to the target dialogue scenario and a logic script corresponding to the target dialogue scenario, wherein the logic script contains a dialogue flow under the target dialogue scenario, and the dialogue flow includes multiple dialogue nodes; and a first generation unit for generating a visual multi-turn dialogue on the graphical interface based on the dialogue voice and the multiple dialogue nodes in the logic script.

[0013] Furthermore, the first acquisition unit includes: a first conversion subunit, which determines the instruction speech contained in the dialogue speech and converts the instruction speech into text; a second conversion subunit, which converts the text into corresponding text content through semantic understanding, wherein the specific content contained in the text content includes at least one of the following: text, regular expression, function formula, and pattern code; and a determination subunit, which determines the target dialogue scenario based on the text content.

[0014] To achieve the above objectives, according to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes a method for generating a visual multi-turn dialogue via voice commands according to any one of the above.

[0015] To achieve the above objectives, according to another aspect of this application, a processor is provided for running a program, wherein the program executes a method for generating a visual multi-turn dialogue via voice commands, as described above.

[0016] This invention employs the following steps: acquiring dialogue voice and determining a target dialogue scenario based on the dialogue voice; acquiring a graphical interface corresponding to the target dialogue scenario and a logic script corresponding to the target dialogue scenario, wherein the logic script contains the dialogue flow under the target dialogue scenario, and the dialogue flow includes multiple dialogue nodes; and generating a visual multi-turn dialogue on the graphical interface based on the dialogue voice and the multiple dialogue nodes in the logic script. This solves the problem of complex scenarios for writing multi-turn dialogues between robots and users in related technologies, thereby achieving the effect of convenient and fast voice input of multi-turn dialogue scenarios. Attached Figure Description

[0017] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0018] Figure 1 This is a flowchart of a method for generating visual multi-turn dialogues via voice commands according to an embodiment of the present invention;

[0019] Figure 2 This is a flowchart illustrating a method for generating visual multi-turn dialogues via voice commands according to an embodiment of the present invention.

[0020] Figure 3 This is a schematic diagram of an apparatus for generating visual multi-turn dialogues via voice commands, according to an embodiment of the present invention. Detailed Implementation

[0021] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention 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 for the embodiments of the invention 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.

[0024] According to an embodiment of the present invention, a method for generating visual multi-turn dialogues via voice commands is provided.

[0025] Figure 1 This is a flowchart illustrating a method for generating visual multi-turn dialogues via voice commands according to an embodiment of the present invention. Figure 1 As shown, the invention includes the following steps:

[0026] Step S101: Obtain the dialogue voice and determine the target dialogue scenario based on the dialogue voice.

[0027] As mentioned above, the dialogue voice is collected from the user's call voice by communication equipment. The dialogue voice is then recognized to determine the target dialogue scenario corresponding to the user's dialogue voice based on the recognized content. For example, in the context of a user inquiring about communication services, the dialogue scenario could be any of the following: checking call charges, checking points, checking data usage, etc.

[0028] Step S102: Obtain the graphical interface corresponding to the target dialogue scenario and the logic script corresponding to the target dialogue scenario. The logic script contains the dialogue flow under the target dialogue scenario, and the dialogue flow includes multiple dialogue nodes.

[0029] Step S103: Based on the dialogue voice and multiple dialogue nodes in the logic script, generate a visual multi-turn dialogue on the graphical interface.

[0030] As described above, each dialogue scenario corresponds to a logic script, which contains multiple dialogue nodes. Based on the logic script, the machine can conduct multiple rounds of dialogue interaction with the user according to the logic and business rules set in the logic script. The user can arbitrarily change the order of the questions. The engine, based on the information points contained in the questions, requests the user to complete the information in subsequent dialogues by asking questions in return. After multiple interactions and context inheritance, a complete representation of the user's questions is formed, and finally, a compliant reply or a business system call instruction is provided. Then, through the user's dialogue voice and the reply or call instruction, multiple rounds of dialogue are generated in the visual interface.

[0031] It should be noted that this application also provides a graphical interface corresponding to the dialogue scenario, which displays the generated multi-turn dialogue on the graphical interface.

[0032] Using the methods described above, this application can be quickly applied to products such as intelligent voice navigation, outbound calling, and customer service, improving scene maintenance efficiency and eliminating the tedious work of trainers manually maintaining multi-turn dialogue scenarios. Through a manual post-editing mode, the visualized multi-turn dialogue scenario can be directly applied to AI products after minor modifications. Simultaneously, voice input of multi-turn dialogue scenarios is convenient and quick, with low learning costs and a fast learning curve. The automatically generated interface is clean and aesthetically pleasing, reducing trainer training costs. The pronunciation rules are closer to real-world scenarios, eliminating the need to deliberately follow rigid rules and wasting time, thus conforming to the usage habits of general users. Currently, there is no mature design for voice input of multi-turn dialogue scenarios on the market; this application fills a gap in the field.

[0033] In one optional instance, acquiring the dialogue speech and determining the target dialogue scenario based on the dialogue speech includes: identifying the instruction speech contained in the dialogue speech and converting the instruction speech into text; converting the text into corresponding text content through semantic understanding, wherein the specific content contained in the text content includes at least one of the following: text, regular expression, function formula, and pattern code; and determining the target dialogue scenario based on the text content.

[0034] As described above, the instruction speech in the dialogue is obtained, the instruction speech is converted into text content, and based on the understanding of the instruction speech, any one of the following can be generated to express the meaning of the instruction speech: text, regular expression, function formula, or pattern code.

[0035] For example, when a user inquires about their phone bill usage, the system recognizes the voice command and converts it into different text content based on the user's voice command. If the user's voice command is declarative text, it is converted into the corresponding text; if the user's voice command is a date, it is converted into a corresponding function formula; if the user's voice command is a password or number, it is converted into the corresponding pattern code.

[0036] In one optional instance, determining the target dialogue scenario based on the text content includes: extracting information from the text content and matching the information with matching information contained in multiple scenario trigger nodes to obtain multiple matching scores; and determining the dialogue scenario associated with the scenario trigger node corresponding to the highest matching score as the target dialogue scenario.

[0037] As described above, the text information is matched with matching information contained in multiple scenario trigger nodes to obtain a matching score, and the dialogue scenario is determined based on the matching score. For example, if the text content converted from the user's voice includes "phone bill," the information "phone bill" is extracted. Since the machine cannot recognize the dialogue scenario corresponding to phone bill, the matching information contained in the trigger nodes of multiple dialogue scenarios such as checking phone bill, checking points, and checking balance in the "phone bill" scenario is scored. Among them, checking phone bill has the highest score, and checking phone bill is determined as the dialogue scenario to be processed.

[0038] It should be noted that each dialogue scenario corresponds to a scenario trigger node. Once the scenario trigger node is triggered, the corresponding logic script proceeds according to the recognized dialogue speech.

[0039] In an optional instance, before acquiring the graphical interface corresponding to the target dialogue scenario and the logic script corresponding to the target dialogue scenario, the method further includes: acquiring multiple content texts from multiple dialogue speech conversions; determining multiple node recognition rules corresponding to multiple dialogue nodes in the logic script corresponding to the target dialogue scenario based on the multiple content texts, wherein the node recognition rules at least include matching information and matching format used to trigger dialogue nodes; constructing an initial logic script based on the multiple node recognition rules; performing a correction operation on the constructed initial logic script, determining the corrected initial logic script as the logic script, and saving the logic script.

[0040] As described above, based on the text content, corresponding node recognition rules are determined. According to these rules, after recognizing the user's spoken dialogue, the speech is recognized, triggering corresponding nodes. There is a sequential triggering order between each dialogue node; some nodes are triggered only after the preceding adjacent node has been triggered. Each node has corresponding recognition rules set up, such as whether context preservation or intelligent error correction is required. After the content text is compiled by the program, multiple node recognition rules are determined, and an initial logic script is constructed. If errors exist in the initial logic script, a correction operation is performed, and the corrected logic script is stored for use in corresponding dialogue scenarios. For example, the correspondence between the matching information and matching format for triggering dialogue nodes is as follows: when the matching information is declarative text, the matching content is the ASR-transcribed text content; when the matching information is a date, the matching format is the corresponding function formula; when the matching information is a cipher number, the matching format is the corresponding pattern code.

[0041] In one optional instance, based on the dialogue speech and logic script, a visual multi-turn dialogue is generated on a graphical interface, including: obtaining the text content converted from the dialogue speech and extracting the information contained in the text content; determining whether the information contained in the text content matches the matching information corresponding to the dialogue node; if the information matches the matching information, generating the response content corresponding to the node; generating the content corresponding to the multi-turn dialogue based on the text content converted from the dialogue speech and the response content; and displaying the content corresponding to the multi-turn dialogue on the graphical interface to form a visual multi-turn dialogue.

[0042] As described above, the information included in the text content is matched with the corresponding matching information, and the multi-round response content corresponding to the node is generated based on the matching information with the highest matching score. The content corresponding to the multi-round conversation is displayed on the graphical interface. According to the node recognition rule, after recognizing the conversation voice output by the user, the voice is recognized and the corresponding node is triggered by the recognized voice. There is a sequential triggering order between each conversation node. Some nodes will be triggered correspondingly only after the adjacent previous node is triggered. For example, when it is recognized that the user says "I want to query my phone bill balance", the information "I want to query my phone bill balance" is recognized, the node with the highest matching score is found, and the response content is generated as "Please announce your mobile phone number". The conversation content is displayed on the graphical display interface. Using the sequential triggering order between each conversation node, when the user's announced mobile phone number is recognized again, the node with the highest matching score is found, and the response content is generated as "Please announce the verification code received by your mobile phone number". The conversation will also be displayed on the graphical interface. According to the obtained user voice information, it is repeated like this to form a visual multi-round conversation on the graphical interface.

[0043] In an optional example, when the information does not match the matching information, the method further includes: determining whether the information matches any one of the intent library information included in the intent library, where there is a preset similarity between the intent library information and the matching information corresponding to the conversation node; when any one of the intent library information matches the information, determining and triggering the conversation node associated with the intent library information; generating the response content corresponding to the conversation node, and generating the content corresponding to the multi-round conversation based on the text content converted from the conversation voice and the response content; and displaying the content corresponding to the multi-round conversation on the graphical interface to form a visual multi-round conversation.

[0044] As described above, when the information included in the extracted conversation voice does not match the node matching information, it is determined whether the information matches the intent library information, where the intent library information includes the dialect information, homophone information, etc. corresponding to the node matching information. For example, when the machine recognizes the character "Lu" when the user reads a series of numbers, which does not match the matching information, it is corrected to the character "Six" after matching with the intent library information.

[0045] This application provides an optional embodiment, as Figure 2 shown, Figure 2This is a flowchart illustrating a method for generating a visual multi-turn dialogue via voice commands according to an embodiment of the present invention. The user provides voice content, which is recognized as text by automatic speech recognition (ASR) technology. The text content is then converted into corresponding text, regular expressions, function formulas, etc. by a natural language understanding model (NLU model). A graphical interface corresponding to the target dialogue scenario and a logic script corresponding to the target dialogue scenario are obtained. If the information and matching information do not match, scenario content correction is performed, and finally a visual scenario interface and scenario resource file are obtained.

[0046] In another optional example provided in this application, a manual data entry rule is provided, wherein Table 1 is the rule for entering scene content, Table 2 is the rule for entering nodes, Table 3 is the rule for entering operators, Table 4 is the rule for entering Arabic numerals, Table 5 is the rule for entering English letters, Table 6 is the rule for entering Greek letters, Table 7 is the rule for entering strings, Table 8 is the rule for entering dates, Table 9 is the rule for entering API calls, and Table 10 is the rule for entering pattern codes.

[0047]

[0048] Table 2

[0049]

[0050]

[0051] Table 3

[0052] code Voice input + Add, plus sign, add, positive - Subtraction, minus sign, minus, negative \pm Addition and subtraction, positive and negative \times Multiply, multiply by, cross multiplication \div Divide by \cdot Dot product > Greater than < Less than = = … …

[0053] Table 4

[0054] code Voice input 1、2、3、4、5… 2、3、4、5…

[0055] Table 5

[0056] code Voice input a, b, c, d, e… a, b, c, d, e… A, B, C, D, E… Big A, Big B, Big C, Big D…

[0057] Table 6

[0058] code Voice input \alpha α beta β \gamma γ … … Gamma Γ Delta Δ … …

[0059] Table 7

[0060]

[0061]

[0062] Table 8

[0063]

[0064]

[0065] Table 9

[0066]

[0067] Table 10

[0068]

[0069] This invention provides a method for generating visual multi-turn dialogues via voice commands. The method involves acquiring dialogue voice and determining a target dialogue scenario based on the voice; acquiring a graphical interface corresponding to the target dialogue scenario and a logic script corresponding to the target dialogue scenario, wherein the logic script contains the dialogue flow under the target dialogue scenario, and the dialogue flow includes multiple dialogue nodes; and generating a visual multi-turn dialogue on the graphical interface based on the dialogue voice and the multiple dialogue nodes in the logic script. This solves the problem of complex scenario writing for multi-turn dialogues between robots and users in related technologies, thereby achieving a convenient and quick effect for voice-input multi-turn dialogue scenarios.

[0070] 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, and 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.

[0071] This invention also provides an apparatus for generating visual multi-turn dialogues via voice commands. It should be noted that this apparatus can be used to execute the method provided in this invention for generating visual multi-turn dialogues via voice commands. The following describes the apparatus for generating visual multi-turn dialogues via voice commands provided in this invention.

[0072] Figure 3 This is a schematic diagram of an apparatus for generating visual multi-turn dialogues via voice commands according to an embodiment of the present invention. Figure 3 As shown, the device includes: a first acquisition unit 301, which acquires dialogue voice and determines a target dialogue scenario based on the dialogue voice; a second acquisition unit 302, which acquires a graphical interface corresponding to the target dialogue scenario and a logic script corresponding to the target dialogue scenario, wherein the logic script contains a dialogue flow under the target dialogue scenario, and the dialogue flow includes multiple dialogue nodes; and a first generation unit 303, which generates a visual multi-turn dialogue on the graphical interface based on the dialogue voice and the multiple dialogue nodes in the logic script.

[0073] In one optional instance, the first acquisition unit 301 includes: a first conversion subunit, which determines the instruction speech contained in the dialogue speech and converts the instruction speech into text; a second conversion subunit, which converts the text into corresponding text content through semantic understanding, wherein the specific content contained in the text content includes at least one of the following: text, regular expression, function formula, and pattern code; and a determination subunit, which determines the target dialogue scenario based on the text content.

[0074] In one optional instance, the determined subunit includes: an extraction module that extracts information from the text content and matches the information with matching information contained in multiple scene trigger nodes to obtain multiple matching scores; and a determination module that determines the dialogue scene associated with the scene trigger node corresponding to the highest matching score as the target dialogue scene.

[0075] In an optional embodiment, the device further includes: a third acquisition unit, which acquires multiple content texts of multiple dialogue speech conversions before acquiring the graphical interface corresponding to the target dialogue scenario and the logic script corresponding to the target dialogue scenario; a first determination unit, which determines multiple node recognition rules corresponding to multiple dialogue nodes in the logic script corresponding to the target dialogue scenario based on the multiple content texts, wherein the node recognition rules include at least matching information and matching format for triggering dialogue nodes; a construction unit, which constructs an initial logic script based on the multiple node recognition rules; and a correction unit, which performs a correction operation on the constructed initial logic script, determines the corrected initial logic script as the logic script, and saves the logic script.

[0076] In one optional instance, the first generation unit 303 includes: an acquisition subunit for acquiring the text content of the dialogue speech conversion and extracting information contained in the text content; a judgment subunit for judging whether the information contained in the text content matches the matching information corresponding to the dialogue node; a first generation subunit for generating response content corresponding to the node when the information matches the matching information; a second generation subunit for generating content corresponding to the multi-turn dialogue based on the text content of the dialogue speech conversion and the response content; and a display subunit for displaying the content corresponding to the multi-turn dialogue on a graphical interface to form a visual multi-turn dialogue.

[0077] In an optional embodiment, the device further includes: a judgment unit, which, if the information does not match the matching information, determines whether the information matches any one of the intent database entries contained in the intent database, wherein there is a preset similarity between the intent database entry and the matching information corresponding to the dialogue node; a second determination unit, which, if any one of the intent database entries matches the information, determines and triggers the dialogue node associated with the intent database entry; a second generation unit, which generates the response content corresponding to the dialogue node, and generates the content corresponding to the multi-turn dialogue based on the text content converted from the dialogue speech and the response content; and a display unit, which displays the content corresponding to the multi-turn dialogue on a graphical interface to form a visual multi-turn dialogue.

[0078] This invention provides a device for generating visualized multi-turn dialogues via voice commands. It acquires dialogue voice and determines a target dialogue scenario based on the voice. It then acquires a graphical interface corresponding to the target dialogue scenario and a logic script corresponding to the target dialogue scenario. The logic script contains a dialogue flow under the target dialogue scenario, including multiple dialogue nodes. Based on the dialogue voice and the multiple dialogue nodes in the logic script, it generates a visualized multi-turn dialogue on the graphical interface. This solves the problem of complex scenarios for writing multi-turn dialogues between robots and users in related technologies, thereby achieving a convenient and quick effect for voice-input multi-turn dialogue scenarios.

[0079] The device for generating visual multi-turn dialogues via voice commands includes a processor and a memory. The first acquisition unit 301 and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to achieve the corresponding functions.

[0080] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the complexities of writing multi-turn dialogues between robots and users in related technologies.

[0081] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0082] This invention provides a storage medium storing a program that, when executed by a processor, implements the method for generating visual multi-turn dialogues via voice commands.

[0083] This invention provides a processor for running a program, wherein the program executes a method for generating visual multi-turn dialogues via voice commands.

[0084] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: acquiring dialogue voice and determining a target dialogue scenario based on the dialogue voice; acquiring a graphical interface corresponding to the target dialogue scenario and a logic script corresponding to the target dialogue scenario, wherein the logic script contains a dialogue flow under the target dialogue scenario, and the dialogue flow includes multiple dialogue nodes; and generating a visual multi-turn dialogue on the graphical interface based on the dialogue voice and the multiple dialogue nodes in the logic script.

[0085] In one optional instance, acquiring the dialogue speech and determining the target dialogue scenario based on the dialogue speech includes: identifying the instruction speech contained in the dialogue speech and converting the instruction speech into text; converting the text into corresponding text content through semantic understanding, wherein the specific content contained in the text content includes at least one of the following: text, regular expression, function formula, and pattern code; and determining the target dialogue scenario based on the text content.

[0086] In one optional instance, determining the target dialogue scenario based on the text content includes: extracting information from the text content and matching the information with matching information contained in multiple scenario trigger nodes to obtain multiple matching scores; and determining the dialogue scenario associated with the scenario trigger node corresponding to the highest matching score as the target dialogue scenario.

[0087] In an optional instance, before acquiring the graphical interface corresponding to the target dialogue scenario and the logic script corresponding to the target dialogue scenario, the method further includes: acquiring multiple content texts from multiple dialogue speech conversions; determining multiple node recognition rules corresponding to multiple dialogue nodes in the logic script corresponding to the target dialogue scenario based on the multiple content texts, wherein the node recognition rules at least include matching information and matching format used to trigger dialogue nodes; constructing an initial logic script based on the multiple node recognition rules; performing a correction operation on the constructed initial logic script, determining the corrected initial logic script as the logic script, and saving the logic script.

[0088] In one optional instance, based on the dialogue speech and logic script, a visual multi-turn dialogue is generated on a graphical interface, including: obtaining the text content converted from the dialogue speech and extracting the information contained in the text content; determining whether the information contained in the text content matches the matching information corresponding to the dialogue node; if the information matches the matching information, generating the response content corresponding to the node; generating the content corresponding to the multi-turn dialogue based on the text content converted from the dialogue speech and the response content; and displaying the content corresponding to the multi-turn dialogue on the graphical interface to form a visual multi-turn dialogue.

[0089] In an optional instance, if the information does not match the matching information, the method further includes: determining whether the information matches any one of the intents in the intent library, wherein there is a preset similarity between the intent library information and the matching information corresponding to the dialogue node; if any one of the intents matches the information, determining and triggering the dialogue node associated with the intent library information; generating the response content corresponding to the dialogue node, and generating the content corresponding to the multi-turn dialogue based on the text content converted from the dialogue speech and the response content; and displaying the content corresponding to the multi-turn dialogue on the graphical interface to form a visual multi-turn dialogue.

[0090] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.

[0091] The present invention also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: acquiring dialogue voice and determining a target dialogue scenario based on the dialogue voice; acquiring a graphical interface corresponding to the target dialogue scenario and a logic script corresponding to the target dialogue scenario, wherein the logic script contains a dialogue flow under the target dialogue scenario, and the dialogue flow includes multiple dialogue nodes; and generating a visual multi-turn dialogue on the graphical interface based on the dialogue voice and the multiple dialogue nodes in the logic script.

[0092] In one optional instance, acquiring the dialogue speech and determining the target dialogue scenario based on the dialogue speech includes: identifying the instruction speech contained in the dialogue speech and converting the instruction speech into text; converting the text into corresponding text content through semantic understanding, wherein the specific content contained in the text content includes at least one of the following: text, regular expression, function formula, and pattern code; and determining the target dialogue scenario based on the text content.

[0093] In one optional instance, determining the target dialogue scenario based on the text content includes: extracting information from the text content and matching the information with matching information contained in multiple scenario trigger nodes to obtain multiple matching scores; and determining the dialogue scenario associated with the scenario trigger node corresponding to the highest matching score as the target dialogue scenario.

[0094] In an optional instance, before acquiring the graphical interface corresponding to the target dialogue scenario and the logic script corresponding to the target dialogue scenario, the method further includes: acquiring multiple content texts from multiple dialogue speech conversions; determining multiple node recognition rules corresponding to multiple dialogue nodes in the logic script corresponding to the target dialogue scenario based on the multiple content texts, wherein the node recognition rules at least include matching information and matching format used to trigger dialogue nodes; constructing an initial logic script based on the multiple node recognition rules; performing a correction operation on the constructed initial logic script, determining the corrected initial logic script as the logic script, and saving the logic script.

[0095] In one optional instance, based on the dialogue speech and logic script, a visual multi-turn dialogue is generated on a graphical interface, including: obtaining the text content converted from the dialogue speech and extracting the information contained in the text content; determining whether the information contained in the text content matches the matching information corresponding to the dialogue node; if the information matches the matching information, generating the response content corresponding to the node; generating the content corresponding to the multi-turn dialogue based on the text content converted from the dialogue speech and the response content; and displaying the content corresponding to the multi-turn dialogue on the graphical interface to form a visual multi-turn dialogue.

[0096] In an optional instance, if the information does not match the matching information, the method further includes: determining whether the information matches any one of the intents in the intent library, wherein there is a preset similarity between the intent library information and the matching information corresponding to the dialogue node; if any one of the intents matches the information, determining and triggering the dialogue node associated with the intent library information; generating the response content corresponding to the dialogue node, and generating the content corresponding to the multi-turn dialogue based on the text content converted from the dialogue speech and the response content; and displaying the content corresponding to the multi-turn dialogue on the graphical interface to form a visual multi-turn dialogue.

[0097] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0098] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0099] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0100] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0101] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0102] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0103] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0104] It should also be noted that 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 process, method, article, or apparatus. Unless otherwise specified, 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.

[0105] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0106] The above are merely embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.

Claims

1. A method of generating a visualized multi-turn conversation through voice instructions, characterized in that, The method comprises: obtaining dialogue voice and determining a target dialogue scene according to the dialogue voice; obtaining a graphical interface corresponding to the target dialogue scene and a logic script corresponding to the target dialogue scene, wherein the logic script contains a dialogue flow in the target dialogue scene, and the dialogue flow comprises a plurality of dialogue nodes; generating a visual multi-round dialogue on the graphical interface according to the dialogue voice and the plurality of dialogue nodes in the logic script; obtaining dialogue voice and determining a target dialogue scene according to the dialogue voice comprises: determining instruction voice contained in the dialogue voice and converting the instruction voice into text; converting the text into corresponding text content through semantic understanding, wherein the specific content contained in the text content at least includes one of the following: characters, regular expressions, function formulas, and pattern codes; determining the target dialogue scene according to the text content; generating a visual multi-round dialogue on the graphical interface according to the dialogue voice and the logic script comprises: obtaining text content converted from the dialogue voice and extracting information contained in the text content; determining whether the information contained in the text content matches matching information corresponding to the dialogue node; in the case that the information does not match the matching information, determining whether the information matches any one of intent library information contained in an intent library, the intent library information and the matching information corresponding to the dialogue node have a preset similarity, and the intent library information includes dialect information and homophonic character information corresponding to node matching information; in the case that any one of the intent library information matches the information, determining and triggering the dialogue node associated with the intent library information; and generating reply content corresponding to the dialogue node, and generating content corresponding to the multi-round dialogue according to the text content converted from the dialogue voice and the reply content.

2. The method of claim 1, wherein, determining the target dialogue scene according to the text content comprises: extracting information in the text content and matching the information with matching information contained in a plurality of scene trigger nodes to obtain a plurality of matching scores; determining a dialogue scene associated with a scene trigger node corresponding to the highest matching score as the target dialogue scene.

3. The method of claim 1, wherein, Before obtaining the graphical interface corresponding to the target dialogue scene and the logic script corresponding to the target dialogue scene, the method further comprises: obtaining a plurality of content texts converted from a plurality of dialogue voices; determining a plurality of node recognition rules corresponding to a plurality of dialogue nodes in the logic script corresponding to the target dialogue scene according to a plurality of content texts, wherein the node recognition rules at least include matching information and matching formats for triggering the dialogue node; constructing an initial logic script according to a plurality of node recognition rules; correcting the constructed initial logic script, determining the corrected initial logic script as the logic script, and saving the logic script.

4. The method of claim 2, wherein, generating a visual multi-round dialogue on the graphical interface according to the dialogue voice and the logic script comprises: obtaining the text content converted from the dialogue voice, and extracting information contained in the text content; determining whether the information contained in the text content matches the matching information corresponding to the dialogue node; generating reply content corresponding to the node in the case where the information matches the matching information; generating content corresponding to the multi-round dialogue according to the text content converted from the dialogue voice and the reply content; displaying the content corresponding to the multi-round dialogue on the graphical interface to form a visualized multi-round dialogue.

5. The method of claim 4, wherein, In the case where the information does not match the matching information, the method further comprises: displaying the content corresponding to the multi-round dialogue on the graphical interface to form a visualized multi-round dialogue.

6. An apparatus for generating a visualized multi-turn dialogue by voice instructions, characterized in that, comprise: a first obtaining unit that obtains dialogue voice and determines a target dialogue scene according to the dialogue voice; a second obtaining unit that obtains a graphical interface corresponding to the target dialogue scene and a logic script corresponding to the target dialogue scene, wherein the logic script contains a dialogue flow under the target dialogue scene, and the dialogue flow comprises a plurality of dialogue nodes; a first generating unit that generates a visualized multi-round dialogue on the graphical interface according to the dialogue voice and the plurality of dialogue nodes in the logic script; the first obtaining unit comprises: a first conversion subunit that determines instruction voice contained in the dialogue voice and converts the instruction voice into text; a second conversion subunit that converts the text into corresponding text content through semantic understanding, wherein the specific content contained in the text content at least includes one of the following: a character, a regular expression, a function formula, and a pattern code; a determination subunit that determines the target dialogue scene according to the text content; The device for generating a visualized multi-round dialogue through a voice instruction further comprises: an obtaining subunit that is configured to obtain text content converted from the dialogue voice, and extract information contained in the text content; a determination subunit that is configured to determine whether the information contained in the text content matches the matching information corresponding to the dialogue node; In the case where the information does not match the matching information, the determination unit determines whether the information matches any one of intent library information contained in an intent library, the intent library information and the matching information corresponding to the dialogue node have a preset similarity, and the intent library information includes dialect information and homophonic character information corresponding to node matching information. A second determination unit determines and triggers the dialogue node associated with the intent library information in the case where any one of the intent library information matches the information. A second generating unit generates reply content corresponding to the dialogue node, and generates content corresponding to the multi-round dialogue according to the text content converted from the dialogue voice and the reply content.

7. A computer readable storage medium characterized in that, The computer-readable storage medium comprises a stored program, wherein the program controls the device where the computer-readable storage medium is located to execute the method for generating a visualized multi-round dialogue through a voice instruction according to any one of claims 1 to 5 when the program is running.

8. A processor, comprising: The processor is configured to run a program, wherein the program, when running, implements the method of any one of claims 1-5 for generating a visual multi-turn dialogue based on voice instructions.

Citation Information

Patent Citations

  • Multi-round dialogue processing method and device, electronic equipment and storage medium

    CN111639168A

  • Voice control method, voice control device, server and storage medium

    CN113421561A

  • Automatic conversation system and conversation scenario editing device

    JP2010048980A