Method and device for training model, method and device for predicting sub-diagnosis intention
By training a predictive model of patient consultation intent, the system automatically identifies and outputs questions that patients need to answer during the waiting process, thus solving the problem of wasted time during the waiting process and improving the efficiency and accuracy of diagnosis and treatment.
Patent Information
- Application Number
- CN202211205506.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-09-29
AI Technical Summary
In the existing technology, medical staff cannot effectively solve the problem of patients wasting time while waiting for their appointments.
By training a predictive model of patient consultation intent, the model identifies named entities in historical medical records, acquires training data, and continues until the model converges. It then predicts the questions patients will need to ask during the waiting process and automatically outputs them to the patients, reducing the need for medical staff to ask repetitive questions.
It improves the utilization rate of patients' waiting time, reduces the time wasted by medical staff and patients during the consultation process, avoids the omission of key information, and improves the efficiency and accuracy of diagnosis and treatment.
Smart Images

Figure CN115757710B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the medical technical field, and in particular to a method and device for training a prediction model of a sub-diagnosis intention, and a method and device for predicting a sub-diagnosis intention cascaded by a main diagnosis intention. BACKGROUND
[0002] When a patient has a problem, he / she usually goes to a hospital for diagnosis. However, in many cases, there are many patients going to the hospital for diagnosis, and each patient spends a lot of time in the process of diagnosis, which leads to the fact that the later patients need to wait in line. Thus, the inventor finds that in the actual diagnosis process, the patient needs to spend a lot of time waiting before entering the examination room for diagnosis, and the time spent by the patient in the waiting room is wasted. In addition, the inventor also finds that for multiple patients who need to be diagnosed in the same examination room, although these patients have individualized disease characteristics, the medical staff needs to ask each patient some questions in the process of diagnosing each patient respectively. For example, after the patient enters the examination room for diagnosis, the medical staff usually asks the patient some questions about the disease in order to understand the patient's disease, and manually writes the patient's medical record according to the patient's oral answer, and processes the patient's disease according to the patient's oral answer. It can be seen that after starting the diagnosis, the process of asking the patient some questions about the disease and the process of the patient answering the questions orally will waste the time of the medical staff and the patient. In addition, in the case of many questions and much content answered by the patient, the medical staff may miss some key content answered by the patient orally, which may lead to missed diagnosis or misdiagnosis. SUMMARY
[0003] The present application shows a method and device for training a prediction model of a sub-diagnosis intention, and a method and device for predicting a sub-diagnosis intention cascaded by a main diagnosis intention.
[0004] In a first aspect, a method for training a prediction model of a sub-diagnosis intention is shown, the method comprising: obtaining existing real historical medical record texts; identifying a main named entity corresponding to a main diagnosis intention and sub named entities corresponding to sub diagnosis intentions cascaded with the main diagnosis intention in the historical medical record texts based on the main diagnosis intention and the sub diagnosis intentions cascaded with the main diagnosis intention which are set in advance and related to a disease condition; obtaining training data corresponding to the main diagnosis intention according to the historical medical record texts; wherein the training data comprises sample data and labeled data; the labeled data comprises: actual recognition states for indicating whether part of the sub diagnosis intentions are recognized as sub named entities; the sample data comprises: the main named entity corresponding to the main diagnosis intention, the sub diagnosis intentions cascaded with the main diagnosis intention, actual recognition states for indicating whether the sub diagnosis intentions other than the part of the sub diagnosis intentions are recognized as sub named entities, and virtual recognition states for indicating that the part of the sub diagnosis intentions are not recognized as sub named entities; training a prediction model using the training data until network parameters in a network structure of the prediction model converge, to obtain the prediction model of the sub diagnosis intention.
[0005] In a second aspect, a method for predicting sub diagnosis intentions cascaded with a main diagnosis intention is shown, the method comprising: obtaining a main named entity corresponding to a target main diagnosis intention of a patient; the target main diagnosis intention comprising a main diagnosis intention from a plurality of main diagnosis intentions set in advance and related to a disease condition; obtaining a plurality of sub diagnosis intentions cascaded with the target main diagnosis intention; obtaining current input states of whether the plurality of sub diagnosis intentions have been input with corresponding sub named entities by the patient; predicting sub diagnosis intentions to be input with sub named entities by the patient from the sub diagnosis intentions cascaded with the target main diagnosis intention and not yet input with sub named entities by the patient according to the main named entity, the plurality of sub diagnosis intentions, and the current input states of whether each of the sub diagnosis intentions has been input with a corresponding sub named entity by the patient; and outputting the sub diagnosis intentions to be input with sub named entities by the patient.
[0006] In a third aspect, the application shows a device for training a prediction model of a sub-question diagnosis intent, the device comprising: a first obtaining module configured to obtain existing real historical medical record texts; an identifying module configured to identify, based on a main question diagnosis intent related to a disease condition and a plurality of sub-question diagnosis intents cascaded with the main question diagnosis intent, a main named entity corresponding to the main question diagnosis intent and a plurality of sub-named entities corresponding to the sub-question diagnosis intents cascaded with the main question diagnosis intent in the historical medical record texts; a second obtaining module configured to obtain training data corresponding to the main question diagnosis intent according to the historical medical record texts; wherein the training data comprises sample data and labeled data; the labeled data comprises an actual identification state indicating whether part of the sub-question diagnosis intents are identified sub-named entities; and the sample data comprises the main named entity corresponding to the main question diagnosis intent, the plurality of sub-question diagnosis intents cascaded with the main question diagnosis intent, an actual identification state of whether sub-question diagnosis intents other than the part of the sub-question diagnosis intents are identified sub-named entities, and a virtual identification state of whether the part of the sub-question diagnosis intents are not identified sub-named entities; and a training module configured to train a prediction model using the training data until network parameters in a network structure of the prediction model converge, thereby obtaining the prediction model of the sub-question diagnosis intent.
[0007] In a fourth aspect, the application shows a device for predicting sub-question diagnosis intents cascaded with a main question diagnosis intent, the device comprising: a third obtaining module configured to obtain a main named entity corresponding to a target main question diagnosis intent of a patient; the target main question diagnosis intent comprising a main question diagnosis intent from a plurality of main question diagnosis intents related to a disease condition and set in advance; a fourth obtaining module configured to obtain a plurality of sub-question diagnosis intents cascaded with the target main question diagnosis intent; a fifth obtaining module configured to obtain current input states of whether the plurality of sub-question diagnosis intents have been input corresponding sub-named entities by the patient; a prediction module configured to predict, based on the main named entity, the plurality of sub-question diagnosis intents, and the current input states of whether each of the sub-question diagnosis intents has been input a corresponding sub-named entity by the patient, a sub-question diagnosis intent to be input a sub-named entity by the patient from among the sub-question diagnosis intents cascaded with the target main question diagnosis intent and not yet input a sub-named entity by the patient; and an output module configured to output the sub-question diagnosis intent to be input a sub-named entity by the patient.
[0008] In a fifth aspect, the application shows an electronic device, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute a method as shown in any one of the preceding aspects.
[0009] In a sixth aspect, the present application shows a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method shown in any one of the preceding aspects.
[0010] In a seventh aspect, the present application shows a computer program product, when the instructions in the computer program product are executed by a processor of an electronic device, the electronic device can execute the method shown in any one of the preceding aspects.
[0011] In the present application, an existing real historical medical record text is obtained. Based on a previously set main inquiry intention related to the disease and a plurality of sub-inquiry intentions cascaded by the main inquiry intention, a main named entity corresponding to the main inquiry intention and a sub-named entity corresponding to the sub-inquiry intention cascaded by the main inquiry intention are identified in the historical medical record text. Training data corresponding to the main inquiry intention is obtained according to the historical case text. The training data includes sample data and labeled data. The labeled data includes: an actual recognition state indicating whether part of the sub-inquiry intentions is recognized as a sub-named entity. The sample data includes: the main named entity corresponding to the main inquiry intention, the plurality of sub-inquiry intentions cascaded by the main inquiry intention, the actual recognition state of the sub-inquiry intention except the part of the sub-inquiry intentions being recognized as a sub-named entity, and the virtual recognition state of the part of the sub-inquiry intentions not being recognized as a sub-named entity. The prediction model is trained using the training data until the network parameters in the network structure of the prediction model converge, and the prediction model of the sub-inquiry intention is obtained.
[0012] In this way, during the process of the patient waiting for diagnosis, the main named entity corresponding to the target main inquiry intention of the patient can be obtained. The target main inquiry intention includes the main inquiry intention in the plurality of main inquiry intentions related to the disease set in advance. The plurality of sub-inquiry intentions cascaded by the target main inquiry intention are obtained. The current input state of whether the plurality of sub-inquiry intentions cascaded by the target main inquiry intention have been input by the patient with the corresponding sub-named entity is obtained. According to the main named entity, the plurality of sub-inquiry intentions, and the current input state of whether each sub-inquiry intention has been input by the patient with the corresponding sub-named entity, the sub-inquiry intention to be input by the patient with the sub-named entity is predicted among the sub-inquiry intentions cascaded by the target main inquiry intention and not yet input by the patient with the sub-named entity. The sub-inquiry intention to be input by the patient with the sub-named entity is output.
[0013] Through the present application, the patient can input the target main examination intention main named entity related to the disease in the electronic device during the waiting process. When the electronic device obtains the target main examination intention main named entity input by the patient, the trained sub-examination intention prediction model can be used to predict the sub-examination intention of the sub-named entity input by the patient in the target main examination intention cascaded multiple sub-examination intentions, and output the sub-examination intention of the sub-named entity input by the patient in the target main examination intention cascaded multiple sub-examination intentions, so that the patient can input the sub-named entity in the electronic device. The output sub-examination intention can be used to automatically output the question about the patient's disease in advance during the patient's waiting process, collect the answers input by the patient, facilitate the automatic recording of the patient's disease, avoid missing the answers input by the patient, and avoid misdiagnosis or missed diagnosis. Secondly, after the patient enters the examination stage, the medical staff can directly obtain the answers input by the patient, without the need for the medical staff to ask the patient in real time, which can save the time of the medical staff and the patient during the examination process. BRIEF DESCRIPTION OF DRAWINGS
[0014] Figure 1 is a scenario schematic diagram of the present application.
[0015] Figure 2 is a step flow chart of a method for training a sub-examination intention prediction model of the present application.
[0016] Figure 3 is a structure schematic diagram of a sub-examination intention prediction model of the present application.
[0017] Figure 4 is a structure schematic diagram of a sub-examination intention prediction model of the present application.
[0018] Figure 5 is a structure schematic diagram of a sub-examination intention prediction model of the present application.
[0019] Figure 6 is a step flow chart of a method for predicting a sub-examination intention cascaded by a main examination intention of the present application.
[0020] Figure 7 is a structure block diagram of a device for training a sub-examination intention prediction model of the present application.
[0021] Figure 8 is a structure block diagram of a device for predicting a sub-examination intention cascaded by a main examination intention of the present application.
[0022] Figure 9 is a structure block diagram of a device of the present application. DETAILED DESCRIPTION
[0023] In order to make the above objectives, features and advantages of the present application more apparent, further specific embodiments will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] The present application is exemplified in a scenario, referring to Figure 1 , which includes medical staff, patients and electronic devices, which can include terminals, etc., and the terminals can include desktop computers, laptops, tablets or mobile phones, etc. For example, the terminal can be a terminal that can be used by the patient, etc. The terminal can be located in a medical institution.
[0025] The patient can go to the medical institution for consultation. The process of the patient waiting for consultation in the medical institution can be regarded as waiting for consultation. During the process of the patient waiting for consultation, the patient can enter a consultation page in the electronic device, and the consultation page includes a plurality of main consultation intents related to the disease set in advance. The patient can select a main consultation intent from the plurality of main consultation intents, and input a corresponding main named entity to the selected main consultation intent. The electronic device can obtain the main consultation intent selected by the patient and the main named entity corresponding to the input main consultation intent. Based on the trained prediction model of the sub-consultation intent, the sub-consultation intent to be input by the patient in the plurality of sub-consultation intents cascaded by the main consultation intent is predicted, and the sub-consultation intent to be input by the patient in the plurality of sub-consultation intents cascaded by the main consultation intent is output. The patient can input the sub-named entity corresponding to the sub-consultation intent in the electronic device, and the patient can input the sub-named entity corresponding to the sub-consultation intent in the electronic device. After a plurality of rounds of prediction of the sub-consultation intent, the electronic device can obtain the main named entity corresponding to the selected main consultation intent and the sub-named entity corresponding to the plurality of rounds of predicted sub-consultation intents cascaded by the selected main consultation intent. Then, the electronic device can transmit the main named entity corresponding to the selected main consultation intent and the sub-named entity corresponding to the plurality of rounds of predicted sub-consultation intents cascaded by the selected main consultation intent to the medical staff, so that the medical staff can understand the basic situation of the patient according to the main named entity corresponding to the selected main consultation intent and the sub-named entity corresponding to the plurality of rounds of predicted sub-consultation intents cascaded by the selected main consultation intent, and the patient can be more comprehensively and accurately diagnosed and treated.
[0026] The patient can use the time during the waiting process for automatic consultation, thereby improving the utilization rate of the patient's time, and also, the medical staff does not need to spend a lot of time in the process of consultation to repeatedly ask the patient, and the consultation question can be automatically recorded, and the key information is avoided to be omitted.
[0027] Referring to Figure 2The method for training the prediction model of the sub-question diagnosis intention is applied to an electronic device, and the electronic device includes a terminal or a server, etc. The terminal can include a desktop computer, a notebook computer, a tablet computer, or a mobile phone, etc. The server can include a cloud, etc. The method includes the following steps.
[0028] In step S101, an existing real historical medical record text is obtained.
[0029] In the present application, the existing real historical medical record text includes a medical record text of a patient manually written by medical staff in an electronic medical record system in a historical process, etc. The expression manner of the medical record text of the patient manually written by the medical staff in the electronic medical record system is often consistent with the expression manner of a clinical medical record text, etc. Alternatively, the historical text segment in the existing real historical medical record text includes a text segment selected from the medical record text of the patient manually written by the medical staff in the historical process in the electronic medical record system, etc., such as an artificially selected text segment. The expression manner of the artificially selected text segment as a whole is often more standard and more comprehensive, etc. The obtained historical medical record text can be one or multiple. In the case of multiple historical medical record texts, the multiple historical medical record texts can be historical medical record texts of different patients, etc.
[0030] In step S102, based on a main question diagnosis intention related to a disease and a plurality of sub-question diagnosis intentions cascaded by the main question diagnosis intention, a main named entity corresponding to the main question diagnosis intention and a sub-named entity corresponding to the sub-question diagnosis intention cascaded by the main question diagnosis intention are identified in the historical medical record text.
[0031] The identified sub-named entity corresponding to the sub-question diagnosis intention cascaded by the main question diagnosis intention can include the following cases: the identified sub-named entity corresponding to all sub-question diagnosis intentions cascaded by the main question diagnosis intention, or the identified sub-named entity corresponding to part of the sub-question diagnosis intentions cascaded by the main question diagnosis intention.
[0032] In the present application, a technician can design an intent system in advance, which includes a main inquiry intent related to a disease and a plurality of sub-inquiry intents cascaded by the main inquiry intent, and sets the main inquiry intent related to the disease and the plurality of sub-inquiry intents cascaded by the main inquiry intent in an electronic device. The main inquiry intent related to the disease can be multiple, the multiple main inquiry intents are different, and each main inquiry intent is respectively cascaded with multiple sub-inquiry intents. The sub-inquiry intents respectively cascaded by different main inquiry intents do not overlap, or sometimes, the sub-inquiry intents respectively cascaded by different main inquiry intents also have a small range of overlap. The main inquiry intent can include a health problem that the patient hopes to solve through inquiry, for example, can include the user's clinical manifestations, examination findings, test findings, (already suffered) diseases, (already received) operation treatment and (already received) drug treatment, etc.
[0033] In one example, Table 1 below shows an example of a plurality of main inquiry intents and sub-inquiry intents respectively cascaded by each main inquiry intent, but is not as a limitation to the protection scope of the present application.
[0034] Table 1
[0035]
[0036]
[0037]
[0038] For example, assuming that the historical medical record text includes: “The patient had neck pain and right upper limb pain without obvious inducement half a month ago, the pain was aggravated after cooling or labor, and the symptoms were relieved after proper rest”.
[0039] As shown in Table 2 below, the main named entity corresponding to the main inquiry intent “clinical manifestations” identified in the historical medical record text is “pain”, the sub-named entity corresponding to the sub-inquiry intent “specific position” cascaded by the sub-inquiry intent “clinical manifestations” cascaded by the main inquiry intent “clinical manifestations” identified is “neck”, the sub-named entity corresponding to the sub-inquiry intent “occurrence time” cascaded by the sub-inquiry intent “clinical manifestations” cascaded by the main inquiry intent “clinical manifestations” identified is “half a month”, the sub-named entity corresponding to the sub-inquiry intent “inducing factor” cascaded by the sub-inquiry intent “clinical manifestations” cascaded by the main inquiry intent “clinical manifestations” identified is “no inducement”, the sub-named entity corresponding to the sub-inquiry intent “aggravating factor” cascaded by the sub-inquiry intent “clinical manifestations” cascaded by the main inquiry intent “clinical manifestations” identified is “cooling and labor”, and the sub-named entity corresponding to the sub-inquiry intent “relieving factor” cascaded by the sub-inquiry intent “clinical manifestations” cascaded by the main inquiry intent “clinical manifestations” identified is “rest”.
[0040] Table 2
[0041] Clinical presentation Specific location Time of onset Precipitating factors Aggravating factors Alleviating factors Pain Neck Half-moon No precipitating factors Cold, exertion Rest
[0042] In the present application, a medical record text based NER (Named Entity Recognition) model can be used to identify the main named entity corresponding to the main inquiry intention and the sub named entity corresponding to the sub inquiry intention cascaded by the main inquiry intention in the historical medical record text.
[0043] In an embodiment, a medical record text based NER model and the like can be trained in advance. For example, at least one training text can be obtained, the training text including sample text and labeled text, the sample text including a text segment in an existing real medical record text, and the labeled text including the main named entity corresponding to the main inquiry intention and the sub named entity corresponding to the sub inquiry intention labeled in the text segment in the existing real medical record text, and the like. The existing real medical record text in the sample text can be different from the historical medical record text in step S101. Then the initialized NER model can be trained using the at least one training text until the parameters in the NER model converge, thereby obtaining the medical record text based NER model and the like.
[0044] In this way, in the present step, the historical text segment can be input into the medical record text based NER model, so that the medical record text based NER model identifies the main named entity corresponding to the main inquiry intention and the sub named entity corresponding to the sub inquiry intention cascaded by the main inquiry intention in the historical medical record text, and outputs the main named entity corresponding to the main inquiry intention and the sub named entity corresponding to the sub inquiry intention cascaded by the main inquiry intention in the historical medical record text.
[0045] After that, the electronic device can obtain the main named entity corresponding to the main inquiry intention and the sub named entity corresponding to the sub inquiry intention cascaded by the main inquiry intention in the historical medical record text output by the medical record text based NER model.
[0046] In step S103, training data corresponding to the main inquiry intention is obtained according to the historical medical record text.
[0047] The training data includes sample data and labeled data. The labeled data includes an actual recognition state indicating whether part of the sub inquiry intentions in the plurality of sub inquiry intentions is recognized as a sub named entity. The sample data includes a main named entity corresponding to the main inquiry intention, a plurality of sub inquiry intentions cascaded by the main inquiry intention, an actual recognition state of whether the sub inquiry intention except the part of the sub inquiry intentions in the plurality of sub inquiry intentions is recognized as a sub named entity, and a virtual recognition state of whether the part of the sub inquiry intentions is not recognized as a sub named entity.
[0048] If the actual recognition state of the partial sub-question diagnosis intent is that the sub-named entity is recognized in the historical medical record text, the virtual recognition state of the partial sub-question diagnosis intent is that the sub-named entity is not recognized in the historical medical record text. Or, if the actual recognition state of the partial sub-question diagnosis intent is that the sub-named entity is not recognized in the historical medical record text, the virtual recognition state of the partial sub-question diagnosis intent is still that the sub-named entity is not recognized in the historical medical record text.
[0049] After step S102 of identifying the main named entity corresponding to the main question diagnosis intent and the sub-named entity corresponding to the sub-question diagnosis intent cascaded by the main question diagnosis intent in the historical medical record text is performed, it can be known which main question diagnosis intent corresponding to the main named entity is recognized in the historical medical record text, and which sub-question diagnosis intent corresponding to the sub-named entity is recognized in the historical medical record text.
[0050] That is, each sub-question diagnosis intent cascaded by the main question diagnosis intent has its own actual recognition state of whether the corresponding sub-named entity is recognized in the historical medical record text. The actual recognition state includes “the corresponding sub-named entity is not recognized in the historical medical record text (not recognized)” or “the corresponding sub-named entity is recognized in the historical medical record text (recognized)”.
[0051] For example, in the above example, the sub-named entity corresponding to part of the sub-question diagnosis intents in Table 1 cascaded by the main question diagnosis intent “clinical manifestations” is recognized in the historical medical record text, and the corresponding sub-named entity of other sub-question diagnosis intents in Table 1 cascaded by the main question diagnosis intent “clinical manifestations”, such as “degree” and “onset characteristics”, is not recognized.
[0052] Wherein, the actual recognition state of whether each sub-question diagnosis intent cascaded by the main question diagnosis intent “clinical manifestations” is recognized in the historical medical record text can be seen from the following Table 3.
[0053] Table 3
[0054]
[0055] T represents that the corresponding sub-question diagnosis intent is recognized in the historical medical record text (i.e., recognized), and F represents that the corresponding sub-question diagnosis intent is not recognized in the historical medical record text (i.e., not recognized).
[0056] After obtaining the actual recognition states of whether each sub-question intention of the main question intention "clinical manifestation" cascade is recognized as a sub-named entity, part of the sub-question intentions can be selected (e.g., randomly selected, etc.) from the sub-question intentions of the main question intention "clinical manifestation" cascade. The actual recognition state of whether part of the sub-question intentions is recognized as a sub-named entity can be used as labeled data. Then, a virtual recognition state of whether part of the sub-question intentions is not recognized as a sub-named entity can be obtained. For example, if the actual recognition state of part of the sub-question intentions is "recognized", the virtual recognition state of part of the sub-question intentions is "not recognized". Or, if the actual recognition state of part of the sub-question intentions is "not recognized", the virtual recognition state of part of the sub-question intentions is still "not recognized". After that, the actual recognition state of whether the main named entity corresponding to the main question intention, the plurality of sub-question intentions of the main question intention cascade, and the sub-question intentions other than part of the sub-question intentions in the plurality of sub-question intentions are recognized as sub-named entities can be obtained. The actual recognition state of whether the main named entity corresponding to the main question intention, the plurality of sub-question intentions of the main question intention cascade, and the sub-question intentions other than part of the sub-question intentions in the plurality of sub-question intentions are recognized as sub-named entities and the virtual recognition state of whether part of the sub-question intentions are recognized as sub-named entities can be combined as sample data.
[0057] For example, in one example, as shown in Table 4 below, the selected part of the sub-question intention includes "specific site" and "onset characteristics", so that the virtual recognition state of part of the sub-question intention "specific site" is not recognized as a sub-named entity, and the virtual recognition state of part of the sub-question intention "onset characteristics" is not recognized as a sub-named entity. M represents the virtual recognition state of "the corresponding sub-question intention is not recognized as a sub-named entity in the historical medical record text".
[0058] Table 4
[0059]
[0060] In the examples shown in Tables 3 and 4, the labeled data includes: the actual recognition state of the sub-question diagnosis intent "specific position" in which a sub-named entity is recognized, and the actual recognition state of the sub-question diagnosis intent "onset characteristics" in which a sub-named entity is not recognized. The sample data includes: the main-named entity "pain" corresponding to the main-question diagnosis intent "clinical manifestations", and a plurality of sub-question diagnosis intents cascaded by the main-question diagnosis intent "clinical manifestations": occurrence time, occurrence cause, degree, specific position, specific orientation, specific feeling, specific performance, target object, distribution and level, onset characteristics, onset frequency, single duration, interval time, inducing or aggravating factor, and relieving factor. The actual recognition state of occurrence time in which a sub-named entity is recognized, the actual recognition state of occurrence cause in which a sub-named entity is recognized, the actual recognition state of degree in which a sub-named entity is not recognized, the actual recognition state of specific orientation in which a sub-named entity is not recognized, the actual recognition state of specific feeling in which a sub-named entity is not recognized, the actual recognition state of specific performance in which a sub-named entity is not recognized, the actual recognition state of target object in which a sub-named entity is not recognized, the actual recognition state of distribution and level in which a sub-named entity is not recognized, the actual recognition state of onset frequency in which a sub-named entity is not recognized, the actual recognition state of single duration in which a sub-named entity is not recognized, the actual recognition state of interval time in which a sub-named entity is not recognized, the actual recognition state of inducing or aggravating factor in which a sub-named entity is recognized, and the actual recognition state of relieving factor in which a sub-named entity is recognized, the virtual recognition state of the sub-question diagnosis intent "specific position" in which a sub-named entity is not recognized, and the virtual recognition state of the sub-question diagnosis intent "onset characteristics" in which a sub-named entity is not recognized.
[0061] In step S104, the prediction model is trained using the training data until the network parameters in the network structure of the prediction model converge, to obtain the prediction model of the sub-question diagnosis intent.
[0062] In an embodiment of the present application, the present step can be implemented through the following flow, comprising:
[0063] 1041、According to the sample data, in the sub-question diagnosis intents in which the virtual recognition state or the actual recognition state is that a sub-named entity is not recognized, determine the training sub-question diagnosis intent, which is the sub-question diagnosis intent to be input with a sub-named entity predicted by the prediction model.
[0064] In an embodiment, the main named entity can be subjected to feature extraction to obtain main features of the main named entity, the plurality of sub-question diagnosis intents can be subjected to feature extraction respectively to obtain sub-features of each sub-question diagnosis intent, the actual recognition state of whether the sub-question diagnosis intent other than the sub-question diagnosis intent is recognized as a sub-named entity can be subjected to feature extraction to obtain actual state features of the actual recognition state of whether the sub-question diagnosis intent other than the sub-question diagnosis intent is recognized as a sub-named entity, and the virtual recognition state of the part of sub-question diagnosis intents not being recognized as a sub-named entity can be subjected to feature extraction to obtain virtual state features of the virtual recognition state of the part of sub-question diagnosis intents not being recognized as a sub-named entity.
[0065] Then the main features, the sub-features, the actual state features and the virtual state features can be fused to obtain fusion features; for example, for any one of the sub-question diagnosis intents of the main question diagnosis intent cascade, in the case that the sub-question diagnosis intent is the sub-question diagnosis intent other than the sub-question diagnosis intent, the main features, the sub-features of the sub-question diagnosis intent and the actual state features of the actual recognition state of whether the sub-question diagnosis intent is recognized as a sub-named entity are aggregated to obtain the aggregated features corresponding to the sub-question diagnosis intent; or, in the case that the sub-question diagnosis intent is the part of sub-question diagnosis intents, the main features, the sub-features of the sub-question diagnosis intent and the virtual state features of the virtual recognition state of the sub-question diagnosis intent not being recognized as a sub-named entity are aggregated to obtain the aggregated features corresponding to the sub-question diagnosis intent; the same operation is performed for each of the other sub-question diagnosis intents of the main question diagnosis intent cascade. Then the aggregated features corresponding to the plurality of sub-question diagnosis intents respectively can be subjected to self-attention fusion to obtain the fusion features. For example, the aggregated features corresponding to the plurality of sub-question diagnosis intents respectively are combined to obtain combined features; the combined features are subjected to self-attention expansion to obtain the fusion features.
[0066] Then the training sub-question diagnosis intent can be predicted in the sub-question diagnosis intent of the plurality of sub-question diagnosis intents whose virtual recognition state or actual recognition state is not recognized as a sub-named entity according to the fusion features.
[0067] 1042. Determine a loss value according to the loss function, the sub-question diagnosis intent to be input with the sub-named entity, the part of sub-question diagnosis intents and the labeled data.
[0068] 1043. Adjust the network parameters according to the loss value.
[0069] In an embodiment of the present application, referring to Figure 3 , the network structure of the prediction model at least includes a feature extraction network, a feature fusion network and a prediction network. The input end of the prediction model of the sub-question diagnosis intent includes the input end of the feature extraction network. The output end of the feature extraction network is connected with the input end of the feature fusion network. The output end of the feature fusion network is connected with the input end of the prediction network. The output end of the prediction model of the sub-question diagnosis intent includes the output end of the prediction network.
[0070] The feature extraction network is configured to: perform feature extraction on the main named entity to obtain main features of the main named entity; perform feature extraction on each of the plurality of sub-question diagnosis intents to obtain sub-question diagnosis intent features of each of the plurality of sub-question diagnosis intents; perform feature extraction on actual recognition states of each of the plurality of sub-question diagnosis intents other than the partial sub-question diagnosis intents whether the sub-question diagnosis intent is recognized as the sub-named entity to obtain actual state features of the actual recognition states of each of the plurality of sub-question diagnosis intents other than the partial sub-question diagnosis intents whether the sub-question diagnosis intent is recognized as the sub-named entity; and perform feature extraction on virtual recognition states of the partial sub-question diagnosis intents whether the sub-question diagnosis intent is not recognized as the sub-named entity to obtain virtual state features of the virtual recognition states of the partial sub-question diagnosis intents whether the sub-question diagnosis intent is not recognized as the sub-named entity.
[0071] The feature fusion network is configured to: fuse the main features of the main named entity, the sub-question diagnosis intent features of each of the plurality of sub-question diagnosis intents, the actual state features of the actual recognition states of each of the plurality of sub-question diagnosis intents other than the partial sub-question diagnosis intents whether the sub-question diagnosis intent is recognized as the sub-named entity, and the virtual state features of the virtual recognition states of the partial sub-question diagnosis intents whether the sub-question diagnosis intent is not recognized as the sub-named entity to obtain fusion features.
[0072] The prediction network is configured to: predict, according to the fusion features, a sub-question diagnosis intent to be input with the sub-named entity from among the plurality of sub-question diagnosis intents of the main question diagnosis intent, the virtual recognition state or the actual recognition state of the sub-question diagnosis intent being not recognized as the sub-named entity.
[0073] In an embodiment, the feature extraction network includes a main named entity layer, a sub-named entity layer, and a state layer. The main named entity layer is configured to perform feature extraction on the main named entity to obtain main features of the main named entity. The sub-named entity layer is configured to perform feature extraction on each of the plurality of sub-question diagnosis intents to obtain sub-question diagnosis intent features of each of the plurality of sub-question diagnosis intents. The state layer is configured to perform feature extraction on actual recognition states of each of the plurality of sub-question diagnosis intents other than the partial sub-question diagnosis intents whether the sub-question diagnosis intent is recognized as the sub-named entity to obtain actual state features of the actual recognition states of each of the plurality of sub-question diagnosis intents other than the partial sub-question diagnosis intents whether the sub-question diagnosis intent is recognized as the sub-named entity, and perform feature extraction on virtual recognition states of the partial sub-question diagnosis intents whether the sub-question diagnosis intent is not recognized as the sub-named entity to obtain virtual state features of the virtual recognition states of the partial sub-question diagnosis intents whether the sub-question diagnosis intent is not recognized as the sub-named entity.
[0074] In an embodiment of the present application, the feature extraction network comprises a convolutional neural network (CNN) or an LSTM (Long Short-Term Memory) or the like. The sub-named entity layer and the state layer comprise an encoding network or the like. The feature fusion network can comprise a transformer network or an attention network or the like.
[0075] The prediction network can comprise a Softmax or a fully connected layer or the like.
[0076] In another embodiment of the present application, referring to Figure 4 , the feature fusion network comprises a feature aggregation sub-network and a feature fusion sub-network. The feature aggregation sub-network is configured to: for any one of the sub-diagnosis intents of the main diagnosis intent cascade, in a case where the sub-diagnosis intent is a sub-diagnosis intent other than the partial sub-diagnosis intents among the plurality of sub-diagnosis intents, aggregate the main feature of the main named entity, the sub-feature of the sub-diagnosis intent, and the actual state feature of the actual recognition state of whether the sub-diagnosis intent is recognized as a sub-named entity, to obtain the aggregation feature corresponding to the sub-diagnosis intent. Or, in a case where the sub-diagnosis intent is a partial sub-diagnosis intent, aggregate the main feature, the sub-feature of the sub-diagnosis intent, and the virtual state feature of the virtual recognition state of the sub-diagnosis intent not being recognized as a sub-named entity, to obtain the aggregation feature corresponding to the sub-diagnosis intent. The same is true for each of the other sub-diagnosis intents of the main diagnosis intent cascade. The feature fusion sub-network is configured to perform self-attention fusion on the aggregation features corresponding to the plurality of sub-diagnosis intents of the main diagnosis intent cascade respectively, to obtain the fusion feature. The input end of the feature fusion network comprises the input end of the feature aggregation sub-network. The output end of the feature aggregation sub-network is connected to the input end of the feature fusion sub-network. The output end of the feature fusion network comprises the output end of the feature fusion sub-network. The feature aggregation sub-network can comprise a fully connected layer or the like, configured to sequentially connect the plurality of features to be aggregated end to end (for example, in a case where the plurality of features to be aggregated are all vectors, the plurality of vectors can be sequentially connected end to end to obtain a new vector), or add the plurality of features to be aggregated (for example, in a case where the plurality of features to be aggregated are all vectors and have the same dimension, the elements at the same positions of the vectors can be added to obtain a new vector).
[0077] In another embodiment of the present application, referring to Figure 5The feature fusion sub-network includes a merging layer and a self-attention layer. The merging layer can include a full connection layer, etc. The merging layer is used at least for merging the aggregated features corresponding to the plurality of sub-question diagnosis intents of the main question diagnosis intent, respectively, to obtain merged features (for example, in the case that each of the aggregated features corresponding to the plurality of sub-question diagnosis intents is a vector and each vector has the same dimension, each vector can be combined into a matrix, etc.). The self-attention layer is used at least for performing self-attention expansion on the merged features to obtain the fusion features. The input end of the feature fusion sub-network includes the input end of the merging layer. The output end of the merging layer is connected to the input end of the attention layer. The output end of the feature fusion sub-network includes the output end of the attention layer.
[0078] In an embodiment of the present application, the attention layer includes a first conversion sub-layer, an interaction sub-layer, and a second conversion sub-layer. The first conversion sub-layer is used at least for converting the merged features into three or more different intermediate features. The interaction sub-layer is used at least for obtaining an interaction feature about self-attention under the common action of the three or more different intermediate features. The second conversion sub-layer is used at least for converting the interaction feature into the fusion feature. The interaction sub-layer includes an attention block and an expansion block. The attention block is used for obtaining an attention feature according to two or more intermediate features of the three or more different intermediate features. For example, the two or more intermediate features are multiplied to obtain a floating point number, and the floating point number is normalized (for example, the floating point number is input into a softmax to normalize the floating point number) to obtain the attention feature. The expansion block is used for performing feature expansion on the intermediate features other than the two or more intermediate features of the three or more different intermediate features according to the attention feature to obtain the interaction feature. For example, the intermediate features other than the two or more intermediate features are multiplied with the attention feature to obtain another floating point number. The other floating point number is converted into a matrix form of the fusion feature by the second conversion sub-layer. The first conversion sub-layer can include a forward neural network, such as a convolution layer or a full connection layer, etc. The second conversion sub-layer can include a forward neural network, such as a convolution layer or a full connection layer, etc.
[0079] In the present application, the prediction model of the sub-question diagnosis intent finally trained can be applied to different application scenarios. Therefore, in this step, the network structure of the prediction model of the sub-question diagnosis intent can be generated based on actual requirements, and the network structure of the prediction model of the sub-question diagnosis intent suitable for different application scenarios is different.
[0080] In the present application, the network structure of the prediction model of the sub-question diagnosis intent is illustrated by way of example as shown in FIG. 8, but is not intended to limit the protection scope of the present application. Figures 3-5
[0081] Since the prediction model of the sub-diagnosis intent is trained using the training data obtained according to the existing real historical medical record text, the existing real historical medical record text conforms to the actual diagnosis situation, so that the prediction result of the trained prediction model of the sub-diagnosis intent can be more in line with the actual diagnosis situation, thereby improving the accuracy of the prediction result and the like.
[0082] In the present application, after obtaining the network structure of the prediction model of the sub-diagnosis intent, the network parameters in the network structure can be trained according to the training data corresponding to the main diagnosis intent. In the training process, the main named entity corresponding to the main diagnosis intent, the plurality of sub-diagnosis intents cascaded by the main diagnosis intent, the actual recognition state of whether the sub-diagnosis intents except part of the sub-diagnosis intents in the plurality of sub-diagnosis intents are recognized as sub-named entities, and the virtual recognition state of whether the part of the sub-diagnosis intents are recognized as sub-named entities are all input into the feature extraction network of the prediction model of the sub-diagnosis intent.
[0083] Among them, the feature extraction network can extract features of the main named entity to obtain main features of the main named entity, extract features of the plurality of sub-diagnosis intents respectively to obtain sub-features of each sub-diagnosis intent, extract features of the actual recognition state of whether the sub-diagnosis intents except part of the sub-diagnosis intents in the plurality of sub-diagnosis intents are recognized as sub-named entities to obtain actual state features of the actual recognition state of whether the sub-diagnosis intents except part of the sub-diagnosis intents in the plurality of sub-diagnosis intents are recognized as sub-named entities, and extract features of the virtual recognition state of whether the part of the sub-diagnosis intents are not recognized as sub-named entities to obtain virtual state features of the virtual recognition state of whether the part of the sub-diagnosis intents are not recognized as sub-named entities. Then the main features of the main named entity, the sub-features of each sub-diagnosis intent, the actual state features of the actual recognition state of whether the sub-diagnosis intents except part of the sub-diagnosis intents in the plurality of sub-diagnosis intents are recognized as sub-named entities, and the virtual state features of the virtual recognition state of whether the part of the sub-diagnosis intents are not recognized as sub-named entities are input into the feature fusion network.
[0084] The feature fusion network can fuse the main features of the main named entity, the sub-features of each sub-diagnosis intent, the actual state features of the actual recognition state of whether the sub-diagnosis intents except part of the sub-diagnosis intents in the plurality of sub-diagnosis intents are recognized as sub-named entities, and the virtual state features of the virtual recognition state of whether the part of the sub-diagnosis intents are not recognized as sub-named entities to obtain fusion features, and then input the fusion features into the prediction network.
[0085] The prediction network can predict, according to the fusion features, the sub-diagnosis intent to be input into the sub-named entity among the sub-diagnosis intents cascaded by the main diagnosis intent, the virtual recognition state or the actual recognition state of which is not recognized as a sub-named entity.
[0086] The network parameters in the network structure of the prediction model of the sub-question diagnosis intent can be adjusted by means of a loss function and based on whether the output sub-question diagnosis intent to be input into the sub-named entity is a partial sub-question diagnosis intent and an actual recognition state of the labeled data indicating whether the partial sub-question diagnosis intent in the plurality of sub-question diagnosis intents is recognized as a sub-named entity in the historical medical record text.
[0087] In the process of training, the prediction model of the sub-question diagnosis intent can be used to process the sample data to obtain a sub-question diagnosis intent to be input into a sub-named entity in a sub-question diagnosis intent in which the virtual recognition state or the actual recognition state is not recognized as a sub-named entity; determine a loss value according to a loss function, a determination result of whether the sub-question diagnosis intent to be input into the sub-named entity is a partial sub-question diagnosis intent, and an actual recognition state of whether the partial sub-question diagnosis intent is recognized as a sub-named entity; and adjust the network parameters according to the loss value.
[0088] Loss = loss_function(fout(E mask ), Label mask ).
[0089] Wherein, E mask represents a determination result of whether the output sub-question diagnosis intent to be input into the sub-named entity is a partial sub-question diagnosis intent, Label mask represents an actual recognition state of the labeled data indicating whether the partial sub-question diagnosis intent in the plurality of sub-question diagnosis intents is recognized as a sub-named entity in the historical medical record text, and loss_function() represents a loss function.
[0090] In the present application, in the historical medical record text, one main named entity may be recognized, which is a main named entity corresponding to a main question diagnosis intent, or a plurality of different main named entities may be recognized, which correspond to respective main question diagnosis intents. In the historical medical record text, whenever a main named entity corresponding to a main question diagnosis intent is recognized, at least one sub-named entity corresponding to a sub-question diagnosis intent in a plurality of sub-question diagnosis intents cascaded by the main question diagnosis intent can be recognized in the historical medical record text.
[0091] Thus, for any one main naming entity recognized in the historical medical record text in step S102, training data corresponding to the main inquiry intention corresponding to the main naming entity can be obtained in step S103. The same is true for each other main naming entity recognized in the historical medical record text in step S102. Thus, training data corresponding to each main inquiry intention can be obtained respectively. Thus, the network parameters in the network structure can be trained respectively using the training data corresponding to each main inquiry intention until the network parameters in the state recognition model converge, so that the training can be completed, and the prediction model of the sub-inquiry intention can be obtained.
[0092] In the present application, the existing real historical medical record text is obtained. Based on the previously set main inquiry intention related to the disease and the plurality of sub-inquiry intentions cascaded by the main inquiry intention, the main naming entity corresponding to the main inquiry intention and the sub-naming entity corresponding to the sub-inquiry intention cascaded by the main inquiry intention are recognized in the historical medical record text. According to the historical case text, training data corresponding to the main inquiry intention is obtained. The training data includes sample data and labeled data. The labeled data includes: an actual recognition state indicating whether part of the sub-inquiry intentions in the plurality of sub-inquiry intentions is recognized as a sub-naming entity. The sample data includes: the main naming entity corresponding to the main inquiry intention, the plurality of sub-inquiry intentions cascaded by the main inquiry intention, the actual recognition state of whether the sub-inquiry intention other than the part of the sub-inquiry intentions in the plurality of sub-inquiry intentions is recognized as a sub-naming entity, and the virtual recognition state of the part of the sub-inquiry intentions not being recognized as a sub-naming entity. The prediction model is trained using the training data until the network parameters in the network structure of the prediction model converge, and the prediction model of the sub-inquiry intention is obtained.
[0093] Thus, it is supported that during the process of the patient waiting for diagnosis, the main naming entity corresponding to the target main inquiry intention of the patient can be obtained. The target main inquiry intention includes the main inquiry intention in the plurality of main inquiry intentions related to the disease set in advance. The plurality of sub-inquiry intentions cascaded by the target main inquiry intention is obtained. The current input state of whether each sub-inquiry intention cascaded by the target main inquiry intention has been input by the patient with the corresponding sub-naming entity is obtained. According to the main naming entity, the plurality of sub-inquiry intentions, and the current input state of whether each sub-inquiry intention has been input by the patient with the corresponding sub-naming entity, the sub-inquiry intention to be input by the patient with the sub-naming entity is predicted among the sub-inquiry intentions cascaded by the target main inquiry intention and not yet input by the patient with the sub-naming entity. The sub-inquiry intention to be input by the patient with the sub-naming entity is output.
[0094] Through the application, the patient can input the target main diagnosis intention naming entity related to the disease in the electronic device during the waiting process. When the electronic device obtains the target main diagnosis intention naming entity input by the patient, the trained sub-diagnosis intention prediction model can be used to predict the sub-diagnosis intention input by the patient in the target main diagnosis intention cascaded sub-diagnosis intention, and output the sub-diagnosis intention input by the patient in the target main diagnosis intention cascaded sub-diagnosis intention. The patient can input the sub-diagnosis intention in the electronic device, so as to use the time of the patient during the waiting process, automatically output the question about the patient's disease in advance, collect the answer input by the patient, facilitate the automatic recording of the patient's disease, avoid missing the answer input by the patient, and avoid misdiagnosis or missed diagnosis. Secondly, after the patient enters the diagnosis stage, the medical staff can directly obtain the answer input by the patient, without the need for the medical staff to ask the patient in real time, so as to save the time of the medical staff and the patient during the diagnosis process.
[0095] After obtaining the sub-diagnosis intention prediction model, the sub-diagnosis intention prediction model can be used online. For example, during the patient's waiting process, when the patient inputs a main diagnosis intention naming entity, the trained sub-diagnosis intention prediction model can be used to predict the sub-diagnosis intention input by the patient in the main diagnosis intention cascaded sub-diagnosis intention, and output the sub-diagnosis intention input by the patient in the main diagnosis intention cascaded sub-diagnosis intention, so that the patient can input the sub-diagnosis intention in the electronic device.
[0096] For example, referring to Figure 6 , a method for predicting a sub-diagnosis intention cascaded by a main diagnosis intention is shown. The method is applied to an electronic device, and the electronic device includes a terminal and the like. The terminal can include a desktop computer, a notebook computer, a tablet computer, a mobile phone, and the like. For example, the terminal can be a terminal used by the patient. The terminal can be located in a medical institution. The method includes the following steps.
[0097] In step S201, the target main diagnosis intention naming entity corresponding to the patient is obtained. The target main diagnosis intention includes a main diagnosis intention in the plurality of main diagnosis intentions related to the disease.
[0098] In the process of waiting for the patient, the electronic device can enter an inquiry page, the inquiry page including a plurality of main inquiry intents related to the disease set in advance, the patient can select at least one main inquiry intent from the plurality of main inquiry intents, and input a corresponding main named entity for each selected main inquiry intent. The electronic device can obtain the at least one main inquiry intent selected by the patient and the main named entity corresponding to each target main inquiry intent input by the patient.
[0099] For the main named entity corresponding to any target main inquiry intent, the following steps S202-S205 can be performed respectively.
[0100] In step S202, a plurality of sub-inquiry intents cascaded with the target main inquiry intent are obtained.
[0101] Each main inquiry intent related to the disease set in advance is cascaded with a respective sub-inquiry intent. In this way, when the main inquiry intent is determined, the sub-inquiry intent cascaded with the main inquiry intent can also be determined.
[0102] In step S203, the current input state of whether each sub-inquiry intent cascaded with the target main inquiry intent has been input by the patient with a corresponding sub-named entity is obtained.
[0103] The current input state of whether the sub-inquiry intent has been input by the patient with a corresponding sub-named entity includes that the sub-inquiry intent has been input by the patient with a corresponding sub-named entity (input) or the sub-inquiry intent has not been input by the patient with a corresponding sub-named entity (not input).
[0104] Wherein, in the process of waiting for the patient, after obtaining the main named entity corresponding to the target main inquiry intent input by the patient, the sub-inquiry intent to be input by the patient with a sub-named entity has not been predicted for the patient, at this time, the current input state of each sub-inquiry intent cascaded with the target main inquiry intent is that the corresponding sub-named entity has not been input by the patient.
[0105] For example, as shown in Table 5 below, assuming that the main named entity corresponding to the target main inquiry intent input by the patient is “cough”, the target main inquiry intent is “clinical manifestations”, at this time, the current input state of each sub-inquiry intent cascaded with the target main inquiry intent “clinical manifestations” is that the corresponding sub-named entity has not been input by the patient. At this time, the current input state of each sub-inquiry intent cascaded with the target main inquiry intent is F, F indicating that the corresponding sub-inquiry intent has not been input by the patient with a corresponding sub-named entity.
[0106] Table 5
[0107]
[0108] In step S204, according to the main named entity, the plurality of sub-question diagnosis intents, and whether each sub-question diagnosis intent has been input by the patient with the corresponding sub-named entity, the sub-question diagnosis intent to be input by the patient with the sub-named entity is predicted from the sub-question diagnosis intents cascaded with the target main question diagnosis intent and not yet input by the patient with the sub-named entity.
[0109] In an embodiment of the present application, the prediction model of the sub-question diagnosis intent can be used to predict the sub-question diagnosis intent to be input by the patient with the sub-named entity from the sub-question diagnosis intents cascaded with the target main question diagnosis intent and not yet input by the patient with the sub-named entity according to the main named entity, the plurality of sub-question diagnosis intents, and whether each sub-question diagnosis intent has been input by the patient with the corresponding sub-named entity, and the specific process includes:
[0110] 2041, feature extraction is performed on the main named entity to obtain main features of the main named entity. Feature extraction is performed on the plurality of sub-question diagnosis intents respectively to obtain sub-features of each sub-question diagnosis intent. Feature extraction is performed on the current input state of whether each sub-question diagnosis intent has been input by the patient with the corresponding sub-named entity respectively to obtain current state features of each sub-question diagnosis intent.
[0111] In the present application, the feature extraction network in the sub-question diagnosis intent prediction model can be used to perform feature extraction on the main named entity to obtain main features of the main named entity, perform feature extraction on the plurality of sub-question diagnosis intents respectively to obtain sub-features of each sub-question diagnosis intent, and perform feature extraction on the current input state of whether each sub-question diagnosis intent has been input by the patient with the corresponding sub-named entity respectively to obtain current state features of each sub-question diagnosis intent.
[0112] For details, please refer to the description in step S104, which will not be described here.
[0113] 2042, the main features of the main named entity, the sub-features of each sub-question diagnosis intent, and the current state features of each sub-question diagnosis intent are fused to obtain fused features.
[0114] The feature fusion network in the sub-question diagnosis intent prediction model can be used to fuse the main features of the main named entity, the sub-features of each sub-question diagnosis intent, and the current state features of each sub-question diagnosis intent to obtain the fused features. The feature fusion network includes a feature aggregation sub-network and a feature fusion sub-network.
[0115] Thus, in the process of fusing the main feature of the main named entity, the sub-feature of each sub-question diagnosis intent, and the current state feature of each sub-question diagnosis intent to obtain the fusion feature, the following process can be implemented, including: for any one sub-question diagnosis intent of the target main question diagnosis intent cascade, the main feature of the main named entity, the sub-feature of the sub-question diagnosis intent, and the current state feature of the sub-question diagnosis intent can be aggregated using a feature aggregation sub-network to obtain the aggregation feature corresponding to the sub-question diagnosis intent. The same is true for each other sub-question diagnosis intent of the target main question diagnosis intent cascade. Then, the aggregation features respectively corresponding to the plurality of sub-question diagnosis intents are fused using a feature fusion sub-network to obtain the fusion feature. For example, the aggregation features respectively corresponding to the plurality of sub-question diagnosis intents are merged to obtain a merged feature; and the merged feature is expanded using self-attention to obtain the fusion feature. The feature fusion sub-network includes a merging layer and a self-attention layer, so that the aggregation features respectively corresponding to the plurality of sub-question diagnosis intents can be merged using the merging layer to obtain the merged feature, and then the merged feature is expanded using the self-attention layer to obtain the fusion feature.
[0116] For details, please refer to the description in step S104, which will not be described here.
[0117] 2043、According to the fusion feature, among the sub-question diagnosis intents of the target main question diagnosis intent cascade that have not yet been input by the patient sub-named entity, the sub-question diagnosis intent to be input by the patient sub-named entity is predicted.
[0118] The sub-question diagnosis intent to be input by the patient sub-named entity can be predicted according to the fusion feature among the sub-question diagnosis intents of the target main question diagnosis intent cascade that have not yet been input by the patient sub-named entity by means of a prediction network in the sub-question diagnosis intent prediction model. For details, please refer to the description in step S104, which will not be described here.
[0119] In step S205, the sub-question diagnosis intent to be input by the patient sub-named entity is output.
[0120] In an embodiment of the present application, a page can be displayed on the screen of the electronic device, prompting the sub-question diagnosis intent to be input by the patient sub-named entity, and prompting the patient to input the corresponding sub-named entity for the displayed sub-question diagnosis intent. For example, assuming that the predicted sub-question diagnosis intent to be input by the patient sub-named entity is “occurrence time”, the predicted sub-question diagnosis intent to be input by the patient sub-named entity “occurrence time” can be output for the patient to input the sub-named entity for the “occurrence time” of “cough” (i.e., to input when the clinical manifestation of “cough” starts).
[0121] In the present application, after outputting the sub-question diagnosis intent to which the patient inputs the sub-naming entity, the patient can input the sub-naming entity to the output sub-question diagnosis intent in the electronic device. When the electronic device obtains the sub-naming entity input by the patient to the output sub-question diagnosis intent, the current input state of whether the output question diagnosis intent has been input by the patient with the sub-naming entity can be changed from not input by the patient with the sub-naming entity to input by the patient with the sub-naming entity, so as to improve the accuracy of predicting the sub-question diagnosis intent to which the patient inputs the sub-naming entity in the next round.
[0122] In the present application, in the process of queuing for diagnosis, the main naming entity corresponding to the target main question diagnosis intent of the patient can be obtained. The target main question diagnosis intent includes a main question diagnosis intent in the plurality of question diagnosis intents related to the disease which is set in advance. A plurality of sub-question diagnosis intents cascaded with the target main question diagnosis intent are obtained. The current input state of whether each of the plurality of sub-question diagnosis intents cascaded with the target main question diagnosis intent has been input by the patient with the corresponding sub-naming entity is obtained. According to the main naming entity, the plurality of sub-question diagnosis intents, and the current input state of whether each of the plurality of sub-question diagnosis intents has been input by the patient with the corresponding sub-naming entity, a sub-question diagnosis intent to which the patient inputs a sub-naming entity is predicted from the sub-question diagnosis intents cascaded with the target main question diagnosis intent and not yet input by the patient with the sub-naming entity. The sub-question diagnosis intent to which the patient inputs the sub-naming entity is output.
[0123] Through the present application, in the process of queuing for diagnosis, the patient can input the main naming entity of the target main question diagnosis intent related to the disease which is set in advance in the electronic device. When the electronic device obtains the main naming entity of the target main question diagnosis intent input by the patient, the sub-question diagnosis intent to which the patient inputs the sub-naming entity from the plurality of sub-question diagnosis intents cascaded with the target main question diagnosis intent can be predicted based on the trained prediction model of the sub-question diagnosis intent, and the sub-question diagnosis intent to which the patient inputs the sub-naming entity from the plurality of sub-question diagnosis intents cascaded with the target main question diagnosis intent is output. Therefore, the patient can input the sub-naming entity to the output sub-question diagnosis intent in the electronic device. The time during queuing for diagnosis can be used to automatically output the question about the disease of the patient in advance, and the answer input by the patient to the question can be collected, so as to facilitate the automatic recording of the disease of the patient, avoid missing the answer input by the patient, and avoid misdiagnosis or missed diagnosis.
[0124] Wherein, during the process of the patient waiting, multiple rounds of prediction can be performed in sequence, each round of prediction performing the process of steps S201-S205, and each round of prediction can be understood as predicting the sub-diagnosis intent of the patient inputting the sub-named entity among the target main-diagnosis intent cascade of the patient and the sub-diagnosis intent of the current sub-named entity not yet input by the patient.
[0125] In addition, in an embodiment, before obtaining the main-named entity corresponding to the target main-diagnosis intent of the patient, it is determined whether the total number of the sub-diagnosis intents of the patient inputting the sub-named entity output reaches a preset number; in the case that the total number of the sub-diagnosis intents of the patient inputting the sub-named entity output does not reach the preset number, step S201 of obtaining the main-named entity corresponding to the target main-diagnosis intent of the patient is performed again. Or, in the case that the total number of the sub-diagnosis intents of the patient inputting the sub-named entity output reaches the preset number, the main-named entity corresponding to the target main-diagnosis intent of the patient is no longer obtained, that is, the sub-diagnosis intent of the patient inputting the sub-named entity is no longer predicted for the patient. In this way, it can be avoided that the patient needs to input the sub-named entity for too many sub-diagnosis intents, thereby causing a bad experience for the patient. The preset number can include 5, 8 or 10, etc., which can be determined according to actual conditions, and the present application does not limit this.
[0126] In addition, in another embodiment, the prediction process of the sub-diagnosis intent of the patient inputting the sub-named entity includes multiple rounds; before obtaining the main-named entity corresponding to the target main-diagnosis intent of the patient, it is determined whether the total output round of the sub-diagnosis intent of the patient inputting the sub-named entity output reaches the multiple rounds, and in the case that the total output round of the sub-diagnosis intent of the patient inputting the sub-named entity output does not reach the multiple rounds, step S201 of obtaining the main-named entity corresponding to the target main-diagnosis intent of the patient is performed again. Or, in the case that the total output round of the sub-diagnosis intent of the patient inputting the sub-named entity output reaches the multiple rounds, the main-named entity corresponding to the target main-diagnosis intent of the patient is no longer obtained, that is, the sub-diagnosis intent of the patient inputting the sub-named entity is no longer predicted for the patient. In this way, it can be avoided that the patient needs to input the sub-named entity for too many sub-diagnosis intents, thereby causing a bad experience for the patient. The multiple rounds can include 3, 4 or 5, etc., which can be determined according to actual conditions, and the present application does not limit this.
[0127] In another embodiment, the prediction process of predicting the sub-question intention of the sub-named entity input by the patient includes multiple rounds. Before obtaining the main-named entity corresponding to the target main-question intention of the patient, it is determined whether the sub-question intention of the sub-named entity input by the patient is predicted in the last round. If the sub-question intention of the sub-named entity input by the patient is predicted in the last round, step S201 of obtaining the main-named entity corresponding to the target main-question intention of the patient is performed again. Otherwise, the main-named entity corresponding to the target main-question intention of the patient is not obtained, that is, the sub-question intention of the sub-named entity input by the patient is not predicted for the patient.
[0128] If the sub-question intention of the sub-named entity input by the patient is not predicted in the last round, it is often indicated that there is no longer the sub-question intention of the sub-named entity input by the patient in the sub-question intentions cascaded by the target main-question intention and not yet input by the patient. Therefore, the sub-question intention of the sub-named entity input by the patient is not predicted for the patient, so as to save system resources.
[0129] In another embodiment, the prediction process of predicting the sub-question intention of the sub-named entity input by the patient includes multiple rounds. Before obtaining the main-named entity corresponding to the target main-question intention of the patient, it is determined whether the sub-named entity input by the patient to the sub-question intention output in the last round is obtained. If the sub-named entity input by the patient to the sub-question intention output in the last round is obtained, step S201 of obtaining the main-named entity corresponding to the target main-question intention of the patient is performed again. Otherwise, the main-named entity corresponding to the target main-question intention of the patient is not obtained, that is, the sub-question intention of the sub-named entity input by the patient is not predicted for the patient.
[0130] If the sub-named entity input by the patient to the sub-question intention output in the last round is not obtained, it is often indicated that the patient does not input the sub-named entity to the sub-question intention output in the last round, which often means that the patient no longer needs to input the sub-named entity to the sub-question intention cascaded by the target main-question intention. Therefore, the sub-question intention of the sub-named entity input by the patient is not predicted for the patient, so as to save system resources and avoid reducing user experience.
[0131] On the other hand, the sub-named entity input by the patient and the sub-question intention corresponding to the sub-named entity input by the patient can be obtained. Then, the medical record text of the patient can be generated according to the target main-question intention, the main-named entity, the sub-named entity input by the patient, and the sub-question intention corresponding to the sub-named entity input by the patient.
[0132] It should be noted that for the method embodiments, the methods can be described in terms of sequential blocks or operations
[0133] With reference to Figure 7 The device for training the prediction model of the sub-question diagnosis intention comprises a first acquisition module 11, a recognition module 12, a second acquisition module 13, and a training module 14.
[0134] In an optional implementation, the training module comprises a processing unit, configured to determine, according to the sample data, a training sub-question diagnosis intention in the sub-question diagnosis intention whose virtual recognition state or actual recognition state is not recognized as a sub-named entity, the training sub-question diagnosis intention being a sub-question diagnosis intention to be input with a sub-named entity predicted by the prediction model; a determination unit, configured to determine a loss value according to a loss function, the sub-question diagnosis intention to be input with a sub-named entity, the sub-question diagnosis intention, and the label data; and an adjustment unit, configured to adjust the network parameter according to the loss value.
[0135] In an optional implementation, the processing unit comprises: an extraction subunit configured to perform feature extraction on the main named entity to obtain main features of the main named entity, perform feature extraction on each of the plurality of sub-question diagnosis intents to obtain sub-features of each of the plurality of sub-question diagnosis intents, perform feature extraction on an actual recognition state of whether the sub-question diagnosis intent other than the main question diagnosis intent is recognized as a sub-named entity to obtain an actual state feature of the actual recognition state of whether the sub-question diagnosis intent other than the main question diagnosis intent is recognized as a sub-named entity, and perform feature extraction on a virtual recognition state of whether the part of the sub-question diagnosis intents are not recognized as sub-named entities to obtain a virtual state feature of the virtual recognition state of whether the part of the sub-question diagnosis intents are not recognized as sub-named entities; a fusion subunit configured to fuse the main features, the sub-features, the actual state feature, and the virtual state feature to obtain fused features; and a prediction subunit configured to predict, according to the fused features, the training sub-question diagnosis intent from among the sub-question diagnosis intents of which the virtual recognition state or the actual recognition state is not recognized as a sub-named entity.
[0136] In an optional implementation, the fusion subunit is specifically configured to, for each of the sub-question diagnosis intents concatenated with the main question diagnosis intent, aggregate, in a case where the sub-question diagnosis intent is the sub-question diagnosis intent other than the main question diagnosis intent, the main features, the sub-features of the sub-question diagnosis intent, and an actual state feature of an actual recognition state of whether the sub-question diagnosis intent is recognized as a sub-named entity to obtain aggregated features corresponding to the sub-question diagnosis intent, or aggregate, in a case where the sub-question diagnosis intent is the part of the sub-question diagnosis intents, the main features, the sub-features of the sub-question diagnosis intent, and a virtual state feature of a virtual recognition state of whether the sub-question diagnosis intent is not recognized as a sub-named entity to obtain the aggregated features corresponding to the sub-question diagnosis intent, and perform self-attention fusion on the aggregated features corresponding to the plurality of sub-question diagnosis intents respectively to obtain the fused features.
[0137] In an optional implementation, the fusion subunit is specifically configured to combine the aggregated features corresponding to the plurality of sub-question diagnosis intents respectively to obtain combined features, and perform self-attention expansion on the combined features to obtain the fused features.
[0138] In the present application, an existing real historical medical record text is obtained. Based on a pre-set main inquiry intention related to a disease and a plurality of sub-inquiry intentions cascaded by the main inquiry intention, a main named entity corresponding to the main inquiry intention and a sub-named entity corresponding to the sub-inquiry intention cascaded by the main inquiry intention are identified in the historical medical record text. Training data corresponding to the main inquiry intention is obtained according to the historical medical record text. The training data includes sample data and labeled data. The labeled data includes an actual identification state for indicating whether part of the sub-inquiry intentions is identified as a sub-named entity. The sample data includes a main named entity corresponding to the main inquiry intention, a plurality of sub-inquiry intentions cascaded by the main inquiry intention, an actual identification state for indicating whether the sub-inquiry intention except the part of the sub-inquiry intentions is identified as a sub-named entity, and a virtual identification state for indicating that the part of the sub-inquiry intentions is not identified as a sub-named entity. The prediction model is trained using the training data until the network parameters in the network structure of the prediction model converge, and the prediction model of the sub-inquiry intention is obtained.
[0139] In this way, during the process of waiting for the patient, the main named entity corresponding to the target main inquiry intention of the patient can be obtained. The target main inquiry intention includes a main inquiry intention in the plurality of pre-set main inquiry intentions related to the disease. The plurality of sub-inquiry intentions cascaded by the target main inquiry intention are obtained. The current input state of whether each of the plurality of sub-inquiry intentions cascaded by the target main inquiry intention has been input with a corresponding sub-named entity by the patient is obtained. According to the main named entity, the plurality of sub-inquiry intentions, and the current input state of whether each of the plurality of sub-inquiry intentions has been input with a corresponding sub-named entity by the patient, the sub-inquiry intention to be input with a sub-named entity by the patient is predicted from the sub-inquiry intentions cascaded by the target main inquiry intention and not yet input with a sub-named entity by the patient. The sub-inquiry intention to be input with a sub-named entity by the patient is output.
[0140] Through the application, the patient can input the target main diagnosis intention naming entity related to the disease in the electronic device during the waiting process. When the electronic device obtains the target main diagnosis intention naming entity input by the patient, the trained sub-diagnosis intention prediction model can be used to predict the sub-diagnosis intention to be input by the patient in the target main diagnosis intention cascade sub-diagnosis intention, and output the sub-diagnosis intention to be input by the patient in the target main diagnosis intention cascade sub-diagnosis intention, so that the patient can input the sub-diagnosis intention in the electronic device. The sub-naming entity is output in advance to automatically output the question about the patient's disease to the patient during the waiting process, collect the answers input by the patient, facilitate automatic recording of the patient's disease, avoid missing the answers input by the patient, and avoid misdiagnosis or missed diagnosis. Secondly, after the patient enters the diagnosis stage, the medical staff can directly obtain the answers input by the patient, without the need for the medical staff to ask the patient in real time, which can save the time of the medical staff and the patient during the diagnosis process.
[0141] Reference Figure 8 The application predicts a device for cascading sub-diagnosis intentions of a main diagnosis intention, which comprises: a third acquisition module 21 for acquiring a main naming entity corresponding to a target main diagnosis intention of a patient; the target main diagnosis intention comprises a main diagnosis intention in a plurality of main diagnosis intentions related to a disease and set in advance; a fourth acquisition module 22 for acquiring a plurality of sub-diagnosis intentions cascaded with the target main diagnosis intention; a fifth acquisition module 23 for acquiring a current input state of whether the plurality of sub-diagnosis intentions have been input by the patient with corresponding sub-naming entities; a prediction module 24 for predicting a sub-diagnosis intention to be input by the patient in a sub-diagnosis intention cascaded with the target main diagnosis intention and not yet input by the patient with a sub-naming entity according to the main naming entity, the plurality of sub-diagnosis intentions, and the current input state of whether each sub-diagnosis intention has been input by the patient with a corresponding sub-naming entity; and an output module 25 for outputting the sub-diagnosis intention to be input by the patient.
[0142] In an optional implementation, the prediction module comprises: an extraction unit configured to perform feature extraction on the main named entity to obtain main features of the main named entity, perform feature extraction on each of the plurality of sub-question diagnosis intents to obtain sub-features of each of the plurality of sub-question diagnosis intents, and perform feature extraction on a current input state of whether each of the plurality of sub-question diagnosis intents has been input with a corresponding sub-named entity by the patient to obtain current state features of each of the plurality of sub-question diagnosis intents; a fusion unit configured to fuse the main features, the sub-features, and the current state features to obtain fused features; and a prediction unit configured to predict, according to the fused features, a sub-question diagnosis intent to be input with a sub-named entity by the patient from among the sub-question diagnosis intents that are cascaded with the target main question diagnosis intent and have not yet been input with a sub-named entity by the patient.
[0143] In an optional implementation, the fusion unit comprises: an aggregation sub-unit configured to, for each of the sub-question diagnosis intents that are cascaded with the target main question diagnosis intent, aggregate the main features, the sub-features of the sub-question diagnosis intent, and the current state features of the sub-question diagnosis intent to obtain aggregated features corresponding to the sub-question diagnosis intent; and a fusion sub-unit configured to perform self-attention fusion on the aggregated features corresponding to the plurality of sub-question diagnosis intents to obtain the fused features.
[0144] In an optional implementation, the fusion sub-unit is specifically configured to: combine the aggregated features corresponding to the plurality of sub-question diagnosis intents to obtain combined features; and perform self-attention expansion on the combined features to obtain the fused features.
[0145] In an optional implementation, the changing module further comprises: in a case where the patient inputs a sub-named entity for the output sub-question diagnosis intent, changing the current input state of whether the output question diagnosis intent has been input with a sub-named entity by the patient from not having been input with a sub-named entity by the patient to having been input with a sub-named entity by the patient.
[0146] In an optional implementation, the third obtaining module is further configured to: before obtaining the main named entity corresponding to the target main diagnosis intention of the patient, determine whether a total number of the sub-diagnosis intentions to be input by the patient with the sub-named entity reaches a preset number; and in a case where the total number of the sub-diagnosis intentions to be input by the patient with the sub-named entity does not reach the preset number, obtain the main named entity corresponding to the target main diagnosis intention of the patient again. Alternatively, the third obtaining module is further configured to: the prediction process of the sub-diagnosis intention to be input by the patient with the sub-named entity includes multiple rounds; before obtaining the main named entity corresponding to the target main diagnosis intention of the patient, determine whether a total output round of the sub-diagnosis intention to be input by the patient with the sub-named entity reaches the multiple rounds, and in a case where the total output round of the sub-diagnosis intention to be input by the patient with the sub-named entity does not reach the multiple rounds, obtain the main named entity corresponding to the target main diagnosis intention of the patient again. Alternatively, the third obtaining module is further configured to: the prediction process of the sub-diagnosis intention to be input by the patient with the sub-named entity includes multiple rounds; before obtaining the main named entity corresponding to the target main diagnosis intention of the patient, determine whether the sub-diagnosis intention to be input by the patient with the sub-named entity is predicted in a previous round, and in a case where the sub-diagnosis intention to be input by the patient with the sub-named entity is predicted in the previous round, obtain the main named entity corresponding to the target main diagnosis intention of the patient again. Alternatively, the third obtaining module is further configured to: the prediction process of the sub-diagnosis intention to be input by the patient with the sub-named entity includes multiple rounds; before obtaining the main named entity corresponding to the target main diagnosis intention of the patient, determine whether the sub-named entity input by the patient with the sub-diagnosis intention output in the previous round is obtained, and in a case where the sub-named entity input by the patient with the sub-diagnosis intention output in the previous round is obtained, obtain the main named entity corresponding to the target main diagnosis intention of the patient again.
[0147] In the present application, during the process in which the patient is waiting for diagnosis, the main named entity corresponding to the target main diagnosis intention of the patient is obtained. The target main diagnosis intention includes a main diagnosis intention in a plurality of main diagnosis intentions related to a disease condition and set in advance. A plurality of sub-diagnosis intentions cascaded with the target main diagnosis intention are obtained. The current input state of whether each of the plurality of sub-diagnosis intentions cascaded with the target main diagnosis intention has been input by the patient with a corresponding sub-named entity is obtained. According to the main named entity, the plurality of sub-diagnosis intentions, and the current input state of whether each of the plurality of sub-diagnosis intentions has been input by the patient with a corresponding sub-named entity, a sub-diagnosis intention to be input by the patient with a sub-named entity is predicted from among the sub-diagnosis intentions cascaded with the target main diagnosis intention and not yet input by the patient with a sub-named entity. The sub-diagnosis intention to be input by the patient with a sub-named entity is output.
[0148] Through the present application, the patient can input the target main diagnosis intention related to the disease in the electronic device during the waiting process. When the electronic device obtains the target main diagnosis intention entity input by the patient, the trained sub-diagnosis intention prediction model can be used to predict the sub-diagnosis intention input by the patient in the target main diagnosis intention cascaded multiple sub-diagnosis intentions, and output the sub-diagnosis intention input by the patient in the target main diagnosis intention cascaded multiple sub-diagnosis intentions, so that the patient can input the sub-diagnosis intention in the electronic device. The patient can use the time during the waiting process to automatically output the question about the patient's disease to the patient in advance, and collect the answer input by the patient to the question, so as to facilitate the automatic recording of the patient's disease, and can avoid missing the answer input by the patient and causing misdiagnosis or missed diagnosis. Secondly, after the patient enters the diagnosis stage, the medical staff can directly obtain the answer input by the patient to the question, without the need for the medical staff to ask the patient in real time, which can save the time of the medical staff and the patient during the diagnosis process.
[0149] The present application also provides a non-volatile readable storage medium, which stores one or more programs. When the one or more programs are applied to a device, the device can execute instructions of the steps of the methods in the embodiments of the present application.
[0150] The present application provides one or more machine-readable media, which store instructions, when executed by one or more processors, cause an electronic device to perform the methods of one or more of the above embodiments. In the embodiments of the present application, the electronic device includes a server, a gateway, a sub-device, and the like. The sub-device is an Internet of Things device and the like.
[0151] Embodiments of the present disclosure can be implemented as a device configured to perform a desired configuration using any appropriate hardware, firmware, software, or any combination thereof. The device can include a server (cluster), a terminal device such as an IoT device, and the like.
[0152] Figure 9 An exemplary device 1300 that can be used to implement various embodiments in the present application is schematically shown.
[0153] For one embodiment, Figure 9An example apparatus 1300 is shown having one or more processors 1302, a control module (chipset) 1304 coupled to at least one of the processor(s) 1302, a memory 1306 coupled to the control module 1304, a non-volatile memory (NVM) / storage device 1308 coupled to the control module 1304, one or more input / output devices 1310 coupled to the control module 1304, and a network interface 1312 coupled to the control module 1304.
[0154] The processor(s) 1302 can include one or more single core or multi core processors, which can include any combination of general-purpose processors or dedicated processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the apparatus 1300 can be capable of acting as a server device, such as a gateway, in embodiments of the present application.
[0155] In some embodiments, the apparatus 1300 can include one or more computer readable medium (such as the memory 1306 or the NVM / storage device 1308) having instructions 1314 and one or more processors 1302 incorporated with the one or more computer readable medium configured to execute the instructions 1314 to implement modules to perform the actions in the present disclosure. For one embodiment, the control module 1304 can include any suitable interface controllers appropriate for interfacing to the at least one of the processor(s) 1302 and / or any suitable device or component in communication with the control module 1304.
[0156] The control module 1304 can include a memory controller module to provide an interface to the memory 1306. The memory controller module can be a hardware module, a software module, and / or a firmware module.
[0157] The memory 1306 can be used to, for example, load and store data and / or instructions 1314 for the apparatus 1300. For one embodiment, the memory 1306 can include any suitable volatile memory, such as suitable DRAM. In some embodiments, the memory 1306 can include double data rate fourth generation synchronous dynamic random access memory (DDR4 SDRAM).
[0158] For one embodiment, the control module 1304 can include one or more input / output controllers to provide an interface to the NVM / storage device 1308 and the input / output device(s) 1310.
[0159] For example, NVM / storage 1308 can be used to store data and / or instructions 1314. NVM / storage 1308 can include any suitable non-volatile memory (e.g., flash memory) and / or can include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0160] NVM / storage 1308 can include storage resources that are physically part of the device on which the apparatus 1300 is installed or that is accessed remotely and / or via a network, as described herein. For example, NVM / storage 1308 can be accessed via input / output device(s) 1310 through a network.
[0161] Input / output device(s) 1310 can provide an interface between apparatus 1300 and any suitable device for the receipt, processing, and / or transmission of data by apparatus 1300. Input / output device(s) 1310 can include communication components, pinyin components, sensor components, and / or the like. Network interface 1312 can provide an interface between apparatus 1300 and one or more networks, by which apparatus 1300 can communicate with one or more components of a wireless network, such as an access point of a wireless network based on any of one or more wireless network standards and / or protocols, such as WiFi, 2G, 3G, 4G, 5G, and / or the like, or combinations thereof.
[0162] For one embodiment, at least one of processor(s) 1302 can be packaged together with logic for one or more controllers of control module 1304 (e.g., a memory controller module). For one embodiment, at least one of processor(s) 1302 can be packaged together with logic for one or more controllers of control module 1304 to form a system in a package (SiP). For one embodiment, at least one of processor(s) 1302 can be fabricated together with logic for one or more controllers of control module 1304 on the same die. For one embodiment, at least one of processor(s) 1302 can be fabricated together with logic for one or more controllers of control module 1304 on the same die to form a system on a chip (SoC).
[0163] In various embodiments, device 1300 may be, but is not limited to, a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, device 1300 may have more or fewer components and / or different architectures. For example, in some embodiments, device 1300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0164] This application provides an electronic device, including: one or more processors; and one or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, cause the electronic device to perform one or more methods as described in this application.
[0165] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0166] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. The embodiments of this application are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable information processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable information processing terminal device, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable information processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable information processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process.Figure 1 one or more processes and / or blocks Figure 1 steps of the function specified in the flow or flows and / or blocks. Although preferred embodiments of the application have been described, those skilled in the art will be able to make additional changes and modifications thereto without departing from the scope of the application. Accordingly, the appended claims are intended to cover all such changes and modifications that fall within the scope of the application.
[0167] Finally, it should be noted that, in the description of the application, relational terms such as first and second, and the like can be used solely to distinguish one entity or action from another entity or action without necessarily implying any actual relationship or order between such entities or actions. Also, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0168] The above describes in detail the method and device for training a prediction model of a sub-interrogation intention, the method for predicting a sub-interrogation intention of a main-interrogation intention cascade, and the like. The principles and implementation manners of the present application are described by using specific examples. The above description of the embodiments is only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, the specific implementation manners and application ranges can be changed according to the idea of the present application. In summary, the content of the specification should not be understood as a limitation of the present application.
Claims
1. A method for training a prediction model of a sub-question diagnosis intent, characterized in that, The method comprises: acquiring existing real historical medical record texts; based on a pre-set main inquiry intention related to a disease and a plurality of sub-inquiry intentions cascaded with the main inquiry intention, identifying a main named entity corresponding to the main inquiry intention and a sub-named entity corresponding to a sub-inquiry intention cascaded with the main inquiry intention in the historical medical record text; acquiring training data corresponding to the main inquiry intention according to the historical medical record text; wherein the training data comprises sample data and labeled data; the labeled data comprises an actual recognition state indicating whether part of the plurality of sub-inquiry intentions is identified with a sub-named entity; and the sample data comprises a main named entity corresponding to the main inquiry intention, a plurality of sub-inquiry intentions cascaded with the main inquiry intention, an actual recognition state of sub-inquiry intentions other than the part of the plurality of sub-inquiry intentions being identified with a sub-named entity, and a virtual recognition state of the part of the plurality of sub-inquiry intentions not being identified with a sub-named entity; training a prediction model using the training data until network parameters in a network structure of the prediction model converge, to obtain the prediction model of the sub-inquiry intention.
2. The method of claim 1, wherein the training of the network parameters in the network structure using the training data until the network parameters converge comprises: determining, according to the sample data, a training sub-inquiry intention in the plurality of sub-inquiry intentions with a virtual recognition state or an actual recognition state of not being identified with a sub-named entity, the training sub-inquiry intention being a sub-inquiry intention to be input with a sub-named entity predicted by the prediction model; determining a loss value according to a loss function, the sub-inquiry intention to be input with a sub-named entity, the part of the plurality of sub-inquiry intentions, and the labeled data; adjusting the network parameters according to the loss value.
3. The method of claim 2, wherein, The determining of the training sub-inquiry intention in the plurality of sub-inquiry intentions with a virtual recognition state or an actual recognition state of not being identified with a sub-named entity according to the sample data, the training sub-inquiry intention being a sub-inquiry intention to be input with a sub-named entity predicted by the prediction model, comprises: performing feature extraction on the main named entity to obtain a main feature of the main named entity, performing feature extraction on the plurality of sub-inquiry intentions to obtain a sub-feature of each sub-inquiry intention, performing feature extraction on the actual recognition state of the sub-inquiry intentions other than the part of the plurality of sub-inquiry intentions being identified with a sub-named entity to obtain an actual state feature of the actual recognition state of the sub-inquiry intentions other than the part of the plurality of sub-inquiry intentions being identified with a sub-named entity, and performing feature extraction on the virtual recognition state of the part of the plurality of sub-inquiry intentions not being identified with a sub-named entity to obtain a virtual state feature of the virtual recognition state of the part of the plurality of sub-inquiry intentions not being identified with a sub-named entity; fusing the main feature, the sub-feature, the actual state feature, and the virtual state feature to obtain a fused feature; and According to the fusion feature, in the multiple sub-question diagnosis intents, a sub-question diagnosis intent in which a virtual recognition state or an actual recognition state is not recognized sub-named entity, a training sub-question diagnosis intent is predicted.
4. The method of claim 3, wherein, The fusion of the main feature, the sub-feature, the actual state feature, and the virtual state feature obtains a fusion feature, including: For each sub-question diagnosis intent of the main question diagnosis intent cascade, in the case of the sub-question diagnosis intent being the sub-question diagnosis intent other than the partial sub-question diagnosis intent, the main feature, the sub-feature of the sub-question diagnosis intent, and the actual state feature of the actual recognition state of whether the sub-question diagnosis intent is recognized sub-named entity are aggregated to obtain the aggregation feature corresponding to the sub-question diagnosis intent; or, in the case of the sub-question diagnosis intent being the partial sub-question diagnosis intent, the main feature, the sub-feature of the sub-question diagnosis intent, and the virtual state feature of the virtual recognition state of the sub-question diagnosis intent not being recognized sub-named entity are aggregated to obtain the aggregation feature corresponding to the sub-question diagnosis intent; The self-attention fusion of the aggregation features corresponding to the multiple sub-question diagnosis intents obtains the fusion feature.
5. The method of claim 4, wherein, The self-attention fusion of the aggregation features corresponding to the multiple sub-question diagnosis intents obtains the fusion feature, including: The aggregation features corresponding to the multiple sub-question diagnosis intents are merged to obtain a merged feature; The self-attention expansion of the merged feature obtains the fusion feature.
6. A method for predicting a sub-consultation intent of a main-consultation intent cascade, the method comprising: The method includes: Obtaining a main named entity corresponding to a target main question diagnosis intent of a patient; the target main question diagnosis intent includes a main question diagnosis intent in multiple question diagnosis intents related to a disease condition; Obtaining multiple sub-question diagnosis intents cascaded with the target main question diagnosis intent; Obtaining current input states of whether the multiple sub-question diagnosis intents have been input corresponding sub-named entities by the patient respectively; According to the main named entity, the multiple sub-question diagnosis intents, and the current input states of whether each sub-question diagnosis intent has been input corresponding sub-named entities by the patient respectively, in the sub-question diagnosis intents cascaded with the target main question diagnosis intent and currently not having been input sub-named entities by the patient, predicting sub-question diagnosis intents to be input sub-named entities by the patient; Outputting the sub-question diagnosis intents to be input sub-named entities by the patient.
7. The method of claim 6, wherein, The prediction of the sub-question diagnosis intents to be input sub-named entities by the patient in the sub-question diagnosis intents cascaded with the target main question diagnosis intent and currently not having been input sub-named entities by the patient according to the main named entity, the multiple sub-question diagnosis intents, and the current input states of whether each sub-question diagnosis intent has been input corresponding sub-named entities by the patient respectively, including: Feature extraction is performed on the main named entity to obtain a main feature of the main named entity; feature extraction is performed on the multiple sub-question diagnosis intents respectively to obtain sub-features of the sub-question diagnosis intents respectively; feature extraction is performed on the current input states of whether the multiple sub-question diagnosis intents have been input corresponding sub-named entities by the patient respectively to obtain current state features of the sub-question diagnosis intents respectively; Fusion of the main feature, the sub-feature, and the current state feature obtains a fusion feature; According to the fusion feature, a sub-question intention to be input by the patient is predicted in a sub-question intention of the target main question diagnosis intention cascade and which has not yet been input by the patient.
8. The method of claim 7, wherein, The fusion feature is obtained by fusing the main feature, the sub-feature, and the current state feature. For each sub-question intention of the target main question diagnosis intention cascade, the main feature, the sub-feature of the sub-question intention, and the current state feature of the sub-question intention are aggregated to obtain an aggregated feature corresponding to the sub-question intention. The fusion feature is obtained by performing self-attention fusion on the aggregated features corresponding to the plurality of sub-question intentions.
9. The method of claim 8, wherein, The fusion feature is obtained by performing self-attention fusion on the aggregated features corresponding to the plurality of sub-question intentions, including: The aggregated features corresponding to the plurality of sub-question intentions are merged to obtain a merged feature; The fusion feature is obtained by performing self-attention expansion on the merged feature.
10. The method of claim 6, wherein, The method further includes: Before obtaining the main named entity corresponding to the target main question diagnosis intention of the patient, it is determined whether the total number of the sub-question intentions to be input by the patient reaches a preset number, and if the total number of the sub-question intentions to be input by the patient does not reach the preset number, the main named entity corresponding to the target main question diagnosis intention of the patient is obtained again. Or, The prediction process of the sub-question intention to be input by the patient includes a plurality of rounds, and before obtaining the main named entity corresponding to the target main question diagnosis intention of the patient, it is determined whether the total output round of the sub-question intention to be input by the patient reaches the plurality of rounds, and if the total output round of the sub-question intention to be input by the patient does not reach the plurality of rounds, the main named entity corresponding to the target main question diagnosis intention of the patient is obtained again. Or, The prediction process of the sub-question intention to be input by the patient includes a plurality of rounds, and before obtaining the main named entity corresponding to the target main question diagnosis intention of the patient, it is determined whether the sub-question intention to be input by the patient is predicted in the last round, and if the sub-question intention to be input by the patient is predicted in the last round, the main named entity corresponding to the target main question diagnosis intention of the patient is obtained again. Or, The prediction process of the sub-question intention to be input by the patient includes a plurality of rounds, and before obtaining the main named entity corresponding to the target main question diagnosis intention of the patient, it is determined whether the sub-question intention input by the patient to the sub-question intention output in the last round is obtained, and if the sub-question intention input by the patient to the sub-question intention output in the last round is obtained, the main named entity corresponding to the target main question diagnosis intention of the patient is obtained again.
11. An apparatus for training a predictive model of sub-diagnosis intent, characterized in that, The device includes: A first obtaining module is configured to obtain an existing real historical medical record text. The identification module is configured to identify a main named entity corresponding to the main inquiry intention and sub named entities corresponding to the sub inquiry intentions cascaded with the main inquiry intention in the historical medical record text based on the main inquiry intention related to the disease and the sub inquiry intentions cascaded with the main inquiry intention. The second acquisition module is configured to acquire training data corresponding to the main inquiry intention according to the historical medical record text; the training data includes sample data and labeled data; the labeled data includes actual identification states of sub named entities of part of the sub inquiry intentions; and the sample data includes a main named entity corresponding to the main inquiry intention, the sub inquiry intentions cascaded with the main inquiry intention, actual identification states of sub named entities of the sub inquiry intentions except the part of the sub inquiry intentions, and virtual identification states of sub named entities of the part of the sub inquiry intentions. The training module is configured to train a prediction model using the training data until network parameters in a network structure of the prediction model converge, so as to obtain the prediction model of the sub inquiry intention.
12. An apparatus for predicting a sub-consultation intent of a main-consultation intent cascade, the apparatus comprising: The device includes: The third acquisition module is configured to acquire a main named entity corresponding to a target main inquiry intention of a patient; the target main inquiry intention includes a main inquiry intention in a plurality of main inquiry intentions related to the disease and set in advance; The fourth acquisition module is configured to acquire a plurality of sub inquiry intentions cascaded with the target main inquiry intention; The fifth acquisition module is configured to acquire current input states of whether the plurality of sub inquiry intentions have been input with corresponding sub named entities by the patient respectively; The prediction module is configured to predict a sub inquiry intention to be input with a sub named entity by the patient from the sub inquiry intentions cascaded with the target main inquiry intention and not yet input with a sub named entity by the patient according to the main named entity, the plurality of sub inquiry intentions, and the current input states of whether the sub inquiry intentions have been input with corresponding sub named entities by the patient respectively. The output module is configured to output the sub inquiry intention to be input with a sub named entity by the patient.
13. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the steps of the method of any one of claims 1 to 10.
14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores the computer program, and the computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 10.
Citation Information
Patent Citations
Method and device for obtaining vertigo inquiry text, electronic equipment and inquiry system
CN111145903A
Interrogation intention recognition method and device based on multi-dimensional representation, equipment and medium
CN114817547A