Method, device, computer equipment and storage medium for determining disease emotion information

Through the combination of pre-trained models and graph neural networks, the problem of inaccurate representation of disease emotional information in traditional disease emotional information analysis is solved, and the accurate identification and analysis of disease emotional information in medical record texts is achieved.

CN116010593BActive Publication Date: 2024-09-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111219480.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-20
Publication Date
2024-09-06
Estimated Expiration
2041-10-20

AI Technical Summary

Technical Problem

In traditional disease emotion information analysis solutions, the long short-term memory network cannot accurately represent disease emotion information, resulting in the inability to accurately analyze the user's disease emotion.

Method used

The pre-trained model is trained based on medical record samples with medical keywords masked, and the object of interest information and abnormal performance information in the medical record text are extracted, and the abnormal polarity is identified through the graph neural network to generate disease emotional information.

Benefits of technology

It achieves accurate identification of object information and abnormal performance information of objects of interest from medical record text, and improves the accuracy of disease emotional information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116010593B
    Figure CN116010593B
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment and storage medium for determining disease emotion information. The method comprises: obtaining medical record text; extracting the first text feature and the second text feature about the object of interest in the medical record text through a pre-trained model, and determining the object information of the object of interest and the abnormal performance information when the abnormality is presented based on the first text feature; the pre-trained model is trained based on medical record samples that mask medical keywords; the medical keywords include the object information and the abnormal performance information; the second text feature is identified by abnormal polarity through a graph neural network; based on the identified abnormal polarity, the object information and the abnormal performance information, the disease emotion information of the object of interest is generated, and then reminded or displayed in the form of voice. This method can accurately analyze the user's disease emotion information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, computer equipment and storage medium for determining disease emotion information. Background Art

[0002] With the continuous development of artificial intelligence technology, more and more technical fields are widely using artificial intelligence technology in order to provide high-quality services to users or enterprises. For example, in the medical field, artificial intelligence technology can be used to analyze the user's disease emotional information, thereby providing effective medical assistance to medical workers.

[0003] In traditional disease sentiment information analysis schemes, a sentence and the target mentioned in the sentence are usually given, and the sentence is encoded using a long short-term memory network. Then, the sentiment polarity of each character is obtained based on the sentence encoding, and finally, the sentiment polarity based on the target is obtained using the attention mechanism. However, using the traditional disease sentiment information analysis scheme, the long short-term memory network cannot accurately obtain information representing disease sentiment during the sentence encoding process, which leads to the inability to accurately analyze the user's disease sentiment information. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for determining disease emotion information in response to the above-mentioned technical problems, which can accurately analyze the user's disease emotion information.

[0005] A method for determining disease emotion information, the method comprising:

[0006] Obtain medical record text;

[0007] Extracting a first text feature and a second text feature about the object of interest in the medical record text through a pre-training model, and determining object information of the object of interest and abnormal manifestation information when an abnormality is present based on the first text feature; the pre-training model is obtained by training based on medical record samples with medical keywords masked; the medical keywords include the object information and the abnormal manifestation information;

[0008] Using a graph neural network, identifying abnormal polarity of the second text feature;

[0009] Based on the identified abnormal polarity, the object information and the abnormal manifestation information, the disease emotion information of the object of interest is generated.

[0010] A device for determining disease emotion information, the device comprising:

[0011] The acquisition module is used to obtain the medical record text;

[0012] A first recognition module is used to extract a first text feature and a second text feature about a focus object in the medical record text through a pre-trained model, and determine object information of the focus object and abnormal performance information when an abnormality is present based on the first text feature; the pre-trained model is obtained by training based on a medical record sample with medical keywords masked; the medical keywords include the object information and the abnormal performance information;

[0013] A second recognition module, used for performing abnormal polarity recognition on the second text feature through a graph neural network;

[0014] A generation module is used to generate disease emotion information of the object of interest based on the identified abnormal polarity, the object information and the abnormal manifestation information.

[0015] In one embodiment, the pre-trained model includes a first network model and a second network model with shared parameters; the first recognition module is also used to extract shallow object features and deep object features about the object of interest in the medical record text through the first network model; extract shallow abnormality features and deep abnormality features used to represent the abnormality of the object of interest from the medical record text through the second network model; fuse the deep object features and the fusion features of the shallow abnormality features and the deep abnormality features to obtain the first text features; and fuse the shallow object features and the shallow abnormality features to obtain the second text features.

[0016] In one embodiment, the device further comprises:

[0017] The acquisition module is also used to display a product page; the product page includes a medical record description subpage and an auxiliary subpage; and the medical record text is read from the medical record description subpage;

[0018] A display module is used to display the disease emotion information of the object of interest in the auxiliary sub-page; or to display the disease emotion information in a floating layer or pop-up window on the upper layer of the product page; or to switch to the result display page to display the disease emotion information.

[0019] In one embodiment, the first text feature includes an object feature and an abnormal performance feature;

[0020] The first identification module is also used to mark the object information of the object of interest in the medical record text based on the object characteristics, and obtain the object information of the object of interest according to the object information marking; based on the abnormal manifestation characteristics, mark the abnormal manifestation of the object of interest in the medical record text, and obtain the abnormal manifestation information when the object of interest presents an abnormality according to the abnormal manifestation marking.

[0021] In one embodiment, the device further comprises:

[0022] A training module is used to select medical keywords from the medical record samples and use the medical keywords as keyword labels; mask the medical keywords in the medical record samples; identify the training object information of the object of interest and the training abnormal performance information when the object of interest presents an abnormality through the pre-training model before training in the processed medical record samples; determine a loss value based on the training object information, the training abnormal performance information and the corresponding keyword labels; and adjust the parameters of the pre-training model before training according to the loss value.

[0023] In one embodiment, the training module is further used to use the target connective as a connective label in the processed medical record sample, and mask the target connective to obtain a target medical record sample; in the target medical record sample, extract connectives as predicted connectives through the pre-training model before training; determine a first difference between the training object information and the corresponding keyword label, a second difference between the training abnormal performance information and the corresponding keyword label, and a third difference between the predicted connective and the connective label; and determine a loss value based on the first difference, the second difference, and the third difference.

[0024] In one embodiment, the training module is also used to determine the proportion of the masked medical keywords and the target connecting words in the medical record sample; if the proportion is less than a preset proportion, the remaining masking number is determined based on the preset proportion and the proportion; in the target medical record sample, the words to be masked are selected for masking processing according to the remaining masking number.

[0025] In one embodiment, the medical keywords include medical field keywords; the training module is further used to extract keywords of the target part of speech in each of the medical record samples; determine a first frequency of occurrence of the keywords in at least two reading texts in the medical field; determine a second frequency of occurrence of the keywords in at least two reading texts in other fields; and determine the medical field keywords in the keywords of the target part of speech based on the first frequency and the second frequency.

[0026] In one embodiment, the medical keywords include abnormal characteristic keywords; the training module is also used to extract abnormal characteristic words in the medical field from medical data; taking the abnormal characteristic words as seeds of the abnormal characteristic word samples, determining the point-by-point mutual information value between the seeds and each abnormal characteristic word to be tested for representing the correlation; for each abnormal characteristic word to be tested, if the sum of the point-by-point mutual information values ​​between the current abnormal characteristic word to be tested and each seed reaches a preset condition, the current abnormal characteristic word to be tested is used as the abnormal characteristic word sample; and extracting the abnormal characteristic keywords in the medical record sample based on the abnormal characteristic word samples.

[0027] In one embodiment, the training module is also used to perform word segmentation on the medical record sample to obtain corresponding word segmentations; parse the medical record sample into a dependency tree with each word segmentation as a node; and based on the dependency tree, construct a graph neural network with the word segmentation corresponding to the object of interest as the root node.

[0028] In one of the embodiments, the training module is also used to determine the distance between the segmentation corresponding to the object of interest and the other segmentations; in the graph neural network, weights are assigned to the connection relationships between the root node and the other nodes according to the distance.

