CN117252211A - Construction of questioning intention recognition model and questioning intention recognition method and device - Google Patents
Construction of questioning intention recognition model and questioning intention recognition method and device Download PDFInfo
- Publication number
- CN117252211A CN117252211A CN202311351254.3A CN202311351254A CN117252211A CN 117252211 A CN117252211 A CN 117252211A CN 202311351254 A CN202311351254 A CN 202311351254A CN 117252211 A CN117252211 A CN 117252211A
- Authority
- CN
- China
- Prior art keywords
- data
- entity
- recognition
- questioning
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 238000010276 construction Methods 0.000 title claims description 8
- 238000012549 training Methods 0.000 claims abstract description 83
- 238000000605 extraction Methods 0.000 claims abstract description 47
- 238000012545 processing Methods 0.000 claims abstract description 21
- 230000015654 memory Effects 0.000 claims description 17
- 238000004458 analytical method Methods 0.000 claims description 6
- 238000007781 pre-processing Methods 0.000 claims description 5
- 238000004140 cleaning Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 abstract description 8
- 230000000694 effects Effects 0.000 description 11
- 238000003058 natural language processing Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 239000000463 material Substances 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 230000005856 abnormality Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000003370 grooming effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
- G06F40/35—Discourse or dialogue representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/211—Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
- G06F40/295—Named entity recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
- G06N3/0442—Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Machine Translation (AREA)
Abstract
The embodiment of the invention relates to a method and a device for constructing a questioning intention recognition model and recognizing questioning intention, comprising the following steps: acquiring historical dialogue data corpus of a user and customer service, wherein the historical dialogue data corpus comprises a question intention label; entity identification and entity relation extraction are carried out on the historical dialogue data corpus to obtain first entity identification data and first entity relation data, and data enhancement processing is carried out to obtain entity identification training data and entity relation training data; inputting entity recognition training data and entity relation training data into an initial model, and training the initial model until the estimated questioning intention result output by the initial model meets the preset condition, so as to obtain a questioning intention recognition model after training. Therefore, the questioning intention recognition can be performed on the voice or the text input by the user, so that the corresponding guiding answer is searched according to the questioning intention, the functions of efficient and intelligent reasoning and recommendation can be realized, and the use feeling of the user is improved.
Description
Technical Field
The embodiment of the invention relates to the field of data processing, in particular to a method and a device for constructing a questioning intention recognition model and recognizing questioning intention.
Background
As the tap enterprises of the building industry, the digital construction is at the advanced level of the industry, the information system is continuously increased to meet the demands of enterprise users, but with the gradual increase of system functions, the problems that users cannot find people to solve, management staff is lack of data basis for improving work, the working efficiency of operation and maintenance staff is low, the repeated workload is large and the like occur in the use process, and the conventional operation and maintenance mode cannot meet the service demands.
At present, the problems are solved based on pure manual typing and customer service communication in the implementation process, the efficiency is low, a very good speaking scheme for solving the similar problems in the past is difficult to quickly find, the knowledge base is required to be checked while typing, and the efficiency is extremely low. The traditional customer service automatic question-answering system is based on simple keyword matching, full-text retrieval cannot achieve the effects of intelligent reasoning and recommendation, the user semantic recognition effect is very poor, and the phenomenon of answering questions is particularly high.
Disclosure of Invention
In view of this, in order to solve the above technical problems or part of the technical problems, the embodiments of the present invention provide a method and apparatus for constructing a questioning intention recognition model and recognizing a questioning intention.
In a first aspect, an embodiment of the present invention provides a method for constructing a query intention recognition model, including:
acquiring historical dialogue data corpus of a user and customer service, wherein the historical dialogue data corpus comprises a question intention label;
entity identification and entity relation extraction are carried out on the historical dialogue data corpus, and first entity identification data and first entity relation data are obtained;
performing data enhancement processing on the first entity identification data and the first entity relation data to obtain entity identification training data and entity relation training data;
inputting the entity recognition training data and the entity relation training data into an initial model, and training the initial model until the estimated questioning intention result output by the initial model meets the preset condition, so as to obtain a questioning intention recognition model after training.
In one possible embodiment, the method further comprises:
extracting character features for entity recognition from the historical dialogue data corpus by using a dependency syntactic analysis method through an entity recognition model;
performing entity recognition based on the character features to obtain first entity recognition data;
extracting semantic features corresponding to the first entity identification data by using a BiGRU network through a relation extraction model;
and extracting entity relations based on the semantic features to obtain first entity relation data.
In one possible embodiment, the method further comprises:
and carrying out synonym and/or synonym replacement processing on the first entity identification data and the first entity relation data to obtain entity identification training data and entity relation training data.
In one possible embodiment, the method further comprises:
inputting the entity recognition training data and the entity relation training data into an initial model, so that the initial model learns based on the entity recognition training data, the entity relation training data and the corresponding questioning intention labels, and determining that the initial model training is completed until the similarity between the estimated questioning intention result output by the initial model and the questioning intention labels is greater than a preset threshold value, so as to obtain the questioning intention recognition model.
In one possible embodiment, the method further comprises:
and carrying out data preprocessing on the historical dialogue data corpus, wherein the data preprocessing at least comprises data cleaning and part-of-speech tagging.
In a second aspect, an embodiment of the present invention provides a method for identifying a question intention, including:
acquiring a question sentence sent by a target user through a user side;
performing entity identification and entity relation extraction on the question sentences to obtain target entity identification data and target entity relation data;
extracting questioning intention recognition features based on the target entity recognition data and target entity relationship data;
inputting the questioning intention recognition features into the questioning intention recognition model constructed according to any one of claims 1 to 5, so that the questioning intention recognition model outputs the questioning intention corresponding to the questioning sentence.
In one possible embodiment, the method further comprises:
extracting character features for entity recognition in the question sentence through an entity recognition model;
performing entity recognition based on the character features to obtain target entity recognition data;
extracting semantic features corresponding to the target entity identification data through a relation extraction model;
and extracting entity relations based on the semantic features to obtain target entity relation data.
In one possible embodiment, the method further comprises:
classifying the intention recognition features, and estimating an intention category interval in which the intention of the question sentence is located based on a classification result;
and determining the questioning intention corresponding to the questioning sentence based on the intention category interval, the target entity identification data and the target entity relation data.
In one possible embodiment, the method further comprises:
pre-constructing a knowledge graph;
inquiring a corresponding guiding answer from the knowledge graph based on the questioning intention corresponding to the questioning sentence and feeding back the guiding answer to the user side.
In a third aspect, an embodiment of the present invention provides a device for constructing a query intention recognition model, including:
the data acquisition module is used for acquiring historical dialogue data corpus of a user and customer service, wherein the historical dialogue data corpus comprises a questioning intention label;
the recognition extraction module is used for carrying out entity recognition and entity relation extraction on the historical dialogue data corpus to obtain first entity recognition data and first entity relation data;
the data processing module is used for carrying out data enhancement processing on the first entity identification data and the first entity relation data to obtain entity identification training data and entity relation training data;
the model training module is used for inputting the entity recognition training data and the entity relation training data into an initial model, and training the initial model until the estimated questioning intention result output by the initial model meets the preset condition, so as to obtain a questioning intention recognition model after training.
In a fourth aspect, an embodiment of the present invention provides a questioning intention recognition device, including:
the data acquisition module is used for acquiring a question statement sent by a target user through a user side;
the identification and extraction module is used for carrying out entity identification and entity relation extraction on the question sentences to obtain target entity identification data and target entity relation data;
the identification and extraction module is used for extracting questioning intention identification characteristics based on the target entity identification data and the target entity relation data;
the intention recognition module is used for inputting the questioning intention recognition characteristics into a questioning intention recognition model so that the questioning intention recognition model outputs questioning intention corresponding to the questioning sentence.
In a fifth aspect, an embodiment of the present invention provides a computer apparatus, including: the method for constructing the questioning intention recognition model according to the first aspect and the questioning intention recognition method according to the second aspect are realized by executing a questioning intention recognition model constructing program and a questioning intention recognition program stored in the memory.
In a sixth aspect, an embodiment of the present invention provides a storage medium, including: the storage medium stores one or more programs executable by one or more processors to implement the method of constructing a question intention recognition model described in the first aspect and the method of recognizing a question intention described in the second aspect.
According to the construction scheme of the questioning intention recognition model provided by the embodiment of the invention, the historical dialogue data corpus of the user and customer service is obtained, wherein the historical dialogue data corpus comprises questioning intention labels; entity identification and entity relation extraction are carried out on the historical dialogue data corpus, and first entity identification data and first entity relation data are obtained; performing data enhancement processing on the first entity identification data and the first entity relation data to obtain entity identification training data and entity relation training data; inputting the entity recognition training data and the entity relation training data into an initial model, and training the initial model until the estimated questioning intention result output by the initial model meets the preset condition, so as to obtain a questioning intention recognition model after training. Compared with the prior question-answering mode, the knowledge base searching efficiency is low when typing. Or the automatic question-answering system is based on simple keyword matching, and the problem that intelligent reasoning and recommendation and user semantic recognition effect are poor can not be achieved. According to the scheme, the questioning intention recognition model is constructed, the questioning intention recognition can be carried out on the voice or the words input by the user, so that the corresponding dredging answer is searched according to the questioning intention, the functions of efficient and intelligent reasoning and recommendation can be realized, and the use sense of the user is improved.
According to the questioning intention recognition scheme provided by the embodiment of the invention, the questioning sentences sent by the target user through the user side are obtained; performing entity identification and entity relation extraction on the question sentences to obtain target entity identification data and target entity relation data; extracting questioning intention recognition features based on the target entity recognition data and target entity relationship data; and inputting the questioning intention recognition features into a questioning intention recognition model so that the questioning intention recognition model outputs questioning intention corresponding to the questioning sentence. Compared with the prior question-answering mode, the knowledge base searching efficiency is low when typing. Or the automatic question-answering system is based on simple keyword matching, and the problem that intelligent reasoning and recommendation and user semantic recognition effect are poor can not be achieved. According to the scheme, the constructed questioning intention recognition model is used for recognizing the questioning intention of the voice or the text input by the user, so that the corresponding dredging answer is searched according to the questioning intention, the functions of efficient and intelligent reasoning and recommendation can be realized, and the use feeling of the user is improved.
Drawings
FIG. 1 is a schematic flow chart of a method for constructing a question intention recognition model according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for identifying a question intention according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a device for constructing a question intention recognition model according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a questioning intention recognition device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
For the purpose of facilitating an understanding of the embodiments of the present invention, reference will now be made to the following description of specific embodiments, taken in conjunction with the accompanying drawings, which are not intended to limit the embodiments of the invention.
Fig. 1 is a flow chart of a method for constructing a question intention recognition model according to an embodiment of the present invention, as shown in fig. 1, where the method specifically includes:
s11, acquiring historical dialogue data corpus of a user and customer service, wherein the historical dialogue data corpus comprises question intention labels.
The construction method of the questioning intention recognition model is preferentially applicable to building knowledge questioning and answering scenes in the building industry, firstly, a plurality of historical dialogue data corpora of past users and customer service are sampled based on an NLP service technology, then data preprocessing is carried out on the historical dialogue data corpora, including but not limited to data cleaning, word segmentation and part-of-speech tagging, and a word segmentation method based on statistics is adopted for word segmentation; finally, marking intent labels for the historical dialogue data corpus according to dialogue intentions, marking relationship labels for relationships expressed by entities, and representing that different combinations of entities correspond to different relationships under different intentions so as to realize intent recognition and relationship attribute searching in the dialogue process. The NLP service technology is a natural language processing service, and the NLP service provides multiple intelligent text processing and text generation capabilities, including lexical analysis, similar word recall, word similarity, sentence similarity, text color rendering, sentence correction, text completion, sentence generation and the like.
And S12, carrying out entity identification and entity relation extraction on the historical dialogue data corpus to obtain first entity identification data and first entity relation data.
Extracting character features for entity recognition from the historical dialogue data corpus by using a dependency syntactic analysis method through the entity recognition model; and carrying out entity recognition based on the character features to obtain first entity recognition data. Extracting semantic features corresponding to the first entity identification data by using a BiGRU network through a relation extraction model; and extracting entity relations based on the semantic features to obtain first entity relation data.
Specifically, the entity identification data refers to marking key information in the dialogue data as a key entity tag; the relation extraction data refers to labeling of relation of entities in dialogue corpus data, the labeled dialogue data is used as relation training data, a named entity recognition technology is studied in depth, and aiming at characteristics of building data, the embodiment of the invention provides a DPABiLSTM-CSCEC building named entity recognition model fused with dependency syntactic analysis. The model extracts the semantic modification relation of each word in the sentence by utilizing the dependency syntactic analysis technology, and enriches the sentence characteristics. Before outputting, the model is focused on character features beneficial to entity recognition by introducing an attention mechanism so as to improve the accuracy of model entity recognition. Experiments show that the building entity identification model provided by the embodiment of the invention not only has good effect in extraction of various entities, but also has extraction performance superior to that of a common deep learning model, and lays a foundation for the following building relation extraction task.
Based on the working foundation of building entity extraction, the embodiment of the invention provides a MutilAttBISCEC building relation extraction model. The model fully learns the semantic features using a biglu network. And transition from the character level to the sentence level, and respectively integrate attention mechanisms at two levels to improve the performance of the relation extraction model. And comparing the relation extraction model of the current main stream. Experimental results show that the model has better performance in the extraction of building knowledge relations.
For example, please ask a question how do anomalies in daily demand plans for materials in an information-based system appear? The entity is daily demand planning of materials, the entity is data, the relationship is data abnormality, entity prediction is carried out on the extracted entity identification characteristics, and then the specific relationship of the two entities is predicted by the relationship characteristics.
And S13, performing data enhancement processing on the first entity identification data and the first entity relation data to obtain entity identification training data and entity relation training data.
And carrying out data enhancement processing on the first entity identification data and the first entity relation data to generate more dialogue data linguistic data so as to enrich the linguistic features of deep learning, wherein the linguistic data enhancement is to respectively replace different synonyms or similar sentences with the first entity identification data and the first entity relation data, so that a robot learns more features, carries out linguistic data enhancement, generates more dialogue data linguistic data, and obtains the entity identification training data and the entity relation training data so as to enrich the linguistic features of deep learning.
S14, inputting the entity recognition training data and the entity relation training data into an initial model, and training the initial model until the estimated questioning intention result output by the initial model meets the preset condition, so as to obtain a questioning intention recognition model after training.
And inputting the entity recognition training data and the entity relationship training data into an initial model so that the initial model learns based on the entity recognition training data, the entity relationship training data and the corresponding questioning intention labels, and determining that the initial model training is completed until the similarity between the estimated questioning intention result output by the initial model and the questioning intention labels is greater than a preset threshold value, thereby obtaining the questioning intention recognition model.
According to the construction method of the questioning intention recognition model, provided by the embodiment of the invention, historical dialogue data corpus of a user and customer service is obtained, wherein the historical dialogue data corpus comprises questioning intention labels; entity identification and entity relation extraction are carried out on the historical dialogue data corpus, and first entity identification data and first entity relation data are obtained; performing data enhancement processing on the first entity identification data and the first entity relation data to obtain entity identification training data and entity relation training data; inputting the entity recognition training data and the entity relation training data into an initial model, and training the initial model until the estimated questioning intention result output by the initial model meets the preset condition, so as to obtain a questioning intention recognition model after training. Compared with the prior question-answering mode, the knowledge base searching efficiency is low when typing. Or the automatic question-answering system is based on simple keyword matching, and the problem that intelligent reasoning and recommendation and user semantic recognition effect are poor can not be achieved. According to the method, the questioning intention recognition model is constructed, the questioning intention recognition can be carried out on the voice or the words input by the user, so that the corresponding dredging answer is searched according to the questioning intention, the functions of efficient and intelligent reasoning and recommendation can be realized, and the use sense of the user is improved.
Fig. 2 is a flow chart of a method for identifying a question intention, which is provided in an embodiment of the present invention, as shown in fig. 2, and the method specifically includes:
s21, acquiring a question sentence sent by a target user through a user side.
The questioning intention recognition method provided by the embodiment of the invention is preferentially applicable to building knowledge questioning and answering scenes in the building industry, and firstly, questioning sentences sent by a target user through a user side are obtained. The target user can input voice, and the system recognizes the voice converted text; alternatively, the target user may directly type in the question sentence, and the embodiment of the present invention does not specifically limit the input form of the question sentence.
S22, entity identification and entity relation extraction are carried out on the question sentences, and target entity identification data and target entity relation data are obtained.
Extracting character features for entity recognition in the question sentence through the entity recognition model, and carrying out entity recognition based on the character features to obtain target entity recognition data; extracting semantic features corresponding to the target entity identification data through a relation extraction model; and extracting entity relations based on the semantic features to obtain target entity relation data.
For example, please ask a question how do anomalies in daily demand plans for materials in an information-based system appear? The entity is daily demand planning of materials, the entity is data, the relationship is data abnormality, entity prediction is carried out on the extracted entity identification characteristics, and then the specific relationship of the two entities is predicted by the relationship characteristics.
S23, extracting the questioning intention recognition features based on the target entity recognition data and the target entity relationship data.
The model can determine different relationships corresponding to different entity combinations according to the obtained target entity identification data and target entity relationship data, and achieve intention identification and relationship attribute searching in the dialogue process.
S24, inputting the questioning intention recognition features into a questioning intention recognition model so that the questioning intention recognition model outputs questioning intentions corresponding to the questioning sentences.
Classifying the intention recognition features, and estimating an intention class interval in which the intention of the question sentence is located based on the classification result; and determining the questioning intention corresponding to the questioning sentence based on the intention category interval, the target entity identification data and the target entity relation data.
Further, a knowledge graph is constructed in advance; inquiring the corresponding grooming answer from the knowledge graph based on the questioning intention corresponding to the questioning sentence and feeding back to the user side.
Specifically, the intention range of the sentence is predicted by the intention recognition task, then a specific entity in the sentence is predicted by the entity recognition task continuously in the intention range, then the relation of the entity is predicted by the relation extraction task, and finally the most conforming answer of the sentence is returned to the user.
The intention range of predicting the sentence by the intention recognition task is specifically as follows: classifying the extracted intention recognition features through a Logsoftmax function, predicting the entity recognition features through the Logsoftmax in an intention class interval where the intention of the sentence is located through classification, predicting the concrete relationship of the two entities through the Logsoftmax, and searching the corresponding dredging answers in the knowledge base through the entity class and the relationship.
The display intention means that the user explicitly indicates his own intention requirement in text form, for example, how do i want to ask cost management-pre-settlement management-subcontracting amount lack of subcontracting unit of just approach? The entity of the sentence is the subcontracting amount, the entity is the subcontracting unit, and the relation is lack; the intended verb is a missing unit and the noun is a subcontracting amount.
Further, from the basic flow of building the knowledge graph, the extracted building knowledge is converted into a triplet form corresponding to the node of the Neo4j graph database and the side of the relation entity for storage, and finally the building knowledge graph is displayed on a visual interface, so that the built building knowledge graph is used as a high-quality knowledge source.
For example, information of entity identification and the context thereof is acquired, the relation between the subcontracting amount and the subcontracting unit is predicted through a relation extraction task, and problem guidance is performed according to the relation category: 1. how does the informative packet volume lack be modified? 2. Cost management-absence of subcontracting units for subcontracting amount? 3. Do you need to help you contact the cost management module responsible? 4. Please initiate a question work order, be handled by a professional?
A complete embodiment of NLP service technology is detailed below:
the NLP service technology comprises an NLU module, a DM module and an NLG module; the NLU module adopts NLP technology to identify the intention of the user problem and extract the entity. The intention is to figure out what the user needs to ask, such as inquiring the fault occurrence times or the fault reason; entity extraction is a specific slot value for this purpose. For example, the question is "how many mechanical failures occur in the last month", the intention is "inquiry of the number of failures", the slot value of the failure name is "mechanical failures", and the slot value of the time is "last month". Intent recognition can be described as a classification problem, solved using machine learning methods, such as SVM, fastText; entity extraction is solved using NER (named entity recognition) correlation techniques in NLP.
The DM module matches to the corresponding answer (or takes what action, such as looking up a database or calling an API) based on the question; it is also responsible for session state tracking in multiple rounds of sessions, deciding how to proceed to the next round of session (or take action directly) based on the current session state (obtained from historical session content updates). For example, a question about what is the number of faults of the tower crane in the last month is, except for two slots of the fault name and the time, and the DM module decides to continue to inquire the user about what tower crane's fault? ". Common DM strategies include finite state machines, HMMs, and neural networks.
The NLG module converts the results (such as keywords and aggregate data) returned by the DM module into natural language text, and the most common method is to generate answers through rule templates, similar to the reverse process of question matching in NLU.
ASR and TTS represent speech recognition and speech synthesis, which respectively realize speech-to-text and text-to-speech functions, are the entrance and exit of a conversation robot, and are the parts for speech interaction with a user.
According to the questioning intention recognition method provided by the embodiment of the invention, the questioning sentences sent by the target user through the user side are obtained; performing entity identification and entity relation extraction on the question sentences to obtain target entity identification data and target entity relation data; extracting questioning intention recognition features based on the target entity recognition data and target entity relationship data; and inputting the questioning intention recognition features into a questioning intention recognition model so that the questioning intention recognition model outputs questioning intention corresponding to the questioning sentence. Compared with the prior question-answering mode, the knowledge base searching efficiency is low when typing. Or the automatic question-answering system is based on simple keyword matching, and the problem that intelligent reasoning and recommendation and user semantic recognition effect are poor can not be achieved. According to the method, the constructed questioning intention recognition model is used for recognizing the questioning intention of the voice or the text input by the user, and the intention, the key entity and the entity relation of the customer service questions can be accurately predicted, so that the corresponding dredging answers can be searched according to the questioning intention, the functions of efficient and intelligent reasoning and recommendation can be realized, the user semantic recognition effect is good, the phenomenon of answering questions is avoided, and the use feeling of the user is improved.
Fig. 3 is a schematic structural diagram of a device for constructing a question intention recognition model according to an embodiment of the present invention, which specifically includes:
the data obtaining module 301 is configured to obtain a historical dialogue data corpus of a user and a customer service, where the historical dialogue data corpus includes a question intention tag. The detailed description refers to the corresponding related description of the above method embodiments, and will not be repeated here.
The recognition extraction module 302 is configured to perform entity recognition and entity relationship extraction on the historical dialog data corpus to obtain first entity recognition data and first entity relationship data. The detailed description refers to the corresponding related description of the above method embodiments, and will not be repeated here.
And the data processing module 303 is configured to perform data enhancement processing on the first entity identification data and the first entity relationship data, so as to obtain entity identification training data and entity relationship training data. The detailed description refers to the corresponding related description of the above method embodiments, and will not be repeated here.
The model training module 304 is configured to input the entity recognition training data and the entity relationship training data into an initial model, and train the initial model until an estimated questioning intention result output by the initial model meets a preset condition, thereby obtaining a questioning intention recognition model after training is completed. The detailed description refers to the corresponding related description of the above method embodiments, and will not be repeated here.
The device for constructing the questioning intention recognition model provided in this embodiment may be a device for constructing the questioning intention recognition model as shown in fig. 3, and may perform all steps of the method for constructing the questioning intention recognition model as shown in fig. 1, so as to achieve the technical effects of the method for constructing the questioning intention recognition model as shown in fig. 1, and detailed descriptions with reference to fig. 1 are omitted herein for brevity.
Fig. 4 is a schematic structural diagram of a questioning intention recognition device according to an embodiment of the present invention, which specifically includes:
the data acquisition module 401 is configured to acquire a question sentence sent by a target user through a user side. The detailed description refers to the corresponding related description of the above method embodiments, and will not be repeated here.
And the recognition extraction module 402 is configured to perform entity recognition and entity relationship extraction on the question sentence to obtain target entity recognition data and target entity relationship data. The detailed description refers to the corresponding related description of the above method embodiments, and will not be repeated here.
The recognition extraction module 402 is configured to extract a question intention recognition feature based on the target entity recognition data and the target entity relationship data. The detailed description refers to the corresponding related description of the above method embodiments, and will not be repeated here.
The intention recognition module 403 is configured to input the question intention recognition feature into a question intention recognition model, so that the question intention recognition model outputs a question intention corresponding to the question sentence. The detailed description refers to the corresponding related description of the above method embodiments, and will not be repeated here.
The questioning intention recognition device provided in this embodiment may be a questioning intention recognition device as shown in fig. 4, and may perform all steps of the questioning intention recognition method as shown in fig. 2, so as to achieve the technical effects of the questioning intention recognition method as shown in fig. 2, and the details of the questioning intention recognition method are described with reference to fig. 2, and are not repeated herein for brevity.
Fig. 5 illustrates a computer device according to an embodiment of the present invention, and as shown in fig. 5, the computer device may include a processor 501 and a memory 502, where the processor 501 and the memory 502 may be connected by a bus or otherwise, and in fig. 5, the connection is exemplified by a bus.
The processor 501 may be a central processing unit (Central Processing Unit, CPU). The processor 501 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination thereof.
The memory 502, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the methods provided in the embodiments of the present invention. The processor 501 executes various functional applications of the processor and data processing, i.e., implements the methods of the method embodiments described above, by running non-transitory software programs, instructions, and modules stored in the memory 502.
Memory 502 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created by the processor 501, etc. In addition, memory 502 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 502 may optionally include memory located remotely from processor 501, which may be connected to processor 501 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more modules are stored in the memory 502 that, when executed by the processor 501, perform the methods of the method embodiments described above.
The specific details of the computer device may be correspondingly understood by referring to the corresponding related descriptions and effects in the above method embodiments, which are not repeated herein.
It will be appreciated by those skilled in the art that implementing all or part of the above-described embodiment method may be implemented by a computer program to instruct related hardware, and the program may be stored in a computer readable storage medium, and the program may include the above-described embodiment method when executed. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations are within the scope of the invention as defined by the appended claims.
Claims (13)
1. The construction method of the questioning intention recognition model is characterized by comprising the following steps:
acquiring historical dialogue data corpus of a user and customer service, wherein the historical dialogue data corpus comprises a question intention label;
entity identification and entity relation extraction are carried out on the historical dialogue data corpus, and first entity identification data and first entity relation data are obtained;
performing data enhancement processing on the first entity identification data and the first entity relation data to obtain entity identification training data and entity relation training data;
inputting the entity recognition training data and the entity relation training data into an initial model, and training the initial model until the estimated questioning intention result output by the initial model meets the preset condition, so as to obtain a questioning intention recognition model after training.
2. The method of claim 1, wherein performing entity recognition and entity relationship extraction on the historical dialog data corpus to obtain first entity recognition data and first entity relationship data comprises:
extracting character features for entity recognition from the historical dialogue data corpus by using a dependency syntactic analysis method through an entity recognition model;
performing entity recognition based on the character features to obtain first entity recognition data;
extracting semantic features corresponding to the first entity identification data by using a BiGRU network through a relation extraction model;
and extracting entity relations based on the semantic features to obtain first entity relation data.
3. The method according to claim 2, wherein the performing data enhancement processing on the first entity identification data and the first entity relationship data to obtain entity identification training data and entity relationship training data includes:
and carrying out synonym and/or synonym replacement processing on the first entity identification data and the first entity relation data to obtain entity identification training data and entity relation training data.
4. The method according to claim 2, wherein the inputting the entity recognition training data and the entity relationship training data into an initial model, and training the initial model until the estimated question intention result output by the initial model meets a preset condition, and obtaining a trained question intention recognition model includes:
inputting the entity recognition training data and the entity relation training data into an initial model, so that the initial model learns based on the entity recognition training data, the entity relation training data and the corresponding questioning intention labels, and determining that the initial model training is completed until the similarity between the estimated questioning intention result output by the initial model and the questioning intention labels is greater than a preset threshold value, so as to obtain the questioning intention recognition model.
5. The method of claim 1, wherein after the obtaining the historical dialog data corpus of the user and the customer service, the method further comprises:
and carrying out data preprocessing on the historical dialogue data corpus, wherein the data preprocessing at least comprises data cleaning and part-of-speech tagging.
6. A method for identifying a question intention, comprising:
acquiring a question sentence sent by a target user through a user side;
performing entity identification and entity relation extraction on the question sentences to obtain target entity identification data and target entity relation data;
extracting questioning intention recognition features based on the target entity recognition data and target entity relationship data;
inputting the questioning intention recognition features into the questioning intention recognition model constructed according to any one of claims 1 to 5, so that the questioning intention recognition model outputs the questioning intention corresponding to the questioning sentence.
7. The method of claim 6, wherein performing entity recognition and entity relationship extraction on the question sentence to obtain target entity recognition data and target entity relationship data comprises:
extracting character features for entity recognition in the question sentence through an entity recognition model;
performing entity recognition based on the character features to obtain target entity recognition data;
extracting semantic features corresponding to the target entity identification data through a relation extraction model;
and extracting entity relations based on the semantic features to obtain target entity relation data.
8. The method of claim 6, wherein the inputting the question identification feature into the question identification model constructed in any one of claims 1 to 5, so that the question identification model outputs the question corresponding to the question sentence, comprises:
classifying the intention recognition features, and estimating an intention category interval in which the intention of the question sentence is located based on a classification result;
and determining the questioning intention corresponding to the questioning sentence based on the intention category interval, the target entity identification data and the target entity relation data.
9. The method of claim 8, wherein the method further comprises:
pre-constructing a knowledge graph;
inquiring a corresponding guiding answer from the knowledge graph based on the questioning intention corresponding to the questioning sentence and feeding back the guiding answer to the user side.
10. A device for constructing a question intention recognition model, comprising:
the data acquisition module is used for acquiring historical dialogue data corpus of a user and customer service, wherein the historical dialogue data corpus comprises a questioning intention label;
the recognition extraction module is used for carrying out entity recognition and entity relation extraction on the historical dialogue data corpus to obtain first entity recognition data and first entity relation data;
the data processing module is used for carrying out data enhancement processing on the first entity identification data and the first entity relation data to obtain entity identification training data and entity relation training data;
the model training module is used for inputting the entity recognition training data and the entity relation training data into an initial model, and training the initial model until the estimated questioning intention result output by the initial model meets the preset condition, so as to obtain a questioning intention recognition model after training.
11. A question intention recognition apparatus, comprising:
the data acquisition module is used for acquiring a question statement sent by a target user through a user side;
the identification and extraction module is used for carrying out entity identification and entity relation extraction on the question sentences to obtain target entity identification data and target entity relation data;
the identification and extraction module is used for extracting questioning intention identification characteristics based on the target entity identification data and the target entity relation data;
the intention recognition module is used for inputting the questioning intention recognition characteristics into a questioning intention recognition model so that the questioning intention recognition model outputs questioning intention corresponding to the questioning sentence.
12. A computer device, comprising: the processor and the memory are used for executing a construction program of the questioning intention recognition model and a questioning intention recognition program stored in the memory to realize the construction method of the questioning intention recognition model according to any one of claims 1 to 5 and the questioning intention recognition method according to any one of claims 6 to 9.
13. A storage medium storing one or more programs executable by one or more processors to implement the method of constructing a question-intent recognition model as claimed in any one of claims 1 to 5 and the method of recognizing a question intent as claimed in any one of claims 6 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311351254.3A CN117252211A (en) | 2023-10-18 | 2023-10-18 | Construction of questioning intention recognition model and questioning intention recognition method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311351254.3A CN117252211A (en) | 2023-10-18 | 2023-10-18 | Construction of questioning intention recognition model and questioning intention recognition method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117252211A true CN117252211A (en) | 2023-12-19 |
Family
ID=89136809
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311351254.3A Pending CN117252211A (en) | 2023-10-18 | 2023-10-18 | Construction of questioning intention recognition model and questioning intention recognition method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117252211A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019153522A1 (en) * | 2018-02-09 | 2019-08-15 | 卫盈联信息技术(深圳)有限公司 | Intelligent interaction method, electronic device, and storage medium |
WO2022041728A1 (en) * | 2020-08-28 | 2022-03-03 | 康键信息技术(深圳)有限公司 | Medical field intention recognition method, apparatus, device and storage medium |
CN114860934A (en) * | 2022-05-09 | 2022-08-05 | 青岛日日顺乐信云科技有限公司 | Intelligent question-answering method based on NLP technology |
CN116257610A (en) * | 2023-01-11 | 2023-06-13 | 山西长河科技股份有限公司 | Intelligent question-answering method, device, equipment and medium based on industry knowledge graph |
-
2023
- 2023-10-18 CN CN202311351254.3A patent/CN117252211A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019153522A1 (en) * | 2018-02-09 | 2019-08-15 | 卫盈联信息技术(深圳)有限公司 | Intelligent interaction method, electronic device, and storage medium |
WO2022041728A1 (en) * | 2020-08-28 | 2022-03-03 | 康键信息技术(深圳)有限公司 | Medical field intention recognition method, apparatus, device and storage medium |
CN114860934A (en) * | 2022-05-09 | 2022-08-05 | 青岛日日顺乐信云科技有限公司 | Intelligent question-answering method based on NLP technology |
CN116257610A (en) * | 2023-01-11 | 2023-06-13 | 山西长河科技股份有限公司 | Intelligent question-answering method, device, equipment and medium based on industry knowledge graph |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108491443B (en) | Computer-implemented method and computer system for interacting with a user | |
CN104050160B (en) | Interpreter's method and apparatus that a kind of machine is blended with human translation | |
CN111241237B (en) | Intelligent question-answer data processing method and device based on operation and maintenance service | |
CN112069298A (en) | Human-computer interaction method, device and medium based on semantic web and intention recognition | |
CN108984778A (en) | A kind of intelligent interaction automatically request-answering system and self-teaching method | |
US20230394247A1 (en) | Human-machine collaborative conversation interaction system and method | |
CN112948534A (en) | Interaction method and system for intelligent man-machine conversation and electronic equipment | |
WO2020233386A1 (en) | Intelligent question-answering method and device employing aiml, computer apparatus, and storage medium | |
CN115495563A (en) | Intelligent session method and server based on table data retrieval | |
US11907665B2 (en) | Method and system for processing user inputs using natural language processing | |
WO2024011813A1 (en) | Text expansion method and apparatus, device, and medium | |
CN115470338B (en) | Multi-scenario intelligent question answering method and system based on multi-path recall | |
CN114818649A (en) | Service consultation processing method and device based on intelligent voice interaction technology | |
CN115392264A (en) | RASA-based task-type intelligent multi-turn dialogue method and related equipment | |
CN114969297A (en) | Method for analyzing power customer appeal relevancy | |
CN112036186A (en) | Corpus labeling method and device, computer storage medium and electronic equipment | |
TW202034207A (en) | Dialogue system using intention detection ensemble learning and method thereof | |
CN107609096B (en) | Intelligent lawyer expert response method | |
Röpke et al. | Training a Speech-to-Text Model for Dutch on the Corpus Gesproken Nederlands. | |
CN115221284A (en) | Text similarity calculation method and device, electronic equipment and storage medium | |
CN117252211A (en) | Construction of questioning intention recognition model and questioning intention recognition method and device | |
CN112506405B (en) | Artificial intelligent voice large screen command method based on Internet supervision field | |
CN114238595A (en) | Metallurgical knowledge question-answering method and system based on knowledge graph | |
CN113761081A (en) | Method and system for carrying out multi-dimensional combined retrieval on enterprise information | |
CN112925889A (en) | Natural language processing method, 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 |