An insurance service question and answer method and related device
By using knowledge base association and semantic relevance models, the knowledge most relevant to user questions is selected, solving the problem of insufficient accuracy of answers in existing technologies and achieving more accurate insurance business Q&A.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ABC FINANCIAL TECH CO LTD
- Filing Date
- 2025-01-23
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, insurance business question-answering methods rely on predefined rules or templates, which are difficult to cover the diverse question needs of users, resulting in insufficient accuracy of answers.
The target knowledge base associated with the user's question is obtained through a knowledge base association model. Then, semantic relevance determination model is used to filter out semantically relevant knowledge from multiple candidate knowledge and generate the answer.
It improved the accuracy of answers to insurance-related questions and enhanced the user experience.
Smart Images

Figure CN119988558B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to a question-and-answer method and related apparatus for insurance business. Background Technology
[0002] With the rapid development of technology, question-and-answer platforms are increasingly widely used in various fields. For example, in the insurance industry, they can provide instant answers to users' questions related to insurance business, helping users resolve their doubts and better understand the insurance business.
[0003] In related technologies, predefined rules or templates can be used to answer various user questions about insurance business. However, predefined rules or templates are difficult to cover all the questions users may ask, lack flexibility, cannot cope with the diverse needs of users, and can easily affect the accuracy of the final generated answers.
[0004] Therefore, improving the accuracy of generated answers to user-submitted questions has become an urgent problem to be solved. Summary of the Invention
[0005] In view of this, embodiments of this application provide a question-and-answer method and related apparatus for insurance business, with the aim of improving the accuracy of the generated answers to questions raised by users.
[0006] In a first aspect, embodiments of this application provide a question-and-answer method for insurance business, the method comprising:
[0007] Obtain the user's unanswered questions; the unanswered questions are related to insurance business.
[0008] Using a knowledge base association model, a target knowledge base associated with the question to be answered is obtained based on the question to be answered; the knowledge base association model is trained based on multiple knowledge bases, and each knowledge base stores multiple pieces of knowledge related to the insurance business.
[0009] The similarity between multiple pieces of knowledge in the target knowledge base and the question to be answered is calculated to determine the K candidate pieces of knowledge with the highest similarity to the question to be answered; wherein K > 0;
[0010] Based on the K candidate knowledge points and the question to be answered, the answer to the question to be answered is obtained.
[0011] In one possible implementation, obtaining the answer to the question based on the K candidate knowledge points and the question to be answered includes:
[0012] Using a semantic relevance determination model, based on the K candidate knowledge items and the question to be answered, N semantically relevant knowledge items related to the question to be answered are obtained, as well as KN reasons why candidate knowledge items are semantically irrelevant to the question to be answered; the K candidate knowledge items include the N semantically relevant knowledge items and the KN candidate knowledge items; 0≤N≤K;
[0013] If the number of the N semantically related knowledge items is greater than or equal to a preset number, then the answer to the question to be answered is obtained through a question-answering model based on the N semantically related knowledge items and the question to be answered.
[0014] In one possible implementation, the question-and-answer method for the insurance business further includes:
[0015] If the number of the N semantically related knowledge items is less than the preset number, then through the knowledge base association model, based on the question to be answered and the reasons for semantic irrelevance, a new target knowledge base associated with the question to be answered is obtained;
[0016] The similarity between multiple pieces of knowledge in the new target knowledge base and the question to be answered is calculated to determine the K new candidate pieces of knowledge that are most similar to the question to be answered.
[0017] Using a semantic relevance determination model, based on the K new candidate knowledge items and the question to be answered, M new semantically relevant knowledge items are obtained that are semantically related to the question to be answered, and KM new candidate knowledge items are obtained that are semantically irrelevant to the question to be answered; the K new candidate knowledge items include the M new semantically relevant knowledge items and the KM new candidate knowledge items; 0≤M≤K;
[0018] If the sum of the number of the N semantically related knowledge items and the M new semantically related knowledge items is greater than or equal to the preset number, then through the question-answering model, based on the N semantically related knowledge items, the M new semantically related knowledge items, and the question to be answered, the answer to the question to be answered is obtained;
[0019] If the sum of the number of the N semantically relevant knowledge items and the M new semantically relevant knowledge items is less than the preset number, then the latest semantically relevant knowledge items are determined based on the question to be answered and the reasons for the new semantics being irrelevant, until the number of semantically relevant knowledge items meets the preset number, and the answer to the question to be answered is obtained.
[0020] In one possible implementation, obtaining the answer to the question based on the K candidate knowledge points and the question to be answered includes:
[0021] Using a question-answering model, the answer to the question is obtained based on the K candidate knowledge points and the question to be answered.
[0022] In one possible implementation, the knowledge base association model is trained in the following way:
[0023] Obtain the first unanswered question sample and the knowledge base associated with the first unanswered question sample;
[0024] Using the first model to be trained, a predicted knowledge base associated with the first question sample to be answered is obtained.
[0025] Based on the predicted knowledge base, the knowledge base associated with the first unanswered question sample, and the first loss function, the first training model is trained to obtain the knowledge base association model.
[0026] In one possible implementation, the question-answering model is trained in the following manner:
[0027] Obtain a second unanswered question sample, a semantically related knowledge sample that is semantically related to the second unanswered question sample, and an answer sample for the second unanswered question sample;
[0028] Using the second model to be trained, a predicted answer to the second question sample is generated based on the second question sample to be answered and the semantically related knowledge sample;
[0029] The question-answering model is obtained by training the second model to be trained based on the predicted answer, the answer sample, and the second loss function.
[0030] In one possible implementation, the semantic relevance determination model is trained in the following manner:
[0031] Obtain a third unanswered question sample, k candidate knowledge samples corresponding to the third unanswered question sample, and n semantically related knowledge samples that are semantically related to the third unanswered question sample; the k candidate knowledge samples are the k knowledge samples in the knowledge base associated with the third unanswered question sample that have the highest similarity to the third unanswered question sample, where k > 0; the n semantically related knowledge samples belong to the k candidate knowledge samples, where n ≤ k and n > 0;
[0032] Using the third model to be trained, based on the third question sample to be answered and the k candidate knowledge samples, a predicted semantically related knowledge sample that is semantically related to the third question sample to be answered is generated.
[0033] Based on the predicted semantically related knowledge samples, the n semantically related knowledge samples, and the third loss function, the third model to be trained is trained to obtain the semantically related determination model.
[0034] Secondly, embodiments of this application provide a question-and-answer device for insurance business, the device comprising:
[0035] The question acquisition module is used to acquire users' unanswered questions; the unanswered questions are related to insurance business.
[0036] The target knowledge base acquisition module is used to obtain a target knowledge base associated with the question to be answered based on the question to be answered through a knowledge base association model; the knowledge base association model is trained based on multiple knowledge bases, and each knowledge base stores multiple pieces of knowledge related to the insurance business;
[0037] The similarity calculation module is used to calculate the similarity between multiple pieces of knowledge in the target knowledge base and the question to be answered, and to determine the K candidate pieces of knowledge that are most similar to the question to be answered; wherein K > 0;
[0038] The answer retrieval module is used to obtain the answer to the question to be answered based on the K candidate knowledge points and the question to be answered.
[0039] Thirdly, embodiments of this application provide a question-and-answer device for insurance business, the device including a memory and a processor:
[0040] The memory is used to store computer programs and transmit the computer programs to the processor;
[0041] The processor is configured to execute the computer program to cause the device to perform the question-and-answer method for insurance business as described in the first aspect above.
[0042] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program. When the computer program is run, a device running the computer program implements the question-and-answer method for insurance business described in the first aspect above.
[0043] Compared with the prior art, the embodiments of this application have the following beneficial effects:
[0044] This application provides a question-answering method and related apparatus for insurance business. In this method, a user's question to be answered, which is related to insurance business, is first obtained. Then, a target knowledge base associated with the question is obtained based on the question using a knowledge base association model. This knowledge base association model is trained on multiple knowledge bases, each storing multiple pieces of knowledge related to insurance business. Subsequently, the similarity between the multiple pieces of knowledge in the target knowledge base and the question to be answered is calculated, determining the K candidate pieces of knowledge with the highest similarity to the question, where K > 0. Finally, the answer to the question is obtained based on the K candidate pieces of knowledge and the question itself. Thus, by fully utilizing a pre-built knowledge base and combining vector similarity to fully mine the semantics of the user's question to be answered, K candidate pieces of knowledge with strong semantic relevance can be determined for the question to be answered. Therefore, based on these K candidate pieces of knowledge, a more accurate answer to the question can be obtained, which is beneficial for further improving the user experience. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings used in the description of the embodiment or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 A flowchart illustrating a question-and-answer method for insurance business provided in this application embodiment;
[0047] Figure 2 A schematic diagram illustrating a question-and-answer method for insurance business provided in an embodiment of this application;
[0048] Figure 3 This is a schematic diagram of the structure of an insurance business question-and-answer device provided in an embodiment of this application. Detailed Implementation
[0049] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0050] Currently, taking the insurance field as an example, existing question-and-answer methods are as follows: for questions raised by users related to insurance business, answers are based on predefined rules or templates. However, the questions raised by users may be diverse, and predefined rules or templates are difficult to cover all the questions that users may raise. They lack flexibility, are difficult to meet user needs, and are prone to low accuracy of the final generated answers.
[0051] To address the aforementioned issues, this application provides a question-and-answer method and related apparatus for insurance business. The method first acquires a user's question related to insurance business. Then, using a knowledge base association model, a target knowledge base associated with the question is obtained. This model is trained on multiple knowledge bases, each storing multiple pieces of knowledge related to insurance business. Next, the similarity between each piece of knowledge in the target knowledge base and the question is calculated to identify the K candidate knowledge pieces with the highest similarity (K > 0). Finally, the answer to the question is obtained based on the K candidate knowledge pieces and the question itself. By fully utilizing a pre-built knowledge base and combining vector similarity to fully mine the semantics of the user's question, K candidate knowledge pieces with strong semantic association can be identified. Therefore, based on these K candidate knowledge pieces, a more accurate answer to the question can be obtained, further improving the user experience.
[0052] It should be noted that the question-and-answer method for insurance business provided in this application can be used in the fields of natural language processing technology or artificial intelligence technology. The above is merely an example and does not limit the application field of the question-and-answer method for insurance business provided in this application. Furthermore, the embodiments of this application may not limit the executing entity of the question-and-answer method for insurance business. For example, the question-and-answer method for insurance business in the embodiments of this application can be applied to data processing devices such as terminal devices or servers. The terminal device can be an electronic device such as a smartphone, computer, or tablet computer. The server can be a standalone server, a cluster server, or a cloud server, etc. This application does not specifically limit the terminal devices or servers mentioned above.
[0053] The following description, in conjunction with the accompanying drawings, details the specific implementation of the question-and-answer method and related devices for insurance business in the embodiments of this application.
[0054] See Figure 1 The figure is a flowchart of a question-and-answer method for insurance business provided in an embodiment of this application, combined with... Figure 1 As shown, it can specifically include:
[0055] S101: Obtain the user's unanswered questions.
[0056] Among them, the questions to be answered are related to insurance business.
[0057] In some embodiments, insurance business may be insurance-related businesses such as auto insurance, life insurance, and accident insurance, and this application does not limit this.
[0058] For example, the questions to be answered could be: what are the underwriting requirements for insurance product A? What are some recommendations for health insurance? What are the terms and conditions of insurance product B? This application does not limit the scope of the questions.
[0059] S102: Using the knowledge base association model, obtain the target knowledge base associated with the question to be answered.
[0060] The knowledge base association model can be used to identify the target knowledge base associated with the question to be answered from multiple knowledge bases.
[0061] It should be noted that this application does not limit the number of target knowledge bases. The target knowledge base associated with the question to be answered can be one knowledge base or multiple knowledge bases.
[0062] The knowledge base association model is trained based on multiple knowledge bases, each of which stores multiple pieces of knowledge related to the insurance business.
[0063] In one possible implementation, various knowledge related to insurance business can be acquired in advance, such as the basic concepts, types, functions, insurance terms, application process, claims process, and after-sales service of insurance products and services. This knowledge is then processed by deduplication, redundancy removal, outdated processing, and invalidation to obtain multiple pieces of processed knowledge. A knowledge base can then be built based on these processed pieces of knowledge.
[0064] In some embodiments, multiple pieces of knowledge can be divided into different knowledge bases based on knowledge type. For example, knowledge base A may contain multiple pieces of knowledge related to the application process of various insurance products, while knowledge base B may contain multiple pieces of knowledge related to insurance terms and conditions. This application does not limit this.
[0065] S103: Calculate the similarity between multiple pieces of knowledge in the target knowledge base and the question to be answered, and determine the K candidate pieces of knowledge that are most similar to the question to be answered.
[0066] Where K > 0. For example, K can be 5. Accordingly, the 5 candidate knowledge items with the highest similarity to the question to be answered can be determined from multiple knowledge items in the target knowledge base. K can also be 6 or 3, etc., and this application does not limit it.
[0067] In some embodiments, based on the above description, the target knowledge base can be one or more, and the similarity between all the knowledge included in at least one target knowledge base and the question to be answered can be calculated, and the K candidate knowledge items with the highest similarity to the question to be answered can be determined from all the knowledge.
[0068] In one possible implementation, for each piece of knowledge in each knowledge base, it can be converted into a vector and stored using a pre-trained embedded embedding model. For the question to be answered, the embedding model can be used to convert the question into a vector, and then the vector similarity between the knowledge vector and the question vector can be calculated. The similarity values of multiple pieces of knowledge are then sorted, and the K pieces of knowledge with the highest vector similarity are determined as the K candidate knowledge pieces.
[0069] Among them, the Embedding model can convert the input question or knowledge into a fixed-dimensional semantic vector, so that when the vector similarity is calculated later, the question and knowledge with similar semantics in the vector space are closer together.
[0070] Furthermore, in some embodiments, when the number of knowledge entries included in the target knowledge base is less than K, the indications included in the target knowledge base can be directly identified as candidate knowledge.
[0071] S104: Based on the K candidate knowledge points and the question to be answered, obtain the answer to the question to be answered.
[0072] In one possible implementation of this application, S104 may specifically include: obtaining N semantically related knowledge items that are semantically related to the question to be answered, and KN reasons why the candidate knowledge items are semantically unrelated to the question to be answered, based on the K candidate knowledge items and the question to be answered, through a semantic relevance determination model; subsequently, if the number of the N semantically related knowledge items is greater than or equal to a preset number, obtaining the answer to the question to be answered based on the N semantically related knowledge items and the question to be answered through a question-answering model.
[0073] Wherein, the K candidate knowledge items include the N semantically related knowledge items and the KN candidate knowledge items; 0≤N≤K.
[0074] In some embodiments, K can be 5. Assuming that the semantic relevance determination model is used, based on 5 candidate knowledge points and the question to be answered, 3 semantically relevant knowledge points are obtained that are semantically related to the question to be answered, and the remaining 2 candidate knowledge points are semantically irrelevant to the question to be answered.
[0075] For example, all K pieces of knowledge may be semantically related to the question to be answered. In this case, the semantically related model does not need to output the reason for semantic irrelevance, that is, N=K.
[0076] For example, all K pieces of knowledge may be semantically irrelevant to the question to be answered. In this case, the semantically relevant model does not need to output semantically relevant knowledge, that is, N=0.
[0077] In some embodiments, semantic irrelevance may be due to a mismatch between the question to be answered and the knowledge type of the target knowledge base to which the candidate knowledge belongs.
[0078] For example, the target knowledge base to which the K candidate knowledge belongs includes knowledge base A and knowledge base B. The reason for semantic irrelevance can be that the question to be answered does not match the knowledge type of knowledge base A.
[0079] In some embodiments, the preset number can be 3 or 5, etc., and this application does not limit it. For example, assuming the preset number is 3 and K is 8, if the semantic relevance determination model obtains 5 semantically related knowledge points that are semantically related to the question to be answered, then the answer to the question to be answered can be obtained through the question answering model based on these 5 semantically related knowledge points and the question to be answered.
[0080] Thus, from the K candidate knowledge items, the semantic relevance determination model can further filter out knowledge items that are more semantically relevant to the question to be answered, and the answer obtained based on this is more accurate.
[0081] The previous section introduced the case where the number of N semantically related knowledge items is greater than or equal to a preset number. The following section will introduce the case where the number of N semantically related knowledge items is less than a preset number.
[0082] In one possible implementation of this application, the question-and-answer method for the insurance business may further include the following steps:
[0083] A1: If the number of the N semantically related knowledge items is less than the preset number, then through the knowledge base association model, based on the question to be answered and the semantically irrelevant reasons, a new target knowledge base associated with the question to be answered is obtained.
[0084] By combining unanswered questions with semantically irrelevant reasons, new unanswered questions can be formed. Through a knowledge base association model, a new target knowledge base associated with the unanswered questions can be obtained.
[0085] In examples where semantic irrelevance stems from a mismatch between the question to be answered and the knowledge type of the target knowledge base to which the candidate knowledge belongs, the knowledge base association model can filter out knowledge bases with mismatched knowledge types when determining a new target knowledge base.
[0086] A2: Calculate the similarity between multiple pieces of knowledge in the new target knowledge base and the question to be answered, and determine the K new candidate knowledge pieces that have the highest similarity to the question to be answered.
[0087] A3: Using a semantic relevance determination model, based on the K new candidate knowledge and the question to be answered, obtain M new semantically relevant knowledge that is semantically related to the question to be answered, and KM new candidate knowledge that are semantically unrelated to the question to be answered.
[0088] Wherein, the K new candidate knowledge items include the M new semantically related knowledge items and the KM new candidate knowledge items; 0≤M≤K.
[0089] A4: If the sum of the number of the N semantically related knowledge items and the M new semantically related knowledge items is greater than or equal to the preset number, then the answer to the question to be answered is obtained through the question-answering model based on the N semantically related knowledge items, the M new semantically related knowledge items, and the question to be answered.
[0090] It should be noted that the implementation methods of A1-A4 can be found in the introduction of the specific implementation methods of S102-S104, which will not be repeated here.
[0091] A5: If the sum of the number of the N semantically relevant knowledge items and the M new semantically relevant knowledge items is less than the preset number, then the latest semantically relevant knowledge items are determined based on the question to be answered and the reasons for the new semantics being irrelevant, until the number of semantically relevant knowledge items meets the preset number, and the answer to the question to be answered is obtained.
[0092] If the sum of N semantically relevant knowledge and M new semantically relevant knowledge is less than the preset number, A1-A3 can be repeatedly executed based on the question to be answered and the reason why the new semantics are irrelevant, until the sum of all semantically relevant knowledge, including the semantically relevant knowledge and the new semantically relevant knowledge, is greater than or equal to the preset number. Then, the answer to the question to be answered can be obtained through the question answering model based on all the semantically relevant knowledge and the question to be answered.
[0093] In one possible implementation of this application, S104 may also include: obtaining the answer to the question to be answered based on the K candidate knowledge points and the question to be answered using a question-answering model.
[0094] After obtaining K candidate knowledge points, the answer to the question can be obtained directly using these K candidate knowledge points and the question to be answered through a question-answering model. This application does not limit the implementation method of S104.
[0095] Next, we will continue to introduce the training methods for the various models mentioned above.
[0096] In one possible implementation of this application, the knowledge base association model can be trained in the following way: first, a first unanswered question sample and the knowledge base associated with the first unanswered question sample are obtained; then, based on the first unanswered question sample, a predicted knowledge base associated with the first unanswered question sample is obtained using a first training model; subsequently, the first training model is trained according to the predicted knowledge base, the knowledge base associated with the first unanswered question sample, and a first loss function to obtain the knowledge base association model.
[0097] In some embodiments, the first sample of questions to be answered can be obtained from the user's historical questions, and the knowledge base associated with the first sample of questions to be answered can be selected by business personnel from multiple knowledge bases, which is not limited in this application.
[0098] In some embodiments, the first model to be trained can be a large model or a BERT model, etc., and this application does not limit it.
[0099] The first unanswered question sample is input into the first training model, which can output a predicted knowledge base associated with the unanswered question sample.
[0100] In some embodiments, the difference between the predicted knowledge base and the knowledge base associated with the first question sample is determined by a first loss function. If the preset training termination condition is met, a trained knowledge base association model can be obtained. If the preset training termination condition is not met, the above training process can be iteratively executed until the preset training termination condition is met.
[0101] For example, the preset training termination condition could be that the number of training iterations of the knowledge base association model reaches a preset threshold; or it could be that the model performance of the knowledge base association model meets preset requirements, such as the difference between the predicted knowledge base and the knowledge base associated with the first unanswered question sample meeting a preset difference condition. This application does not limit this.
[0102] In one possible implementation of this application, the question answering model is trained as follows: obtaining a second question sample to be answered, semantically related knowledge samples that are semantically related to the second question sample to be answered, and answer samples of the second question sample to be answered; generating a predicted answer to the second question sample to be answered based on the second question sample to be answered and the semantically related knowledge samples using a second training model; and training the second training model to obtain the question answering model based on the predicted answer, the answer samples, and a second loss function.
[0103] The training process for the question-answering model can be found in the training process of the knowledge base association model described above, and will not be repeated here.
[0104] It should be noted that the second unanswered question sample can be the same as the first unanswered question sample or it can be a different sample; this application does not limit this.
[0105] In one possible implementation of this application, the semantic relevance determination model is trained as follows: A third unanswered question sample, k candidate knowledge samples corresponding to the third unanswered question sample, and n semantically relevant knowledge samples semantically related to the third unanswered question sample are obtained; the k candidate knowledge samples are the k knowledge samples in the knowledge base associated with the third unanswered question sample that have the highest similarity to the third unanswered question sample, where k > 0; the n semantically relevant knowledge samples belong to the k candidate knowledge samples, where n ≤ k and n > 0; a third training model is used to generate predicted semantically relevant knowledge samples semantically related to the third unanswered question sample based on the third unanswered question sample and the k candidate knowledge samples; the third training model is trained according to the predicted semantically relevant knowledge samples, the n semantically relevant knowledge samples, and a third loss function to obtain the semantic relevance determination model.
[0106] The training process for the semantic relevance determination model can be found in the section on training the semantic relevance determination model described above, and will not be repeated here.
[0107] It should be noted that the third unanswered question sample can be the same as the first unanswered question sample or it can be a different sample; this application does not limit this.
[0108] As an example, see Figure 2 This figure is a schematic diagram of a question-and-answer method for insurance business provided in an embodiment of this application. Figure 2 As shown, business personnel can construct multiple knowledge bases, including knowledge base 1 to knowledge base n. Then, they can process each piece of knowledge in the knowledge base through the Embedding model to obtain the vector corresponding to the knowledge, thus obtaining a knowledge vector base 1 to knowledge vector base n that corresponds one-to-one with knowledge base 1 to knowledge base n.
[0109] like Figure 2 As shown, users can ask questions, obtaining user questions (i.e., the unanswered questions mentioned above). These user questions can be input into the embedding model to obtain the corresponding vectors. Through the large model service (i.e., the trained knowledge base association model), knowledge vector bases 6 and 8 (i.e., the target knowledge base mentioned above) can be determined. Then, for each knowledge vector in knowledge vector bases 6 and 8, the vector similarity is calculated with the user question vector, identifying the K contexts with the highest similarity (i.e., the K candidate knowledge mentioned above).
[0110] like Figure 2 As shown, through the large model service (i.e., the trained semantic relevance determination model), it is possible to determine whether K contexts can answer the user's question (i.e., as described above, determine N semantically relevant knowledge points and KN candidate knowledge points that are semantically irrelevant to the question to be answered). The N semantically relevant knowledge points are stored in the candidate context record table, and the semantically irrelevant reasons are stored in the reason table for not being able to answer.
[0111] like Figure 2 As shown, it can be determined whether the number of candidate contexts has reached the preset value (that is, whether the number of semantically related knowledge introduced above is greater than or equal to the preset number). If so, the subsequent steps can be executed. Otherwise, the previous steps will be repeated based on user questions and semantic irrelevance.
[0112] When the number of candidate contexts reaches a preset value, the user's original question (i.e., the user's question) and candidate context records can be merged, and the answer can be output through the large model service (i.e., the trained question-answering model).
[0113] In summary, the question-answering method for insurance business provided in this application can fully explore the semantics of the question to be answered based on the semantic analysis capabilities of models such as similarity comparison and semantic relevance determination models, better understand the question to be answered, and help provide more accurate answers.
[0114] Furthermore, the embodiments of this application can utilize similarity comparisons and various models to achieve automatic semantic analysis and answers to questions, greatly improving the efficiency of question answering and the accuracy of the output answers. Simultaneously, it can extract key information (i.e., candidate knowledge) from a knowledge base containing a large amount of knowledge, thereby providing more accurate answers.
[0115] The above are some specific implementations of the question-and-answer method for insurance business provided in the embodiments of this application. Based on this, this application also provides a corresponding question-and-answer device for insurance business. The question-and-answer device for insurance business provided in the embodiments of this application will be described below from the perspective of functional modularity.
[0116] See Figure 3 The figure is a schematic diagram of the structure of an insurance business question-and-answer device provided in an embodiment of this application. The insurance business question-and-answer device 300 may include:
[0117] Question acquisition module 310 is used to acquire users' unanswered questions; the unanswered questions are related to insurance business.
[0118] The target knowledge base acquisition module 320 is used to obtain a target knowledge base associated with the question to be answered based on the question to be answered through a knowledge base association model; the knowledge base association model is trained based on multiple knowledge bases, and each knowledge base stores multiple pieces of knowledge related to the insurance business;
[0119] Similarity calculation module 330 is used to calculate the similarity between multiple pieces of knowledge in the target knowledge base and the question to be answered, and determine the K candidate pieces of knowledge with the highest similarity to the question to be answered; wherein K > 0;
[0120] The answer acquisition module 340 is used to obtain the answer to the question to be answered based on the K candidate knowledge points and the question to be answered.
[0121] As one implementation method, the answer acquisition module 340 may specifically include:
[0122] The first knowledge and reason acquisition unit is used to obtain, through a semantic relevance determination model, N semantically relevant knowledge items related to the semantics of the question to be answered, and KN reasons why the candidate knowledge items are semantically irrelevant to the question to be answered, based on the K candidate knowledge items and the question to be answered; the K candidate knowledge items include the N semantically relevant knowledge items and the KN candidate knowledge items; 0≤N≤K;
[0123] The first answer acquisition unit is used to obtain the answer to the question to be answered based on the N semantically related knowledge and the question to be answered by a question-answering model if the number of the N semantically related knowledge is greater than or equal to a preset number.
[0124] As one implementation method, the insurance business question-and-answer device 300 may further include:
[0125] The first acquisition module is used to obtain a new target knowledge base associated with the question to be answered based on the question to be answered and the reason for semantic irrelevance, through the knowledge base association model if the number of the N semantically related knowledge items is less than the preset number.
[0126] The determination module is used to calculate the similarity between multiple pieces of knowledge in the new target knowledge base and the question to be answered, and to determine the K new candidate pieces of knowledge that are most similar to the question to be answered;
[0127] The second acquisition module is used to obtain, through a semantic relevance determination model, M new semantically relevant knowledge items that are semantically related to the question to be answered, and KM new candidate knowledge items that are semantically irrelevant to the question to be answered, based on the K new candidate knowledge items and the question to be answered; the K new candidate knowledge items include the M new semantically relevant knowledge items and the KM new candidate knowledge items; 0≤M≤K;
[0128] The third acquisition module is used to obtain the answer to the question to be answered by a question-and-answer model based on the N semantically related knowledge, the M new semantically related knowledge, and the question to be answered if the sum of the number of the N semantically related knowledge and the M new semantically related knowledge is greater than or equal to the preset number.
[0129] The fourth acquisition module is used to determine the latest semantically relevant knowledge based on the question to be answered and the reasons for the new semantic irrelevance if the sum of the number of the N semantically relevant knowledge and the M new semantically relevant knowledge is less than the preset number, until the number of semantically relevant knowledge meets the preset number, and thus obtain the answer to the question to be answered.
[0130] As one implementation method, the answer acquisition module 340 can be specifically used for:
[0131] Using a question-answering model, the answer to the question is obtained based on the K candidate knowledge points and the question to be answered.
[0132] As one implementation method, the knowledge base association model is trained using the following units:
[0133] The first acquisition unit is used to acquire a first unanswered question sample and a knowledge base associated with the first unanswered question sample;
[0134] The second acquisition unit is used to obtain the predicted knowledge base associated with the first question sample based on the first question sample to be answered by the first training model.
[0135] The first training unit is used to train the first model to be trained to obtain the knowledge base association model based on the predicted knowledge base, the knowledge base associated with the first question sample to be answered, and the first loss function.
[0136] As one implementation method, the question-answering model is trained using the following units:
[0137] The third acquisition unit is used to acquire a second question sample to be answered, a semantically related knowledge sample that is semantically related to the second question sample to be answered, and an answer sample to the second question sample to be answered.
[0138] The first generation unit is used to generate a predicted answer to the second question sample based on the second question sample to be answered and the semantically related knowledge sample using the second model to be trained.
[0139] The second training unit is used to train the second model to be trained to obtain the question-answering model based on the predicted answer, the answer sample, and the second loss function.
[0140] As one implementation method, the semantic relevance determination model is trained using the following units:
[0141] The fourth acquisition unit is used to acquire a third unanswered question sample, k candidate knowledge samples corresponding to the third unanswered question sample, and n semantically related knowledge samples that are semantically related to the third unanswered question sample; the k candidate knowledge samples are the k knowledge samples in the knowledge base associated with the third unanswered question sample that have the highest similarity to the third unanswered question sample, where k > 0; the n semantically related knowledge samples belong to the k candidate knowledge samples, where n ≤ k and n > 0;
[0142] The second generation unit is used to generate a predicted semantically related knowledge sample that is semantically related to the third question sample to be answered, based on the third question sample to be answered and the k candidate knowledge samples, using the third model to be trained.
[0143] The third training unit is used to train the third training model to obtain the semantically related determination model based on the predicted semantically related knowledge samples, the n semantically related knowledge samples, and the third loss function.
[0144] This application also provides a question-and-answer device for insurance business and a computer-readable storage medium to implement the solution provided in this application.
[0145] The question-and-answer device for insurance business includes a memory and a processor. The memory is used to store a computer program, and the processor is used to execute the computer program so that the device performs the question-and-answer method for insurance business as described in any embodiment of this application.
[0146] The computer-readable storage medium stores a computer program, and when the computer program is run, the device running the computer program implements the question-and-answer method for insurance business as described in any embodiment of this application.
[0147] In the embodiments of this application, the terms "first" and "second" (if they exist) are used only as name identifiers and do not represent the order of first and second.
[0148] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a readable storage medium, such as a read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0149] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate. The components indicated as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment solution according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0150] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A question-and-answer method for insurance business, characterized in that, include: Get the user's unanswered questions; The questions to be answered are related to insurance business; Using a knowledge base association model, a target knowledge base associated with the question to be answered is obtained based on the question to be answered. The knowledge base association model is trained based on multiple knowledge bases, each of which stores multiple pieces of knowledge related to the insurance business. The similarity between multiple pieces of knowledge in the target knowledge base and the question to be answered is calculated to determine the K candidate pieces of knowledge with the highest similarity to the question to be answered; wherein K > 0; Using a semantic relevance determination model, based on the K candidate knowledge items and the question to be answered, N semantically relevant knowledge items related to the question to be answered are obtained, as well as KN reasons why the candidate knowledge items are semantically irrelevant to the question to be answered; the K candidate knowledge items include the N semantically relevant knowledge items and the KN candidate knowledge items; 0≤N≤K; If the number of the N semantically related knowledge items is greater than or equal to the preset number, then the answer to the question to be answered is obtained through the question-answering model based on the N semantically related knowledge items and the question to be answered; If the number of the N semantically related knowledge items is less than the preset number, then through the knowledge base association model, based on the question to be answered and the reasons for semantic irrelevance, a new target knowledge base associated with the question to be answered is obtained; The similarity between multiple pieces of knowledge in the new target knowledge base and the question to be answered is calculated, and the K new candidate pieces of knowledge with the highest similarity to the question to be answered are determined. Using a semantic relevance determination model, based on the K new candidate knowledge items and the question to be answered, M new semantically relevant knowledge items are obtained that are semantically related to the question to be answered, and KM new candidate knowledge items are obtained that are semantically irrelevant to the question to be answered; the K new candidate knowledge items include the M new semantically relevant knowledge items and the KM new candidate knowledge items; 0≤M≤K; If the sum of the number of the N semantically related knowledge items and the M new semantically related knowledge items is greater than or equal to the preset number, then the answer to the question to be answered is obtained through the question-answering model based on the N semantically related knowledge items, the M new semantically related knowledge items, and the question to be answered. If the sum of the number of the N semantically relevant knowledge items and the M new semantically relevant knowledge items is less than the preset number, then the latest semantically relevant knowledge items are determined based on the question to be answered and the reasons for the new semantics being irrelevant, until the number of semantically relevant knowledge items meets the preset number, and the answer to the question to be answered is obtained.
2. The method according to claim 1, characterized in that, The knowledge base association model is trained in the following way: Obtain the first unanswered question sample and the knowledge base associated with the first unanswered question sample; Using the first model to be trained, a predicted knowledge base associated with the first question sample to be answered is obtained. Based on the predicted knowledge base, the knowledge base associated with the first unanswered question sample, and the first loss function, the first training model is trained to obtain the knowledge base association model.
3. The method according to claim 1, characterized in that, The question-answering model is trained in the following way: Obtain a second unanswered question sample, a semantically related knowledge sample that is semantically related to the second unanswered question sample, and an answer sample for the second unanswered question sample; Using the second model to be trained, a predicted answer to the second question sample is generated based on the second question sample to be answered and the semantically related knowledge sample; The question-answering model is obtained by training the second model to be trained based on the predicted answer, the answer sample, and the second loss function.
4. The method according to claim 1, characterized in that, The semantic relevance determination model is trained in the following manner: Obtain a third unanswered question sample, k candidate knowledge samples corresponding to the third unanswered question sample, and n semantically related knowledge samples that are semantically related to the third unanswered question sample; the k candidate knowledge samples are the k knowledge samples in the knowledge base associated with the third unanswered question sample that have the highest similarity to the third unanswered question sample, where k > 0; the n semantically related knowledge samples belong to the k candidate knowledge samples, where n ≤ k and n > 0; Using the third model to be trained, based on the third question sample to be answered and the k candidate knowledge samples, a predicted semantically related knowledge sample that is semantically related to the third question sample to be answered is generated. Based on the predicted semantically related knowledge samples, the n semantically related knowledge samples, and the third loss function, the third model to be trained is trained to obtain the semantically related determination model.
5. A question-and-answer device for insurance business, characterized in that, The device includes: The question acquisition module is used to acquire users' unanswered questions; the unanswered questions are related to insurance business. The target knowledge base acquisition module is used to obtain a target knowledge base associated with the question to be answered based on the question to be answered through a knowledge base association model; the knowledge base association model is trained based on multiple knowledge bases, and each knowledge base stores multiple pieces of knowledge related to the insurance business; The similarity calculation module is used to calculate the similarity between multiple pieces of knowledge in the target knowledge base and the question to be answered, and to determine the K candidate pieces of knowledge that are most similar to the question to be answered; wherein K > 0; The answer retrieval module is used to obtain the answer to the question to be answered based on the K candidate knowledge points and the question to be answered; The answer acquisition module includes: The first knowledge and reason acquisition unit is used to obtain, through a semantic relevance determination model, N semantically relevant knowledge items related to the semantics of the question to be answered, and KN reasons why the candidate knowledge items are semantically irrelevant to the question to be answered, based on the K candidate knowledge items and the question to be answered; the K candidate knowledge items include the N semantically relevant knowledge items and the KN candidate knowledge items; 0≤N≤K; The first answer acquisition unit is used to obtain the answer to the question to be answered based on the N semantically related knowledge and the question to be answered by a question-answering model if the number of the N semantically related knowledge is greater than or equal to a preset number. The first acquisition module is used to obtain a new target knowledge base associated with the question to be answered based on the question to be answered and the reason for semantic irrelevance, through the knowledge base association model if the number of the N semantically related knowledge items is less than the preset number. The determination module is used to calculate the similarity between multiple pieces of knowledge in the new target knowledge base and the question to be answered, and to determine the K new candidate pieces of knowledge that are most similar to the question to be answered; The second acquisition module is used to obtain, through a semantic relevance determination model, M new semantically relevant knowledge items that are semantically related to the question to be answered, and KM new candidate knowledge items that are semantically irrelevant to the question to be answered, based on the K new candidate knowledge items and the question to be answered; the K new candidate knowledge items include the M new semantically relevant knowledge items and the KM new candidate knowledge items; 0≤M≤K; The third acquisition module is used to obtain the answer to the question to be answered by a question-and-answer model based on the N semantically related knowledge, the M new semantically related knowledge, and the question to be answered if the sum of the number of the N semantically related knowledge and the M new semantically related knowledge is greater than or equal to the preset number. The fourth acquisition module is used to determine the latest semantically relevant knowledge based on the question to be answered and the reasons for the new semantic irrelevance if the sum of the number of the N semantically relevant knowledge and the M new semantically relevant knowledge is less than the preset number, until the number of semantically relevant knowledge meets the preset number, and thus obtain the answer to the question to be answered.
6. A question-and-answer device for insurance business, characterized in that, The device includes a memory and a processor: The memory is used to store computer programs and transmit the computer programs to the processor; The processor is configured to execute the computer program to cause the device to perform the steps of the question-and-answer method for insurance business as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is run, the device running the computer program implements the steps of the question-and-answer method for insurance business as described in any one of claims 1-4.
Citation Information
Patent Citations
Data processing method and device, equipment and storage medium
CN118520096A