An insurance business scenario question and answer recommendation method and related equipment thereof
By acquiring question text from insurance business scenarios, extracting question entities and relationships, and using a learning scoring model to filter answers, the problem of low accuracy in question-and-answer recommendation is solved, achieving more efficient question-and-answer recommendation.
Patent Information
- Application Number
- CN202310506051.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-05-06
AI Technical Summary
Current AI-powered question answering technologies employ numerous recommendation methods, resulting in inconsistent recommendation accuracy.
The method of question answering recommendation in insurance business scenarios is adopted. Question entities and relationships are extracted by obtaining question text, and a comprehensive score is performed using a pre-set knowledge base and learning scoring model to select the final answer.
It improved the accuracy of question answering and recommendation, simplified model complexity, and increased model running speed and entity extraction accuracy.
Smart Images

Figure CN116610784B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of AI intelligent question and answer, in particular to an insurance business scenario question and answer recommendation method and a related device thereof. BACKGROUND
[0002] A dialogue system is an important branch of artificial intelligence, and has task-driven dialogue systems, question and answer systems, open domain chat and other subsystems. Among them, the task-driven dialogue system generally needs to collect necessary information through multi-round dialogue with the user, and provide corresponding services to the user; and the question and answer system focuses on directly understanding the user's question and giving accurate answers, and the system will also actively ask the user for clarification when necessary. Common question and answer systems are based on similarity calculation of common questions (FAQ), but in order to provide more accurate answers to users, question and answer systems based on knowledge graphs have received more and more attention.
[0003] There are three modes of existing knowledge base question and answer, which are respectively using only the structured information of the knowledge graph for retrieval and comparison, returning the answer data, using a pre-trained model and a deep network to link the mention output by entity recognition to the knowledge graph, or only using question text and candidate relationships to determine problem relationships. Therefore, the existing technology still has the problem that there are many question and answer recommendation methods in AI intelligent question and answer, which causes the recommendation accuracy to be unable to be guaranteed. SUMMARY
[0004] The purpose of the embodiments of the present application is to propose an insurance business scenario question and answer recommendation method and a related device thereof to solve the problem that the existing technology still has many question and answer recommendation methods in AI intelligent question and answer, which causes the recommendation accuracy to be unable to be guaranteed.
[0005] In order to solve the above technical problems, the embodiments of the present application provide an insurance business scenario question and answer recommendation method, which adopts the following technical solution:
[0006] An insurance business scenario question and answer recommendation method includes the following steps:
[0007] Obtaining question text under an insurance dialogue business scenario;
[0008] Performing question entity extraction and question relationship extraction on the question text to obtain corresponding question entity data and question relationship data;
[0009] Based on the question entity data and a preset first screening rule, a preset number of question entity similar data are screened out from a preset question entity similar knowledge base to construct a candidate question entity set;
[0010] Screening a preset number of question relationship similar data from a preset question relationship similar knowledge base based on the question relationship data and a preset second screening rule, and constructing a candidate question relationship set;
[0011] Inputting the candidate question entity set and the candidate question relationship set as an input set into a learning scoring model that is pre-learned and trained;
[0012] Combining any element in the candidate question entity set with any element in the candidate question relationship set, obtaining a candidate answer corresponding to a combination result, and constructing a candidate answer set;
[0013] Comprehensively scoring the candidate question entity set, the candidate question relationship set and the candidate answer set by the learning scoring model that is pre-learned and trained, and screening a final output question answer recommendation for the target customer through a comprehensive scoring result.
[0014] Further, before the step of performing question entity extraction and question relationship extraction on the question text to obtain corresponding question entity data and question relationship data, the method further comprises:
[0015] Pre-connecting a preset question entity extraction sub-model and a question relationship extraction sub-model, wherein the question entity extraction sub-model comprises a question entity recognition component, and the question relationship extraction sub-model comprises a question relationship recognition component;
[0016] The step of performing question entity extraction and question relationship extraction on the question text to obtain corresponding question entity data and question relationship data specifically comprises:
[0017] Performing question entity vector acquisition on the question text according to the question entity recognition component, wherein the question entity recognition component is composed of a BERT+CRF comprehensive model;
[0018] Comparing an entity representation vector corresponding to a pre-constructed candidate knowledge graph with the question entity vector to obtain a question entity name corresponding to the question entity vector, wherein the pre-constructed candidate knowledge graph is a knowledge graph pre-constructed according to question entity similarity;
[0019] Performing question relationship vector acquisition on the question text according to the question relationship recognition component, and obtaining a question relationship in the question text according to the question relationship vector, wherein the question relationship recognition component is composed of a Sentence-BERT model.
[0020] Further, the question entity extraction sub-model further comprises a question entity linking component configured to filter out a preset number of question entity similar data from a preset question entity similar knowledge base based on the question entity data and a preset first screening rule, and to construct a candidate question entity set, specifically comprising:
[0021] The question entity linking component links the question entity name to the question entity similar knowledge base, wherein the question entity similar knowledge base contains a plurality of question entity names and question entity vectors corresponding to the plurality of question entity names respectively;
[0022] According to the question entity vector, all question entity names with an error within a preset allowable range from the question entity vector are filtered out from the question entity similar knowledge base as primary selected question entities;
[0023] According to the question entity vector, all primary selected question entities are sorted by vector error, and the preset number of primary selected question entities are filtered out according to the sorting to construct a candidate question entity set.
[0024] Further, the question relationship extraction sub-model further comprises a question relationship linking component configured to filter out a preset number of question relationship similar data from a preset question relationship similar knowledge base based on the question relationship data and a preset second screening rule, and to construct a candidate question relationship set, specifically comprising:
[0025] The question relationship linking component links the question relationship vector to the question relationship similar knowledge base, wherein the question relationship similar knowledge base contains a plurality of question relationship vectors and question relationship representation texts corresponding to the plurality of question relationship vectors respectively;
[0026] According to the question relationship vector, a plurality of question relationship vectors with an error within a preset allowable range are matched from the question relationship similar knowledge base;
[0027] The question relationship representation texts corresponding to the plurality of question relationship vectors are obtained to construct a candidate question relationship set.
[0028] Further, before the step of inputting the candidate question entity set and the candidate question relationship set as an input set into a pre-learned and trained learning scoring model, the method further comprises:
[0029] All question entity data, all question relationship data, and all answer entity data in the question entity similar knowledge base, the question relationship similar knowledge base, and a preset answer entity knowledge base are obtained;
[0030] According to all question entity data, all question relationship data, all answer entity data, an initialized insurance product knowledge graph is constructed;
[0031] According to each question entity, each question relationship and each answer entity in the initialized insurance product knowledge graph, a triple in the form of [question entity-question relationship-answer entity] is constructed;
[0032] According to the space mapping matrix corresponding to the initialized insurance product knowledge graph, the length information and the angle information contained in each triple are obtained;
[0033] According to a preset scoring function, the length information and the angle information contained in each triple, a score value of the initialized insurance product knowledge graph is calculated;
[0034] Through a random negative sampling technique, a negative sample is obtained, and a loss value of the initialized insurance product knowledge graph is calculated through a preset loss function and the negative sample;
[0035] According to an SGD optimization method, the initialized insurance product knowledge graph is repeatedly optimized until the score value and the loss value both satisfy a preset requirement condition, and the insurance product knowledge graph finally obtained after repeated optimization is taken as an answer entity screening knowledge graph.
[0036] Further, the step of obtaining a combination result corresponding to a candidate answer by combining any element in the candidate question entity set and any element in the candidate question relationship set to construct a candidate answer set, specifically includes:
[0037] From the candidate question entity set, any question entity is selected as a question entity of a target triple;
[0038] From the candidate question relationship set, any question relationship is selected as a question relationship of the target triple;
[0039] According to the question entity of the target triple and the question relationship of the target triple, a corresponding answer entity is screened from the answer entity screening knowledge graph;
[0040] All the answer entities screened from the answer entity screening knowledge graph are sorted to obtain the candidate answer set.
[0041] Further, before the step of performing comprehensive scoring on the candidate question entity set, the candidate question relationship set and the candidate answer set by the learning scoring model learned and trained, the method further includes:
[0042] mapping data according to the question entity of the target triple, the question relation of the target triple, and the corresponding answer entity selected from the knowledge graph based on the answer entity, and repeatedly performing the target triple construction to obtain a target triple set;
[0043] The step of performing comprehensive scoring on the candidate question entity set, the candidate question relation set, and the candidate answer set by using the learning scoring model trained by the learning, and selecting a final output question answer as the question answer recommended to the target customer according to the comprehensive scoring result, specifically includes:
[0044] inputting the target triple set into the learning scoring model trained by the learning;
[0045] scoring each triple in the target triple set according to the learning scoring model trained by the learning to obtain a scoring set;
[0046] selecting a triple corresponding to a maximum value in the scoring set as a final selected triple from the scoring set;
[0047] obtaining an answer entity in the final selected triple, and recommending the answer entity in the final selected triple as an optimal question answer to the target customer, wherein the target customer is a customer who proposes the question text.
[0048] To solve the above technical problems, the embodiment of the application further provides an insurance business scenario question and answer recommendation device, which adopts the technical scheme as follows:
[0049] An insurance business scenario question and answer recommendation device, comprising:
[0050] a question text acquisition module configured to acquire a question text in an insurance dialogue business scenario;
[0051] a text data extraction module configured to perform question entity extraction and question relation extraction on the question text, and acquire corresponding question entity data and question relation data;
[0052] a candidate question entity set construction module configured to select a preset number of question entity similar data from a preset question entity similar knowledge base based on the question entity data and a preset first screening rule, and construct a candidate question entity set;
[0053] a candidate question relation set construction module configured to select a preset number of question relation similar data from a preset question relation similar knowledge base based on the question relation data and a preset second screening rule, and construct a candidate question relation set;
[0054] A model input module is configured to input the candidate question entity set and the candidate question relation set as an input set into a pre-learned learning scoring model;
[0055] A candidate answer set construction module is configured to combine any element in the candidate question entity set with any element in the candidate question relation set, obtain a candidate answer corresponding to a combination result, and construct a candidate answer set;
[0056] A screening recommendation module is configured to comprehensively score the candidate question entity set, the candidate question relation set, and the candidate answer set by using the pre-learned learning scoring model, and screen a final output question answer recommendation for a target customer by using a comprehensive scoring result.
[0057] To solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the technical scheme as follows:
[0058] A computer device includes a memory and a processor, the memory stores computer readable instructions, and the processor implements the steps of the insurance business scenario question and answer recommendation method described above when executing the computer readable instructions.
[0059] To solve the above technical problems, the embodiment of the present application further provides a computer readable storage medium, which adopts the technical scheme as follows:
[0060] A computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by a processor to implement the steps of the insurance business scenario question and answer recommendation method described above.
[0061] Compared with the prior art, the embodiment of the present application has the following beneficial effects:
[0062] The insurance business scenario question and answer recommendation method provided in the embodiments of the present application comprises the following steps: obtaining question text in an insurance dialogue business scenario; performing question entity extraction and question relationship extraction on the question text to construct a candidate question entity set; constructing a candidate question relationship set; inputting the candidate question entity set and the candidate question relationship set into a learning and scoring model that has been pre-learned and trained; constructing a candidate answer set; performing comprehensive scoring on the candidate question entity set, the candidate question relationship set and the candidate answer set by using the learning and scoring model that has been pre-learned and trained, and filtering out a final output question answer recommendation for a target customer through the comprehensive scoring result. Through the pre-set question entity similar knowledge base and the pre-set question relationship similar knowledge base, the model complexity is greatly simplified, the model running speed is improved, and the probability of extracting correct entities by the entity extraction module is improved. Meanwhile, when constructing the learning and scoring model, a triple mode is adopted to obtain a representation vector containing rich semantic information, so that when performing question relationship extraction, not only the structured information of the knowledge graph is used, but also the semantic information of the entities and relationships of the knowledge graph is used, the correctness of the question relationship extraction is improved, and the correctness of the knowledge base question and answer is improved. BRIEF DESCRIPTION OF DRAWINGS
[0063] In order to more clearly illustrate the schemes in the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0064] Figure 1 is an exemplary system architecture diagram to which the present application can be applied;
[0065] Figure 2 a flowchart of an embodiment of the insurance business scenario question and answer recommendation method according to the present application;
[0066] Figure 3 a flowchart of a specific embodiment of learning and scoring model training according to the embodiments of the present application;
[0067] Figure 4 is Figure 2 a flowchart of a specific embodiment of step 206 shown in the figure;
[0068] Figure 5 is Figure 2 a flowchart of a specific embodiment of step 207 shown in the figure;
[0069] Figure 6 a structural schematic diagram of an embodiment of the insurance business scenario question and answer recommendation device according to the present application;
[0070] Figure 7 isFigure 6 Structure diagram of one specific embodiment of the module 602 shown;
[0071] Figure 8 Structure diagram of one embodiment of the computer device according to the present application. DETAILED DESCRIPTION
[0072] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the application; the use herein of terms such as "comprise" and "comprising", or "have" and "having", or "include" and "including" and any variations thereof, is intended to cover a non-exclusive inclusion; the use herein of terms such as "first", "second" and the like is intended to distinguish between similar objects unless the context indicates otherwise.
[0073] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase "in an embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily all directed to the same embodiment, or to a single alternative embodiment.
[0074] In order to make the technical personnel in the art better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings.
[0075] As shown in Figure 1 The system architecture 100 can include terminal devices 101, 102, 103, a network 104, and a server 105, as shown. The network 104 serves as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0076] A user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0077] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop portable computers, desktop computers, and the like.
[0078] The server 105 can be a server providing various services, such as a background server providing support for a page displayed on the terminal devices 101, 102, and 103.
[0079] It should be noted that the insurance business scenario question recommendation method provided in the embodiments of the present application is generally executed by a server / terminal device, and accordingly, the insurance business scenario question recommendation apparatus is generally arranged in a server / terminal device.
[0080] It should be understood that Figure 1 The number of terminal devices, networks, and servers in
[0081] With reference to Figure 2 , a flowchart of one embodiment of the insurance business scenario question recommendation method according to the present application is shown. The insurance business scenario question recommendation method includes the following steps:
[0082] Step 201: Obtain question text in an insurance dialogue business scenario.
[0083] In this embodiment, the step of obtaining question text in an insurance dialogue business scenario specifically includes: obtaining insurance dialogue question text input or entered by a user through an externally connected preset insurance business client question answer interface.
[0084] Step 202: Perform question entity extraction and question relationship extraction on the question text to obtain corresponding question entity data and question relationship data.
[0085] In this embodiment, before the step of performing question entity extraction and question relationship extraction on the question text to obtain corresponding question entity data and question relationship data, the method further includes: pre-connecting a preset question entity extraction sub-model and a question relationship extraction sub-model, wherein the question entity extraction sub-model includes a question entity recognition component, and the question relationship extraction sub-model includes a question relationship recognition component.
[0086] In the embodiment, the step of performing question entity extraction and question relation extraction on the question text to obtain corresponding question entity data and question relation data specifically comprises: performing question entity vector acquisition on the question text according to the question entity recognition component, wherein the question entity recognition component is composed of a BERT+CRF integrated model; comparing the question entity vector with an entity representation vector corresponding to a pre-constructed candidate knowledge graph as a supervision signal to obtain a question entity name corresponding to the question entity vector, wherein the pre-constructed candidate knowledge graph is a knowledge graph pre-constructed according to question entity similarity.
[0087] In the embodiment, the BERT+CRT integrated model, that is, the conditional random field algorithm is introduced into the natural language BERT model, and the BERT+CRT integrated model is updated, wherein CRF (conditional random field algorithm) introduces the conditional random field by using the BERT+CRT integrated model, and compared with the BERT model directly performing question entity recognition, the BERT+CRT integrated model has higher efficiency and more accurate named entity recognition effect.
[0088] In the embodiment, the step of performing question entity extraction and question relation extraction on the question text to obtain corresponding question entity data and question relation data further comprises: performing question relation vector acquisition on the question text according to the question relation recognition component, and obtaining question relations in the question text according to the question relation vector, wherein the question relation recognition component is composed of a Sentence-BERT model.
[0089] The Sentence-BERT model is a semantic similarity double tower model, that is, two sentences to be matched are respectively encoded and feature extracted, and finally similarity interaction calculation is performed. In this embodiment, first, the ROBERTa model is used to encode each element in the question relationship similar knowledge base to obtain the relationship representation vector corresponding to each element in the question relationship similar knowledge base, and then the ROBERTa model is used to encode the question text to obtain the relationship representation vector corresponding to the question text; the relationship representation vector corresponding to each element in the question relationship similar knowledge base is input into the first "tower" of the Sentence-BERT model, and the relationship representation vector corresponding to the question text is input into the second "tower" of the Sentence-BERT model, comparison is performed, the similar relationship representation vector is obtained from the first "tower" and the second "tower", and the question relationship vector of the question text is determined through the similar relationship representation vector. By using the Sentence-BERT model, the matching calculation speed is improved through double tower comparison.
[0090] In step 203, based on the question entity data and a preset first screening rule, a preset number of question entity similar data are screened from a preset question entity similar knowledge base to construct a candidate question entity set.
[0091] In this embodiment, the question entity extraction sub-model further includes a question entity linking component. The step of screening a preset number of question entity similar data from a preset question entity similar knowledge base based on the question entity data and a preset first screening rule to construct a candidate question entity set specifically includes: linking the question entity name to the question entity similar knowledge base through the question entity linking component, wherein the question entity similar knowledge base contains a plurality of question entity names and question entity vectors corresponding to the plurality of question entity names respectively; screening all question entity names having an error within a preset allowable range from the question entity vector as preliminary selected question entities from the question entity similar knowledge base according to the question entity vector; and performing vector error sorting on all preliminary selected question entities according to the question entity vector, and screening the preset number of preliminary selected question entities according to the sorting to construct a candidate question entity set.
[0092] In step 204, based on the question relationship data and a preset second screening rule, a preset number of question relationship similar data are screened from a preset question relationship similar knowledge base to construct a candidate question relationship set.
[0093] In this embodiment, the question relationship extraction sub-model further includes a question relationship linking component. The step of selecting a preset number of question relationship similar data from a preset question relationship similarity knowledge base based on the question relationship data and a preset second filtering rule to construct a candidate question relationship set specifically includes: linking the question relationship vector to the question relationship similarity knowledge base through the question relationship linking component, wherein the question relationship similarity knowledge base contains several question relationship vectors and question relationship representation texts corresponding to the several question relationship vectors; matching several question relationship vectors with errors within a preset allowable range from the question relationship similarity knowledge base based on the question relationship vectors; obtaining the question relationship representation texts corresponding to the several question relationship vectors to construct a candidate question relationship set.
[0094] By using a pre-set knowledge base of similar question entities and a pre-set knowledge base of similar question relationships, the complexity of the model is greatly simplified, the running speed of the model is improved, and the probability of the entity extraction module extracting the correct entities is increased, thereby improving the accuracy of the knowledge base question answering system.
[0095] Step 205: Input the candidate problem entity set and the candidate problem relation set as the input set into the pre-trained learning scoring model.
[0096] Continue to refer to Figure 3 In this embodiment, before performing the step of inputting the candidate question entity set and the candidate question relation set as input to the pre-trained learning scoring model, the method further includes a learning scoring model training step. Figure 3 A flowchart of a specific embodiment of training a learning scoring model according to the embodiments of this application includes:
[0097] Step 301: Obtain all question entity data, all question relationship data, and all answer entity data from the question entity similarity knowledge base, the question relationship similarity knowledge base, and the preset answer entity knowledge base;
[0098] Step 302: Construct an initial insurance product knowledge graph based on all question entity data, all question relationship data, and all answer entity data;
[0099] Step 303: Construct triples in the form of [question entity-question relationship-answer entity] based on each question entity, each question relationship, and each answer entity in the initialized insurance product knowledge graph;
[0100] Step 304: Based on the spatial mapping matrix corresponding to the initialized insurance product knowledge graph, obtain the modulus information and angle information contained in each triple;
[0101] Step 305, according to the preset scoring function, the length of the arc information and the angle information contained in each triple, the score value of the initialized insurance product knowledge graph is calculated;
[0102] Step 306, by using the random negative sampling technique, the negative samples are obtained, and the loss value of the initialized insurance product knowledge graph is calculated by using the preset loss function and the negative samples;
[0103] Step 307, according to the SGD optimization method, the initialized insurance product knowledge graph is repeatedly optimized until the score value and the loss value meet the preset requirement conditions, and the learning scoring model is learned and trained, and the insurance product knowledge graph finally obtained after repeated optimization is taken as the answer entity screening knowledge graph.
[0104] In this embodiment, the SGD optimization method is a stochastic gradient descent optimization algorithm, which aims to find the model parameters that minimize the error of the learning scoring model on the training data set. It ensures the evaluation of the learning scoring model after learning and training.
[0105] By obtaining the representation vector containing rich semantic information when constructing the learning scoring model, the semantic information of the knowledge graph entities and relationships can be utilized in addition to the knowledge graph structured information when performing question relationship extraction, thereby improving the correctness of question relationship extraction and improving the correctness of knowledge base question answering.
[0106] Step 206, any element in the candidate question entity set and any element in the candidate question relationship set are combined to obtain the corresponding candidate answer, and a candidate answer set is constructed.
[0107] Continuing to refer to Figure 4 , Figure 4 is Figure 2 a flow chart of one specific embodiment of step 206, which includes:
[0108] Step 401, selecting any question entity in the candidate question entity set as the question entity of the target triple;
[0109] Step 402, selecting any question relationship in the candidate question relationship set as the question relationship of the target triple;
[0110] Step 403, according to the question entity of the target triple and the question relationship of the target triple, the corresponding answer entity is screened from the answer entity screening knowledge graph;
[0111] Step 404, all the answer entities screened from the answer entity screening knowledge graph are sorted to obtain the candidate answer set.
[0112] In step 207, the candidate question entity set, the candidate question relation set and the candidate answer set are comprehensively scored by the learning scoring model trained by the learning, and the final output question answer recommendation is filtered out and recommended to the target customer through the comprehensive scoring result.
[0113] In the embodiment, before the step of performing the comprehensive scoring of the candidate question entity set, the candidate question relation set and the candidate answer set by the learning scoring model trained by the learning, and filtering out the final output question answer recommendation to the target customer through the comprehensive scoring result, the method further comprises: constructing a target triple according to the question entity of the target triple, the question relation of the target triple and the corresponding answer entity filtered out from the answer entity in the knowledge graph as mapping data, and performing the target triple construction in a loop to obtain a target triple set.
[0114] With reference to Figure 5 , Figure 5 is Figure 2 a flowchart of one specific embodiment of step 207, comprising:
[0115] In step 501, the target triple set is input into the learning scoring model trained by the learning;
[0116] In step 502, each triple in the target triple set is scored according to the learning scoring model trained by the learning to obtain a scoring set;
[0117] In step 503, the triple corresponding to the maximum value in the scoring set is filtered out from the scoring set as a final selected triple;
[0118] In step 504, the answer entity in the final selected triple is obtained, and the answer entity in the final selected triple is recommended as the optimal question answer to the target customer, wherein the target customer is the customer who proposes the question text.
[0119] By using the learning scoring model trained by the learning to filter out the optimal question answer recommended to the target customer, the question answer recommendation not only utilizes the knowledge graph structured information, but also utilizes the semantic information of the knowledge graph entity and relation, improves the correctness of the question relation extraction, and improves the correctness of the knowledge base question and answer problem.
[0120] The application obtains question text in an insurance dialogue service scene, performs question entity extraction and question relation extraction on the question text, constructs a candidate question entity set, constructs a candidate question relation set, inputs the candidate question entity set and the candidate question relation set into a learning and scoring model that is pre-learned and trained, constructs a candidate answer set, performs comprehensive scoring on the candidate question entity set, the candidate question relation set and the candidate answer set by using the learning and scoring model that is pre-learned and trained, and filters out a final output question answer recommendation for a target customer by using a comprehensive scoring result. By using a pre-set question entity similar knowledge base and a pre-set question relation similar knowledge base, the model complexity is greatly simplified, the model running speed is improved, the probability of extracting correct entities by an entity extraction module is improved, and when constructing the learning and scoring model, a triple mode is used to obtain a representation vector containing rich semantic information, so that when performing question relation extraction, not only structured information of a knowledge graph is used, but also semantic information of entities and relations of the knowledge graph is used, the correctness of question relation extraction is improved, and the correctness of knowledge base question and answer is improved.
[0121] Embodiments of the application can acquire and process related data based on artificial intelligence technology. Artificial intelligence (AI) is the use of digital computers or computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0122] Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technologies mainly include computer vision technology, robot technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc.
[0123] In the embodiments of the application, when constructing the learning and scoring model, a triple mode is used to obtain a representation vector containing rich semantic information, so that when performing question relation extraction, not only structured information of a knowledge graph is used, but also semantic information of entities and relations of the knowledge graph is used, and at the same time, by using a pre-set question entity similar knowledge base and a pre-set question relation similar knowledge base, the model complexity is greatly simplified, the model running speed is improved, the correctness of question relation extraction is improved, and the correctness of knowledge base question and answer is improved.
[0124] Further reference Figure 6 , as an implementation of the method shown in the above Figure 2 , the application provides an embodiment of an insurance business scene question and answer recommendation device, and the device embodiment and Figure 2The method embodiment shown corresponds to the device, which can be specifically applied to various electronic devices.
[0125] As Figure 6 shown, the insurance business scenario question and answer recommendation device 600 described in this embodiment includes a question text acquisition module 601, a text data extraction module 602, a candidate question entity set construction module 603, a candidate question relationship set construction module 604, a model input module 605, a candidate answer set construction module 606, and a screening and recommendation module 607. Among them:
[0126] The question text acquisition module 601 is configured to acquire question text in an insurance dialogue business scenario.
[0127] The text data extraction module 602 is configured to perform question entity extraction and question relationship extraction on the question text, and acquire corresponding question entity data and question relationship data.
[0128] The candidate question entity set construction module 603 is configured to filter out a preset number of question entity similar data from a preset question entity similar knowledge base based on the question entity data and a preset first screening rule, and construct a candidate question entity set.
[0129] The candidate question relationship set construction module 604 is configured to filter out a preset number of question relationship similar data from a preset question relationship similar knowledge base based on the question relationship data and a preset second screening rule, and construct a candidate question relationship set.
[0130] The model input module 605 is configured to input the candidate question entity set and the candidate question relationship set as an input set into a learning and scoring model that has been pre-learned and trained.
[0131] The candidate answer set construction module 606 is configured to combine any element in the candidate question entity set with any element in the candidate question relationship set, acquire a candidate answer corresponding to a combination result, and construct a candidate answer set.
[0132] The screening and recommendation module 607 is configured to comprehensively score the candidate question entity set, the candidate question relationship set, and the candidate answer set by the learning and scoring model that has been pre-learned and trained, and screen out a final output question answer recommendation for a target customer through a comprehensive scoring result.
[0133] Continuing to refer to Figure 7 , Figure 7 is Figure 6 a structural schematic diagram of one specific embodiment of the module 602, and the text data extraction module 602 includes a question entity extraction submodule 701 and a question relationship extraction submodule 702. Among them:
[0134] The question entity extraction submodule 701 is configured to acquire a question entity vector of the question text according to a question entity recognition component constituted by a BERT+CRF integrated model, and is further configured to compare the question entity vector with an entity representation vector corresponding to a pre-constructed candidate knowledge graph as a supervision signal, and acquire a question entity name corresponding to the question entity vector.
[0135] The question relationship extraction submodule 702 is configured to acquire a question relationship vector of the question text according to a question relationship recognition component constituted by a Sentence-BERT model, and acquire a question relationship in the question text according to the question relationship vector.
[0136] In some specific embodiments of the present application, the insurance business scenario question and answer recommendation device 600 further comprises a learning score model learning and training module, which is configured to acquire all question entity data, all question relationship data and all answer entity data in the question entity similar knowledge base, the question relationship similar knowledge base and the preset answer entity knowledge base, and is further configured to construct an initialized insurance product knowledge graph according to the all question entity data, the all question relationship data and the all answer entity data, and is further configured to construct a triple in the form of [question entity-question relationship-answer entity] according to each question entity, each question relationship and each answer entity in the initialized insurance product knowledge graph, and is further configured to acquire modulus information and angle information contained in each triple according to a spatial mapping matrix corresponding to the initialized insurance product knowledge graph, and is further configured to calculate a score value of the initialized insurance product knowledge graph according to a preset scoring function, the modulus information and the angle information contained in each triple, and is further configured to obtain a negative sample through a random negative sampling technology, and calculate a loss value of the initialized insurance product knowledge graph through a preset loss function and the negative sample, and is further configured to repeatedly optimize the initialized insurance product knowledge graph according to an SGD optimization method until the score value and the loss value both satisfy a preset requirement condition, and the learning score model learning and training is completed, and finally an insurance product knowledge graph obtained after repeated optimization is taken as an answer entity screening knowledge graph.
[0137] This application obtains question text from an insurance dialogue business scenario; extracts question entities and question relationships from the question text to construct a candidate question entity set; constructs a candidate question relationship set; inputs the candidate question entity set and candidate question relationship set into a pre-trained learning and scoring model; constructs a candidate answer set; and uses the pre-trained learning and scoring model to comprehensively score the candidate question entity set, the candidate question relationship set, and the candidate answer set, and uses the comprehensive scoring result to select the final output question answer to recommend to the target customer. By using a pre-set question entity similarity knowledge base and a pre-set question relationship similarity knowledge base, the model complexity is greatly simplified, the model running speed is improved, and the probability of the entity extraction module extracting the correct entities is increased. Furthermore, when constructing the learning and scoring model, a triplet approach is used to obtain representation vectors containing rich semantic information. This allows the question relationship extraction to utilize not only the structured information of the knowledge graph but also the semantic information of the entities and relationships in the knowledge graph, improving the accuracy of question relationship extraction and thus improving the accuracy of knowledge base question answering.
[0138] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0139] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0140] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 8 , Figure 8 This is a basic structural block diagram of the computer device in this embodiment.
[0141] The computer device 8 includes a memory 8a, a processor 8b, and a network interface 8c, which are communicatively connected by a system bus. It should be noted that only the computer device 8 with components 8a-8c is shown in the figure, but it should be understood that all the components shown are not required to be implemented, and more or fewer components can be alternatively implemented. Among them, those skilled in the art can understand that the computer device herein is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0142] The computer device can be a desktop computer, a notebook computer, a palm computer, a cloud server, and the like. The computer device can interact with the user through a keyboard, a mouse, a remote controller, a touchpad, a voice control device, and the like.
[0143] The memory 8a includes at least one type of readable storage medium, including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the memory 8a can be an internal storage unit of the computer device 8, such as a hard disk or a memory of the computer device 8. In other embodiments, the memory 8a can also be an external storage device of the computer device 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like. Of course, the memory 8a can also include both the internal storage unit and the external storage device of the computer device 8. In the present embodiment, the memory 8a is generally used to store an operating system and various application software installed on the computer device 8, such as computer readable instructions of the insurance business scenario question and answer recommendation method, and the like. In addition, the memory 8a can also be used to temporarily store various data that have been output or will be output.
[0144] The processor 8b may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 8b is generally used to control the overall operation of the computer device 8. In the present embodiment, the processor 8b is configured to execute computer readable instructions stored in the memory 8a or process data, such as computer readable instructions of the insurance business scenario question and answer recommendation method.
[0145] The network interface 8c may include a wireless network interface or a wired network interface, and is generally used to establish a communication connection between the computer device 8 and other electronic devices.
[0146] The computer device provided in the present embodiment belongs to the technical field of AI intelligent question and answer. The present application obtains question text in an insurance dialogue business scenario, performs question entity extraction and question relationship extraction on the question text, constructs a candidate question entity set, constructs a candidate question relationship set, inputs the candidate question entity set and the candidate question relationship set into a pre-learned and trained learning scoring model, constructs a candidate answer set, performs comprehensive scoring on the candidate question entity set, the candidate question relationship set, and the candidate answer set through the pre-learned and trained learning scoring model, and filters out a final output question answer recommendation for a target customer through a comprehensive scoring result. Through the pre-set question entity similar knowledge base and the pre-set question relationship similar knowledge base, the model complexity is greatly simplified, the model running speed is improved, the probability of extracting correct entities by the entity extraction module is improved, and when constructing the learning scoring model, a triple mode is adopted to obtain a representation vector containing rich semantic information, so that not only the structured information of the knowledge graph is used for question relationship extraction, but also the semantic information of the knowledge graph entities and relationships is used, the correctness of the question relationship extraction is improved, and the correctness of the knowledge base question and answer problem is improved.
[0147] The present application also provides another implementation, i.e., a computer readable storage medium storing computer readable instructions, which can be executed by a processor to enable the processor to perform the steps of the insurance business scenario question and answer recommendation method as described above.
[0148] The computer readable storage medium provided in the embodiment belongs to the technical field of AI intelligent question answering, and the problem text in the insurance dialogue business scenario is acquired; problem entity extraction and problem relation extraction are performed on the problem text, a candidate problem entity set is constructed; a candidate problem relation set is constructed; the candidate problem entity set and the candidate problem relation set are input into a learning and scoring model that is pre-learned and trained; a candidate answer set is constructed; the learning and scoring model that is pre-learned and trained is used to comprehensively score the candidate problem entity set, the candidate problem relation set and the candidate answer set, and the final output question answer is filtered out and recommended to a target customer through the comprehensive scoring result. Through the pre-set problem entity similar knowledge base and the pre-set problem relation similar knowledge base, the model complexity is greatly simplified, the model running speed is improved, the probability of extracting correct entities by the entity extraction module is improved, and when the learning and scoring model is constructed, the triple mode is adopted to obtain a representation vector containing rich semantic information, so that when the problem relation extraction is performed, not only the structured information of the knowledge graph is used, but also the semantic information of the knowledge graph entity and relation is used, the correctness of the problem relation extraction is improved, and the correctness of the knowledge base question answering problem is improved.
[0149] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and a general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device) execute the methods described in the embodiments of the present application.
[0150] Obviously, the above-described embodiments are only some of the embodiments of the present application, not all the embodiments, and the preferred embodiments of the present application are given in the drawings, but do not limit the patent scope of the present application. The present application can be realized in many different forms, and conversely, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features. Any equivalent structure made by using the contents of the specification and drawings, directly or indirectly applied to other related technical fields, is also within the scope of the patent protection of the present application.
Claims
1. A question-and-answer recommendation method for insurance business scenarios, characterized in that, Includes the following steps: Connect to a pre-defined insurance business client Q&A interface to obtain the question text in insurance dialogue business scenarios; A pre-connected pre-defined sub-model for extracting question entities and a sub-model for extracting question relationships are used to extract question entities and question relationships from the question text, obtaining corresponding question entity data and question relationship data. The question entity extraction sub-model includes a question entity recognition component, and the question relationship extraction sub-model includes a question relationship recognition component, specifically including… The question entity vector is obtained from the question text according to the question entity recognition component, which is composed of a BERT+CRF integrated model. Using the entity representation vector corresponding to the pre-constructed candidate knowledge graph as a supervision signal, it is compared with the question entity vector to obtain the question entity name corresponding to the question entity vector. The pre-constructed candidate knowledge graph is a knowledge graph pre-constructed based on the similarity of question entities. The question relationship identification component obtains a question relationship vector from the question text based on the question relationship identification component, and then obtains the question relationships in the question text based on the question relationship vector. The question relationship identification component is composed of a Sentence-BERT model. In the process of question relationship identification, the ROBERTa model is first used to encode each element in the question relationship similarity knowledge base to obtain the relationship representation vector corresponding to each element in the question relationship similarity knowledge base. Then, the ROBERTa model is used to encode the question text to obtain the relationship representation vector corresponding to the question text. The relationship representation vector corresponding to each element in the question relationship similarity knowledge base is input into the first "tower" of the Sentence-BERT model, and the relationship representation vector corresponding to the question text is input into the second "tower" of the Sentence-BERT model for comparison. The relationship representation vectors similar to those in the second "tower" are obtained from the first "tower". The question relationship vector of the question text is determined by the similar relationship representation vectors. Based on the problem entity data and the preset first filtering rule, a preset number of problem entity similar data are filtered from the preset problem entity similarity knowledge base to construct a candidate problem entity set; Based on the question relationship data and the preset second filtering rules, a preset number of question relationship similar data are filtered from the preset question relationship similarity knowledge base to construct a candidate question relationship set; The candidate question entity set and the candidate question relation set are used as input sets and input into the pre-learned and trained learning scoring model. Take any element from the candidate question entity set and any element from the candidate question relation set, combine them, obtain the candidate answer corresponding to the combination result, and construct a candidate answer set; The learning and scoring model, trained through the learning process, comprehensively scores the candidate question entity set, the candidate question relation set, and the candidate answer set. Based on the comprehensive scoring results, the final output question answer is selected and recommended to the target customer.
2. The question-and-answer recommendation method for insurance business scenarios according to claim 1, characterized in that, The question entity extraction sub-model further includes a question entity linking component. The step of selecting a preset number of similar question entity data from a preset question entity similarity knowledge base based on the question entity data and a preset first filtering rule, and constructing a candidate question entity set, specifically includes: The question entity linking component links the question entity name to the question entity similarity knowledge base, wherein the question entity similarity knowledge base contains a number of question entity names and question entity vectors corresponding to the number of question entity names. Based on the question entity vector, select all question entity names from the question entity similarity knowledge base whose errors with the question entity vector are within a preset allowable range as the initial question entities; Based on the problem entity vectors, all initially selected problem entities are sorted by vector error, and a preset number of initially selected problem entities are selected based on the sorting to construct a candidate problem entity set.
3. The question-and-answer recommendation method for insurance business scenarios according to claim 1, characterized in that, The question relationship extraction sub-model further includes a question relationship linking component. The step of selecting a preset number of similar question relationship data from a preset question relationship similarity knowledge base based on the question relationship data and a preset second filtering rule, and constructing a candidate question relationship set, specifically includes: The question relationship linking component links the question relationship vectors to the question relationship similarity knowledge base, wherein the question relationship similarity knowledge base contains several question relationship vectors and the question relationship representation text corresponding to each of the several question relationship vectors; Based on the question relationship vector, several question relationship vectors with errors within a preset allowable range are matched from the question relationship similarity knowledge base; Obtain the question relationship representation text corresponding to the several question relationship vectors respectively, and construct a candidate question relationship set.
4. The insurance business scenario question-and-answer recommendation method according to any one of claims 1 to 3, characterized in that, Before performing the step of inputting the candidate question entity set and the candidate question relation set as input to the pre-trained learning scoring model, the method further includes: Obtain all question entity data, all question relationship data, and all answer entity data from the question entity similarity knowledge base, the question relationship similarity knowledge base, and the preset answer entity knowledge base; An initial insurance product knowledge graph is constructed based on all question entity data, all question relationship data, and all answer entity data. Construct triples in the form of [question entity - question relationship - answer entity] based on each question entity, question relationship, and answer entity in the initialized insurance product knowledge graph; Based on the spatial mapping matrix corresponding to the initialized insurance product knowledge graph, obtain the modulus and angle information contained in each triple; The score of the initialized insurance product knowledge graph is calculated based on the preset scoring function, the modulus information and angle information contained in each triple; Negative samples are obtained through random negative sampling technology, and the loss value of the initialized insurance product knowledge graph is calculated using a preset loss function and the negative samples. According to the SGD optimization method, the initial insurance product knowledge graph is repeatedly optimized until the score value and the loss value meet the preset requirements. The learning and scoring model is then trained and the insurance product knowledge graph obtained after repeated optimization is used as the answer entity filtering knowledge graph.
5. The insurance business scenario question-and-answer recommendation method according to claim 4, characterized in that, The step of obtaining any element from the candidate question entity set and any element from the candidate question relation set, combining them, and obtaining the candidate answer corresponding to the combination result to construct a candidate answer set specifically includes: Select one question entity from the set of candidate question entities as the question entity of the target triple; Select one question relation representation entity from the candidate question relation set as the question relation of the target triple; Based on the question entity of the target triple and the question relationship of the target triple, the corresponding answer entity is selected from the answer entity filtering knowledge graph; All answer entities selected from the knowledge graph of the answer entities are organized to obtain the candidate answer set.
6. The question-and-answer recommendation method for insurance business scenarios according to claim 5, characterized in that, Before the step of performing a comprehensive scoring of the candidate question entity set, the candidate question relation set, and the candidate answer set using the learning and scoring model trained through the learning process, and then selecting the final output question answer to recommend to the target customer based on the comprehensive scoring result, the method further includes: Based on the question entity of the target triple, the question relationship of the target triple, and the corresponding answer entity selected from the knowledge graph of the answer entity as mapping data, construct the target triple, and iterate to construct the target triple to obtain the target triple set; The step of using the learning and scoring model trained through the learning process to comprehensively score the candidate question entity set, the candidate question relation set, and the candidate answer set, and then selecting the final output question answer to recommend to the target customer based on the comprehensive scoring result, specifically includes: The target triple set is input into the learning scoring model that has been trained. The learning scoring model, after being trained, is used to score each triple in the target triple set to obtain a score set. Select the triplet corresponding to the maximum score value from the score set as the final triplet; Obtain the answer entity from the final triplet, and recommend the answer entity from the final triplet as the optimal question answer to the target customer, wherein the target customer is the customer who submitted the question text.
7. A question-and-answer recommendation device for insurance business scenarios, characterized in that, include: The question text acquisition module is used to connect to a pre-defined insurance business client Q&A interface to acquire question texts in insurance dialogue business scenarios. The text data extraction module is used to pre-connect a preset question entity extraction sub-model and a question relationship extraction sub-model, and to perform question entity extraction and question relationship extraction on the question text to obtain corresponding question entity data and question relationship data. The question entity extraction sub-model includes a question entity recognition component, and the question relationship extraction sub-model includes a question relationship recognition component, specifically including… The question entity vector is obtained from the question text according to the question entity recognition component, which is composed of a BERT+CRF integrated model. Using the entity representation vector corresponding to the pre-constructed candidate knowledge graph as a supervision signal, it is compared with the question entity vector to obtain the question entity name corresponding to the question entity vector. The pre-constructed candidate knowledge graph is a knowledge graph pre-constructed based on the similarity of question entities. The question relationship identification component obtains a question relationship vector from the question text based on the question relationship identification component, and then obtains the question relationships in the question text based on the question relationship vector. The question relationship identification component is composed of a Sentence-BERT model. In the process of question relationship identification, the ROBERTa model is first used to encode each element in the question relationship similarity knowledge base to obtain the relationship representation vector corresponding to each element in the question relationship similarity knowledge base. Then, the ROBERTa model is used to encode the question text to obtain the relationship representation vector corresponding to the question text. The relationship representation vector corresponding to each element in the question relationship similarity knowledge base is input into the first "tower" of the Sentence-BERT model, and the relationship representation vector corresponding to the question text is input into the second "tower" of the Sentence-BERT model for comparison. The relationship representation vectors similar to those in the second "tower" are obtained from the first "tower". The question relationship vector of the question text is determined by the similar relationship representation vectors. The candidate question entity set construction module is used to select a preset number of question entity similar data from a preset question entity similarity knowledge base based on the question entity data and a preset first filtering rule, and construct a candidate question entity set. The candidate question relationship set construction module is used to select a preset number of question relationship similar data from a preset question relationship similarity knowledge base based on the question relationship data and a preset second filtering rule, and construct a candidate question relationship set; The model input module is used to input the candidate question entity set and the candidate question relation set as input sets into the pre-learned and trained learning scoring model. The candidate answer set construction module is used to obtain any element from the candidate question entity set and any element from the candidate question relation set, combine them, obtain the candidate answer corresponding to the combination result, and construct the candidate answer set; The filtering and recommendation module is used to comprehensively score the candidate question entity set, the candidate question relation set, and the candidate answer set through the learning and training-completed scoring model, and to filter out the final output question answers and recommend them to the target customers based on the comprehensive scoring results.
8. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor, when executing the computer-readable instructions, implements the steps of the insurance business scenario question-and-answer recommendation method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the insurance business scenario question-and-answer recommendation method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Answer generation method and apparatus based on knowledge base, and intelligent session system
CN109783624A
Knowledge representation learning method based on entity distance
CN110909172A
Information acquisition method and device, equipment and storage medium
CN114281951A