Intention jump method and device, electronic device, and storage medium

By allowing users to configure operation commands to select intent jump modes, and using trie, regular expressions, and intent recognition models for matching, the flexibility of intent jump configuration for task-oriented robots in different application scenarios is solved, realizing flexible intent jump of state machines and efficient recognition of query content.

CN115292488BActive Publication Date: 2026-01-02CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210867876.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-21
Publication Date
2026-01-02
Estimated Expiration
2042-07-21

AI Technical Summary

Technical Problem

Existing task robots lack flexible intent-jumping configurations for different application scenarios, resulting in a single configuration failing to meet diverse needs.

Method used

The user selects the intent jump mode by configuring operation commands, generates configuration content, determines intent jump conditions based on the configuration content, and uses a trie, regular expression set and intent recognition model for matching to realize intent jump of the state machine.

Benefits of technology

It has broadened the application scope of task-oriented robots in different application scenarios, enabled flexible intent transitions in state machines, and enhanced the ability to recognize user inquiries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115292488B_ABST
    Figure CN115292488B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence, and provides an intention jump method and device, an electronic device and a storage medium. The method comprises the following steps: determining a configuration mode according to a configuration operation instruction input by a user for a preset state machine; determining configuration content according to the configuration mode; determining an intention jump condition of the preset state machine at a first state node according to the configuration content; wherein the intention jump condition is used for indicating a condition that needs to be met for jumping from the first state node to a second state node; obtaining input inquiry content when it is detected that the preset state machine reaches the first state node; matching the inquiry content with the intention jump condition to obtain a matching result; and when the matching result indicates that the matching is successful, the state machine jumps from the first state node to the second state node. According to the embodiment, different configuration modes of intention jump can be selected in different application scenarios, so that the intention jump of the state machine is realized, and the application range is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to an intent jump configuration identification method and device, an electronic device, and a storage medium. BACKGROUND

[0002] At present, task-based robots in the industry are generally abstracted as finite state machines, and the dialogue is regarded as a process of jumping within a limited state node. Each state node has corresponding actions and replies. If the task can be smoothly transferred from the start node to the end node, the task is completed. However, for each different task-based robot, there are specific configurations and identification methods for intent jump. A single configuration and identification method cannot meet the needs of convenient use in different application scenarios. SUMMARY

[0003] The main purpose of the embodiments of the present application is to propose an intent jump method and device, an electronic device, and a storage medium, which aims to select different configuration modes of intent jump for task-based robots in different application scenarios, so as to realize the intent jump of the state machine and improve the application range.

[0004] To achieve the above purpose, a first aspect of the embodiments of the present application proposes an intent jump configuration identification method, which comprises:

[0005] According to the configuration operation instruction input by the user for the preset state machine, a configuration mode is determined;

[0006] According to the configuration mode, configuration content is determined;

[0007] According to the configuration content, an intent jump condition of the preset state machine in a first state node is determined. The intent jump condition is used to indicate the condition that needs to be met for jumping from the first state node to a second state node;

[0008] When it is detected that the preset state machine reaches the first state node, input inquiry content is obtained;

[0009] The inquiry content is matched with the intent jump condition to obtain a matching result;

[0010] When the matching result indicates a successful match, the state machine jumps from the first state node to the second state node.

[0011] In some embodiments, the configuration content is determined according to the configuration mode, which comprises:

[0012] When the configuration mode is a first configuration mode, the configuration content is determined as a user statement set and a regular expression set;

[0013] The intention jump condition of the preset state machine at the first state node is determined according to the configuration content, and the intention jump condition of the preset state machine at the first state node is determined according to the configuration content.

[0014] A dictionary tree is constructed according to the set of user utterances.

[0015] The intention jump condition of the preset state machine at the first state node is determined according to the dictionary tree and the set of regular expressions.

[0016] In some embodiments, after the configuration content is determined according to the configuration mode, before the intention jump condition of the preset state machine at the first state node is determined according to the configuration content, the method further comprises:

[0017] A training sample is constructed according to the set of user utterances, and the training sample includes a sample corpus and a sample label corresponding to the sample corpus.

[0018] An intention recognition model is obtained, the sample corpus is taken as an input of the intention recognition model, the sample label is taken as an expected output of the intention recognition model, the intention recognition model is trained, and a trained intention recognition model is obtained.

[0019] The intention jump condition of the preset state machine at the first state node is determined according to the dictionary tree and the set of regular expressions.

[0020] The intention jump condition of the preset state machine at the first state node is determined according to the dictionary tree, the set of regular expressions, and an intention recognition result output by the trained intention recognition model.

[0021] In some embodiments, the matching of the inquiry content with the intention jump condition to obtain a matching result comprises:

[0022] The inquiry content is matched with the dictionary tree, and when the inquiry content is successfully matched with the dictionary tree, it is determined that the matching result is a matching success.

[0023] In some embodiments, after the inquiry content is matched with the dictionary tree, the method further comprises:

[0024] When the inquiry content fails to match with the dictionary tree, the inquiry content is matched with the set of regular expressions.

[0025] When the inquiry content is successfully matched with the set of regular expressions, it is determined that the matching result is a matching success.

[0026] In some embodiments, after the inquiry content is matched with the set of regular expressions, the method further comprises:

[0027] inputting the query content into the trained intent recognition model when the query content fails to match the regular expression set;

[0028] determining, according to an output result of the intent recognition model, whether the matching result is a matching success or a matching failure.

[0029] In some embodiments, the determining configuration content according to the configuration mode comprises:

[0030] determining, when the configuration mode is a second configuration mode, the configuration content as a keyword set;

[0031] The determining the intent jump condition of the first state node according to the configuration content comprises:

[0032] determining the intent jump condition of the first state node according to the keyword set;

[0033] The matching the query content with the intent jump condition to obtain a matching result comprises:

[0034] matching the query content with the keyword set;

[0035] determining, when the query content contains at least one keyword in the keyword set, that the matching result is a matching success;

[0036] determining, when the query content does not contain any keyword in the keyword set, that the matching result is a matching failure.

[0037] To achieve the above object, a second aspect of the embodiment of the present application provides an intent jump device, which comprises:

[0038] a selection module configured to determine a configuration mode according to a configuration operation instruction input by a user for a preset state machine;

[0039] a determination module configured to determine configuration content according to the configuration mode;

[0040] a configuration module configured to determine an intent jump condition of the preset state machine at a first state node according to the configuration content; wherein the intent jump condition is used to indicate a condition that needs to be met for jumping from the first state node to a second state node;

[0041] a receiving module configured to acquire input query content when detecting that the preset state machine reaches the first state node;

[0042] a matching module configured to match the query content with the intent jump condition to obtain a matching result;

[0043] a jump module, configured to, when the matching result indicates that the matching is successful, jump the state machine from the first state node to the second state node.

[0044] To achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, which comprises a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory, and the program is executed by the processor to realize the method in the first aspect.

[0045] To achieve the above object, a fourth aspect of the embodiments of the present application provides a storage medium, which is a computer readable storage medium, for computer readable storage, and the storage medium stores one or more programs, and the one or more programs are executable by one or more processors to realize the method in the first aspect.

[0046] The intention jump method and device, electronic device and storage medium provided by the present application, through selecting a first state node in a preset state machine by a user, generating a configuration operation instruction, determining a configuration mode selected by the user according to the configuration operation instruction, determining corresponding configuration content according to the configuration mode, determining an intention jump condition of the first state node according to the configuration content, and the intention jump condition is used to indicate a condition to be met for jumping from the first state node to a second state node, when the preset state machine reaches the first state node, obtaining inquiry content of the user, and matching the inquiry content with the intention jump condition corresponding to the first state node to obtain a matching result, when the matching result indicates that the matching is successful, the state machine jumps from the first state node to the second state node. The scheme of the present application enables a task type robot to select different configuration modes of intention jump in different application scenarios, so as to realize intention jump of the state machine from the first state node to the second state node, and improve the application range. BRIEF DESCRIPTION OF DRAWINGS

[0047] Figure 1 is a flowchart of an intention jump method provided by an embodiment of the present application;

[0048] Figure 2 is a flowchart of an intention jump method provided by another embodiment of the present application;

[0049] Figure 3 is a flowchart of an intention jump method provided by another embodiment of the present application;

[0050] Figure 4 is a flowchart of an intention jump method provided by another embodiment of the present application;

[0051] Figure 5 is a flowchart of an intent jump method provided by another embodiment of the present application;

[0052] Figure 6 is a flowchart of an intent jump method provided by another embodiment of the present application;

[0053] Figure 7 is a flowchart of an intent jump method provided by another embodiment of the present application;

[0054] Figure 8 is a structural schematic diagram of an intent jump device provided by an embodiment of the present application;

[0055] Figure 9 is a hardware structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the objects, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.

[0057] 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 the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0058] First, several terms involved in the present application are analyzed:

[0059] Task-oriented robot: mainly refers to a multi-turn dialogue generated by a robot to meet a user's demand. The robot determines the user's intent through understanding and clarification, and then completes the task through reply and API calling, can meet the function of voice interaction, and the robot needs to understand the context information and make the next step. Generally, it includes natural language understanding module, dialogue management module and natural language generation module.

[0060] Voice interaction: voice interaction refers to the dialogue between an intelligent device and a user through voice. In the dialogue process, the user's intent is understood through AI technology, and finally the required service is provided to the user. This way is completely different from the past mobile phone screen touch, PC mouse / keyboard interaction mode. This human-computer voice interaction process with the user is similar to the actual life communication scene of people, like the interaction between people. Overall, the voice interaction of skills is mainly divided into single-turn dialogue interaction and multi-turn dialogue interaction.

[0061] Intention / User Intention: Intention refers to the purpose of the user's speech, what the user wants to express and do through the sentence. For example, "Help me book a ticket from Chengdu to Shenzhen on Saturday", which represents the intention of "booking a ticket". The result of the analysis is "{Intention: booking a ticket}". From the perspective of semantic data structure, an intention can be composed of basic information, corpus, and slot. Intention is divided into self-defined intention and system intention. Self-defined intention is created and managed by the developer, and the corpus and slot can be edited arbitrarily. System intention is a basic control instruction type of intention, such as pause, continue, next, previous, etc., which has been built by DingDang and can be directly used by the developer through reference.

[0062] Intention Recognition: As the name implies, it is to determine what the user wants to do, such as a user asking a question to a robot, so the robot needs to determine whether the user is asking about the weather, tourism, or information about a certain movie. In the end, intention recognition is a text classification problem. Since it corresponds to text classification, it is necessary to first determine which categories of intention are clear, that is, we need to define the categories of intention in advance before considering the problem of intention recognition. So how to define intention categories? It is not like the sentiment classification task that can be divided into positive, negative, and neutral sentiment regardless of the scene. We need to consider intention classification in a specific scenario, and different application scenarios have different intention categories. For example, on the Meituan APP, it divides the user's search intention into categories such as ordering takeout, booking hotels, ordering travel tickets, ordering movie tickets, and ordering tickets.

[0063] Artificial Intelligence (AI): It is a new technical science that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence; artificial intelligence is a branch of computer science, and artificial intelligence aims to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. The research in this field includes robots, language recognition, image recognition, natural language processing, and expert systems. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also the use of digital computers or digital computer-controlled machines to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.

[0064] Natural language processing (NLP): NLP uses computers to process, understand and apply human languages (such as Chinese, English, etc.), NLP is a branch of artificial intelligence, and is an interdisciplinary subject of computer science and linguistics, and is also commonly referred to as computational linguistics. Natural language processing includes syntax analysis, semantic analysis, discourse understanding, etc. Natural language processing is commonly used in machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, public opinion analysis and opinion mining, etc. Technical fields, it involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research related to language processing, and language computing related linguistic research.

[0065] Information extraction: a text processing technology that extracts specified types of entities, relationships, events, etc. from natural language text, and forms structured data output. Information extraction is a technology for extracting specific information from text data. Text data is composed of specific units, such as sentences, paragraphs, and chapters, and text information is composed of small specific units, such as words, phrases, sentences, paragraphs, or combinations of these specific units. Extracting noun phrases, names, and place names from text data is text information extraction, of course, the information extracted by the text information extraction technology can be various types of information.

[0066] Based on this, the embodiments of the present application provide an intent jump method and device, electronic equipment and storage medium, which aims to select different intent jump configuration modes for task-based robots in different application scenarios, so as to realize the intent jump of the state machine, and improve the application range.

[0067] The intent jump method and device, electronic equipment and storage medium provided by the embodiments of the present application are specifically explained through the following embodiments. First, the recommendation method in the embodiments of the present application is described.

[0068] The intent jump method provided by the embodiments of the present application relates to the technical field of artificial intelligence. The intent jump method provided by the embodiments of the present application can be applied to a terminal, can also be applied to a server end, and can be software running in the terminal or the server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as an independent physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms; and the software can be an application that implements the intent jump method, but is not limited to the above forms.

[0069] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0070] Figure 1 The method in the optional flowchart of the intent jump method provided by the embodiments of the present application, Figure 1 The method in the optional flowchart of the intent jump method provided by the embodiments of the present application,

[0071] Step S110, determining a configuration mode according to a configuration operation instruction input by a user for a preset state machine.

[0072] Step S120, determining configuration content according to the configuration mode.

[0073] Step S130, determining an intent jump condition of the preset state machine at a first state node according to the configuration content; wherein the intent jump condition is used to indicate a condition to be met for jumping from the first state node to a second state node.

[0074] The first state node can be configured with multiple intent jump based actions, and different configuration contents correspond to different intent jumps of each different branch. The configuration mode specifically selects the simplicity of the intent jump condition configuration, wherein the configuration mode at least includes two. The more complex configuration mode has a more powerful function of configuring the intent jump condition, can put the task robot into a complex and crowded environment for use, has a stronger language processing capability for user inquiry content, and is more intelligent; and the simpler configuration mode has a simpler configuration process of the intent jump condition, requires less time, can quickly configure the intent jump condition, and thus can quickly put the task robot into a specified place for use.

[0075] In step S140, when it is detected that the preset state machine reaches the first state node, the input inquiry content is acquired.

[0076] In step S150, the inquiry content is matched with the intent jump condition to obtain a matching result.

[0077] It should be noted that the inquiry content can be voice information or text information, that is, the user can directly form the inquiry content in a language oral form or a text input form, the state machine one-to-one matches the inquiry content with the intent jump condition corresponding to the first state node, specifically by performing information extraction on the inquiry content and matching the inquiry content with the corresponding intent jump condition to obtain a matching result, and the matching result includes matching success and matching failure.

[0078] In step S160, when the matching result indicates matching success, the state machine jumps from the first state node to the second state node.

[0079] The steps S110 to S160 shown in the embodiments of the present application select the configuration mode and the configuration content of the first state node, thereby determining the intent jump condition of the first state node, so that the task robot selects different configuration modes of the intent jump in different application scenarios, thereby realizing the intent jump of the state machine from the first state node to the second state node, and improving the application range.

[0080] Please refer to Figure 2 In some embodiments, step S120 can include but is not limited to step S210:

[0081] In step S210, when the configuration mode is the first configuration mode, it is determined that the configuration content is a user statement set and a regular expression set.

[0082] In step S130, steps S220 to S230 can be included but are not limited to steps S220 to S230:

[0083] Step S220, constructing a dictionary tree according to the user utterance set;

[0084] Step S230, determining the intent jump condition of the preset state machine at the first state node according to the dictionary tree and the regular expression set.

[0085] The user utterance set includes at least one user utterance, for example, user utterances such as "How is the weather in Beijing?", "How is the weather tomorrow?", and "How is the weather in Shenzhen today?" form a set, and the user utterance set is formed into a dictionary tree according to a preset construction rule, wherein the user utterance can be integrated into a user utterance set through an excel file and the like, and the present application does not limit this. Specifically, the specific process of configuring the user utterance set is as follows: generating a user utterance collection in an excel document, the processor automatically filters the first line title, edits a user utterance for each line, the corresponding value and slot of each line of the user utterance must have a value or be empty, and the user utterance must have a corresponding value and slot when the user utterance is not empty, the uploaded slot must exist in the system, if the uploaded user utterance exists in the system, the original user utterance is overwritten with the newly uploaded user utterance, the corresponding value imported must exist in the user utterance, and the corresponding value is not allowed to be cross-labeled, the size of the excel file cannot exceed 2MB, the imported user utterance cannot exceed 10,000, and the data before the space is normally imported for the user utterance with spaces in the corresponding value and slot, and the data after the space is not imported. The excel file is shown in Table 1:

[0086] User sayings Corresponding values Slot Corresponding values Slot How is the weather in Beijing Beijing City How is the weather tomorrow Tomorrow Time How is the weather in Shenzhen today Shenzhen City Today Time

[0087] Table 1

[0088] The regular expression set includes at least one regular expression, for example, the regular expression is ".{0,3}${date}${city} of the weather (forecast | situation | condition).{0,3}", when the user inputs the inquiry content as "Please tell me the weather situation in Shenzhen tomorrow", it is recognized that the date is tomorrow and the city is Shenzhen, and the corresponding intent is weather forecast. The dictionary tree constructed by the user utterance set and the regular expression set determine the intent jump instruction of the first state node.

[0089] Please refer to Figure 3 In some embodiments, after step S120 and before step S130, the intent jump method provided by the present application can further include but is not limited to steps S310 to S320:

[0090] Step S310, constructing a training sample according to the user utterance set, the training sample including a sample corpus and a sample label corresponding to the sample corpus;

[0091] Step S320, obtaining the intent recognition model, taking the sample corpus as the input of the intent recognition model, taking the sample label as the expected output of the intent recognition model, training the intent recognition model, and obtaining the trained intent recognition model.

[0092] Meanwhile, for the step S230, including but not limited to including step S330:

[0093] Step S330, determining the intent jump condition of the preset state machine at the first state node according to the dictionary tree, the regular expression set, and the intent recognition result output by the trained intent recognition model.

[0094] In step S310 of some embodiments, the training sample is constructed according to the user sample set described above, wherein the constructed training sample includes the sample corpus and the sample label corresponding to the sample corpus. For example, in an embodiment, one of the user sample set is "Shenzhen, how is the weather today?", the sample corpus of the constructed training sample is "Shenzhen, how is the weather today?", and the corresponding sample label is "today" as the date, "Shenzhen" as the city, and "weather forecast" as the corresponding intent. The construction process of the training sample is not limited in the present application.

[0095] In step S320 of some embodiments, the intent recognition model is trained by inputting the constructed sample corpus in the domesticated sample into the intent recognition model, and using the sample label corresponding to the sample corpus as the expected output of the intent recognition model. Specifically, the intent recognition model can be one of a Fasttext model or a TextCNN model. It should be noted that the FastText model is a text classifier open sourced by Facebook AI Research in 2016, and its main feature is fast processing speed. Compared with other text classification models such as SVM, logistic regression, and neural network models, the FastText model greatly shortens the training time while maintaining the classification effect. In addition, the TextCNN model has the advantage of simple network structure. In the case of such a simple model network structure, the model still has very good effect by introducing a pre-trained word vector. A specific model is used to further illustrate the intent recognition model provided in the present application. When the TextCNN model is selected as the intent recognition model, the model includes an embedding layer, a convolution layer, a pooling layer, a full connection layer, and a Softmax classification layer. The embedding layer is used to vectorize the sample corpus to obtain the word vector of the sample corpus. The convolution layer is used to convolve the word vector of the sample corpus to extract the features of the sample corpus. The pooling layer is used to pool the features of the sample corpus to obtain the dimension-reduced features of the sample corpus. The full connection layer is used to transmit the dimension-reduced features of the sample corpus to the Softmax classification layer. The Softmax classification layer is used to classify the dimension-reduced features of the sample corpus to obtain the target intent corresponding to the sample corpus. The sample label is used as the expected output to supervise the target intent, and the parameters of the model are adjusted until the loss value of the training result reaches the ideal effect. The selection of the specific intent recognition model and the specific training process are not limited in the present application.

[0096] In step S330 of some embodiments, the intent recognition result output by the dictionary tree, the regular expression set, and the intent recognition model are collectively used to configure the intent jump condition of the first state node to improve the accuracy of identifying the inquiry content of the user.

[0097] Please refer to Figure 4 In some embodiments, step S150 can include but is not limited to step S410.

[0098] In step S410, the inquiry content is matched with the dictionary tree. When the inquiry content is successfully matched with the dictionary tree, it is determined that the matching result is a successful match.

[0099] In step S410 of some embodiments, the inquiry content is preferentially matched with the dictionary tree, and when the inquiry content is successfully matched with the dictionary tree, the second state node is jumped from the first state node according to the matched result. When the configuration mode is the first configuration mode, the matching priority of the inquiry content and the dictionary tree is the highest.

[0100] Referring to Figure 5 In some embodiments, step S150 can further include, but is not limited to, steps S510-S520:

[0101] In step S510, the inquiry content is matched with the regular expression set when the inquiry content fails to be matched with the dictionary tree.

[0102] In step S520, it is determined that the matching result is matched successfully when the inquiry content is successfully matched with the regular expression set.

[0103] In some embodiments, when the inquiry content fails to be matched in the dictionary tree, the inquiry content is matched with the regular expression, and when the inquiry content is successfully matched with the regular expression, the second state node is jumped from the first state node according to the matched result. When the configuration mode is the first configuration mode, the matching priority of the inquiry content and the regular expression is lower than the matching priority of the dictionary tree.

[0104] Referring to Figure 6 In some embodiments, step S150 can further include, but is not limited to, steps S610-S620:

[0105] In step S610, the inquiry content is input into the trained intent recognition model when the inquiry content fails to be matched with the regular expression set.

[0106] In step S620, it is determined that the matching result is matched successfully or failed according to the output result of the intent recognition model.

[0107] In some embodiments, when the inquiry content fails to be matched in the dictionary tree, the inquiry content is input into the trained intent recognition model, and it is determined that the matching result is matched successfully or failed according to the output result of the intent recognition model. If the result is matched successfully, the second state node is jumped from the first state node according to the matched result. If the result is matched failed, the matching process is exited, and the user is informed by voice or text that the intent cannot be recognized. When the configuration mode is the first configuration mode, the matching priority of the inquiry content input into the intent recognition model is lower than the matching priority of the regular expression.

[0108] Referring to Figure 7 In another embodiment, in step S120, step S710 can be included, but is not limited to step S710:

[0109] Step S710: When the configuration mode is the second configuration mode, determine the configuration content as a keyword set.

[0110] In step S130, it can include but is not limited to including step S720:

[0111] Step S720, determine the intention jump condition of the first state node according to the keyword set.

[0112] In step S150, it can include but is not limited to including steps S730 to S750:

[0113] Step S730, match the inquiry content with the keyword set;

[0114] Step S740, when the inquiry content contains at least one keyword in the keyword set, determine that the matching result is a success;

[0115] Step S750, when the inquiry content does not contain any keyword in the keyword set, determine that the matching result is a failure.

[0116] In step S710 of some embodiments, the keyword set includes at least one keyword, for example, the keywords such as "weather forecast" and "Beijing" form a keyword set, and the keyword set is taken as the intention jump condition of the first state node. It should be noted that in order to improve the success rate of matching, the task-based robot can interact with the user in the form of question and answer, guide the user to answer or let the user answer in the form of a multiple-choice question. For example, the robot issues a voice instruction: "Please ask for service", "Inquire about the weather of which city" and other guiding questions, so that the possible inquiry content can accurately hit the configured keywords, or directly display several options on the screen, each option has a corresponding label, the user only needs to say the corresponding label, and the skill jumps to the corresponding second state node. The second matching mode is a simple configuration mode, and the configuration process of the intention jump condition is relatively simple, which is suitable for simple intention scenes, the user's statement is less, only a few keywords can be enumerated, the time spent on configuring the intention jump condition is less, and the task-based robot can be quickly configured and put into use in the designated place.

[0117] In step S720 to step S740 of some embodiments, the query content is matched with the keyword set, when the query content has at least one keyword in the keyword set, it is determined that the matching result is matching success, and the state machine jumps from the first state node to the second state node, when the query content does not have any keyword in the keyword set, the output result is matching failure, the matching process is exited, and the user is informed by voice or text that the intent cannot be recognized.

[0118] Please refer to Figure 8 The embodiment of the application further provides an intent jump device, which can implement the above-mentioned intent jump method, and the device comprises:

[0119] The selection module 810 is configured to determine a configuration mode according to a configuration operation instruction input by the user for the preset state machine.

[0120] The determination module 820 is configured to determine configuration content according to the configuration mode.

[0121] The configuration module 830 is configured to determine an intent jump condition of the preset state machine at the first state node according to the configuration content, wherein the intent jump condition is used to indicate a condition that needs to be met for jumping from the first state node to the second state node.

[0122] The receiving module 840 is configured to acquire input query content when it is detected that the preset state machine reaches the first state node.

[0123] The matching module 850 is configured to match the query content with the intent jump condition to obtain a matching result.

[0124] The jump module 860 is configured to jump the state machine from the first state node to the second state node when the matching result indicates matching success.

[0125] The device is configured to select the first state node in the preset state machine by the user, generate a configuration operation instruction, determine a configuration mode selected by the user and configuration content corresponding to the configuration mode by the state machine according to the configuration operation instruction, determine an intent jump condition of the first state node according to the configuration content, acquire the query content of the user when the preset state machine reaches the first state node, and match the query content with the intent jump condition corresponding to the first state node to obtain a matching result, and jump from the first state node to the second state node when the matching result indicates matching success. The scheme of the application enables the task-based robot to select different configuration modes of intent jump in different application scenarios, thereby realizing the intent jump of the state machine from the first state node to the second state node, and improving the application range.

[0126] The determining module 820 is further specifically configured to determine that the configuration content is a user saying set and a regular expression set when the configuration mode is the first configuration mode. Correspondingly, the configuring module 830 is further specifically configured to construct a dictionary tree according to the user saying set, and determine the intent jump condition of the preset state machine at the first state node according to the dictionary tree and the regular expression set.

[0127] The intent jump device 800 provided in the application can further include a training module, which is specifically configured to construct a training sample according to the user saying set, the training sample including a sample corpus and a sample label corresponding to the sample corpus; obtain an intent recognition model, take the sample corpus as an input of the intent recognition model, take the sample label as an expected output of the intent recognition model, train the intent recognition model, and obtain a trained intent recognition model.

[0128] Corresponding to the training module, the configuring module 830 is further specifically configured to determine the intent jump condition of the preset state machine at the first state node according to the dictionary tree, the regular expression set and an intent recognition result output by the trained intent recognition model.

[0129] In the matching module 850, it is specifically configured to match the inquiry content with the dictionary tree, determine that the matching result is a matching success when the inquiry content and the dictionary tree are matched successfully, match the inquiry content with the regular expression set when the inquiry content and the dictionary tree are not matched successfully, determine that the matching result is a matching success when the inquiry content and the regular expression set are matched successfully, input the inquiry content into the trained intent recognition model when the inquiry content and the regular expression set are not matched successfully, and determine the matching result as a matching success or a matching failure according to an output result of the intent recognition model.

[0130] In another embodiment, the determining module 820 is further specifically configured to determine that the configuration content is a keyword set when the configuration mode is the second configuration mode. Correspondingly, the configuring module 830 is further specifically configured to determine the intent jump condition of the first state node according to the keyword set. Correspondingly, the matching module 850 is further specifically configured to match the inquiry content with the keyword set, determine that the matching result is a matching success when the inquiry content includes at least one keyword in the keyword set, and determine that the matching result is a matching failure when the inquiry content does not include any keyword in the keyword set.

[0131] The specific implementation of the device is basically the same as the specific embodiments of the above-mentioned intent jump method, and will not be described here again.

[0132] The embodiment of the present application further provides an electronic device, which comprises a memory, a processor, a program stored in the memory and capable of running on the processor, and a data bus for realizing connection communication between the processor and the memory, and the program is executed by the processor to realize the above-mentioned intent jump method. The electronic device can be any intelligent terminal, such as a tablet computer, a vehicle-mounted computer and the like.

[0133] Please refer to Figure 9 , Figure 9 The hardware structure of the electronic device of another embodiment is shown, and the electronic device comprises:

[0134] The processor 901 can be implemented in the mode of a general-purpose CPU (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit) or one or more integrated circuits, and is used for executing a related program to realize the technical scheme provided by the embodiment of the present application.

[0135] The memory 902 can be implemented in the mode of a ROM (ReadOnly Memory), a static storage device, a dynamic storage device or a RAM (Random Access Memory), and the memory 902 can store an operating system and other application programs. When the technical scheme provided by the embodiment of the present application is realized by software or firmware, the related program code is stored in the memory 902 and is called and executed by the processor 901 to realize the intent jump method of the embodiment of the present application.

[0136] The input / output interface 903 is used for realizing information input and output.

[0137] The communication interface 904 is used for realizing communication interaction between the device and other devices, and the communication can be realized in the wired mode (for example, a USB, a network cable and the like) or in the wireless mode (for example, a mobile network, WIFI, Bluetooth and the like).

[0138] The bus 905 is used for transmitting information between various components (for example, the processor 901, the memory 902, the input / output interface 903 and the communication interface 904) of the device.

[0139] The processor 901, the memory 902, the input / output interface 903 and the communication interface 904 realize communication connection between each other in the device through the bus 905.

[0140] The embodiment of the present application also provides a storage medium, which is a computer readable storage medium, used for computer readable storage, and stores one or more programs, which can be executed by one or more processors to implement the above-mentioned intent jump method.

[0141] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged with respect to the processor, and these remote memories can be connected to the processor through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0142] The intent jump method and device, electronic equipment and storage medium provided by the embodiment of the present application, by the user selecting a first state node in the preset state machine, and generating a configuration operation instruction, the state machine determining a configuration mode selected by the user and configuration content corresponding to the configuration mode according to the configuration operation instruction, determining an intent jump condition of the first state node according to the configuration content, and the intent jump condition is used to indicate a condition that needs to be met for jumping from the first state node to a second state node, when the preset state machine reaches the first state node, obtaining inquiry content of the user, and matching the inquiry content with the intent jump condition corresponding to the first state node to obtain a matching result, when the matching result indicates that the matching is successful, jumping from the first state node to the second state node. The scheme of the present application makes the task type robot select different intent jump configuration modes in different application scenarios, and the present application discloses two configuration modes, in a complex first configuration mode, the intent jump condition of the first state node is determined by a dictionary tree, a regular expression set and an intent recognition model, in a simple second configuration mode, the intent jump condition of the first state node is determined by a keyword set, thereby realizing the intent jump of the state machine from the first state node to the second state node, and selecting a suitable configuration mode for the first state node in different application occasions, thereby improving the application range.

[0143] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical scheme of the embodiments of the present application, and do not constitute a limitation on the technical scheme provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical scheme provided by the embodiments of the present application is also applicable to similar technical problems.

[0144] Those skilled in the art can understand that, Figures 1-7The technical solutions shown in the above figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than those shown, or combine certain steps, or different steps.

[0145] The apparatus embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.

[0146] Those skilled in the art can understand that all or some of the steps in the above disclosed method, the function modules / units in the system and the device can be implemented as software, firmware, hardware and their appropriate combinations.

[0147] The terms "first", "second", "third", "fourth" and the like (if any) in the description and the above drawings of the present application are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0148] It should be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "And / or" is used to describe the association between the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that there are three cases of only A, only B and A and B at the same time, where A and B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "At least one of the following" or the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can mean a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b and c can be single or multiple.

[0149] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the above units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.

[0150] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0151] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.

[0152] When the integrated unit is realized in the form of software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that makes a contribution to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes multiple instructions used to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program storage media.

[0153] The preferred embodiments of the embodiments of the present application are described above with reference to the accompanying drawings, but this does not limit the scope of the embodiments of the present application. Any modification, equivalent replacement and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the embodiments of the present application.

Claims

