Question diagnosis data processing method, model training method, question diagnosis system and electronic device
Patent Information
- Application Number
- CN202210979654.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-16
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-08-16
AI Technical Summary
尽管不同的求诊者具有个性化的病情特征,但是实际上往往也需要医生对不同的求诊者询问大量重复的问题,并根据问诊结果进行事后手动病历录入,不仅会导致诊疗时间、资源的浪费,并且也可能造成关键信息的遗漏
[0025]根据本申请实施例,预测模型可以根据已有的第一问诊信息预测第二问诊信息,由于问诊信息包括各个病情信息采集意图的采集状态,因此,可以根据新的问诊信息即第二问诊信息中的各病情信息采集意图的采集状态,确定出待处理的病情信息采集意图即目标意图,输出对应的问诊问题。如此,可以自动向求诊者输出求诊相关的问题,无需医生耗费大量时间进行重复提问,并且便于自动记录问诊问题。从而节约诊疗时间、资源,并且避免关键信息遗漏。
Smart Images

Figure CN115346691B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and in particular to a method for processing consultation data, a model training method, a consultation system, and an electronic device. Background Technology
[0002] In the medical field, people spend a significant amount of time waiting in the waiting room before entering the consultation room. Although different patients have individualized medical conditions, doctors often need to ask many repetitive questions to different patients and manually enter the medical records afterward based on the consultation results. This not only wastes consultation time and resources but may also lead to the omission of crucial information. Summary of the Invention
[0003] This application provides a method for processing consultation data, a model training method, a consultation system, and an electronic device to solve the problems existing in related technologies. The technical solution is as follows:
[0004] In a first aspect, embodiments of this application provide a method for processing medical consultation data, including:
[0005] Obtain the first consultation information, which includes N first collection states corresponding to N disease information collection intentions, where N is a positive integer;
[0006] A predictive model is used to predict based on the first consultation information to obtain the second consultation information; wherein, the second consultation information includes N second collection states corresponding to N disease information collection intentions respectively;
[0007] Based on the second consultation information, determine the target intent from N disease information collection intents, and output the consultation question corresponding to the target intent.
[0008] Secondly, embodiments of this application provide a model training method, including:
[0009] Entity recognition is performed based on the second medical record to obtain medical entity-related information in the second medical record. The medical entity-related information includes M disease information collection intentions involved in the second medical record; where M is a positive integer.
[0010] Based on M intents to collect medical information, the third consultation information is determined; wherein, the third consultation information includes L third collection states corresponding to L pre-set intents to collect medical information, and the L intents to collect medical information include M intents to collect medical information, where L is an integer greater than or equal to M;
[0011] The K third collection states in the third consultation information are processed to obtain the fourth consultation information; where K is a positive integer less than L, and the fourth consultation information includes L fourth collection states corresponding to L disease information collection intentions respectively;
[0012] A prediction model is trained based on information from the fourth and third consultations.
[0013] Thirdly, embodiments of this application provide a medical consultation data processing apparatus, including:
[0014] The first consultation information determination module is used to obtain the first consultation information, which includes N first collection states corresponding to N disease information collection intentions, where N is a positive integer;
[0015] The second consultation information determination module is used to use a prediction model to predict based on the first consultation information to obtain the second consultation information; wherein, the second consultation information includes N second collection states corresponding to N disease information collection intentions respectively;
[0016] The question output module is used to determine the target intent from N disease information collection intents based on the second consultation information, and output the consultation question corresponding to the target intent.
[0017] Fourthly, embodiments of this application provide a model training apparatus, including:
[0018] The entity extraction module is used to perform entity recognition based on the second medical record to obtain medical entity-related information in the second medical record. The medical entity-related information includes M disease information collection intentions involved in the second medical record; where M is a positive integer.
[0019] The third consultation information determination module is used to determine the third consultation information based on M medical condition information collection intentions. The third consultation information includes L third collection states corresponding to L pre-set medical condition information collection intentions, and the L medical condition information collection intentions include M medical condition information collection intentions, where L is an integer greater than or equal to M.
[0020] The fourth consultation information determination module is used to process K third collection states in the third consultation information to obtain the fourth consultation information; where K is a positive integer less than L, and the fourth consultation information includes L fourth collection states corresponding to L disease information collection intentions respectively;
[0021] The training module is used to train a prediction model based on the information from the fourth and third consultations.
[0022] Fifthly, embodiments of this application provide a consultation system, including a model training device and a consultation data processing device; the model training device and the consultation data processing device are used to implement the method provided in any embodiment of this application.
[0023] In a sixth aspect, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor implements the method provided in any embodiment of this application when executing the computer program.
[0024] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method provided in any embodiment of this application.
[0025] According to the embodiments of this application, the predictive model can predict the second consultation information based on the existing first consultation information. Since the consultation information includes the collection status of various medical condition information collection intentions, the medical condition information collection intention to be processed, i.e., the target intention, can be determined based on the collection status of each medical condition information collection intention in the new consultation information, i.e., the second consultation information, and the corresponding consultation questions can be output. In this way, consultation-related questions can be automatically output to the patient, eliminating the need for doctors to spend a lot of time asking repeated questions, and facilitating the automatic recording of consultation questions. This saves consultation time and resources, and avoids the omission of key information.
[0026] The above overview is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of this application will become readily apparent from the accompanying drawings and the following detailed description. Attached Figure Description
[0027] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in this application and should not be construed as limiting the scope of this application.
[0028] Figure 1 This is a structural block diagram of a consultation system according to an embodiment of this application;
[0029] Figure 2 This is a flowchart of a consultation data processing method according to an embodiment of this application;
[0030] Figure 3 This is a flowchart of a model training method according to an embodiment of this application;
[0031] Figure 4This is a structural block diagram of a consultation data processing apparatus according to an embodiment of this application;
[0032] Figure 5 A structural block diagram of a model training apparatus according to an embodiment of this application; and
[0033] Figure 6 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0034] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of this application. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0035] To more clearly illustrate the technical solutions provided in the embodiments of this application, we first introduce the application scenarios that can be used to implement the embodiments of this application. In these application scenarios, the consultation system provided in the embodiments of this application can be used for consultation-related processing. Figure 1 A schematic diagram of the consultation system is shown. Figure 1 As shown, the consultation system includes a model training device and a consultation data processing device. The model training device can be a server or a server cluster, etc. Optionally, the model training device can be implemented based on a cloud platform, that is, it can utilize distributed resources to complete the relevant functions of the model training device. The consultation data processing device can be a user device or a server or server cluster connected to the user device. The consultation data processing device is used to provide consultation questions to ask the user, i.e., the patient seeking medical treatment, about their condition. Exemplarily, the model training device can be used to implement the model training method provided in any embodiment of this application. The consultation data processing device can be used to implement the consultation data processing method provided in any embodiment of this application.
[0036] Specifically, the model training device can acquire existing second medical records, train a prediction model based on the second medical records, and send the prediction model to the consultation data processing device. The consultation data processing device can determine the intent to collect medical information during the consultation process (hereinafter referred to as the target intent) based on the user's consultation intent and the prediction model, and output consultation questions related to that intent. This achieves automated consultation. For example, automated consultation can be conducted using the patient's time in the waiting room, thereby improving the utilization rate of time resources during the treatment process. Furthermore, it eliminates the need for doctors to spend a lot of time repeatedly asking questions and facilitates automatic recording of consultation questions. This saves consultation time and resources and avoids the omission of key information.
[0037] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.
[0038] Figure 2 A flowchart of a consultation data processing method according to an embodiment of this application is shown. This method can be applied to... Figure 1 The patient consultation data processing device shown is not limited to this. For example... Figure 2 As shown, the method may include:
[0039] S210, Obtain the first consultation information, wherein the first consultation information includes N first collection states corresponding to N disease information collection intentions, where N is a positive integer;
[0040] S220, a prediction model is used to predict based on the first consultation information to obtain the second consultation information; wherein, the second consultation information includes N second collection states corresponding to N disease information collection intentions respectively;
[0041] S230: Based on the second consultation information, determine the target intent from N disease information collection intents, and output the consultation question corresponding to the target intent.
[0042] For example, any consultation information in this application embodiment may include multiple collection states corresponding to multiple disease information collection intentions. The disease information collection intention may be pre-configured to characterize the information to be collected during the consultation process. For example, the disease information collection intention may be the time of onset, the cause, the severity, the specific location, etc. The collection state may include collected or not collected; where collected indicates that the information corresponding to the disease information collection intention has been collected, and not collected indicates that the information corresponding to the disease information collection intention has not been collected.
[0043] For example, consultation information can be presented in the form of a form. Table 1 shows an example consultation information, where T indicates that the collection status is "collected" and F indicates that the collection status is "not collected":
[0044]
[0045] Table 1
[0046] Since multiple questions are typically asked to the user during a consultation, the collection status of multiple intents to collect medical information can be updated multiple times during the consultation. This results in different consultation information being generated during the consultation. In this embodiment, the first consultation information can represent the current consultation information, and the second consultation information can represent the next consultation information.
[0047] For example, after determining the second consultation information based on the first consultation information and outputting consultation questions based on the second consultation information, the second consultation information can be used as the new first consultation information, and the process can return to the step of determining the second consultation information based on the first consultation information. In practical applications, each of the first collection states in the initial first consultation information can be a pre-set collection state, such as all being "not collected". Thus, starting from the point where all the intentions to collect medical information are "not collected", the consultation information is updated by predicting the second consultation information, so that the collection state of at least some of the intentions to collect medical information is updated to "collected". In this case, consultation questions are output to complete the information collection. At this time, using the second consultation information as the new first consultation information, new second consultation information can be predicted, and consultation questions can be output and information collection can be achieved again. In this way, through multiple iterations, multiple consultation questions can be automatically output, thereby collecting more comprehensive information from the user.
[0048] In this embodiment, the method for determining the second consultation information based on the first consultation information is to use a prediction model. Specifically, the first consultation information is input into the prediction model, and the second consultation information is output by the prediction model. This prediction model can predict the next consultation information associated with a given consultation information. For example, the prediction model can be trained based on multiple sets of consultation information, where each set may include two associated consultation information sets. For instance, for a set of consultation information, the prediction model can predict the next consultation information based on one consultation information set, and calculate a loss value based on the difference between the predicted consultation information and the other consultation information set. The parameters of the prediction model are then adjusted based on this loss value. Through multiple adjustments, the prediction model can be trained to convergence.
[0049] In practical applications, existing medical records from doctor consultations can be used to obtain the aforementioned sets of consultation information. For example, entity recognition can be performed on the medical records to extract the collected information recorded therein, thereby obtaining the consultation information from the doctor's consultation process, which can then be used to train the prediction model. Alternatively, adjacent consultation information generated during automated consultations can also be used as the aforementioned sets of consultation information. For instance, during the application of the prediction model, human feedback can be used to select consultation information with better prediction performance from the consultation information generated during automated consultations, which can then be used to retrain or fine-tune the prediction model.
[0050] In this embodiment, the target intent may include the intent to collect medical information to be processed, or the intent to collect medical information corresponding to the information to be collected. For example, the target intent may include the intent to collect medical information when the collection status changes. Based on the second consultation information predicted by a prediction model, the target intent can be determined based on the second consultation information. For example, in step S230 above, determining the target intent among N medical information collection intents based on the second consultation information includes:
[0051] In response to the first collection state corresponding to the i-th medical condition information collection intention among N medical condition information collection intentions being "not collected" and the second collection state corresponding to the i-th medical condition information collection intention being "collected", the i-th medical condition information collection intention is determined as the target intention, where i is a positive integer less than or equal to N.
[0052] In other words, we can iterate through all the intents to collect patient information and identify the intents that are in the first collection state of "not collected" and the second collection state of "collected" as the target intents. In this way, we can determine the next piece of information to be collected, thereby identifying the consultation question.
[0053] For example, a consultation question can refer to a question used to characterize the intent to collect medical information. Consultation questions can be expressed in natural language; for instance, a consultation question corresponding to the intent to collect medical information about "occurrence time" could be, "When do you usually experience this?". Consultation questions can be single-choice, multiple-choice, numerical, or self-filling questions. Consultation questions can be output in text or voice form, i.e., the voice of the consultation question can be played to the user or the text of the consultation question can be displayed through an interactive interface. For example, in this embodiment, consultation questions corresponding to each intent to collect medical information can be pre-configured, so that after determining the target intent, the corresponding consultation question can be output to collect the aforementioned information.
[0054] As can be seen from the above method, the predictive model can predict the second consultation information based on the existing first consultation information. Since the consultation information includes the collection status of various medical condition information collection intentions, the collection intention of the medical condition information to be processed, i.e., the target intention, can be determined based on the collection status of each medical condition information collection intention in the new consultation information, i.e., the second consultation information, and the corresponding consultation questions can be output. In this way, consultation-related questions can be automatically output to the patient, without doctors spending a lot of time asking repeated questions, and it is convenient to automatically record consultation questions. This saves consultation time and resources, and avoids the omission of key information.
[0055] Optionally, the aforementioned N intents for collecting medical information can be determined based on the intent to consult a doctor. The intent to consult a doctor can refer to the problem the user hopes to resolve through consultation, i.e., the information that triggers the consultation. For example, the intent to consult a doctor may include the user's clinical manifestations, examination findings, laboratory results, known diseases, existing procedures and treatments, and medications.
[0056] For example, an intent system can be pre-constructed, which includes multiple consultation intents and corresponding medical information collection intents for each consultation intent. The consultation intent can serve as the main intent graph, and the medical information collection intent can serve as a sub-intent. Table 2 shows an example intent system.
[0057]
[0058]
[0059]
[0060] Table 2
[0061] In practical applications, there may be multiple pieces of information that trigger a consultation. For example, if the information that triggers a consultation includes two clinical manifestations: neck pain and upper limb pain, then different consultation information can be determined for different clinical manifestations. The specific information can be recorded as shown in Table 3, where each row of data collection status represents one consultation information.
[0062]
[0063] Table 3
[0064] Optionally, when the number of consultation intentions is greater than or equal to 2, the next consultation information can be predicted separately for the multiple consultation information corresponding to the multiple consultation intentions; or the next consultation information can be predicted for each of the multiple consultation information together by using the prediction model, that is, inputting Table 3 into the prediction model to obtain a new form output by the prediction model.
[0065] As explained above, after outputting the consultation question, the second consultation information can be identified as the new first consultation information to perform multiple iterations of predicting consultation information and outputting consultation questions. Optionally, embodiments of this application also provide a method for ending the above iteration operation. Exemplarily, the above method may further include: stopping the determination of the target intent in response to the quantity of information related to the consultation question reaching a preset threshold, or the absence of a medical condition information collection intention where the first collection state is not collected and the second collection state is collected. Here, stopping the determination of the target intent means stopping the use of the second consultation information as the new first consultation information, that is, stopping the acquisition of new first consultation information, thereby stopping the subsequent steps of determining the target intent for the new first consultation information, and realizing the cessation of consultation.
[0066] The quantitative information related to the consultation questions may include the number of consultation questions or the number of times consultation questions are output. Specifically, during a prediction process of the prediction model, the collection status of one or more intentions to collect medical information may change. Therefore, the number of consultation questions output at one time may also be one or more. Based on this, the number of consultation questions and the number of times consultation questions are output may be different. Either quantity can be selected as the judgment information for stopping consultation. This application does not limit this.
[0067] For example, if there is no intention to collect medical information in the first collection state (not collected) and the second collection state (collected), it means there is no new intention to collect medical information in the collection state (collected). Therefore, the consultation can be stopped.
[0068] Optionally, the above method may further include: obtaining response information for the consultation questions and generating a first medical record based on the response information. This step is performed after the consultation questions are output. Optionally, this step may be performed after the consultation is stopped, that is, after the last output of the consultation questions, or in other words, after the second consultation information is no longer used as the new first consultation information.
[0069] For example, the above-mentioned method of outputting the consultation question can be outputting voice or text, that is, playing the voice of the consultation question or displaying the text of the consultation question to the user through an interactive interface. Correspondingly, the response information to the consultation question can also be voice or text. When the response information is voice, the corresponding text can be obtained through speech recognition, and natural language understanding can be performed on the text to achieve summarization, and the summarized text can be recorded. When the response information is text, natural language understanding can be directly performed on the text to achieve summarization, and the summarized text can be recorded. By recording the response information, an automatically generated medical record, i.e., the first medical record, can be generated. Table 4 shows an exemplary first medical record.
[0070]
[0071] Table 4
[0072] As can be seen, the consultation data processing method provided in this application can not only automatically output consultation-related questions to the patient, eliminating the need for doctors to spend a lot of time repeatedly asking questions, but also automatically record the consultation questions. This saves consultation time and resources, and avoids the omission of key information.
[0073] This application also provides a model training method for training the above-mentioned prediction model. Figure 3 A flowchart illustrating a method for processing patient consultation data according to an embodiment of this application is shown. This method can be applied to... Figure 1The model training apparatus shown is not limited to this. For example... Figure 3 As shown, the method includes:
[0074] S310, Entity recognition is performed based on the second medical record to obtain medical entity-related information in the second medical record, wherein the medical entity-related information includes M disease information collection intentions involved in the second medical record; where M is a positive integer;
[0075] S320, based on M medical condition information collection intentions, determine the third consultation information; wherein, the third consultation information includes L third collection states corresponding to L pre-set medical condition information collection intentions respectively, and the L medical condition information collection intentions include M medical condition information collection intentions, where L is an integer greater than or equal to M;
[0076] S330, process the K third collection states in the third consultation information to obtain the fourth consultation information; where K is a positive integer less than L, and the fourth consultation information includes L fourth collection states corresponding to the L disease information collection intentions respectively;
[0077] S340, based on the fourth and third consultation information, trains a prediction model.
[0078] The prediction model is used to implement the method provided in the above embodiments. Generally, training the prediction model may include adjusting the parameters of the prediction model multiple times until preset conditions are met, such as the output information of the prediction model meeting preset conditions or the number of adjustments reaching a preset threshold. For example, the fourth consultation information and the third consultation information can be used as a pair of sample data, that is, the fourth consultation information is used as the input information in the sample data, the third consultation information is used as the supervision target, the prediction model outputs the predicted fifth consultation information based on the fourth consultation information, and the parameters of the prediction model are adjusted based on the difference between the fifth consultation information and the third consultation information.
[0079] According to the above method, in this embodiment of the application, the fourth and third consultation information can be obtained using the second medical record. The second medical record can be a medical record entity generated by the doctor's consultation, recording each consultation question and corresponding response information during the consultation process. The second medical record can be stored in the form of natural language text.
[0080] By performing entity recognition on the second medical record, medical entities within it can be obtained. These medical entities can refer to entity information within the medical field. For example, the NER (Named Entity Recognition) algorithm can be used to perform entity recognition on the second medical record.
[0081] In this embodiment, medical entity-related information can refer to the attributes or intentions corresponding to the medical entity. For example, a medical entity may include "every noon," "lower limbs," "pain," etc., from which it can be inferred that the doctor inquired about the time of occurrence, specific location, and specific sensation. That is, the above-mentioned medical entities correspond to the intentions of collecting medical information, namely "time of occurrence," "specific location," and "specific sensation," respectively. Exemplarily, in this embodiment, medical entity-related information may include M intentions of collecting medical information related to the second case, or may include the M intentions of collecting medical information and the intention of inquiring about medical information.
[0082] In this embodiment of the application, the M medical condition information collection intentions involved in the second medical record belong to the intentions corresponding to information collected during the consultation process. The collection status corresponding to these intentions can be "collected". Based on this, in the above step S320, determining the third consultation information based on the M medical condition information collection intentions may include marking the collection status of M medical condition information collection intentions out of the pre-set L medical condition information collection intentions as "collected", and marking the collection status of the other medical condition information collection intentions out of the L medical condition information collection intentions other than the M medical condition information collection intentions as "not collected", thus obtaining the third consultation information. That is to say, in the third consultation information, the third collection status of the above M medical condition information collection intentions is "collected", and the third collection status of the other medical condition information collection intentions is "not collected".
[0083] For example, in step S330 above, the K collection states processed from the K third collection states in the third consultation information can be used as K fourth collection states, and the other third collection states can be directly used as fourth collection states. For example, the processing of the K third collection states can include masking the K third collection states to indicate that the K third collection states are unknown. When the K third collection states are masked, the L fourth collection states in the fourth consultation information can include collected, not collected, and masked. Alternatively, the K third collection states can be randomly processed as collected or not collected, and during training, attention can be paid to the K predicted collection states that correspond to the same medical condition information collection intent as the K third collection states. Then, the L fourth collection states in the fourth consultation information can include collected and not collected. Through the processing in step S340 above, the third collection states corresponding to some medical condition information collection intents can be different from the fourth collection states, and the third collection states corresponding to other medical condition information collection intents can be different from the fourth collection states.
[0084] For example, the K third acquisition states can be randomly selected from L third acquisition states. Since K is less than L, only a portion of the information from the L third acquisition states is selected. Alternatively, K third acquisition states can be selected from the L third acquisition states based on a preset ratio, such as 5%, 10%, etc.
[0085] It is understandable that in the above method, entity recognition is performed in the second medical record to obtain the third consultation information corresponding to the real data. Then, by processing the collection status of some of the patient's condition information, a fourth consultation information associated with the third consultation information is obtained. This results in a pair of sample data. Based on this sample data, a prediction model is trained, enabling the model to output another consultation information based on one input consultation information. This can be used to implement a consultation data processing method for automated consultations. This eliminates the need for doctors to spend a lot of time repeatedly asking questions and facilitates the automatic recording of consultation questions. Thus, it saves consultation time and resources and avoids the omission of key information.
[0086] For example, as described above, the medical entity-related information may further include the consultation intent corresponding to the second medical record. Based on this, the aforementioned L disease information collection intents are determined based on the consultation intent. For instance, the aforementioned L disease information collection intents can be determined from a pre-set intent system based on the consultation intent. The consultation intent and intent system can be referred to the corresponding descriptions in the foregoing embodiments.
[0087] This application embodiment also provides a specific training process. For example, step S340 above, training the prediction model based on the fourth and third consultation information, may include:
[0088] Determine the encoded representation of at least a portion of the fourth acquisition status in the fourth consultation information;
[0089] A predictive model is used to process the encoded representation of at least some of the fourth acquisition states to obtain the fifth consultation information; wherein, the fifth consultation information includes K fifth acquisition states that correspond to the same intention of collecting medical information as K third acquisition states;
[0090] The loss value is determined based on K fifth acquisition states and K third acquisition states;
[0091] The parameters of the prediction model are adjusted based on the loss value.
[0092] In other words, the training process involves using a prediction model to process the encoded representation of the fourth acquisition state to obtain the corresponding fifth acquisition state. The third acquisition state is then used as the supervision target. The loss value is determined using the fifth and third acquisition states, and the parameters are adjusted based on this loss value. This loss value can be calculated based on a preset loss function to characterize the difference between the prediction result and the supervision target.
[0093] For example, the above-described encoded representation of at least a portion of the fourth acquisition state in the fourth consultation information includes:
[0094] Based on the preset network model, the vector representation of the consultation intention corresponding to the second medical record, the vector representation of the L intentions to collect medical information, and the vector representation of the L fourth collection states are determined.
[0095] Attention information is determined based on the vector representation of the consultation intent corresponding to the second medical record, the vector representation of the intent to collect L medical condition information, and the vector representation of the fourth collection state.
[0096] Based on the attention information and the j-th fourth acquisition state among the L fourth acquisition states, the encoded representation of the j-th fourth acquisition state is obtained.
[0097] In other words, this prediction model can be an attention network model that processes attention information. The model determines attention information based on the vector representations of each patient information collection intention, the corresponding consultation intention, and the vector representations of each fourth collection state. Specifically, it uses information related to the overall situation of the fourth consultation information as attention information. Based on this attention information and the vector representation of a single fourth collection state, it obtains the encoded representation of that single fourth collection state. Thus, the encoded representation of a single fourth collection state integrates the encoded representations of other fourth collection states, allowing the prediction model to consider the correlation between this patient information collection intention and other patient information collection intentions when predicting the fifth collection state of a single patient information collection intention, thereby improving prediction accuracy.
[0098] For example, the preset model used to determine the vector representation may include an LSTM (Long Short-Term Memory) model. The step of determining attention information based on each vector representation may include determining the encoded representation of each disease information collection intention based on the three vector representations mentioned above; and obtaining attention information based on the encoded representation of each disease information collection intention.
[0099] For example, the vector representation of the consultation intent is denoted as e. main The vector representation of the nth intention to collect patient information is denoted as e. nThe vector representation of the corresponding fourth acquisition state is denoted as e. v Then the encoding representation of the nth intention to collect medical information is E n It can be:
[0100] E n =(e main +e n +e v );
[0101] Three feedforward neural networks are defined: fk, fq, and fv. Using feedforward neural networks, E can be obtained. n The three forward representations are as follows:
[0102] First forward representation E kn =fk(E n );
[0103] Second forward representation E qn =fq(E n );
[0104] Third forward representation E vn =fv(E n ).
[0105] Among them, E kn E qn and E vn All are d-dimensional vectors. The attention information described above can be obtained by matrix multiplication and normalization of the first and second forward representations of each of the L disease information collection intentions. That is, the attention information can be calculated according to the following formula:
[0106] Where Normalize() represents the normalization function; E k This includes the first forward representation of the intent to collect various disease information, such as E. k It consists of L d-dimensional vectors E kn The matrix formed by n, where n is an integer from 1 to L; E q This includes a second forward representation of the intent to collect various disease information, such as E. q It consists of L d-dimensional vectors E qn The matrix formed by n, where n is an integer from 1 to L.
[0107] For the j-th fourth acquisition state, its final encoded representation E out_j It can be determined based on the third forward representation of attention information and its corresponding intent to collect medical condition information. That is:
[0108] E out_j=Attention*E vj .
[0109] For example, the above prediction model can be based on the encoded representation of K fourth acquisition states (i.e., the fourth acquisition states obtained through masking) corresponding to K third acquisition states, and then passed through a fully connected network f. out A binary classification prediction is performed to obtain the prediction result. The prediction result corresponds to the fifth acquisition state, specifically whether acquisition occurred or not. The prediction result and the true result (i.e., the corresponding third acquisition state) are compared using a loss function to obtain the loss value, Loss.
[0110] Loss = loss function (f out (E mask ),Label mask );
[0111] Among them, E mask The encoded representation of the fourth acquisition state, indicating the intent to collect masked patient information, f out (E mask This indicates the fifth acquisition state predicted based on this encoding. mask This represents the corresponding third acquisition state, loss. function () represents the loss function.
[0112] As can be seen, in the above methods, using an attention-based prediction model to predict consultation information is beneficial to improving the prediction effect, thus laying the foundation for the realization of automatic consultation.
[0113] To more clearly illustrate the technical concept of this application, a specific application example is provided below.
[0114] The implementation of this application example mainly includes two parts: predictive model training and predictive model inference, which are implemented using the model training method and the consultation data processing method described above, respectively.
[0115] (I) Prediction Model Training
[0116] Currently, medical records are mainly stored in the form of natural language text. Therefore, the NER algorithm is first used to extract medical entities from the medical records and convert the natural language text into a CRF (Case Record Form). The CRF form can be filled according to the intent system shown in Table 2 of the above embodiments.
[0117] Specifically, each row in the CRF form represents a consultation record, corresponding to a concept graph (equivalent to the consultation intent mentioned above). Assuming there are N concept graphs, each concept graph can correspond to several sub-intents (equivalent to the disease information collection intent mentioned above) according to the intent system, forming an N-row, M-column table, where M is the total number of sub-intents. Based on the extraction of medical entities from the medical record, relevant information is populated into this table, thus updating the table to a CRF form. Furthermore, a random partitioning method can be used to split the information in the CRF form into N... seen and N unseen Two parts, representing the currently known acquisition state and the acquisition state used for prediction, respectively, then N seen Partial data is input into the prediction model for model training, and N is used. unseen The portion is used as the supervision target. The prediction model can be a table-based attention network (TAN).
[0118] The specific execution process is as follows:
[0119] Step 1: Extract entity information from medical records based on the NER algorithm. The NER model is a sequence labeling model that can extract specified key entities from natural language text. The NER model can extract information from medical records according to the entity types set in Table 2.
[0120] Example:
[0121] The original medical record information is as follows: The patient developed neck pain accompanied by right upper limb pain without any obvious cause half a month ago. The pain worsened after exposure to cold or exertion, and the symptoms were relieved after appropriate rest. Correspondingly, the entity extraction results used to record medical entities in the medical record are as follows:
[0122] Entity extraction results
[0123] pain neck Half a month No cause Caught in cold and overworked rest pain Right upper limb Half a month No cause Caught in cold and overworked rest
[0124] Step 2: CRF Form Transformation. A CRF form is a table used to record patient medical information. Each column in the table records the acquisition status of a sub-intention. Assuming there are N main intentions and M sub-intentions, the table will be an N*M table. Each row records a third-party consultation piece of information, and each piece of information includes the third acquisition status of M sub-intentions. If the medical record contains information about a certain sub-intention, then the acquisition status of that sub-intention is recorded as Acquired (True, T), and the acquisition status of other sub-intentions is recorded as Not Acquired (False, T). The CRF form can then be represented as follows:
[0125]
[0126] Step 3: Randomly mask a portion of the information in the CRF form to represent information that the model has not yet collected, i.e., partially collected information, and modify the collection status to M. Each row of information is then updated, recording one fourth collection piece of information, and each fourth collection piece of information includes the fourth collection status of M sub-intents. The new CRF form is as follows:
[0127]
[0128] Step 4: Train the table-based attention network TAN. TAN uses the rows of the table as the smallest computational unit and makes predictions row by row.
[0129] Assumption: The idea graph text is represented by a vector e obtained through an LSTM network. main The nth word intent among multiple sub-intents obtains a vector representation e. n The T / F value at the corresponding position is used to obtain the vector representation e. v Then, according to the above embodiments, the encoded representation E of each position (i.e., each fourth acquisition state) in the table can be obtained. out_j .
[0130] In the CRF form, the acquisition status M is our prediction object, which is encoded as E. mask Through a fully connected network f out Perform binary classification prediction, and compare the predicted result with the actual result. mask We perform prediction using a loss function to obtain the loss value, Loss.
[0131] Loss = loss function (f out (E mask ),Label mask For the specific meanings of the parameters, please refer to the above embodiments.
[0132] The model parameters are then adjusted based on this loss value. Once convergence is achieved, the predictive model can be output for inference.
[0133] (II) Predictive Model Inference
[0134] In real-world medical history collection, the patient first selects a consultation intention graph (equivalent to the consultation intention) to generate a blank CRF form. Then, the TAN model mentioned above is called to predict the sub-intentions for the next consultation under the current intention graph. For example, if the patient selects upper limb pain as the intention graph, the TAN model may predict the sub-intentions for the next consultation as specific location, specific cause, etc. The CRF form is updated based on the patient's answer, and this process is repeated until the consultation ends.
[0135] Step 1: Before each round of consultation begins, the user first selects a concept graph (such as main clinical manifestations, external hospital diagnosis, abnormal physical examination results) from the candidate list, generating a blank CRF form based on the concept graph (which includes multiple rows of information, with each row representing an initial first consultation).
[0136] Here is an example of a blank CRF form:
[0137]
[0138] Step 2: Input the TAN model into a blank CRF form to obtain a new CRF form (which contains multiple lines of information, with each line representing a second consultation). The sub-intent corresponding to T in the new CRF form is used to determine the next consultation question.
[0139] The new CRF form example is as follows:
[0140]
[0141] By comparing the blank CRF form with the new CRF form, it can be seen that in this example, the next question to ask is the time of symptom onset.
[0142] Step 3: Repeat step 2 to update the current CRF form.
[0143] Step 4: If no new data collection status is added in the current round (T) or the number of problem rounds exceeds L, the consultation process ends, and the current CRF form is the final result.
[0144] Step 5: Fill in the CRF form based on the patient's response, as shown in the example below:
[0145]
[0146] It is evident that, in the methods described above, employing an attention-based prediction model to predict consultation information improves prediction accuracy. This allows for automated consultations, eliminating the need for doctors to spend significant time repeatedly asking questions and facilitating the automatic recording of consultation questions. Consequently, it saves consultation time and resources, and prevents the omission of crucial information.
[0147] Corresponding to the application scenarios and methods provided in the embodiments of this application, the embodiments of this application also provide a medical history data processing device 400. (See reference...) Figure 4 The device 400 may include:
[0148] The first consultation information determination module 410 is used to obtain the first consultation information, wherein the first consultation information includes N first collection states corresponding to N disease information collection intentions, where N is a positive integer;
[0149] The second consultation information determination module 420 is used to use a prediction model to predict based on the first consultation information to obtain the second consultation information; wherein, the second consultation information includes N second collection states corresponding to N disease information collection intentions respectively;
[0150] The question output module 430 is used to determine the target intent from N disease information collection intents based on the second consultation information, and output the consultation question corresponding to the target intent.
[0151] Optionally, the N intents for collecting medical information are determined based on the intent for taking medical advice.
[0152] Optionally, the problem output module 430 can be specifically used for:
[0153] In response to the first collection state corresponding to the i-th medical condition information collection intention among N medical condition information collection intentions being "not collected" and the second collection state corresponding to the i-th medical condition information collection intention being "collected", the i-th medical condition information collection intention is determined as the target intention, where i is a positive integer less than or equal to N.
[0154] Optionally, the device 400 may also include:
[0155] The stop module is used to stop determining the target intent in response to the quantity of information related to the consultation question reaching a preset threshold, or the absence of a patient information collection intent where the first collection state is not collected and the second collection state is collected.
[0156] Optionally, the device 400 may also include:
[0157] The recording module is used to obtain response information for consultation questions and generate the first medical record based on the response information.
[0158] This application also provides a model training device 500. (See reference...) Figure 5 The device 500 may include:
[0159] The entity extraction module 510 is used to perform entity recognition based on the second medical record to obtain medical entity-related information in the second medical record. The medical entity-related information includes M disease information collection intentions involved in the second medical record; where M is a positive integer.
[0160] The third consultation information determination module 520 is used to determine the third consultation information based on M medical condition information collection intentions; wherein, the third consultation information includes L third collection states corresponding to L pre-set medical condition information collection intentions, and the L medical condition information collection intentions include M medical condition information collection intentions, where L is an integer greater than or equal to M.
[0161] The fourth consultation information determination module 530 is used to process the K third collection states in the third consultation information to obtain the fourth consultation information; where K is a positive integer less than L, and the fourth consultation information includes L fourth collection states corresponding to L disease information collection intentions respectively;
[0162] Training module 540 is used to train a prediction model based on the fourth and third consultation information.
[0163] Optionally, the medical entity-related information also includes the consultation intent corresponding to the second medical record; the L disease information collection intents are determined based on the consultation intents.
[0164] Optionally, the training module 540 may include:
[0165] The encoding representation determination unit is used to determine the encoding representation of at least a portion of the fourth acquisition state in the fourth consultation information;
[0166] The encoding representation processing unit is used to process the encoding representation of at least a portion of the fourth acquisition state using a prediction model to obtain the fifth consultation information; wherein, the fifth consultation information includes K fifth acquisition states that correspond to the same intention of acquiring medical information as K third acquisition states;
[0167] The loss calculation unit is used to determine the loss value based on K fifth acquisition states and K third acquisition states;
[0168] The parameter tuning unit is used to adjust the parameters of the prediction model based on the loss value.
[0169] Optionally, the encoding representation of the determining unit can be specifically used for:
[0170] Based on the preset network model, the vector representation of the consultation intention corresponding to the second medical record, the vector representation of the L intentions to collect medical information, and the vector representation of the L fourth collection states are determined.
[0171] Attention information is determined based on the vector representation of the consultation intent corresponding to the second medical record, the vector representation of the intent to collect L medical condition information, and the vector representation of the fourth collection state.
[0172] Based on the attention information and the j-th fourth acquisition state among the L fourth acquisition states, the encoded representation of the j-th fourth acquisition state is obtained.
[0173] The functions of each module in each device in the embodiments of this application can be found in the corresponding description in the above method, and they have corresponding beneficial effects, which will not be repeated here.
[0174] This application also provides an electronic device for implementing the above method. Figure 6A structural block diagram of an electronic device according to an embodiment of this application is shown. Figure 6 As shown, the electronic device includes a memory 610 and a processor 620. The memory 610 stores a computer program that can run on the processor 620. When the processor 620 executes the computer program, it implements the medical data processing method or model training method in the above embodiments. The number of memories 610 and processors 620 can be one or more.
[0175] The electronic device also includes:
[0176] The communication interface 630 is used to communicate with external devices and perform data exchange and transmission.
[0177] If the memory 610, processor 620, and communication interface 630 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0178] Optionally, in a specific implementation, if the memory 610, processor 620, and communication interface 630 are integrated on a single chip, then the memory 610, processor 620, and communication interface 630 can communicate with each other through an internal interface.
[0179] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods provided in any embodiment of this application.
[0180] This application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the methods provided in any embodiment of this application.
[0181] This application also provides a chip, which includes a processor for calling and executing instructions stored in a memory, causing a communication device on which the chip is installed to perform the method provided in this application.
[0182] This application also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in the application embodiment.
[0183] It should be understood that the aforementioned processor can be a CPU, but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.
[0184] Further, optionally, the aforementioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Sync Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0185] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.
[0186] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0187] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0188] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process. Furthermore, the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functionality involved.
[0189] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0190] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware, the program being stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.
[0191] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.
[0192] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for processing medical consultation data, comprising: Obtain first consultation information, wherein the first consultation information includes N first collection states corresponding to N disease information collection intentions, where N is a positive integer; A prediction model is used to predict based on the first consultation information to obtain the second consultation information; wherein, the second consultation information includes N second collection states corresponding to the N disease information collection intentions respectively; Based on the second consultation information, one or more target intentions are determined from the N medical condition information collection intentions, and one or more consultation questions corresponding to the target intentions are output; wherein, determining one or more target intentions from the N medical condition information collection intentions includes: in response to the first collection state corresponding to the i-th medical condition information collection intention among the N medical condition information collection intentions being not collected, and the second collection state corresponding to the i-th medical condition information collection intention being collected, the i-th medical condition information collection intention is determined as the target intention, where i is a positive integer less than or equal to N.
2. The method according to claim 1, wherein, The intent behind collecting the N pieces of medical information is determined based on the intent behind the consultation.
3. The method according to claim 1 or 2, wherein, The method further includes: In response to the quantity of information related to the consultation question reaching a preset threshold, or the absence of any intention to collect medical information in the first collection state (not collected) and the second collection state (collected), the determination of the target intention is stopped.
4. The method according to claim 1 or 2, wherein, The method further includes: Obtain response information for the consultation questions, and generate a first medical record based on the response information.
5. A model training method, comprising: Entity recognition is performed based on the second medical record to obtain medical entity-related information in the second medical record, wherein the medical entity-related information includes M disease information collection intentions involved in the second medical record; where M is a positive integer; Based on the M disease information collection intentions, a third consultation information is determined; wherein, the third consultation information includes L third collection states corresponding to L pre-set disease information collection intentions, and the L disease information collection intentions include the M disease information collection intentions, where L is an integer greater than or equal to M; The K third collection states in the third consultation information are processed to obtain the fourth consultation information; where K is a positive integer less than L, and the fourth consultation information includes L fourth collection states corresponding to the L disease information collection intentions respectively; Based on the fourth and third consultation information, a prediction model is trained.
6. The method according to claim 5, wherein, The medical entity-related information also includes the consultation intent corresponding to the second medical record; the L disease information collection intents are determined based on the consultation intents.
7. The method according to claim 5 or 6, wherein, The step of training a prediction model based on the fourth consultation information and the third consultation information includes: Determine the encoded representation of at least a portion of the fourth acquisition state in the fourth consultation information; The prediction model is used to process the encoded representation of at least a portion of the fourth acquisition states to obtain the fifth consultation information; wherein, the fifth consultation information includes K fifth acquisition states that correspond to the same intention of collecting medical information as the K third acquisition states; Based on the K fifth acquisition states and the K third acquisition states, the loss value is determined; Based on the loss value, the parameters of the prediction model are adjusted.
8. The method according to claim 7, wherein, The coded representation of at least a portion of the fourth acquisition state in the fourth consultation information includes: Based on a preset network model, the vector representation of the consultation intent corresponding to the second medical record, the vector representation of the L disease information collection intents, and the vector representation of the L fourth collection states are determined. Based on the vector representation of the consultation intent corresponding to the second medical record, the vector representation of the L disease information collection intents, and the vector representation of the L fourth collection states, attention information is determined; Based on the attention information and the j-th fourth acquisition state among the L fourth acquisition states, the encoded representation of the j-th fourth acquisition state is obtained.
9. A medical consultation data processing device, comprising: The first consultation information determination module is used to obtain the first consultation information, wherein the first consultation information includes N first collection states corresponding to N disease information collection intentions, where N is a positive integer; The second consultation information determination module is used to use a prediction model to predict based on the first consultation information to obtain second consultation information; wherein, the second consultation information includes N second collection states corresponding to the N disease information collection intentions respectively; The question output module is used to determine one or more target intentions from the N medical condition information collection intentions based on the second consultation information, and output one or more consultation questions corresponding to the target intentions; wherein, determining one or more target intentions from the N medical condition information collection intentions includes: in response to the first collection state corresponding to the i-th medical condition information collection intention among the N medical condition information collection intentions being not collected, and the second collection state corresponding to the i-th medical condition information collection intention being collected, determining the i-th medical condition information collection intention as the target intention, where i is a positive integer less than or equal to N.
10. A model training device, comprising: The entity extraction module is used to perform entity recognition based on the second medical record to obtain medical entity-related information in the second medical record, wherein the medical entity-related information includes M disease information collection intentions involved in the second medical record; where M is a positive integer; The third consultation information determination module is used to determine the third consultation information based on the M medical condition information collection intentions; wherein, the third consultation information includes L third collection states corresponding to L pre-set medical condition information collection intentions, and the L medical condition information collection intentions include the M medical condition information collection intentions, where L is an integer greater than or equal to M; The fourth consultation information determination module is used to process K third collection states in the third consultation information to obtain fourth consultation information; where K is a positive integer less than L, and the fourth consultation information includes L fourth collection states corresponding to the L disease information collection intentions respectively; The training module is used to train a prediction model based on the fourth consultation information and the third consultation information.
11. A consultation system, comprising a model training device and a consultation data processing device; wherein, The model training device is used to implement the method of any one of claims 5-8, and the consultation data processing device is used to implement the method of any one of claims 1-4.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein the processor, when executing the computer program, implements the method of any one of claims 1-8.
13. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of any one of claims 1-8.
Citation Information
Patent Citations
Inquiry method and device
CN109545394A