CN115576435B - Intention processing method and related device - Google Patents

Intention processing method and related device Download PDF

Info

Publication number
CN115576435B
CN115576435B CN202211589536.2A CN202211589536A CN115576435B CN 115576435 B CN115576435 B CN 115576435B CN 202211589536 A CN202211589536 A CN 202211589536A CN 115576435 B CN115576435 B CN 115576435B
Authority
CN
China
Prior art keywords
intention
target
entity
intent
input information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211589536.2A
Other languages
Chinese (zh)
Other versions
CN115576435A (en
Inventor
杨强
韦武杰
龙方舟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Renma Interactive Technology Co Ltd
Original Assignee
Shenzhen Renma Interactive Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Renma Interactive Technology Co Ltd filed Critical Shenzhen Renma Interactive Technology Co Ltd
Priority to CN202211589536.2A priority Critical patent/CN115576435B/en
Publication of CN115576435A publication Critical patent/CN115576435A/en
Application granted granted Critical
Publication of CN115576435B publication Critical patent/CN115576435B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Abstract

The embodiment of the application discloses an intention processing method and a related device, wherein the method comprises the following steps: receiving input information of a user in a dialogue unit, and performing semantic understanding on the input information to obtain a semantic understanding result; filling each entity into a form item to obtain a target form according to a semantic understanding result; determining a target intention set corresponding to the target form according to the intention rule; adding a target service corresponding to each target intention in the target intention set into a service queue to be activated according to a preset rule; and sequentially activating the target service robots to process the target services according to the service queues to be activated. Therefore, the target intention is obtained by directly performing semantic understanding on the input information, the mapping relation between the input information and the target intention is decoupled, the target intention contained in the input information of the user is more normalized, and the maintenance and iteration of the mapping relation are more convenient.

Description

Intention processing method and related device
Technical Field
The present application relates to the technical field of industrial general data processing, and in particular, to an intent processing method and related apparatus.
Background
With the development of science and technology, man-machine interaction systems, such as: a question-answering robot is applied to various fields in daily life. The user can input information according to requirements, including: the man-machine conversation system analyzes and processes the input information by data and realizes man-machine conversation according to the analysis result to complete service processing. Most of the existing methods convert the input information of the user into query statements, and then feed back the query statements to the user as answers according to query results in a database. However, since the input information of the user is random and the requirements of different users and the requirement fields are different, the answer query is directly performed according to the input information of the user, so that the accuracy is poor, the efficiency is low, and the requirements of the user cannot be well met.
Therefore, an intent processing method is needed to solve the above problems.
Disclosure of Invention
The embodiment of the application provides an intention processing method and a related device, which can be used for obtaining a target form after input information is subjected to normalized processing according to a form item, determining at least one target intention contained in the target form according to an intention rule, sequencing the at least one target intention according to a processing rule, adding target services corresponding to the at least one target intention into a service queue to be activated in sequence, and performing service processing according to the service queue to be activated by a target service robot.
In a first aspect, an embodiment of the present application provides an intention processing method applied to a human-computer dialog system, where the human-computer dialog system includes at least one dialog unit, and the method includes:
receiving input information of a user in the at least one dialogue unit, and performing data processing on the input information to obtain a processing result, wherein the form of the input information comprises voice input and text input, the data processing is used for converting the input information into information in a text representation form, and the target form comprises at least one form item and the word corresponding to each form item in the at least one form item;
performing semantic understanding on a processing result to obtain a semantic understanding result, and filling words in the input information into form items corresponding to the words according to the semantic understanding result to obtain a target form, wherein the semantic understanding result comprises at least one entity and information of each entity in the at least one entity, each entity refers to concepts, words or phrases contained in the input information, the information comprises attribute information of each entity, the attribute information comprises types and meanings of the entities, and the target form is used for structurally representing the attribute information of each entity;
determining at least one target intention according to an intention rule and the target form to obtain a target intention set, wherein the intention rule is used for indicating an incidence relation between the form items and/or the entities in the target form to obtain an intention triple, and the intention triple comprises a first entity, a second entity and the incidence relation between the first entity and the second entity;
determining a processing rule of each target intention in the target intention set according to a preset rule, wherein the processing rule is used for determining the processing priority of each target intention;
and adding the target service corresponding to each target intention into a service queue to be activated according to the processing rule, and sequentially activating the target service robot to process the target service according to the service queue to be activated.
In a second aspect, an intention processing apparatus is provided in an embodiment of the present application, and is applied to a server, and the apparatus includes a receiving unit, a processing unit, a determining unit, and an activating unit: wherein the content of the first and second substances,
the receiving unit is used for receiving input information of a user in the at least one dialogue unit and carrying out data processing on the input information to obtain a processing result, wherein the input information comprises voice input and text input, and the data processing is used for converting the input information into information in a text representation form;
the processing unit is configured to perform semantic understanding on a processing result, obtain a semantic understanding result, and fill a term in the input information into a form item corresponding to the term according to the semantic understanding result to obtain a target form, where the semantic understanding result includes at least one entity and information of each entity in the at least one entity, where each entity refers to a concept, a term, or a phrase included in the input information, the information includes attribute information of each entity, the attribute information includes a type and a meaning of each entity, the target form is used for structurally characterizing the attribute information of each entity, and the target form includes at least one form item and the term corresponding to each form item in the at least one form item;
the processing unit is further configured to determine at least one target intent according to an intent rule and the target form, so as to obtain a target intent set, where the intent rule is used to indicate an association relationship between the form items and/or the entities in the target form, so as to obtain an intent triple, where the intent triple includes a first entity, a second entity, and the association relationship between the first entity and the second entity;
the determining unit is used for determining a processing rule of each target intention in the target intention set according to a preset rule, wherein the processing rule is used for determining the processing priority of each target intention;
and the activation unit is used for adding the target service corresponding to each target intention into a service queue to be activated according to the processing rule, and sequentially activating the target service robot to process the target service according to the service queue to be activated.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method of the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods of the first aspect of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that in the embodiment of the application, the semantic understanding result is obtained by receiving the input information of the user in the dialogue unit and performing semantic understanding on the input information; filling each entity into a form item to obtain a target form according to a semantic understanding result; determining a target intention set corresponding to the target form according to the intention rule; adding the target service corresponding to each target intention in the target intention set into a service queue to be activated according to a preset rule; and sequentially activating the target service robots to process the target services according to the service queues to be activated. Therefore, the input information of the user is normalized according to the form item and the intention rule and then is sent to the target service robot for service processing, and the accuracy and the efficiency of the service processing are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of an intent processing method provided in an embodiment of the present application;
FIG. 2A is an input information interface diagram for intent recognition provided by an embodiment of the present application;
FIG. 2B is a schematic diagram of an interface for a user to input information prompt content according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart diagram of another intent processing provided by embodiments of the present application;
fig. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a functional unit of an intent processing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
For better understanding of the aspects of the embodiments of the present application, the following description is provided to describe electronic devices, related terms, concepts and related backgrounds to which the embodiments of the present application may be applied.
The electronic device may be a portable electronic device such as a cell phone, a tablet, a wearable electronic device with wireless communication capabilities (e.g., a smart watch), etc., that also contains other functions such as personal digital assistant and/or music player functions. Exemplary embodiments of the portable electronic device include, but are not limited to, portable electronic devices that carry an IOS system, an Android system, a Microsoft system, or other operating system. The portable electronic device may also be other portable electronic devices such as a Laptop computer (Laptop) or the like. It should also be understood that in other embodiments, the electronic device may not be a portable electronic device, but may be a desktop computer. The electronic device may include an electronic device for intention processing in the embodiment of the present application.
Knowledge graph (knowledgegraph), which is a structured semantic knowledge base, describes different concepts and relationships between concepts in the form of symbols. The basic composition units are characterized in the form of entity-relation-entity triples, wherein the relations between entities are characterized in the form of key-value pairs, and are connected with each other through the relations, so that a network knowledge structure is finally formed, and is usually presented in the form of a graph. Specifically, the nodes in the graph represent entities, and the semantic relationships between the nodes constitute edges in the graph, i.e., connecting lines between the nodes.
However, in a real application scenario, how a human-computer conversation system accurately identifies an intention in information input by a user, and queries a corresponding result according to the intention, and feeds the result back to the user to realize effective human-computer conversation is a main problem currently faced.
In order to solve the above problems, the present application provides an intention processing method, which obtains a normalized content of user input information by performing semantic understanding on the input information of a user and inputting a result of the semantic understanding into a form item, further performs intention identification on the normalized content according to intention rules, establishes an association relationship between a user target intention and a target service robot, processes a service corresponding to the target intention by the target service robot, and feeds back a processing result to a client. Finally, the efficiency and the accuracy of user intention processing are guaranteed, and lower delay, higher efficiency and better user experience are provided.
The present application will be described in detail with reference to specific examples.
Referring to fig. 1, fig. 1 is a schematic flowchart of an intent processing method, which is applied to a human-computer interaction system including at least one interaction unit according to an embodiment of the present disclosure, and as shown in fig. 1, the intent processing method specifically includes the following steps:
s101, receiving input information of a user in the at least one dialogue unit, and performing data processing on the input information to obtain a processing result.
The form of the input information comprises voice input and text input, and the data processing is used for converting the input information into information in a text representation form.
Preferably, the processing result is in text form.
Illustratively, the human-machine dialog system includes at least one dialog unit, each for receiving input information submitted by a user. The system detects whether input information submitted by a user appears in a dialogue unit in real time, wherein the types of the input information include but are not limited to: text information and voice information, etc. Fields of input information include, but are not limited to: airline ticket inquiries, train information inquiries, restaurant inquiries, weather inquiries, and the like.
The system may further receive input information submitted by the user at the local electronic device by establishing a communication connection with the electronic device used by the user. Alternatively, the system provides a visualization system interface at which the user submits input information. It should be noted that the manner in which the system receives the input information submitted by the user may be other manners, which are not described herein.
For easy understanding, please refer to a diagram of an interface for inputting information provided in the embodiment of the present application illustrated in fig. 2A. As shown in the interface of fig. 2A, a user inputs query information in an input box, where the input mode includes: and performing voice input by clicking a microphone represented by a middle circle of the electronic equipment, or performing character input by using a virtual keyboard at the lower left corner of the electronic equipment. For example: the electronic equipment can receive the ' help me check the flight from A to B on Tuesday ' input by the user ' through the microphone, converts the flight into a text form through voice information, and displays the query sentence (namely the input information in the application) of the user on the interface; or directly displaying a text query sentence 'help me check the flight from A to B on the Tuesday' input by the user through the virtual keyboard on the display interface.
In a possible example, in the solution of the present application, the system may further provide prompt information for the user through a display interface of the electronic device, and provide a plurality of selectable fields and input modes for referring to the input information on the display interface. Specifically, referring to fig. 2B, fig. 2B is a schematic diagram of an interface for a user to input information prompt content according to an embodiment of the present disclosure.
As shown in fig. 2B, the system responds to the "question mark" icon in the lower right corner of the display interface of the electronic device by the user to provide the user with several possible input information input forms that are selectable to be the question and answer field and correspond to the question and answer field. Specifically including but not limited to one or more of the following: the travel field comprises (air ticket, train ticket, taxi taking and the like), the life field comprises (scenic spot, food, movie ticket and the like), and the entertainment field comprises (interactive novel, music, photo and the like); and feasible input information corresponding to different intentions in each field, taking an air ticket as an example, the input information template provided for the user includes but is not limited to: "i want to order airline tickets", "help me order airline tickets to a on the day", and so on. Therefore, the selectable fields and the corresponding reference templates of the input information are provided for the user, so that the user can be helped to find the target intention of the user and the corresponding target information more quickly. The method is more beneficial to the system to quickly determine the target intention contained in the user input information and improve the processing efficiency and accuracy of the target intention.
In a possible example, after receiving input information of a user, the system first identifies the type of the input information of the user, and exemplarily, if the current input information is determined to be picture information, key information extraction is performed on the picture information through a deep learning model for picture processing, and key information contained in the picture is determined to form text information.
For example, if it is determined that the type of the current input information is voice information, the system performs data conversion on the voice information through a voice recognition model to obtain text content contained in the voice information, and forms text information.
It should be noted that, the purpose of the above-mentioned data processing and format conversion process is to convert the received input information of different types into text information that is easier to recognize and process, so that the accuracy of user intention recognition can be ensured, and the implementation manner can be adapted according to the actual application scenario, which is not limited herein.
S102, performing semantic understanding on the processing result to obtain a semantic understanding result, and filling the words in the input information into form items corresponding to the words according to the semantic understanding result to obtain a target form.
Wherein the target form includes at least one form item and the term corresponding to each of the at least one form item.
Exemplarily, the semantic understanding of the processing result of step S101 includes performing word segmentation, part of speech analysis, syntax analysis, and the like on the text information, so as to obtain the meaning and the attribute of the word in the input information, and fill the meaning and the attribute into the corresponding form item.
Illustratively, if the system receives user input information: help me to check the airline tickets from a to B on tuesday.
Specifically, the system performs word segmentation processing on the input information to obtain 'help/me/search/tuesday/from/a/to/B/airplane ticket'. Further, performing part-of-speech analysis on the input information after word segmentation to obtain part-of-speech information of each word or phrase in the input information, wherein the part-of-speech includes but is not limited to: names, prepositions, adjectives, and the like. Here, one possible result obtained by performing part-of-speech analysis on the input information after the word segmentation is as follows: "verb [ verb ]/me/look up [ verb ]/Tuesday [ time phrase ]/structure aid/airline ticket [ noun ] from [ preposition ]/A [ place name ]/to [ verb ]/B [ place name ]/are. And finally, performing syntactic analysis on the input information after the part of speech tagging. Among them, syntactic analysis includes but is not limited to: syntax structure analysis (syntax structure parsing) for identifying phrase structures in sentences and hierarchical syntax relations between phrases; dependency parsing (dependency parsing), which is called dependency parsing for short, and is used for recognizing the interdependence relationship between words and phrases in a sentence; deep grammar parsing, i.e. using deep grammars, for example: examples of the semantic analysis include Lexical Tree Adjacency Grammar (LTAG), lexical Functional Grammar (LFG), and Combinatorial Category Grammar (CCG), which are used to perform deep syntax and semantic analysis on a sentence.
Furthermore, the attribute of the word and the meaning of the word are determined through the word relation obtained by word segmentation, part of speech analysis and syntactic analysis. And filling the words into the form items corresponding to the words to obtain the target form. Such as: the input information "help me check the airplane tickets from a to B on monday", and the final form item with contents can be:
querying class verbs: checking;
the starting place: a;
destination: b;
departure time: tuesday;
ticket: an airline ticket.
The resulting target form may be:
querying class verbs: checking;
location-class nouns: A. b;
time class nouns: tuesday;
the noun: an airline ticket.
In one possible example, a human-machine dialog system comprises a first human-machine dialog robot and at least one second human-machine dialog robot. The first human-computer conversation robot is used for determining a target second human-computer conversation robot and establishing communication connection with the target second human-computer conversation robot, and the second human-computer conversation robot is used for processing input information.
Each of the at least one second human-machine interaction robot may be configured to process different services and input information corresponding to the services, respectively. In practical application scenarios, for example: the second human-machine conversation robot may include a robot that processes an airline ticket service, a robot that processes a navigation service, a robot that processes a take-out service, and the like.
Illustratively, a form is preset in the first human-machine conversation robot, and the form comprises a plurality of form items. The form items can be used for representing attribute information of the words, and the combination result of the form items can form association and/or corresponding relation with any second man-machine conversation robot.
Illustratively, the form items in the form of the first human-computer conversation robot can be preset by a manager, and the form items are adaptively adjusted according to the increase and decrease modification conditions of the second human-computer conversation robot. And in the actual operation and application process of the system, the form item can be adjusted according to the data generated in the actual use process. The initialized form project framework is preset, and the form project is adjusted and modified according to data accumulation and result feedback in the using process so as to continuously perfect the form and form a more accurate correspondence between the form project and the second man-machine conversation robot. Illustratively, form items include, but are not limited to: travel mode, departure place, destination, departure time, store name, dish name, etc.
Illustratively, a form is preset in the first human-machine conversation robot, and the form comprises a plurality of form items. The form items can be used for representing attribute information of the words, and the combination result of the form items can form association and/or corresponding relation with any second man-machine conversation robot. Through word segmentation and part-of-speech analysis, the meaning of the words and the range of the reduced meaning are determined by combining a dictionary, and then the corresponding meaning and the attribute of the words in the sentence are determined by combining syntactic analysis (the sequence of the words and the relation among the words) and further reducing according to the application of the words, so that the corresponding form item is found.
Illustratively, form items in the form of the first human-computer conversation robot can be preset by a manager, and the form items are adaptively adjusted according to the increase and decrease modification conditions of the second human-computer conversation robot. And in the actual operation and application process of the system, the form item can be adjusted according to the data generated in the actual use process. The initialized form project framework is preset, and the form project is adjusted and modified according to data accumulation and result feedback in the using process so as to continuously perfect the form and form a more accurate correspondence between the form project and the second man-machine conversation robot.
Illustratively, form items include, but are not limited to: travel mode, departure place, destination, departure time, store name, dish name, and the like.
S103, determining at least one target intention according to the intention rule and the target form to obtain a target intention set.
Illustratively, the man-machine dialog system is preset with intention rules, and the intention rules are used for establishing a mapping relation between form items and target intentions. The intention rules and the form items can be in any corresponding relationship, and preferably, each form item corresponds to the intention rules one by one.
Illustratively, the target intent is obtained from the intent rules and the form items. One possible method includes: the method for obtaining the intention by means of the intention triple comprises a first entity, a second entity and the incidence relation between the first entity and the second entity, and is represented as (entity 1, entity relation, entity 2).
Specifically, form items are entities in intent triples and combinations of intent rules are relationships in intent triples. It is understood that when the form items correspond to one intention rule, a first form item (e.g., a departure place) corresponds to a first intention rule, a second form item (e.g., a destination) corresponds to a second intention rule, and a combination of the first intention rule and the second intention rule forms an entity relationship (from the departure place to the destination) between the first form item (e.g., the departure place) and the second form item (e.g., the destination), and the second intention rule may form an intention about the travel interval according to the first form item (e.g., the departure place), the second form item (e.g., the destination), and the first intention rule. The intention about the trip interval can be correspondingly applied to various services such as navigation service, taxi taking service, trip service and the like.
Illustratively, a third form item (e.g., a query class verb) corresponds to a third intent rule, a fourth form item (e.g., a ticket) corresponds to a fourth intent rule, and a combination of the third intent rule and the fourth intent rule constitutes an entity relationship (a guest relationship or a ticketing relationship) between the third form item (e.g., a query class verb) and the fourth form item (e.g., a ticket), and an intent regarding ticket checking can be constructed according to the third form item (e.g., a query class verb), the fourth form item (e.g., a ticket), the third intent rule, and the fourth intent rule. The intention about ticket checking can be correspondingly applied to ticket checking business, movie ticket checking business, airplane ticket checking business and the like.
And S104, determining a processing rule of each target intention in the target intention set according to a preset rule.
Wherein the processing rule is used to determine a processing priority for the each target intent.
Specifically, the target intent includes two dimensions of intent: a business dimension and an intention type dimension, wherein the business dimension is used for specifically characterizing a business field corresponding to the target intention, for example: ticketing, takeaway, travel, etc., while the intent type dimension quantifies the tendency of the target intent, such as: positive, negative, and ambiguous, among others.
Furthermore, the man-machine conversation system realizes processing priority sequencing of each target intention in the target intention set by setting a preset rule. One possible preset rule is: the priority order is first set according to the intent type dimension, for example: positive intention > negative intention > fuzzy intention. Furthermore, after the target intents in the target intention set are sorted according to the priority order, the target intents of the service dimensions of the corresponding types also sequentially obtain corresponding sorting results.
Illustratively, if the input information is: the user can buy the airline ticket of the A, and the intention analysis is carried out on the input information according to the processing flow of the steps S101-S103, so that the target intentions of two independent dimensions can be determined: the business dimension is the airline ticket intent and the type dimension is the positive intent. For this sentence, the airline ticket intention and the affirmative intention correspond to each other. The target intents are sorted by type dimension, and the business intents are sorted adaptively.
And S105, adding the target service corresponding to each target intention into a service queue to be activated according to the processing rule, and sequentially activating the target service robot to process the target service according to the service queue to be activated.
Specifically, the target service robot is sequentially activated according to the identification information in the service queue to be activated to process the target service corresponding to the target intention, the query result corresponding to the target service is queried in the database according to the target service, and the query result is fed back to the user.
It can be seen that, by the method provided by the embodiment of the present application, the form items are filled with the input information, the form items are used as entities of triples, the mapping relationship between the form items and the intention is established according to the intention rules, the intention is obtained according to the form items and the intention rules, and because the input with strong randomness is normalized according to the semantic understanding condition, the form items are clearly set, and have normalization and centralization, the maintenance of the mapping relationship is more convenient, and the method is helpful for establishing the stable and iterative intention rules, so as to more accurately determine the second human-computer interaction robot capable of processing the input information. The intention is obtained by directly carrying out semantic understanding on the input information, the mapping relation between the input information and the intention is decoupled, and the situation that when the second man-machine conversation robot is directly determined according to words of the input information, the input is sent to the second man-machine conversation robot unmatched with the input information processing due to inaccuracy of word understanding or ambiguity of word meaning is avoided. The intention is not obtained directly according to the original input information, and the maintenance and the iteration of the mapping relation are more convenient.
In one possible example, the semantic understanding is performed on the processing result to obtain a semantic understanding result, and words in the input information are filled into form items corresponding to the words according to the semantic understanding result, and the method includes the following specific steps: performing word segmentation on the processing result to obtain first data; performing part-of-speech analysis on the first data to obtain second data, wherein the part-of-speech analysis is used for performing tag marking on each entity in the at least one entity, and the tag marking is used for indicating the attribute information of each entity; performing syntactic analysis on the second data according to the attribute information to obtain the dependency relationship among the entities; obtaining the semantic understanding result according to the attribute information and the dependency relationship; according to the semantic understanding result, clustering the at least one entity to obtain at least one item, wherein each item in the at least one item comprises one or more entities; and filling each item and one or more entities corresponding to each item into the form items to obtain a target form.
In practical applications, the input information of the user received by the system is often biased towards liveness and colloquization, and if the target intention determination and the business processing are directly performed on the input information, the accuracy and the efficiency are low. Therefore, after receiving the input information, firstly performing semantic understanding on the input information, which specifically includes: the processing data is subjected to word segmentation processing, and the process is used for carrying out sentence component division on the input information so as to more accurately carry out part-of-speech analysis and syntactic analysis on words or phrases contained in the input information. The specific execution process may refer to the content described in step S101, and is not described herein again.
To better understand the process of step S101, the following description of the semantic understanding process will be made by taking the input information as "help me buy train tickets, but not buy train tickets". Firstly, performing word segmentation processing on input information to obtain first data: "help/me/buy/train ticket/,/not/buy/train ticket/time".
Further, performing part-of-speech analysis on the first data to obtain second data: "[ 1/help/preposition/P ]/[ 2/visitor me/person name/NR ]/[ 3/buy verb/VV ]/[ 4/train ticket/noun/NN ]/[5/,/punctuation/PU ]/[ 6/buy/adverb/AD ] [ 7/train ticket/noun/NN ]/[ 8/word/SP ].
Further, performing syntactic analysis on the part-of-speech labeled second data to obtain the dependency relationship between the entities, wherein the semantic understanding result includes a syntactic analysis dependency relationship analysis result in the input information.
The meaning and the range of the meaning are determined by word segmentation and part of speech analysis in combination with a dictionary, and the corresponding meaning and the attribute of the word in the sentence are determined by further reducing the word according to the application of the word in combination with syntactic analysis (the sequence of the word and the relation between the words). Thereby finding the corresponding form item.
Illustratively, a form item includes one or more items, each of which may correspond to one or more entities or values of entities. Therefore, before filling the form item, clustering the entities according to the attribute information and the dependency relationship of the entities in the semantic understanding result to obtain at least one item, and each item has one or more entities corresponding to the item. For example: inputting 'checking plane tickets from A to B, calculating or checking high-speed railway tickets from B to C', after clustering processing is carried out according to semantic understanding results, the determined form items and the possible results of the entities corresponding to the form items are as follows:
the departure place includes two: A. b;
the destination includes two: B. c;
the ticket types are two: airline tickets, high-speed rail tickets;
intention identification: a negative identification.
Further, after the form item and the corresponding entity or entity value are filled into the form item, the obtained target form is as shown in table 1 below:
TABLE 1
Departure place Destination Type of ticket Intention identification
A B B C Air ticket high-speed railway ticket Negative identification
Therefore, in the example, the system can embody the entity information contained in the input information in a normalized manner, and further improve the accuracy and efficiency of determining the target intention.
As can be seen, in this example, through the semantic understanding process of the processed input information, the data in the non-standard expression is converted into the normalized expression that is easier for the machine to recognize and process, and then the form item and the corresponding entity or the value of the entity are determined according to the semantic understanding result, and then the form item and the corresponding entity or the value of the entity are filled into the form item to obtain the target form structurally representing the input information. Therefore, the relationship between the attribute information corresponding to the entity in the input information and the entity can be more accurately determined through the semantic understanding process, the entity information contained in the input information can be embodied in a standardized manner through establishing the target form, the accuracy and the efficiency of determining the target intention are improved, and the efficiency and the accuracy of business processing are further ensured.
In one possible example, the determining at least one target intention according to the intention rule and the target form to obtain a target intention set includes: judging whether an entity relationship exists between any two form items in the at least one form item; if the form items exist, performing a combination operation according to the intention rules respectively corresponding to the two form items with the entity relationship to obtain at least one target intention, wherein the combination operation is used for determining the intention triple for representing the target intention according to the entities respectively corresponding to the two form items; if the form items do not exist, judging whether an association relationship exists between the intention rules corresponding to each form item; if the incidence relation exists, performing the combination operation according to the two form items with the incidence relation to obtain at least one target intention; determining the target intention set according to at least one target intention.
Specifically, when an entity relationship exists between two form items, the intention rules corresponding to the two form items can be spliced into the entity relationship to obtain corresponding intention triples, and then the target intention is obtained according to the intention triples.
Illustratively, if there is no entity relationship between the form items (e.g., there is no entity relationship between the purchase verb and the origin), it indicates that the intent rules corresponding to the two form items cannot be pieced together to form an entity relationship. But the intention rule can also be used as a participation factor of other association relations, and the other association relations (such as the association relation between the intentions) are spliced with other several intention rules.
Illustratively, if the first intention rule, the second intention rule, the third intention rule and the fourth intention rule have a preset association relationship, that is, according to a combination of the first intention rule, the second intention rule, the third intention rule and the fourth intention rule, the intention about the travel section and the intention about ticket checking may also be concatenated to form an intention (i.e., an intersection of the attention map ranges) of inquiring the ticket of a specific travel section. Therefore, taxi taking service corresponding to the intentions of the travel section and movie ticket checking service corresponding to the intentions of ticket checking can be eliminated, and further the following effects are achieved: the more concrete the target intention is, the more definition is, and after finding the intersection, the clearer the service is.
It should be noted that the intention rule may be preset by a manager, and in the actual operation and application process of the system, the intention rule may be adjusted according to data generated in the actual use process. The method is characterized in that an initialized form project framework is preset, and the intention rule is adjusted and modified according to data accumulation and result feedback in the using process so as to continuously and iteratively improve the intention rule.
Further, the human-machine dialog system combines the values of the form items to obtain the intent. The intent triples are also represented as (entity, attribute value), the form items are entities, and the attribute values are values of the form items. For example: according to form items such as a query verb, a departure place, a destination, departure time, ticket types and the like and corresponding intention rules thereof, the user can obtain the intention of querying the travel ticket business, but the specific travel mode of the user cannot be clarified, and the intention of querying the air ticket can be clarified through (an entity: the ticket, an attribute: the type, an attribute value: the air ticket).
Specifically, the target intentions determined according to one or more intention triples may include: a business intent and an intent type. The service intention is used for characterizing a service type corresponding to the target intention, and includes but is not limited to: ticket buying service, travel service, route query service, and the like; types of intent include, but are not limited to: positive, negative, ambiguous, and special intent. The determined business intention and the corresponding intention type can more accurately determine the problem actually to be solved in the input information of the user, thereby improving the accuracy of business processing.
Specifically, entity relationships are typically derived from syntactic analysis, summarized by the word relationships obtained from the syntactic analysis (entity 1, relationship, entity 2). After the dictionary is analyzed by modeling, triples (entities, attributes, attribute values) can be obtained. Triplets are the basic units of the knowledge graph. Namely, the system performs model training according to historical service processing data stored in the database to obtain at least one pre-trained knowledge graph. In at least one knowledge graph, each knowledge graph corresponds to entities in different business fields and the incidence relation among the entities.
Therefore, by the method and the device, the plurality of target intentions can be obtained by determining whether entity relations exist among form items or whether incidence relations exist among intention rules, the to-be-solved business contained in the user input information can be more accurately obtained through the plurality of target intentions, more accurate customer service and answer feedback are provided, and the accuracy of business processing and the user experience are improved.
In one possible example, the determining at least one target intent according to the intent rules and the target form may include the steps of: obtaining at least one entity with content from the target form, wherein the at least one entity with content comprises at least one first entity and at least one second entity; determining the first entity and the second entity which have the incidence relation in the at least one entity with content according to the intention rule, and obtaining one or more intention triples; if the intention triple is one, determining the target intention corresponding to the intention triple; if the intention triples comprise two or more intention triples, judging whether the intention triples have a combination relation or not; if the intention triples are determined to have the combination relationship, respectively determining a first target intention set corresponding to each intention triple in the intention triples, and determining a second target intention set according to the combination relationship; determining the target intention set according to the first target intention set and the second target intention set; if the intention triples are determined not to have the combination relationship, the target intention corresponding to each intention triple in the intention triples is respectively determined, and the target intention set is obtained.
Illustratively, taking the target form shown in table 1 above as an example, the possible results of the intent triples determined according to the intent rules and the target form are:
intention triple 1: (relationship: travel relationship, entity 1: origin, entity 2: destination);
intent triplet 2: (relationship: travel relationship, entity 1: origin, entity 2;
intent triplets 3: (relationship: travel relationship, entity 1: destination, entity 2;
intent triplets 4: (relationship: details of ticket, entity 1: type of ticket, entity 2: airline ticket);
intent triplet 5: (relationship: details of ticket, entity 1: type of ticket, entity 2: high-speed railway ticket);
intent triplets 6: (relationship: buy ticket, entity 1: airline ticket, entity 2: negative identification);
intent triplets 7: (relationship: buy ticket, entity 1: high-speed railway ticket, entity 2: positive identification).
Further, respectively determining a target intention corresponding to each three original intention groups in the intention triples, namely: intention triple 1: an intent to travel; intent triplet 2: an intent to travel from A; intent triplets 3: removing the B intention; intent triplets 4: an intent to purchase an airline ticket; intent triplet 5: an intent to purchase a high-speed railway ticket; intent triplets 6: intent to not buy airline tickets; intent triplets 7: the intention of buying high-speed railway tickets.
Further, more target intents can be determined by analyzing the combined relationship among the intention triplets. For example: the intent triple 123 combination may determine a travel intent; the intent triplet 456 combination may determine the query high iron intent, and so on.
It should be noted that there is a corresponding relationship between the intention rule and the form item, and the intention rule preset in the system includes several relationship sets for determining entity relationships in different target forms. The process of determining the target intention according to the intention rule and the target form positive intention triple and the intention triple is a possible result example in an actual processing process, and in a specific application, different target intentions and combination modes can be determined according to different target forms and corresponding intention rules, which is not specifically limited herein.
As can be seen, in this example, the entity and the intention identifier are normalized through the preset form item, and then, according to the intention rule and the target form, a plurality of intention triples are determined, and then, according to the intention triples, a plurality of kinds of target intents are mapped. By the process, the accuracy and the efficiency of processing the target service corresponding to the target intention are improved.
In one possible example, the target intent comprises types of intent, including positive intent, negative intent, ambiguous intent, and special intent; the processing rule for determining each target intention in the target intention set according to a preset rule may include the following steps: judging whether the special intention is included in the target intention set or not; if the special intention is determined to be included in the target intention set, after an intention conversion operation is performed on the special intention according to the preset rule, sequencing each target intention in the target intention set according to the preset rule, and sequentially adding the target business corresponding to each target intention into the business queue to be activated, wherein the intention conversion operation is used for converting the special intention into one of the positive intention, the negative intention or the fuzzy intention and determining the business intention corresponding to the special intention; if the target intention set does not include the special intention, sequencing each target intention in the target intention set according to the preset rule, and adding the target service corresponding to each target intention into the service queue to be activated in sequence.
Illustratively, the special intention is used for indicating that the input information of the user does not express a complete intention in a standardized way, but keywords in a certain field exist in the input information and can be positioned to a specific intention category. Taking the input information as "want to buy a airline ticket" as an example, the detailed description will be given, and one of the possible target forms obtained according to the semantic understanding of the input information and the semantic understanding result is shown in table 2:
TABLE 2
Destination Type of ticket
A Airline ticket
As shown in table 2, the values of the entities in the current input information include: A. an airline ticket. From the intent rules and the entities with content in the target form, it can be ascertained that: the service intents include: travel intention (destination: a) and purchase intention (type of ticket: airline ticket), and the types of intention are: an affirmative intent. In the ticket buying intention, the airline ticket does not explicitly show the specific category corresponding to the airline ticket, such as: first class, normal passenger cabin, and therefore, from the perspective of the input information itself, the macroscopic intent categories that can be identified are: travel purchases tickets and the type of intent is positive, but there is no direct way to determine what category of tickets to purchase.
Further, the system, according to the keywords obtained from the input information: probability analysis is carried out on a knowledge graph corresponding to the airline tickets and travel ticket purchasing obtained through pre-training, and the nodes with high association degree with the airline tickets can be confirmed to include the following steps: first class, general passenger cabin, etc.
Further, the man-machine conversation system determines two possible target intentions according to the determined nodes with higher association degree: the intention to purchase first class airline tickets, the intention to purchase general cabin airline tickets, and the types of intentions for these two objective intentions are positive intentions.
The above process is a process of performing intent conversion operation on a special intent, that is, converting the special intent of the input information expressed by the non-specific lower business intent including the keyword "airline ticket" into an intent of purchasing an airline ticket of a specific category for travel with a positive intent according to a knowledge graph. It should be noted that the above example is one of possible examples provided for facilitating understanding, and in practical applications, the input information may include one or more specific intentions, or the input information includes at least one specific expression in a category of intentions, and a process of performing intent translation on the input information is similar to the above process, and is not described herein again.
Further, after the system finishes the intention conversion operation, the type of each target intention in the target intention set is determined, the target intents are sequenced according to the priority order in the processing rule, and then the target service corresponding to each target intention is added into the service queue to be activated in sequence.
In this example, the system converts the special intents according to the keywords and the knowledge graph, prioritizes the converted target intents, and adds the target service corresponding to each target intention into the service queue to be activated. Therefore, each target intention in the target intention set can be defined, and the target service corresponding to each target intention can be processed more accurately and efficiently.
In one possible example, before the target service corresponding to each target intention is added to the queue of services to be activated in sequence, the method may include the following steps: judging whether the fuzzy intention exists in the target intention set or not; if the fuzzy intention exists in the target intention set, acquiring state information of at least one service robot; judging whether the at least one service robot has an activated state service robot or not according to the state information; and if the activated state service robot is determined to exist, adding the target service corresponding to the fuzzy intention into a service queue corresponding to the activated state service robot.
In practical application scenarios, not all input information received by the system is a complete representation of triples containing entities and entity relationships. If the input information is "good, then look up this" as an example, the processes of steps S101 to S103 are performed on the input information, so that the actor relationship and the deterministic expression included in the input information can be determined according to the syntactic dependency relationship, but the action may not correspond to a specific business scenario, that is, the intention category and the intention type included in the input information cannot be determined, and at this time, the action is determined to be a fuzzy intention.
In practical application scenarios, the fuzzy intention often appears when the current input information may be a certain piece of input information in an ongoing man-machine conversation, that is, a certain service robot is in an activated state at the moment.
Illustratively, if the man-machine interaction system determines that fuzzy intentions exist in the target intention set, state information of at least one business robot is obtained, and whether a business robot in an activated state exists in the at least one business robot is determined according to the state information. If the fuzzy intention exists, namely the service robot is indicated to process a certain service, the service corresponding to the fuzzy intention is added into a to-be-processed service queue corresponding to the service robot, and the service robot in the activated state processes a task corresponding to the fuzzy intention.
Exemplarily, if it is determined that there is no activated business robot, prioritizing the target intentions in the target intention set according to a prioritization rule of a preset rule to obtain a ranking result, wherein the ranking result includes the fuzzy intention.
Further, the fuzzy intents are processed according to the sorting result.
As can be seen, in this example, the processing manner of the business corresponding to the fuzzy intention is determined by the recognition of the fuzzy intention and according to the state information of the business robot. The problem of stagnation caused by the fact that the fuzzy intention is directly added into the service queue to be activated but the service robot cannot be activated to execute the service processing task can be effectively solved, and therefore normal processing of the target service is guaranteed.
In one possible example, the method may comprise the steps of: judging whether various intents exist in the target intention set; if the plurality of intentions exist, judging whether a paired intention is included in the plurality of intentions, wherein the paired intention comprises a first intention and a second intention, and if the first intention is the positive intention, the second intention is a negative intention under a target business corresponding to the first intention, and the first intention and the second intention are mutually associated; if the paired intents are determined to be included in the multiple intents, sequencing other target intents except the paired intents in the target intention set, and adding the target services corresponding to the remaining sequenced target intents into the service queue to be activated one by one in sequence.
Specifically, the target intention set determined by the system according to the user input information and the intention rule may include one or more categories of target intentions, and each category of target intentions may also correspond to one or more types, i.e. there may be at least one intention identifier for each category of intentions.
Specifically, the number of target intentions in a target intention set is determined, wherein the target intentions include intention categories and intention identifications representing intention types, and if the current target set includes two or more target intentions. An intent category for each target intent and a number of intent identifiers associated with the intent category are further determined. If one intention category with the target intention is determined to be simultaneously associated with two intention identifications, namely intention identifications of positive intention and negative intention, the intention of the category is determined to be paired intention.
Illustratively, if the input information is: and helping I buy the airplane ticket A or the high-speed railway ticket bar. For sentence part 1 "help me buy plane ticket to a", get the plane ticket intention and positive intention (target intention a: positive plane ticket buying intention); the airline ticket intent may correspond to an airline ticket business robot.
Further, as for the sentence part 2 'NO', according to semantic understanding (syntactic analysis), negating the front, and obtaining the airline ticket intention and the negative intention (target intention b: negating the airline ticket intention) through processing (related to word filling, meaning supplement and the like); the target intention a and the target intention b are highly identical in structure, but the target intention b has one more negative word than the target intention a.
Further, as to sentence part 3 "also buy the high-speed railway bar", the intention of the high-speed railway and the positive intention (target intention c: intention of positively buying the high-speed railway) are obtained.
Further, sorting according to a preset rule according to a first dimension, namely a dimension type: positive intent > negative intent, the intent processing order is ordered as: target intent a > target intent c > target intent b.
Further, whether corresponding positive intentions and negative intentions exist or not is judged according to a second dimension, namely a service dimension, in the preset rule, the target intentions a and b processed by the same service robot are paired intentions, at the moment, the target intentions a and b have a cancellation effect, the target intentions a and b are eliminated, and only the target intentions c are left to be added into the service queue to be processed.
Further, the remaining target intents, such as the target intention c described above, are added to the to-be-activated traffic queue. It should be noted that the above is only an example of the intention set preprocessing including the intention. And after sequencing according to the priority sequence, sequentially adding the corresponding target services to a service queue to be activated.
In one possible example, the input information in table 1 may also be: "help me inquire about the plane ticket flying to A tomorrow night, calculated, or inquire about the high-speed railway ticket bar". At this time, the intent type of the user may be determined as travel ticket purchasing, which specifically includes: airline ticket inquiry and high-speed railway ticket inquiry. The identification corresponding to the intention type associated with the travel ticket purchase comprises a negative intention of the airplane ticket query and a pair intention formed by a positive intention of the train ticket query. The system can take the paired intention as a complete target intention, add the corresponding target service to the head of the service queue to be activated, and process the target service preferentially.
It can be seen that, in the present example, by identifying the paired intentions, the paired intentions do not need to be further processed due to the occurrence of the cancellation effect, and therefore, after determining that the paired intentions exist, the sequencing for the target intentions is skipped and the remaining target intentions are continuously processed, so that the efficiency of business processing can be improved and repeated processing can be avoided.
In order to better understand the intention processing procedure of the present application, the intention processing procedure of the present application will be systematically described in conjunction with fig. 3. Fig. 3 is a schematic flowchart of another intent processing provided in an embodiment of the present application. The method specifically comprises the following steps:
s301, receiving input information.
S302, semantic understanding processing is carried out on the input information.
And S303, filling the semantic understanding result into the form item.
And S304, determining a target intention set according to the intention rule.
S305, judging whether a special intention exists.
If the special intention exists, intention conversion is performed to obtain a target intention set, and the process proceeds to step S307.
And S307, if no special intention exists, judging whether multiple intentions exist.
S308, judging whether fuzzy intentions exist or not, and if so, jumping to the step S311.
And S309, if not, judging whether the pairing intention exists.
It should be noted that the judgments in steps S308 to S309 may be exchanged in order, and the paired intention judgment in S309 is performed first, and then the fuzzy intention judgment in S308 is performed. After the completion of step S309, if it is determined that there is no intention to make a pair, the right-hand step of step S309 is executed. Only one of these possibilities is shown in figure 3.
S310, if the paired intents exist, sequencing other target intents except the paired intents in the target intention set, and adding the target services corresponding to the rest sequenced target intents into the service queue to be activated one by one in sequence.
And S311, if the fuzzy intention exists, adding the fuzzy intention into a service queue of the activated service robot.
And S312, if the fuzzy intention does not exist, sequencing the target intentions in the target intention set according to the processing rule.
S313, adding the target service corresponding to each target intention into the service queue to be activated in sequence.
And S314, sequentially activating the target service robot to process the target service.
All the steps of the above steps S301 to S314 can be corresponding to the steps described in the steps S101 to S105, and are not described in detail here.
It can be seen that the intention processing method proposed by the present application includes: the input information is filled into the form item, the form item is used as an entity of the triple, the mapping relation between the form item and the intention is established through the intention rule, the intention is obtained according to the form item and the intention rule, and the input with strong randomness is subjected to normalized processing according to the semantic understanding condition, so that the form item is clear in arrangement, has normativity and centralization, is more convenient to maintain the mapping relation, and is beneficial to establishing the stable and iterative intention rule so as to more accurately determine the second man-machine conversation robot capable of processing the input information. Compared with the method for directly carrying out semantic understanding on the input information to obtain the intention, the mapping relation between the input information and the intention is decoupled, and the situation that when the second man-machine conversation robot is directly determined according to the words of the input information, the input is sent to the second man-machine conversation robot unmatched with the input information processing due to inaccuracy of word understanding or ambiguity of word meaning is avoided. The intention is not obtained directly according to the original input information, and the maintenance and the iteration of the mapping relation are more convenient.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device, as shown in fig. 4, the electronic device includes a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory and configured to be executed by the processor, the server is applied to an intention processing system, and the programs include instructions for performing the following steps:
receiving input information of a user in the at least one dialogue unit, and performing semantic understanding on the input information to obtain a semantic understanding result, wherein the semantic understanding result comprises at least one entity and information of each entity in the at least one entity, each entity refers to a concept, a word or a phrase contained in the input information, the information comprises attribute information of each entity, and the attribute information comprises the type and meaning of each entity;
filling each entity into a form item according to the semantic understanding result to obtain a target form, wherein the target form is used for structuralizing and representing the attribute information of each entity;
determining at least one target intention according to an intention rule and the target form to obtain a target intention set, wherein the intention rule is used for indicating an association relation between the form items and/or the entities in the target form to obtain an intention triple, and the intention triple comprises a first entity, a second entity and the association relation between the first entity and the second entity;
determining a processing rule of each target intention in the target intention set according to a preset rule, wherein the processing rule comprises a processing sequence of each target intention and a corresponding target business robot;
and adding the target service corresponding to each target intention into a service queue to be activated according to the processing rule, and sequentially activating the target service robot to process the target service according to the service queue to be activated.
It can be seen that, in the intent processing method described in the embodiment of the present application, the form item is filled with the input information, the form item is used as an entity of the triple, the mapping relationship between the form item and the intent is established according to the intent rule, the intent is obtained according to the form item and the intent rule, and since the input with strong randomness is normalized according to the semantic understanding condition, the form item is clearly set, has normalization and centralization, is more convenient for maintaining the mapping relationship, and is helpful for establishing the stable and iterative intent rule, so as to more accurately determine the second human-computer interaction robot capable of processing the input information. Compared with the method for directly performing semantic understanding on the input information to acquire the intention, the mapping relation between the input information and the intention is decoupled, and the situation that when the second man-machine conversation robot is directly determined according to the words of the input information, the input is sent to the second man-machine conversation robot unmatched with the input information processing due to inaccuracy of word understanding or ambiguity of word meaning is avoided. The intention is not obtained directly according to the original input information, and the maintenance and the iteration of the mapping relation are more convenient.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the server includes hardware structures and/or software modules for performing the respective functions in order to implement the above-described functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments provided herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed in hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the server may be divided into the functional units according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 5 provides a functional unit structure diagram of an intention processing apparatus in the case of dividing each functional module with corresponding functions, as shown in fig. 5, the intention processing apparatus 500 is applied to a server, the intention processing apparatus 500 may include a receiving unit 501, a processing unit 502, a determining unit 503 and an activating unit 504, wherein,
the receiving unit 501 may be used to support the server performing step S101 described above, and/or other processes for the techniques described herein.
Processing unit 502 may be used to support the server performing steps S102-S103 described above, and/or other processes for the techniques described herein.
The determination unit 503 may be used to support the server performing step S104 described above, and/or other processes for the techniques described herein.
Activation unit 504 may be used to enable the server to perform step S105 described above, and/or other processes for the techniques described herein.
It can be seen that, in the intention processing apparatus provided in the embodiment of the present application, the processing unit fills the input information into the form item, the form item is used as an entity of the triple, the determining unit establishes a mapping relationship between the form item and the intention according to the intention rule, and the intention is obtained according to the form item and the intention rule. Compared with the method for directly carrying out semantic understanding on the input information to obtain the intention, the mapping relation between the input information and the intention is decoupled, and the situation that when the second man-machine conversation robot is directly determined according to the words of the input information, the input is sent to the second man-machine conversation robot unmatched with the input information processing due to inaccuracy of word understanding or ambiguity of word meaning is avoided. The intention is not obtained directly according to the original input information, and the maintenance and the iteration of the mapping relation are more convenient.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The server provided by the embodiment is used for executing the intention processing method, so that the same effects as the realization method can be achieved.
In case of an integrated unit, the server may comprise a processing module, a storage module and a communication module. The processing module may be configured to control and manage actions of the server, and for example, may be configured to support the server to execute the steps executed by the receiving unit 501, the processing unit 502, the determining unit 503, and the activating unit 504. The storage module may be used to support server execution, storage of program code and data, and the like. And the communication module can be used for supporting the communication between the server and other equipment.
The processing module may be a processor or a controller, among others. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., a combination comprising one or more microprocessors, a combination of Digital Signal Processing (DSP) and microprocessors, etc. The storage module may be a memory. The communication module may specifically be a radio frequency circuit, a bluetooth chip, a Wi-Fi chip, or other devices that interact with other servers.
Embodiments of the present application further provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enables a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments, and the computer includes a server.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising a server.
It should be noted that for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the above-described units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be through some interfaces, indirect coupling or communication connection between devices or units, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the above methods of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash memory disks, read-only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing embodiments have been described in detail, and specific examples are used herein to explain the principles and implementations of the present application, where the above description of the embodiments is only intended to help understand the method and its core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An intention processing method applied to a man-machine dialogue system including at least one dialogue unit, the method comprising:
receiving input information of a user in the at least one dialogue unit, and performing data processing on the input information to obtain a processing result, wherein the input information comprises voice input and text input, and the data processing is used for converting the input information into information in a text representation form;
performing semantic understanding on a processing result to obtain a semantic understanding result, and filling words in the input information into form items corresponding to the words according to the semantic understanding result to obtain a target form, where the semantic understanding result includes at least one entity and information of each entity in the at least one entity, each entity refers to a concept, a word, or a phrase included in the input information, the information of each entity in the at least one entity includes attribute information of each entity, the attribute information includes a type and a meaning of each entity, the target form is used for structurally characterizing the attribute information of each entity, and the target form includes at least one form item and the words corresponding to each form item in the at least one form item;
determining at least one target intention according to an intention rule and the target form to obtain a target intention set, wherein the intention rule is used for obtaining at least one intention triple by indicating an association relationship between the form item and/or the entity in the target form, and determining the at least one target intention according to the at least one intention triple, so as to realize the establishment of a mapping relationship between the form item in the target form and each target intention in the at least one target intention, and the intention triple comprises a first entity, a second entity and the association relationship between the first entity and the second entity;
determining a processing rule of each target intention in the target intention set according to a preset rule, wherein the processing rule is used for determining the processing priority of each target intention;
and adding the target service corresponding to each target intention into a service queue to be activated according to the processing rule, and sequentially activating the target service robots to process the target service according to the service queue to be activated.
2. The method of claim 1, wherein semantically understanding the processing result to obtain a semantic understanding result, and filling the words in the input information into the form items corresponding to the words according to the semantic understanding result comprises:
performing word segmentation on the processing result to obtain first data;
performing part-of-speech analysis on the first data to obtain second data, wherein the part-of-speech analysis is used for performing tag marking on each entity in the at least one entity, and the tag marking is used for indicating the attribute information of each entity;
performing syntactic analysis on the second data according to the attribute information to obtain the dependency relationship among the entities;
obtaining the semantic understanding result according to the attribute information and the dependency relationship;
according to the semantic understanding result, clustering the at least one entity to obtain at least one item, wherein each item in the at least one item comprises one or more entities;
and filling each item and one or more entities corresponding to each item into the form items to obtain a target form.
3. The method of claim 1, wherein determining at least one target intent from the intent rules and the target form, resulting in a set of target intents, comprises:
judging whether an entity relationship exists between any two form items in the at least one form item;
if the form items exist, performing a combination operation according to the intention rules respectively corresponding to the two form items with the entity relationship to obtain at least one target intention, wherein the combination operation is used for determining the intention triple for representing the target intention according to the entities respectively corresponding to the two form items;
if the form items do not exist, judging whether an association relationship exists between the intention rules corresponding to each form item;
if the incidence relation exists, performing the combination operation according to the two form items with the incidence relation to obtain at least one target intention;
and obtaining the target intention set according to at least one target intention.
4. The method of claim 3, wherein determining at least one target intent based on the intent rules and the target form comprises:
obtaining at least one entity with content from the target form, wherein the at least one entity with content comprises at least one first entity and at least one second entity;
determining the first entity and the second entity which have the incidence relation in the at least one entity with content according to the intention rule, and obtaining one or more intention triples;
if the intention triple is one, determining the target intention corresponding to the intention triple;
if the intention triples comprise a plurality of intention triples, judging whether the intention triples have a combination relation or not;
if the intention triples are determined to have the combination relationship, respectively determining a first target intention set corresponding to each intention triple in the intention triples, and determining a second target intention set according to the combination relationship;
determining the target intention set according to the first target intention set and the second target intention set;
if the intention triples are determined not to have the combination relationship, the target intention corresponding to each intention triple in the intention triples is respectively determined, and the target intention set is obtained.
5. The method of claim 4, wherein the target intent comprises types of intent, the types of intent comprising positive intent, negative intent, ambiguous intent, and special intent;
the processing rule for determining each target intention in the target intention set according to a preset rule comprises the following steps:
judging whether the special intention is included in the target intention set or not;
if the special intention is determined to be included in the target intention set, after an intention conversion operation is performed on the special intention according to the preset rule, sorting each target intention in the target intention set according to the preset rule, and sequentially adding the target business corresponding to each target intention into the business queue to be activated, wherein the intention conversion operation is used for converting the special intention into one of the positive intention, the negative intention or the fuzzy intention;
if the target intention set does not include the special intention, sequencing each target intention in the target intention set according to the preset rule, and adding the target service corresponding to each target intention into the service queue to be activated in sequence.
6. The method according to claim 5, wherein before said sequentially adding said target service corresponding to said each target intention into said queue of services to be activated, said method further comprises:
judging whether the fuzzy intention exists in the target intention set or not;
if the fuzzy intention exists in the target intention set, acquiring state information of at least one service robot;
judging whether an activated state service robot exists in the at least one service robot or not according to the state information;
and if the activated state service robot is determined to exist, adding the target service corresponding to the fuzzy intention into a service queue corresponding to the activated state service robot.
7. The method of claim 6, further comprising:
judging whether multiple intents exist in the target intention set;
if the plurality of intentions exist, judging whether the plurality of intentions include a pair intention, wherein the pair intention comprises a first intention and a second intention, and if the first intention is the positive intention, the second intention is a negative intention under a target business corresponding to the first intention, and the first intention and the second intention are mutually related;
if the multiple intentions include the paired intentions, sequencing other target intentions except the paired intentions in the target intention set, and sequentially adding the target services corresponding to the sequenced remaining target intentions into the service queue to be activated one by one, wherein the remaining target intentions are the other target intentions except the paired intentions.
8. An intention processing device, characterized in that it applies to a human-machine dialog system comprising at least one dialog unit, the device comprising a receiving unit, a processing unit, a determining unit and an activating unit: wherein the content of the first and second substances,
the receiving unit is used for receiving input information of a user in the at least one dialogue unit and carrying out data processing on the input information to obtain a processing result, wherein the input information comprises voice input and text input, and the data processing is used for converting the input information into information in a text representation form;
the processing unit is configured to perform semantic understanding on a processing result, obtain a semantic understanding result, and fill a term in the input information into a form item corresponding to the term according to the semantic understanding result to obtain a target form, where the semantic understanding result includes at least one entity and information of each entity in the at least one entity, where each entity refers to a concept, a term, or a phrase included in the input information, the information of each entity in the at least one entity includes attribute information of each entity, the attribute information includes a type and a meaning of each entity, the target form is used to structurally characterize the attribute information of each entity, and the target form includes at least one form item and the term corresponding to each form item in the at least one form item;
the processing unit is further configured to determine at least one target intent according to an intent rule and the target form, so as to obtain a target intent set, where the intent rule is configured to obtain at least one intent triple by indicating an association relationship between the form item and/or the entity in the target form, and determine the at least one target intent according to the at least one intent triple, so as to implement establishing a mapping relationship between the form item in the target form and each target intent of the at least one target intent, where the intent triple includes a first entity, a second entity, and the association relationship between the first entity and the second entity;
the determining unit is used for determining a processing rule of each target intention in the target intention set according to a preset rule, wherein the processing rule is used for determining the processing priority of each target intention;
and the activation unit is used for adding the target service corresponding to each target intention into a service queue to be activated according to the processing rule, and sequentially activating the target service robots to process the target service according to the service queue to be activated.
9. An electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the one or more programs including instructions for performing the steps in the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which is executed by a processor to implement the method according to any one of claims 1-7.
CN202211589536.2A 2022-12-12 2022-12-12 Intention processing method and related device Active CN115576435B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211589536.2A CN115576435B (en) 2022-12-12 2022-12-12 Intention processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211589536.2A CN115576435B (en) 2022-12-12 2022-12-12 Intention processing method and related device

Publications (2)

Publication Number Publication Date
CN115576435A CN115576435A (en) 2023-01-06
CN115576435B true CN115576435B (en) 2023-04-04

Family

ID=84590599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211589536.2A Active CN115576435B (en) 2022-12-12 2022-12-12 Intention processing method and related device

Country Status (1)

Country Link
CN (1) CN115576435B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284363A (en) * 2018-12-03 2019-01-29 北京羽扇智信息科技有限公司 A kind of answering method, device, electronic equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9588580B2 (en) * 2011-09-30 2017-03-07 Dejoto Technologies Llc System and method for single domain and multi-domain decision aid for product on the web
US20160255139A1 (en) * 2016-03-12 2016-09-01 Yogesh Chunilal Rathod Structured updated status, requests, user data & programming based presenting & accessing of connections or connectable users or entities and/or link(s)
CN104850554B (en) * 2014-02-14 2020-05-19 北京搜狗科技发展有限公司 Searching method and system
CN113919360A (en) * 2020-07-09 2022-01-11 阿里巴巴集团控股有限公司 Semantic understanding method, voice interaction method, device, equipment and storage medium
CN111723574A (en) * 2020-07-09 2020-09-29 腾讯科技(深圳)有限公司 Information processing method and device and computer readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284363A (en) * 2018-12-03 2019-01-29 北京羽扇智信息科技有限公司 A kind of answering method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115576435A (en) 2023-01-06

Similar Documents

Publication Publication Date Title
EP3183728B1 (en) Orphaned utterance detection system and method
CN106649742B (en) Database maintenance method and device
EP4113357A1 (en) Method and apparatus for recognizing entity, electronic device and storage medium
CN110162675B (en) Method and device for generating answer sentence, computer readable medium and electronic device
WO2021063089A1 (en) Rule matching method, rule matching apparatus, storage medium and electronic device
CN112926308B (en) Method, device, equipment, storage medium and program product for matching text
CN113486170A (en) Natural language processing method, device, equipment and medium based on man-machine interaction
CN115730597A (en) Multi-level semantic intention recognition method and related equipment thereof
CN111444321B (en) Question answering method, device, electronic equipment and storage medium
CN114020886A (en) Speech intention recognition method, device, equipment and storage medium
US20230409294A1 (en) Adaptive user interfacing
CN110797012B (en) Information extraction method, equipment and storage medium
CN110888940B (en) Text information extraction method and device, computer equipment and storage medium
CN115576435B (en) Intention processing method and related device
CN116882372A (en) Text generation method, device, electronic equipment and storage medium
CN111506715B (en) Query method and device, electronic equipment and storage medium
CN113672699A (en) Knowledge graph-based NL2SQL generation method
CN113822034B (en) Method, device, computer equipment and storage medium for replying text
CN111046146B (en) Method and device for generating information
CN110851569B (en) Data processing method, device, equipment and storage medium
CN116010571A (en) Knowledge base construction method, information query method, device and equipment
CN112541792A (en) Data processing method and device for mining user requirements and electronic equipment
CN115587165A (en) Semantic parsing method, system, electronic device and medium
CN117609612A (en) Resource recommendation method and device, storage medium and electronic equipment
CN117932022A (en) Intelligent question-answering method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant