Disease prediction method, device and computer readable storage medium
By combining autoregressive learning and self-supervised contrastive learning with reinforcement learning to fine-tune a disease prediction network, the problems of low symptom recall and high misdiagnosis rate in existing technologies are solved, achieving more efficient disease prediction.
Patent Information
- Application Number
- CN202211535430.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2042-11-30
AI Technical Summary
Existing automated disease diagnosis methods suffer from low symptom recall and high misdiagnosis rates, especially reinforcement learning-based models, which are insufficient in improving symptom inquiry strategies and diagnostic accuracy.
An autoregressive learning approach is used to identify the symptoms to be inquired about. By receiving feedback information, the expected reward value is maximized, and the latent symptoms are predicted cyclically to generate a symptom sequence to determine the disease prediction result. The disease prediction network is fine-tuned by combining self-supervised contrastive learning and reinforcement learning.
It improved the symptom recall rate in the disease prediction process, reduced the misdiagnosis rate, and achieved more accurate disease prediction.
Smart Images

Figure CN115862862B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the Internet field, and includes, but is not limited to, a disease prediction method, apparatus, and computer-readable storage medium. Background Technology
[0002] Currently, in the field of automated disease diagnosis, most methods model the problem based on Markov decision processes and solve it using reinforcement learning (RL). For example, automated diagnosis is viewed as a task-oriented dialogue task, where a deep learning agent is trained to collect latent symptoms during interactions with patients. To alleviate the low learning efficiency of RL-based methods, related techniques also encode medical knowledge and utilize medical knowledge network graphs to improve diagnostic performance. Diseases are grouped into several groups and a two-level hierarchical structure is used for automated disease diagnosis using hierarchical reinforcement learning methods. Furthermore, a policy gradient framework based on generative adversarial networks is used, adding mutual information to the reward function to encourage the model to select the most discriminative symptoms for diagnosis.
[0003] Compared to RL-based diagnostic methods, generative diagnostic methods exhibit stronger performance in symptom prediction. Related techniques focus on detecting symptoms from discourse. Symptom word sequences are encoded using a Bi-directional Long Short-Term Memory (Bi-LSTM) network, and a sequence-to-sequence model is trained based on symptom graphs, document-level, and corpus-level attention mechanisms. A Conditional Random Field (CRF) decoder is then used to identify symptoms. Furthermore, to alleviate the inefficient exploration and sparse reward problems in RL, the techniques also describe automatic diagnosis as a sequence generation problem and use an encoder-based network to learn symptom sequences and a disease classifier from three training tasks.
[0004] Currently, methods for achieving automated diagnosis are mainly based on reinforcement learning, focusing on how to improve the learning efficiency and diagnostic accuracy of diagnostic agents in symptom inquiry strategies. However, these models still have significant gaps to bridge with real-world applications, exhibiting problems such as low symptom recall and high misdiagnosis rates. Summary of the Invention
[0005] This application provides a disease prediction method, apparatus, and computer-readable storage medium, which can be applied to at least the fields of artificial intelligence and medicine, and can improve the symptom recall rate in the disease prediction process, thereby reducing the misdiagnosis rate of disease prediction.
[0006] The technical solution of this application embodiment is implemented as follows:
[0007] This application provides a disease prediction method, comprising: acquiring a disease prediction request; the disease prediction request including at least one overt symptom of a target object; determining a symptom to be inquired based on the at least one overt symptom using an autoregressive learning method; receiving feedback information regarding the symptom to be inquired; determining an expected reward value corresponding to the symptom to be inquired based on the feedback information; performing iterative prediction on the latent symptoms of the target object with the goal of maximizing the expected reward value to obtain a symptom sequence of the target object; and determining a disease prediction result for the target object based on the symptom sequence.
[0008] This application provides a disease prediction device, comprising: an acquisition module for acquiring a disease prediction request; the disease prediction request including at least one overt symptom of a target object; a first determination module for determining a symptom to be inquired based on the at least one overt symptom using an autoregressive learning method; a second determination module for receiving feedback information regarding the symptom to be inquired and determining an expected return value corresponding to the symptom to be inquired based on the feedback information; a cyclic prediction module for cyclically predicting the latent symptoms of the target object with the goal of maximizing the expected return value, thereby obtaining a symptom sequence of the target object; and a third determination module for determining a disease prediction result of the target object based on the symptom sequence.
[0009] In some embodiments, the first determining module is further configured to: obtain a preset symptom set; the symptom set includes preset symptom sequences corresponding to different types of diseases; based on the at least one overt symptom, determine at least one target preset symptom sequence that matches all overt symptoms; randomly select a preset symptom from any target preset symptom sequence, and determine the selected preset symptom as the symptom to be inquired.
[0010] In some embodiments, the second determining module is further configured to: when the feedback information is positive feedback information, determine the expected return value corresponding to the symptom to be inquired as a positive reward value; when the feedback information is negative feedback information, determine the expected return value corresponding to the symptom to be inquired as a negative reward value.
[0011] In some embodiments, the cyclic prediction module is further configured to: obtain the current symptom sequence predicted during the current prediction process and the expected return value of each symptom in the current symptom sequence; the current symptom sequence includes predicted symptoms predicted during each round of prediction, the predicted symptoms including positive symptoms and negative symptoms of the target object; determine the expected total return value based on the expected return value of each symptom in the current symptom sequence; and perform cyclic prediction on the latent symptoms of the target object with the goal of maximizing the expected total return value to obtain the symptom sequence of the target object; the symptom sequence of the target object is a symptom sequence composed of the positive symptoms of the target object.
[0012] In some embodiments, the expected total reward value includes a total positive reward value corresponding to a plurality of positive symptoms and a total negative reward value corresponding to a plurality of negative symptoms; the cyclic prediction module is further configured to: perform cyclic prediction on the latent symptoms of the target object with the goal of maximizing the total positive reward value and minimizing the total negative reward value, to obtain the symptom sequence of the target object.
[0013] In some embodiments, the apparatus further includes: a processing module, configured to delete the negative symptom when, based on the feedback information, it is determined that the predicted symptom obtained in any round of prediction is a negative symptom; and to add the positive symptom to the symptom sequence when, based on the feedback information, it is determined that the predicted symptom obtained in any round of prediction is a positive symptom.
[0014] In some embodiments, the disease prediction method is implemented through a disease prediction network; the disease prediction network includes: a sequence parser, a contrastive learning module, a symptom prediction layer, and a disease prediction layer; the sequence parser is used to extract features from the input original symptom sequence to obtain symptom sequence features; the original symptom sequence includes at least one overt symptom; the contrastive learning module is used to distinguish between homogeneous and heterogeneous sets in the input original symptom sequence based on a self-supervised contrastive approach; the symptom prediction layer is used to cyclically predict the latent symptoms of the target object based on the symptom sequence features to obtain the symptom sequence of the target object; the disease prediction layer is used to determine the disease prediction result of the target object based on the symptom sequence.
[0015] In some embodiments, the apparatus further includes: a model training module for acquiring sample data and inputting the sample data into the disease prediction network; the sample data includes a forward sequence and a random sequence; a contrastive learning module of the disease prediction network determines the masked sequences of the forward sequence under different masking modes; a sequence parser of the disease prediction network extracts features from the forward sequence and the random sequence to obtain forward symptom sequence features and random symptom sequence features; and a masked sequence is used to extract features from the masked sequence to obtain masked symptom sequence features; based on the forward symptom sequence features, the random symptom sequence features, and the masked symptom sequence features, The process involves determining the contrastive loss result of the disease prediction network; determining the predicted symptoms of a sample based on the positive sequence features through the symptom prediction layer of the disease prediction network; determining the predicted disease of a sample based on the positive sequence features through the disease prediction layer of the disease prediction network; inputting the predicted symptoms and the predicted diseases of the samples into a preset loss model, and outputting the symptom loss result of the symptom prediction layer and the disease loss result of the disease prediction layer through the preset loss model; and correcting the model parameters in the disease prediction network based on the contrastive loss result, the symptom loss result, and the disease loss result to obtain the trained disease prediction network.
[0016] In some embodiments, the model training module is further configured to: obtain positive sample sequences composed of symptoms and diseases from a preset corpus; the positive sample sequences include at least one positive sequence; randomly construct at least one random sequence corresponding to the positive sequence from the positive sample sequences; and determine the positive sequence and the random sequence as positive sample data in the sample data.
[0017] In some embodiments, the model training module is further configured to: determine two different masking modes based on the random masking mechanism of the sequence parser; the two different masking modes include a first masking mode and a second masking mode; perform sequence masking processing on the orthogonal sequence under the first masking mode and the second masking mode to obtain a masked sequence of the orthogonal sequence under the first masking mode and a masked sequence under the second masking mode; extract features from the masked sequence under the first masking mode and the out-of-order sequence through the sequence parser of the disease prediction network to obtain orthogonal symptom sequence features and out-of-order symptom sequence features; and extract features from the masked sequence under the second masking mode to obtain masked symptom sequence features.
[0018] In some embodiments, the model training module is further configured to: determine a first contrast loss between the orthogonal symptom sequence features and the masked symptom sequence features using a preset first contrast loss function; and determine a second contrast loss between the orthogonal symptom sequence features and the disordered symptom sequence features using a preset second contrast loss function; wherein the first contrast loss and the second contrast loss constitute the contrast loss result of the disease prediction network.
[0019] In some embodiments, the model training module is further configured to: determine the symptom loss result of the symptom prediction layer based on the sample predicted symptoms and the disease labels in the positive sequence using the symptom prediction cross-entropy loss function in the preset loss model; determine the disease loss result of the disease prediction layer based on the sample predicted diseases and the disease labels in the sample data using the disease prediction cross-entropy loss function in the preset loss model; perform loss fusion processing on the symptom loss result and the disease loss result to obtain a fused loss result; and use the gradient descent method to correct the model parameters in the disease prediction network based on the fused loss result to obtain the trained disease prediction network.
[0020] In some embodiments, the apparatus further includes: a model fine-tuning module, configured to: collect symptom sequences using the trained disease prediction network; determine the loss gradient of the objective function of the disease prediction network based on the symptom sequences; update the loss gradient using preset fine-tuning parameters to obtain an updated objective function; collect symptom sequences again using the disease prediction network corresponding to the updated objective function, and update the objective function of the disease prediction network based on the re-collected symptom sequences, until the disease prediction network can obtain a preset expected return value when making disease predictions.
[0021] This application provides an electronic device, including: a memory for storing executable instructions; and a processor for executing the executable instructions stored in the memory to implement the above-described disease prediction method.
[0022] This application provides a computer program product, which includes a computer program or executable instructions stored in a computer-readable storage medium; wherein, when the processor of an electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the above-mentioned disease prediction method is implemented.
[0023] This application provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the above-described disease prediction method.
[0024] The embodiments of this application have the following beneficial effects: Based on at least one explicit symptom input by the user, an autoregressive learning method is used to determine the symptom to be inquired; feedback information on the symptom to be inquired is received, and the expected reward value corresponding to the symptom to be inquired is determined according to the feedback information; with the goal of maximizing the expected reward value, the latent symptoms of the target object are cyclically predicted to obtain the symptom sequence of the target object; thereby, based on the symptom sequence, the disease prediction result of the target object is determined. Thus, since the latent symptoms of the target object are cyclically predicted with the goal of maximizing the expected reward value, the symptom with the maximum expected reward value can be predicted, thereby accurately predicting the latent symptoms of the target object, improving the symptom recall rate in the disease prediction process, and thus accurately predicting the disease of the target object based on the symptom sequence, reducing the misdiagnosis rate of disease prediction. Attached Figure Description
[0025] Figure 1 This is an optional architecture diagram of the disease prediction system provided in the embodiments of this application;
[0026] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0027] Figure 3 This is an optional flowchart illustrating the disease prediction method provided in the embodiments of this application;
[0028] Figure 4 This is another optional flowchart illustrating the disease prediction method provided in the embodiments of this application;
[0029] Figure 5 This is another optional flowchart illustrating the disease prediction method provided in the embodiments of this application;
[0030] Figure 6 This is a schematic diagram illustrating the implementation process of the training method for the disease prediction network provided in this application embodiment;
[0031] Figure 7 This is a schematic diagram illustrating the implementation process of determining the mask sequence under different masking modes provided in an embodiment of this application;
[0032] Figure 8 This is a schematic diagram of the processing flow of the preset loss model provided in the embodiments of this application;
[0033] Figure 9 This is a schematic diagram of the implementation process of model fine-tuning provided in the embodiments of this application;
[0034] Figure 10 This is a product interface diagram provided in an embodiment of this application;
[0035] Figure 11This is a schematic diagram of the structure of the automatic diagnostic model ComAD according to an embodiment of this application;
[0036] Figure 12 This is a schematic diagram of the algorithm flow corresponding to the model training algorithm provided in the embodiments of this application. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0038] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit the application.
[0039] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0040] Before explaining the risk prediction method in the embodiments of this application, the technical terms involved in the embodiments of this application will be explained first.
[0041] (1) Automatic Diagnostic System (ADS): Automated diagnosis is one of the most important applications of artificial intelligence in the medical field. An automated diagnostic system is a computer system used to communicate with patients. Typically, in addition to patient self-reports, an automated diagnostic system discusses a series of questions about the patient's symptoms and then attempts to predict potential diseases. Symptoms initially reported by the patient are called overt symptoms, while symptoms uncovered through questioning are called latent symptoms. Automated diagnostic systems are usually required to provide the most accurate symptom queries and disease predictions in the shortest possible time. Automated diagnostic systems have great potential in simplifying diagnostic procedures, reducing the cost of collecting patient information, and helping to make better and more efficient decisions.
[0042] (2) Sequence Generation Model (SGM): A sequence generation model is a machine learning model whose input and output are both data sequences. Sequence data includes text streams, video clips, time series data, etc. Auto-regressive learning predicts future behavior based on past behavior and is a commonly used method for learning sequence generation models.
[0043] (3) Reinforcement learning: It is one of the three basic modes of machine learning, alongside supervised learning and unsupervised learning. The optimization goal of reinforcement learning is to learn a policy during the interaction between the intelligent agent and the environment so that the action taken according to the policy can maximize the accumulated expected reward.
[0044] (4) Contrastive Learning (CL): Contrastive learning aims to optimize downstream tasks by learning effective text representations by grouping semantically similar neighbors together and pushing away non-neighbors. A key issue in contrastive learning is how to construct positive sample pairs, and it is suggested that they be used to measure the quality of representations.
[0045] (5) Representation Learning (RL): In machine learning, representation learning is a set of techniques that allow a system to automatically discover the representations needed for feature detection or classification from raw data. Representation learning replaces manual feature engineering, allowing machine learning to use features and perform specific tasks using the learned features.
[0046] Currently, methods for achieving automated diagnosis are mainly based on reinforcement learning, focusing on how to improve the learning efficiency and diagnostic accuracy of symptom inquiry strategies in diagnostic agents. However, these models still have a significant gap to bridge with real-world applications because they often neglect the recall rate of symptom inquiries. If the system cannot accurately retrieve the symptoms a patient is experiencing, it reduces supporting information for disease prediction, impacting diagnostic effectiveness, and also leads to a lack of evidence for disease prediction, thus reducing the credibility and interpretability of the diagnostic results. In other words, a practical automated diagnostic system should possess both high accuracy in disease prediction and high recall in symptom prediction. For example, when inquiring about a middle-aged female patient complaining of positional vertigo and nystagmus (ultimately diagnosed with benign paroxysmal positional vertigo), the system should be able to further inquire about the nature of the following symptoms: nausea, vomiting, lightheadedness, roll test, Dix-Hallpike positional test, and ultimately provide the correct disease prediction (benign paroxysmal positional vertigo). However, most current reinforcement learning-based models typically provide a disease prediction after acquiring only one or two symptoms. Recent work has focused on improving symptom recall during inquiry processes and employing generative models to learn symptoms; however, these models neglect optimization for disease accuracy. Addressing the technical problems of the aforementioned models in related technologies, this application proposes an Automatic Diagnosis Model based on Symptom Aequence Generation Combined with Reinforcement Learning (ComAD). This automatic diagnosis model is a disease prediction network. ComAD uses a Transformer parser as its backbone model, employs an autoregressive pre-training task to learn the symptom sequence generation logic, integrates self-supervised contrastive learning to improve symptom sequence representation performance, and uses reinforcement learning to fine-tune disease prediction accuracy. The key to self-supervised contrastive learning in promoting symptom sequence generation learning lies in utilizing the Transformer's dropout mask mechanism with independent sampling. This mechanism ensures that positive sample pairs use identical symptom sequences as input, and the Transformer hidden state outputs of positive sample pairs differ only in the dropout mask, serving as dropout noise to enhance the training data. Furthermore, an adaptive accelerator mitigates the impact of the restricted policy network of the forgetting preventer on the efficiency of acquiring new tasks. The adaptive accelerator employs an invariant risk minimization mechanism to extract invariant features across different tasks from the replay experience, thereby improving the generalization ability of the diagnostic agent. Furthermore, embodiments of this application also include a linearly decaying replay buffer manager to reduce storage costs.
[0047] The disease prediction method provided in this application embodiment can be implemented through an automatic diagnostic model (i.e., a disease prediction network). In the disease prediction method provided in this application embodiment, firstly, a disease prediction request is obtained; the disease prediction request includes at least one overt symptom of the target object; then, based on at least one overt symptom, an autoregressive learning approach is used to determine the symptom to be inquired; and feedback information regarding the symptom to be inquired is received; based on the feedback information, the expected reward value corresponding to the symptom to be inquired is determined; then, with the goal of maximizing the expected reward value, the latent symptoms of the target object are iteratively predicted to obtain a symptom sequence of the target object; finally, based on the symptom sequence, the disease prediction result of the target object is determined. Thus, since the latent symptoms of the target object are iteratively predicted with the goal of maximizing the expected reward value, the symptom with the maximum expected reward value can be predicted, thereby accurately predicting the latent symptoms of the target object, improving the symptom recall rate in the disease prediction process, and thus accurately predicting the disease of the target object based on the symptom sequence, reducing the misdiagnosis rate of disease prediction.
[0048] The following describes an exemplary application of the disease prediction device according to embodiments of this application. This disease prediction device is an electronic device used to implement a disease prediction method. In one implementation, the disease prediction device (i.e., electronic device) provided in this application embodiment can be implemented as a terminal or as a server. In one implementation, the disease prediction device provided in this application embodiment can be implemented as any terminal with data processing capabilities, such as a laptop, tablet, desktop computer, mobile device (e.g., mobile phone, portable music player, personal digital assistant, dedicated messaging device, portable gaming device), intelligent robot, smart home appliance, medical device, and intelligent vehicle device. In another implementation, the disease prediction device provided in this application embodiment can also be implemented as a server, wherein the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected through wired or wireless communication, which is not limited in this application embodiment. The following will describe an exemplary application when the disease prediction device is implemented as a server.
[0049] See Figure 1 , Figure 1This is an optional architecture diagram of the disease prediction system provided in this application embodiment. This application embodiment illustrates the application of the disease prediction method to a disease prediction application as an example. In the disease prediction application, when the client of the disease prediction application collects at least one overt symptom of the target object (which may refer to a user or a patient), based on the at least one overt symptom, the disease prediction method provided in this application embodiment is used to cyclically predict multiple latent symptoms of the target object, and a symptom sequence of the target object is generated based on the overt and latent symptoms, thereby accurately predicting the disease of the target object based on the symptom sequence. In this application embodiment, the disease prediction system includes at least a terminal 100, a network 200, and a server 300. The server 300 may be the server of the disease prediction application. The server 300 may constitute the disease prediction device of this application embodiment. The terminal 100 is connected to the server 300 through the network 200, which may be a wide area network or a local area network, or a combination of both.
[0050] In this embodiment, terminal 100 obtains user input via a disease prediction application client. This input is used to input at least one overt symptom. In response to the input, terminal 100 generates a disease prediction request corresponding to the input and sends it to server 300 via network 200. Upon receiving the disease prediction request, server 300, based on at least one overt symptom, uses autoregressive learning to determine the symptom to be inquired about; it receives feedback information regarding the symptom; based on the feedback information, it determines the expected return value corresponding to the symptom; then, with the goal of maximizing the expected return value, it iteratively predicts the latent symptoms of the target object to obtain a symptom sequence; finally, based on the symptom sequence, it determines the disease prediction result for the target object. After obtaining the disease prediction result, server 300 can send it to terminal 100 via network 200, and terminal 100's client displays the disease prediction result on the current interface. For example, the disease prediction result could be the disease predicted by the disease prediction device for the target object. For example, when a disease prediction device predicts that a target person has benign paroxysmal positional vertigo (BPPV), the prediction result for the target person will be displayed as BPPV on the current interface.
[0051] In other embodiments, after obtaining the disease prediction result, the server 300 can also query the precaution information corresponding to the disease prediction result and send the precaution information to the terminal. The precaution information is displayed on the terminal's current interface while the disease prediction result is displayed. For example, the precaution information may be about the nursing requirements, dietary conditions, daily care, and other precautions and suggestions for the disease corresponding to the disease prediction result, or it may be about further diagnosis and examination.
[0052] In some embodiments, the disease prediction device can also be implemented as a terminal, that is, the disease prediction method of the embodiments of this application is implemented by the terminal as the execution subject. In the implementation process, the terminal acquires input operations from the target object; the input operations are used to input at least one overt symptom; then, based on at least one overt symptom, the terminal uses an autoregressive learning method to determine the symptom to be inquired; and receives feedback information for the symptom to be inquired; based on the feedback information, it determines the expected return value corresponding to the symptom to be inquired; then, with the goal of maximizing the expected return value, iteratively predicts the latent symptoms of the target object to obtain the symptom sequence of the target object; finally, based on the symptom sequence, it determines the disease prediction result of the target object. After obtaining the disease prediction result of the target object, the terminal displays the disease prediction result on the current interface.
[0053] The disease prediction method provided in this application embodiment can also be implemented based on a cloud platform and through cloud technology. For example, the server 300 mentioned above can be a cloud server. The cloud server can determine the symptoms to be inquired using an autoregressive learning approach; or, the cloud server can determine the expected return value corresponding to the symptoms to be inquired based on feedback information; or, the cloud server can perform cyclical prediction of the latent symptoms of the target object with the goal of maximizing the expected return value to obtain the symptom sequence of the target object; or, the cloud server can determine the disease prediction result of the target object based on the symptom sequence.
[0054] In some embodiments, a cloud storage system may also be included, where at least one overt symptom of the target object can be stored, or feedback information regarding the symptom to be queried can be stored, or the target object's symptom sequence and disease prediction results can be stored. Thus, when a disease prediction request with the same overt symptoms as a disease stored in the cloud server is received, the symptom sequence can be retrieved from the cloud storage and queried sequentially to determine if the user possesses each symptom in the sequence. If so, the disease prediction result stored in the cloud storage can be directly used as the user's diagnosis, thereby improving the efficiency of disease prediction.
[0055] It's important to clarify that cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied in the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.
[0056] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Figure 2 The illustrated electronic device may be a disease prediction device, comprising at least one processor 310, a memory 350, at least one network interface 320, and a user interface 330. The various components of the disease prediction device are coupled together via a bus system 340. It is understood that the bus system 340 is used to implement communication between these components. In addition to a data bus, the bus system 340 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 340.
[0057] The processor 310 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0058] User interface 330 includes one or more output devices 331 that enable the presentation of media content, and one or more input devices 332.
[0059] Memory 350 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. Memory 350 may optionally include one or more storage devices physically located remote from processor 310. Memory 350 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), and volatile memory may be random access memory (RAM). The memory 350 described in this application embodiment is intended to include any suitable type of memory. In some embodiments, memory 350 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or subsets or supersets thereof, as illustrated below.
[0060] Operating system 351 includes system programs for handling various basic system services and performing hardware-related tasks, such as framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; network communication module 352 is used to reach other computing devices via one or more (wired or wireless) network interfaces 320, exemplary network interfaces 320 include: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.; input processing module 353 is used to detect and translate one or more user inputs or interactions from one or more input devices 332.
[0061] In some embodiments, the apparatus provided in this application may be implemented in software. Figure 2 A disease prediction device 354 stored in memory 350 is shown. This disease prediction device 354 can be a disease prediction device in an electronic device, and can be software in the form of programs and plug-ins, including the following software modules: an acquisition module 3541, a first determination module 3542, a second determination module 3543, a cyclic prediction module 3544, and a third determination module 3545. These modules are logically linked and can therefore be arbitrarily combined or further divided according to the functions they implement. The functions of each module will be described below.
[0062] In other embodiments, the apparatus provided in this application can be implemented in hardware. As an example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the disease prediction method provided in this application. For example, the processor in the form of a hardware decoding processor can use one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0063] The disease prediction methods provided in the embodiments of this application can be executed by an electronic device, which can be a server or a terminal. That is, the disease prediction methods in the embodiments of this application can be executed by a server, by a terminal, or by interaction between a server and a terminal.
[0064] Figure 3 This is an optional flowchart illustrating the disease prediction method provided in the embodiments of this application. The following will be combined with... Figure 3 The steps shown will be explained. It should be noted that... Figure 3 The disease prediction method in this example is illustrated using a server as the executing entity. Figure 3 As shown, the method includes the following steps S101 to S105:
[0065] Step S101: Obtain a disease prediction request; the disease prediction request includes at least one overt symptom of the target object.
[0066] Here, a disease prediction request is used to request disease prediction for a target object. In this embodiment, the disease prediction method can be implemented through a disease prediction application, which can be an application that users can interact with to perform disease prediction. In one implementation, the disease prediction application can be installed on the target object's terminal. When the target object has a disease prediction need, it can run the disease prediction application on the terminal and input at least one overt symptom currently existing in the client of the disease prediction application. Here, overt symptoms refer to symptoms actively reported by the target object when running the disease prediction application, i.e., symptoms input by the target object. Based on at least one overt symptom of the target object, the disease prediction application, acting as a doctor agent, can predict multiple latent symptoms of the target. In another implementation, the disease prediction application can also be deployed on a medical consultation platform, for example, it can be deployed on a hospital's medical consultation equipment. In this way, when a patient (i.e. the target) seeks medical treatment at a hospital, a preliminary consultation can be conducted on the medical consultation device. The device can predict and analyze the patient's disease, preliminarily determine the possible diseases the patient may have, and provide medical advice based on the predicted diseases, such as which department and which doctor to see.
[0067] In this embodiment of the application, during the operation of the disease prediction application, the target object (i.e., the user, or a patient) can input an action on the client side of the disease prediction application based on at least one of their current overt symptoms, thereby triggering the server of the disease prediction application to predict the user's disease. The server can be the backend server of the disease prediction application.
[0068] In this embodiment, the current interface of the disease prediction application may include a symptom input area. In this area, the user can input at least one overt symptom using any of the following methods: text input, voice input, or selection input. Specifically, during selection input, the client can provide anthropometric diagrams for different body parts. The user can select the body part corresponding to their overt symptom. In response to the user's selection, the client displays various possible symptoms for that body part on the current interface. The user can then select their current symptom. After the user selects their current symptom, the selected symptom is input as an overt symptom into the client.
[0069] After a user inputs at least one overt symptom, the current interface may also display a confirm button or a diagnosis button. The user can click the confirm button or diagnosis button to begin disease prediction. In other words, after the user clicks the confirm button or diagnosis button, the disease prediction application determines the user's latent symptoms based on the user's input of at least one overt symptom and further predicts the user's disease.
[0070] In this embodiment of the application, when the terminal receives an input operation from the target object through the client, it generates a disease prediction request in response to the input operation.
[0071] Step S102: Based on at least one overt symptom, an autoregressive learning approach is used to determine the symptom to be inquired about.
[0072] Here, the symptom to be inquired refers to the preliminary predicted symptom corresponding to at least one overt symptom input by the target object. In the implementation process, multiple diseases with all overt symptoms can be obtained from the symptom disease dataset. Then, from the symptoms of these multiple diseases, a symptom is randomly selected as the symptom to be inquired. The target object is then preliminarily questioned to further determine the possible latent symptoms that the target object may have.
[0073] A symptom-disease dataset is a pre-built dataset that includes multiple different diseases and the various symptoms associated with each disease. The dataset stores multiple diseases and their associated symptoms, with a mapping relationship between each disease and its multiple symptoms. Different diseases can be mapped to the same symptom. When a disease is identified, multiple symptoms can be retrieved from the symptom-disease dataset based on the mapping relationship; conversely, when a symptom is identified, multiple diseases can be retrieved from the dataset based on the mapping relationship.
[0074] In this embodiment of the application, once at least one overt symptom of the target object is known, based on the at least one overt symptom, all diseases with these overt symptoms can be first identified from the symptom disease dataset based on the mapping relationship between diseases and symptoms. Then, multiple symptoms corresponding to all these diseases can be obtained, and from these multiple symptoms, a symptom can be randomly selected from the other symptoms besides the known overt symptoms as the symptom to be inquired about.
[0075] Autoregressive learning refers to predicting future behavior based on past behavior, and it is a commonly used method in learning sequence generation models. For example, in language models, each time a previous word (x) is used to predict the next word (y), where x and y are words from the same sentence, this prediction method is an autoregressive learning approach. In the embodiments of this application, autoregressive learning can be implemented through an autoregressive model. An autoregressive model (AM) is a process of using itself as a regression variable, that is, using a linear combination of random variables at several previous times to describe a linear regression model of random variables at a certain later time. Autoregressive models are a common form in time series analysis.
[0076] Step S103: Receive feedback information regarding the symptoms to be inquired about; and determine the expected reward value corresponding to the symptoms to be inquired about based on the feedback information.
[0077] Here, feedback information refers to the feedback information from the target object regarding whether they possess the symptom after the client outputs the symptom to be inquired about. In this embodiment, when the server predicts the symptom to be inquired about, it can send the symptom to be inquired about to the terminal, and the terminal outputs the symptom to be inquired about through the client of the disease prediction application.
[0078] In the implementation process, the client of the disease prediction application can present an intelligent medical dialogue page, through which AI-guided diagnosis, pre-diagnosis, and other intelligent medical dialogue scenarios can be realized. The disease prediction application in this embodiment can be implemented as an AI-powered intelligent medical consultation assistant. In this AI-powered intelligent medical consultation assistant, the automatic diagnosis robot can communicate with the target object via instant messaging, sending the predicted symptoms to the target object to inquire whether the target object has the predicted symptoms.
[0079] In this embodiment of the application, when the automatic diagnostic robot communicates with the target object, it can use any of the following methods: text message, voice message, image message, graphic and text message, and video message.
[0080] In some embodiments, the feedback information includes positive feedback information and negative feedback information, wherein positive feedback information refers to feedback information that the target object has the symptoms to be inquired about, and negative feedback information refers to feedback information that the target object does not have the symptoms to be inquired about.
[0081] In this embodiment, determining the expected return value corresponding to the symptom to be inquired about based on feedback information means determining different expected return values for positive and negative feedback information respectively. For example, positive feedback information corresponds to a positive expected return value, and negative feedback information corresponds to a negative expected return value. The range of values for positive and negative expected return values can be preset. After obtaining feedback information, the corresponding expected return value is selected according to the type of feedback information (whether it is positive or negative) or the content of the feedback information.
[0082] In some embodiments, the expected return value may be presented in the form of a reward value, with a positive expected return value corresponding to a positive reward value and a negative expected return value corresponding to a negative reward value.
[0083] In one implementation, since the feedback information corresponding to the symptom to be inquired about includes two completely opposite feedback results—having the symptom and not having the symptom—the expected reward value can be fixed based on the type of feedback information. For example, if the symptom to be inquired about is "cough," then the positive feedback information is "yes," and the negative feedback information is "no." Therefore, the positive reward value can be preset to be a positive number, such as 1; and the negative reward value can be preset to be a negative number, such as -1.
[0084] In another implementation, since the symptom to be inquired about can be a severity-related symptom, and the corresponding feedback information includes severity information, the expected reward value can be selected as a floating value within a range based on the information content of the feedback information (e.g., severity information). For example, if the symptom to be inquired about is "duration of abdominal pain," then the feedback information includes the duration of abdominal pain, and the corresponding expected reward value can be determined based on the duration of abdominal pain. The longer the duration of abdominal pain, the larger the expected reward value; the shorter the duration of abdominal pain, the smaller the expected reward value. For instance, if the range of the expected reward value is [0,1], then the expected reward value for a duration of 1 day of abdominal pain could be 0.1, and the expected reward value for a duration of 7 days of abdominal pain could be 0.8.
[0085] Step S104: With the goal of maximizing the expected return value, the latent symptoms of the target object are cyclically predicted to obtain the symptom sequence of the target object.
[0086] Here, after determining the expected return value corresponding to the symptom to be inquired based on the feedback information, the latent symptoms of the target object can be continuously predicted multiple times with the goal of maximizing the expected return value. In the process of cyclical prediction, after each prediction of a symptom, the predicted symptom is output as the symptom to be inquired, so as to obtain the feedback information of the target object for each symptom to be inquired, so that the expected return value corresponding to the predicted symptom can be obtained in each prediction process.
[0087] In each prediction process, the symptoms that provide positive feedback information to the target object from all the currently predicted symptoms can be used as the basis for prediction, and any symptom of the disease corresponding to these symptoms can be identified as the symptom obtained in this prediction.
[0088] It should be noted that latent symptoms refer to the predicted symptoms that elicit positive feedback from the target object; in other words, latent symptoms are the symptoms that the target object actually possesses. During the cyclical prediction process, both accurate latent symptoms and non-latent symptoms (i.e., symptoms that the target object does not possess) can be predicted. Therefore, when obtaining the symptom sequence of the target object, the predicted non-latent symptoms can be eliminated. In the embodiments of this application, the symptom sequence includes multiple overt symptoms and multiple latent symptoms of the target object.
[0089] In some embodiments, cyclic prediction may have a preset number of predictions, i.e., a cyclic prediction process can be performed for a certain number of predictions. In this embodiment, the number of predictions satisfies a preset convergence condition. This preset convergence condition may be based on the condition that the currently obtained symptom sequence can match a disease, and the matching degree between the symptom sequence and the disease is greater than a matching degree threshold, in which case the current number of predictions in the cyclic prediction is considered to satisfy the preset convergence condition. Alternatively, the preset convergence condition may also be based on the condition that the currently obtained symptom sequence can match a disease, and can only uniquely match one disease, in which case the current number of predictions in the cyclic prediction is considered to satisfy the preset convergence condition.
[0090] Step S105: Based on the symptom sequence, determine the disease prediction results for the target object.
[0091] In this embodiment of the application, after predicting the symptom sequence of the target object, based on each symptom in the symptom sequence, the disease having all the symptoms in the symptom sequence is determined as the disease prediction result of the target object.
[0092] The disease prediction method provided in this application, based on at least one explicit symptom input by a user, uses an autoregressive learning approach to determine the symptom to be inquired about; it receives feedback information on the symptom to be inquired about, and determines the expected reward value corresponding to the symptom to be inquired about based on the feedback information; with the goal of maximizing the expected reward value, it iteratively predicts the latent symptoms of the target object, obtaining a symptom sequence of the target object; and then, based on the symptom sequence, determines the disease prediction result of the target object. Thus, because the latent symptoms of the target object are iteratively predicted with the goal of maximizing the expected reward value, the symptom with the maximum expected reward value can be predicted, thereby accurately predicting the latent symptoms of the target object, improving the symptom recall rate in the disease prediction process, and thus accurately predicting the disease of the target object based on the symptom sequence, reducing the misdiagnosis rate of disease prediction.
[0093] In some embodiments, a disease prediction system includes at least a terminal and a server. The terminal has a disease prediction application installed, which can be an interactive application for preliminary disease prediction. The disease prediction application can be an application that can be installed on a user's mobile terminal or deployed on a medical consultation platform. For example, it could be deployed on a hospital's medical consultation device, where patients can undergo a preliminary consultation and disease prediction based on the device's results, and then seek further assistance from a more specialized doctor. In the disease prediction application, the user (who may be a patient) can input information based on at least one of their current overt symptoms on the application's client side, triggering the application's server to perform a disease prediction. The server can be the application's backend server.
[0094] Figure 4 This is another optional flowchart illustrating the disease prediction method provided in the embodiments of this application, such as... Figure 4 As shown, the method includes the following steps S201 to S212:
[0095] Step S201: The terminal obtains input operations from the target object.
[0096] The input operation is used to input at least one overt symptom. In this embodiment, the target object can perform the input operation through the client of the disease prediction application, inputting at least one overt symptom that the target object currently possesses.
[0097] In this embodiment of the application, when performing an input operation, the target object can input multiple overt symptoms at once in the symptom input area of the current interface of the client, or it can perform multiple input operations in sequence to input multiple overt symptoms.
[0098] For example, in the symptom input area, the target can separate multiple overt symptoms with specific separators, thereby enabling the input of multiple overt symptoms at once. After inputting multiple overt symptoms, clicking the confirm button or diagnosis button on the current interface triggers the disease prediction process of this embodiment. Alternatively, the symptom input area can provide multiple symptom input boxes, where the target can input one overt symptom in each box and click the confirm button or diagnosis button on the current interface to trigger the disease prediction process of this embodiment.
[0099] It should be noted that overt symptoms are equivalent to the chief complaint symptoms during routine consultations; while latent symptoms predicted by the disease prediction method of this application are equivalent to the symptoms that doctors obtain from patients through questioning during routine consultations.
[0100] In step S202, the terminal responds to the input operation and generates a disease prediction request corresponding to the input operation.
[0101] Here, a disease prediction request is used to request a disease prediction for a target object based on the explicit symptoms input by the target object.
[0102] In step S203, the terminal sends a disease prediction request to the server.
[0103] In step S204, the server responds to the disease prediction request by using an autoregressive learning method to determine the symptom to be inquired based on at least one overt symptom.
[0104] In some embodiments, see Figure 5 , Figure 5 This is another optional flowchart illustrating the disease prediction method provided in the embodiments of this application. Figure 5 Step S204 can be achieved through the following steps S2041 to S2043:
[0105] Step S2041: Obtain a preset set of symptoms.
[0106] Here, the symptom set includes pre-defined symptom sequences corresponding to different types of diseases. In other words, the symptom set is a dataset consisting of all symptoms from the symptom-disease dataset. The symptom-disease dataset is a pre-constructed dataset including multiple different diseases and the various symptoms associated with each disease. The symptom-disease dataset stores multiple different diseases and the various symptoms associated with each disease. There is a mapping relationship between each disease and the various symptoms associated with that disease.
[0107] Step S2042: Determine at least one target preset symptom sequence that matches all overt symptoms.
[0108] Here, once at least one overt symptom of the target object is known, based on that overt symptom, from the symptom disease dataset, according to the mapping relationship between diseases and symptoms, all diseases with these overt symptoms can first be identified. Then, the symptom sequence of each of these diseases can be obtained, and the symptom sequence of each disease can be defined as a target preset symptom sequence. At least one target preset symptom sequence includes multiple symptoms.
[0109] In this embodiment of the application, since there may be repeated symptoms in at least one target preset symptom sequence, in order to reduce the data storage space corresponding to at least one target preset symptom sequence, multiple symptoms included in at least one target preset symptom sequence can be obtained to form a symptom set, in which repeated symptoms in different target preset symptom sequences are stored only once.
[0110] Step S2043: Randomly select a preset symptom from any target preset symptom sequence, and determine the selected preset symptom as the symptom to be questioned.
[0111] Here, a preset symptom is selected from any target preset symptom sequence, that is, a preset symptom is randomly selected from a variety of symptoms included in at least one target preset symptom sequence.
[0112] The method for determining the symptom to be inquired about provided in this application involves matching at least one known overt symptom with at least one target preset symptom sequence, and then randomly selecting a preset symptom from the matched target preset symptom sequence as the symptom to be inquired about. In this way, the determined symptom to be inquired about is a symptom included in a disease that matches the overt symptom of the target object, thus ensuring a certain degree of accuracy in the predicted symptom to be inquired about. Furthermore, since the symptom to be inquired about is selected from the target preset symptom sequence that matches the overt symptom of the target object, rather than being randomly selected from a large symptom database, it can also greatly reduce the amount of data processing required for matching the symptom to be inquired about.
[0113] It should be noted that the matching of symptoms and diseases proposed in the embodiments of this application means that the symptom is a symptom of the corresponding disease.
[0114] In step S205, the server sends the symptoms to be queried to the terminal.
[0115] Step S206: The terminal obtains feedback information from the user regarding the symptoms to be inquired about.
[0116] Here, feedback information refers to the feedback information from the target object regarding whether they possess the symptoms described in the text after the client outputs the symptoms to be inquired about.
[0117] In step S207, the terminal sends a feedback message to the server.
[0118] In step S208, the server determines the expected reward value corresponding to the symptom to be inquired based on the feedback information.
[0119] In some embodiments, please continue to see Figure 5 , Figure 5 Step S208 can be achieved through the following steps S2081 to S2042:
[0120] Step S2081: When the feedback information is positive, determine the expected return value corresponding to the symptom to be inquired as a positive reward value.
[0121] Here, the positive reward value can be a positive numerical value. The positive reward value can be determined based on the type of feedback information or the content of the feedback information.
[0122] Step S2082: When the feedback information is negative, determine that the expected reward value corresponding to the symptom to be inquired is a negative reward value.
[0123] Here, the negative reward value can be a negative numerical value. The negative reward value can also be determined based on the type or content of the feedback information.
[0124] In some embodiments, when, based on feedback information, it is determined that the predicted symptom obtained in any round of prediction is a negative symptom, it indicates that the predicted symptom obtained in this round of prediction is not a symptom possessed by the target object, and therefore the negative symptom is deleted. When, based on feedback information, it is determined that the predicted symptom obtained in any round of prediction is a positive symptom, it indicates that the predicted symptom obtained in this round of prediction is a symptom possessed by the target object, therefore, this predicted symptom is the latent symptom of the target object, and the positive symptom is added to the symptom sequence.
[0125] In step S209, the server performs iterative prediction of the latent symptoms of the target object with the goal of maximizing the expected return value, thereby obtaining the symptom sequence of the target object.
[0126] In some embodiments, please continue to see Figure 5 , Figure 5 Step S209 can be achieved through the following steps S2091 to S2093:
[0127] Step S2091: Obtain the current symptom sequence predicted during the current prediction process and the expected reward value of each symptom in the current symptom sequence.
[0128] In this embodiment of the application, the current symptom sequence includes the predicted symptoms obtained in each round of prediction, and the predicted symptoms include the positive symptoms and negative symptoms of the target object.
[0129] Step S2092: Determine the total expected return value based on the expected return value of each symptom in the current symptom sequence.
[0130] Here, the expected total return is the sum of the expected returns of all symptoms in the current symptom sequence.
[0131] Step S2093: With the goal of maximizing the expected total return, the latent symptoms of the target object are cyclically predicted to obtain the symptom sequence of the target object; the symptom sequence of the target object is a symptom sequence composed of the positive symptoms of the target object.
[0132] In some embodiments, the expected total reward value includes positive total reward values corresponding to multiple positive symptoms and negative total reward values corresponding to multiple negative symptoms. To maximize the expected total reward value, iterative prediction of the latent symptoms of the target object can be performed by maximizing the positive total reward value and minimizing the negative total reward value, thereby obtaining a symptom sequence for the target object.
[0133] In this embodiment of the application, the symptom sequence includes multiple overt symptoms and multiple latent symptoms of the target object.
[0134] In step S210, the server determines the disease prediction result for the target object based on the symptom sequence.
[0135] Here, after predicting the symptom sequence of the target object, based on each symptom in the symptom sequence, the disease that has all the symptoms in the symptom sequence is identified as the disease prediction result of the target object.
[0136] In step S211, the server sends the disease prediction results to the terminal.
[0137] Step S212: The terminal displays the disease prediction results on the current interface.
[0138] In other embodiments, after obtaining the disease prediction result, it is also possible to query the precautions information corresponding to the disease in the disease prediction result and send the precautions information to the terminal. The precautions information is displayed on the terminal's current interface while the disease prediction result is displayed. For example, the precautions information may be precautions and suggestions regarding nursing requirements, dietary conditions, and daily care for the disease corresponding to the disease prediction result; or it may be suggestions regarding further diagnosis and examination; or it may be information about the hospital, department, and doctor related to the treatment of the disease; or it may be explanatory information about the disease corresponding to the disease prediction result; or it may be information about medication and treatment methods for the disease; or it may be information about the expected treatment costs for the disease, etc.
[0139] The disease prediction method provided in this application provides a method that iteratively predicts the latent symptoms of a target subject based on at least one overt symptom input by the target subject. This allows for accurate and rapid acquisition of multiple latent symptoms, generating an accurate symptom sequence for the target subject. Based on this symptom sequence, accurate disease prediction and diagnosis can be performed on the target subject. Furthermore, based on the disease prediction results, personalized precautions information can be provided to the target subject. This eliminates the need for the target subject to search for information about their disease on other platforms during the disease prediction process. The disease prediction application provided in this application enables integrated diagnosis and treatment services, thereby improving the user experience of the disease prediction application.
[0140] In some embodiments, the above-described disease prediction method can be implemented through a disease prediction network, which is an automatic diagnostic model. Through this automatic diagnostic model, the disease prediction method provided in the embodiments of this application can be realized.
[0141] In this embodiment, the disease prediction network includes: a sequence parser, a contrastive learning module, a symptom prediction layer, and a disease prediction layer. The sequence parser extracts features from the input original symptom sequence to obtain symptom sequence features; the original symptom sequence includes at least one overt symptom. The contrastive learning module distinguishes between homogeneous and heterogeneous sets in the input original symptom sequence using a self-supervised contrastive approach. The symptom prediction layer iteratively predicts the latent symptoms of the target object based on the symptom sequence features to obtain the target object's symptom sequence. The disease prediction layer determines the disease prediction result for the target object based on the symptom sequence.
[0142] The training method of the disease prediction network provided in the embodiments of this application will be described below. Figure 6 This is a schematic diagram illustrating the implementation flow of the training method for a disease prediction network provided in this application embodiment. The training method for the disease prediction network can be executed using a model training device. The model training device can be a component within a disease prediction device (i.e., an electronic device), meaning it can be a server or a terminal. In this case, the model training device can be a module within the disease prediction device, for example, a model training module. Alternatively, the model training device can be another device independent of the disease prediction device; that is, the model training device is an electronic device other than the server and terminal used to implement the disease prediction method. Figure 6 As shown, the training method for the disease prediction network includes the following steps S301 to S308:
[0143] Step S301: The model training device acquires sample data and inputs the sample data into the disease prediction network; the sample data includes ordinal sequences and random sequences.
[0144] In some embodiments, obtaining sample data in step S301 can be achieved in the following way: First, obtain positive sample sequences composed of symptoms and diseases from a preset corpus; the positive sample sequences include at least one positive sequence; then, randomly construct at least one random sequence corresponding to the positive sequence from the positive sample sequences; finally, determine the positive sample data in the sample data by combining the positive sequence and the random sequence.
[0145] Here, the forward sequence refers to the original sequence without any scrambling. A forward sequence can be randomly selected from the positive sample sequences and scrambled. Scrambling involves changing the positions of the symptoms in the forward sequence to create a new, scrambled sequence with different sequence positions. For example, if the forward sequence includes five symptoms A, B, C, D, and E, it can be represented as [A, B, C, D, E]. After scrambling, the resulting scrambled sequence can be represented as [D, A, E, B, C].
[0146] The number and types of symptoms are exactly the same in any pair of ordinal and random sequences; the only difference is the position of each symptom within the sequence. Position here refers to the chronological order within the corresponding sequence.
[0147] It's important to note that since the positive sample sequence consists of symptoms and their corresponding diseases, both the orthogonal and disordered sequences include not only symptoms but also diseases. Therefore, during implementation, the position of the disease within the sequence can be fixed. Disordering only scrambles the positions of the symptoms in the orthogonal sequence, without changing the position of the disease. For example, suppose the orthogonal sequence includes five symptoms (A, B, C, D, E) and disease (K), then the orthogonal sequence can be represented as [A, B, C, D, E; K]. After disordering, the resulting disordered sequence can be represented as [D, A, E, B, C; K].
[0148] In this embodiment of the application, multiple pairs of sequence pairs consisting of positive and random sequences can be obtained based on multiple positive sequences in the positive sample sequence, and these multiple sequence pairs can be identified as positive sample data, thereby training the disease prediction model based on the constructed positive sample data.
[0149] In step S302, the model training device determines the mask sequence of the orthogonal sequence under different masking modes through the contrastive learning module of the disease prediction network.
[0150] In some embodiments, see Figure 7 , Figure 7 Step S302 can be achieved through the following steps S3021 to S3022:
[0151] Step S3021: Based on the random masking mechanism of the sequence parser, determine two different masking modes; the two different masking modes include a first masking mode and a second masking mode.
[0152] Here, the sequence parser is a parser used to extract features from both ordered and disordered sequences. In this embodiment, the sequence parser can be implemented using a Transformer parser. The first mask mode and the second mask mode can be different random dropout masks in the Transformer parser. Here, random dropout is a method for optimizing artificial neural networks with deep structures (such as Transformer parsers). During the learning process, by randomly setting some weights or outputs of the hidden layers to zero, the co-dependence between nodes is reduced, thereby achieving regularization of the neural network and reducing the structural risk of the model.
[0153] Step S3022: Under the first masking mode and the second masking mode, the ascending sequence is subjected to sequence masking processing to obtain the masked sequence of the ascending sequence under the first masking mode and the masked sequence under the second masking mode.
[0154] In step S303, the model training device extracts features from the orthogonal and disordered sequences using the sequence parser of the disease prediction network to obtain orthogonal symptom sequence features and disordered symptom sequence features; and extracts features from the masked sequence to obtain masked symptom sequence features.
[0155] Please continue to refer to Figure 7 In some embodiments, Figure 7 It is also shown that step S303 can be achieved through the following step S3031:
[0156] Step S3031: Using the sequence parser of the disease prediction network, feature extraction is performed on the masked sequence and the out-of-order sequence under the first masking mode to obtain the orthogonal symptom sequence features and the out-of-order symptom sequence features; and feature extraction is performed on the masked sequence under the second masking mode to obtain the masked symptom sequence features.
[0157] In step S304, the model training device determines the contrastive loss result of the disease prediction network based on the orthogonal symptom sequence features, the disordered symptom sequence features, and the masked symptom sequence features.
[0158] In some embodiments, step S304 can be implemented by: using a preset first contrast loss function to determine a first contrast loss between the orthogonal symptom sequence features and the masked symptom sequence features; and using a preset second contrast loss function to determine a second contrast loss between the orthogonal symptom sequence features and the out-of-order symptom sequence features.
[0159] Here, in the implementation process, the orthogonal symptom sequence features and the masked symptom sequence features can be input into the first contrastive loss function. The first contrastive loss function calculates the contrastive loss between the orthogonal and masked symptom sequence features, yielding the first contrastive loss. The orthogonal and out-of-order symptom sequence features can be input into the second contrastive loss function. The second contrastive loss function calculates the contrastive loss between the orthogonal and out-of-order symptom sequence features, yielding the second contrastive loss. The first and second contrastive losses constitute the contrastive loss result of the disease prediction network.
[0160] In step S305, the model training device determines the predicted symptoms of the sample based on the positive sequence features of the symptom prediction layer of the disease prediction network.
[0161] Here, the symptom prediction layer processes the input orthogonal symptom sequence features and outputs sample predicted symptoms. The sample predicted symptoms are the predicted symptoms corresponding to the input sample data during this round of symptom prediction.
[0162] In step S306, the model training device determines the predicted disease of the sample based on the positive sequence features of the disease prediction layer of the disease prediction network.
[0163] Here, the disease prediction layer processes the input orthogonal symptom sequence features and outputs a sample prediction of the disease. The sample disease prediction is based on the input sample data and the predicted latent symptoms, predicting the disease of the target object in the sample.
[0164] In step S307, the model training device inputs the sample predicted symptoms and sample predicted diseases into the preset loss model, and outputs the symptom loss results of the symptom prediction layer and the disease loss results of the disease prediction layer through the preset loss model.
[0165] In some embodiments, see Figure 8 , Figure 8 Step S307 can be achieved through the following steps S3071 to S3072:
[0166] Step S3071: Using the symptom prediction cross-entropy loss function in the preset loss model, the symptom loss result of the symptom prediction layer is determined based on the predicted symptoms of the samples and the disease labels in the positive sequence.
[0167] Here, in the implementation process, the sample predicted symptoms and the disease labels in the positive sequence can be input into the symptom prediction cross-entropy loss function. Through the symptom prediction cross-entropy loss function, the cross-entropy loss between the sample predicted symptoms and the disease labels in the positive sequence is calculated, and the symptom loss result of the symptom prediction layer is obtained.
[0168] Step S3072: Using the disease prediction cross-entropy loss function in the preset loss model, the disease loss result of the disease prediction layer is determined based on the predicted disease in the sample and the disease label in the sample data.
[0169] Here, in the implementation process, the predicted disease in the sample and the disease label in the sample data can be input into the disease prediction cross-entropy loss function. Through the disease prediction cross-entropy loss function, the cross-entropy loss between the predicted disease in the sample and the disease label in the sample data is calculated, and the disease loss result of the disease prediction layer is obtained.
[0170] Please continue to refer to Figure 8 In some embodiments, the method may further include the following steps S3073 and S3074:
[0171] Step S3073: Perform loss fusion processing on the symptom loss result and the disease loss result to obtain the fused loss result.
[0172] Here, loss fusion processing can be performed by directly summing the symptom loss results and the disease loss results or by performing a weighted summation to obtain the fused loss result.
[0173] Step S3074: Using the gradient descent method, the model parameters in the disease prediction network are corrected based on the fusion loss results to obtain the trained disease prediction network.
[0174] In this embodiment of the application, the gradient descent method can be used to optimize the fusion loss result of the disease prediction network, thereby enabling accurate training of the disease prediction network.
[0175] In step S308, the model training device corrects the model parameters in the disease prediction network based on the contrast loss results, symptom loss results, and disease loss results to obtain the trained disease prediction network.
[0176] In this embodiment, the model parameters in the sequence parser and contrastive learning module can be corrected based on the contrastive loss results; the model parameters in the symptom prediction layer can be corrected based on the symptom loss results; and the model parameters in the disease prediction layer can be corrected based on the disease loss results.
[0177] In some embodiments, after training the disease prediction network, the trained disease prediction network can also be fine-tuned. Figure 9 This is a schematic diagram of the implementation process of model fine-tuning provided in the embodiments of this application, such as... Figure 9 As shown, for the disease prediction network trained above, the method includes the following steps S401 to S404:
[0178] Step S401: Collect symptom sequences using the trained disease prediction network.
[0179] Here, the symptom sequence can be collected by using a trained disease prediction network. This can be achieved by inputting at least one overt symptom into the disease prediction network and then predicting latent symptoms to obtain multiple latent symptoms, thereby obtaining a symptom sequence composed of overt and latent symptoms.
[0180] Step S402: Based on the symptom sequence, determine the loss gradient of the objective function of the disease prediction network.
[0181] Here, the loss gradient of the objective function of the disease prediction network can be obtained by calculating the loss of the symptom sequence features corresponding to the symptom sequence through a preset gradient loss function.
[0182] In step S403, the loss gradient is updated using preset fine-tuning parameters to obtain the updated objective function.
[0183] Here, the preset fine-tuning parameter can be a pre-set parameter, which can be determined based on the training conditions of the disease prediction network, etc.
[0184] Step S404: Using the disease prediction network corresponding to the updated objective function, collect symptom sequences again, and update the objective function of the disease prediction network based on the re-collected symptom sequences until the disease prediction network can obtain the preset expected return value when making disease predictions.
[0185] In this embodiment of the application, after training the disease prediction network to obtain the trained disease prediction network, the disease prediction network can be fine-tuned by combining user simulators or real users for interactive learning. This ensures that the fine-tuned disease prediction network can be applied more accurately to disease prediction tasks, thereby improving the accuracy of disease prediction.
[0186] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario.
[0187] This application addresses the problems of high misdiagnosis rate and low symptom recall rate in current automatic diagnosis models by proposing a new model to simultaneously improve the quality of symptom inquiry and the accuracy of disease prediction in automatic diagnosis. This application designs the model from three different aspects: (1) To improve the recall rate of symptom inquiries, a symptom sequence generation model is constructed, and autoregressive learning is used to obtain symptom prediction logic. (2) To effectively learn order-independent symptom sequence representations, a self-supervised contrastive learning technique is introduced to force symptom sets with different orders to be close in the representation space, while sequences containing different symptom elements are far apart in the representation space, thereby learning effective symptom sequence representations. (3) To improve disease prediction accuracy, a reinforcement learning fine-tuner is constructed based on the jointly trained symptom sequence generation model and disease classification model, and the optimal disease prediction strategy for symptom inquiries is obtained through interactive exploration. This application helps to build an automatic diagnosis robot that is closer to human doctors. Such robots possess professional diagnostic capabilities, much like doctors, which greatly improves the credibility and interpretability of automated diagnostic models, reduces reliance on human intervention, and thus significantly alleviates the predicament of scarce and unevenly distributed medical resources.
[0188] The automatic diagnostic model in this application can be applied to health intelligent consultation products for AI-guided diagnosis, pre-diagnosis, and other intelligent medical dialogue scenarios. Figure 10 This is a product interface diagram provided in the embodiments of this application, such as... Figure 10 As shown, on the current interface of the intelligent health consultation product, users can converse with an automated diagnostic robot, which can then predict the type of disease the user has.
[0189] The solution in this application is mainly applied to the learning scenario of interactive automatic diagnosis strategy based on sequence decision-making. The doctor-patient interaction process is as follows: Initially, the doctor knows some of the initial symptoms reported by patients, which are considered overt symptoms. In each subsequent round of interaction, the doctor agent (i.e., the automatic diagnosis robot) selects a symptom i from the symptom set I and asks the patient if they have this symptom. At the same time, the patient answers True or False to indicate whether they have the specific symptom. During the diagnosis process, the doctor agent can end the symptom inquiry at any time and switch to disease prediction, that is, the doctor agent determines the most likely disease d of a patient from all disease sets D. The goal of the doctor agent is to achieve both high recall of symptom recommendation and high accuracy of disease prediction in as few steps as possible. To this end, this application treats the learning of the doctor-patient dialogue strategy as a Markov Decision Process (MDP) problem and uses reinforcement learning to optimize the strategy. Formally, at time step t, the agent receives the state. Then, actions are selected from the discrete action set A={I, D} that conform to strategy π. The embodiments of this application aim to effectively learn an optimal policy model. This automatic diagnosis model can determine the actions of the doctor agent. Formally, this policy model can be defined as a model that maximizes the following objective, i.e., the following formula (1). In the implementation process, the reward functions of the state and action can be used. The input is fed into the objective function (1), and the optimal policy model corresponding to the disease prediction network is calculated through the objective function (1). In other words, the objective function can be used to calculate the cumulative expected return of the reward function of the state and action in order to maximize the cumulative expected return and obtain the optimal policy model corresponding to the disease prediction network.
[0190] (1).
[0191] in, It is a reward function for states and actions, and argmax is a function that evaluates the set of arguments of the function. argmax(A) is the variable point x (or the set of x) that maximizes A. When the action... When receiving a positive response from the patient Defined as a small positive value, for example, this small positive value can be 1; when the action... When receiving negative responses from patients Defined as a small negative value, for example, this small negative value could be -1; when the action When ∈D and the disease is predicted correctly Defined as a large negative value, for example, this large negative value could be -M, where M is the maximum number of interaction rounds; when the action ∈D and when the disease is predicted incorrectly Defined as a large positive value, for example, this large positive value could be 2*M, where M is the maximum number of interaction rounds. S is the set of all symptoms in the medical system, or the set of all symptoms defined in the current problem. M is the maximum number of interaction rounds. This represents the expected cumulative return under strategy π. It is evident that the more accurate the predicted symptoms and diseases, the better. The larger the value, the better the interaction strategy should be, thus maximizing the expected total return. .
[0192] To optimize the accuracy of symptom and disease prediction, this application follows the Huggingface Transformer, models the dialogue strategy as a sequence generation problem, and uses REINFORCE to optimize the strategy. Figure 11The automatic diagnosis model ComAD, an embodiment of this application, is illustrated. The automatic diagnosis model consists of three parts: 1) a REINFORMCE policy model, i.e., a reinforcement learning agent 151, which is a supportive policy optimization framework; 2) a symptom sequence generator (i.e., symptom prediction layer 152), which predicts symptom sequences based on a Transformer parser and is a core component for alleviating low symptom recall; and 3) a symptom sequence representation contrastive learning module 153, which utilizes self-supervised learning to strengthen the symptom sequence representation and improve symptom and disease prediction performance. During the training of the automatic diagnosis task, this embodiment first uses a portion of real doctor-patient interaction data (including symptom sequences and disease prediction results) to train the symptom sequence generator (i.e., symptom prediction layer 152) and the disease classifier (i.e., disease prediction layer 154) based on an autoregressive loss function and a representation contrastive loss function. Then, the REINFORCE policy is run to collect samples and the policy network is updated based on simulator 155 (or user) rewards. The algorithm for the entire process of the model will be described below.
[0193] The interaction strategy of this application embodiment is described below. This application embodiment uses the online strategy method REINFORCE to train the interaction strategy of the automatic diagnosis model. During the interaction, the doctor agent observes the dialogue state s and executes action a using a greedy strategy. Among them, the greedy strategy This means selecting an action a' in the action space such that The value is maximized. Then, the doctor agent receives the reward r and perceives the next state s'. The tuple (s, a, r, s') is stored in the experience buffer D. This loop continues until the end of the dialogue. In order to learn the policy parameters, this embodiment uses all currently known symptom information as the state, i.e. ,in This refers to the state obtained in each round of querying. The interaction strategy can then be written as a product of a series of conditions, as shown in formula (2). During implementation, a strategy with parameter θ corresponding to the state of all currently known symptom information can be determined. In other words, it is possible to use a strategy with parameter θ to determine the state corresponding to the different known symptoms. Performing a series of multiplications yields a policy function with parameter θ. .
[0194] (2).
[0195] in, Let θ represent the policy function, where the policy function is the state. The distribution of the next action.
[0196] The REINFORCE agent predicts the next symptom or disease and updates its internal "state". Before the end of the doctor-patient dialogue, the doctor agent observes "rewards" from the environment, such as relatively small positive or negative values in each round and significant positive or negative rewards for the dialogue state at the end of the session. The training objective is to minimize the negative cumulative expected reward for the future, as shown by the loss function in Equation (3). In implementation, this can be achieved by calculating reward functions for states and actions. Future cumulative expectations It can also be used to calculate rewards based on different states (i.e., different symptom information). Future cumulative expectations .
[0197] (3).
[0198] In actual training, multiple samples can be obtained using Monte Carlo sampling, and these multiple samples can be used to approximate the expected return, i.e.: This simulates an approximate loss gradient in a session. For each session, The maximum gradient is obtained using the following formula (4). In the implementation process, the loss function is obtained by minimizing the future cumulative expected reward using the above formula (3). Next, the loss function Gradient processing is performed to obtain the loss function. The corresponding loss gradient is obtained, and the loss function is obtained by maximizing the loss gradient. Maximum gradient .
[0199] (4).
[0200] in, It is the length of the current symptom sequence. is the predicted disease corresponding to the current symptom sequence, and N is the total number of samples used based on the current strategy. The optimal strategy can be obtained by optimizing the loss function (3) through the above gradient.
[0201] The symptom sequence generator (i.e., symptom prediction layer 152) is described below. REINFORCE, as an online policy-based reinforcement learning agent, can theoretically explore the policy space autonomously to find the automatic diagnosis policy with the highest cumulative expected future reward, while simultaneously achieving optimal disease prediction accuracy and symptom prediction recall. However, the increasing number and complexity of diseases involve a large number of symptoms, resulting in a large action space for disease-symptom composition, which consumes a significant amount of doctor-agent-user interaction requirements, severely hindering the learning process. In policy composition, symptom prediction occupies the main prediction stage, and the focus of policy exploration is also on the symptom chain. Considering that large-scale pre-trained language models can handle long sequence generation tasks well, this embodiment utilizes a Transformer parser and pre-trains the REINFORCE network based on partially collected symptom-disease text, providing a good starting point for interactive learning and thus improving policy convergence speed. Here, we assume a symptom-disease pre-training corpus: ,in and These correspond to the symptoms and diseases in the sample. This application embodiment uses the maximization of the autoregressive objective function to train the model, thereby learning the symptom query logic in the sample, that is, using past symptoms to predict current symptoms. Formally, this objective function can be defined as the following formula (5). In the implementation process, It is a vector, where each element is a probability value; that is, for predicting symptom sequences. any of the symptoms Determine symptoms The objective function is obtained by summing the probability values of the predicted symptom sequences and then taking the mean of these probability values. .
[0202] (5).
[0203] in, It is the length of the symptom sequence of the h-th sample. Correspondingly, in the transformer parser module, it can be defined as the following formulas (6) to (8):
[0204] (6);
[0205] (7);
[0206] (8).
[0207] Where z is the module number in the transformer parser, and z' is the total number of blocks. It is a predictive symptom sequence. It is a matrix formed by the embedding vectors of the input symptom sequence. This is the positional encoding of the input data. Note: Considering the unordered nature of the symptom sequence, that is, within the same symptom sequence, based on the currently known symptoms, it is sufficient to predict the remaining symptoms, regardless of the order of prediction. Therefore, this embodiment of the application uses... Set to 0, that is . This is the output of the last layer of the transformer parser, which represents the attention weights of the output layer for each word in the vocabulary. It represents the level of attention the output layer pays to each symptom. It is a vector, where each element is a probability value. The logic of the symptom sequence was learned through the above objective. Considering that the symptom sequence carries corresponding disease information, this embodiment of the application can continue to use this label for pre-training from multiple perspectives. For example... Figure 11 As shown, a disease prediction layer is added to the transformer parser to learn the disease prediction logic. This is a text classification task, and the objective function of the classification task is the following formula (9). In the implementation process, arbitrary parameters can be used. Disease distribution below The loss is calculated by inputting the target loss function into the loss function. The loss calculation is performed using the following formula (9).
[0208] (9).
[0209] in, It is the disease label for each sample h. These are the parameters corresponding to the transformer + disease prediction layer. It is a parameter The disease distribution is shown below. To integrate symptom and disease information and conduct joint training, in some embodiments, the learning objective can be upgraded to: .
[0210] The contrastive representation learning module of this application embodiment is described below. The Transformer parser, based on the training corpus, effectively extracts the direct transformation logic of symptoms by minimizing autoregressive loss. However, since training data is usually sparse, and the embedding matrix in the Transformer parser is related to the order of the input words, this may lead to different representations of the same symptom set in different permutations, introducing noise into subsequent symptom recommendations. If the agent can be enhanced to distinguish between "heterogeneous homogeneous" (i.e., symptom sequences containing the same symptoms but with different permutations) and "heterogeneous heterogeneous" sequences during the training phase, it can help the doctor agent master better symptom recommendation and disease prediction logic. To achieve this, the automatic diagnosis model should focus on how to bring together "heterogeneous homogeneous" symptom sequences and separate "heterogeneous heterogeneous" sequences, thereby learning effective symptom sequence representations. For example, the doctor agent should consider "fever, headache, difficulty breathing" and "headache, difficulty breathing, fever" as the same representation, while considering "fever, headache, difficulty swallowing" and "fever, dizziness, difficulty breathing" as different representations. Therefore, this application's embodiments draw upon the method of self-supervised sequence contrastive learning and modify it for the symptom sequence representation learning scenario. This is a random dropout mask that uses independently sampled positive samples. In standard Transformer training, random dropout masks are applied in fully connected layers and attention mechanisms. Accordingly, this application's embodiments apply the symptom sequence... The expression is as follows (that is), where The Transformer input is the last layer of formulas (6) to (8). The network mapping function of `transformer_block`, where μ is the inactivation mask pattern. Given the random masking mechanism of the Transformer, embodiments of this application can easily obtain two sequence representations with the same symptom sequence input but corresponding to different mask patterns, i.e. and Simply feed the same input twice into the encoder, and learn the symptom sequence representation by training with the following noise (10) contrastive estimation loss. During implementation, the similarity between two sequence representations (i.e., sequence features) with different masking patterns can be calculated. For each symptom in the sequence, the similarity between different sequence features in the sequence identifier of the unmasked pattern is calculated. Then, the similarity between different sequence features is summed to obtain the similarity sum. Finally, based on the similarity and sum of similarities between two sequence representations with different masking patterns, the contrast estimation loss between the two sequence representations with different masking patterns is determined. (i.e., the first contrast loss).
[0211] (10).
[0212] Where N is the size of a training batch. sim(a, b) represents the similarity between vectors a and b. Simultaneously, a self-supervised comparison method based on "dissimilar order, same set" to construct positive samples is introduced. In this embodiment, the order of a symptom sequence is shuffled to generate sequences of different orders; these sequences are used as positive samples of the sequence. Negative samples are other sequences containing different symptoms. This embodiment uses sequences... The different sequences of symptoms generated are denoted as Accordingly, in this application embodiment, isomorphic training of the following noise (11) contrastive estimation loss learning is based on sequence representations with "disordered homogeneous sets" as positive samples. During implementation, the similarity between the two sequence representations corresponding to the disordered homogeneous sets, the orthogonal sequence and the disordered sequence, can be calculated. For each symptom in both sequences, the similarity between different sequence features in the orthogonal and disordered sequences is calculated. Then, based on the similarity between the two sequence representations... Perform summation calculations and similarity assessments based on different sequence features in both ordered and disordered sequences. Summation calculation yields two similarity scores. and Finally, based on two similarities and and Determine the loss by comparing the two sequence representations, the orthogonal sequence and the disordered sequence. (i.e., the second contrast loss).
[0213] (11).
[0214] in, It is the k-th sequential sequence of the i-th data in a training batch.
[0215] Next, the training and evaluation process of the automatic diagnostic model (i.e., the ComAD model) provided in the embodiments of this application will be described.
[0216] The model training process is divided into two phases. In the first phase, the ComAD model is trained to simultaneously maximize the symptom autoregressive loss. Achieving high recall for symptom inquiries and disease category likelihood by learning symptom inference relationships. The first stage involves learning the mapping relationship between symptoms and diseases, i.e., the diagnostic logic. The second stage primarily uses interactive reinforcement learning, where the training focuses on enabling the automatic diagnostic agent to actively explore the policy space and further learn better diagnostic strategies. The following algorithm summarizes the model's training process. Figure 12This is a schematic diagram of the algorithm flow corresponding to the model training algorithm provided in the embodiments of this application, such as... Figure 12 As shown, the algorithm consists of two main stages: a generative pre-training stage (hereinafter referred to as the generation stage) and a policy fine-tuning stage (hereinafter referred to as the fine-tuning stage). The objective function of the generation stage combines the objective function of the autoregressive model for predicting symptoms (i.e., the above formula (5)), the cross-entropy loss for disease classification (i.e., the above formula (9)), the noise contrast estimation loss for the inactivation mask (i.e., the above formula (10)), and the noise contrast estimation loss based on "heterogeneous same set" (i.e., the above formula (11)). The fine-tuning stage is based on the generative pre-trained model and combines interactive learning with user simulators or real users.
[0217] See Figure 12 The generation phase includes the following steps S501 to S512.
[0218] Step S501: Input symptom set I, disease set D, and training corpus T.
[0219] Step S502, extract training data (i.e., symptoms and diseases) from the training corpus T. (k=1,…,M).
[0220] In this embodiment, any disease and its corresponding symptoms can be randomly extracted from the training corpus T to form training data. The training data includes positive sample sequences composed of symptoms and diseases; the positive sample sequences include at least one positive sequence.
[0221] Step S503: For each training data point from k=1 to M, randomly select a batch sequence of size W (i.e., ).
[0222] Here, each training data point corresponds to a positive sample sequence, which is a batch sequence of size W.
[0223] Step S504: Randomly construct the ascending sequence from the batch batch sequence. disordered sequence As a positive sample.
[0224] In this embodiment, the forward sequence refers to the original sequence without any scrambling. Scrambling refers to disrupting the positions of symptoms within the forward sequence to create a new scrambled sequence with different sequence positions. A forward sequence can be randomly selected from the positive sample sequences for scrambling.
[0225] Step S505, batch sequence and disordered sequences The input is fed into the Transformer parser, which outputs the features of the orthogonal symptom sequence. and disordered symptom sequence characteristics .
[0226] Here, the Transformer parser is the sequence parser mentioned above. The sequence parser of the disease prediction network can be used to extract features from the masked sequence and the out-of-order sequence in the first masking mode, obtaining the features of the orthogonal symptom sequence and the out-of-order symptom sequence.
[0227] Step S506, re-enter batch sequence The Transformer parser outputs masked symptom sequence features. .
[0228] Here, feature extraction can be performed on the masked sequence to obtain the masked symptom sequence features. The masked sequence is a sequence of positive orders obtained through the contrastive learning module of the disease prediction network, masked under different masking patterns. Different masking patterns can be different random deactivation masks in the Transformer parser.
[0229] Step S507, utilizing the characteristics of the orthogonal symptom sequence and masked symptom sequence features The first contrast loss is calculated based on formula (10). .
[0230] Here, the first contrast loss can be obtained by calculating the contrast loss between the orthogonal symptom sequence features and the masked symptom sequence features through the first contrast loss function (i.e., the above formula (10)).
[0231] Step S508, utilizing the characteristics of the positive sequence of symptoms and disordered symptom sequence characteristics The second contrast loss is calculated based on formula (11). .
[0232] Here, the contrast loss between the orthogonal symptom sequence features and the disordered symptom sequence features can be calculated using the second contrast loss function (i.e., the above formula (11)), thus obtaining the second contrast loss. The first contrast loss and the second contrast loss constitute the contrast loss result of the disease prediction network.
[0233] Step S509, extract the features of the orthogonal symptom sequence. Continue inputting into the symptom prediction layer and the disease prediction layer, and output the predicted symptoms and diseases.
[0234] Step S510: Calculate the cross-entropy loss of the symptom prediction layer according to formula (5). .
[0235] Here, the symptom loss result of the symptom prediction layer, i.e., the cross-entropy loss of the symptom prediction layer, can be determined by using the symptom prediction cross-entropy loss function in the preset loss model, based on the predicted symptoms of the samples and the disease labels in the positive sequence. .
[0236] Step S511: Calculate the cross-entropy loss of the disease prediction layer using formula (9). .
[0237] Here, the disease loss result of the disease prediction layer, i.e., the cross-entropy loss of the disease prediction layer, can be determined by using the disease prediction cross-entropy loss function in the preset loss model, based on the predicted disease in the sample and the disease label in the sample data. .
[0238] Step S512: Combine the above losses and optimize the model using gradient descent to obtain the model policy. .
[0239] In this embodiment, merging the above losses refers to performing loss fusion processing on the symptom loss result and the disease loss result to obtain a fused loss result. Furthermore, a gradient descent method can be used to correct the model parameters in the disease prediction network based on the fused loss result, resulting in the trained disease prediction network, i.e., the model strategy. .
[0240] Please continue reading Figure 12 The fine-tuning stage includes the following steps S513 to S516.
[0241] Step S513, in the model strategy Downsample L trajectories.
[0242] Here, L trajectories refer to different symptom sequences. These symptom sequences can be collected using a trained disease prediction network.
[0243] Step S514: Calculate the gradient of the objective function using formula (4).
[0244] Step S515, using the update function Update the gradient. Wherein, These are preset fine-tuning parameters.
[0245] Step S516: Repeat steps S513 to S515 until the optimal model strategy is obtained. .
[0246] During the evaluation phase, this application primarily uses success rate for assessment. A successful automated diagnosis is defined as the agent retrieving all the patient's latent symptoms and providing a correct disease prediction. This includes two metrics: firstly, the dynamic change in disease prediction accuracy during the training process is used as a test metric; secondly, the recall rate of symptom prediction is also considered. Simultaneously, the average number of dialogue rounds is used to measure diagnostic efficiency; the shorter the number of rounds the doctor agent can complete the acquisition of symptom information and disease diagnosis, the better. Multiple tests can be conducted on all the above test metrics, and the average value is calculated.
[0247] This application addresses the challenges of low symptom recall and disease prediction accuracy in current automatic learning models, as well as difficulties in optimization. It proposes an automatic diagnostic model based on symptom sequence generation and reinforcement learning fine-tuning. The main benefits include: 1) To address the low symptom recall problem, this application constructs a symptom sequence generation model based on a Transformer parser. This model extracts symptom prediction logic through autoregressive learning. Disease classification is added as a joint learning objective to improve convergence efficiency. 2) To address the symptom sequence representation error caused by "heterogeneous same set," this application proposes a contrastive learning method based on constructing positive and negative samples from "heterogeneous same set" and "heterogeneous heterogeneous set." This method, combined with noise contrast estimation loss using an inactivation mask, enhances the model's symptom sequence representation learning ability and improves diagnostic capabilities. 3) To address the problems of poor scalability and difficulty in handling edge cases on a fixed training set, this application designs a method using the REINFORRCE reinforcement learning algorithm to further fine-tune the Transformer parser. This allows the automatic diagnostic model to autonomously explore better diagnostic strategies through interactive learning on a good foundation. 4) Through the above methods, the embodiments of this application help to build a more practical and implementable automated consultation system. Such a consultation system possesses the continuous learning ability of human doctors and the ability to correct errors at low cost. Its deployment efficiency and scalability are greatly enhanced.
[0248] For example, by collecting samples of doctor-patient dialogues in a hospital and using a parser to obtain a set of state-action sequences (i.e., a set of symptoms and a set of diseases), an automated diagnostic system can be quickly deployed. In the implementation process, firstly, symptom sequences and corresponding diseases are parsed from training samples, and then a Transformer parser is trained using the pre-training scheme proposed in this application. Next, the automated diagnostic system is deployed in scenarios such as hospitals or online hospitals, allowing it to interact with real patients. During this process, if a familiar task is encountered, the doctor agent of the automated diagnostic system directly provides a decision. If a new task is encountered, the doctor agent can continue learning by combining the reinforcement learning fine-tuning scheme proposed in this application. As the automated diagnostic system encounters more and more patient and disease information, it will gradually learn increasingly richer strategies and gradually be able to make decisions and responses that are closer to those of an expert. At the same time, with the continuous accumulation of real doctor-patient data and the enrichment of the labeled data pool, this data helps to expand the system agent so that it can cover a larger action space. Ideally, the doctor agent can gradually explore and learn all strategies, and these strategies can all be supported by practice. Ultimately, the automated diagnostic model designed in this application can "train" an excellent general practitioner.
[0249] It should be noted that this application uses a REINFORCE-based same-policy reinforcement learning model, but other same-policy reinforcement learning methods can also be considered, such as Proximal Policy Optimization (PPO). For the PPO algorithm, the sampling method and parameter size can be selected according to the algorithm's characteristics. Additionally, supervised contrastive learning can be used; for example, strong negative samples (hard negatives) can be added to enhance the model's performance in learning symptom representations. The method for obtaining strong negative samples can consider symptom sequences that significantly interfere with the performance of the automatic diagnosis model. For example, if a doctor agent makes the same decision based on sequences I1 and I2, but the actual labels of sequences I1 and I2 are different, sequences I1 and I2 can be used as mutually reinforcing negative samples, making sequences I1 and I2 far apart in the representation space. Specifically, a screening process can be added during training to calculate the similarity between the correctly classified samples in the misclassified category of the incorrect sample and select samples with lower similarity as candidate reinforcing negative samples. The final reinforcing negative samples are then selected based on the specific task. The Transformer parser used in the embodiments of this application can also be replaced by other generative models, such as GPT2, BART, etc.
[0250] It is understood that in the embodiments of this application, if the content involves user information, such as the user's overt symptoms, latent symptoms, symptom sequences and predicted diseases, and if it involves data related to user information or enterprise information, when the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0251] The following continues to describe the exemplary structure of the disease prediction device 354 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the disease prediction device 354 includes: an acquisition module 3541, used to acquire a disease prediction request; the disease prediction request includes at least one overt symptom of a target object; a first determination module 3542, used to determine the symptom to be inquired based on the at least one overt symptom using an autoregressive learning method; a second determination module 3543, used to receive feedback information for the symptom to be inquired; and determine the expected reward value corresponding to the symptom to be inquired based on the feedback information; a cyclic prediction module 3544, used to cyclically predict the latent symptoms of the target object with the goal of maximizing the expected reward value, to obtain the symptom sequence of the target object; and a third determination module 3545, used to determine the disease prediction result of the target object based on the symptom sequence.
[0252] In some embodiments, the first determining module is further configured to: obtain a preset symptom set; the symptom set includes preset symptom sequences corresponding to different types of diseases; based on the at least one overt symptom, determine at least one target preset symptom sequence that matches all overt symptoms; randomly select a preset symptom from any target preset symptom sequence, and determine the selected preset symptom as the symptom to be inquired.
[0253] In some embodiments, the second determining module is further configured to: when the feedback information is positive feedback information, determine the expected return value corresponding to the symptom to be inquired as a positive reward value; when the feedback information is negative feedback information, determine the expected return value corresponding to the symptom to be inquired as a negative reward value.
[0254] In some embodiments, the cyclic prediction module is further configured to: obtain the current symptom sequence predicted during the current prediction process and the expected return value of each symptom in the current symptom sequence; the current symptom sequence includes predicted symptoms predicted during each round of prediction, the predicted symptoms including positive symptoms and negative symptoms of the target object; determine the expected total return value based on the expected return value of each symptom in the current symptom sequence; and perform cyclic prediction on the latent symptoms of the target object with the goal of maximizing the expected total return value to obtain the symptom sequence of the target object; the symptom sequence of the target object is a symptom sequence composed of the positive symptoms of the target object.
[0255] In some embodiments, the expected total reward value includes a total positive reward value corresponding to a plurality of positive symptoms and a total negative reward value corresponding to a plurality of negative symptoms; the cyclic prediction module is further configured to: perform cyclic prediction on the latent symptoms of the target object with the goal of maximizing the total positive reward value and minimizing the total negative reward value, to obtain the symptom sequence of the target object.
[0256] In some embodiments, the apparatus further includes: a processing module, configured to delete the negative symptom when, based on the feedback information, it is determined that the predicted symptom obtained in any round of prediction is a negative symptom; and to add the positive symptom to the symptom sequence when, based on the feedback information, it is determined that the predicted symptom obtained in any round of prediction is a positive symptom.
[0257] In some embodiments, the disease prediction method is implemented through a disease prediction network; the disease prediction network includes: a sequence parser, a contrastive learning module, a symptom prediction layer, and a disease prediction layer; the sequence parser is used to extract features from the input original symptom sequence to obtain symptom sequence features; the original symptom sequence includes at least one overt symptom; the contrastive learning module is used to distinguish between homogeneous and heterogeneous sets in the input original symptom sequence based on a self-supervised contrastive approach; the symptom prediction layer is used to cyclically predict the latent symptoms of the target object based on the symptom sequence features to obtain the symptom sequence of the target object; the disease prediction layer is used to determine the disease prediction result of the target object based on the symptom sequence.
[0258] In some embodiments, the apparatus further includes: a model training module for acquiring sample data and inputting the sample data into the disease prediction network; the sample data includes a forward sequence and a random sequence; a contrastive learning module of the disease prediction network determines the masked sequences of the forward sequence under different masking modes; a sequence parser of the disease prediction network extracts features from the forward sequence and the random sequence to obtain forward symptom sequence features and random symptom sequence features; and a masked sequence is used to extract features from the masked sequence to obtain masked symptom sequence features; based on the forward symptom sequence features, the random symptom sequence features, and the masked symptom sequence features, The process involves determining the contrastive loss result of the disease prediction network; determining the predicted symptoms of a sample based on the positive sequence features through the symptom prediction layer of the disease prediction network; determining the predicted disease of a sample based on the positive sequence features through the disease prediction layer of the disease prediction network; inputting the predicted symptoms and the predicted diseases of the samples into a preset loss model, and outputting the symptom loss result of the symptom prediction layer and the disease loss result of the disease prediction layer through the preset loss model; and correcting the model parameters in the disease prediction network based on the contrastive loss result, the symptom loss result, and the disease loss result to obtain the trained disease prediction network.
[0259] In some embodiments, the model training module is further configured to: obtain positive sample sequences composed of symptoms and diseases from a preset corpus; the positive sample sequences include at least one positive sequence; randomly construct at least one random sequence corresponding to the positive sequence from the positive sample sequences; and determine the positive sequence and the random sequence as positive sample data in the sample data.
[0260] In some embodiments, the model training module is further configured to: determine two different masking modes based on the random masking mechanism of the sequence parser; the two different masking modes include a first masking mode and a second masking mode; perform sequence masking processing on the orthogonal sequence under the first masking mode and the second masking mode to obtain a masked sequence of the orthogonal sequence under the first masking mode and a masked sequence under the second masking mode; extract features from the masked sequence under the first masking mode and the out-of-order sequence through the sequence parser of the disease prediction network to obtain orthogonal symptom sequence features and out-of-order symptom sequence features; and extract features from the masked sequence under the second masking mode to obtain masked symptom sequence features.
[0261] In some embodiments, the model training module is further configured to: determine a first contrast loss between the orthogonal symptom sequence features and the masked symptom sequence features using a preset first contrast loss function; and determine a second contrast loss between the orthogonal symptom sequence features and the disordered symptom sequence features using a preset second contrast loss function; wherein the first contrast loss and the second contrast loss constitute the contrast loss result of the disease prediction network.
[0262] In some embodiments, the model training module is further configured to: determine the symptom loss result of the symptom prediction layer based on the sample predicted symptoms and the disease labels in the positive sequence using the symptom prediction cross-entropy loss function in the preset loss model; determine the disease loss result of the disease prediction layer based on the sample predicted diseases and the disease labels in the sample data using the disease prediction cross-entropy loss function in the preset loss model; perform loss fusion processing on the symptom loss result and the disease loss result to obtain a fused loss result; and use the gradient descent method to correct the model parameters in the disease prediction network based on the fused loss result to obtain the trained disease prediction network.
[0263] In some embodiments, the apparatus further includes: a model fine-tuning module, configured to: collect symptom sequences using the trained disease prediction network; determine the loss gradient of the objective function of the disease prediction network based on the symptom sequences; update the loss gradient using preset fine-tuning parameters to obtain an updated objective function; collect symptom sequences again using the disease prediction network corresponding to the updated objective function, and update the objective function of the disease prediction network based on the re-collected symptom sequences, until the disease prediction network can obtain a preset expected return value when making disease predictions.
[0264] It should be noted that the description of the apparatus in this application embodiment is similar to the description of the method embodiment described above, and has similar beneficial effects as the method embodiment; therefore, it will not be repeated. For technical details not disclosed in this apparatus embodiment, please refer to the description of the method embodiment of this application for understanding.
[0265] This application provides a computer program product comprising a computer program or executable instructions, which are computer instructions; the computer program or executable instructions are stored in a computer-readable storage medium. When the processor of an electronic device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, the electronic device performs the method described in this application embodiment.
[0266] This application provides a storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to perform the method provided in this application, for example... Figure 3 The method shown.
[0267] In some embodiments, the storage medium may be a computer-readable storage medium, such as a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic surface memory, optical disc, or a compact disk-read-only memory (CD-ROM); or it may be a device that includes one or any combination of the above-mentioned memories.
[0268] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0269] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file containing other programs or data, for example, in one or more scripts within a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., files storing one or more modules, subroutines, or code sections). As an example, executable instructions may be deployed to execute on a single electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0270] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A disease prediction method, characterized by, The method comprises: obtaining a disease prediction request; the disease prediction request comprises at least one explicit symptom of a target object; based on the at least one explicit symptom, determining a to-be-inquired symptom by using an autoregressive learning method; receiving feedback information for the to-be-inquired symptom; when the feedback information is positive feedback information, determining that an expected return value corresponding to the to-be-inquired symptom is a positive reward value; when the feedback information is negative feedback information, determining that an expected return value corresponding to the to-be-inquired symptom is a negative reward value; obtaining a current symptom sequence predicted in a current prediction process and an expected return value of each symptom in the current symptom sequence; the current symptom sequence comprises a predicted symptom obtained in each round of prediction process, and the predicted symptom comprises a positive symptom of the target object and a negative symptom of the target object; based on the expected return value of each symptom in the current symptom sequence, determining an expected total return value; based on a preset symptom set, performing cyclic prediction on an implicit symptom of the target object to obtain a symptom sequence of the target object, so as to maximize the expected total return value; the symptom sequence of the target object is a symptom sequence composed of positive symptoms of the target object; based on the symptom sequence, determining a disease prediction result of the target object.
2. The method of claim 1, wherein, The method comprises: obtaining a preset symptom set; the symptom set comprises a preset symptom sequence corresponding to different types of diseases; determining at least one target preset symptom sequence matched with all explicit symptoms; randomly selecting a preset symptom from any target preset symptom sequence, and determining the selected preset symptom as the to-be-inquired symptom.
3. The method of claim 1, wherein, The expected total return value comprises a positive total reward value corresponding to a plurality of positive symptoms and a negative total reward value corresponding to a plurality of negative symptoms; The method comprises: based on the feedback information, when the predicted symptom obtained in any round of prediction process is a negative symptom, deleting the negative symptom; 4. The method of claim 1, wherein, based on the feedback information, when the predicted symptom obtained in any round of prediction process is a positive symptom, adding the positive symptom to the symptom sequence. The disease prediction method is implemented by a disease prediction network; The disease prediction network comprises a sequence parser, a contrast learning module, a symptom prediction layer, and a disease prediction layer; 5. The method according to any one of claims 1 to 4, characterized in that, The sequence parser is configured to perform feature extraction on an input original symptom sequence to obtain a symptom sequence feature; the original symptom sequence comprises the at least one explicit symptom; The contrast learning module is configured to distinguish between a same-set different-order and a different-set different-order in the original symptom sequence based on a self-supervised contrast method. The symptom prediction layer is configured to cyclically predict the implicit symptoms of the target object based on the symptom sequence feature, to obtain a symptom sequence of the target object. The disease prediction layer is configured to determine a disease prediction result of the target object based on the symptom sequence.
6. The method of claim 5, wherein, The disease prediction network is trained by the following steps: obtaining sample data and inputting the sample data into the disease prediction network; the sample data includes an in-order sequence and a disordered sequence; determining, by a contrast learning module of the disease prediction network, a mask sequence of the in-order sequence under different mask modes; extracting features of the in-order sequence and the disordered sequence by a sequence parser of the disease prediction network to obtain in-order symptom sequence features and disordered symptom sequence features; and extracting features of the mask sequence to obtain mask symptom sequence features; determining a contrast loss result of the disease prediction network based on the in-order symptom sequence features, the disordered symptom sequence features and the mask symptom sequence features; determining a sample predicted symptom based on the in-order symptom sequence features by a symptom prediction layer of the disease prediction network; determining a sample predicted disease based on the in-order symptom sequence features by a disease prediction layer of the disease prediction network; inputting the sample predicted symptom and the sample predicted disease into a preset loss model, and outputting a symptom loss result of the symptom prediction layer and a disease loss result of the disease prediction layer by the preset loss model respectively; based on the contrast loss result, the symptom loss result and the disease loss result, correcting model parameters in the disease prediction network to obtain a trained disease prediction network.
7. The method of claim 6, wherein, The sample data includes: obtaining an in-order sample sequence composed of symptoms and diseases from a preset corpus; the in-order sample sequence includes at least one in-order sequence; randomly constructing a disordered sequence corresponding to the in-order sequence from the in-order sample sequence; determining the in-order sequence and the disordered sequence as in-order sample data in the sample data.
8. The method of claim 6, wherein, The contrast learning module of the disease prediction network determines the mask sequence of the in-order sequence under different mask modes, including: determining two different mask modes based on a random mask mechanism of the sequence parser; the two different mask modes include a first mask mode and a second mask mode; performing sequence mask processing on the in-order sequence under the first mask mode and the second mask mode to obtain a mask sequence of the in-order sequence under the first mask mode and a mask sequence of the in-order sequence under the second mask mode; correspondingly, the sequence parser of the disease prediction network extracts features of the in-order sequence and the disordered sequence to obtain in-order symptom sequence features and disordered symptom sequence features; and extracts features of the mask sequence to obtain mask symptom sequence features, including: The sequence parser of the disease prediction network is used to perform feature extraction on the masked sequence in the first mask mode and the disordered sequence, to obtain an in-sequence symptom sequence feature and a disordered symptom sequence feature; and perform feature extraction on the masked sequence in the second mask mode, to obtain a masked symptom sequence feature.
9. The method of claim 6, wherein, The contrast loss result of the disease prediction network is determined based on the in-sequence symptom sequence feature, the disordered symptom sequence feature and the masked symptom sequence feature, including: a first contrast loss between the in-sequence symptom sequence feature and the masked symptom sequence feature is determined by using a preset first contrast loss function; a second contrast loss between the in-sequence symptom sequence feature and the disordered symptom sequence feature is determined by using a preset second contrast loss function; The first contrast loss and the second contrast loss constitute the contrast loss result of the disease prediction network.
10. The method of claim 6, wherein, The symptom prediction layer symptom loss result and the disease prediction layer disease loss result are output by the preset loss model, including: a symptom prediction cross-entropy loss function in the preset loss model is used to determine the symptom prediction layer symptom loss result based on the sample predicted symptom and the disease label in the in-sequence sequence; a disease prediction cross-entropy loss function in the preset loss model is used to determine the disease prediction layer disease loss result based on the sample predicted disease and the disease label in the sample data; Correspondingly, the method further includes: loss fusion processing is performed on the symptom loss result and the disease loss result to obtain a fusion loss result; a gradient descent method is used to correct the model parameters in the disease prediction network based on the fusion loss result, to obtain a trained disease prediction network.
11. The method of claim 6, wherein, The method further includes: a symptom sequence is collected by using the trained disease prediction network; a loss gradient of an objective function of the disease prediction network is determined based on the symptom sequence; a preset fine-tuning parameter is used to update the loss gradient to obtain an updated objective function; the disease prediction network corresponding to the updated objective function is used to collect a symptom sequence again, and the objective function of the disease prediction network is updated based on the symptom sequence collected again, until the disease prediction network can obtain a preset expected return value when performing disease prediction.
12. A disease prediction device, comprising: The device includes: an acquisition module configured to acquire a disease prediction request; the disease prediction request includes at least one explicit symptom of a target object; a first determination module configured to determine a to-be-inquired symptom by using an autoregressive learning manner based on the at least one explicit symptom; a second determination module configured to receive feedback information for the to-be-inquired symptom; when the feedback information is positive feedback information, an expected return value corresponding to the to-be-inquired symptom is determined as a positive reward value; when the feedback information is negative feedback information, an expected return value corresponding to the to-be-inquired symptom is determined as a negative reward value; The cycle prediction module is configured to obtain a current symptom sequence predicted in a current prediction process and an expected return value of each symptom in the current symptom sequence, wherein the current symptom sequence comprises a predicted symptom predicted in each round of the prediction process, and the predicted symptom comprises a positive symptom of the target object and a negative symptom of the target object. The third determination module is configured to determine a disease prediction result of the target object based on the symptom sequence. The computer executable instructions or the computer program, when executed by the processor, implement the method of any one of claims 1 to 11. The electronic device comprises:
13. A computer-readable storage medium, characterized in that, The memory is configured to store executable instructions.
14. A computer program product comprising computer-executable instructions or a computer program, characterized in that, The processor is configured to execute the executable instructions stored in the memory to implement the disease prediction method of any one of claims 1 to 11.
15. An electronic device, comprising: The computer executable instructions or the computer program, when executed by the processor, implement the method of any one of claims 1 to 11. The electronic device comprises: The memory is configured to store executable instructions. The processor is configured to execute the executable instructions stored in the memory to implement the disease prediction method of any one of claims 1 to 11.
Citation Information
Patent Citations
Disease type prediction method, device, equipment and system
CN112349409A
Interrogation processing method and device, equipment and storage medium
CN114300127A