Disease risk prediction method and system based on natural language processing

By introducing natural language processing technology into the disease risk prediction method, contradictory statements in the patient's daily consultation data and giving them credibility based on the medical record data, the problem of low accuracy of disease risk prediction in the prior art is solved, and higher prediction accuracy and stability are achieved.

CN119889700AInactive Publication Date: 2025-04-25四川互慧软件有限公司

Patent Information

Application Number
CN202510354143.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When the existing disease risk prediction methods process daily consultation data, they fail to effectively identify and handle contradictory statements, resulting in a decrease in the accuracy of disease risk prediction.

Method used

Through a natural language processing method, the first semantic model uses the first semantic model to identify contradictory statements on the patient's daily consultation data, extract contradictory statement pairs, and embed the credibility of the statement vector based on the medical record data, and finally predict the disease risk through the second semantic model.

Benefits of technology

It significantly improves the accuracy and stability of disease risk prediction, reduces information confusion caused by expression contradictions, and enhances data quality and prediction reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119889700A_ABST
    Figure CN119889700A_ABST
Patent Text Reader

Abstract

The invention provides a disease risk prediction method and system based on natural language processing, relates to the technical field of disease risk prediction based on semantic recognition, and aims to realize effective recognition and processing of contradictory statements in disease risk prediction. Converting each statement of the patient in the daily inquiry data into a statement vector group, and converting each word of the statement into a word vector; contradictory statements are recognized through the first semantic model, contradictory statement pairs are extracted, and each contradictory statement pair comprises two contradictory statements; acquiring medical record data of the patient, and embedding credibility for the statement vector of the contradictory statement based on the medical record data; and putting the contradictory statement embedded with the credibility back to the daily inquiry data to obtain credibility annotation data, and performing disease risk prediction based on the daily inquiry data through a second semantic model. The method has the advantage of improving the reliability and efficiency of disease risk prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of disease risk prediction based on semantic recognition, and in particular to a disease risk prediction method and system based on natural language processing. Background Art

[0002] In the field of disease risk prediction, daily medical consultation data, as an important source of health information, can reflect the patient's symptoms, behavioral habits and physical condition.

[0003] Judging the progression of a patient's disease through daily consultation data is an important step, and it also adds a lot of workload to medical staff. Existing technologies have begun to gradually introduce semantic recognition for auxiliary processing, reducing the workload of medical workers and increasing sales. However, due to the limitations of patients' subjective expressions, there are often problems such as inaccurate descriptions and even inconsistencies in daily consultation data. For example, a patient may say "no fever" and "a little high temperature" in different sentences. This contradictory expression can easily lead to misjudgment in the disease risk prediction model. Most of the existing disease risk prediction methods directly input the patient's consultation data into the model for analysis, without fully considering the identification and credibility assessment of contradictory information, which may introduce noise data and reduce the accuracy of disease prediction.

[0004] Therefore, it is necessary to optimize disease risks based on semantic recognition, to effectively identify and process contradictory sentences in disease risk prediction, and to improve the reliability of disease risk prediction. Summary of the invention

[0005] The purpose of the present invention is to provide a disease risk prediction method and system based on natural language processing, which can effectively identify and process contradictory sentences in disease risk prediction.

[0006] The present invention is achieved through the following technical solutions: A disease risk prediction method based on natural language processing comprises the following steps: Obtain patients’ daily consultation data; Convert each sentence of the patient in the daily consultation data into The sentence vector is converted into The word vector of Recognize contradictory sentences through the first semantic model, and extract contradictory sentence pairs, each contradictory sentence pair includes two mutually contradictory sentences; Obtain the patient's medical record data, embed the credibility of the sentence vectors of the contradictory sentences based on the medical record data, the sum of the credibility of the two sentences in each group of contradictory sentences is 1, and the credibility of the sentence vectors without contradiction is 1; The contradictory sentences with embedded credibility are put back into the daily consultation data to obtain credibility labeled data, and disease risk prediction is performed based on the daily consultation data through the second semantic model.

[0007] Preferably, the daily consultation data is obtained by periodically consulting patients and recording the patients' self-reported symptoms.

[0008] Preferably, the method for identifying contradictory sentences using the first semantic model is: Input the sentence vector and word vector through the input layer; Get the sentence vector of the i-th sentence through the feature extraction layer and the sentence vector of the jth sentence , and obtain the number of contradictory words between the i-th sentence and the j-th sentence based on the word vector group. , N is the total number of sentence vectors; The mutual contradiction probability between the i-th sentence and the j-th sentence is output through the output layer. If the mutual contradiction probability exceeds the preset probability threshold, the contradiction is judged and the i-th sentence and the j-th sentence are extracted as mutually contradictory sentences.

[0009] Preferably, obtain the sentence vector of the i-th sentence and the sentence vector of the jth sentence The method to obtain the similarity is to obtain the cosine similarity : ; Where T means to find the transpose of the vector. Represents modulus.

[0010] Preferably, the method for obtaining the number of contradictory words between the i-th sentence and the j-th sentence based on the word vector group is: Get the pth word vector of the i-th sentence and the pth word vector of the jth sentence Cosine similarity of : ; ; Among them, P is the total number of word vectors of the i-th sentence, and Q is the total number of word vectors of the j-th sentence; Set the word similarity threshold and get all cosine similarities The number of words whose values ​​are less than the word similarity threshold is r, and the number of contradictory words between the i-th sentence and the j-th sentence is r.

[0011] Preferably, the method in which the output layer outputs the mutual contradiction probability of the i-th sentence and the j-th sentence is: ; ; in, is the probability of contradiction between the i-th statement and the j-th statement, e is a natural constant, f is an intermediate parameter, is the training coefficient, is the training bias.

[0012] Preferably, the method for embedding credibility of sentence vectors of contradictory sentences based on medical record data is: Based on the disease database, all symptoms of the disease suffered by the patient are obtained according to the medical record data; Convert the symptoms into 1*n symptom sentence vectors respectively; Get sentence vectors for contradictory sentences and ; Get sentence vectors separately And the cosine similarity of all symptom sentence vectors: ; ; in, is the sentence vector and The cosine similarity of the symptom sentence vectors, T represents the transpose of the vector, represents modulus, L is the total number of symptom sentence vectors; Get sentence vector The maximum value of the cosine similarity with all symptom sentence vectors ; Get sentence vectors separately And the cosine similarity of all symptom sentence vectors: ; ; in, is the sentence vector and The cosine similarity of the symptom sentence vectors; Get sentence vector The maximum value of the cosine similarity with all symptom sentence vectors ; Get sentence vectors separately and Credibility: ; ; in, and They are sentence vectors and credibility, e is a natural constant.

[0013] Preferably, the method for predicting disease risk based on daily consultation data using the second semantic model is: Input credibility annotation data through the input layer; Constructing feature matrix through feature extraction layer : ; ; ; in, Representative patient description The feature vector of the sentence with the symptom, , H is the total number of symptoms corresponding to the patient's disease, Describe the first The sentence vector of the u-th sentence of the symptom, Describe the first The weight of the sentence vector of the u-th sentence of the symptom, v is the patient's description of the first The total number of statements for each symptom, and Describe the patient The credibility of the u'th and uth sentence vectors of the symptom; Extracting deep information through multi-layer perceptron MLP : ; The probability that the disease has a risk of worsening is output through the activation function of the output layer, and a threshold for the probability of worsening is set. When the output probability that the disease has a risk of worsening is greater than the threshold for the probability of worsening, an early warning is issued.

[0014] Preferably, the method of outputting the probability of the risk of disease worsening through the activation function of the output layer is: ; in, The probability that the disease is at risk of worsening, and are training weights and biases respectively, e is a natural constant, Deep information extracted by multi-layer perceptron MLP.

[0015] The present invention also provides a disease risk prediction system based on natural language processing, which is applied to the above-mentioned disease risk prediction method based on natural language processing, comprising: The consultation data acquisition module is used to obtain the patient's daily consultation data; The vector conversion module converts each sentence of the patient in the daily consultation data into The sentence vector is converted into The word vector of A contradiction identification module, which identifies contradictory sentences through the first semantic model and extracts contradictory sentence pairs, each of which includes two mutually contradictory sentences; The credibility acquisition module acquires the patient's medical record data, embeds the credibility of the sentence vector of the contradictory sentence based on the medical record data, and the sum of the credibility of the two sentences in each group of contradictory sentences is 1. The credibility of the sentence vector without contradiction is embedded and the credibility is 1; The risk prediction module puts the contradictory sentences embedded with credibility back into the daily consultation data to obtain credibility annotation data, and predicts disease risks based on the daily consultation data through the second semantic model.

[0016] The technical solution of the present invention has at least the following advantages and beneficial effects: The present invention uses the first semantic model to detect contradictions in the daily medical consultation data of patients, and can accurately extract contradictory sentence pairs, reduce information confusion caused by contradictory expressions, and then use the data containing credibility annotations in the second semantic model to predict disease risks. Compared with traditional methods that do not consider contradictions and credibility, the accuracy and stability of prediction can be significantly improved; Based on medical record data, we embed credibility scores for contradictory sentences and assign credibility balance to the same set of contradictory sentences, so that the model can focus on expressions with high credibility when processing contradictory information, thereby improving data quality. When judging whether there is a contradiction between sentences through the first semantic model, the present invention extracts the similarity and the number of contradictory words of the two sentences, realizes accurate and reliable contradiction judgment through the simplest feature representation, adapts to complex expressions, has high robustness and stronger interpretability; When extracting and judging risks through the second semantic model, the present invention groups the sentence vectors according to symptoms, and extracts features for each symptom in combination with credibility, so that the features of each symptom can be extracted separately, and while using credibility to improve the reliability of information extraction, it ensures that each type of symptom has an independent weight and will not be masked or diluted by other symptoms; The present invention is reasonably designed and can replicate the daily work of medical workers, improve work efficiency, accurately capture useful data, discover potential contradictions, and ultimately improve the accuracy and stability of disease risk prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1A schematic diagram of a process for predicting disease risks based on natural language processing provided in Example 1 of the present invention; Figure 2 A schematic diagram of the structure of a first semantic model provided in Example 1 of the present invention; Figure 3 A schematic diagram of the structure of a second semantic model provided in Example 1 of the present invention; Figure 4 This is a schematic diagram of the principle of a disease risk prediction system based on natural language processing provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0019] Example 1 This embodiment provides a disease risk prediction method based on natural language processing. Figure 1 , including the following steps: Obtain patients’ daily consultation data; Convert each sentence of the patient in the daily consultation data into The sentence vector is converted into The word vector of Recognize contradictory sentences through the first semantic model, and extract contradictory sentence pairs, each contradictory sentence pair includes two mutually contradictory sentences; Obtain the patient's medical record data, embed the credibility of the sentence vectors of the contradictory sentences based on the medical record data, the sum of the credibility of the two sentences in each group of contradictory sentences is 1, and the credibility of the sentence vectors without contradiction is 1; The contradictory sentences with embedded credibility are put back into the daily consultation data to obtain credibility labeled data, and disease risk prediction is performed based on the daily consultation data through the second semantic model.

[0020] In the daily consultation process, when medical staff ask about the corresponding symptoms according to the patient's condition, due to the differences in the patient's ability to express and medical knowledge, the patient's expression may be inconsistent, repeated, and revised. If these contradictory information is directly input into the disease risk prediction model as facts, it will seriously interfere with the model judgment and lead to the risk of misdiagnosis or missed diagnosis. For example, the patient expressed "no cough recently" and "but coughed last night". As for semantic recognition, it is difficult to superimpose the features of the two in the relevant recognition, which will cause the weight of the cough symptom to be diluted or blurred, thereby affecting the extraction of disease features. In other words, if there is no contradiction recognition ability, the model may fluctuate violently when processing data from different patients, and there will be a large gap in the risk prediction of the same symptom, which will weaken the stability and generalization ability of the model. In this embodiment, by identifying contradictions and assigning credibility based on information such as medical records and historical data, the model can focus on more reliable information expressions between the two contradictory expressions, and finally obtain "credibility-weighted" symptom features to improve the accuracy of risk assessment.

[0021] This embodiment first obtains the daily consultation data of the patient, and on this basis, pre-operations such as cleaning and deduplication can be performed, and then the sentences are processed into sentence vectors and word vectors to facilitate semantic recognition. Specifically, the vector conversion can be taken in the following ways: for example, each sentence is converted into a sentence vector of the same dimension using Sentence-BERT. This mode is convenient for comparing vector similarity, and the conversion of words into word vectors of fixed dimensions can be achieved by the Word2Vec model. Based on the above pre-processing, the contradiction detection of the daily consultation data of the patient can be performed through the first semantic model. The first semantic model can accurately extract the contradictory and contradictory sentence pairs, effectively identify the inconsistency and logical conflict of the patient in the expression process, reduce the information confusion and misleading caused by the expression contradiction, avoid the direct use of contradictory or unreliable information for disease risk analysis, and significantly improve the reliability and utilization value of the data. Further, for contradictory sentences, this embodiment embeds the credibility for them based on medical record data, and quantifies the reliability of contradictory sentences. Finally, this embodiment uses daily medical consultation data containing credibility annotations in the second semantic model to predict disease risks. Since the contradictory relationship between sentences and the credibility of different expressions are fully considered in the model training and reasoning process, this embodiment can maintain higher prediction accuracy and stability in the environment of medical consultation texts that are not professional, mixed, or even contradictory, and effectively reduce the risk of misjudgment due to abnormal expressions.

[0022] In this embodiment, the daily medical consultation data is obtained by periodically consulting patients and recording the patients' self-reported symptoms.

[0023] As a preferred solution of this embodiment, the method for identifying contradictory sentences using the first semantic model is: Input the sentence vector and word vector through the input layer; Get the sentence vector of the i-th sentence through the feature extraction layer and the sentence vector of the jth sentence , and obtain the number of contradictory words between the i-th sentence and the j-th sentence based on the word vector group. , N is the total number of sentence vectors; The mutual contradiction probability between the i-th sentence and the j-th sentence is output through the output layer. If the mutual contradiction probability exceeds the preset probability threshold, the contradiction is judged and the i-th sentence and the j-th sentence are extracted as mutually contradictory sentences.

[0024] Furthermore, get the sentence vector of the i-th sentence and the sentence vector of the jth sentence The method to obtain the similarity is to obtain the cosine similarity : ; Where T means to find the transpose of the vector. Represents modulus.

[0025] Based on the above scheme, the method for obtaining the number of contradictory words between the i-th sentence and the j-th sentence based on the word vector group is: Get the pth word vector of the i-th sentence and the pth word vector of the jth sentence Cosine similarity of : ; ; Among them, P is the total number of word vectors of the i-th sentence, and Q is the total number of word vectors of the j-th sentence; Set the word similarity threshold and get all cosine similarities The number of words whose values ​​are less than the word similarity threshold is r, and the number of contradictory words between the i-th sentence and the j-th sentence is r.

[0026] Next, the output layer outputs the mutual contradiction probability of the i-th sentence and the j-th sentence as follows: ; ; in, is the probability of contradiction between the i-th statement and the j-th statement, e is a natural constant, f is an intermediate parameter, is the training coefficient, is the training bias.

[0027] The design principle of the above scheme is to judge the overall semantic relationship between two sentences through cosine similarity. If the similarity is high, it means that the themes or semantics expressed by the two sentences are similar. At the specific vocabulary level, it can be judged by the cosine similarity between words, and the number of contradictory word pairs can be found by setting a lower threshold. If you only rely on similarity, it may be difficult to distinguish between "repetition" and "contradiction"; if you only rely on the number of contradictory words, you may misjudge the common antonyms of sentences with different topics. For example, if there are many contradictory words in a sentence with high similarity, it means that there is a high probability that contradictory statements under the same topic are expressed.

[0028] Therefore, this embodiment combines the cosine similarity of contradictory sentences with the number of contradictory words, and introduces an intermediate parameter f in the output layer to calculate the contradiction probability. Here, the intermediate parameter f is A linear relationship, Specifically shows the proportion of contradictory words to the total number of words in the contradictory sentences And the cosine similarity of these two contradictory statements Through this ratio relationship, we can find out the degree to which the sentences are similar but have more contradictory words, and then accurately express the characteristics of the contradictory sentences. In other words, using sentence similarity and the number of contradictory words as dual-feature judgment can take into account the overall semantics and detailed differences, accurately identify contradictory expressions, reduce misjudgments, improve stability, and enhance the interpretability of the judgment basis. This embodiment accurately expresses the contradiction between two sentences through as little data processing as possible, which will not increase the model calculation burden, but also increase the reliability of contradiction identification, and has a high cost-effectiveness.

[0029] In summary, this embodiment integrates global semantic similarity with local vocabulary conflict information to achieve high-precision contradiction recognition with the simplest and most effective feature expression. This method can adapt to the complex and diverse natural language expressions of patients, effectively avoid the recognition difficulties caused by differences in wording or sentence changes, and has high robustness. At the same time, the contradiction judgment process is transparent, logically clear, and has good interpretability, which is convenient for subsequent manual review or result tracing.

[0030] Next, the method for embedding credibility of sentence vectors based on medical record data as contradictory sentences is as follows: Based on the disease database, all symptoms of the disease suffered by the patient are obtained according to the medical record data; Convert the symptoms into 1*n symptom sentence vectors respectively; Get sentence vectors for contradictory sentences and ; Get sentence vectors separately And the cosine similarity of all symptom sentence vectors: ; ; in, is the sentence vector and The cosine similarity of the symptom sentence vectors, T represents the transpose of the vector, represents modulus, L is the total number of symptom sentence vectors; Get sentence vector The maximum value of the cosine similarity with all symptom sentence vectors ; Get sentence vectors separately And the cosine similarity of all symptom sentence vectors: ; ; in, is the sentence vector and The cosine similarity of the symptom sentence vectors; Get sentence vector The maximum value of the cosine similarity with all symptom sentence vectors ; Get sentence vectors separately and Credibility: ; ; in, and They are sentence vectors and credibility, e is a natural constant.

[0031] In the above scheme, the credibility of contradictory statements is embedded through medical record data, and a complementary credibility balance mechanism is set for each pair of contradictory statements so that the sum of the credibility of the group of statements is a fixed value. Medical record information is used to assist in judging the credibility distribution, ensuring that the model can focus on more reliable expressions that are more consistent with historical medical conditions when dealing with contradictory expressions, thereby improving the overall quality and consistency of data expression, and suppressing the interference of invalid or erroneous information on risk prediction.

[0032] When calculating credibility, it is impossible to judge which sentence is more credible by only detecting the semantic contradiction between two sentences. Introducing the symptom knowledge in the disease database, using the patient's confirmed medical records, and extracting the standard symptoms corresponding to the disease as a reference benchmark is equivalent to letting the model judge which sentence is more in line with the disease characteristics and closer to the actual situation under the professional knowledge base, avoiding the limitations of simple text matching. On the other hand, by obtaining the patient's disease information through medical record data, the credibility judgment is based on the calculation of individual disease characteristics rather than a set of general rules, which significantly improves the pertinence and accuracy of contradiction judgment. Specifically, by converting disease symptoms into "symptom sentence vectors", the model can directly calculate the similarity between each contradictory sentence and these symptoms, and sum up this similarity to obtain a comprehensive score. Which sentence has a higher similarity with the disease symptom characteristics is more likely to be a true and effective expression. On this basis, there is no need to forcibly abandon any sentence in the contradictory pair, but to assign different credibility through similarity comparison, so that the model can distinguish weights when extracting features, but does not completely discard low credibility information, avoid losing potential valid information due to misjudgment, and further enhance the robustness of the system.

[0033] Finally, the method for predicting disease risk based on daily consultation data using the second semantic model is: Input credibility annotation data through the input layer; Constructing feature matrix through feature extraction layer : ; ; ; in, Representative patient description The feature vector of the sentence with the symptom, , H is the total number of symptoms corresponding to the patient's disease, Describe the first The sentence vector of the u-th sentence of the symptom, Describe the first The weight of the sentence vector of the u-th sentence of the symptom, v is the patient's description of the first The total number of statements for each symptom, and Describe the patient The credibility of the u'th and uth sentence vectors of the symptom; Extracting deep information through multi-layer perceptron MLP : ; The probability that the disease has a risk of worsening is output through the activation function of the output layer, and a threshold for the probability of worsening is set. When the output probability that the disease has a risk of worsening is greater than the threshold for the probability of worsening, an early warning is issued.

[0034] As a further preferred embodiment, the method of outputting the probability of the disease having a risk of worsening through the activation function of the output layer is: ; in, The probability that the disease is at risk of worsening, and are training weights and biases respectively, e is a natural constant, Deep information extracted by multi-layer perceptron MLP.

[0035] When the second semantic model of this embodiment makes a disease risk judgment, the sentence vectors in the daily medical consultation data are grouped and processed according to the corresponding symptoms, and features are extracted independently for each symptom, and different weights are assigned in combination with the credibility of the sentence, so that the feature expression of each symptom is sufficient, and the interference of low-credibility expression on feature calculation is suppressed. The neurons of each layer of the multi-layer perceptron are fully connected with the neurons of the previous layer, and nonlinear expression capabilities are introduced through activation functions (such as ReLU, Tanh, etc.). The design based on the multi-layer perceptron can perform complex mapping and classification judgment on the input features through multi-layer linear transformation and nonlinear activation. At the same time, the group extraction method of this embodiment not only avoids the situation where individual symptom information is diluted by other irrelevant or strong symptoms in the global feature calculation, but also ensures the integrity and independence of the features of each symptom dimension, providing more fine-grained and more accurate input features for disease risk prediction, and further improving the diagnostic accuracy and generalization ability of the model.

[0036] To sum up, this embodiment can not only efficiently process the patient's free expression and accurately capture useful data, but also eliminate invalid or contradictory information. Through contradiction detection, credibility empowerment and other methods, it can comprehensively improve the reliability and stability of disease risk prediction, and can assist medical workers in daily consultations. The processing speed is relatively fast. The method of this embodiment can be used to make predictions before medical staff handle the situation, thereby improving work efficiency. It has significant practical value and promotion prospects.

[0037] Example 2 This embodiment provides a disease risk prediction system based on natural language processing. Figure 2 , applied to the above-mentioned disease risk prediction method based on natural language processing, including: The consultation data acquisition module is used to obtain the patient's daily consultation data; The vector conversion module converts each sentence of the patient in the daily consultation data into The sentence vector is converted into The word vector of A contradiction identification module, which identifies contradictory sentences through the first semantic model and extracts contradictory sentence pairs, each of which includes two mutually contradictory sentences; The credibility acquisition module acquires the patient's medical record data, embeds the credibility of the sentence vector of the contradictory sentence based on the medical record data, and the sum of the credibility of the two sentences in each group of contradictory sentences is 1. The credibility of the sentence vector without contradiction is embedded and the credibility is 1; The risk prediction module puts the contradictory sentences embedded with credibility back into the daily consultation data to obtain credibility annotation data, and predicts disease risks based on the daily consultation data through the second semantic model.

[0038] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A disease risk prediction method based on natural language processing, characterized in that: The following steps are involved: Obtain patients’ daily consultation data; Convert each sentence of the patient in the daily consultation data into The sentence vector is converted into The word vector of Recognize contradictory sentences through the first semantic model, and extract contradictory sentence pairs, each contradictory sentence pair includes two mutually contradictory sentences; Obtain the patient's medical record data, embed the credibility of the sentence vectors of the contradictory sentences based on the medical record data, the sum of the credibility of the two sentences in each group of contradictory sentences is 1, and the credibility of the sentence vectors without contradiction is 1; The contradictory sentences with embedded credibility are put back into the daily consultation data to obtain credibility labeled data, and disease risk prediction is performed based on the daily consultation data through the second semantic model.

2. The disease risk prediction method based on natural language processing according to claim 1, characterized in that: The daily consultation data is obtained by periodically consulting patients and recording the patients' self-reported symptoms.

3. The disease risk prediction method based on natural language processing according to claim 1, characterized in that: The method for identifying contradictory sentences using the first semantic model is: Input the sentence vector and word vector through the input layer; Get the sentence vector of the i-th sentence through the feature extraction layer and the sentence vector of the jth sentence , and obtain the number of contradictory words between the i-th sentence and the j-th sentence based on the word vector group. , N is the total number of sentence vectors; The mutual contradiction probability between the i-th sentence and the j-th sentence is output through the output layer. If the mutual contradiction probability exceeds the preset probability threshold, the contradiction is judged and the i-th sentence and the j-th sentence are extracted as mutually contradictory sentences.

4. The disease risk prediction method based on natural language processing according to claim 3, characterized in that: Get the sentence vector of the i-th sentence and the sentence vector of the jth sentence The method to measure the similarity is to obtain the cosine similarity : ; Where T means to find the transpose of the vector. Represents modulus.

5. The disease risk prediction method based on natural language processing according to claim 4, characterized in that: The method for obtaining the number of contradictory words between the i-th sentence and the j-th sentence based on the word vector group is: Get the pth word vector of the i-th sentence and the pth word vector of the jth sentence Cosine similarity of : ; ; Among them, P is the total number of word vectors of the i-th sentence, and Q is the total number of word vectors of the j-th sentence; Set the word similarity threshold and get all cosine similarities The number of words whose values ​​are less than the word similarity threshold is r, and the number of contradictory words between the i-th sentence and the j-th sentence is r.

6. The disease risk prediction method based on natural language processing according to claim 5, characterized in that: The method in which the output layer outputs the probability of contradiction between the i-th sentence and the j-th sentence is: ; ; in, is the probability of contradiction between the i-th statement and the j-th statement, e is a natural constant, f is an intermediate parameter, is the training coefficient, is the training bias.

7. The disease risk prediction method based on natural language processing according to claim 1, characterized in that: The method for embedding credibility of sentence vectors based on medical record data as contradictory sentences is: Based on the disease database, all symptoms of the disease suffered by the patient are obtained according to the medical record data; Convert the symptoms into 1*n symptom sentence vectors respectively; Get sentence vectors for contradictory sentences and ; Get sentence vectors separately And the cosine similarity of all symptom sentence vectors: ; ; in, is the sentence vector and The cosine similarity of the symptom sentence vectors, T represents the transpose of the vector, represents modulus, L is the total number of symptom sentence vectors; Get sentence vector The maximum value of the cosine similarity with all symptom sentence vectors ; Get sentence vectors separately And the cosine similarity of all symptom sentence vectors: ; ; in, is the sentence vector and The cosine similarity of the symptom sentence vectors; Get sentence vector The maximum value of the cosine similarity with all symptom sentence vectors ; Get sentence vectors separately and Credibility: ; ; in, and They are sentence vectors and credibility, e is a natural constant.

8. The disease risk prediction method based on natural language processing according to claim 1, characterized in that: The method for predicting disease risk based on daily consultation data using the second semantic model is: Input credibility annotation data through the input layer; Constructing feature matrix through feature extraction layer : ; ; ; in, Representative patient description The feature vector of the sentence with the symptom, , H is the total number of symptoms corresponding to the patient's disease, Describe the first The sentence vector of the u-th sentence of the symptom, Describe the first The weight of the sentence vector of the u-th sentence of the symptom, v is the patient's description of the first The total number of statements for each symptom, and Describe the patient The credibility of the u'th and uth sentence vectors of the symptom; Extracting deep information through multi-layer perceptron MLP : ; The probability that the disease has a risk of worsening is output through the activation function of the output layer, and a threshold for the probability of worsening is set. When the output probability that the disease has a risk of worsening is greater than the threshold for the probability of worsening, an early warning is issued.

9. The disease risk prediction method based on natural language processing according to claim 8, characterized in that: The method of outputting the probability of the disease having a risk of worsening through the activation function of the output layer is: ; in, The probability that the disease is at risk of worsening, and are training weights and biases respectively, e is a natural constant, Deep information extracted by multi-layer perceptron MLP.

10. A disease risk prediction system based on natural language processing, applied to a disease risk prediction method based on natural language processing according to any one of claims 1 to 9, characterized in that: include: The consultation data acquisition module is used to obtain the patient's daily consultation data; The vector conversion module converts each sentence of the patient in the daily consultation data into The sentence vector is converted into The word vector of A contradiction identification module, which identifies contradictory sentences through the first semantic model and extracts contradictory sentence pairs, each of which includes two contradictory sentences; The credibility acquisition module acquires the patient's medical record data, embeds the credibility of the sentence vector of the contradictory sentence based on the medical record data, and the sum of the credibility of the two sentences in each group of contradictory sentences is 1. The credibility of the sentence vector without contradiction is embedded and the credibility is 1; The risk prediction module puts the contradictory sentences embedded with credibility back into the daily consultation data to obtain credibility annotation data, and predicts disease risks based on the daily consultation data through the second semantic model.

Citation Information

Patent Citations

  • Semantic vector processing method and device

    CN109460549A

  • Intention classification method and device, equipment and storage medium

    CN117009512A

Cited By

  • Early dangerous stomachache recognition method based on machine learning

    CN120183734A