An intelligent question-answering system and method based on natural language processing
Through an intelligent question and answer system based on natural language processing, the feature vector of user input text and medical knowledge items is constructed, which solves the problems of low efficiency and poor experience of traditional question and answer systems, and achieves more efficient information matching and user satisfaction analysis.
Patent Information
- Application Number
- CN202410882841.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-07-03
AI Technical Summary
The traditional keyword matching Q&A system cannot meet users' high requirements for convenience and accuracy in obtaining information, resulting in low efficiency in answering user questions and poor user experience.
Using an intelligent question and answer system based on natural language processing, through information acquisition, preprocessing, vector construction, matching, satisfaction analysis and adjustment modules, the feature vector of user input text and medical knowledge items is constructed, similarity analysis and optimization are performed, and matching is improved. accuracy and user satisfaction.
It improves the accuracy of similarity analysis and matching analysis between user input text and medical knowledge items, and enhances the efficiency and user experience of answering user questions.
Smart Images

Figure CN118445402B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an intelligent question-answering system and method based on natural language processing. Background Art
[0002] With the rapid development of the Internet and big data, users have higher requirements for the convenience and accuracy of information acquisition. The traditional keyword matching question-answering system can no longer meet the increasingly complex query needs. Therefore, it is particularly important to develop an intelligent question-answering system that can understand natural language, perform deep semantic analysis and give accurate answers.
[0003] Chinese patent publication number CN108153876A discloses an intelligent question-answering method and system. The intelligent question-answering system includes: a dialogue engine for receiving questions raised by users; an analysis module for analyzing the user's questions; a candidate question-answering library; a retrieval module for retrieving question-answer pairs related to the user's questions from the candidate question-answering library based on the results of the question analysis by the analysis module; a push module for calculating the similarity value between the candidate question-answering pairs retrieved by the retrieval module and the user's questions; a reordering module for comprehensively considering the results obtained from question analysis, retrieval and matching, and reordering the candidate question-answering pairs in combination with business needs. The dialogue engine is further configured to select a response to the user from the candidate question-answering pairs reordered by the reordering module; it can be seen that this solution only analyzes the matching results for user questions, and there are problems of low efficiency in answering user questions and poor user experience. Summary of the invention
[0004] To this end, the present invention provides an intelligent question-answering system based on natural language processing to overcome the problems of low efficiency in answering user questions and poor user experience in the prior art.
[0005] To achieve the above object, the present invention provides an intelligent question-answering system based on natural language processing, the system comprising:
[0006] Information acquisition module, used to obtain user input text and medical knowledge items;
[0007] A preprocessing module, used to preprocess the acquired user input text and medical knowledge items;
[0008] The first vector construction module is used to extract question feature words from the pre-processed user input text and construct a question feature vector;
[0009] The second vector construction module is used to extract knowledge feature words from the preprocessed medical knowledge items and construct feature vectors of the medical knowledge items;
[0010] A push module, used to match the user input text with the medical knowledge items according to the construction results of the question feature vector and the construction results of the medical knowledge item feature vector, and push the text to the user according to the matching results;
[0011] The satisfaction analysis module is used to obtain the ratings and rating numbers of users on the push results during the management cycle, and optimize the process of pushing texts to users in the next management cycle based on the ratings of users on the push results during the management cycle;
[0012] The analysis and adjustment module is used to adjust the optimization process of the text push process to the user in the next management cycle according to the user's score and the number of scores on the push results in the management cycle.
[0013] Furthermore, the preprocessing module performs word segmentation on the acquired user input text, and sets the user input text phrase as Q, setting Q={a1, a2, ..., an};
[0014] The preprocessing module performs word segmentation on each medical knowledge item, and sets the i-th medical knowledge item phrase as Y(i), setting Y(i)={b1i,b2i,...,bmi};
[0015] Among them, a1 is the first word of Q, a2 is the second word of Q, an is the nth word of Q, n is the number of words in Q, b1i is the first word of Y(i), b2i is the second word of Y(i), bmi is the mith word of Y(i), and mi is the number of words in Y(i).
[0016] Furthermore, the first vector construction module matches the words in the text phrase input by the user with the preset keywords. If the match is successful, the first vector construction module uses the word as the question feature word. If the match fails, the first vector construction module uses the word as an invalid input word.
[0017] The first vector construction module constructs the question feature vector TQ according to the matching result between the user input text phrase and the preset keywords, wherein:
[0018] When the question feature word does not match the jth preset keyword in the medical key vocabulary, the first vector construction module sets the jth element of TQ to TQ(j), setting TQ(j)=0;
[0019] When the question feature word matches the jth preset keyword in the medical key vocabulary, the first vector construction module sets the jth element of TQ to TQ(j), setting TQ(j)=TF(j)×lg{(U+1) / [DF(j)+1]};
[0020] Among them, TF(j) is the ratio of the number of times the j-th preset keyword appears in Q to the number of words in Q, U is the number of medical knowledge items, DF(j) is the number of medical knowledge items that contain the j-th preset keyword, 0<j≤J, J is the number of preset keywords in the medical keyword database.
[0021] Furthermore, the second vector construction module matches the word in the i-th medical knowledge item phrase with the preset keyword. If the match is successful, the second vector construction module uses the word as the i-th item knowledge feature word. If the match fails, the second vector construction module uses the word as an invalid item word.
[0022] The second vector construction module constructs the i-th medical knowledge item phrase feature vector TYi according to the matching result between the i-th medical knowledge item phrase and the preset keyword, wherein:
[0023] When the i-th item knowledge feature word does not match the j-th preset keyword in the medical key vocabulary, the second vector construction module sets the j-th element of TYi to TYi(j), setting TYi(j)=0;
[0024] When the i-th knowledge feature word matches the j-th preset keyword in the medical key vocabulary, the second vector construction module sets the j-th element of TYi to TYi(j), setting TYi(j)=TF(j)'×lg{(U+1) / [DF(j)+1]};
[0025] Wherein, TF(j)' is the ratio of the number of times the j-th preset keyword appears in Y(i) to the number of words in Y(i).
[0026] Furthermore, the push module is provided with a matching unit and a push unit, and the matching unit is used to calculate the similarity between the user input text and the medical knowledge item according to the construction results of the question feature vector and the construction results of the medical knowledge item feature vector, wherein:
[0027] ;
[0028] Among them, S(i) is the similarity between the user input text and the i-th medical knowledge item, |TQ| is the modulus of the vector TQ, and |TYi| is the modulus of the vector TYi.
[0029] Furthermore, the push unit is used to sort the similarities between the user input text and the medical knowledge item according to the calculation result of the similarity between the user input text and the medical knowledge item, and select the medical knowledge item with the highest similarity as the target text, and record its similarity as SP. If SP>γ, the push unit pushes the target text as the push content to the user, and if SP≤γ, the push unit pushes the alternative text as the push content to the user.
[0030] Among them, γ is the preset similarity threshold.
[0031] Furthermore, the satisfaction analysis module is provided with a satisfaction analysis unit and an optimization unit, wherein the satisfaction analysis unit is used to calculate the mean value of the scores of the users on the push results obtained during the management period, and to analyze the satisfaction of the users during the management period according to the calculation results;
[0032] The optimization unit optimizes the process of pushing information to users in the next management cycle according to the analysis results of user satisfaction in the management cycle, wherein:
[0033] When the user satisfaction in the current management cycle is normal, the optimization unit does not optimize the process of pushing content to the user in the next management cycle;
[0034] When the user satisfaction in the current management cycle is abnormal, the optimization unit optimizes the process of pushing content to the user in the next management cycle, and sets the optimized preset similarity threshold as γ', setting γ'=γ×{1+β×ln[(k0-k 均 ) / k0+1]}, when γ'≥γ0, the value of γ' is γ0;
[0035] Among them, γ0 is the preset maximum similarity threshold, and β is the preset optimization coefficient.
[0036] Furthermore, the analysis and adjustment module is provided with a first adjustment unit and a second adjustment unit, wherein the first adjustment unit is used to compare the number K of user scores on the push results obtained in the management cycle with the preset score number r1, and adjust the optimization process of the push process to the user in the next management cycle according to the comparison result, wherein:
[0037] When K≤r1, the first adjustment unit determines that the number of ratings of users in the current management period is abnormal, and adjusts the optimization process of the push process to users in the next management period, and sets the adjusted preset optimization coefficient to β', setting β'=β×{1-{[(r1-K) / r1+1] (r1-K) / r1+1 -1} / 3};
[0038] When K>r1, the first adjustment unit determines that the number of ratings of users in the current management period is normal.
[0039] Further, when the number of user ratings in the current management period is normal, the second adjustment unit is used to analyze the rating volatility according to the user's ratings and the number of ratings on the push results in the management period, and to make secondary adjustments to the optimization process of the text push process to the user in the next management period according to the analysis results, wherein:
[0040] when When the second adjustment unit determines that the fluctuation of the user's rating of the push result in the current management period is normal, no adjustment is made;
[0041] when When the second adjustment unit determines that the volatility of the user's rating of the push result in the current management period is abnormal, and makes a secondary adjustment to the optimization process of the push process to the user in the next management period, and sets the adjusted preset optimization coefficient to β", and sets:
[0042] ;
[0043] Among them, B is the preset volatility coefficient.
[0044] On the other hand, the present invention also provides an intelligent question-answering method based on natural language processing, comprising:
[0045] Step S1: Obtain user input text and medical knowledge items;
[0046] Step S2: pre-processing the acquired user input text and medical knowledge items;
[0047] Step S3: extracting question feature words from the preprocessed user input text and constructing a question feature vector;
[0048] Step S4: extracting knowledge feature words from the preprocessed medical knowledge items and constructing feature vectors of the medical knowledge items;
[0049] Step S5: matching the user input text with the medical knowledge item according to the construction results of the question feature vector and the construction results of the medical knowledge item feature vector, and pushing the text to the user according to the matching result;
[0050] Step S6: obtaining the ratings and rating numbers of the push results given by the users in the management cycle, and optimizing the process of pushing texts to the users in the next management cycle according to the ratings of the push results given by the users in the management cycle;
[0051] Step S7: adjusting the optimization process of the text push process to the user in the next management period according to the user's rating and the number of ratings on the push results in the management period.
[0052] Compared with the prior art, the beneficial effect of the present invention lies in that the first vector construction module constructs the question feature vector to normalize the total number of words in the question itself, so that it can reflect its own word distribution characteristics without being affected by the size of the knowledge base, so as to improve the accuracy of the similarity analysis between the user input text and the medical knowledge item, the second vector construction module constructs the medical knowledge item phrase feature vector to improve the accuracy of the similarity analysis between the user input text and the medical knowledge item, the push module calculates the similarity between the medical knowledge item phrase feature vector and the text feature vector to improve the accuracy of the matching analysis between the user input text and the medical knowledge item, and sets a preset similarity threshold to improve the accuracy of text push to the user, thereby improving In order to improve the efficiency of answering user questions, the satisfaction analysis module improves the accuracy of user satisfaction analysis by setting a preset score threshold, thereby improving the accuracy of text push to users, and improves the accuracy of text push to users by setting a preset maximum similarity threshold and a preset optimization coefficient. The analysis adjustment module reduces the impact of too few scores on the analysis of the text push process to users by setting a preset number of scores, thereby improving the accuracy of text push to users, and reduces the impact of excessive score volatility on the analysis of the text push process to users by setting a preset volatility coefficient, thereby improving the accuracy of text push to users, thereby improving the efficiency of answering user questions and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 Schematic diagram of the structure of the intelligent question-answering system based on natural language processing in this embodiment.
[0054] Figure 2 It is a structural diagram of the push module of this embodiment.
[0055] Figure 3 Schematic diagram of the structure of the satisfaction analysis module in this embodiment.
[0056] Figure 4 This is a schematic diagram of the structure of the analysis and adjustment module in this embodiment.
[0057] Figure 5 Schematic diagram of the flow of the intelligent question-answering method based on natural language processing in this embodiment. DETAILED DESCRIPTION
[0058] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0059] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0060] It should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0061] See also Figure 1 As shown, it is a schematic diagram of the structure of the intelligent question-answering system based on natural language processing in this embodiment, and the system includes:
[0062] An information acquisition module is used to acquire user input text and medical knowledge items; the medical knowledge items are systematic descriptions and summaries of a specific disease, symptom, treatment method, drug, medical equipment, etc. in the medical field; this embodiment does not specifically limit the acquisition method of the user input text and medical knowledge items, and those skilled in the art can freely set them, as long as the acquisition requirements of the user input text and medical knowledge items are met, wherein the user input text can be acquired through interactive input, and the medical knowledge items can be acquired through medical websites;
[0063] A preprocessing module, used for preprocessing the acquired user input text and medical knowledge items, the preprocessing module is connected to the information acquisition module;
[0064] A first vector construction module is used to extract question feature words from the preprocessed user input text and construct a question feature vector. The first vector construction module is connected to the preprocessing module. In this embodiment, there is no specific limitation on the setting of the preset keywords. Those skilled in the art can freely set them as long as the setting requirements of the preset keywords are met. For example, fever, headache, cough, cold, amoxicillin, inflammation, etc. can be set as preset keywords.
[0065] A second vector construction module, used for extracting knowledge feature words from the preprocessed medical knowledge items and constructing feature vectors of the medical knowledge items, the second vector construction module being connected to the preprocessing module;
[0066] A push module, used for matching the user input text with the medical knowledge item according to the construction results of the question feature vector and the construction results of the medical knowledge item feature vector, and pushing the text to the user according to the matching result, the push module is connected with the first vector construction module and the second vector construction module;
[0067] The satisfaction analysis module is used to obtain the scores and the number of scores of the push results by the users within the management period, and analyze the user satisfaction according to the scores of the push results by the users within the management period, and is also used to optimize the process of pushing texts to the users in the next management period according to the analysis results of the user satisfaction within the management period, and the satisfaction analysis module is connected to the push module; the present embodiment does not specifically limit the method for obtaining the scores of the user push results, and those skilled in the art can freely set it, and only need to meet the requirements for obtaining the scores of the user push results, which can be obtained through interaction; the present embodiment does not specifically limit the setting of the management period, and those skilled in the art can freely set it, and only need to meet the setting requirements of the management period, and the management period can be set to 30 days, 40 days, etc.;
[0068] The analysis and adjustment module is used to make an adjustment to the optimization process of the text push process to users in the next management cycle according to the number of scores given by users to the push results in the management cycle, and is also used to analyze the score volatility according to the scores and the number of scores given by users to the push results in the management cycle, and to make a second adjustment to the optimization process of the text push process to users in the next management cycle according to the analysis results. The analysis and adjustment module is connected to the satisfaction analysis module.
[0069] See also Figure 2 As shown, it is a schematic diagram of the structure of the push module of this embodiment, and the push module includes:
[0070] A matching unit, used to calculate the similarity between the user input text and the medical knowledge item according to the construction result of the question feature vector and the construction result of the medical knowledge item feature vector;
[0071] The push unit is used to push text to the user according to the calculation result of the similarity between the user input text and the medical knowledge item, and the push unit is connected to the matching unit.
[0072] See also Figure 3 As shown, it is a schematic diagram of the structure of the satisfaction analysis module of this embodiment, and the satisfaction analysis module includes:
[0073] A satisfaction analysis unit, used to calculate the average of the scores of the users on the push results obtained during the management period, and analyze the satisfaction of the users during the management period according to the calculation results;
[0074] The optimization unit is used to optimize the process of pushing information to users in the next management cycle according to the analysis results of user satisfaction in the management cycle. The optimization unit is connected to the satisfaction analysis unit.
[0075] See also Figure 4 As shown, it is a schematic diagram of the structure of the analysis and adjustment module of this embodiment, and the analysis and adjustment module includes:
[0076] A first adjustment unit, used to adjust the optimization process of the text push process to the user in the next management period according to the number of scores given by the user to the push results in the management period;
[0077] The second adjustment unit is used to analyze the score volatility according to the user's score and the number of scores on the push results during the management period, and to make secondary adjustments to the optimization process of the text push process to the user during the next management period according to the analysis results. The second adjustment unit is connected to the first adjustment unit.
[0078] Specifically, the intelligent question-and-answer system based on natural language processing described in this embodiment is applied to question-and-answer of medical and health issues. It constructs feature vectors of pre-processed user questions and medical knowledge items, and matches the feature vectors of user questions with the feature vectors of medical knowledge items. Text is pushed to users based on the matching results, and the push process is optimized based on user feedback information, thereby improving the efficiency of answering user questions and enhancing user experience.
[0079] Specifically, the preprocessing module performs word segmentation on the acquired user input text, and sets the user input text phrase as Q, setting Q={a1, a2, ..., an};
[0080] The preprocessing module performs word segmentation on each medical knowledge item, and sets the i-th medical knowledge item phrase as Y(i), setting Y(i)={b1i,b2i,...,bmi};
[0081] Among them, a1 is the first word of Q, a2 is the second word of Q, an is the nth word of Q, n is the number of words in Q, b1i is the first word of Y(i), b2i is the second word of Y(i), bmi is the mith word of Y(i), and mi is the number of words in Y(i).
[0082] Specifically, the text segmentation method is not specifically limited in this embodiment, and those skilled in the art can freely set it as long as the text segmentation requirements are met. Among them, the text can be analyzed through Jieba segmentation.
[0083] Specifically, the first vector construction module matches the word in the user input text phrase with the preset keyword. If the match is successful, the first vector construction module uses the word as the question feature word. If the match fails, the first vector construction module uses the word as an invalid input word.
[0084] The first vector construction module constructs the question feature vector TQ according to the matching result between the user input text phrase and the preset keywords, wherein:
[0085] When the question feature word does not match the jth preset keyword in the medical key vocabulary, the first vector construction module sets the jth element of TQ to TQ(j), setting TQ(j)=0;
[0086] When the question feature word matches the jth preset keyword in the medical key vocabulary, the first vector construction module sets the jth element of TQ to TQ(j), setting TQ(j)=TF(j)×lg{(U+1) / [DF(j)+1]};
[0087] Among them, TF(j) is the ratio of the number of times the j-th preset keyword appears in Q to the number of words in Q, U is the number of medical knowledge items, DF(j) is the number of medical knowledge items that contain the j-th preset keyword, 0<j≤J, J is the number of preset keywords in the medical keyword database.
[0088] Specifically, the first vector construction module constructs the question feature vector and normalizes the total number of words in the question itself, so that it can reflect its own word distribution characteristics without being affected by the size of the knowledge base, so as to improve the accuracy of the similarity analysis between the user input text and the medical knowledge items, thereby improving the accuracy of text push to the user, thereby improving the efficiency of answering user questions and improving the user experience; the medical keyword library described in this embodiment is a collection of preset keywords, each preset keyword has its unique number, and the number order is its position order.
[0089] Specifically, the second vector construction module matches the word in the i-th medical knowledge item phrase with the preset keyword. If the match is successful, the second vector construction module uses the word as the i-th item knowledge feature word. If the match fails, the second vector construction module uses the word as an invalid item word.
[0090] The second vector construction module constructs the i-th medical knowledge item phrase feature vector TYi according to the matching result between the i-th medical knowledge item phrase and the preset keyword, wherein:
[0091] When the i-th knowledge feature word does not match the j-th preset keyword in the medical key vocabulary, the second vector construction module sets the j-th element of TYi to TYi(j), setting TYi(j)=0;
[0092] When the i-th knowledge feature word matches the j-th preset keyword in the medical key vocabulary, the second vector construction module sets the j-th element of TYi to TYi(j), setting TYi(j)=TF(j)'×lg{(U+1) / [DF(j)+1]};
[0093] Wherein, TF(j)' is the ratio of the number of times the j-th preset keyword appears in Y(i) to the number of words in Y(i).
[0094] Specifically, the second vector construction module constructs a medical knowledge item phrase feature vector to improve the accuracy of similarity analysis between user input text and medical knowledge items, thereby improving the accuracy of text push to users, thereby improving the efficiency of answering user questions and improving the user experience.
[0095] Specifically, the matching unit calculates the similarity between the user input text and the medical knowledge item according to the construction results of the question feature vector and the construction results of the medical knowledge item feature vector, wherein:
[0096] ;
[0097] Among them, S(i) is the similarity between the user input text and the i-th medical knowledge item, |TQ| is the modulus of the vector TQ, |TYi| is the modulus of the vector TYi, and TQ·TYi is the dot product of the two vectors.
[0098] Specifically, the matching unit calculates the similarity between the medical knowledge item phrase feature vector and the text feature vector to improve the accuracy of the matching analysis between the user input text and the medical knowledge item, thereby improving the accuracy of text push to the user, thereby improving the efficiency of answering user questions and improving the user experience.
[0099] Specifically, the push unit sorts the similarities between each medical knowledge item and the user input text according to the calculation result of the similarity between the user input text and the medical knowledge item, and selects the medical knowledge item with the highest similarity as the target text, and records its similarity as SP. If SP>γ, the push unit pushes the target text as the push content to the user. If SP≤γ, the push unit pushes the alternative text as the push content to the user.
[0100] Wherein, γ is a preset similarity threshold, 0.6<γ<1.
[0101] Specifically, the push unit improves the accuracy of text push to the user by setting a preset similarity threshold, thereby improving the efficiency of answering user questions and improving the user experience; the present embodiment does not make specific limitations on the setting of the preset similarity threshold, and technical personnel in this field can set it freely, and only need to meet the setting requirements of the preset similarity threshold, wherein the optimal value of γ is 0.72; the present embodiment does not make specific limitations on the setting of the alternative text, and technical personnel in this field can set it freely, and only need to meet the setting requirements of the alternative text, wherein the alternative text can be set to "Sorry, I can't answer your question for the time being, I suggest you consult a doctor"; the present embodiment does not make specific limitations on the sorting method, and technical personnel in this field can set it freely, and only need to meet the sorting requirements, wherein the sorting can be performed by the bubble sort method.
[0102] Specifically, the satisfaction analysis unit calculates the average of the scores of each user on the push results obtained during the management period, and analyzes the satisfaction of the users during the management period according to the calculation results, wherein:
[0103] when When the satisfaction analysis unit determines that the user's satisfaction in the current management period is abnormal;
[0104] when When the satisfaction analysis unit determines that the user's satisfaction is normal;
[0105] Wherein, k0 is the preset score threshold, f(k) is the score of the push result given by the kth user in the management period, and K is the number of scores given to the push result by users in the management period.
[0106] Specifically, the satisfaction analysis unit improves the accuracy of user satisfaction analysis by setting a preset score threshold, thereby improving the accuracy of text push to users, thereby improving the efficiency of answering user questions and improving the user experience; this embodiment does not specifically limit the setting of the preset score threshold, and technical personnel in this field can set it freely, as long as the setting requirements of the preset score threshold are met. Among them, when the score is based on a 5-point system, the best value of k0 is 4 points.
[0107] Specifically, the optimization unit optimizes the process of pushing information to users in the next management cycle according to the analysis results of user satisfaction in the management cycle, wherein:
[0108] When the user satisfaction in the current management cycle is normal, the optimization unit does not optimize the process of pushing content to the user in the next management cycle;
[0109] When the user satisfaction in the current management cycle is abnormal, the optimization unit optimizes the process of pushing content to the user in the next management cycle, and sets the optimized preset similarity threshold as γ', setting γ'=γ×{1+β×ln[(k0-k 均 ) / k0+1]}, when γ'≥γ0, the value of γ' is γ0;
[0110] Among them, γ0 is the preset maximum similarity threshold, β is the preset optimization coefficient, K 均 is the average score of users on push results during the management period, .
[0111] Specifically, the optimization unit improves the accuracy of user satisfaction analysis by setting a preset maximum similarity threshold and a preset optimization coefficient, thereby improving the accuracy of text push to users, thereby improving the efficiency of answering user questions and improving the user experience; this embodiment does not specifically limit the setting of the preset score threshold, and technical personnel in this field can set it freely, as long as the setting requirements of the preset score threshold are met, where the optimal value of γ0 is 0.88, and the optimal value of β is 0.46.
[0112] Specifically, the first adjustment unit compares the number K of user scores on the push results obtained in the management cycle with the preset number r1 of scores, and adjusts the optimization process of the push process to the user in the next management cycle according to the comparison result, wherein:
[0113] When K≤r1, the first adjustment unit determines that the number of ratings of users in the current management period is abnormal, and adjusts the optimization process of the push process to users in the next management period, and sets the adjusted preset optimization coefficient to β', setting β'=β×{1-{[(r1-K) / r1+1] (r1-K) / r1+1 -1} / 3};
[0114] When K>r1, the first adjustment unit determines that the number of ratings of users in the current management period is normal.
[0115] Specifically, the first adjustment unit reduces the impact of too few scores on the analysis of the text push process to the user by setting a preset number of scores, thereby improving the accuracy of text push to the user, thereby improving the efficiency of answering user questions and improving the user experience; this embodiment does not specifically limit the setting of the preset score threshold, and technicians in this field can set it freely, as long as the setting requirements of the preset score threshold are met. Among them, when the management period is 30 days, the best value of r1 is 300.
[0116] Specifically, when the number of ratings of users in the current management period is normal, the second adjustment unit analyzes the rating volatility according to the ratings and the number of ratings of users on the push results in the management period, and makes secondary adjustments to the optimization process of the text push process to users in the next management period according to the analysis results, wherein:
[0117] when When the second adjustment unit determines that the fluctuation of the user's rating of the push result in the current management period is normal, no adjustment is made;
[0118] when When the second adjustment unit determines that the volatility of the user's rating of the push result in the current management period is abnormal, and makes a secondary adjustment to the optimization process of the push process to the user in the next management period, and sets the adjusted preset optimization coefficient to β", and sets:
[0119] ;
[0120] Among them, B is the preset volatility coefficient.
[0121] Specifically, the second adjustment unit reduces the impact of excessive score volatility on the analysis of the text push process to users by setting a preset fluctuation coefficient, thereby improving the accuracy of text push to users, thereby improving the efficiency of answering user questions and improving the user experience; this embodiment does not make specific limitations on the setting of the preset fluctuation coefficient, and technical personnel in this field can set it freely as long as the setting requirements of the preset fluctuation coefficient are met, where the optimal value of B is 0.3.
[0122] See also Figure 5 As shown, it is a flow chart of the method for intelligent question answering based on natural language processing in this embodiment, and the method includes:
[0123] Step S1: Obtain user input text and medical knowledge items;
[0124] Step S2: pre-processing the acquired user input text and medical knowledge items;
[0125] Step S3: extracting question feature words from the preprocessed user input text and constructing a question feature vector;
[0126] Step S4: extracting knowledge feature words from the preprocessed medical knowledge items and constructing feature vectors of the medical knowledge items;
[0127] Step S5: matching the user input text with the medical knowledge item according to the construction results of the question feature vector and the construction results of the medical knowledge item feature vector, and pushing the text to the user according to the matching result;
[0128] Step S6: obtaining the ratings and rating numbers of the push results given by the users in the management cycle, and optimizing the process of pushing texts to the users in the next management cycle according to the ratings of the push results given by the users in the management cycle;
[0129] Step S7: adjusting the optimization process of the text push process to the user in the next management period according to the user's rating and the number of ratings on the push results in the management period.
[0130] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
Claims
1. An intelligent question-answering system based on natural language processing, characterized in that: include, Information acquisition module, used to obtain user input text and medical knowledge items; A preprocessing module, used to preprocess the acquired user input text and medical knowledge items; The first vector construction module is used to extract question feature words from the pre-processed user input text and construct a question feature vector; The second vector construction module is used to extract knowledge feature words from the preprocessed medical knowledge items and construct feature vectors of the medical knowledge items; A push module, used to match the user input text with the medical knowledge items according to the construction results of the question feature vector and the construction results of the medical knowledge item feature vector, and push the text to the user according to the matching results; The satisfaction analysis module is used to obtain the ratings and number of ratings given by users to the push results during the management cycle, and optimize the process of pushing texts to users in the next management cycle based on the ratings given by users to the push results during the management cycle; An analysis and adjustment module is used to adjust the optimization process of the text push process to the user in the next management cycle according to the user's rating and the number of ratings on the push results in the management cycle; The analysis and adjustment module is provided with a first adjustment unit and a second adjustment unit. The first adjustment unit is used to compare the number K of user scores on the push results obtained in the management cycle with the preset score number r1, and adjust the optimization process of the push process to the user in the next management cycle according to the comparison result, wherein: When K≤r1, the first adjustment unit determines that the number of ratings of users in the current management period is abnormal, and adjusts the optimization process of the push process to users in the next management period, and sets the adjusted preset optimization coefficient to β', setting β'=β×{1-{[(r1-K) / r1+1] (r1-K) / r1+1 -1} / 3}; When K>r1, the first adjustment unit determines that the number of ratings of users in the current management period is normal; When the number of user ratings in the current management period is normal, the second adjustment unit is used to analyze the rating volatility according to the user's ratings and the number of ratings on the push results in the management period, and to make secondary adjustments to the optimization process of the text push process to the user in the next management period according to the analysis results, wherein: when When the second adjustment unit determines that the fluctuation of the user's rating of the push result in the current management period is normal, no adjustment is made; when When the second adjustment unit determines that the volatility of the user's rating of the push result in the current management period is abnormal, and makes a secondary adjustment to the optimization process of the push process to the user in the next management period, and sets the adjusted preset optimization coefficient to β", and sets: ; Wherein, B is the preset volatility coefficient; The satisfaction analysis module is provided with a satisfaction analysis unit and an optimization unit, wherein the satisfaction analysis unit is used to calculate the mean value of the scores of the users on the push results obtained during the management period, and analyze the satisfaction of the users during the management period according to the calculation results; The optimization unit optimizes the process of pushing information to users in the next management cycle according to the analysis results of user satisfaction in the management cycle, wherein: When the user satisfaction in the current management cycle is normal, the optimization unit does not optimize the process of pushing content to the user in the next management cycle; When the user satisfaction in the current management cycle is abnormal, the optimization unit optimizes the process of pushing content to the user in the next management cycle, and sets the optimized preset similarity threshold as γ', setting γ'=γ×{1+β×ln[(k0-k 均 ) / k0+1]}, when γ'≥γ0, the value of γ' is γ0; Among them, γ0 is the preset maximum similarity threshold, β is the preset optimization coefficient, k0 is the preset score threshold, f(k) is the score of the push result by the kth user in the management period, K 均 It is the average score of users on the push results during the management period.
2. The intelligent question-answering system based on natural language processing according to claim 1, characterized in that: The preprocessing module performs word segmentation on the acquired user input text, and sets the user input text phrase as Q, setting Q={a1, a2, ..., an}; The preprocessing module performs word segmentation on each medical knowledge item, and sets the i-th medical knowledge item phrase as Y(i), setting Y(i)={b1i,b2i,...,bmi}; Among them, a1 is the first word of Q, a2 is the second word of Q, an is the nth word of Q, n is the number of words in Q, b1i is the first word of Y(i), b2i is the second word of Y(i), bmi is the mith word of Y(i), and mi is the number of words in Y(i).
3. The intelligent question-answering system based on natural language processing according to claim 2, characterized in that: The first vector construction module matches the word in the text phrase input by the user with the preset keyword. If the match is successful, the first vector construction module uses the word as the question feature word. If the match fails, the first vector construction module uses the word as an invalid input word. The first vector construction module constructs the question feature vector TQ according to the matching result between the user input text phrase and the preset keywords, wherein: When the question feature word does not match the jth preset keyword in the medical key vocabulary, the first vector construction module sets the jth element of TQ to TQ(j), setting TQ(j)=0; When the question feature word matches the jth preset keyword in the medical key vocabulary, the first vector construction module sets the jth element of TQ to TQ(j), setting TQ(j)=TF(j)×lg{(U+1) / [DF(j)+1]}; Among them, TF(j) is the ratio of the number of times the j-th preset keyword appears in Q to the number of words in Q, U is the number of medical knowledge items, DF(j) is the number of medical knowledge items that contain the j-th preset keyword, 0<j≤J, J is the number of preset keywords in the medical keyword database.
4. The intelligent question-answering system based on natural language processing according to claim 3, characterized in that: The second vector construction module matches the word in the i-th medical knowledge item phrase with the preset keyword. If the match is successful, the second vector construction module uses the word as the i-th item knowledge feature word. If the match fails, the second vector construction module uses the word as an invalid item word. The second vector construction module constructs the i-th medical knowledge item phrase feature vector TYi according to the matching result between the i-th medical knowledge item phrase and the preset keyword, wherein: When the i-th item knowledge feature word does not match the j-th preset keyword in the medical key vocabulary, the second vector construction module sets the j-th element of TYi to TYi(j), setting TYi(j)=0; When the i-th knowledge feature word matches the j-th preset keyword in the medical key vocabulary, the second vector construction module sets the j-th element of TYi to TYi(j), setting TYi(j)=TF(j)'×lg{(U+1) / [DF(j)+1]}; Wherein, TF(j)' is the ratio of the number of times the j-th preset keyword appears in Y(i) to the number of words in Y(i).
5. The intelligent question-answering system based on natural language processing according to claim 4, characterized in that: The push module is provided with a matching unit and a push unit, wherein the matching unit is used to calculate the similarity between the user input text and the medical knowledge item according to the construction result of the question feature vector and the construction result of the medical knowledge item feature vector, wherein: ; Among them, S(i) is the similarity between the user input text and the i-th medical knowledge item, |TQ| is the modulus of the vector TQ, and |TYi| is the modulus of the vector TYi.
6. The intelligent question-answering system based on natural language processing according to claim 5, characterized in that: The push unit is used to sort the similarities between the user input text and the medical knowledge items according to the calculation result of the similarity between the user input text and the medical knowledge items, and select the medical knowledge item with the highest similarity as the target text, and record its similarity as SP. If SP>γ, the push unit pushes the target text as the push content to the user. If SP≤γ, the push unit pushes the alternative text as the push content to the user. Among them, γ is the preset similarity threshold.
7. An intelligent question-answering method based on natural language processing, applied to the intelligent question-answering system based on natural language processing as claimed in any one of claims 1 to 6, characterized in that: include, Step S1: Obtain user input text and medical knowledge items; Step S2: pre-processing the acquired user input text and medical knowledge items; Step S3: extracting question feature words from the preprocessed user input text and constructing a question feature vector; Step S4: extracting knowledge feature words from the preprocessed medical knowledge items and constructing feature vectors of the medical knowledge items; Step S5: matching the user input text with the medical knowledge item according to the construction results of the question feature vector and the construction results of the medical knowledge item feature vector, and pushing the text to the user according to the matching result; Step S6: obtaining the ratings and rating numbers of the push results given by the users in the management cycle, and optimizing the process of pushing texts to the users in the next management cycle according to the ratings of the push results given by the users in the management cycle; Step S7: adjusting the optimization process of the text push process to the user in the next management period according to the user's rating and the number of ratings on the push results in the management period.
