CN110909138B - User intention identification method and system - Google Patents

User intention identification method and system Download PDF

Info

Publication number
CN110909138B
CN110909138B CN201911055258.0A CN201911055258A CN110909138B CN 110909138 B CN110909138 B CN 110909138B CN 201911055258 A CN201911055258 A CN 201911055258A CN 110909138 B CN110909138 B CN 110909138B
Authority
CN
China
Prior art keywords
recognized
word
question
sentence
intention
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
CN201911055258.0A
Other languages
Chinese (zh)
Other versions
CN110909138A (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.)
Advanced Institute of Information Technology AIIT of Peking University
Hangzhou Weiming Information Technology Co Ltd
Hangxiao Steel Structure Co Ltd
Original Assignee
Advanced Institute of Information Technology AIIT of Peking University
Hangzhou Weiming Information 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 Advanced Institute of Information Technology AIIT of Peking University, Hangzhou Weiming Information Technology Co Ltd filed Critical Advanced Institute of Information Technology AIIT of Peking University
Priority to CN201911055258.0A priority Critical patent/CN110909138B/en
Publication of CN110909138A publication Critical patent/CN110909138A/en
Application granted granted Critical
Publication of CN110909138B publication Critical patent/CN110909138B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/26Speech to text systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Mathematical Physics (AREA)
  • Animal Behavior & Ethology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Acoustics & Sound (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Machine Translation (AREA)

Abstract

The application discloses a user intention identification method and a system, comprising the following steps: constructing a directed graph according to the corpus; segmenting the sentence to be recognized to obtain a plurality of participles to be recognized; and searching corresponding intentions in the directed graph according to the multiple to-be-recognized participles. A directed graph is constructed through a corpus, so that the fault tolerance is strong, and the offline model does not need to be trained by spending a large amount of time and calculation power; and searching the corresponding intention in the directed graph according to the multiple to-be-recognized word segmentations, so that the efficiency is high and the fault tolerance is strong. And under an intelligent voice customer service dialogue scene, constructing a directed graph for identifying intentions based on the results of the question and word segmentation of the user and the corresponding intentions. And the intention identification is carried out by utilizing the construction and the retrieval of the directed graph, and compared with a method based on a regular expression, a large number of manual configuration rules are not needed. Compared with a method for searching a question template in a knowledge base, the method does not need to calculate sentence similarity. The calculation efficiency is improved and the calculation time is shortened while the human resources are saved.

Description

User intention identification method and system
Technical Field
The application relates to the field of intelligent voice customer service, in particular to a user intention identification method and system.
Background
Customer service business is widely applied in many scenes, however, manual service has the defects of difficult recruitment, high training cost and the like, and the labor cost can be greatly reduced by replacing manual with intelligent customer service. In order to further match the service types required by the user in the working process, the intelligent customer service generally needs to firstly identify the incoming call intention of the user, so that the user intention identification function of the intelligent customer service is very important. The existing intention identification methods mainly comprise three methods based on regular expressions, calculation of question similarity and intention classification models.
The first method is based on manual specification of regular expressions, namely a regular expression of word slot matching. Marking all historical training dialogue data, and marking the corresponding intention of each sentence of a user; and then aiming at the input sentence of the user, searching a word slot in the sentence, and matching the corresponding intention according to the word slot. The method needs to consume a great amount of manual energy to find the word slots in the text, and the engineering realization efficiency is very low; since the speech translation error is not contained in the question template and word slot, this method also cannot recognize the user question of the translation error.
The second method based on question similarity calculation firstly establishes a knowledge base of template questions, calculates the similarity between the current question and all the template questions in the knowledge base when the user question is identified, and determines the user intention after obtaining the template question with the highest similarity. For each new user question, the method needs to traverse all question templates in the knowledge base, so that the calculation amount of each intention identification is very large, and the calculation efficiency is very low.
The third method based on the intention classification model labels the question text of the user to mark the corresponding intention category; and then vectorizing each question, and training an intention classification model by using the vector of each question and the corresponding intention category. When the intention is identified, firstly, a current user question is vectorized, then the vectors of the current user question are classified by using an intention classification model, and the intention corresponding to the current question is obtained. The method needs to perform off-line model training again and then deploy the model to the on-line when new data is input every time, cannot update the model in real time, and has the defects of time consumption, labor consumption and the like in practical application.
In view of the foregoing, it is desirable to provide a user intention recognition method and system with high efficiency and high fault tolerance, which do not need to spend a lot of time and effort to train the offline model.
Disclosure of Invention
In order to solve the above problems, the present application provides a method and a system for identifying a user intention.
In one aspect, the present application provides a user intention identification method, including:
constructing a directed graph according to the corpus;
segmenting the sentence to be recognized to obtain a plurality of participles to be recognized;
and searching corresponding intentions in the directed graph according to the multiple to-be-recognized participles.
Preferably, the searching for the corresponding intention in the directed graph according to the plurality of to-be-recognized participles includes:
determining corresponding question sentence participles in the directed graph according to the sequence of the participles to be recognized in the sentences to be recognized;
and determining the intention of the sentence to be recognized according to the corresponding intention of the question word.
Preferably, the determining the intention of the sentence to be recognized according to the intention corresponding to the sentence segmentation includes:
if the last word to be recognized in the sentence to be recognized has a corresponding question word in the digraph, the intention corresponding to the question word is the intention of the sentence to be recognized;
if the currently searched word to be recognized is not the last word to be recognized in the sentence to be recognized, and the currently searched word to be recognized does not have a corresponding question word in the directed graph, searching a corresponding question word in the directed graph of the next word to be recognized of the currently searched word to be recognized;
if the currently searched word to be recognized is not the last word to be recognized in the sentence to be recognized, and all the word to be recognized at the back position after the currently searched word to be recognized has no corresponding question word in the digraph, determining the intention of the sentence to be recognized according to the intention corresponding to the word to be recognized at the front position of the currently searched word to be recognized;
and if the currently searched word to be recognized is the last word to be recognized in the sentence to be recognized, which has a corresponding question word in the directed graph, and the question word is connected with a plurality of intentions through other question words, determining the intention of the sentence to be recognized according to the weight of the directed edge.
Preferably, the determining the intention of the sentence to be recognized according to the intention corresponding to the preceding word to be recognized of the currently searched word to be recognized includes:
if the intention of the corresponding question word segmentation of the preceding word to be recognized in the digraph and the number of the directed edges between the question word segmentation are less than or equal to the threshold value of the number of the edges, the intention of the question word segmentation is the intention of the sentence to be recognized;
and if the intentions of the question participles corresponding to the preceding to-be-identified participles in the directed graph and the quantity of the directed edges between the question participles are greater than the threshold value of the number of the edges, the intentions of the to-be-identified sentences cannot be identified.
Preferably, the constructing a directed graph according to the corpus includes:
marking the intentions of all question texts in the corpus;
segmenting the marked question texts to obtain a plurality of question segmentations corresponding to each question text;
and constructing a directed graph according to the intentions of all question texts and a plurality of question clauses corresponding to the intentions of the document texts.
Preferably, the constructing a directed graph according to the intentions of all question sentence texts and a plurality of question sentence participles corresponding to the intentions of the document text includes:
using directed edges to connect the question and sentence participles pairwise in sequence according to the sequence of the question and sentence participles in the sentence text;
connecting the last question word in each question text with the intention of the question text;
determining the weight of a directed edge connecting two question clauses according to the co-occurrence frequency of the two question clauses in the question text;
and deleting the directed edges with the weights smaller than the weight threshold value to obtain a directed graph comprising the question clauses, the intentions, the directed edges and the weights.
Preferably, the segmenting the sentence to be recognized to obtain a plurality of participles to be recognized includes:
performing word segmentation on a sentence to be recognized to obtain a plurality of words;
and deleting stop words in the vocabulary to obtain a plurality of segmented words to be recognized.
Preferably, before the segmenting the sentence to be recognized and obtaining a plurality of segmented words to be recognized, the method further includes:
and translating the voice to be recognized to obtain the sentence to be recognized.
Preferably, the question clauses are connected with another question clause or with the question clause itself through a directed edge.
In a second aspect, the present application provides a user intention recognition system, including:
the directed graph module is used for constructing a directed graph according to the corpus;
and the recognition module is used for segmenting the sentence to be recognized to obtain a plurality of participles to be recognized, and searching corresponding intentions in the directed graph according to the plurality of participles to be recognized.
The application has the advantages that: a directed graph is constructed through a corpus, so that the fault tolerance is strong, and the offline model does not need to be trained by spending a large amount of time and calculation power; and searching the corresponding intention in the directed graph according to the multiple to-be-recognized word segmentations, so that the efficiency is high and the fault tolerance is strong.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to denote like parts throughout the drawings. In the drawings:
FIG. 1 is a schematic diagram illustrating steps of a user intention identification method provided in the present application;
FIG. 2 is a schematic diagram illustrating a flow of a user intention recognition method provided in the present application;
FIG. 3 is a diagram illustrating a directed graph before pruning according to a method for identifying a user's intention provided by the present application;
FIG. 4 is a directed graph intent of a user intent recognition method provided by the present application;
FIG. 5 is a pruned directed graph intent of a user intent recognition method provided by the present application;
FIG. 6 is a schematic diagram of a first-degree relationship of a user intention identification method provided in the present application;
FIG. 7 is a schematic diagram of a second degree relationship of a user intention recognition method provided by the present application;
fig. 8 is a schematic diagram of a user intention recognition system provided in the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
According to an embodiment of the present application, a method for identifying a user intention is provided, as shown in fig. 1, including: the method comprises the following steps:
s101, constructing a directed graph according to the corpus;
s102, segmenting the sentence to be recognized to obtain a plurality of participles to be recognized;
s103, searching corresponding intentions in the directed graph according to the multiple participles to be recognized.
Searching a corresponding intention in a directed graph according to a plurality of to-be-recognized word segmentations, wherein the method comprises the following steps:
determining corresponding question and sentence participles in the directed graph according to the sequence of the participles to be recognized in the sentence to be recognized;
and determining the intention of the sentence to be recognized according to the corresponding intention of the question word.
Determining the intention of the sentence to be recognized according to the intention corresponding to the question word, which comprises the following steps:
if the last word to be recognized in the sentence to be recognized has a corresponding question word in the digraph, the intention corresponding to the question word is the intention of the sentence to be recognized;
if the currently searched word to be recognized is not the last word to be recognized in the sentence to be recognized, and the currently searched word to be recognized does not have a corresponding question word in the directed graph, searching a corresponding question word in the directed graph of the next word to be recognized of the currently searched word to be recognized;
if the currently searched word to be recognized is not the last word to be recognized in the sentence to be recognized, and all the word to be recognized at the back position after the currently searched word to be recognized has no corresponding question word in the digraph, determining the intention of the sentence to be recognized according to the intention corresponding to the word to be recognized at the front position of the currently searched word to be recognized;
and if the currently searched word to be recognized is the last word to be recognized in the sentence to be recognized, which has a corresponding question word in the directed graph, and the question word is connected with a plurality of intentions through other question words, determining the intention of the sentence to be recognized according to the weight of the directed edge.
Determining the intention of the sentence to be recognized according to the intention corresponding to the front word to be recognized of the currently searched word to be recognized, wherein the method comprises the following steps:
if the number of the directed edges between the intention of the corresponding question participle of the front to-be-identified participle in the directed graph and the question participle is less than or equal to the threshold of the number of the edges, the intention of the question participle is the intention of the to-be-identified sentence;
and if the intentions of the question participles corresponding to the preceding to-be-identified participles in the directed graph and the quantity of the directed edges between the question participles are greater than the threshold value of the number of the edges, the intentions of the to-be-identified sentences cannot be identified.
Constructing a directed graph according to the corpus, comprising:
marking the intentions of all question texts in the corpus;
segmenting the marked question texts to obtain a plurality of question segmentations corresponding to each question text;
and constructing a directed graph according to the intentions of all question texts and a plurality of question clauses corresponding to the intentions of the document texts.
Constructing a directed graph according to the intentions of all question texts and a plurality of question clauses corresponding to the intentions of the document texts, wherein the directed graph comprises the following steps:
using directed edges to connect the question and sentence participles pairwise in sequence according to the sequence of the question and sentence participles in the sentence text;
connecting the last question word in each question text with the intention of the question text;
determining the weight of a directed edge connecting two question clauses according to the co-occurrence frequency of the two question clauses in the question text;
and deleting the directed edges with the weights less than the weight threshold value to obtain a directed graph comprising the question clauses, the intentions, the directed edges and the weights.
Segmenting the sentence to be recognized to obtain a plurality of participles to be recognized, and the method comprises the following steps:
performing word segmentation on a sentence to be recognized to obtain a plurality of words;
and deleting stop words in the vocabulary to obtain a plurality of segmented words to be recognized.
Before segmenting the sentence to be recognized and obtaining a plurality of participles to be recognized, the method further comprises the following steps:
and translating the voice to be recognized to obtain the sentence to be recognized.
The question word is connected with another question word or the question word itself through the directed edge.
And the last word to be recognized is the last word to be recognized in the sentence to be recognized.
The next word to be recognized is the word to be recognized behind the currently searched word to be recognized.
The front word to be recognized is the word to be recognized which is in front of the word to be recognized and is searched currently.
Each question word corresponds to a word node in the directed graph.
Each intent corresponds to a node in the directed graph.
The directed edge in the directed graph has a direction, and the question and phrase in the directed graph are unique.
Since the corpus is also translated from the audio, the corpus also includes the words that are not translated correctly. When the intention labeling is carried out on all question texts in the corpus, the intention labeling is directly carried out on sentences comprising the wrong words in translation without correcting the wrong words in translation, so that the fault tolerance rate can be improved.
Embodiments of the present application will be further described below.
First, the history dialogue is translated to obtain history dialogue texts.
As shown in fig. 2, the history dialogue text is subjected to labeling processing. The dialog text is in the form of a question and a answer, the user sentence is a question, and the machine response is an answer. And marking the corresponding intention of each question of the user (each question in the question text).
And segmenting each question text, and removing stop words to obtain a plurality of question segments. For example, divide "i want to look up my house number" into "i", "want", "look up", "house number", and 4 words of question.
And (3) forming nodes by each question word obtained after word segmentation, and establishing directed edges according to the appearance sequence of each question word from front to back in the sentence to form a directed graph as shown in fig. 3. Whether a node corresponding to a word is generated or not in composition is not related to whether the word is translated correctly or not, and the node representing the word with the wrong translation (question word) is also included in the graph, so that correct intention recognition can be carried out on the question of the user with the wrong translation. Then, the matched intentions of each question in the question text form nodes, and the nodes are linked behind the nodes of the final question participles of the sentence (question). And according to the co-occurrence frequency of the two question clauses in the question text, giving a weight to the directed edge between the two words in the graph. As shown in fig. 4, there are directed graphs of "i want to find the account number", "i want to find the balance", and "find the account number" and "find the balance".
The directed edges connecting word nodes with intents also have weights.
The pruning can be set according to the requirement, for example, the pruning percentage is set, or the pruning weight value (the weight is lower than a certain value, the pruning is performed) is set, and the like.
Traversing all the directed edges in the graph, pruning (deleting the directed edges) the edges with the weight less than a certain threshold f (G) = a, and forming a simplified graph (directed graph), as shown in fig. 5. For the directed graph G, f (G) is the maximum edge weight with a number of occurrences that is less than 5% of the total number of edges.
f (G) = a is a threshold function, the function is f (G), and the specific value is a. This function may be self-defining. Further explanation is given by the example that this function is defined as ordering all edges in the graph, and the last 5% of directed edges are pruned. And sorting all the directed edges in the directed graph from high to low according to the weight of each directed edge, and deleting the 5 percent directed edge with the lowest weight. Assuming that there are 100 directed edges in total, 5 directed edges with the smallest weight are deleted after sorting according to the weight from high to low.
Preferably, the weight may be the number of times two question sentence clause (word node) accompanies appear.
And taking the current user question as a sentence to be recognized, performing word segmentation to obtain n vocabularies, and removing stop words in the vocabularies to obtain a plurality of words to be recognized.
And searching the intention according to the directed graph and the multiple to-be-recognized participles.
The word segmentation to be recognized sequentially comprises the following steps: "i", "want", "check" and "flow", these 4 word segments to be identified.
Starting from the 'I', looking up the 'I' in the directed graph, if the 'I' exists, looking up the 'thought', if the 'I' exists, looking up the 'flow', and if the 'I' exists, using the intention corresponding to the 'flow' as the intention of a question to be identified.
If the query is not found when the query is searched in the directed graph, the next to-be-recognized segmentation word of the query is used for searching in the directed graph, namely the traffic is searched in the sentence, and if the query is found, the intention corresponding to the traffic is used as the intention of the question to be recognized.
If there is no corresponding question clause in the directed graph, the intention of the corresponding question clause of "thought" can be used as the intention of the question to be identified. If there is no corresponding intention, but in the directed graph, when the word "want" is connected with a certain intention through several directed edges, it needs to be considered whether the number of the directed edges between the word "want" and the intention to be recognized exceeds the threshold value of the number of the edges. If the number of the edges is less than or equal to the threshold value of the number of the edges, the intention is used as the intention of the question to be recognized, and if the number of the edges is greater than the threshold value of the number of the edges, the intention of the sentence to be recognized cannot be recognized.
The edge number threshold may be set as desired.
The question word 'want' in the directed graph is connected with 'go', 'watch' and 'movie' in sequence through directed edges, and then 3 directed edges exist between the 'want' and the 'movie'. If the threshold value of the number of edges is 2, the number of the directed edges exceeds the threshold value of the number of the edges, and the intention of the sentence to be recognized cannot be recognized.
If the query has a corresponding question word in the directed graph, but the traffic has no corresponding question word in the directed graph, but the query is connected with the account number through the first directed edge and is connected with the balance through the second directed edge, the intention of the sentence to be recognized is determined according to the weight of the directed edges. That is, if the weight of the first directed edge is greater than that of the second directed edge, the intention corresponding to the "user number" is used as the intention of the question to be recognized. And if the weight of the first directed edge is equal to that of the second directed edge, the intentions corresponding to the user number and the balance are used as the intentions of the question to be recognized.
The graph search algorithm is further explained below.
Firstly, initializing i =1, and setting a total score (weight) K1= K, wherein K is not limited to a specific numerical value, and a node vi corresponding to the ith participle wi to be recognized is a node with a median wi in the directed graph. For the (i + 1) th word after the (i) th word, nodes vi1, vi2, \8230areadjacent to vi, and vim is searched for the node vi +1 with the value wi +1, and then the score Ki +1= Ki is set. After finding the corresponding node vij, let vi +1= vij, i = i +1, and repeat the previous step. If not, the score d is deducted from the score Ki +1 and vi +1 is searched for in the second level neighbor nodes vi11, vi12, \8230;, vi21, vi22, \8230;, vimt of vi, where d is not limited to a specific value here. If not, it is determined that the intention is not recognized.
If a node vijk with value wi +1 is searched, vi +1= vijk is made and the first step is repeated. If there are more than vi +1 matches possible, then the largest of the edge weights and e (vi, vij) + e (vij, vijk) is selected as vi +1. If there are a plurality of vi +1 candidates with equal edge weights, the candidates are all kept. That is, if a question word (word node L) corresponding to the last word to be recognized in the sentence to be recognized is searched in the directed graph, whether a final node (intended node) exists in the first-degree relationship (nodes connected by one directed edge) of the word node L is searched first, and the directed edge with the largest weight is selected as an intention result, and if the directed edge has the same value, the directed edge is retained (and simultaneously used as the recognized intention), and as shown in fig. 6, the direction 2 is selected. And if the first-degree relation has no intention node, searching whether the second-degree relation has a final intention node. If the node of the intentional graph is the second degree path weight, multiplying the two-step weight values of the final intention node and the question clause (the word node L) corresponding to the last clause to be recognized of the sentence to be recognized by the two-step weight values. All the two-degree path weights are compared, the largest one is selected to be the final intention path, and fig. 7 shows that fig. 1 is selected. If the values are the same, the values are reserved. If the second degree still has no final node, the search is stopped, and the intention cannot be searched.
The specific search for the several-degree relationship is related to the setting of the edge number threshold, and if the edge number threshold is set to 0, only the one-degree relationship is searched.
And continuously iterating and searching in the directed graph until finding out the node vn corresponding to the last word wn, and taking the intention corresponding to the intention node connected with the node as a final intention recognition result. The final intention recognition result may be matched to a plurality of vn, and the candidate vn with the highest score Kn is taken as the final result. If the corresponding node vn is not searched finally, the intention is identified as unrecognizable.
According to an embodiment of the present application, there is also provided a user intention recognition system, as shown in fig. 8, including:
the directed graph module 101 is configured to construct a directed graph according to the corpus;
the recognition module 102 is configured to segment a sentence to be recognized to obtain a plurality of segmented words to be recognized, and search a corresponding intention in the directed graph according to the plurality of segmented words to be recognized.
When the directed graph is updated, the wireless network performs off-line operation, and only the part needing to be added is directly added into the directed graph.
Each question word in the directed graph is a node (word node).
In the method, the directed graph is constructed through the corpus, the fault tolerance is strong, and the offline model does not need to be trained by spending a large amount of time and calculation power; and searching the corresponding intention in the directed graph according to the multiple to-be-recognized word segmentations, so that the efficiency is high and the fault tolerance is strong. And under an intelligent voice customer service dialogue scene, constructing a directed graph for identifying intentions based on the results of the question and word segmentation of the user and the corresponding intentions. And the intention recognition is carried out by utilizing the construction and the retrieval of the directed graph, and compared with a method based on a regular expression, a large amount of manual rules are not required to be configured. Compared with a method for searching a question template in a knowledge base, the method does not need to calculate sentence similarity. The calculation efficiency is improved and the calculation time is shortened while the human resources are saved. When the directed graph is constructed, nodes are constructed without difference on correct and wrong translated texts, the fault tolerance on the translation errors is enhanced, and compared with a method based on a regular expression, the accuracy of intention identification under the condition of wrong voice translation is effectively improved. The graph model can be updated online without spending much time and effort in training the offline model compared to the method of classifying the model based on the training intent. By calculating the occurrence frequency of the weight, the directed edge is pruned, so that the calculation amount reduction and the calculation time are reduced, and the calculation efficiency is high.
The above description is only for the preferred embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (8)

1. A user intention recognition method, comprising:
constructing a directed graph according to the corpus;
segmenting the sentence to be recognized to obtain a plurality of participles to be recognized;
according to the multiple to-be-recognized word segmentations, searching corresponding intentions in the directed graph, wherein the method comprises the following steps:
determining corresponding question sentence participles in the directed graph according to the sequence of the participles to be recognized in the sentences to be recognized;
determining the intention of the sentence to be recognized according to the intention corresponding to the question word, which comprises the following steps:
if the last word to be recognized in the sentence to be recognized has a corresponding question word in the digraph, the intention corresponding to the question word is the intention of the sentence to be recognized;
if the currently searched word to be recognized is not the last word to be recognized in the sentence to be recognized and the currently searched word to be recognized has no corresponding question word in the directed graph, searching the corresponding question word in the directed graph of the next word to be recognized of the currently searched word to be recognized;
if the currently searched word to be recognized is not the last word to be recognized in the sentence to be recognized, and all the word to be recognized at the back position after the currently searched word to be recognized has no corresponding question word in the digraph, determining the intention of the sentence to be recognized according to the intention corresponding to the word to be recognized at the front position of the currently searched word to be recognized;
and if the currently searched word to be recognized is the last word to be recognized in the sentence to be recognized, which has a corresponding question word in the directed graph, and the question word is connected with a plurality of intentions through other question words, determining the intention of the sentence to be recognized according to the weight of the directed edge.
2. The recognition method of claim 1, wherein the determining the intention of the sentence to be recognized according to the intention corresponding to the preceding word to be recognized of the currently searched word to be recognized comprises:
if the intention of the corresponding question word segmentation of the preceding word to be recognized in the digraph and the number of the directed edges between the question word segmentation are less than or equal to the threshold value of the number of the edges, the intention of the question word segmentation is the intention of the sentence to be recognized;
and if the intentions of the question participles corresponding to the preceding to-be-identified participles in the directed graph and the quantity of the directed edges between the question participles are greater than the threshold value of the number of the edges, the intentions of the to-be-identified sentences cannot be identified.
3. The method according to claim 1, wherein the constructing a directed graph from a corpus comprises:
marking the intentions of all question texts in the corpus;
segmenting the marked question texts to obtain a plurality of question segmentations corresponding to each question text;
and constructing a directed graph according to the intentions of all question texts and a plurality of question clauses corresponding to the intentions of the document texts.
4. The recognition method according to claim 3, wherein said constructing a directed graph from the intentions of all question sentence texts and a plurality of said question sentence clauses corresponding to the intentions of a document text comprises:
using directed edges to connect the question participles pairwise in sequence according to the sequence of the question participles in the sentence text;
connecting the last question word in each question text with the intention of the question text;
determining the weight of a directed edge connecting two question clauses according to the co-occurrence frequency of the two question clauses in the question text;
and deleting the directed edges with the weights smaller than the weight threshold value to obtain a directed graph comprising the question clauses, the intentions, the directed edges and the weights.
5. The recognition method of claim 1, wherein the segmenting the sentence to be recognized to obtain a plurality of segmented words to be recognized comprises:
performing word segmentation on a sentence to be recognized to obtain a plurality of words;
and deleting stop words in the vocabulary to obtain a plurality of segmented words to be recognized.
6. The recognition method according to claim 1, before the segmenting the sentence to be recognized to obtain a plurality of segmented words to be recognized, further comprising:
and translating the voice to be recognized to obtain the sentence to be recognized.
7. The recognition method according to claim 1, wherein the question clause is connected to another question clause or to itself through a directed edge.
8. A user intent recognition system, comprising:
the directed graph module is used for constructing a directed graph according to the corpus;
the recognition module is used for segmenting the sentence to be recognized to obtain a plurality of participles to be recognized, and searching corresponding intentions in the directed graph according to the plurality of participles to be recognized, and the recognition module comprises:
determining corresponding question sentence participles in the directed graph according to the sequence of the participles to be recognized in the sentences to be recognized;
determining the intention of the sentence to be recognized according to the intention corresponding to the question word, which comprises the following steps:
if the last word to be recognized in the sentence to be recognized has a corresponding question word in the digraph, the intention corresponding to the question word is the intention of the sentence to be recognized;
if the currently searched word to be recognized is not the last word to be recognized in the sentence to be recognized and the currently searched word to be recognized has no corresponding question word in the directed graph, searching the corresponding question word in the directed graph of the next word to be recognized of the currently searched word to be recognized;
if the currently searched word to be recognized is not the last word to be recognized in the sentence to be recognized, and all the word to be recognized at the back position after the currently searched word to be recognized has no corresponding question word in the digraph, determining the intention of the sentence to be recognized according to the intention corresponding to the word to be recognized at the front position of the currently searched word to be recognized;
and if the currently searched word to be recognized is the last word to be recognized in the sentence to be recognized, which has the corresponding question word in the directed graph, and the question word is connected with a plurality of intentions through other question words, determining the intention of the sentence to be recognized according to the weight of the directed edge.
CN201911055258.0A 2019-10-31 2019-10-31 User intention identification method and system Active CN110909138B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911055258.0A CN110909138B (en) 2019-10-31 2019-10-31 User intention identification method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911055258.0A CN110909138B (en) 2019-10-31 2019-10-31 User intention identification method and system

Publications (2)

Publication Number Publication Date
CN110909138A CN110909138A (en) 2020-03-24
CN110909138B true CN110909138B (en) 2023-03-07

Family

ID=69815182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911055258.0A Active CN110909138B (en) 2019-10-31 2019-10-31 User intention identification method and system

Country Status (1)

Country Link
CN (1) CN110909138B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113887224A (en) * 2021-10-19 2022-01-04 京东科技信息技术有限公司 Sentence intention identification method, sentence response method, sentence intention identification device and electronic equipment
CN117130791B (en) * 2023-10-26 2023-12-26 南通话时代信息科技有限公司 Computing power resource allocation method and system of cloud customer service platform

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109920414A (en) * 2019-01-17 2019-06-21 平安城市建设科技(深圳)有限公司 Nan-machine interrogation's method, apparatus, equipment and storage medium
US20190228069A1 (en) * 2017-08-04 2019-07-25 Ping An Technology (Shenzhen) Co., Ltd. Intention acquisition method, electronic device and computer-readable storage medium
CN110096584A (en) * 2019-05-14 2019-08-06 京东数字科技控股有限公司 A kind of answer method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190228069A1 (en) * 2017-08-04 2019-07-25 Ping An Technology (Shenzhen) Co., Ltd. Intention acquisition method, electronic device and computer-readable storage medium
CN109920414A (en) * 2019-01-17 2019-06-21 平安城市建设科技(深圳)有限公司 Nan-machine interrogation's method, apparatus, equipment and storage medium
CN110096584A (en) * 2019-05-14 2019-08-06 京东数字科技控股有限公司 A kind of answer method and device

Also Published As

Publication number Publication date
CN110909138A (en) 2020-03-24

Similar Documents

Publication Publication Date Title
US11113234B2 (en) Semantic extraction method and apparatus for natural language, and computer storage medium
CN110349568B (en) Voice retrieval method, device, computer equipment and storage medium
CN112069298B (en) Man-machine interaction method, device and medium based on semantic web and intention recognition
CN108304372B (en) Entity extraction method and device, computer equipment and storage medium
CN108763510B (en) Intention recognition method, device, equipment and storage medium
CN107818141B (en) Biomedical event extraction method integrated with structured element recognition
CN111191442B (en) Similar problem generation method, device, equipment and medium
CN110826335A (en) Named entity identification method and device
CN110782892B (en) Voice text error correction method
CN111177402B (en) Evaluation method, device, computer equipment and storage medium based on word segmentation processing
CN110909138B (en) User intention identification method and system
CN111274804A (en) Case information extraction method based on named entity recognition
CN112016319A (en) Pre-training model obtaining method, disease entity labeling method, device and storage medium
CN113326702B (en) Semantic recognition method, semantic recognition device, electronic equipment and storage medium
CN111930953B (en) Text attribute feature identification, classification and structure analysis method and device
CN110751234A (en) OCR recognition error correction method, device and equipment
CN111191051A (en) Method and system for constructing emergency knowledge map based on Chinese word segmentation technology
CN112632982A (en) Dialogue text emotion analysis method capable of being used for supplier evaluation
CN112231451A (en) Method and device for recovering pronoun, conversation robot and storage medium
Sapena et al. A global relaxation labeling approach to coreference resolution
CN111783464A (en) Electric power-oriented domain entity identification method, system and storage medium
CN112560425B (en) Template generation method and device, electronic equipment and storage medium
CN116628173B (en) Intelligent customer service information generation system and method based on keyword extraction
CN112528653A (en) Short text entity identification method and system
CN108241650B (en) Training method and device for training classification standard

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
CB02 Change of applicant information

Address after: Room 101, building 1, block C, Qianjiang Century Park, ningwei street, Xiaoshan District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou Weiming Information Technology Co.,Ltd.

Applicant after: Institute of Information Technology, Zhejiang Peking University

Address before: Room 288-1, 857 Xinbei Road, Ningwei Town, Xiaoshan District, Hangzhou City, Zhejiang Province

Applicant before: Institute of Information Technology, Zhejiang Peking University

Applicant before: Hangzhou Weiming Information Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230713

Address after: Room 101, building 1, block C, Qianjiang Century Park, ningwei street, Xiaoshan District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Weiming Information Technology Co.,Ltd.

Patentee after: Institute of Information Technology, Zhejiang Peking University

Patentee after: HANGXIAO STEEL STRUCTURE Co.,Ltd.

Address before: Room 101, building 1, block C, Qianjiang Century Park, ningwei street, Xiaoshan District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Weiming Information Technology Co.,Ltd.

Patentee before: Institute of Information Technology, Zhejiang Peking University

TR01 Transfer of patent right