CN113282734A - Question-answer processing method, device, equipment and medium based on structured data - Google Patents

Question-answer processing method, device, equipment and medium based on structured data Download PDF

Info

Publication number
CN113282734A
CN113282734A CN202110720182.XA CN202110720182A CN113282734A CN 113282734 A CN113282734 A CN 113282734A CN 202110720182 A CN202110720182 A CN 202110720182A CN 113282734 A CN113282734 A CN 113282734A
Authority
CN
China
Prior art keywords
structured data
target
question
user
classification
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
Application number
CN202110720182.XA
Other languages
Chinese (zh)
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202110720182.XA priority Critical patent/CN113282734A/en
Publication of CN113282734A publication Critical patent/CN113282734A/en
Pending legal-status Critical Current

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/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • 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
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/194Calculation of difference between files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Abstract

The invention relates to the technical field of artificial intelligence, is applied to an intelligent response scene, and discloses a question and answer processing method, a question and answer processing device, question and answer processing equipment and a question and answer processing medium based on structured data so as to solve the problems of large knowledge base volume and difficulty in maintenance. The method comprises the following steps: acquiring target structured data, wherein the target structured data comprises structured data corresponding to a plurality of intention classifications, each intention classification structured data comprises a group of structured data uniquely corresponding to each corresponding sub-classification information under the intention classification, and the similarity of each group of structured data is lower than the preset similarity; acquiring a target intention classification to which a user question belongs; determining whether the target intent classification belongs to an intent classification in the target structured data; if the user question belongs to the target purpose, performing slot position information extraction on the user question according to the target purpose classification; searching the content which accords with the slot information in the structured data corresponding to the target intention classification; and responding to the user question according to the search content.

Description

Question-answer processing method, device, equipment and medium based on structured data
Technical Field
The invention relates to the field of artificial intelligence, relates to an intelligent response application scene, and particularly relates to a question and answer processing method, device, equipment and medium based on structured data.
Background
The intelligent customer service/intelligent assistant is one of the most extensive and important ways for the NLP technology to fall to the actual scene, wherein a question answering engine (QA) system is a core module of the intelligent customer service system. For the question-answering engine system, the most commonly used technology in the industry is a question-answering technology based on a search formula, namely, a plurality of question-answering knowledge bases are defined in advance through a business expert, a series of QA pairs are provided, each standard question corresponds to an answer, then a user question finds a synonymous question through a semantic matching model technology, and then a corresponding answer is replied.
In the traditional scheme, when the corpus of the semantic matching model is insufficient, the difficulty of the semantic matching model is high, and the problem of a large number of slight differences is difficult to identify, such as 'professional level of programmers and professional level of IT'. This can make the expert work too much in writing a knowledge base, for example: the professional grade of the programmer and the knowledge base problem need to be written with a large amount of concrete similar expressions such as professional corpora of the programmer, IT and software engineers if the coverage is required to be complete, the workload is large, the volume of the knowledge base is too large, and the maintenance is difficult.
Disclosure of Invention
The invention provides a question-answer processing method, a question-answer processing device, question-answer processing equipment and a question-answer processing medium based on structured data, and aims to solve the problems that a knowledge base is large in size and difficult to maintain.
A question-answer processing method based on structured data comprises the following steps:
acquiring target structured data, wherein the target structured data comprises structured data corresponding to a plurality of intention classifications, each intention classification structured data comprises a group of structured data uniquely corresponding to each corresponding sub-classification information under the intention classification, and the similarity of each group of structured data is lower than the preset similarity;
the method comprises the steps of obtaining user questions fed back by a user side, and carrying out intention identification on the user questions to obtain target intention classifications to which the user questions belong;
determining whether the target intent classification belongs to an intent classification in the target structured data;
if the target intention classification belongs to the intention classification in the target structured data, extracting slot position information of the user question according to the target intention classification;
if the slot position information is extracted, searching the content which accords with the slot position information in the structured data corresponding to the target intention classification;
and if the search content which accords with the slot position information is searched, responding to the user question according to the search content.
A question-answering processing device based on structured data, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the target structured data comprises structured data corresponding to a plurality of intention classifications, the structured data of each intention classification comprises a plurality of sub-layer classification information corresponding to the intention classification, and each sub-layer classification information corresponds to a unique group of structured data;
the second acquisition module is used for acquiring the user question fed back by the user side and identifying the intention of the user question to acquire the target intention classification of the user question;
a judging module, configured to judge whether the target intent classification belongs to an intent classification in the target structured data;
the extraction module is used for extracting the slot position information of the user question according to the target intention classification if the target intention classification belongs to the intention classification in the target structured data;
the searching module is used for searching the content which accords with the slot position information in the structured data corresponding to the target intention classification if the slot position information is extracted;
and the response module is used for responding to the user question according to the search content if the search content which accords with the slot position information is searched out.
A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above question-answering processing method based on structured data when executing the computer program.
A computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the above-described structured data-based question-answer processing method.
In the above-mentioned solution implemented by the question-answering processing method, apparatus, computer device and storage medium based on structured data, only one target structured data needs to be provided, and each sub-classification information corresponding to each type of intention in the target structured data uniquely corresponds to one group of structured data, so that, as can be seen, the granularity of data content is controlled according to a specific scenario, for example: the professional grade of the computer engineer only needs one piece of data, the computer software engineer/computer hardware engineer does not need to be additionally split, and the synonym problem does not need to be expanded by the computer engineer/computer hardware engineer, for example, programmers/coders do not need to be expanded. Therefore, the work of compiling the knowledge base can be greatly reduced, the work load of compiling the knowledge base is greatly reduced, the volume of the knowledge base is smaller than that of the prior art, and the subsequent knowledge base, namely the target structured data, is easier to maintain.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a diagram of an application environment of a method for processing questions and answers based on structured data according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for processing questions and answers based on structured data according to an embodiment of the present invention;
FIG. 3 is another flow chart of a method for processing questions and answers based on structured data according to an embodiment of the present invention;
FIG. 4 is another flow chart of a method for processing questions and answers based on structured data according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a query tool in a question-answering processing method based on structured data according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a question-answering processing device based on structured data according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The question-answer processing method based on the structured data provided by the embodiment of the invention can be applied to the application environment shown in fig. 1, wherein a user side communicates with a server through a network. The server is used for acquiring target structured data, the target structured data comprises structured data corresponding to a plurality of intention classifications, the structured data of each intention classification comprises a plurality of sub-hierarchy classification information corresponding to the intention classification, and each sub-hierarchy classification information corresponds to a unique group of structured data; the server can acquire the user questions fed back by the user side and perform intention identification on the user questions to acquire target intention classifications to which the user questions belong; the server judges whether the target intention classification belongs to intention classifications in the target structured data; if the target intention classification belongs to intention classification in the target structured data, the server extracts slot position information of the user question according to the target intention classification; if the server extracts the slot information, searching the content which accords with the slot information in the structured data corresponding to the target intention classification; and if the search content meeting the slot position information is searched, responding by the server according to the user question fed back by the search content user side. The user terminal may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server may be implemented as a stand-alone server or as a server cluster consisting of a plurality of servers.
In an embodiment, as shown in fig. 2, a method for processing a question and answer based on structured data is provided, which is described in detail by taking the method as an example applied to the server in fig. 1, and includes the following steps:
s10: acquiring target structured data, wherein the target structured data comprises structured data corresponding to a plurality of intention classifications, the structured data of each intention classification comprises a plurality of sub-hierarchy classification information corresponding to the intention classification, and each sub-hierarchy classification information uniquely corresponds to one group of structured data.
The intelligent question-answering processing method provided by the invention can be applied to intelligent question-answering engines such as intelligent customer service or intelligent assistants and the like in various application scenes. For example, in some application scenarios, it is assumed that for a new project, a corresponding question and answer engine system is usually required to be constructed to respond. In the traditional scheme, a search-type intelligent customer service question-answering engine system is usually set up to respond to the relevant questions of the project. First, the business expert will provide some standard question-answering system for the system, in the format: standard question → standard answer.
For example: what the professional rating of the chef is → the life insurance risk rating of the chef is level 6, the medical insurance risk rating is level 1, and the professional code is 123456.
Due to the text similarity matching scheme, the service expert needs to provide another candidate set of similarity questions, namely the format is as follows: standard question- > similar question- > standard answer. For example:
standard questions: what is the professional grade of the chef?
Similar problems: what is the professional grade of the master of cooking? Is the occupation rating of the Master doing the meal?
Standard answers: the chef's life risk rating is 6, the medical risk rating is 1, and the job code is 123456.
It can be seen that, because the vocational codes and the vocational names are in one-to-one correspondence, where the one-to-one correspondence refers to that there are several expressions such as the same vocational name, official terms and popular expressions, the knowledge base needs to be additionally expanded, otherwise, the model is difficult to identify, so that if the coverage is required to be complete, a large number of vocational language materials with very similar expressions need to be written, the workload is large, the volume of the knowledge base is too large, and the subsequent knowledge base is difficult to maintain. To give a simpler example again: computer engineers, synonymous terms include programmers, coders, Information Technology (IT), and the like, when experts write a question and answer knowledge base, if the problems need to be well covered, the synonymous terms of each profession need to be expanded and written out as much as possible, so that the workload is high, and the expansion difficulty is high.
It should be noted that the foregoing is only an example of the professional-grade problem, and actually, similar cases and other similar intentions have the same problem, and it is not to be construed that, for convenience of description, the following examples may also be mostly described by taking the professional-grade problem as an example, but do not limit the present invention.
In order to solve the problems, in the invention, firstly, some intention classification problems which are difficult to solve or have large workload of writing corpus are combed according to specific service scenes, and a piece of structured data is sorted according to each intention classification to obtain structured data which comprises a plurality of intention classifications, namely target structured data, wherein the structured data of each intention classification comprises a plurality of sub-hierarchy classification information corresponding to the intention classification, each sub-hierarchy classification information uniquely corresponds to one group of structured data, and the similarity of each two groups of structured data is lower than the preset similarity.
For example, in some insurance business scenarios, several broad categories of intent questions may be collated, depending on the intent questions that may be involved: fixed point hospital class/professional class/chlorous hospital class/claim material class/bank card number class/administrative territory class, etc. For each intent classification, a piece of structured data can be collated. More specifically, taking the professional-grade class as an example, the corresponding structured data related to the intent of the professional-grade class is sorted out, wherein the following list 1 can be used:
Figure BDA0003136214120000071
Figure BDA0003136214120000081
TABLE 1
It can be seen that, in the structured data corresponding to the professional-grade intention, each line in the corresponding structured data table respectively represents each sub-classification information, the professional-grade intention may include a unique set of structured data corresponding to a plurality of sub-classification information, and the structural relationship of each set of structured data is: major category-middle category-minor category-career code-career name-life risk level-medical risk level. For example, for the word "farmer" classification information, the corresponding unique set of structured data is in the following order: 5 agricultural, forestry, animal husbandry, fishery and water conservancy personnel-501 plantation personnel-50101 field crop personnel-123456-farmer-1-1. For another example, for the word "vegetable horticulture worker" classification information, the corresponding unique set of structured data sequence is: 5 agricultural, forestry, herding, fishery and water conservancy personnel-501 plantation personnel-50103 gardening operator-123465-vegetable gardening worker-4-4.
It should be noted that, the example in table 1 is only an example, and does not limit the present invention, it is to be noted that in the present invention, the specific structural relationship of the structured data may also be other, the professional intention category may also include many other sub-category information, each sub-category information is different structured data, each sub-category information uniquely corresponds to one group of structured data, that is, for example, for "farmer", only one piece of structured data of farmer is provided, there is no other structured data corresponding to similar "farmer", "farmer practitioner", and the like, the similarity of each group of structured data needs to be lower than the preset similarity, and for "farmer" and "horticulture person", the similarity of two groups of structured data corresponding to both the two groups of structured data is lower than the preset similarity.
It should also be noted that, for other intention classes such as the class of the green channel hospital/the class of the claim material/the class of the bank card number, the corresponding structured data is also set, which is not specifically illustrated here. Similarly, structured data corresponding to other types of intention problems can be obtained, so that a relatively simplified knowledge base can be obtained, and accordingly, simplified target structured data can be obtained, and the target structured data can be realized in a form of a table structure, which is not limited herein.
Through the structured data corresponding to the professional-grade intentions, it can be seen that, in the present invention, only one professional risk grade table needs to be provided, and since each sub-classification information uniquely corresponds to one group of structured data, it can be seen that the granularity of the data content of the table is controlled according to specific scenarios, such as: the professional grade of the computer engineer only needs one piece of data, the computer software engineer/computer hardware engineer does not need to be additionally split, and meanwhile, the expert does not need to extend synonym problems by himself, such as programmers/coders and the like. Therefore, the work of compiling the knowledge base can be greatly reduced, the work load of compiling the knowledge base is greatly reduced, the volume of the knowledge base is smaller than that of the prior art, and the subsequent knowledge base, namely the target structured data, is easier to maintain.
S20: and acquiring the user questions fed back by the user side, and performing intention identification on the user questions to acquire target intention classifications to which the user questions belong.
In the invention, based on the pre-constructed target structured data, a set of intelligent question-answering processing method is correspondingly designed. In a specific implementation, the pre-constructed target structured data may be fed back to the server in an offline manner, so that the server may implement an intelligent question-answering processing method in combination with the target structured data, or obtain the target structured data online in real time, which is not limited herein. First, the server may receive user questions in real time. It should be noted that in some application fields, users often raise questions by telephone or online chatting, and the server needs to reply to some questions of users, so that the user experience and the product popularization rate are facilitated. Among these, for example, the user questions may be: "what is the professional grade of the chef? ".
After receiving the user question, the server firstly performs intention identification on the user question to acquire a target intention classification to which the user question belongs. The specific manner of identifying the intention of the user question may be various, and may be implemented in the form of a keyword pattern, a deep learning model (TextCNN/Bert), or the like, or a relatively mature intention identification method, which is not specifically described or limited herein.
For convenience of understanding, a simple intent recognition algorithm is taken as an example, and in the specific implementation, a rule template can be summarized by manually analyzing representative example sentences under each intent, then the existing template is applied after the user question is subjected to operations such as word segmentation, part of speech tagging, named entity recognition, dependency syntax analysis, semantic analysis and the like, and the user question is considered to belong to the intent category after a certain intent template matched with the user question reaches a certain threshold value.
S30: it is determined whether the target intent classification belongs to an intent classification in the target structured data.
S40: and if the target intention classification belongs to the intention classification in the target structured data, extracting slot position information of the user question according to the target intention classification.
It is understood that in step S30, the pre-constructed target structured data is structured data corresponding to multiple classes of intention classification problems, and therefore, the present invention can know the specific intention classification condition of the target structured data. After the target intent classification corresponding to the user question is identified, it is first determined whether the target intent classification belongs to an intent classification in the target structured data.
Although the pre-constructed target structured data includes a plurality of intention classification situations, it is generally difficult to fully cover all the intention classification situations, and the user problems are various, complicated and complicated, and very various, so that there are two situations for determining whether the target intention classification belongs to the intention classification in the target structured data, one is to determine that the target intention classification belongs to the intention classification in the structured data, and the other is to determine that the target intention classification does not belong to the intention classification in the target structured data. For example, as in the previous example, the user questions are: "what is the professional grade of the chef? "the intention classification recognition algorithm can recognize that the intention belongs to the professional grade type, and the target structured data includes the structured data corresponding to the professional grade type intention, as shown in the above table, so that the target intention classification corresponding to the user question can be determined to belong to the intention classification in the target structured data.
And if the target intention classification belongs to the intention classification in the structured data, the server extracts the slot information of the user question according to the target intention classification. Note that the slot information refers to specific key information in the user question. For example, for the aforementioned job-level-class problem, the slot information includes: career code, career name, etc. In a specific implementation, the slot position information extraction method may be a keyword pattern, a deep learning model (BiLSTM-CRF/Bert, etc.), or other slot position information extraction algorithms, and the specific implementation of the invention is not limited. For example, in some simple ways, the following can also be used: step S40, namely, the slot information extraction is performed on the user question according to the target intention classification, which specifically includes the following steps:
s41: extracting the structured data corresponding to the target intention classification from the target structured data, and performing word segmentation on the user question to obtain a word segmentation set corresponding to the user question;
s42: judging whether the participle set has participles of the structured data corresponding to the target intention classification;
s43: if so, selecting one or more participles of the structured data corresponding to the target intention classification in the participle set as slot position information of the user question;
s44: and if not, judging that the extraction of the slot position information of the user problem fails.
For steps S41-S44, the word segmentation may be extracted by a word segmentation algorithm, and generally one or more word segmentations may be obtained and used as each word segmentation in the word segmentation set to match with the structured data corresponding to the target intention classification, so as to determine whether there is a word segmentation in the structured data corresponding to the target intention classification in the word segmentation set, if there are a plurality of word segmentations, one or more word segmentations in the structured data corresponding to the target intention classification are selected as slot position information of the user problem, which indicates that the slot position information is successfully extracted, and if not, it determines that the slot position information of the user problem is unsuccessfully extracted.
For example:
what the professional grade of the chef is- > the slot information that can be recognized is the professional name: cook (a cook)
Career code is what the grade of 654321 is- > slot information that can be recognized is career code: 654321.
s50: and judging whether slot position information is extracted or not.
S60: and if the slot information is extracted, searching the content which accords with the slot information in the structured data corresponding to the target intention classification.
In the slot information extraction process of classifying user problems according to the target intention, there are two cases, one is that slot information can be extracted, and the other is that slot information cannot be extracted. And if the slot information is extracted, searching in the target structured data through the slot information so as to search out the content which accords with the slot information. In some embodiments, in order to reduce unnecessary searching amount, the corresponding structured data under the corresponding intention classification can be searched according to the extracted slot position information, so as to fully retrieve the content which is in line with the grass slot position information, and obtain the searched content.
For ease of understanding, a simple example is given here:
user questions: what is the grade of the vocational code 123456?
And (3) identifying the intention: a category of occupation rating;
identified slot position information: occupation code: 123456;
therefore, the content searched by the slot information 123456 is finally as shown in the following table 2:
Figure BDA0003136214120000121
TABLE 2
S70: and judging whether searching content meeting the slot position information is searched out or not.
S80: and if the search content meeting the slot position information is searched, responding to the user question according to the search content.
According to the above example, for the user problem, the searched content meeting the slot information includes information such as a major category, a middle category, a lower category, a professional name, a life risk level, and a medical risk level corresponding to the corresponding career code 123456. Therefore, the user question asks what the career code is at the level of 123456, and thus the results of the life risk level of 123456 of 1 and the medical risk level of 1 are fed back to the user to respond. It should be noted that the above example is only an exemplary illustration, and after the search content is searched out, the specific response content depends on the user question, for example, if the user question is: what the job name is for job code 123456, then the job name may be fed back to the user as a farmer.
It can be seen that, in the embodiment of the present invention, an intelligent question-answering processing method based on structured data is provided, and as structured data corresponding to each type of intention problem is used, an expert only needs to provide target structured data of an occupational risk level table, and the granularity of the data content of the table is controlled according to a specific scene, and does not need to expand synonym problems by himself, for example, programmers/coders and the like do not need to be expanded, and answers needed by searching in the structured data are searched according to a manner of identifying the intention of a user problem, so that work of compiling a knowledge base can be greatly reduced, work load of compiling the knowledge base is greatly reduced, and excessive volume of the knowledge base is not caused, and subsequent knowledge bases are easy to maintain.
In some embodiments, as shown in FIG. 3, after step 30, i.e., after determining whether the target intent classification belongs to an intent classification in the target structured data, the method further comprises the following steps;
s80: and if the target intention classification does not belong to the intention classification in the target structured data, accessing another intelligent question-answering engine system for answering.
Or;
s90: and calling the customer service dispatching module to enable the customer service dispatching module to assign the incoming line of the user to an idle seat client according to the idle state of the current login seat, wherein the seat client is used for acquiring the preset question and answer and the basic information of the user and reminding the seat to access the incoming line of the user.
For steps S80-S90, as described in the foregoing, there are two cases in determining whether the target intent classification belongs to an intent classification in the target structured data, one is determining that the target intent classification belongs to an intent classification in the target structured data, and when the target intent classification belongs to an intent classification in the target structured data, the extraction of slot information and the subsequent steps are performed according to normal, and the corresponding description of the foregoing embodiments is specifically referred to. The other is to judge that the target intention classification does not belong to the intention classification in the target structured data, and when the target intention classification does not belong to the intention classification in the target structured data, the invention provides two specific embodiments.
The first is to access another intelligent question-answering engine system to answer. Wherein the other intelligent question engine system is another set of intelligent answer engine system, which may refer to a conventional intelligent question engine system based on semantic matching model.
The second one is that a customer service dispatching module is called, so that the customer service dispatching module can be in an idle state according to the current login seat, wherein the seat refers to an artificial customer service seat, the seat has different states according to the condition that whether the artificial customer service is logged in or not and whether a user is accessed, and when the artificial customer service is logged in the seat and is accessed to the user, the seat is in a busy state; when the manual customer service login seat does not access the incoming line of the user, the seat is in an idle state. The customer service dispatching module is a service end which is specially used for distributing manual seats for users needing manual customer service. When the server calls the customer service dispatching module, namely the customer service dispatching module receives the calling request of the server, the customer service dispatching module knows that the incoming line of the user needs to be accessed in a manual customer service mode at the moment so as to solve the question of the user. Therefore, the customer service dispatching module appoints the user incoming line to an idle customer end according to the idle state of the current login customer end, wherein the customer end is used for obtaining the preset question and answer and the basic information of the customer, reminding the customer end to access the user incoming line, and solving the user problem in a manual customer service mode.
According to the method, when the target intention classification is judged not to belong to the intention classification in the target structured data, the embodiment of the invention also has a corresponding question-answer strategy, so that the feasibility of the scheme is increased, the condition that the user cannot respond to the user is avoided, and the user experience is greatly increased.
In some embodiments, after step S40, that is, after slot information extraction is performed on the user question according to the target intent classification, the method further includes the following steps:
s90: and if the slot position information is determined not to be extracted, acquiring recommended content from the structured data corresponding to the target intention classification, and feeding back the recommended content to the user.
As mentioned above, in the slot information extraction process for classifying the user problem according to the target intention, there are two cases, one is that the slot information can be extracted, and when the slot information can be extracted, the aforementioned embodiment can be referred to correspondingly. The other is that the slot information cannot be extracted, and when the slot information cannot be extracted, because it is determined that the target intention classification corresponding to the current user problem belongs to the intention classification in the target structured data, the embodiment of the present invention can obtain the recommended content from the structured data corresponding to the target intention classification and feed back the recommended content to the user.
It should be noted that, since accurate slot information cannot be extracted, when obtaining recommended content from structured data corresponding to a target intention classification, required search content may be extracted as recommended content according to a specific algorithm, or all search content may be fed back, and the present invention is not limited in particular.
Wherein, after the step S60, after searching in the target structured data through the slot information, the method further includes:
s100: and if the search content meeting the slot position information is not searched, acquiring recommended content from the structured data corresponding to the target intention classification, and feeding back the recommended content to the user.
It should be noted that, in the process of extracting slot information and searching according to the slot information, the search content conforming to the slot information is not searched out due to some unknown reasons, such as system jamming, or because the target structured data lacks the slot information.
For example:
user questions: i want to inquire a lower occupation level code table, although the occupation level type intention can be identified, no slot is provided;
user questions: what the career code is 9999 level- > although it can recognize the career level class intention, it can also recognize the slot career code is 9999, but there is no data satisfying the career code is 9999 in the target structured data.
For the situation that the user intention can be identified but no retrieval answer is provided, in the embodiment of the present invention, the recommended content is obtained from the structured data corresponding to the target intention classification, and the required search content may be extracted according to a specific algorithm as the recommended content, or all the search contents are fed back, which is not limited in the specific invention.
It should be noted that, for the above situation that the search content cannot be searched out or the slot information cannot be extracted, the recommended content is obtained from the structured data corresponding to the target intent classification according to the preset manner to respond to the user question, and for the above process, the present invention provides a specific implementation manner, that is, according to the preset manner, the recommended content is obtained from the structured data corresponding to the target intent classification to respond to the user question, as shown in fig. 4, the following steps are specifically included:
s101: and the self-checking instruction fed back to the user side enables the user side to display a corresponding query interface, and the query interface comprises a query frame for inputting query information by the user.
And feeding back a self-checking instruction to the user side aiming at the condition that the search content cannot be searched or the slot information cannot be extracted, wherein the user side is configured to sort according to the target intention corresponding to the user problem and pop up a corresponding query interface after receiving the self-checking instruction, so that the user can perform one-step query. That is to say, the display form of the popped-up query interface is generated according to the target intention classification corresponding to the user question, and the specific display form may be configured, and the specific invention is not limited thereto, wherein the query interface includes a query box for the user to input query information.
S102: and receiving query information input by a user in a query box, and searching a plurality of matching item contents corresponding to the query information from the structured data corresponding to the target intention classification.
S103: and feeding back the content of the matching item to the user side, and displaying the content of the matching item at the corresponding position of the query box by the user side.
After popping up the query interface, the user can input corresponding content in the query box of the query interface, and a recommendation prompting function is provided in the input process, namely: when the user inputs a driver, the content of the matching item prompted by the prompt function comprises a tower crane driver/taxi driver and the like, and the user can directly click and select specific content. The contents such as tower crane drivers/taxi drivers and the like are a plurality of matching items searched from the structured data corresponding to the professional intention class by the server according to the drivers input by the user on the query interface.
S104: and determining target matching item contents selected by the user in the plurality of matching item contents, and searching out associated recommended contents in the structured data corresponding to the target intention classification according to the target matching item contents.
S105: and feeding back the associated recommended content to the user side so that the user side displays the associated recommended content in a corresponding display frame of the query interface.
As shown in fig. 5, for steps S104 to S105, after the associated recommended content is displayed in the corresponding display box of the query interface, the user may select himself, for example, what occupation the driver belongs to is actually asked about by the user, at this time, it is determined that the driver belongs to the occupation type problem, a plurality of matching item contents related to the driver, for example, contents of tower crane driver/taxi driver/truck driver/asphalt truck driver, etc., are searched from the corresponding structured data, and then, the contents are fed back to the user side as an input prompt option to give the user a selection. After the user selects the tower crane driver, the server determines the selection of the user, and accordingly, a plurality of matching item contents related to the tower crane driver, such as occupation codes (e.g. 49000), occupation grades (e.g. 1-7 grades) and the like, are continuously searched in the corresponding structural data according to the tower crane driver and are fed back to the user side for display. It can be seen that in this embodiment, the content prompted by the prompt function is obtained by querying in the corresponding structured data by the tower crane driver, so that it is ensured that the value of the slot is inevitably stored in the structured data, and the associated recommended content (occupation level, occupation code, etc.) of the tower crane driver is also obtained by querying in the target structured data, so that the condition that the retrieval content is empty does not exist. It should be noted that the form or content of the query tool is only exemplified by the professional grade class, and does not limit the present invention, and other intention classes may be modified accordingly, and it is mainly intended to describe another implementation manner that effectively ensures accurate response to the user's question when the slot information is not extracted or the information cannot be queried from the structured data according to the slot information.
In summary, in this embodiment, the user may be guided to perform professional query by displaying a query interface widget, for example: for the professional ranking class, as shown in fig. 5, the following professional ranking query tools may pop up for further query by the user: through the query tool, a user can directly input each slot position, a recommendation prompt function is provided in the input process, user experience is greatly improved, it is effectively guaranteed that corresponding answers can be found for each question of the user, the question and answer effect is improved, the question and answer effect can be further improved, and the question and answer mismatching problem caused by the limitation of a semantic matching model can be relieved by the combination of a query interface and structured data.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, a question-answering processing device based on structured data is provided, and the question-answering processing device based on structured data corresponds to the question-answering processing method based on structured data in the above embodiments one to one. As shown in fig. 6, the question-answering processing device based on structured data includes a first obtaining module 101, a second obtaining module 102, a judging module 103, an extracting module 104, a searching module 105, and an answering module 106. The functional modules are explained in detail as follows:
a first obtaining module 101, configured to obtain target structured data, where the target structured data includes structured data corresponding to a plurality of intent classifications, and the structured data of each intent classification includes a plurality of sub-hierarchy classification information corresponding to the intent classification, and each sub-hierarchy classification information corresponds to a unique set of structured data;
a second obtaining module 102, configured to obtain a user question fed back by a user side, and perform intention identification on the user question to obtain a target intention classification to which the user question belongs;
a judging module 103, configured to judge whether the target intent classification belongs to an intent classification in the target structured data;
an extracting module 104, configured to, if the target intent classification belongs to an intent classification in the target structured data, perform slot information extraction on the user question according to the target intent classification;
a searching module 105, configured to search for content that meets the slot information in the structured data corresponding to the target intent classification if the slot information is extracted;
and the response module 106 is configured to respond to the user question according to the search content if the search content meeting the slot information is searched.
In one implementation, the reply module is further configured to:
and if the slot position information is not extracted or the search content which accords with the slot position information is not searched, acquiring recommended content in the structured data corresponding to the target intention classification according to a preset mode so as to respond to the user question.
In one implementation, the response module is further specifically configured to:
the self-checking instruction fed back to the user side enables the user side to display a corresponding query interface, and the query interface comprises a query frame for the user to input query information;
receiving query information input by the user in the query box, and searching a plurality of matching item contents corresponding to the query information from the structured data corresponding to the target intention classification;
feeding back the matching items to the user side, and enabling the user side to display the contents of the matching items at the corresponding positions of the query box;
determining target matching item contents selected by the user in the plurality of matching item contents, and searching out associated recommended contents in the structured data corresponding to the target intention classification according to the target matching item contents;
and feeding back the associated recommended content to the user side so that the user side displays the associated recommended content in a corresponding display frame of the query interface.
In one embodiment, the response module is further configured to: and if the target intention classification does not belong to the intention classification in the structured data, accessing another intelligent question-answering engine system for answering.
In one embodiment, the response module is further configured to: if the target intention classification does not belong to the intention classification in the structured data, calling a customer service dispatching module so that the customer service dispatching module can log in the idle state of the seat according to the current state;
and appointing the incoming line of the user to an idle seat client, wherein the seat client is used for acquiring preset question and answer and basic information of the user and reminding the seat to access the incoming line of the user.
In an embodiment, the extraction module is specifically configured to:
extracting the structured data corresponding to the target intention classification from the target structured data, and performing word segmentation on the user question to obtain a word segmentation set corresponding to the user question;
judging whether the participle set has participles of the structured data corresponding to the target intention classification;
if so, selecting one or more participles of the structured data corresponding to the target intention classification in the participle set as slot position information of the user question;
and if not, judging that the extraction of the slot position information of the user problem fails.
For specific limitations of the question-answering processing device based on the structured data, see the above limitations on the question-answering processing method based on the structured data, which are not described herein again. The modules in the above-mentioned question-answering processing device based on structured data can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external user terminal through network connection. The computer program is executed by a processor to implement a method for question-answering based on structured data.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring target structured data, wherein the target structured data comprises structured data corresponding to a plurality of intention classifications, each intention classification structured data comprises a group of structured data uniquely corresponding to each corresponding sub-classification information under the intention classification, and the similarity of each group of structured data is lower than the preset similarity;
the method comprises the steps of obtaining user questions fed back by a user side, and carrying out intention identification on the user questions to obtain target intention classifications to which the user questions belong;
determining whether the target intent classification belongs to an intent classification in the target structured data;
if the target intention classification belongs to the intention classification in the target structured data, extracting slot position information of the user question according to the target intention classification;
if the slot position information is extracted, searching the content which accords with the slot position information in the structured data corresponding to the target intention classification;
and if the search content which accords with the slot position information is searched, responding to the user question according to the search content.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring target structured data, wherein the target structured data comprises structured data corresponding to a plurality of intention classifications, each intention classification structured data comprises a group of structured data uniquely corresponding to each corresponding sub-classification information under the intention classification, and the similarity of each group of structured data is lower than the preset similarity;
the method comprises the steps of obtaining user questions fed back by a user side, and carrying out intention identification on the user questions to obtain target intention classifications to which the user questions belong;
determining whether the target intent classification belongs to an intent classification in the target structured data;
if the target intention classification belongs to the intention classification in the target structured data, extracting slot position information of the user question according to the target intention classification;
if the slot position information is extracted, searching the content which accords with the slot position information in the structured data corresponding to the target intention classification;
and if the search content which accords with the slot position information is searched, responding to the user question according to the search content.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A question-answer processing method based on structured data is characterized by comprising the following steps:
acquiring target structured data, wherein the target structured data comprises structured data corresponding to a plurality of intention classifications, the structured data of each intention classification comprises a group of structured data uniquely corresponding to each corresponding sub-classification information under the intention classification, and the similarity of each two groups of structured data is lower than the preset similarity;
the method comprises the steps of obtaining user questions fed back by a user side, and carrying out intention identification on the user questions to obtain target intention classifications to which the user questions belong;
determining whether the target intent classification belongs to an intent classification in the target structured data;
if the target intention classification belongs to the intention classification in the target structured data, extracting slot position information of the user question according to the target intention classification;
if the slot position information is extracted, searching the content which accords with the slot position information in the structured data corresponding to the target intention classification;
and if the search content which accords with the slot position information is searched, responding to the user question according to the search content.
2. The question-answer processing method according to claim 1, characterized by further comprising:
and if the slot position information is not extracted or the search content which accords with the slot position information is not searched, acquiring recommended content in the structured data corresponding to the target intention classification according to a preset mode so as to respond to the user question.
3. The question-answering processing method according to claim 2, wherein the obtaining of recommended content in the structured data corresponding to the target intention classification in a preset manner to respond to the user question comprises:
the self-checking instruction fed back to the user side enables the user side to display a corresponding query interface, and the query interface comprises a query frame for the user to input query information;
receiving query information input by the user in the query box, and searching a plurality of matching item contents corresponding to the query information from the structured data corresponding to the target intention classification;
feeding back the content of the matching items to the user side, so that the user side displays the content of the matching items at the corresponding position of the query box;
determining target matching item contents selected by the user in the plurality of matching item contents, and searching out associated recommended contents in the structured data corresponding to the target intention classification according to the target matching item contents;
and feeding back the associated recommended content to the user side so that the user side displays the associated recommended content in a corresponding display frame of the query interface.
4. The question-answer processing method according to any one of claims 1 to 3, characterized in that after said judging whether the target intention classification belongs to an intention classification in the target structured data, the method further comprises;
and if the target intention classification does not belong to the intention classification in the structured data, accessing another intelligent question-answering engine system for answering.
5. The question-answer processing method according to any one of claims 1 to 3, characterized in that after said judging whether the target intention classification belongs to an intention classification in the target structured data, the method further comprises;
if the target intention classification does not belong to the intention classification in the structured data, calling a customer service dispatching module so that the customer service dispatching module can log in the idle state of the seat according to the current state;
and appointing the incoming line of the user to an idle seat client, wherein the seat client is used for acquiring preset question and answer and basic information of the user and reminding the seat to access the incoming line of the user.
6. The question-answering processing method according to any one of claims 1 to 3, wherein the slot information extraction of the user question according to the target intention classification includes:
extracting the structured data corresponding to the target intention classification from the target structured data, and performing word segmentation on the user question to obtain a word segmentation set corresponding to the user question;
judging whether the participle set has participles of the structured data corresponding to the target intention classification;
if so, selecting one or more participles of the structured data corresponding to the target intention classification in the participle set as slot position information of the user question;
and if not, judging that the extraction of the slot position information of the user problem fails.
7. A question-answering processing device based on structured data, comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the target structured data comprises structured data corresponding to a plurality of intention classifications, the structured data of each intention classification comprises a plurality of sub-layer classification information corresponding to the intention classification, and each sub-layer classification information corresponds to a unique group of structured data;
the second acquisition module is used for acquiring the user question fed back by the user side and identifying the intention of the user question to acquire the target intention classification of the user question;
a judging module, configured to judge whether the target intent classification belongs to an intent classification in the target structured data;
the extraction module is used for extracting the slot position information of the user question according to the target intention classification if the target intention classification belongs to the intention classification in the target structured data;
the searching module is used for searching the content which accords with the slot position information in the structured data corresponding to the target intention classification if the slot position information is extracted;
and the response module is used for responding to the user question according to the search content if the search content which accords with the slot position information is searched out.
8. The question-answering processing apparatus according to claim 7, wherein the answering module is further configured to:
and if the slot position information is not extracted or the search content which accords with the slot position information is not searched, acquiring recommended content in the structured data corresponding to the target intention classification according to a preset mode so as to respond to the user question.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the structured data based question-answering processing method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the steps of the structured data based question-answering processing method according to any one of claims 1 to 6.
CN202110720182.XA 2021-06-28 2021-06-28 Question-answer processing method, device, equipment and medium based on structured data Pending CN113282734A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110720182.XA CN113282734A (en) 2021-06-28 2021-06-28 Question-answer processing method, device, equipment and medium based on structured data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110720182.XA CN113282734A (en) 2021-06-28 2021-06-28 Question-answer processing method, device, equipment and medium based on structured data

Publications (1)

Publication Number Publication Date
CN113282734A true CN113282734A (en) 2021-08-20

Family

ID=77285678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110720182.XA Pending CN113282734A (en) 2021-06-28 2021-06-28 Question-answer processing method, device, equipment and medium based on structured data

Country Status (1)

Country Link
CN (1) CN113282734A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170792A (en) * 2017-12-27 2018-06-15 北京百度网讯科技有限公司 Question and answer bootstrap technique, device and computer equipment based on artificial intelligence
WO2018149326A1 (en) * 2017-02-16 2018-08-23 阿里巴巴集团控股有限公司 Natural language question answering method and apparatus, and server
CN110968663A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Answer display method and device of question-answering system
CN111753075A (en) * 2020-08-12 2020-10-09 腾讯科技(深圳)有限公司 Method and device for creating question and answer data of customer service robot and computer equipment
CN112559689A (en) * 2020-12-21 2021-03-26 广州橙行智动汽车科技有限公司 Data processing method and device based on vehicle-mounted question answering

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018149326A1 (en) * 2017-02-16 2018-08-23 阿里巴巴集团控股有限公司 Natural language question answering method and apparatus, and server
CN108170792A (en) * 2017-12-27 2018-06-15 北京百度网讯科技有限公司 Question and answer bootstrap technique, device and computer equipment based on artificial intelligence
CN110968663A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Answer display method and device of question-answering system
CN111753075A (en) * 2020-08-12 2020-10-09 腾讯科技(深圳)有限公司 Method and device for creating question and answer data of customer service robot and computer equipment
CN112559689A (en) * 2020-12-21 2021-03-26 广州橙行智动汽车科技有限公司 Data processing method and device based on vehicle-mounted question answering

Similar Documents

Publication Publication Date Title
CN110457431B (en) Knowledge graph-based question and answer method and device, computer equipment and storage medium
CN109871446B (en) Refusing method in intention recognition, electronic device and storage medium
CN108388558B (en) Question matching method and device, customer service robot and storage medium
CN109522393A (en) Intelligent answer method, apparatus, computer equipment and storage medium
JP2021531591A (en) Association recommendation method, equipment, computer equipment and storage media
CN110750649A (en) Knowledge graph construction and intelligent response method, device, equipment and storage medium
CN112711937A (en) Template recommendation method, device, equipment and storage medium
CN109800307B (en) Product evaluation analysis method and device, computer equipment and storage medium
CN111309881A (en) Method and device for processing unknown questions in intelligent question answering, computer equipment and medium
CN113157863A (en) Question and answer data processing method and device, computer equipment and storage medium
CN112286934A (en) Database table importing method, device, equipment and medium
CN112699923A (en) Document classification prediction method and device, computer equipment and storage medium
CN112883030A (en) Data collection method and device, computer equipment and storage medium
CN113064980A (en) Intelligent question and answer method and device, computer equipment and storage medium
CN113127621A (en) Dialogue module pushing method, device, equipment and storage medium
CN112231452A (en) Question-answering method, device, equipment and storage medium based on natural language processing
CN112949297A (en) Intention recognition method, device, computer equipment and computer readable storage medium
CN114253990A (en) Database query method and device, computer equipment and storage medium
CN109656947B (en) Data query method and device, computer equipment and storage medium
CN111353027B (en) Answer feedback method, device, computer equipment and medium in chat robot
CN110502620B (en) Method, system and computer equipment for generating guide diagnosis similar problem pairs
CN112749249A (en) Judicial knowledge graph construction method and device and judicial knowledge graph based searching method and device
CN111324687A (en) Data processing method and device in knowledge base, computer equipment and storage medium
CN113254624B (en) Intelligent question-answering processing method, device, equipment and medium based on artificial intelligence
CN113282734A (en) Question-answer processing method, device, equipment and medium based on structured data

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