Medical insurance intelligent question answering method and system based on multi-similarity comparison
By building a medical insurance policy knowledge base and using the TextCNN model combined with the Jaccard similarity algorithm, the problem of inaccurate answer matching and difficulty in obtaining user intentions in the medical insurance intelligent question-and-answer is solved, efficient and accurate medical insurance policy inquiry is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411343405.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-20
AI Technical Summary
The existing intelligent question-and-answer technology has problems such as inaccurate answer matching and difficulty in obtaining user intentions in the medical insurance field, especially in complex statement environments, which affects the user experience.
By building an accurate medical insurance policy knowledge base, using speech recognition technology and TextCNN model to analyze user problem intentions, combining Jaccard similarity algorithm for multiple similarity comparisons, and matching the most accurate answers.
The quality and efficiency of question answers are improved, the accuracy and user experience of medical insurance policy inquiries are ensured, and the matching accuracy of answers is enhanced through three rounds of matching.
Smart Images

Figure CN119166786A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent question answering, and in particular to a medical insurance intelligent question answering method and system for multiple similarity comparisons. Background Art
[0002] With the development of the medical insurance industry, people's emphasis on health and the continuous rise in medical expenses, the insured persons' attention to medical insurance policy issues has also increased. Insured persons often ask relevant questions through on-site consultations and telephone consultations, which makes the service staff's work heavy. In addition, if the insured persons input the questions they need to ask or pay attention to through the search engine to understand them by themselves, since the terminology of medical insurance business issues is relatively professional, there are personalized and special problems, which generally require professional and correct keyword input. The keywords entered by the insured persons may be difficult to find, and the answers may not match the questions. Therefore, it is also difficult for the insured people to understand the medical insurance business policy by themselves.
[0003] Due to the industry characteristics of medical insurance policies and the precision of answers, the current conventional intelligent question-answering methods have the problem of inaccurate matching answers. For example, the Chinese invention patent application with publication number CN114153994A and the name of medical insurance information question-answering method and device discloses matching user consultation questions with knowledge graphs to achieve related question queries. This solution has the problem of low accuracy in knowledge graph construction, and the answers fed back to users may be inaccurate.
[0004] In addition, existing intelligent question-and-answer technologies mostly interact through text and voice information, and are unable to accurately obtain user intent. The accuracy of voice answers in complex sentence environments, especially in related industry fields, is low, affecting user experience. Summary of the invention
[0005] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a medical insurance intelligent question-answering method and system with multiple similarity comparisons, which constructs an accurate medical insurance policy knowledge base, uses speech recognition technology to obtain user questions, uses a TextCNN model to parse the user's question intentions, and combines the Jaccard similarity algorithm to identify the similarity between user questions and question labels, questions and answers in the knowledge base, thereby matching the most accurate answers and improving the quality and efficiency of question answers.
[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:
[0007] The first aspect of the present invention provides a medical insurance intelligent question-answering method with multiple similarity comparisons.
[0008] The medical insurance intelligent question-answering method with multiple similarity comparisons includes the following steps:
[0009] Build a medical insurance policy knowledge base including questions, answers and question tags;
[0010] Obtain user question data and convert the user question data into effective question text;
[0011] Use the pre-trained Word2Vec algorithm to convert the questions, answers, and question labels in the medical insurance policy knowledge base into corresponding word vector matrices;
[0012] Use the pre-trained TextCNN model to extract the features of valid question texts and form a set of question features;
[0013] Use the pre-trained Word2Vec algorithm to convert the question feature set into the question feature set word vector. The question feature set word vector is matched with the word vector matrix corresponding to the question label, the word vector matrix corresponding to the question, and the word vector matrix corresponding to the answer in three rounds. The latter round of matching is performed within the range screened by the previous round of matching. Finally, the answer with the highest match degree with the user's question data is obtained and pushed to the user.
[0014] The second aspect of the present invention provides a medical insurance intelligent question-answering system with multiple similarity comparisons.
[0015] Medical insurance intelligent question-answering system with multiple similarity comparisons, including:
[0016] The knowledge base construction module is configured to: construct a medical insurance policy knowledge base including questions, answers and question labels;
[0017] The user question data acquisition module is configured to: acquire user question data and convert the user question data into valid question text;
[0018] The conversion module is configured to: use the pre-trained Word2Vec algorithm to convert the questions, answers and question labels in the medical insurance policy knowledge base into corresponding word vector matrices;
[0019] The feature extraction module is configured to: use the pre-trained TextCNN model to extract the features of the valid question text to form a question feature set;
[0020] The matching and pushing module is configured as follows: using the pre-trained Word2Vec algorithm to convert the question feature set into the question feature set word vector, and matching the question feature set word vector with the word vector matrix corresponding to the question label, the word vector matrix corresponding to the question, and the word vector matrix corresponding to the answer in three rounds, with the latter round of matching being performed within the range screened out by the previous round of matching, and ultimately obtaining the answer with the highest degree of match with the user's question data, and pushing the answer to the user.
[0021] The third aspect of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the steps in the medical insurance intelligent question-answering method with multiple similarity comparisons as described in the first aspect of the present invention.
[0022] The fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in the medical insurance intelligent question-and-answer method with multiple similarity comparisons as described in the first aspect of the present invention are implemented.
[0023] One or more of the above technical solutions have the following beneficial effects:
[0024] 1. The present invention provides a medical insurance intelligent question-answering method and system with multiple similarity comparisons. After the answers to questions are reviewed and confirmed by the medical insurance business, they are stored in a relational database to form a medical insurance policy knowledge base. The TextCNN model is used to parse the user's question intention, and the Jaccard similarity algorithm is combined to identify the similarity between the user's question and the question label, question and answer in the medical insurance policy knowledge base, so as to match the most accurate answer and improve the quality and efficiency of question answering.
[0025] 2. During the Word2Vec model training and TextCNN model training, the present invention inputs the questions and answers in the medical insurance policy knowledge base as training sets, which can effectively achieve the fit of the model to the medical insurance policy, improve the accuracy of the two models in word vector conversion and text intent recognition, accurately obtain user intent, and further improve the matching accuracy of user questions and pushed answers.
[0026] 3. In the process of similarity matching, the present invention uses TextCNN to obtain semantic similarity, and uses the Jaccard algorithm to compare the feature value with the cosine similarity of the content in the medical insurance policy knowledge base. The two similarities are used to comprehensively measure the text similarity, which takes into account both the literal similarity of the text and the main semantic characteristics of the text, so that the measurement result can be more stable and more accurate.
[0027] 4. The present invention adopts a triple matching method of label matching, question matching and answer matching when matching question features with questions in the medical insurance policy knowledge base. By integrating the similarity results of the triple matching, the user's questions are matched to the most similar questions and answers in the medical insurance policy knowledge base, thereby improving the matching accuracy.
[0028] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0030] Figure 1 This is a flow chart of the method of the first embodiment.
[0031] Figure 2 It is a system structure diagram of the second embodiment. DETAILED DESCRIPTION
[0032] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0033] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.
[0034] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0035] Embodiment 1
[0036] In response to the technical problems in the aforementioned background technology, namely, the lack of precision in matching the answers to user feedback with the questions asked by the user, and the inability to accurately obtain the user's question intention, this embodiment discloses a medical insurance intelligent question-answering method with multiple similarity comparisons.
[0037] In general, for the first question, this embodiment first creates a medical insurance policy knowledge base, in which the questions and answers are stored after being reviewed and confirmed by the medical insurance business, which can ensure the accuracy of the knowledge base; when training the Word2Ve model, the questions and answers in the medical insurance policy knowledge base are input as training sets, which effectively realizes the fit of the model to the medical insurance policy and improves the accuracy of the model in word vector conversion; during similarity matching, through three rounds of matching processes, the characteristic values of the user's questions are matched with the question label, the question and the word vector matrix converted by the Word2Vec model in turn, thereby enhancing the matching accuracy.
[0038] For the second question, this embodiment uses the TextCNN model to parse the user's question intent. During the training process of the TextCNN model, the questions and answers in the medical insurance policy knowledge base are input as training sets to improve the accuracy of user text intent recognition and accurately obtain user intent.
[0039] Specifically, the medical insurance intelligent question-answering method with multiple similarity comparisons provided in this embodiment may include the following steps:
[0040] Sort out questions and corresponding answers related to the medical insurance business field, build a one-to-one medical insurance policy knowledge base of questions and answers, maintain labels for each question, and generate corresponding question label sets;
[0041] Obtain the voice data of the user's question, convert the voice data into text data through speech-to-text, and clean the text data for invalid words to obtain valid question text;
[0042] Use a word segmenter to segment valid question text data, use the pre-trained Word2Vec algorithm to convert valid question text into a valid question text word vector matrix, and convert the policy knowledge base questions, answers, and question labels into question word vector matrices, answer word vector matrices, and label word vector matrices respectively;
[0043] Use the trained TextCNN model to process the effective question text word vector matrix through the convolution layer and pooling layer to extract the local features of the question text word vector. The extracted local features form a question feature set.
[0044] The extracted question feature set is matched with the word vector matrix corresponding to the knowledge base question label, question and answer in three rounds. The Jaccard algorithm is used to calculate the similarity based on the ratio of the intersection and union of the sets, and the answer to the question with the highest matching degree is output as the result.
[0045] Furthermore, the formation of the medical insurance policy knowledge base is specifically as follows:
[0046] All potential questions and answers in the medical insurance field are sorted out as completely as possible. All questions and answers must be reviewed by the medical insurance department to ensure their accuracy;
[0047] The sorting out of issues related to medical insurance policies must include major and minor issues. Major issues can include answers to minor issues.
[0048] Questions and answers are stored in relational data in a one-to-one manner to form a medical insurance policy knowledge base.
[0049] Furthermore, the maintenance of the question label is specifically as follows:
[0050] Each question and answer in the medical insurance policy knowledge base is managed by labeling, and labels are maintained for the questions. The labels are divided into main labels and detailed labels.
[0051] The main label is used to classify the business domain of the problem. Each problem must have a main label;
[0052] Refined tags are tags that are set up to more accurately define the meaning of a question. A question can have one or more refined tags.
[0053] The main label and the refined label constitute the label set of the problem. The labeling process is mainly to locate the scope of the problem and avoid excessive deviation when matching the problem.
[0054] A question, an answer, and the corresponding tag set constitute a knowledge record.
[0055] Furthermore, the user's question is converted into a valid question text, specifically:
[0056] Get the user's voice data, use the speech recognition tool to convert the audio file into text format, generate speech text, and get the user's question in text format. The input voice file types include mp3, mp4, mpeg, mpga, m4a, wav and webm;
[0057] The speech text is displayed to the outside world, and interactive operations are used to let users confirm whether the speech conversion content is correct and obtain the confirmation text. If the recognition is incorrect, the speech recognition is repeated to correct the inaccurate conversion problem in the speech-to-text process;
[0058] Generate an invalid word library by customizing or using an open source stop word library, and include words that often appear in spoken language and have little meaning into the invalid word library;
[0059] Clean the confirmation text information, obtain invalid words from the invalid word library, clean and remove invalid words in the user's questions in text format, and generate valid question text to improve the semantic matching degree.
[0060] Furthermore, the specific training method of the pre-trained Word2Vec algorithm is as follows:
[0061] We selected open source text training sets and questions and answers in the medical insurance policy knowledge base as pre-training data. Through model training, we converted each word in the training set into a vector in a high-dimensional space, i.e., a valid vocabulary.
[0062] Specifically, the text in the pre-training data is segmented using a tokenizer. All words are included in the initial vocabulary. Each word is encoded in the form of a One-Hot code. Through model training, the probability of the occurrence of context words under the condition of a given target word is maximized, that is, the following objective function is maximized. The calculation formula is as follows:
[0063]
[0064] Where, each position t=1,2...T in the pre-trained text, T is the total number of words in the sentence, and wt is the target word, w t+j is the context word, and c is the window size, i.e. the length before and after the vector.
[0065] The goal is to find the value of L when the function reaches its extreme value. t and w t+j The similarity of word vectors is calculated for a given w t+j When the context appears w t The probability or given w t When the context appears w t+j The probability of , and the word vector is calculated to maximize this probability.
[0066] Specifically, through continuous model training, the words in the initial vocabulary are converted into vectors with a dimension of k to obtain a valid vocabulary.
[0067] Furthermore, the pre-trained Word2Vec algorithm is used to convert valid question texts, policy knowledge base questions, answers, and labels into word vector matrices, specifically:
[0068] Use a tokenizer to convert text that needs word vector conversion into different keywords;
[0069] Match the keywords with the valid word list and obtain the word vector corresponding to the keywords;
[0070] The word vectors of different keywords are combined into an N*K question text word vector matrix according to the order of text words, where N is the number of words in the sentence and K is the dimension of the word vector corresponding to the word.
[0071] Furthermore, the training process of the trained TextCNN model is as follows:
[0072] Specifically, the model is pre-trained using a training set containing regular text, policy knowledge base questions and answers, and medical and health-related data.
[0073] Specifically, the pre-trained text is segmented and converted into a word vector matrix using the pre-trained Word2Vec algorithm and then used as input for convolution calculation. The specific calculation formula of the convolution layer is:
[0074] c i =f(w*x i:i+h-1 +b)
[0075] Among them, X i:i+h-1 represents a window of size k*h consisting of the i-th row to the i+h-1th row of the input matrix, b is the bias parameter, w is the initial weight matrix, c i Represents a convolutional feature.
[0076] Specifically, the convolution result is pooled, and the maximum pooling strategy is used in the pooling layer to reduce the dimension of the target vector to obtain the pooling result, and the maximum value of each pooling result is taken to obtain the final feature value.
[0077] Specifically, during the training process, the cross entropy loss function is used to calculate the loss value between the predicted result and the true label. Through the back propagation algorithm, the gradient is calculated and the weights and biases in the convolutional layer are updated to reduce the loss function value. After multiple text training, the final optimized model is obtained.
[0078] Specifically, the cross entropy loss function is as follows:
[0079]
[0080] Among them, M is the number of training texts mentioned above, R is the number of training text categories, and y ij is the word vector encoding of the actual label, is the model's predicted probability for class R.
[0081] Furthermore, the method of using the trained TextCNN model to extract local features of effective question text includes:
[0082] The valid question text is converted into a valid question text word vector through the pre-trained Word2Vec algorithm. The valid question text word vector is used as input, and the question feature value is obtained through convolution and pooling operations.
[0083] Furthermore, the method for matching the question feature value with the knowledge base question label, question and answer includes:
[0084] The pre-trained Word2Vec algorithm is used to convert the question feature values and question labels in the medical insurance policy knowledge base into word vectors to generate question feature value vectors and label vectors. The question feature value vectors and label vectors are matched using the Jaccard algorithm to obtain a question set 1 with a high matching degree, which is used to preliminarily define the scope of the problem and reduce the search time.
[0085] Use the pre-trained Word2Vec algorithm to convert the questions in question set 1 into question word vectors, use the question feature value vectors and question word vectors for matching, and use the Jaccard algorithm to match to obtain question set 2 with a higher matching degree;
[0086] For the questions with high similarity obtained in question set 2, use the pre-trained Word2Vec algorithm to convert the answers in the medical insurance policy knowledge base into answer word vectors, take the answer word vector and the question feature value vector for similarity matching again, sort the questions in the set according to similarity, and the candidate answer corresponding to the result with the highest value is the desired one.
[0087] The specific similarity matching algorithm is:
[0088]
[0089] Where feature is a vector of feature values, and query is a set of corresponding vectors of labels, questions, and answers.
[0090] Furthermore, the medical insurance intelligent question-answering method with multiple similarity comparisons is described in detail with a specific embodiment:
[0091] Step 1: Collect questions that users in the medical insurance field may ask and their corresponding answers from medical insurance business departments and medical insurance policy documents, build a one-to-one medical insurance policy knowledge base of questions and answers, maintain labels for each question, and generate corresponding question label sets;
[0092] Step 1-1, sort out all potential questions and answers in the medical insurance field as completely as possible. All questions and answers must be reviewed to ensure their accuracy.
[0093] The sorting out of issues related to medical insurance policies must include major and minor issues. Major issues can include answers to several minor issues.
[0094] Such as major problems:
[0095] [“What is the deductible for hospitalization under the employee medical insurance?”, “Level 3 includes hospitals above level 3: the deductible for the first hospitalization is 700 yuan, and the deductibles for multiple hospitalizations within a year are 500 yuan, 400 yuan, and 300 yuan, respectively. Level 2 includes specialized level 2 hospitals: the deductible for the first hospitalization is 600 yuan, and the deductibles for multiple hospitalizations within a year are 400 yuan, 300 yuan, and 200 yuan, respectively. Level 1 includes hospitals below: the deductible for the first hospitalization is 500 yuan, and the deductibles for multiple hospitalizations within a year are 300 yuan, 200 yuan, and 100 yuan, respectively.”]
[0096] Some of the possible sub-categories of this question include:
[0097] [“What is the deductible for hospitalization for employees’ medical insurance in Grade III and above hospitals?”, “Grade III and above hospitals: the deductible for first hospitalization is RMB 700, and the deductibles for multiple hospitalizations within a year are RMB 500, RMB 400, and RMB 300 respectively”]
[0098] [“What is the deductible for the first hospitalization under the employee medical insurance?”, “Level 3 includes hospitals above level 3: the deductible for the first hospitalization is 700 yuan. Level 2 includes hospitals with second-level specialties: the deductible for the first hospitalization is 600 yuan, and Level 1 includes hospitals below: the deductible for the first hospitalization is 500 yuan”]
[0099] Store questions and answers in relational data in a one-to-one manner to form a medical insurance policy knowledge base;
[0100] Step 1-2: Label each question and answer, maintain labels for the questions, and divide the labels into main labels and detailed labels.
[0101] The main label is used to classify the business areas of the questions, which are divided into employee medical insurance participation, employee medical insurance benefits, urban and rural residents medical insurance participation, urban and rural residents medical insurance benefits, medical assistance benefits, maternity insurance benefits, non-local medical treatment policies, medical insurance fund supervision, oral implant-related issues, health, and drug management. Each question must have a main label;
[0102] Refined tags are tags that are set up to more accurately define the meaning of a question. A question can have one or more refined tags.
[0103] The main label and the refined label constitute the label set of the question. The labeling process is mainly to locate the scope of the question and avoid excessive deviation when matching the question. The question, answer and corresponding label set constitute a knowledge record.
[0104] For example ["What is the reimbursement rate for employee outpatient services?", "Medical expenses that comply with policy regulations are reimbursed at 15%-60%. The reimbursement rates vary in different medical institutions. Please contact the local medical insurance agency for details. The deductible for ordinary outpatient services (including chronic disease outpatient services) is 50 yuan, and the cumulative net reimbursement limit is 800 yuan.", "Main label: employee medical insurance benefits, detailed labels: employee, outpatient, reimbursement rate"].
[0105] Step 2: Obtain the user's voice data, convert the voice data into text data through voice-to-text conversion, and clean the text data for invalid words to obtain valid question text;
[0106] Step 2-1, obtain the user's voice data, use the voice recognition tool to convert the audio file into text format, and generate voice text. The types of input voice files include mp3, mp4, mpeg, mpga, m4a, wav and webm;
[0107] In a specific embodiment, the API tool of OpenAI is used to convert the captured speech (in the form of an audio file) into text and output it. The file format is one of mp3, mp4, mpeg, mpga, m4a, wav and webm. The captured speech is input into the API of the OpenAI tool in the form of an audio file to compile a speech-to-text translation method, convert the audio into text, and output it.
[0108] Step 2-2, the output text content is displayed to the outside, and an interactive operation is used to allow the user to confirm whether the content of the speech conversion is correct, and a confirmation text is obtained. If the recognition is incorrect, the speech recognition is performed again to make up for the possible inaccurate conversion problem in the speech-to-text process.
[0109] Step 2-3, generate an invalid word library by customizing or using an open source stop word library, and include words that often appear in spoken language and have little meaning into the invalid word library. The invalid word library can be a custom word library or a public stop word library published by other institutions.
[0110] Step 2-4, clean the confirmation text information, obtain invalid words from the invalid word library, clean and remove the invalid words in the text, and generate a valid question text without the need for word transformation and modification to improve the semantic matching degree.
[0111] Step 3: Use a word segmenter to segment valid text data, and use the pre-trained Word2Vec algorithm to convert valid question text, policy knowledge base questions, answers, and labels into word vector matrices;
[0112] Step 3-1, Word2Vec algorithm model training, select open source text training sets and questions and answers in the medical insurance policy knowledge base as pre-training data, and convert each word in the training set into a vector in a high-dimensional space through model training, which is an effective vocabulary.
[0113] In the specific implementation, the open source text training set used can be all the Chinese data in train.txt, dev.txt, and test.txt in THUCNews, and the questions and answers in the medical insurance policy knowledge base are the questions and answers of the knowledge base generated in step 1. The pre-training data is used as the input data for model training, and the features and classification rules of the text are learned by continuously training the model, thereby improving the performance of the model in the short text classification task.
[0114] Specifically, the text in the pre-training data is segmented using a word segmenter. All words are included in the vocabulary, and each word is encoded in the form of a One-Hot encoding. The model training maximizes the probability of the occurrence of context words under the condition of a given target word, that is, maximizes the value of the following objective function L. The calculation formula is as follows: Where, each position t in the text in the training data is 1, 2...T, T is the total number of words in the sentence, w t is the target word, w t+j is the context word, c is the window size, i.e. the length of the vector before and after. t and w t+j The similarity of word vectors is calculated for a given w t+j When the context appears w tThe probability or given w t When the context appears w t+j The probability of L is calculated from this word vector to maximize the probability L.
[0115] The goal is to find the value of L when the function reaches its extreme value. t and w t+j The similarity of word vectors is calculated for a given w t+j When the context appears w t The probability or given w t When the context appears w t+j The probability of , and the word vector is calculated to maximize this probability.
[0116]
[0117] By continuously training the model, the words in the initial vocabulary are converted into vectors of dimension k to obtain a valid vocabulary.
[0118] In step 3-2, use the trained Word2Vec model to convert valid question text, policy knowledge base questions, answers and labels into valid question text word vectors, question word vectors, answer word vectors and label word vectors respectively.
[0119] Use the word segmenter to convert the text that needs word vector conversion into different keywords, match the keywords with the valid word list, obtain the word vector corresponding to the keyword, and combine the word vectors of different keywords into an N*K question text word vector matrix according to the order of text words, where N is the number of words in the sentence and K is the dimension of the word vector corresponding to the word.
[0120] Step 4: Use the trained TextCNN model to process the word vector matrix of the question text using the convolution layer and the pooling layer to extract the local features of the word vector text, and the extracted local features form a feature set.
[0121] Step 4-1, pre-training data preparation, use the training set containing medical insurance policy knowledge base text and medical and health-related text to pre-train the model.
[0122] In a specific embodiment, the medical insurance policy knowledge base text is the questions and answers compiled in step 1-1, and the medical and health related text comes from the medical and health data in the official policy documents.
[0123] Adjust the pre-trained text format, and convert the data format of the text into a question, answer, and corresponding label set to form a knowledge record or a knowledge record composed of a title, content, and label. For example, ["How long after joining the insurance can you enjoy the benefits?", "Medical insurance benefits will be enjoyed from the next month after the insurance registration. Flexible employment personnel who interrupt payment will enjoy medical insurance from the third natural month after the normal payment month is resumed", "Main label: employee medical insurance benefits, detailed labels: employee, insurance benefits"], ["The scope of reimbursement of dental clinic medical insurance", "The scope of reimbursement of dental clinic medical insurance in Zhejiang includes fillings, tooth extractions, treatment costs of chronic pulpitis and chronic apical periodontitis, as well as treatment costs of chronic periodontitis.", "Main label: issues related to oral implants, detailed labels: oral, catalog scope"]
[0124] In a specific embodiment, the medical insurance policy knowledge base texts and medical and health-related texts are classified into 12 categories according to text type, including medical insurance matter handling, employee medical insurance participation, employee medical insurance benefits, urban and rural residents medical insurance participation, urban and rural residents medical insurance benefits, medical assistance benefits, maternity insurance benefits, out-of-town medical treatment policies, medical insurance fund supervision, oral implant-related issues, health, and drug management. The number of categories is set to R and the number of texts is M.
[0125] Step 4-2, build the textCNN algorithm model, use the pre-trained text to train the algorithm model, use the cross entropy loss function to continuously improve the accuracy of the model, and generate a training optimization model.
[0126] Specifically, set the variables bach_size and Epoch for TextCNN algorithm training to adjust the model training speed, such as setting the number of samples used in each iteration batch_size to 64, setting Epoch to 100, and outputting the training log during the training process.
[0127] Specifically, the pre-trained text is converted into a word vector matrix after word segmentation and used as input for convolution calculation. The specific calculation formula of the convolution layer is:
[0128] c i =f(w*x i:i+h-1 +b)
[0129] Among them, X i:i+h-1 represents a window of size k*h consisting of the i-th row to the i+h-1th row of the input matrix, b is the bias parameter, w is the initial weight matrix, c i Represents a convolution feature, sets three convolution kernels, and obtains features c1, c2, and c3.
[0130] Specifically, the convolution result is pooled, and the maximum pooling strategy is used in the pooling layer to reduce the dimension of the target vector to obtain the pooling result, and the maximum value of each pooling result is taken to obtain the final feature value.
[0131] In a specific embodiment, the maximum value of features c1, c2, and c3 obtained by the convolution layer is selected, and the maximum value pooling strategy is used in the pooling layer to reduce the dimension of the target vector to obtain the pooling result Maxp, and the pooling result Maxp is input into Softmax to obtain the final feature value
[0132] Specifically, during the training process, the cross entropy loss function is used to calculate the loss value between the predicted result and the true label. Through the back propagation algorithm, the gradient is calculated and the weights and biases in the convolution layer are updated to reduce the loss function value. After multiple text training, the final convolution kernel is obtained.
[0133] Specifically, the cross entropy loss function is as follows:
[0134]
[0135] Among them, M is the number of training texts mentioned above, R is the number of training text categories, and y ij is the word vector encoding of the actual label, is the model's predicted probability for class R.
[0136] Step 4-3: Input the valid question text word vector matrix into the trained TextCNN model, and obtain the question feature value through convolution and pooling calculation.
[0137] Step 5: Perform three rounds of matching of the extracted question feature values with the knowledge base question labels, questions, and answers. Use the Jaccard algorithm to calculate similarity based on the ratio of the intersection and union of sets, and output the answer to the question with the highest matching degree.
[0138] Step 5-1: Use the pre-trained Word2Vec algorithm to convert the question feature values and labels in the question library into word vectors to generate question feature value word vectors and label word vectors. Use the Jaccard algorithm to match the question feature value word vectors and label word vectors to obtain a question set 1 with a high matching degree, which is used to preliminarily define the scope of the problem and reduce the search time.
[0139] Step 5-2: Use the pre-trained Word2Vec algorithm to convert the questions in question set 1 into question word vectors, use the question feature value word vectors and question word vectors to match, and use the Jaccard algorithm to match to obtain question set 2 with a higher matching degree;
[0140] Step 5-3: Use the pre-trained Word2Vec algorithm to convert the answers to the high-similarity questions obtained from question set 2 into answer word vectors, take the answer word vector and the question feature value vector and use the Jaccard algorithm to match the similarity again, sort the questions in the set by similarity, and the candidate answer corresponding to the result with the highest value is the one you are looking for.
[0141] The calculation formula of the Jaccard similarity algorithm is:
[0142]
[0143] The Jaccard coefficient is used to measure the similarity, where feature is the vector of feature values in step 4-3, and query is the corresponding vector set of labels, questions, and answers.
[0144] Embodiment 2
[0145] This embodiment discloses a medical insurance intelligent question-answering system with multiple similarity comparisons.
[0146] Medical insurance intelligent question-answering system with multiple similarity comparisons, including:
[0147] The knowledge base construction module is configured to: construct a medical insurance policy knowledge base including questions, answers and question labels;
[0148] The user question data acquisition module is configured to: acquire user question data and convert the user question data into valid question text;
[0149] The conversion module is configured to: use the pre-trained Word2Vec algorithm to convert the questions, answers and question labels in the medical insurance policy knowledge base into corresponding word vector matrices;
[0150] The feature extraction module is configured to: use the pre-trained TextCNN model to extract the features of the valid question text to form a question feature set;
[0151] The matching and pushing module is configured as follows: using the pre-trained Word2Vec algorithm to convert the question feature set into the question feature set word vector, and matching the question feature set word vector with the word vector matrix corresponding to the question label, the word vector matrix corresponding to the question, and the word vector matrix corresponding to the answer in three rounds, with the latter round of matching being performed within the range screened out by the previous round of matching, and ultimately obtaining the answer with the highest degree of match with the user's question data, and pushing the answer to the user.
[0152] More specifically, Figure 2As shown, the medical insurance intelligent question-answering system with multiple similarity comparisons in this embodiment includes four modules, namely a knowledge base module 101, a speech recognition and translation module 102, a model training module 103, and a semantic recognition and question-answering module 104.
[0153] The knowledge base module 101 implements question maintenance and invalid word maintenance in the medical insurance field, and includes a question and answer maintenance module 1011 , a label maintenance module 1012 , and an invalid word maintenance module 1013 .
[0154] The question and answer maintenance module 1011 realizes the functions of adding, deleting, modifying and checking questions in the medical insurance field;
[0155] The label maintenance module 1012 implements the maintenance of the main label and detailed label of the question, including the functions of adding, deleting and modifying;
[0156] The invalid word maintenance module 1013 is used to maintain invalid words and implement the functions of adding, deleting and modifying invalid words;
[0157] The speech recognition and translation module 102 is used to convert speech into text, and includes two modules: a speech conversion module 1021 and a speech-to-text confirmation module 1022;
[0158] The speech conversion module 1021 converts the received speech into text through OpenAI and outputs it;
[0159] The voice-to-text confirmation module 1022 confirms the voice-converted text to the user, and after the user confirms, the next step of question-and-answer feedback is performed.
[0160] A model training module 103, used to implement training of related models, including a Word2Ve model training module 1031 and a TextCNN model training module 1032;
[0161] The Word2Ve model training module 1031 is used for text data that can be input into subsequent machine learning models for processing, thereby realizing the numerical representation of text data and providing a basis for tasks such as text classification.
[0162] Specifically, Word2Ve model training is used to map words to a high-dimensional space so that semantically similar words are close to each other in the space. The vectorized words can capture semantic information and provide a basis for subsequent text classification tasks.
[0163] The TextCNN model training module 1032 optimizes the parameters of the convolution layer by back propagation algorithm and gradient descent to minimize the prediction error. After the training is completed, the model parameters obtained by the training are saved for subsequent use.
[0164] Specifically, the TextCNN model training module is used to use the word vector obtained in the previous step as input to build a TextCNN model, which captures local features in the text and then performs classification.
[0165] The semantic recognition and question-answering module 104 responds with relevant answers based on the text of speech recognition, and includes a word segmentation processing module 1041 , a semantic recognition module 1042 , an answer matching module 1043 and an answer output module 1044 .
[0166] The word segmentation processing module 1041 uses the trained Word2Vec model to convert the question text into words and generate word vectors;
[0167] The semantic recognition module 1042 uses the trained TextCNN model to extract feature values of the question text;
[0168] The answer matching module 1043 performs multiple rounds of matching based on the feature values of the question text and the unit questions in the question knowledge base to match the optimal answer;
[0169] The answer output module 1044 is used to display the best answer to the outside world.
[0170] Embodiment 3
[0171] The purpose of this embodiment is to provide a computer-readable storage medium.
[0172] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the medical insurance intelligent question-answering method with multiple similarity comparisons as described in Example 1 of the present disclosure.
[0173] Embodiment 4
[0174] The purpose of this embodiment is to provide an electronic device.
[0175] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in the medical insurance intelligent question-answering method with multiple similarity comparisons as described in Example 1 of the present disclosure are implemented.
[0176] The steps involved in the apparatuses of the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0177] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.
[0178] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A medical insurance intelligent question-answering method based on multiple similarity comparisons, characterized in that: The following steps are involved: Build a medical insurance policy knowledge base including questions, answers and question tags; Obtain user question data and convert the user question data into effective question text; Use the pre-trained Word2Vec algorithm to convert the questions, answers, and question labels in the medical insurance policy knowledge base into corresponding word vector matrices; Use the pre-trained TextCNN model to extract the features of valid question texts and form a set of question features; Use the pre-trained Word2Vec algorithm to convert the question feature set into the question feature set word vector. The question feature set word vector is matched with the word vector matrix corresponding to the question label, the word vector matrix corresponding to the question, and the word vector matrix corresponding to the answer in three rounds. The latter round of matching is performed within the range screened by the previous round of matching. Finally, the answer with the highest match degree with the user's question data is obtained and pushed to the user.
2. The medical insurance intelligent question-answering method with multiple similarity comparisons as claimed in claim 1, characterized in that: Build a medical insurance policy knowledge base including questions, answers and question tags, including: Sort out questions and corresponding answers related to the medical insurance business field. All questions and answers must be reviewed by the medical insurance department to ensure their accuracy; Store questions and corresponding answers in a one-to-one format; Add a question label to each question, wherein the question label includes a main label and a detailed label; The question, the corresponding answer and the question label are combined into a knowledge record to build a medical insurance policy knowledge base.
3. The medical insurance intelligent question-answering method with multiple similarity comparisons as claimed in claim 1, characterized in that: Obtain user question data and convert the user question data into effective question text, including: Acquire voice data of user questions, convert the voice data into text format, and obtain the user questions in text format; Get the user's confirmation information for the user's question in text format; The user's question in text format confirmed by the user is cleaned of invalid words to generate a valid question text.
4. The medical insurance intelligent question-answering method with multiple similarity comparisons according to claim 1, characterized in that: The specific training process of the pre-trained Word2Vec algorithm is as follows: We use open source text training sets and questions and answers in the medical insurance policy knowledge base as pre-training data. Through model training, we convert each word in the pre-training data into a vector in a high-dimensional space, i.e., a valid vocabulary. or, Use the pre-trained Word2Vec algorithm to convert the questions, answers, and question labels in the medical insurance policy knowledge base into corresponding word vector matrices, specifically: Convert questions, answers and question tags in the medical insurance policy knowledge base into different keywords; Match the keywords with the valid word list and obtain the word vector corresponding to the keywords; According to the order of words in the questions, answers, and question labels in the medical insurance policy knowledge base, the word vectors corresponding to different keywords are combined to obtain the corresponding word vector matrix.
5. The medical insurance intelligent question-answering method with multiple similarity comparisons as claimed in claim 1, characterized in that: Use the pre-trained TextCNN model to extract the features of valid question text and form a set of question features, including: Use the pre-trained Word2Vec algorithm to convert valid question text into valid question text word vectors, input the valid question text word vectors into the trained TextCNN model, and obtain the combination of feature values, i.e., the question feature set, through convolution and pooling operations; or, The TextCNN model is pre-trained using a training set containing regular text, question and answer data in the policy knowledge base, and medical and health-related data to obtain a trained TextCNN model.
6. The medical insurance intelligent question-answering method with multiple similarity comparisons as claimed in claim 1, characterized in that: The three rounds of matching are specifically as follows: Perform the first round of matching between the word vectors of the question feature set and the word vector matrix corresponding to all question labels in the medical insurance policy knowledge base, calculate the matching degree between the feature set and the word vector matrix corresponding to each question label in turn, and obtain the questions with the highest matching degree ranking; Perform a second round of matching between the obtained word vectors of the question feature set and the word vector matrix corresponding to the questions with the highest matching value, calculate the matching degree between the feature set and the word vector matrix corresponding to each question with the highest matching value, and obtain the answer with the highest matching value; The obtained word vector of the question feature set is matched with the word vector matrix corresponding to the answer with the highest matching value in the third round, and the matching degree of the word vector matrix corresponding to the feature set and each answer with the highest matching value is calculated in turn to obtain the answer with the highest matching value.
7. The medical insurance intelligent question-answering method with multiple similarity comparisons as claimed in claim 6, characterized in that: In the three rounds of matching, the Jaccard algorithm is used to calculate the word vector matrix corresponding to the question feature set and each question label, the word vector matrix corresponding to each question with a high matching value ranking, and the matching value of each answer with a high matching value ranking.
8. The medical insurance intelligent question-answering system with multiple similarity comparisons is characterized by: include: The knowledge base construction module is configured to: construct a medical insurance policy knowledge base including questions, answers and question labels; The user question data acquisition module is configured to: acquire user question data and convert the user question data into valid question text; The conversion module is configured to: use the pre-trained Word2Vec algorithm to convert the questions, answers and question labels in the medical insurance policy knowledge base into corresponding word vector matrices; The feature extraction module is configured to: use the pre-trained TextCNN model to extract features of valid question texts to form a question feature set; The matching and pushing module is configured as follows: using the pre-trained Word2Vec algorithm to convert the question feature set into the question feature set word vector, and matching the question feature set word vector with the word vector matrix corresponding to the question label, the word vector matrix corresponding to the question, and the word vector matrix corresponding to the answer in three rounds, with the latter round of matching being performed within the range screened out by the previous round of matching, and ultimately obtaining the answer with the highest degree of match with the user's question data, and pushing the answer to the user.
9. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps in the medical insurance intelligent question-answering method with multiple similarity comparisons as described in any one of claims 1 to 7 are implemented.
10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the medical insurance intelligent question and answer method with multiple similarity comparisons as described in any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Question and answer system construction method based on Pipeline processing and ES storage
CN113742469A
Intelligent customer service automatic answering method and device, equipment, medium and product
CN114428845A
Financial customer service dialogue generation method and device based on LLM model, equipment and medium
CN117520503A
Knowledge database construction method and device, electronic equipment and medium
CN118170859A
Dehumidifier with cooling rod cleaning
KR1020200098106A
Cited By
Intelligent question and answer processing method and device for old people, storage medium and computer equipment
CN119739836A
Label matching model training method and device, computer equipment and storage medium
CN120873115A
Feedback integrated retrieval augmented generation (RAG) framework
US12762310B1