1. An intent jump method, characterized by, The method comprises: determining a configuration mode according to a configuration operation instruction input by a user for a preset state machine; determining configuration content according to the configuration mode; determining an intended jump condition of the preset state machine at a first state node according to the configuration content, wherein the intended jump condition is used to indicate a condition that needs to be met for jumping from the first state node to a second state node; obtaining input inquiry content when it is detected that the preset state machine reaches the first state node; matching the inquiry content with the intended jump condition to obtain a matching result; when the matching result indicates a matching success, the state machine jumps from the first state node to the second state node; wherein the determining of the configuration content according to the configuration mode comprises: when the configuration mode is a first configuration mode, determining the configuration content as a user saying set and a regular expression set; the determining of the intended jump condition of the preset state machine at the first state node according to the configuration content comprises: constructing a dictionary tree according to the user saying set; determining the intended jump condition of the preset state machine at the first state node according to the dictionary tree and the regular expression set; when the configuration mode is a second configuration mode, determining the configuration content as a keyword set; the determining of the intended jump condition of the first state node according to the configuration content comprises: determining the intended jump condition of the first state node according to the keyword set; the matching of the inquiry content with the intended jump condition to obtain a matching result comprises: matching the inquiry content with the keyword set; when the inquiry content contains at least one keyword in the keyword set, determining that the matching result is a matching success; when the inquiry content does not contain any keyword in the keyword set, determining that the matching result is a matching failure.

2. The intent jump method of claim 1, wherein, after the determining of the configuration content according to the configuration mode and before the determining of the intended jump condition of the preset state machine at the first state node according to the configuration content, the method further comprises: constructing a training sample according to the user saying set, the training sample comprising a sample corpus and a sample label corresponding to the sample corpus; obtaining an intent recognition model, taking the sample corpus as an input of the intent recognition model, taking the sample label as an expected output of the intent recognition model, training the intent recognition model to obtain a trained intent recognition model; the determining of the intended jump condition of the preset state machine at the first state node according to the dictionary tree and the regular expression set comprises: determining the intended jump condition of the preset state machine at the first state node according to the dictionary tree, the regular expression set and an intent recognition result output by the trained intent recognition model.

3. The intent jump method of claim 2, wherein, the matching of the inquiry content with the intended jump condition to obtain a matching result comprises: matching the inquiry content with the dictionary tree, and when the inquiry content matches the dictionary tree successfully, determining that the matching result is a matching success.

4. The intent jump method of claim 3, wherein, After the matching the inquiry content with the dictionary tree, the method further comprises: matching the inquiry content with the regular expression set when the matching the inquiry content with the dictionary tree fails; determining the matching result as matching success when the matching the inquiry content with the regular expression set succeeds.

5. The intent jump method of claim 4, wherein, After the matching the inquiry content with the regular expression set, the method further comprises: inputting the inquiry content into the trained intent recognition model when the matching the inquiry content with the regular expression set fails; determining the matching result as matching success or matching failure according to the output result of the intent recognition model.

6. An intent jump apparatus, characterized by, The device comprises: a selection module configured to determine a configuration mode according to a configuration operation instruction input by a user for a preset state machine; a determination module configured to determine configuration content according to the configuration mode; a configuration module configured to determine an intent jump condition of the preset state machine at a first state node according to the configuration content, wherein the intent jump condition is used to indicate a condition that needs to be met for jumping from the first state node to a second state node; a receiving module configured to acquire input inquiry content when detecting that the preset state machine reaches the first state node; a matching module configured to match the inquiry content with the intent jump condition to obtain a matching result; a jump module configured to jump the state machine from the first state node to the second state node when the matching result indicates matching success; The determination module is specifically configured to: determine the configuration content as a user saying set and a regular expression set when the configuration mode is a first configuration mode; The determination of the intent jump condition of the preset state machine at the first state node according to the configuration content comprises: constructing a dictionary tree according to the user saying set; determining the intent jump condition of the preset state machine at the first state node according to the dictionary tree and the regular expression set; determine the configuration content as a keyword set when the configuration mode is a second configuration mode; The determination of the intent jump condition of the first state node according to the configuration content comprises: determining the intent jump condition of the first state node according to the keyword set; The matching of the inquiry content with the intent jump condition to obtain a matching result comprises: matching the inquiry content with the keyword set; determining the matching result as matching success when the inquiry content contains at least one keyword in the keyword set; determining the matching result as matching failure when the inquiry content does not contain any keyword in the keyword set.

7. An electronic device, comprising: The electronic device comprises a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing connection communication between the processor and the memory, and the program is executed by the processor to realize the steps of the method according to any one of claims 1 to 5.

8. A storage medium, the storage medium being a computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement steps of the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Device and method for controlling multiple function of communication apparatus by related parallel state machine

    CN101309254A

  • Intention node skipping method and device and skipping equipment

    CN111488447A