[0029] In one embodiment, the training module is also used to extract the training object features of the object of interest from the medical record sample through the pre-trained model with adjusted parameters, and to identify the shallow abnormal manifestation features when the object of interest presents abnormalities; to perform abnormal polarity identification on the fusion features of the training object features and the shallow abnormal manifestation features through the graph neural network to obtain predicted abnormal polarity; to determine the polarity loss value based on the predicted abnormal polarity and the abnormal polarity label; and to adjust the parameters of the graph neural network according to the polarity loss value.

[0030] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0031] Obtain medical record text;

[0032] Extracting a first text feature and a second text feature about the object of interest in the medical record text through a pre-training model, and determining object information of the object of interest and abnormal manifestation information when an abnormality is present based on the first text feature; the pre-training model is obtained by training based on medical record samples with medical keywords masked; the medical keywords include the object information and the abnormal manifestation information;

[0033] Using a graph neural network, identifying abnormal polarity of the second text feature;

[0034] Based on the identified abnormal polarity, the object information and the abnormal manifestation information, the disease emotion information of the object of interest is generated.

[0035] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0036] Obtain medical record text;

[0037] Extracting a first text feature and a second text feature about the object of interest in the medical record text through a pre-training model, and determining object information of the object of interest and abnormal manifestation information when an abnormality is present based on the first text feature; the pre-training model is obtained by training based on medical record samples with medical keywords masked; the medical keywords include the object information and the abnormal manifestation information;

[0038] Using a graph neural network, identifying abnormal polarity of the second text feature;

[0039] Based on the identified abnormal polarity, the object information and the abnormal manifestation information, the disease emotion information of the object of interest is generated.

[0040] A computer program product includes computer instructions, characterized in that when the computer instructions are executed by a processor, the steps of the method for determining the above-mentioned disease emotion information are implemented.

[0041] The above-mentioned method, device, computer equipment and storage medium for determining disease sentiment information use medical record samples that mask medical keywords to train the pre-trained model, so that the pre-trained model can learn the ability to recognize medical keywords, so that after obtaining the medical record text, the object information and abnormal manifestation information of the object of interest can be accurately identified from the medical record text, and the object information and abnormal manifestation information belong to the medical keywords. In addition, the abnormal polarity of the object features and abnormal manifestation features is identified through the graph neural network, and based on the abnormal polarity, object information and abnormal manifestation information, the disease sentiment information of the object of interest can be accurately obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 A diagram of an application environment of a method for determining disease emotion information in an embodiment;

[0043] Figure 2 is a flow chart of a method for determining disease emotion information in one embodiment;

[0044] Figure 3 This is a schematic diagram of a product interface in one embodiment;

[0045] Figure 4 This is a schematic diagram of an interface in which disease emotion information is displayed in a pop-up window or floating layer in a product interface in an embodiment;

[0046] Figure 5 A schematic diagram of a process of training a pre-trained model in one embodiment;

[0047] Figure 6 A schematic diagram of the structure of a pre-training model in one embodiment;

[0048] Figure 7 A schematic diagram of a process for constructing and training a graph neural network in one embodiment;

[0049] Figure 8 It is a schematic diagram of the structure of a graph neural network with aspects as the root node in one embodiment;

[0050] Fig. 9 is a schematic diagram of a relational attention network in one embodiment;

[0051] Fig.10 is a structural block diagram of a device for determining disease emotion information in one embodiment;

[0052] Fig.11 is a structural block diagram of a device for determining disease emotion information in another embodiment;

[0053] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] The method for determining disease emotion information provided in this application can be applied to Figure 1In the application environment shown. In the application environment, a terminal 102 and a server 104 are included. The method for determining the disease emotion information can be executed by the server 104, specifically as follows: the server obtains the medical record text from the terminal 102; extracts the first text feature and the second text feature about the object of interest in the medical record text through a pre-trained model, and determines the object information of the object of interest and the abnormal performance information when the abnormality is presented based on the first text feature; the pre-trained model is trained based on the medical record sample with medical keywords masked; the medical keywords include object information and abnormal performance information; the second text feature is identified by abnormal polarity through a graph neural network; based on the identified abnormal polarity, object information and abnormal performance information, the disease emotion information of the object of interest is generated; then, the disease emotion information is sent to the terminal 102 for display.

[0056] In addition, the method for determining the disease emotion information can be performed by the terminal 102, specifically as follows: the terminal 102 obtains the medical record text; through the pre-training model, the first text feature and the second text feature about the object of interest in the medical record text are extracted, and the object information of the object of interest and the abnormal performance information when the abnormality is presented are determined based on the first text feature; the pre-training model is trained based on the medical record samples that mask the medical keywords; the medical keywords include object information and abnormal performance information; through the graph neural network, the abnormal polarity of the second text feature is identified; based on the identified abnormal polarity, object information and abnormal performance information, the disease emotion information of the object of interest is generated and displayed. It should be pointed out that the method for determining the disease emotion information can also be performed collaboratively by the terminal 102 and the server 104.

[0057] Among them, the terminal 102 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker and a smart watch, etc.; in addition, it can also be an intelligent voice interaction device, a smart home appliance and a car terminal, etc., but is not limited to this.

[0058] The server 104 may be an independent physical server or a service node in a blockchain system. The service nodes in the blockchain system form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP).

[0059] In addition, server 104 can also be a server cluster composed of multiple physical servers, and can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.

[0060] The terminal 102 and the server 104 may be connected via Bluetooth, USB (Universal Serial Bus) or a network or other communication connection methods, which are not limited in this application.

[0061] In one embodiment, Figure 2 As shown, a method for determining disease emotion information is provided, which can be obtained by Figure 1 The terminal or server in the embodiment can also perform the method in collaboration with the terminal and the server. Figure 1 The following steps are used as an example to illustrate the terminal execution in:

[0062] S202, obtaining medical record text.

[0063] The medical record text may be a text recording the disease symptoms of the user.

[0064] In one embodiment, the terminal first displays a product page, which includes a medical record description subpage and an auxiliary subpage, such as Figure 3 As shown. The terminal reads the medical record text from the medical record description subpage, such as reading the medical record text from the current medical history area of ​​the medical record description subpage; or, when an information input operation is detected, the input medical record information is input into the current medical history area of ​​the medical record description subpage. When the input of the medical record information is completed, the complete medical record text can be obtained. Among them, the auxiliary subpage is used to display the disease emotion information predicted by artificial intelligence and the corresponding suggestion information. The suggestion information can be the recommended referral information proposed when a single user has high-risk symptoms.

[0065] In another embodiment, the terminal may obtain a medical record image, and then perform text recognition on the medical record image to obtain a medical record text. The medical record image may be an image obtained by scanning a paper medical record.

[0066] S204, extracting a first text feature and a second text feature about the object of interest in the medical record text through a pre-trained model, and determining object information of the object of interest and abnormal manifestation information when an abnormality is present based on the first text feature.

[0067] The pre-trained model is obtained by training based on medical record samples that mask medical keywords, and includes a first network model and a second network model. The first network model and the second network model can be two neural networks that share parameters, such as a BERT (Bidirectional Encoder Representation from Transformers) network, which learns to give an embedding representation of a word in a given context, and then predicts the corresponding word based on the embedding representation. In addition, the first network model and the second network model can also be other network models, such as an XLNet network, which integrates the segment recurrence mechanism and relative encoding paradigm of Transformer-XL into pre-training.

[0068] The object of concern may be an object that needs to be concerned when analyzing disease emotions. The object may be the entire body or a certain part of the body of the user, or may be other targets of concern, such as temperature, or a certain disease, etc.

[0069] The first text feature may refer to a deep feature extracted from the medical record text by the pre-trained model, including: a deep object feature of the object of interest, and a fusion feature between a shallow abnormality feature and a deep abnormality feature. The deep object feature is an embedded representation of the deep layer of the object information, and the fusion feature is an embedded representation of the shallow and deep fusion of the abnormal performance information.

[0070] The second text feature may refer to a shallow feature extracted from the medical record text by the pre-trained model, including: a shallow object feature of the object of interest and a shallow abnormality feature, wherein the shallow object feature is a shallow embedded representation of the object information, and the shallow abnormality feature is a shallow embedded representation of the abnormal manifestation information.

[0071] The object information may be the name of the object of interest or other keywords used to describe the object of interest, such as body, throat, and bronchus.

[0072] Abnormal performance information can be used to describe the external performance of the object of interest when it is abnormal. In the medical field, the abnormal performance information can be used to indicate clinical performance, such as the high fever when the user has a cold. It should be pointed out that medical keywords include object information and abnormal performance information, that is, both object information and abnormal performance information belong to terms in the medical field (i.e., medical keywords). The medical keywords can refer to commonly used professional terms in the medical field, such as body, throat, body temperature, cold, etc.

[0073] In one embodiment, the step of extracting the first text feature and the second text feature about the object of interest in the medical record text through the pre-trained model in S204 may specifically include: the terminal extracts the shallow object features and the deep object features about the object of interest in the medical record text through the first network model; extracts the shallow abnormality features and the deep abnormality features used to represent the abnormality of the object of interest from the medical record text through the second network model; fuses the deep object features and the fusion features of the shallow abnormality features and the deep abnormality features to obtain the first text feature; and fuses the shallow object features and the shallow abnormality features to obtain the second text feature.

[0074] In one embodiment, the first text feature includes an object feature and an abnormal performance feature; therefore, the step of determining the object information of the object of interest and the abnormal performance information when an abnormality is presented based on the first text feature in S204 may specifically include: the terminal marks the object information of the object of interest in the medical record text based on the object feature, and obtains the object information of the object of interest based on the object information marking; based on the abnormal performance feature, the terminal marks the abnormal performance of the object of interest in the medical record text, and obtains the abnormal performance information of the object of interest when an abnormality is presented based on the abnormal performance marking.

[0075] For example, sequence labeling is performed at the output end of the BERT network, and the labeling labels are {B, I, E, O, S}, so as to extract the object information of the objects of interest (aspects) in the medical record text. After obtaining the aspects, the BERT network is then used to extract the abnormal performance information (opinions) of the objects of interest. The extraction of opinions in medical record text is similar to the extraction of aspects, which is also a sequence labeling task. The difference is that when extracting opinions, the previously extracted aspects will be integrated, so as to extract the opinions corresponding to different aspects in a targeted manner. Among them, B (Begin) represents the starting character of aspects or opinions, I (Inter) represents the middle character of aspect or opinions, E (End) represents the ending character of aspects or opinions, S (Signle) represents that the aspect has only one character, and O (Out) represents characters other than aspects or opinions.

[0076] It should be pointed out that each medical record text may contain multiple aspects. In the case of multiple aspects, the opinions of the aspect will be extracted one by one. For each aspect, the medical record text will also contain multiple opinions. At this time, the attention mechanism is used to obtain the final abnormal polarity (such as disease sentiment polarity).

[0077] S206: Perform abnormal polarity identification on the second text feature through a graph neural network.

[0078] Among them, the graph neural network is a neural network that acts directly on the graph structure, retaining the network topology and node content information of the graph, and representing the vertices in the graph as low-dimensional vectors, so that they can be processed using simple machine learning algorithms. The abnormal polarity can indicate whether the object of attention is abnormal. In the medical field, the abnormal polarity can also be called disease emotion polarity, which is used to indicate whether the body or a part of the body that the user is concerned about is sick.

[0079] In one embodiment, the terminal inputs the second text feature into the graph neural network, performs feature processing on the second text feature through the graph neural network, obtains result information output by the last feature processing layer, and then splices the result information with the second text feature to obtain a spliced ​​feature; finally, the splicing result is processed using a fully connected layer to obtain the abnormal polarity of the object of interest.

[0080] For example, assuming that the object of interest is a medical worker or the body of the user, the graph neural network is used to process the shallow object features and shallow abnormal features of the user's body to obtain the result information output by the last feature processing layer, and then the result information, shallow object features and shallow abnormal features are spliced ​​to obtain spliced ​​features; the spliced ​​features are input into the fully connected layer to output the disease emotion polarity of the user's body. The disease emotion polarity includes positive or negative, which is used to indicate whether the user's body is sick.

[0081] S208, generating disease emotion information of the object of interest based on the identified abnormal polarity, object information and abnormal manifestation information.

[0082] In one embodiment, the terminal sorts the identified abnormal polarity, object information and abnormal manifestation information, combines the sorted abnormal polarity, object information and abnormal manifestation information to obtain the disease emotion information of the object of concern, and then reminds or displays it in the form of voice.

[0083] In one embodiment, the terminal can display the disease emotion information on an auxiliary subpage, or display the disease emotion information in a pop-up window or floating layer, or switch to the result display page to display the disease emotion information. Since the disease emotion information includes the abnormal polarity, object information and abnormal manifestation information of the object of interest, before displaying, the terminal can generate a natural sentence text about the object of interest based on the disease emotion information, such as "The patient has a high fever, and the prediction of pharyngitis is positive", where the body is the object information of the object of interest, the high fever is the abnormal manifestation information (i.e., clinical manifestation), and the positive is the abnormal polarity (i.e., disease emotion polarity). Figure 4 shown.

[0084] In the above embodiment, the pre-trained model is trained using medical record samples that mask medical keywords, so that the pre-trained model can learn the ability to identify medical keywords, so that after obtaining the medical record text, the object information and abnormal performance information of the object of interest can be accurately identified from the medical record text, and the object information and abnormal performance information belong to the medical keywords. In addition, the abnormal polarity of the object features and abnormal performance features is identified through the graph neural network, and based on the abnormal polarity, object information and abnormal performance information, the disease sentiment information of the object of interest can be accurately obtained.

[0085] In one embodiment, before determining the disease emotion information, the terminal may first train the pre-trained model and the graph neural network. The specific steps for training the pre-trained model are as follows:

[0086] S502, selecting medical keywords from the medical record sample and using the medical keywords as keyword tags.

[0087] The medical record sample may be a medical record text used in the training process to record the disease symptoms of the sample user. The medical keywords include medical field keywords and abnormal characteristic keywords.

[0088] In one embodiment, the terminal first displays the product page, such as Figure 3 As shown, the medical record text is read from the medical record description subpage of the product page, and the read medical record text is used as a medical record sample; or, the terminal obtains the medical record text from the medical record text database as a medical record sample. For example, an electronic medical record text is obtained from a department of a hospital (such as dermatology) as a medical record sample.

[0089] In another embodiment, the terminal may obtain a medical record image, and then perform text recognition on the medical record image to obtain a medical record text, and use the obtained medical record text as a medical record sample. The medical record image may be an image obtained by scanning a paper medical record.

[0090] In one embodiment, after obtaining the medical record sample, a medical keyword is selected from the medical record sample. The medical keyword is a medical field keyword. The medical field keyword can be a word for a part related to the disease, such as the head, abdomen, and legs. Correspondingly, the specific steps of selecting the medical field keyword include: the terminal extracts the keyword of the target part of speech from each medical record sample respectively; determines the first frequency of the keyword in at least two reading texts in the medical field; determines the second frequency of the keyword in at least two reading texts in other fields; and determines the medical field keyword in the keyword of the target part of speech based on the first frequency and the second frequency.

[0091] The target part of speech may refer to an adjective and a noun. The first frequency may refer to the frequency at which the keyword of the target part of speech appears in at least two reading texts in the medical field. The second frequency may refer to the frequency at which the keyword of the target part of speech appears in at least two reading texts in other fields. The above reading text may refer to an article in the medical field or other fields, or a paragraph or a sentence in an article.

[0092] Before calculating the first frequency and the second frequency, the terminal may first crawl reading texts in the medical field and reading texts in other fields, and then select at least two reading texts from the reading texts in these two fields, such as selecting ten or one hundred reading texts in the medical field and reading texts in other fields.

[0093] For example, the terminal can use the TF-IDF method redefined in this application to extract keywords in the medical field, where TF refers to the frequency of the keywords extracted from the medical record sample appearing in articles or other data in the medical field, and IDF represents the frequency of the keywords appearing in articles in all other fields, thereby obtaining the TF-IDF value. The specific calculation method of the TF-IDF value is as follows:

[0094] TF-IDF=TF×IDF

[0095] In one embodiment, the medical keyword is an abnormal characteristic keyword, which may be a keyword of a clinical manifestation presented when suffering from a disease, such as pain, abdominal distension, and fever. Correspondingly, before selecting the abnormal characteristic keyword, the method may further include:

[0096] The terminal extracts abnormal characteristic words in the medical field from medical data; uses abnormal characteristic words as seeds of abnormal characteristic word samples, and determines the point-by-point mutual information value between the seeds and each abnormal characteristic word to be tested for indicating correlation; for each abnormal characteristic word to be tested, if the sum of the point-by-point mutual information values ​​between the current abnormal characteristic word to be tested and various seeds reaches a preset condition, the current abnormal characteristic word to be tested is used as an abnormal characteristic word sample. Therefore, the above-mentioned step of selecting medical keywords from medical record samples specifically includes the following steps: the terminal extracts abnormal characteristic keywords in the medical record samples based on the abnormal characteristic word samples.

[0097] Among them, the pointwise mutual information (PMI) value is used to represent the correlation between the seed and other abnormal characteristic words to be tested. If the seed w1 is not correlated with the abnormal characteristic word w2 to be tested, then P(w1,w2)=P(w1)P(w2); if the correlation between the seed w1 and the abnormal characteristic word w2 to be tested is greater, then P(w1,w2) is larger than P(w1)P(w2).

[0098]

[0099] w1 represents the seed, w2 represents the abnormal characteristic word to be tested, PMI(w1,w2) represents the point-by-point mutual information value between the seed w1 and the abnormal characteristic word w2 to be tested. When PMI(w1,w2)=0, it means that there is no correlation between the seed w1 and the abnormal characteristic word w2 to be tested; and when PMI(w1,w2)>0, it means that the seed w1 and the abnormal characteristic word w2 to be tested are correlated, and the larger the PMI(w1,w2), the stronger the correlation between the seed w1 and the abnormal characteristic word w2 to be tested.

[0100] Since there can be multiple seeds w1, the point-by-point mutual information values ​​between a certain abnormal characteristic word to be tested and all seeds w1 are summed to obtain the sum value WP, and then it is determined whether WP meets the preset conditions, for example, whether WP is greater than zero. If so, it is determined that the abnormal characteristic word to be tested is positive, that is, the abnormal characteristic word to be tested can be used as an abnormal characteristic word sample. If WP does not meet the preset conditions, for example, WP is less than or equal to zero, it is determined that the abnormal characteristic word to be tested is negative, that is, the abnormal characteristic word to be tested cannot be used as an abnormal characteristic word sample.

[0101] S504, masking medical keywords in the medical record sample.

[0102] The medical keywords are masked, that is, the medical keywords in the medical record samples are masked, such as deleting, blocking or replacing the medical keywords with other keywords. It should be noted that the masked medical keywords can be used as keyword tags.

[0103] In one embodiment, considering that target connecting words (such as transition words and progressive words) play an important role in determining the emotional information of the disease, such as the emotional polarities of the two parts before and after the transition words are generally opposite, while the polarities of the two parts before and after the progressive words are the same, but the degree is deeper, therefore, the integration of target connecting words can improve the accuracy of the emotional information of the disease. Therefore, in addition to masking medical keywords, the terminal can also mask target connecting words on this basis. After masking the medical keywords and target connecting words, the terminal determines the proportion of the masked medical keywords and target connecting words in the medical record sample; if the proportion is less than the preset proportion, the remaining masking number is determined based on the preset proportion and the proportion; in the target medical record sample, the words to be masked are selected according to the remaining masking number for masking.

[0104] Before training the pre-trained model, three categories of words, namely, medical field keywords, abnormal characteristic keywords and target conjunctions, are masked. If the proportion of these three categories of words in the case sample is less than the preset proportion (such as less than 15%), the remaining number of words are randomly selected for masking.

[0105] S506, in the processed medical record samples, identifying the training object information of the object of interest through the pre-training model before training, and identifying the training abnormal performance information when the object of interest presents abnormality.

[0106] The training object information may refer to the object information identified from the medical record samples during the training process, which belongs to the medical field keywords. The training abnormal performance information may refer to the abnormal performance information identified from the medical record samples during the training process, which belongs to the abnormal characteristic keywords.

[0107] In one embodiment, in the processed medical record samples, the terminal uses the pre-trained pre-trained model to train shallow object features and deep object features of the object of interest, as well as shallow abnormal features and deep abnormal features. Then, the pre-trained pre-trained model recognizes the training deep object features of the object of interest, and the fusion features between the training shallow abnormal features and the training deep abnormal features, respectively, to obtain the training object information of the object of interest and the training abnormal performance information when abnormalities are present.

[0108] In another embodiment, if the target connective is also masked during the training process, a predicted connective, that is, a predicted connective, can be obtained, and then the next step of loss value calculation is performed, that is, the loss value between the predicted connective and the connective label is calculated. Specifically, in the processed medical record sample, the terminal uses the target connective as the connective label and masks the target connective to obtain the target medical record sample; in the target medical record sample, the connective is extracted as the predicted connective through the pre-training model before training.

[0109] For example, since the training object information belongs to the medical field keywords, and the training abnormal performance information belongs to the medical field keywords, the medical field keyword prediction, the medical field keyword prediction, and the target connective word prediction are performed on the medical record samples through the pre-training model, so that the training object information, the training abnormal performance information, and the predicted connective words can be obtained, such as Figure 6 shown.

[0110] S508, determining a loss value based on the training object information, the training abnormal performance information and the corresponding keyword label.

[0111] In one embodiment, the terminal performs a subtraction between the training object information and the corresponding keyword label, and performs a subtraction between the training abnormal performance information and the corresponding keyword label, and a loss value can be obtained based on the obtained difference.

[0112] In one embodiment, if the target connective is also masked during the training process, S508 may specifically include: the terminal determines a first difference between the training object information and the corresponding keyword label, a second difference between the training abnormal performance information and the corresponding keyword label, and a third difference between the predicted connective and the connective label; and determines a loss value based on the first difference, the second difference and the third difference.

[0113] The first difference is the prediction loss of the medical field keywords, the second difference is the prediction loss of the abnormal characteristic keywords, and the third difference is the prediction loss of the target connecting words. The first difference, the second difference and the third difference can be calculated based on the same or different loss functions, such as the cross entropy loss function, the square loss function and the exponential loss function.

[0114] After calculating the first difference, the second difference, and the third difference, weighted calculation may be performed on the first difference, the second difference, and the third difference, and then summed to obtain a loss value. The specific calculation formula is as follows:

[0115] L=αL1+βL2+βL3

[0116] Among them, α, β and γ are different weights, L1, L2 and L3 are the first difference, the second difference and the third difference, respectively, that is, the prediction loss of medical field keywords, the prediction loss of abnormal characteristic keywords and the prediction loss of target connecting words.

[0117] S510, adjusting parameters of the pre-training model before training according to the loss value.

[0118] The pre-trained model is trained using masked medical record samples so that the pre-trained model can predict masked medical keywords (i.e., keyword labels) in the medical record samples, thereby integrating relevant knowledge in the medical field into the pre-trained model.

[0119] In one embodiment, the terminal performs back propagation of the calculated loss value in the pre-trained model, calculates the network parameters of each layer in the pre-trained model, and then calculates the gradient of each network parameter, and adjusts the parameters of the pre-trained model according to the gradient.

[0120] In the above embodiment, the pre-trained model is trained using medical record samples in which medical keywords are masked, so that the pre-trained model can learn the ability to recognize medical keywords. After obtaining the medical record text, the object information and abnormal manifestation information of the object of concern can be accurately identified from the medical record text, which is conducive to improving the accuracy of disease sentiment information.

[0121] In one embodiment, regarding the construction and training of a graph neural network, such as Figure 7 The specific steps are as follows:

[0122] S702, performing word segmentation processing on the medical record sample to obtain corresponding word segments.

[0123] In one embodiment, the terminal can perform word segmentation processing on the medical record sample according to the part of speech to obtain each word segment in the medical record sample. The part of speech may include but is not limited to nouns, verbs, adjectives, numerals, quantifiers, pronouns, conjunctions, and auxiliary words.

[0124] In another embodiment, the terminal can perform word segmentation processing on the medical record sample in the form of a phrase or a short phrase to obtain each word segmentation in the medical record sample. For example, the medical record sample is "body temperature is high, it is impossible to exercise", and after word segmentation processing in the form of a phrase or a short phrase, seven word segments, namely "body", "temperature", "yes", "high", "no", "possible" and "exercise" are obtained.

[0125] S704, parsing the medical record sample into a dependency tree with each word as a node.

[0126] The connection relationship between nodes in the dependency tree can be used to represent the dependency relationship between each word.

[0127] S706: Based on the dependency tree, a graph neural network is constructed with the word segment corresponding to the focus object as the root node.

[0128] Among them, the graph neural network built with the corresponding word as the root node (reference Figure 8 ), the weight between its root node and other nodes is used to indicate the distance between the node corresponding to the object of attention and other nodes, and can also indicate the degree of influence of other participles on the participles corresponding to the object of attention. The larger the weight, the smaller the distance between the participles, and the greater the corresponding degree of influence. For example, if the object of attention is the reaction part (such as the throat, lungs or legs) that users and medical workers are concerned about, then the closer the distance between other words and the reaction part, the greater the disease emotion influence of the other words on the reaction part; conversely, the farther the distance between other words and the reaction part, the smaller the disease emotion influence of the other words on the reaction part.

[0129] In one embodiment, the terminal determines the distance between the participle corresponding to the object of interest and other participles; in the graph neural network, weights are assigned to the connection relationships between the root node and other nodes according to the distance.

[0130] S708, extracting the training object features of the object of interest from the medical record samples through the pre-trained model with adjusted parameters, and identifying the shallow abnormal manifestation features when the object of interest presents abnormalities.

[0131] Among them, the pre-trained model includes a first network model and a second network model. Therefore, the first network model with adjusted parameters is used to extract training object features about the object of interest in the medical record sample; the training object features can be shallow object features; through the second network model, shallow abnormal features used to represent abnormalities of the object of interest are extracted from the medical record text.

[0132] S710, through the graph neural network, the fusion features of the training object features and the shallow abnormal performance features are used to identify the abnormal polarity to obtain the predicted abnormal polarity.

[0133] The predicted abnormal polarity may refer to the abnormal polarity predicted by the graph neural network. In the medical field, the abnormal polarity may refer to the disease emotion polarity, specifically, a cold may be negative or positive.

[0134] In one embodiment, the terminal first fuses the training object features and the shallow abnormal performance features to obtain fused features; then identifies the abnormal polarity of the fused features through a graph neural network to obtain predicted abnormal polarity.

[0135] S712: Determine a polarity loss value based on the predicted abnormal polarity and the abnormal polarity label.

[0136] For example, a cross entropy loss function, a square loss function, or an exponential loss function is used to calculate a polarity loss value between the predicted abnormal polarity and the abnormal polarity label.

[0137] S714, adjusting parameters of the graph neural network according to the polarity loss value.

[0138] In one embodiment, the terminal back-propagates the calculated polarity loss value in the graph neural network, calculates the network parameters of each layer in the graph neural network, and then calculates the gradient of each network parameter, and adjusts the parameters of the graph neural network according to the gradient.

[0139] In the above embodiment, by constructing a graph neural network and training the graph neural network using the features extracted by the trained pre-trained model, abnormal polarity can be better identified, which is beneficial to improving the accuracy of disease sentiment information.

[0140] The present application also provides a medical application scenario, which applies the above-mentioned method for determining disease emotion information. Specifically, the application of the method for determining disease emotion information in the application scenario is as follows:

[0141] 1. Task Definition

[0142] In this application, three elements (aspects, opinions, and sentiment) are mainly extracted, where aspects represent keywords in the medical field, such as words related to diseases, such as head, abdomen, and legs. Opinions represent disease sentiment characteristic words, such as pain, bloating, and fever. Sentiment represents the emotional polarity of the disease, such as negative or positive.

[0143] In addition, this application includes two sequence labeling tasks and one sentiment classification. The first sequence labeling task is aspects labeling, and the other sequence labeling task is opinions labeling. Sentiment classification is to classify the disease sentiment polarity of the user's disease site, and the disease sentiment polarity includes {negative, positive}.

[0144] In the annotation process, five types of annotation tags {B, I, E, S, O} are mainly used, among which B (Begin) represents the starting characters of aspects or opinions, I (Inter) represents the middle characters of aspects or opinions, E (End) represents the ending characters of aspects or opinions, and O (Out) represents characters other than aspects or opinions.

[0145] (II) Scheme design

[0146] This application mainly consists of two stages. The main task of the first stage is to incorporate sentiment and medical terminology knowledge into the pre-training model (BERT) through pre-training methods; the main task of the second stage is to perform aspect and opinion annotation based on the pre-training model and graph neural network, and classify the disease sentiment polarity according to the annotated aspects and opinions.

[0147] (1) The first stage is the pre-training stage that integrates multiple features

[0148] In the first stage, the model is integrated with both medical domain knowledge and disease sentiment knowledge through the pre-training mechanism. Medical domain knowledge is specifically represented by domain feature nouns in the electronic medical record text, and disease sentiment knowledge is specifically represented by words with clinical manifestations of the disease.

[0149] First, we mine medical knowledge, that is, we mine key terms in the medical field. We first crawl medical data (i.e., medical data) and use the TF-IDF method to extract key terms in the medical field, such as adjectives and nouns. Since there are only two classification categories, namely, medical field and other fields, this application redefines the meaning of TF and IDF, which is different from the conventional TF-IDF method. TF refers to the probability of a keyword appearing in a text in the medical field, and IDF refers to the reverse document word frequency of a keyword in the medical field in all articles. Finally, the TF-IDF value is calculated, as follows:

[0150] TF-IDF=TF×IDF

[0151] In addition, for the mining of disease sentiment knowledge, we first extract disease sentiment characteristic words in the medical field from the crawled medical data, then filter out duplicate words, and then select representative disease sentiment characteristic words as seeds for disease polarity labeling. Finally, we use the PMI (Pointwise Mutual Information) method to label the remaining disease sentiment characteristic words. The PMI method is as follows:

[0152]

[0153] Finally, the PMI value of a disease sentiment characteristic word and all seeds is obtained, thereby obtaining the WP value of a disease sentiment characteristic, where the WP value is the sum of the PMI values ​​between the disease sentiment characteristic word to be predicted and all seeds. When the WP value is greater than 0, the disease sentiment characteristic word is positive, and when the WP value is less than 0, the disease sentiment characteristic word is negative. During training, the key medical terms and disease sentiment characteristic words mined from the electronic medical record text are masked, and then the pre-trained model is allowed to predict the original key medical terms and disease sentiment characteristic words, thereby integrating relevant knowledge in the medical field and disease sentiment.

[0154] Considering that transition words and progressive words play an important role in disease sentiment analysis tasks, such as the two parts of sentiment polarity before and after transition words are generally opposite, incorporating knowledge of transition words and progressive words will promote disease sentiment analysis. Specifically, commonly used target connecting words (i.e., transition words and progressive words) are pre-specified and set to different label values, allowing the pre-trained model to predict the label value, and these target connecting words in the electronic medical record text will be masked, thereby incorporating relevant knowledge of learning connecting words.

[0155] In summary, the pre-training phase contains three types of vocabulary masks: mask disease sentiment characteristic words, mask medical field key terms, and mask target connecting words. If the proportion of the first three types of masks is less than 15% of the vocabulary, the remaining words are randomly selected for masking, and the loss function is expressed as:

[0156] L=αL1+βL2+γL3

[0157] Among them, L1 represents the prediction loss of disease sentiment characteristic words, L2 represents the prediction loss of disease sentiment characteristic words, and L3 represents the prediction loss of target connection words. α, β and γ are different weights respectively.

[0158] (2) The second stage, namely the fine-grained analysis of disease sentiment

[0159] This phase aims to perform fine-grained disease sentiment analysis tasks through pre-trained models and graph neural network models. The fine-tuning phase model is divided into three parts. The first part is to use the BERT trained in the first phase to extract and annotate aspects in the electronic medical record text. Specifically, the electronic medical record text is input into the pre-trained BERT, and sequence annotation is performed at the output end. The annotation labels are {B, I, E, O, S}, thereby extracting aspects from the electronic medical record text.

[0160] After obtaining aspects, BERT and graph neural networks are then used to extract opinions and classify disease sentiment. Opinion extraction in electronic medical record text is similar to aspect extraction, which is also a sequence labeling task. The difference is that when extracting opinions, the previously extracted aspect knowledge will be integrated, so as to extract opinions corresponding to different aspects in a targeted manner.

[0161] In addition, a graph neural network with aspecst as the root node and distance information is constructed. The electronic medical record text is parsed into a dependency tree and then transformed into a graph neural network with aspect as the root node. For example, "the body temperature is very high and it is impossible to exercise" is parsed into a graph neural network with aspect as the root node. The structure of the graph neural network is as follows: Figure 8 As shown:

[0162] The algorithm of graph neural network is expressed as follows:

[0163]

[0164]

[0165]

[0166] Among them, r represents the relationship embedding representation between nodes i and j, represents the representation of node i in the l+1th layer of the graph neural network, Represents the adjacent nodes of node i at the lth layer, Represents the weight of node j with respect to node i. Relu is the activation function, and W and b are network parameters.

[0167] R-GAT (Relational Graph Attention Networks) can be referenced Fig. 9 , the final representation of each node in the attention network is calculated as follows:

[0168]

[0169]

[0170] It represents the final representation of node i in the l+1th layer of the graph neural network, and relu represents the activation function.

[0171] In addition, considering that the shallow structure of BERT can capture the syntactic and dependency information of sentences, the sixth layer output of BERT is extracted as the shallow representation of the electronic medical record text.

[0172] It should be noted that: (1) BERT for extracting aspects and BERT for extracting opinions share parameters; (2) Each electronic medical record text may contain multiple aspects. In the case of multiple aspects, we will extract the opinions of the aspect one by one; (3) For each aspect, the electronic medical record text will also contain multiple opinions. In this case, the attention mechanism will be used to obtain the final disease sentiment polarity.

[0173] The above embodiments can achieve the following technical effects:

[0174] 1) When predicting the disease emotion polarity, not only the disease emotion result can be given, but also the corresponding evidence can be given, such as the reaction site (i.e. the object of attention), clinical manifestations, and negative or positive, such as (body, high fever, positive). By outputting the clinical manifestations of the reaction site, doctors and patients can more intuitively understand the reasons for the negative or positive results.

[0175] 2) By designing MASK disease sentiment characteristic words, key nouns in the medical field, transition words and progressive words, as well as predicting disease sentiment polarity and other tasks, the model can learn disease-related knowledge and disease sentiment knowledge, thus promoting the prediction of fine-grained sentiment analysis.

[0176] 3) By combining the pre-trained model with the graph attention neural network and fusing the low-order and high-order features of the pre-trained model, the (reaction site, clinical manifestation, negative or positive) triples can be better extracted.

[0177] It should be understood that although Figure 2 , 5 The steps in the flowchart of 7 are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 , 5 At least part of the steps in 7 may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0178] In one embodiment, Fig.10 As shown, a device for determining disease emotion information is provided. The device can adopt a software module or a hardware module, or a combination of the two to become a part of a computer device. The device specifically includes: an acquisition module 1002, a first identification module 1004, a second identification module 1006 and a generation module 1008, wherein:

[0179] The acquisition module 1002 is used to acquire the medical record text;

[0180] The first recognition module 1004 is used to extract the first text feature and the second text feature of the object of interest in the medical record text through a pre-trained model, and determine the object information of the object of interest and the abnormal performance information when the abnormality is present based on the first text feature; the pre-trained model is obtained by training based on the medical record sample with the medical keywords masked; the medical keywords include the object information and the abnormal performance information;

[0181] A second recognition module 1006 is used to identify abnormal polarity of the second text feature through a graph neural network;

[0182] The generation module 1008 is used to generate disease emotion information of the object of interest based on the abnormal polarity, object information and abnormal manifestation information obtained through identification.

[0183] In one embodiment, the pre-trained model includes a first network model and a second network model with shared parameters; the first recognition module 1004 is also used to extract shallow object features and deep object features about the object of interest in the medical record text through the first network model; extract shallow abnormality features and deep abnormality features used to represent abnormalities of the object of interest from the medical record text through the second network model; fuse the deep object features and the fusion features of the shallow abnormality features and the deep abnormality features to obtain the first text features; and fuse the shallow object features and the shallow abnormality features to obtain the second text features.

[0184] In one embodiment, the device further comprises:

[0185] The acquisition module 1002 is also used to display the product page; the product page includes a medical record description subpage and an auxiliary subpage; and the medical record text is read from the medical record description subpage;

[0186] The display module 1010 is used to display the disease emotion information of the concerned object in the auxiliary sub-page.

[0187] In one embodiment, the first text feature includes an object feature and an abnormal performance feature;

[0188] The first identification module 1004 is also used to mark the object information of the object of interest in the medical record text based on the object characteristics, and obtain the object information of the object of interest according to the object information marking; based on the abnormal manifestation characteristics, mark the abnormal manifestation of the object of interest in the medical record text, and obtain the abnormal manifestation information when the object of interest presents an abnormality according to the abnormal manifestation marking.

[0189] In the above embodiment, the pre-trained model is trained using medical record samples that mask medical keywords, so that the pre-trained model can learn the ability to identify medical keywords, so that after obtaining the medical record text, the object information and abnormal performance information of the object of interest can be accurately identified from the medical record text, and the object information and abnormal performance information belong to the medical keywords. In addition, the abnormal polarity of the object features and abnormal performance features is identified through the graph neural network, and based on the abnormal polarity, object information and abnormal performance information, the disease sentiment information of the object of interest can be accurately obtained.

[0190] In one embodiment, the device further comprises:

[0191] The training module 1012 is used to select medical keywords from the medical record samples and use the medical keywords as keyword labels; mask the medical keywords in the medical record samples; identify the training object information of the object of interest in the processed medical record samples through the pre-training pre-training model, and identify the training abnormal performance information when the object of interest presents an abnormality; determine the loss value based on the training object information, the training abnormal performance information and the corresponding keyword labels; and adjust the parameters of the pre-training model according to the loss value.

[0192] In one embodiment, the training module 1012 is also used to use the target connective as a connective label in the processed medical record sample, and mask the target connective to obtain a target medical record sample; in the target medical record sample, extract the connective as the predicted connective through the pre-training model before training; determine the first difference between the training object information and the corresponding keyword label, the second difference between the training abnormal performance information and the corresponding keyword label, and the third difference between the predicted connective and the connective label; determine the loss value based on the first difference, the second difference and the third difference.

[0193] In one embodiment, the training module 1012 is also used to determine the proportion of masked medical keywords and target conjunctions in the medical record sample; if the proportion is less than the preset proportion, the remaining masking number is determined based on the preset proportion and the proportion; in the target medical record sample, the words to be masked are selected according to the remaining masking number for masking processing.

[0194] In one embodiment, the medical keywords include medical field keywords; the training module 1012 is further used to extract keywords of the target part of speech in each medical record sample; determine a first frequency of occurrence of the keywords in at least two reading texts in the medical field; determine a second frequency of occurrence of the keywords in at least two reading texts in other fields; and determine the medical field keywords in the keywords of the target part of speech based on the first frequency and the second frequency.

[0195] In one embodiment, the medical keywords include abnormal characteristic keywords; the training module 1012 is also used to extract abnormal characteristic words in the medical field from medical data; using the abnormal characteristic words as seeds of abnormal characteristic word samples, determining the point-by-point mutual information value between the seeds and each abnormal characteristic word to be tested for indicating the correlation; for each abnormal characteristic word to be tested, if the sum of the point-by-point mutual information values ​​between the current abnormal characteristic word to be tested and various seeds reaches a preset condition, the current abnormal characteristic word to be tested is used as an abnormal characteristic word sample; and extracting abnormal characteristic keywords in the medical record sample based on the abnormal characteristic word samples.

[0196] In the above embodiment, the pre-trained model is trained using medical record samples in which medical keywords are masked, so that the pre-trained model can learn the ability to recognize medical keywords. After obtaining the medical record text, the object information and abnormal manifestation information of the object of concern can be accurately identified from the medical record text, which is conducive to improving the accuracy of disease sentiment information.

[0197] In one embodiment, the training module 1012 is also used to perform word segmentation processing on the medical record sample to obtain the corresponding word segmentation; parse the medical record sample into a dependency tree with each word segmentation as a node; based on the dependency tree, construct a graph neural network with the word segmentation corresponding to the focus object as the root node.

[0198] In one embodiment, the training module 1012 is also used to determine the distance between the segmentation corresponding to the object of interest and other segmentations; in the graph neural network, weights are assigned to the connection relationship between the root node and other nodes according to the distance.

[0199] In one of the embodiments, the training module is also used to extract training object features of the object of interest from the medical record sample through a pre-trained model with adjusted parameters, and to identify shallow abnormal manifestation features when the object of interest presents abnormalities; to perform abnormal polarity identification on the fusion features of the training object features and the shallow abnormal manifestation features through a graph neural network to obtain predicted abnormal polarity; to determine a polarity loss value based on the predicted abnormal polarity and the abnormal polarity label; and to adjust the parameters of the graph neural network according to the polarity loss value.

[0200] In the above embodiment, by constructing a graph neural network and training the graph neural network using the features extracted by the trained pre-trained model, abnormal polarity can be better identified, which is beneficial to improving the accuracy of disease sentiment information.

[0201] For the specific limitations of the device for determining disease emotion information, please refer to the limitations of the method for determining disease emotion information above, which will not be repeated here. Each module in the above-mentioned device for determining disease emotion information can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0202] In one embodiment, a computer device is provided. The computer device may be a server or a terminal. Taking the computer device as a terminal as an example, its internal structure diagram may be as follows: Fig.12As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for determining disease emotion information is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0203] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0204] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0205] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0206] In one embodiment, a computer program product is provided, the computer program product comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the above-mentioned method embodiments.

[0207] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0208] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0209] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for determining disease emotion information, characterized in that: The method comprises: Obtain medical record text; Through the pre-training model, the first text feature and the second text feature about the object of interest in the medical record text are extracted, and based on the first text feature, the object information of the object of interest and the abnormal manifestation information when the abnormality occurs are determined; the object of interest is the human body or a specific part of the human body, the object information is the name of the object of interest or a keyword describing the object of interest, and the abnormal manifestation information is used to describe the external manifestation of the object of interest when the abnormality occurs; the pre-training model is trained based on medical record samples with medical keywords masked; the medical keywords include the object information and the abnormal manifestation information; the first text feature includes the deep object feature of the object of interest, the shallow abnormal feature and the fusion feature between the deep abnormal feature, and the second text feature includes the shallow object feature and the shallow abnormal feature of the object of interest; By using a graph neural network, abnormal polarity recognition is performed on the second text feature to obtain abnormal polarity indicating whether the object of interest is abnormal; The abnormal polarity obtained by combination identification, the object information and the abnormal manifestation information are obtained to obtain the disease emotion information of the object of interest.

2. The method according to claim 1, characterized in that The pre-trained model includes a first network model and a second network model that share parameters; extracting the first text feature and the second text feature about the object of interest in the medical record text through the pre-trained model includes: Extracting shallow object features and deep object features about the object of interest in the medical record text through the first network model; Extracting shallow abnormal features and deep abnormal features for indicating abnormalities of the object of interest from the medical record text through the second network model; fusing the deep object feature and the fusion feature of the shallow abnormality feature and the deep abnormality feature to obtain the first text feature; The shallow object feature and the shallow anomaly feature are fused to obtain the second text feature.

3. The method according to claim 1, characterized in that The obtaining of medical record text includes: Display a product page; the product page includes a medical record description subpage and an auxiliary subpage; Reading medical record text from the medical record description subpage; After generating the disease emotion information of the concerned object, the method further includes: Display the disease emotion information of the object of interest in the auxiliary sub-page; or display the disease emotion information in a floating layer or pop-up window on the upper layer of the product page; or switch to the result display page to display the disease emotion information.

4. The method according to claim 1, characterized in that: The first text features include object features and abnormal performance features; The object information of the object of interest and abnormal performance information when an abnormality is present determined based on the first text feature include: Based on the object feature, marking the object information of the object of interest in the medical record text, and obtaining the object information of the object of interest according to the object information marking; Based on the abnormal manifestation feature, the abnormal manifestation of the object of concern is marked in the medical record text, and the abnormal manifestation information when the object of concern presents abnormality is obtained according to the abnormal manifestation marking.

5. The method according to any one of claims 1 to 4, characterized in that: The training based on the medical record samples with medical keywords masked includes: Selecting medical keywords from the medical record sample and using the medical keywords as keyword tags; Masking the medical keywords in the medical record sample; In the processed medical record samples, the training object information of the object of interest is identified by the pre-trained model before training, and the training abnormal performance information when the object of interest presents abnormality is identified; Determine a loss value based on the training object information, the training abnormal performance information and the corresponding keyword label; Parameters of the pre-trained model are adjusted according to the loss value.

6. The method according to claim 5, characterized in that The method further comprises: In the processed medical record sample, the target connective word is used as a connective word label, and the target connective word is masked to obtain a target medical record sample; In the target medical record sample, extracting connectives as predicted connectives by using the pre-trained model before training; The determining of the loss value based on the training object information, the training abnormal performance information and the keyword label includes: Determining a first difference between the training object information and the corresponding keyword label, a second difference between the training abnormal performance information and the corresponding keyword label, and a third difference between the predicted connective and the connective label; A loss value is determined based on the first difference, the second difference, and the third difference.

7. The method according to claim 6, characterized in that The method further comprises: Determine the proportion of the masked medical keywords and the target conjunctions in the medical record sample; If the proportion is less than the preset proportion, determining the remaining coverage number based on the preset proportion and the proportion; In the target medical record sample, words to be masked are selected according to the remaining masking number for masking processing.

8. The method according to claim 5, characterized in that The medical keywords include keywords in the medical field; the medical keywords selected from the medical record samples include: Extracting keywords of the target part of speech from each of the medical record samples; Determining the first frequency of occurrence of the keyword in at least two reading texts in the medical field; determining a second frequency of occurrence of the keyword in at least two reading texts in other fields; The medical field keyword is determined from the keywords of the target part of speech based on the first frequency and the second frequency.

9. The method according to claim 5, characterized in that The medical keywords include abnormal characteristic keywords, which are keywords of clinical manifestations presented when suffering from a disease; the method further includes: Extract abnormal characteristic words in the medical field from medical data; Taking the abnormal characteristic word as the seed of the abnormal characteristic word sample, determining a point-by-point mutual information value for indicating correlation between the seed and each abnormal characteristic word to be tested; For each abnormal characteristic word to be tested, if the sum of the point-by-point mutual information values ​​between the current abnormal characteristic word to be tested and each of the seeds reaches a preset condition, the current abnormal characteristic word to be tested is used as the abnormal characteristic word sample; The selecting of medical keywords from the medical record sample includes: Abnormal characteristic keywords in the medical record sample are extracted based on the abnormal characteristic word sample.

10. The method according to claim 5, characterized in that The method further comprises: Performing word segmentation processing on the medical record sample to obtain corresponding word segmentations; Parsing the medical record sample into a dependency tree with each of the word segments as a node; Based on the dependency tree, a graph neural network is constructed with the word segmentation corresponding to the object of interest as the root node.

11. The method according to claim 10, characterized in that The method further comprises: Determine the distance between the segmentation corresponding to the object of interest and the other segmentations; In the graph neural network, weights are assigned to the connection relationships between the root node and other nodes according to the distance.

12. The method according to claim 10, characterized in that The method further comprises: Extracting training object features of the object of interest from the medical record sample through the pre-trained model after adjusting parameters, and identifying shallow abnormal manifestation features when the object of interest presents abnormality; By using the graph neural network, abnormal polarity recognition is performed on the fusion features of the training object features and the shallow abnormal performance features to obtain predicted abnormal polarity; determining a polarity loss value based on the predicted abnormal polarity and the abnormal polarity label; Parameters of the graph neural network are adjusted according to the polarity loss value.

13. A device for determining disease emotion information, characterized in that: The device comprises: The acquisition module is used to obtain the medical record text; A first recognition module is used to extract a first text feature and a second text feature about an object of interest in the medical record text through a pre-trained model, and determine object information of the object of interest and abnormal manifestation information when an abnormality occurs based on the first text feature; the object of interest is a human body or a specific part of the human body, the object information is the name of the object of interest or a keyword describing the object of interest, and the abnormal manifestation information is used to describe the external manifestation of the object of interest when an abnormality occurs; the pre-trained model is trained based on medical record samples with medical keywords masked; the medical keywords include the object information and the abnormal manifestation information; the first text feature includes deep object features of the object of interest, shallow abnormal features and fusion features between deep abnormal features, and the second text feature includes shallow object features and shallow abnormal features of the object of interest; A second recognition module is used to perform abnormal polarity recognition on the second text feature through a graph neural network to obtain abnormal polarity indicating whether the object of interest is abnormal; A generation module is used to combine the abnormal polarity obtained by identification, the object information and the abnormal manifestation information to obtain the disease emotion information of the object of concern.

14. The device according to claim 13, characterized in that The pre-trained model includes a first network model and a second network model that share parameters; The first recognition module is further used to extract shallow object features and deep object features about the object of interest in the medical record text through the first network model; and to extract shallow abnormal features and deep abnormal features used to represent abnormalities of the object of interest from the medical record text through the second network model; fusing the deep object feature and the fusion feature of the shallow abnormality feature and the deep abnormality feature to obtain the first text feature; The shallow object feature and the shallow anomaly feature are fused to obtain the second text feature.

15. The device according to claim 13, characterized in that The device also includes: The acquisition module is also used to display a product page; the product page includes a medical record description subpage and an auxiliary subpage; and the medical record text is read from the medical record description subpage; A display module is used to display the disease emotion information of the object of interest in the auxiliary sub-page; or to display the disease emotion information in a floating layer or pop-up window on the upper layer of the product page; or to switch to the result display page to display the disease emotion information.

16. The device according to claim 13, characterized in that The first text features include object features and abnormal performance features; The first identification module is also used to mark the object information of the object of interest in the medical record text based on the object characteristics, and obtain the object information of the object of interest according to the object information marking; based on the abnormal manifestation characteristics, mark the abnormal manifestation of the object of interest in the medical record text, and obtain the abnormal manifestation information when the object of interest presents an abnormality according to the abnormal manifestation marking.

17. The device according to any one of claims 13 to 16, characterized in that The device also includes: A training module is used to select medical keywords from the medical record samples and use the medical keywords as keyword labels; mask the medical keywords in the medical record samples; identify the training object information of the object of interest and the training abnormal performance information when the object of interest presents an abnormality through the pre-training model before training in the processed medical record samples; determine a loss value based on the training object information, the training abnormal performance information and the corresponding keyword labels; and adjust the parameters of the pre-training model before training according to the loss value.

18. The device according to claim 17, characterized in that The training module is further used to use the target connective as a connective label in the processed medical record sample and mask the target connective to obtain a target medical record sample; extract connectives as predicted connectives in the target medical record sample through the pre-training model before training; determine a first difference between the training object information and the corresponding keyword label, a second difference between the training abnormal performance information and the corresponding keyword label, and a third difference between the predicted connective and the connective label; A loss value is determined based on the first difference, the second difference, and the third difference.

19. The device according to claim 18, characterized in that The training module is also used to determine the proportion of the masked medical keywords and the target connecting words in the medical record sample; if the proportion is less than the preset proportion, the remaining masking number is determined based on the preset proportion and the proportion; in the target medical record sample, the words to be masked are selected according to the remaining masking number for masking processing.

20. The device according to claim 17, characterized in that The medical keywords include keywords in the medical field; The training module is also used to extract keywords of the target part of speech from each of the medical record samples; determine a first frequency of occurrence of the keywords in at least two reading texts in the medical field; determine a second frequency of occurrence of the keywords in at least two reading texts in other fields; and determine the medical field keywords in the keywords of the target part of speech based on the first frequency and the second frequency.

21. The device according to claim 17, characterized in that The medical keywords include abnormal characteristic keywords, which are keywords of clinical manifestations presented when suffering from a disease; The training module is also used to extract abnormal characteristic words in the medical field from medical data; taking the abnormal characteristic words as seeds of the abnormal characteristic word samples, determining the point-by-point mutual information value between the seeds and each abnormal characteristic word to be tested for indicating the correlation; for each abnormal characteristic word to be tested, if the sum of the point-by-point mutual information values ​​between the current abnormal characteristic word to be tested and each seed reaches a preset condition, the current abnormal characteristic word to be tested is used as the abnormal characteristic word sample; Abnormal characteristic keywords in the medical record sample are extracted based on the abnormal characteristic word sample.

22. The device according to claim 17, characterized in that The training module is further used to perform word segmentation processing on the medical record sample to obtain corresponding word segments; parse the medical record sample into a dependency tree with each word segment as a node; Based on the dependency tree, a graph neural network is constructed with the word segmentation corresponding to the object of interest as the root node.

23. The device according to claim 22, characterized in that The training module is also used to determine the distance between the segmentation corresponding to the object of interest and the other segmentations; in the graph neural network, a weight is assigned to the connection relationship between the root node and the other nodes according to the distance.

24. The device according to claim 22, characterized in that The training module is also used to extract the training object features of the object of interest from the medical record sample through the pre-training model after adjusting the parameters, and to identify the shallow abnormal manifestation features when the object of interest presents an abnormality; through the graph neural network, perform abnormal polarity identification on the fusion features of the training object features and the shallow abnormal manifestation features to obtain the predicted abnormal polarity; determine the polarity loss value based on the predicted abnormal polarity and the abnormal polarity label; and adjust the parameters of the graph neural network according to the polarity loss value.

25. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.

26. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

27. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.