CN117151088A - Text processing method and device, electronic equipment and storage medium - Google Patents

Text processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117151088A
CN117151088A CN202311243188.8A CN202311243188A CN117151088A CN 117151088 A CN117151088 A CN 117151088A CN 202311243188 A CN202311243188 A CN 202311243188A CN 117151088 A CN117151088 A CN 117151088A
Authority
CN
China
Prior art keywords
processing
text
result
record text
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311243188.8A
Other languages
Chinese (zh)
Inventor
孙继超
吴贤
郑冶枫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202311243188.8A priority Critical patent/CN117151088A/en
Publication of CN117151088A publication Critical patent/CN117151088A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The embodiment of the application provides a text processing method, a text processing device, electronic equipment and a computer readable storage medium, and relates to the field of natural language processing. The embodiment of the application determines a target diagnosis record text; performing contextual learning processing on the target diagnosis record text based on the generated language model, and determining a structural result of the target diagnosis record text; generating a thinking chain path according to the structured result of the target diagnosis record text; and carrying out progressive query processing through the generated language model based on the thinking chain path and the structured result of the target diagnosis record text so as to obtain a target processing result. The embodiment of the application does not need to finely tune the generated language model, greatly saves the processing time, and obviously improves the accuracy of the finally obtained target processing result compared with the prior art because the thought chain logic refers to the clinical reasoning logic.

Description

Text processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of natural language processing technology, and in particular, to a text processing method, apparatus, electronic device, computer readable storage medium, and computer program product.
Background
With the widespread use of artificial intelligence in the medical field, artificial intelligence (Artificial Intelligence, AI) technology is becoming increasingly popular as an auxiliary diagnostic technology for medical applications.
Related art text-based auxiliary diagnostic systems mainly have two ways:
mode 1: a supervised classification model;
mode 2: generating a large language model (Large Language Model, LLM);
the two modes have respective defects, the mode 1 needs high-quality diagnosis records and diagnosis results of the mobile phone, a certain amount of manual work is needed in data collection, cleaning, filtering and label standardization, and the learned knowledge is limited due to the limitation of model parameters, so that the reasoning capability of the long text diagnosis records is poor; mode 2 performs unstably in the face of long text visit notes, often gives similar but wrong answers, and the fine tuning is particularly costly due to the large amount of parameters.
Disclosure of Invention
Embodiments of the present application provide a text processing method, apparatus, electronic device, computer readable storage medium, and computer program product, which can solve the above-mentioned problems of the prior art. The technical scheme is as follows:
According to a first aspect of an embodiment of the present application, there is provided a method for processing a diagnosis record text, the method including:
determining a target diagnosis record text;
performing contextual learning processing on the target diagnosis record text based on a generated language model, and determining a structural result of the target diagnosis record text, wherein the structural result comprises a plurality of paragraphs of the diagnosis record text, and each paragraph is information of a corresponding diagnosis and treatment project;
generating a thinking chain path according to the structured result of the target diagnosis record text, wherein the thinking chain path is used for representing the processing sequence of each paragraph of the target diagnosis record text;
and carrying out progressive query processing through the generated language model based on the thinking chain path and the structured result of the target diagnosis record text so as to obtain a target processing result.
Performing contextual learning processing on the target diagnosis record text based on a generated language model, and determining a structured result of the target diagnosis record text, including:
based on a sample diagnosis record text, a structured result of the sample diagnosis record text, the target diagnosis record text and a first prompt instruction, performing contextual learning processing through the generated language model, and obtaining the structured result of the target diagnosis record text output by the generated language model;
The first prompting instruction is used for indicating to obtain a structured result of the target diagnosis record text.
As an alternative embodiment, the number of the mental chain paths is at least two;
the step of carrying out progressive query processing through the generated language model based on the structured result of the thinking chain path and the target diagnosis record text so as to obtain a target processing result comprises the following steps:
for each thinking chain path, carrying out progressive query processing through the generated language model based on the structured results of the thinking chain path and the target diagnosis record text to obtain at least one reference processing result of the target diagnosis record text under the thinking chain path;
the target processing result is determined from a plurality of reference processing results by a self-rightness voting scheme.
As an optional implementation manner, the step of performing progressive query processing through the generated language model based on the structured result of the thought chain path and the target diagnosis record text to obtain at least one reference processing result of the target diagnosis record text under the thought chain path includes:
Adjusting the temperature parameters of the generated language model to obtain at least one new generated language model, wherein the temperature parameters of any two generated language models are different, and the temperature parameters are used for controlling the randomness of the output of the generated language model;
and for each new generated language model, carrying out progressive query processing through the new generated language model based on the thinking chain path and the structured result of the target diagnosis record text, and obtaining at least one reference processing result of the target diagnosis record text under the thinking chain path.
As an alternative embodiment, based on the structured results of the mental chain path and the target diagnosis record text, performing progressive query processing through the generated language model to obtain at least one reference processing result of the target diagnosis record text under the mental chain path, including:
based on the thinking chain path, the structured result of the target diagnosis record text and a second prompt instruction corresponding to the processing sequence, carrying out progressive query processing through a generated language model to obtain at least one reference processing result output by the generated language model;
The second prompting instruction is used for indicating that a staged processing result is obtained according to the inputted paragraph, and the reference processing result is the last staged processing result.
As an optional implementation manner, the step of performing progressive query processing through a generative language model based on the thinking chain path, the structured result of the target diagnosis record text and the second prompt instruction corresponding to the processing sequence to obtain at least one reference processing result output by the generative language model includes:
determining a second prompt instruction corresponding to the paragraphs in the first processing order according to the first processing paragraphs and the thought chain path, carrying out query processing through the generated language model based on the paragraphs in the first processing order and the corresponding second prompt instruction, obtaining a staged processing result of the target diagnosis record text in the thought chain path, and determining the paragraphs in the first processing order as inputted paragraphs;
repeating the following steps from the second processed paragraph until each paragraph in the structured result is processed, and obtaining at least one reference processing result output by the generated language model:
Determining a paragraph of the current processing sequence and a corresponding second prompt instruction according to the input paragraph and the thinking chain path;
and carrying out query processing through the generated language model based on the paragraphs with the current processing sequence and the corresponding second prompt instructions to obtain a staged processing result of the target diagnosis record text in the thought chain path, and determining the paragraphs with the current processing sequence as inputted paragraphs.
As an alternative embodiment, the determining the target processing result from the multiple reference processing results through the self-rightness voting scheme includes:
counting the occurrence frequency of each reference processing result, and taking the occurrence frequency as the voting number of the corresponding reference processing result;
the reference processing result with the highest vote count is taken as the target processing result.
As an optional implementation manner, the performing, by the generative language model, a contextual learning process based on the sample diagnosis record text, the structured result of the sample diagnosis record text, the target diagnosis record text, and the first prompt instruction further includes:
determining target text characteristics of the target diagnosis record text;
Determining a preset number of text features with highest similarity with the target text features from a preset sample feature set, taking the text features as reference text features, and taking a history visit record text corresponding to the reference text features as the sample visit record text;
wherein the sample feature set includes text features of at least one historical visit record.
According to a second aspect of the embodiment of the present application, there is provided a method for processing a diagnosis record text, the method including:
displaying at least one edit box, wherein each edit box is used for inputting information of at least one corresponding diagnosis and treatment item, and the information is text information of natural language;
responding to the information input in all edit boxes, and displaying auxiliary diagnosis results;
the auxiliary diagnosis result is obtained based on the processing method of the first aspect by taking the information input by the input box as a target diagnosis text.
According to a third aspect of an embodiment of the present application, there is provided a processing apparatus for a diagnosis record text, the apparatus including:
the diagnosis record determining module is used for determining target diagnosis record text;
the structuring module is used for carrying out contextual learning on the target diagnosis record text based on the generated language model, and determining a structuring result of the target diagnosis record text, wherein the structuring result comprises a plurality of paragraphs of the diagnosis record text, and each paragraph is information of a corresponding diagnosis and treatment project;
The path generation module is used for generating a thinking chain path according to the structured result of the target diagnosis record text, wherein the thinking chain path is used for representing the processing sequence of each paragraph of the target diagnosis record text;
and the progressive query module is used for carrying out progressive query processing through the generated language model based on the thinking chain path and the structural result of the target diagnosis record text so as to obtain a target processing result.
According to a fourth aspect of an embodiment of the present application, there is provided a processing apparatus for a diagnosis record text, the apparatus including:
the system comprises an edit box display module, a first display module and a second display module, wherein the edit box display module is used for displaying at least one edit box, each edit box is used for information belonging to at least one corresponding diagnosis and treatment project, and the information is text information of natural language;
the result display module is used for responding to the information input in all the edit boxes and displaying auxiliary diagnosis results;
the auxiliary diagnosis result is obtained by taking the information input by the input box as a target diagnosis text and based on the diagnosis record text processing device in the third aspect.
According to another aspect of an embodiment of the present application, there is provided an electronic device including a memory, a processor, and a computer program stored on the memory, the processor executing the computer program to implement the steps of the above-described processing method of the diagnosis record text.
According to still another aspect of the embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described method of processing a diagnosis record text.
According to an aspect of an embodiment of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the steps of the above-mentioned method for processing a visit record text.
The technical scheme provided by the embodiment of the application has the beneficial effects that:
the application relates to a method for diagnosing a disease, which comprises the steps of determining a target diagnosis record text, carrying out contextual learning processing on the target diagnosis record text based on a generated language model, determining a structured result of the target diagnosis record text under the condition that fine adjustment is not needed for a model through the contextual learning processing, wherein the structured result comprises a plurality of paragraphs of the diagnosis record text, each paragraph is information of a corresponding diagnosis and treatment item, the diagnosis item is taken as the structured result, the information referenced by a doctor for diagnosing the disease is consistent with the information referenced by a patient, further, a thinking chain path is generated according to the structured result, the thinking chain path represents the processing sequence of each paragraph of the target diagnosis record text, the paragraphs are sequentially input into the generated language model based on the processing sequence represented by the thinking chain path, the method is equivalent to converting an original problem into a plurality of sub-problems or intermediate steps, carrying out interaction with the generated language model in a progressive manner, carrying out auxiliary diagnosis on the disease, continuously obtaining intermediate answers, finally guiding the generated language model to obtain final target diagnosis results, namely carrying out the auxiliary diagnosis on the auxiliary diagnosis with the same time as the final target diagnosis results, and carrying out the fine adjustment is not needed for the clinical diagnosis, and the clinical diagnosis results are improved in comparison with the clinical diagnosis results.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
FIG. 1a is a schematic diagram of an implementation environment provided by an embodiment of the present application;
fig. 1b is a schematic structural diagram of a server according to an embodiment of the present application;
FIG. 1c is a schematic diagram of a web page end according to an embodiment of the present application;
fig. 2 is a flow chart of a processing method of a diagnosis record text according to an embodiment of the present application;
FIG. 3a is a flowchart illustrating a method for determining a structured result of a target diagnosis record text according to an embodiment of the present application;
FIG. 3b is a flowchart of obtaining a structured result for a doctor record text instance according to an embodiment of the present application;
FIG. 4 is a flowchart of a method for obtaining at least one reference processing result of a target diagnosis record text under a mental chain path according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a progressive query process according to an embodiment of the present application;
fig. 6 is a flow chart of a processing method of a diagnosis record text according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a processing device for a diagnosis record text according to an embodiment of the present application;
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the drawings in the present application. It should be understood that the embodiments described below with reference to the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and the technical solutions of the embodiments of the present application are not limited.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and "comprising," when used in this specification, specify the presence of stated features, information, data, steps, operations, elements, and/or components, but do not preclude the presence or addition of other features, information, data, steps, operations, elements, components, and/or groups thereof, all of which may be included in the present specification. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates that at least one of the items defined by the term, e.g., "a and/or B" may be implemented as "a", or as "B", or as "a and B".
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
First, several terms related to the present application are described and explained:
disease auxiliary diagnosis: disease auxiliary diagnosis is an important component of a clinical auxiliary decision-making system, and is to predict possible disease diagnosis through an artificial intelligence method according to electronic diagnosis record text information written by doctors, so that the possibility of misdiagnosis and missed diagnosis is reduced.
Large language model: language models are a core problem in the field of natural language processing, essentially being models for calculating the probability of a sentence. The large-scale language model is a neural network model with a large number of parameters (more than billions), and is used in downstream tasks after large-scale pre-training is performed on massive texts in an unsupervised mode, so that grammar and semantic rules of natural language are autonomously learned. The common large language pre-training model comprises a natural language understanding model, a natural language generating model and the like.
ChatGPT: the ChatGPT is an artificial intelligent chat tool issued by OpenAI in 2022 month 12, is essentially an ultra-large generation type pre-training language model developed based on GPT-3.5 of a transducer neural network architecture, and can give smooth, reasonable, correct and harmless answers under the guidance of human after being subjected to fine adjustment through reinforcement learning of human feedback.
Contextual learning: context learning (In-Context learning), which is also called Context learning, refers to providing a small number of manually labeled sample examples for a large language model In a specific task, and LLM can accurately predict new samples according to example patterns without fine tuning model parameters.
Thinking chain reasoning: the thinking Chain (Chain-of-thoughts) reasoning capability refers to the capability that the model can make reasoning according to the logical relation and the semantic relation in the text, so that a coherent text is generated, and the capability appears when the parameters of a large language model are larger and larger. This capability enables the model to understand the meaning and logical structure in the text and predict the next based on the previous content. The mental chain reasoning ability is critical to solving the problem of complex multi-step reasoning classes.
Disease assisted diagnosis is the core of the clinical assistance decision making system, specifically, an artificial intelligence system judges possible diagnosis of a patient based on electronic diagnosis records written by doctors (including outpatient diagnosis records and inpatient diagnosis records) so as to help doctors reduce misdiagnosis and missed diagnosis. Classical disease-assisted diagnostic models generally employ supervised classification models: training samples are constructed based on electronic diagnosis records and disease diagnosis tags collected from hospitals, and then a multi-classification model for machine learning or deep learning is constructed. The model has good effect on the outpatient and emergency records (generally 100 words or less) with relatively short text length, but has poor performance in the hospitalization records with relatively complex length (generally 200 words or more), and the hospitalization records comprise patient complaints and current medical histories, and often comprise detailed past histories, treatment processes, physical examination, laboratory examination, imaging examination and the like, so that doctors need to combine all information to make accurate disease judgment.
The ChatGPT type ultra-large autoregressive generating language model opens a new paradigm in the natural language field by introducing reinforcement learning of human feedback and using strong natural language understanding and generating capability. The ChatGPT shows a certain reasoning capability through full pre-training on massive texts and codes based on a very large-scale parameter neural network formed by a transducer decoder, and the existing experiment shows that the ChatGPT is very excellent in reasoning of simple problems; but on reasoning about complex problems, chatGPT performs less stably. For example, chatGPT is basically correct in single-step mathematical problem calculation, but often makes mistakes in multi-step calculation. Tests of knowledge in the medical field indicate that: in the disease diagnosis of general outpatient and emergency treatment records, the ChatGPT can reach an accuracy rate of more than 60 percent, which is equivalent to the level of a third-grade medical student, but the complex inpatient and emergency treatment records are not good in performance, and the clinically critical information cannot be extracted from the treatment records to make accurate and comprehensive judgment.
It should be noted that, in the embodiment of the present application, when the relevant data collection process is applied to the example, the informed consent or the independent consent of the personal information body should be obtained strictly according to the requirements of the relevant national laws and regulations, and the subsequent data use and processing actions should be performed within the authorized range of the laws and regulations and the personal information body.
Based on the above, the invention provides a large-scale generated language model (LLM) disease auxiliary diagnosis method based on clinical thinking chain reasoning. Firstly, a single sample learning (one-shot learning) method is introduced by means of LLM contextual learning (In-Context learning) capability, a long text of an inpatient electronic diagnosis record is split into a plurality of parts (main complaints, current medical history, physical examination and auxiliary examination) which are structured, then a clinical thinking chain reasoning technology is introduced, a clinical diagnosis idea of a clinician is simulated, the diagnosis of a disease is split into sequential reasoning steps for a simplified one, the structured information is provided to the LLM step by step and progressive inquiry is carried out, and finally a prediction result is given.
In order to solve the problem that the answer generated by the large language model has certain randomness, the invention finally introduces a self-consistency scheme (self-consistency), sets moderate temperature parameters and samples different thinking chain paths, and votes for the disease with highest frequency in a plurality of predictive results of LLM to be used as the final diagnosis result.
The current modes of disease-assisted diagnostic models fall into two basic paradigms:
classical supervised classification model: the disease auxiliary diagnosis is essentially a text classification task understood by natural language, the classical paradigm is a mode of adding downstream fine tuning to a mask language model based on BERT class, firstly, a language model is pre-trained on a large-scale unmarked text corpus, and then model parameter fine tuning is carried out on the text with the marks at the downstream to construct a classifier for disease auxiliary diagnosis.
Generating a large language model: the autoregressive language model represented by GPT (generating Pre-trained Transformer) is also based on extensive unlabeled text corpus Pre-training, except that the task of GPT language model Pre-training is to predict what the next word is, so it is more suitable for the task of text generation class. The task of text generation classes is formally naturally compatible with text classification tasks through suitable guidance and contextual learning techniques. Current practice shows that LLM has logic reasoning capability with zero or few samples and also performs well in disease prediction tasks based on visit records. The model is provided with a section of diagnosis record text of the clinic/emergency, and the LLM can also assist in disease judgment and give judgment basis through a proper guide language such as 'please give the most possible diagnosis based on the diagnosis record'.
Both supervised classification models and new LLMs are deficient for disease-assisted diagnosis:
1) The method for performing fine adjustment of specific tasks by using BERT class pre-training model comprises the following steps: firstly, the application paradigm of the model needs to fine-tune model parameters aiming at downstream tasks, so that high-quality electronic diagnosis records and corresponding disease diagnoses need to be collected for tasks of disease auxiliary diagnosis, and certain manual workload is needed for data collection, cleaning, filtering and label standardization. Secondly, due to the limitation of the model parameter quantity, the world knowledge and logic knowledge which can be learned by the model parameter quantity are limited, and the reasoning capability of the model parameter quantity on complex type long text is poor. The electronic medical records contain, in addition to the complaint history of natural-like language, medical specific terms such as "shenqing, fu soft, rhythmia" etc., and also a large number of medical symbols and numerical contents (numerical results of laboratory tests, etc.). The BERT type model is still poor in performance and limited in lifting potential on the task of classifying complex long texts even if a large amount of data are marked and fine-tuned. Finally, the natural language understanding model cannot give corresponding medical explanation of disease prediction results, and has a certain limitation in clinical application.
2) LLM of ChatGPT class: LLM such as ChatGPT can give disease prediction results and relevant explanation through proper prompts, but ChatGPT is text pre-training performed in the general field, medical treatment is a field with strong specialization and strict logic, and under the condition of lacking medical treatment pertinence downstream task fine tuning, chatGPT sometimes makes knowledge facts wrong, which is fatal to disease diagnosis. Existing experiments show that when the length of the records of a visit is short (< 100 words) and the contained information is simple (only the text such as main complaints or medical history) such records of a visit are mainly records of an emergency visit, the ChatGPT still shows good disease reasoning capability. However, in a complicated long diagnosis record (> 200 words) represented by a hospitalization record, since the diagnosis record contains a lot of information, the inference logic path required for disease diagnosis is too long, and ChatGPT sometimes shows a poor stability, and a similar but erroneous answer is usually given. Meanwhile, because the model parameter quantity is extremely large (reaching the trillion level), the fine tuning cost for the downstream specific task is extremely high, and the application scheme for fine tuning the specific task is not recommended by the general LLM.
The application provides a processing method, a processing device, electronic equipment, a computer readable storage medium and a computer program product of a diagnosis record text, and aims to solve the technical problems in the prior art.
The technical solutions of the embodiments of the present application and technical effects produced by the technical solutions of the present application are described below by describing several exemplary embodiments. It should be noted that the following embodiments may be referred to, or combined with each other, and the description will not be repeated for the same terms, similar features, similar implementation steps, and the like in different embodiments.
Fig. 1a is a schematic diagram of an implementation environment provided by an embodiment of the present application, where the implementation environment may include a server 110 and a terminal 120. A wired or wireless communication connection is established between the server 110 and the terminal 120. Alternatively, the server 110 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides a cloud computing service. The terminal 120 may be a personal computer (Personal Computer, PC), a vehicle-mounted terminal, a tablet computer, a smart phone, a wearable device, a smart robot, or the like, which has data computing, processing, and storage capabilities.
In an embodiment of the present application, the terminal 120 in the system may be configured to obtain the target diagnosis record text and send the target diagnosis record text to the server 110. The server 110 may perform a contextual learning process on the target diagnosis record text based on the generated language model and the locally stored sample diagnosis record text, determine a structured result of the target diagnosis record text, and generate various thinking chain paths according to the structured result of the target diagnosis record text, where the thinking chain paths are used to represent a processing sequence of each paragraph of the target diagnosis record text; for each thinking chain path, carrying out progressive query processing through the generated language model based on the structured results of the thinking chain path and the target diagnosis record text to obtain at least one reference processing result of the target diagnosis record text under the thinking chain path; the target processing result is determined from the plurality of reference processing results by a self-rightness voting scheme.
Alternatively, the sample visit record text may be pre-stored in the terminal 120.
Optionally, the terminal 120 may also store a generated language model that has completed pre-training and fine tuning, and after the terminal 120 obtains the target diagnosis record text, the target diagnosis record text may be directly input into the generated language model, and the generated language model may further process the target diagnosis record text and output a target processing result. Accordingly, the system may not include the server 110.
The pre-training method of the language model provided by the embodiment of the application is described by combining the noun introduction and the application scene. The method may be applied to a computer device, which may be the server 110 in the scenario shown in fig. 1 a.
Referring to fig. 1b, a schematic structural diagram of a server 110 according to an embodiment of the present application is shown, where the server may include: an arithmetic device 1110 for recording, an arithmetic device 1120 for storing, and an arithmetic device 1130 for processing.
The computing device 1110 for recording refers to a computing device for recording a patient's condition of a visit, for example, a doctor may record a diagnosis result of a certain patient on the computing device 1110 for recording after making a diagnosis on the patient to form a diagnosis record; alternatively, when a patient performs a certain examination on an examination apparatus connected to the recording operation device 1110 at the time of the visit, the recording operation device 1110 records the examination result of the patient after the examination is completed, so as to form a diagnosis record. Alternatively, a patient's one-time visit status may correspond to one visit record, or may correspond to a plurality of visit records, which is not limited in the embodiment of the present application.
The operation device 1120 for storing refers to an operation device for storing a patient's diagnosis record, and alternatively, a separate operation device may be employed to store a patient's diagnosis record in consideration of the storage capacity and processing overhead of the operation device, i.e., the operation device 1110 for recording and the operation device 1120 for storing may be implemented as different operation devices. In the embodiment of the present application, after the patient's diagnosis record is formed, the computing device 1110 for recording may send the diagnosis record to the computing device 1120 for storage, and the diagnosis record is stored by the computing device 1120 for storage.
The computing device 1130 for processing refers to a computing device for processing a target electronic patient record of a patient, alternatively, the target electronic patient record of a patient may be composed of at least one patient record of the patient. Alternatively, in view of the memory capacity and processing overhead of the computing device, a separate computing device may also be employed to process the target electronic patient record, i.e. computing device 1130 for processing, and computing device 1110 for recording and computing device 1120 for storing may be implemented as different computing devices. Optionally, the computing device 1130 for processing may obtain the auxiliary diagnostic result according to the unstructured electronic diagnosis record, for example, the attending physician of a patient may view the auxiliary diagnostic result of the patient through the computing device 1130 for processing, which is specifically implemented as follows: after the computing device 1130 for processing receives the viewing instruction of the attending physician, according to the viewing instruction, the historical diagnosis record of the patient, that is, the target electronic diagnosis record of the patient, is retrieved from the computing device 1120 for storing, and then the processing of the embodiment of the present application is performed on the target electronic diagnosis record, so as to form an auxiliary diagnosis result of the patient, and the auxiliary diagnosis result is pushed to an interface for display, so as to provide the attending physician of the patient with viewing.
In the embodiment of the present application, the arithmetic device 1110 for recording and the arithmetic device 1120 for storage, and the arithmetic device 1120 for storage and the arithmetic device 1130 for processing may communicate with each other through a network. The network may be a wired network or a wireless network. Illustratively, after the computing device 1110 for recording records the patient's diagnosis situation, the diagnosis records are sent to the computing device 1120 for storage through a network, the patient's diagnosis records are stored and managed by the computing device 1120 for storage, and then the computing device 1130 for processing may acquire a target electronic diagnosis record of a patient, i.e. at least one diagnosis record of the patient, from the computing device 1120 for storage through the network according to the viewing instruction, and process the target electronic diagnosis record to form the auxiliary diagnosis result of the patient.
Referring to fig. 1c, a schematic diagram of a web page end of a program product (abbreviated as an information processing product) of a treatment method for a treatment record text according to an embodiment of the present application is shown in an exemplary manner, the web page end may be displayed by an operation device 1130 for processing, as shown in the drawing, the information processing product is deployed on a doctor workstation, and is embedded in a hospital information management system in a form of a client or a web page end plug-in, the treatment record in fig. 1c is systemic lupus erythematosus, after a doctor finishes inputting the treatment record text, the treatment record text may go through a procedure of the embodiment of the present application, i.e. the structured text of the treatment record text is obtained first, the structured text includes 3 paragraphs, which are respectively a main complaint, a medical history, a physical examination and an auxiliary examination, and then a progressive query processing is performed on a generated language model according to the structured result in a form of a thought chain, and finally, a target processing result, i.e. an auxiliary diagnosis result, and a decision of a diagnosis and a treatment are determined by a clinician through an automatic voting scheme. In the diagnosis record shown in fig. 1c, the generated language model is combined with physical examination of oral ulcer, and finally combined with auxiliary examination of critical information such as cytopenia, and finally the target processing result is systemic lupus erythematosus, which accords with the clinical diagnosis of the diagnosis record.
It should be noted that the implementation environment provided by the foregoing embodiment is only one possible example, and those skilled in the art will easily recognize other manifestations after understanding the technical solutions of the embodiments of the present application, for example, implementing a computer device for recording, a computer device for storing, and a computer device for processing as the same computer device, which are all within the protection scope of the present application.
The following description will take an example that the processing method of the visit record text is applied to a server, and as shown in fig. 2, the method includes the following steps.
S2101, determining a target diagnosis record text.
The target diagnosis record text in the embodiment of the application refers to text contained in an electronic diagnosis record formed during the diagnosis of a patient, wherein the electronic diagnosis record can comprise the diagnosis record directly input into computer equipment, can also comprise a scanning piece of paper diagnosis record and the like, and the embodiment of the application does not limit the concrete expression form of the electronic diagnosis record.
The text of the electronic diagnosis record comprises the diagnosis record of the patient at the time of diagnosis, and in the embodiment of the application, the patient can form the corresponding diagnosis record when in diagnosis, the diagnosis record can comprise the diagnosis result of a doctor when in diagnosis of the patient, and also can comprise a series of examination reports of examination carried out when in diagnosis of the patient.
The specific generation mode of the target diagnosis record text is not limited, and optionally, the target diagnosis record text can be manually filled in the computer equipment by a doctor when the doctor performs diagnosis; the content information may also be automatically generated in the computer device by the examination apparatus when the patient is examined.
The embodiment of the application does not limit the specific number of the diagnosis records included in the target diagnosis record text, and optionally, the target diagnosis record text can include all the diagnosis records generated in the history diagnosis process of the patient; the target diagnosis record text may also include a diagnosis record meeting a preset condition generated in a patient history diagnosis process, that is, when the computer device acquires the target diagnosis record text, a certain condition may be set to screen the diagnosis record, so as to obtain a diagnosis record meeting the condition, and optionally, the condition may include at least one of the following types: the time condition, the age condition, the regional condition, the disease condition, the symptom condition, the sign condition, the sex condition and the like are not limited to the types of the condition types, and the specific condition types can be determined according to actual requirements in application. For example, the computer device, when acquiring content information, may set a time condition: the medical records obtained from month 1 2020 to month 12 2023 include all medical records generated when the patient was at a medical visit during month 1 2020 to month 12 2023. For another example, the computer device, when acquiring the visit record, may set a disease condition: for rectal cancer, the acquired content information includes all of the visit records generated when the patient makes a visit for the reason of rectal cancer. By setting certain conditions when the treatment records are acquired, the treatment records can be acquired in a targeted manner in combination with actual requirements, meanwhile, unnecessary redundant information is prevented from being acquired by the computer equipment, and the processing cost of the computer equipment is reduced.
S2102, performing contextual learning processing on the target diagnosis record text based on a generated language model, and determining a structural result of the target diagnosis record text, wherein the structural result comprises a plurality of paragraphs of the diagnosis record text, and each paragraph is information of a corresponding diagnosis and treatment item.
In order to provide the prompt content required by progressive thinking chain reasoning, the embodiment of the application needs to carry out structural processing on the original target diagnosis record text. In some embodiments, the structured results of embodiments of the present application include three paragraphs: main complaints and medical history, physical examination and auxiliary examination.
The main complaints and medical history record the main symptoms, accompanying symptoms, the disease course, the treatment course, the disease history and the like of the current disease of the patient, and are also the summary of the inquiry contents of the patient by the clinician.
Physical examination refers to the summarization of the overall physical condition of a patient (e.g., rate, clear spirit, lung dampness murmur, etc.) by a clinician using his own sense and with the aid of simple examination tools such as stethoscopes, sphygmomanometers, etc.
The auxiliary examination refers to objective examination of physiological indexes or internal organ morphology of a patient by means of medical instruments, and generally includes body fluid, electrocardiography, imaging, endoscopy and the like.
It should be noted that the standardized summary of the hospitalization records generally contains the three parts, but the paragraphs cannot be accurately split by simple character pattern matching due to the difference in writing of the hospitalization records. For example, the auxiliary inspection results may begin with different keywords: blood routine, immunity, gastroscope, colposcope, B-ultrasound, etc.
The embodiment of the application realizes the structuring of the diagnosis record text by generating the context learning capability of the language model. The context learning capability is also called context learning and less sample learning, is the capability of the generated language model that more and more parameters emerge, and refers to the sample example only needing to give one or a few manual labels when the generated language model is required to complete a specified task<x i ,y i >Then give a new sample x i+1 The model can successfully predict y i+1 No back propagation in this process allows fine tuning of the model parameters. That is, the method for obtaining the structured result overcomes the defect of high labor and time cost caused by the need of fine adjustment of the model parameters in the prior art.
S2103, generating a thinking chain path according to the structured result of the target diagnosis record text.
The logic chain pushing refers to a human problem solving method, the problem of complex multiple steps is converted into a sequential, coherent and simple problem, an intermediate result is obtained by one step, and a conclusion is finally output.
In clinical practice of disease diagnosis, a doctor firstly obtains basic symptom medical history information through dialogue with a patient to form a preliminary disease diagnosis result diagnosis collection set, then for further differential diagnosis, the doctor performs physical examination on the patient to remove related diseases, and finally combines auxiliary instrument examination results to form final disease diagnosis. This is the basic reasoning logic of the clinical thought chain.
The embodiment of the application simulates a human doctor thinking chain reasoning process, splits the target diagnosis record text into a plurality of paragraphs through the step S2102, and then sorts the paragraphs, namely, the thinking chain path is used for representing the processing sequence of each paragraph of the target diagnosis record text.
S2104, carrying out progressive query processing through the generated language model based on the thinking chain path and the structural result of the target diagnosis record text so as to obtain a target processing result.
According to the embodiment of the application, the information of each paragraph is sequentially input into the generated language model according to the processing sequence represented by the thinking chain path, and a proper prompt is added to guide the generated language model to carry out the auxiliary diagnosis of the disease in a progressive manner, so that a target processing result, namely an auxiliary diagnosis result, is obtained.
According to the treatment method of the treatment record text, through determining the target treatment record text, carrying out contextual learning processing on the target treatment record text based on the structural result, the structural result of the target treatment record text can be determined under the condition that fine adjustment is not needed for a model through contextual learning processing, the structural result comprises a plurality of paragraphs of the treatment record text, each paragraph is information of a corresponding diagnosis and treatment item, the treatment item is used as the structural result and is consistent with information referenced by a doctor for carrying out disease diagnosis on a patient, further, a thinking chain path is generated according to the structural result, the thinking chain path represents the processing sequence of each paragraph of the target treatment record text, the paragraphs are sequentially input into the structural language model based on the processing sequence represented by the thinking chain path, the structural result is equivalent to converting an original problem into a plurality of sub-problems or intermediate steps, the structural result is interacted with the structural language model, the intermediate diagnosis of the disease is conducted in a guiding mode, the intermediate diagnosis of the disease is conducted, the final diagnosis is carried out, compared with the clinical result is not required to have a great comparison result, and the clinical result is improved in comparison with the clinical result, and the clinical result is greatly required to have a clinical result.
On the basis of the foregoing embodiments, as an optional embodiment, performing a contextual learning process on the target diagnosis record text based on a generated language model, and determining a structured result of the target diagnosis record text includes:
based on a sample diagnosis record text, a structured result of the sample diagnosis record text, the target diagnosis record text and a first prompt instruction, performing contextual learning processing through the generated language model, and obtaining the structured result of the target diagnosis record text output by the generated language model;
the first prompting instruction is used for indicating to obtain a structured result of the target diagnosis record text.
According to the embodiment of the application, a single sample learning (one-shot learning) method is introduced by means of LLM contextual learning capability, the structured results of a few sample diagnosis record texts are marked in advance, the sample diagnosis record texts, the structured results of the sample diagnosis record texts and the target diagnosis record texts are spliced to obtain spliced texts, a first prompt instruction and the spliced texts are input into a generated language model, and the generated language model can accurately give the structured results.
It should be noted that, the context learning samples generally adopt a random selection method, and the embodiment of the present application finds that selecting samples with close distances in a sample space as an example can fully excite the ability of LLM context learning, and improve the accuracy of prediction.
Determining target text characteristics of the target diagnosis record text;
and determining a preset number of text features with highest similarity with the target text features from a preset sample feature set, taking the text features as reference text features, and taking the historical diagnosis record text corresponding to the reference text features as the sample diagnosis record text.
Specifically, the embodiment of the application can label a small quantity of visit record text sets D by a manual labeling mode firstly L
Then, using a Chinese pre-trained language model, such as BERT, roBERTa, etc., as an encoder, the diagnosis record text set D L Each of the history visit record text x i Coding to obtain text feature v i The method comprises the steps of carrying out a first treatment on the surface of the In one embodiment, the vector of CLS positions output by the output layer of the language model is taken as the text vector of the visit record text. CLS, classification, is understood to be a label for a downstream classification task, which is a feature vector that can represent the semantics of the entire text, i.e. a label representing the entire text.
For a target visit record text x_test, the target text features are obtained by the encoder, and then the target visit record text and the visit record text set D are calculated L Cosine similarity s between text features of all history visit record texts i
K (e.g., 2) samples with the greatest similarity are selected as examples of the context learning, i.e., the samples record text.
Referring to fig. 3a, a flow chart of determining a structured result of a target diagnosis record text according to an embodiment of the present application is shown, and as shown in the figure, a sample diagnosis record text, that is, text 1, is marked to obtain a structured result of a sample diagnosis record file, where the format of the structured result is "diagnosis record one: * **. The visit records a structured result: # complaints and medical history: * X; # physical examination: * X; auxiliary inspection #: * Then, after the to-be-structured diagnosis record text, namely the text 2, is placed in the marked text 1, a spliced text is obtained, and a first indication instruction of the structural result of the diagnosis record two and the spliced text are input into the generated language model together, so that the structural result of the text 2 output by the generated language model is obtained: # complaints and medical history: * X; # physical examination: * X; auxiliary inspection #: * **".
Referring to fig. 3b, a flow chart of obtaining a structured result for one example of a doctor's recording text is schematically shown in fig. 3b, in which a doctor edits a first doctor's recording text 3102 to be structured in a text editing page 3101, after the doctor clicks a determining control 3103, a background splices a second doctor's recording text 3104 and the first doctor's recording text 3102 to obtain a spliced text 3105, the content in the spliced text 3105 includes the second doctor's recording text 3104, the structured result 3106 of the second doctor's recording text 3102 to be structured, and a first prompting instruction 3107 in order from front to back, and the output result can obviously show that the first doctor's recording text 3102 is also structured into 3 paragraphs of a main complaint and a medical history, a physical examination, and an auxiliary examination.
On the basis of the above embodiments, as an alternative embodiment, the standard sequence of clinical thinking chain reasoning is "main complaint and medical history- > physical examination- > auxiliary examination", that is, a doctor will determine the main complaint and medical history of a patient first, then perform physical examination, and then perform auxiliary examination, but in actual situations, there is also a problem that the clinical thinking sequence is inverted, for example, the patient obtains some abnormal imaging results, and then makes a consultation with the doctor, and at this time, the thinking chain sequence becomes "auxiliary examination- > main complaint and medical history- > physical examination". Therefore, the number of the thought chain paths in the embodiment of the application is at least two.
It should be noted that in clinical practice it is certain that physical examinations are located after complaints and medical history. Thus, the mental chain path of embodiments of the present application may include at least one of:
1) Major complaints and medical history- > physical examination- > auxiliary examination;
2) Auxiliary examination- > main complaint and medical history- > physical examination;
3) Major complaints and medical history- > auxiliary exam- > physical exam.
Based on the thinking chain path and the structured result of the target diagnosis record text, performing progressive query processing through the generated language model to obtain a target processing result, including:
for each thinking chain path, carrying out progressive query processing through the generated language model based on the structured results of the thinking chain path and the target diagnosis record text to obtain at least one reference processing result of the target diagnosis record text under the thinking chain path;
the target processing result is determined from a plurality of reference processing results by a self-rightness voting scheme.
It can be appreciated that, since the output of the generated language model has randomness, for each thinking chain path, by inputting the structured result of the target diagnosis record text based on the thinking chain path a plurality of times, at least one reference processing result of the target diagnosis record text under the thinking chain path can be obtained, and further, a self-rightness voting scheme is introduced for summarization, and the target processing result is determined from the reference processing results.
The self-rightness voting scheme can promote the reasoning accuracy of the generated language model, in general, complex reasoning tasks can generally obtain a plurality of reasoning logics capable of obtaining correct answers, and the self-rightness scalp scheme returns the most self-rightness answer, namely the target processing result, by sampling a plurality of reference processing results.
On the basis of the foregoing embodiments, as an optional embodiment, based on the structure result of the thought chain path and the target diagnosis record text, performing progressive query processing through the generated language model, to obtain at least one reference processing result of the target diagnosis record text under the thought chain path, including:
adjusting the temperature parameters of the generated language model to obtain at least two new generated language models, wherein the temperature parameters of any two generated language models are different, and the temperature parameters are used for controlling the randomness of the output of the generated language models;
and for each new generated language model, carrying out progressive query processing through the new generated language model based on the thinking chain path and the structured result of the target diagnosis record text, and obtaining at least one reference processing result of the target diagnosis record text under the thinking chain path.
It should be noted that, for the same thinking chain path, there is also a certain randomness in the output of the generated language model, and the randomness is controlled by the temperature parameter, that is, the larger the value of the temperature parameter is, the more random the output result is, the smaller the value of the temperature parameter is, the more focused the output result is, and the higher the certainty is.
Referring to fig. 4, a flow chart of obtaining at least one reference processing result of the target diagnosis record text under the thought chain path according to an embodiment of the present application is shown, and as shown in the figure, by adjusting the temperature parameter of the generative language model 1, a plurality of new generative language models are obtained, for example, if the temperature parameter of the generative language model 1 is t, the temperature parameter of the new generative language model 2 may be t+Δt 1 The temperature parameter of the new generative language model 3 may be t+Δt 2 The temperature parameter of the new generated language model n of … can be t+deltat n-1 Δt is the adjustment amount of the temperature parameter.
After a plurality of generated language models are obtained through adjusting temperature parameters, the embodiment of the application carries out progressive query processing through each generated language model based on a thinking chain path and a structured result of the target diagnosis record text for each generated language model (comprising the generated language model before adjustment and a new generated language model), and obtains a reference processing result of the target diagnosis record text under the thinking chain path and output by each generated language model.
On the basis of the foregoing embodiments, as an optional embodiment, based on the structure result of the thought chain path and the target diagnosis record text, performing progressive query processing through the generated language model, to obtain at least one reference processing result of the target diagnosis record text under the thought chain path, including:
and carrying out progressive query processing through a generated language model based on the thinking chain path, the structured result of the target diagnosis record text and a second prompt instruction corresponding to the processing sequence, and obtaining at least one reference processing result output by the generated language model.
The second prompting instruction according to the embodiment of the present application is used to indicate that a staged processing result is obtained according to the inputted paragraphs, that is, the second prompting instructions inputted in different processing sequences may be the same or different, and the number of paragraphs is 3, for example, the second prompting instruction inputted each time may be "according to unclear information, patient is possibly diagnosed? ", may also be: the first entered second prompt is "preliminary determination of the patient's possible diagnosis? The second prompting instruction entered a second time is "further determination of the patient's possible diagnosis? The third entered second prompt is "last determination of the patient's possible diagnosis? ".
The reference processing result is the last stage processing result, namely, after the last paragraph of the thinking chain path is input into the generated voice model, the reference processing result output by the generated voice model is generated.
Referring to fig. 5, a schematic diagram of progressive query processing performed by the generated language model based on a mental chain path and a structured result of the target diagnosis record text according to an embodiment of the present application is shown, where the mental chain path is: the first input second prompt instruction is "primarily determine which diseases the patient may suffer from", the generated language model outputs a first staged result 5103 according to the input main complaint and medical history 5101 and the second prompt instruction 5102, inputs the result 5104 of the medical examination and the second prompt instruction 5105 of the second again to obtain a second staged result 5106, and finally inputs the result 5107 of the auxiliary examination and the third second prompt instruction 5108 to obtain a third staged result 5109.
On the basis of the foregoing embodiments, as an optional embodiment, performing progressive query processing through a generative language model based on the thought chain path, the structured result of the target diagnosis record text, and a second prompt instruction corresponding to a processing order, to obtain at least one reference processing result output by the generative language model, where the method includes:
Determining a second prompt instruction corresponding to the paragraphs in the first processing order according to the first processing paragraphs and the thought chain path, carrying out query processing through the generated language model based on the paragraphs in the first processing order and the corresponding second prompt instruction, obtaining a staged processing result of the target diagnosis record text in the thought chain path, and determining the paragraphs in the current processing order as inputted paragraphs;
repeating the following steps from the second processed paragraph until each paragraph in the structured result is processed, and obtaining at least one reference processing result output by the generated language model:
determining a paragraph of the current processing sequence and a corresponding second prompt instruction according to the input paragraph and the thinking chain path;
and carrying out query processing through the generated language model based on the paragraphs with the current processing sequence and the corresponding second prompt instructions to obtain a staged processing result of the target diagnosis record text in the thought chain path, and determining the paragraphs with the current processing sequence as inputted paragraphs.
On the basis of the above embodiments, as an alternative embodiment, determining, from a plurality of reference processing results, a target processing result by a self-rightness voting scheme includes:
Counting the occurrence frequency of each reference processing result, and taking the occurrence frequency as the voting number of the corresponding reference processing result;
the reference processing result with the highest vote count is taken as the target processing result.
According to the embodiment of the application, through adjusting temperature parameters of the generated language model, different random generated language models are obtained, meanwhile, through adjusting the sequence of paragraphs, a plurality of thinking chain paths are obtained, for each thinking chain path, a structured result of the thinking chain path and the target diagnosis record text is utilized, progressive query processing is carried out through one generated language model, at least one reference processing result of the target diagnosis record text under the thinking chain path is obtained, then the occurrence frequency of each reference processing result is counted, as the vote count of the corresponding reference processing result, the reference processing result with the highest vote count is taken as the target processing result, for example, if 3 reference processing results are obtained in total, namely, the reference processing results 1-3 are respectively, wherein the reference processing result 1 appears for 4 times, the reference processing result 2 appears for 3 times, and the reference processing result 3 appears for 5 times.
Referring to fig. 6, a flow chart of a processing method of a diagnosis record text according to an embodiment of the present application is exemplarily shown, where the flow chart is shown, a target diagnosis record text is first determined, then, based on a sample diagnosis record text, a structured result of the sample diagnosis record text, the target diagnosis record text and a first prompt instruction, a context learning process is performed through the generated language model, a structured result of the target diagnosis record text output by the generated language model is obtained, then, based on the structured result of the target diagnosis record text, a plurality of thinking chain paths are generated, the thinking chain paths are used for representing a processing sequence of each paragraph of the target diagnosis record text, and are adjusted according to a temperature parameter of the generated language model, at least one new generated language model is obtained, and based on the thinking chain paths, the structured result of the target diagnosis record text and a second prompt instruction corresponding to the processing sequence, progressive query processing is performed through the generated language model, at least one reference processing result output by the generated language model is obtained, and finally, each statistical result is counted as a reference processing result appearing in a corresponding number; the reference processing result with the highest vote count is taken as the target processing result.
The embodiment of the application provides a processing device for a diagnosis record text, as shown in fig. 7, the processing device for the diagnosis record text may include: a visit record determination module 701, a structuring module 702, a path generation module 703, and a progressive query module 704, wherein,
a diagnosis record determining module 701, configured to determine a target diagnosis record text;
a structuring module 702, configured to perform a contextual learning process on the target diagnosis record text based on a generated language model, and determine a structured result of the target diagnosis record text, where the structured result includes a plurality of paragraphs of the diagnosis record text, and each paragraph is information of a corresponding diagnosis and treatment item;
a path generating module 703, configured to generate a thought chain path according to a structured result of the target diagnosis record text, where the thought chain path is used to represent a processing sequence of each paragraph of the target diagnosis record text;
and the progressive query module 704 is configured to perform progressive query processing through the generated language model based on the thought chain path and the structured result of the target diagnosis record text, so as to obtain a target processing result.
The embodiment of the application also provides a processing device of the diagnosis record text, which comprises:
The system comprises an edit box display module, a first display module and a second display module, wherein the edit box display module is used for displaying at least one edit box, each edit box is used for information belonging to at least one corresponding diagnosis and treatment project, and the information is text information of natural language;
the result display module is used for responding to the information input in all the edit boxes and displaying auxiliary diagnosis results;
the auxiliary diagnosis result is obtained by taking the information input by the input box as a target diagnosis text and based on the diagnosis record text processing device in the third aspect.
The device of the embodiment of the present application may perform the method provided by the embodiment of the present application, and its implementation principle is similar, and actions performed by each module in the device of the embodiment of the present application correspond to steps in the method of the embodiment of the present application, and detailed functional descriptions of each module of the device may be referred to the descriptions in the corresponding methods shown in the foregoing, which are not repeated herein.
The embodiment of the application provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory, wherein the processor executes the computer program to realize the steps of a processing method of a diagnosis record text, and compared with the related technology, the method can realize the following steps: the application relates to a method for diagnosing a disease, which comprises the steps of determining a target diagnosis record text, carrying out contextual learning processing on the target diagnosis record text based on a generated language model, determining a structured result of the target diagnosis record text under the condition that fine adjustment is not needed for a model through the contextual learning processing, wherein the structured result comprises a plurality of paragraphs of the diagnosis record text, each paragraph is information of a corresponding diagnosis and treatment item, the diagnosis item is taken as the structured result, the information referenced by a doctor for diagnosing the disease is consistent with the information referenced by a patient, further, a thinking chain path is generated according to the structured result, the thinking chain path represents the processing sequence of each paragraph of the target diagnosis record text, the paragraphs are sequentially input into the generated language model based on the processing sequence represented by the thinking chain path, the method is equivalent to converting an original problem into a plurality of sub-problems or intermediate steps, carrying out interaction with the generated language model in a progressive manner, carrying out auxiliary diagnosis on the disease, continuously obtaining intermediate answers, finally guiding the generated language model to obtain final target diagnosis results, namely carrying out the auxiliary diagnosis on the auxiliary diagnosis with the same time as the final target diagnosis results, and carrying out the fine adjustment is not needed for the clinical diagnosis, and the clinical diagnosis results are improved in comparison with the clinical diagnosis results.
In an alternative embodiment, there is provided an electronic device, as shown in fig. 8, the electronic device 4000 shown in fig. 8 includes: a processor 4001 and a memory 4003. Wherein the processor 4001 is coupled to the memory 4003, such as via a bus 4002. Optionally, the electronic device 4000 may further comprise a transceiver 4004, the transceiver 4004 may be used for data interaction between the electronic device and other electronic devices, such as transmission of data and/or reception of data, etc. It should be noted that, in practical applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 is not limited to the embodiment of the present application.
The processor 4001 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. The processor 4001 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 4002 may include a path to transfer information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 4002 can be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 8, but not only one bus or one type of bus.
Memory 4003 may be, but is not limited to, ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, EEPROM (Electrically Erasable Programmable Read Only Memory ), CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store a computer program and that can be Read by a computer.
The memory 4003 is used for storing a computer program for executing an embodiment of the present application, and is controlled to be executed by the processor 4001. The processor 4001 is configured to execute a computer program stored in the memory 4003 to realize the steps shown in the foregoing method embodiment.
Embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of the foregoing method embodiments and corresponding content.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program can realize the steps and corresponding contents of the embodiment of the method when being executed by a processor.
The terms "first," "second," "third," "fourth," "1," "2," and the like in the description and in the claims and in the above figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate, such that the embodiments of the application described herein may be implemented in other sequences than those illustrated or otherwise described.
It should be understood that, although various operation steps are indicated by arrows in the flowcharts of the embodiments of the present application, the order in which these steps are implemented is not limited to the order indicated by the arrows. In some implementations of embodiments of the application, the implementation steps in the flowcharts may be performed in other orders as desired, unless explicitly stated herein. Furthermore, some or all of the steps in the flowcharts may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or phases may be performed at the same time, or each of these sub-steps or phases may be performed at different times, respectively. In the case of different execution time, the execution sequence of the sub-steps or stages can be flexibly configured according to the requirement, which is not limited by the embodiment of the present application.
The foregoing is merely an optional implementation manner of some of the implementation scenarios of the present application, and it should be noted that, for those skilled in the art, other similar implementation manners based on the technical ideas of the present application are adopted without departing from the technical ideas of the scheme of the present application, and the implementation manner is also within the protection scope of the embodiments of the present application.

Claims (13)

1. A method for processing a visit record text, comprising:
determining a target diagnosis record text;
performing contextual learning processing on the target diagnosis record text based on a generated language model, and determining a structural result of the target diagnosis record text, wherein the structural result comprises a plurality of paragraphs of the diagnosis record text, and each paragraph is information of a corresponding diagnosis and treatment project;
generating a thinking chain path according to the structured result of the target diagnosis record text, wherein the thinking chain path is used for representing the processing sequence of each paragraph of the target diagnosis record text;
and carrying out progressive query processing through the generated language model based on the thinking chain path and the structured result of the target diagnosis record text so as to obtain a target processing result.
2. The method of claim 1, wherein the performing a contextual learning process on the target visit record text based on the generated language model, determining a structured result of the target visit record text, comprises:
based on a sample diagnosis record text, a structured result of the sample diagnosis record text, the target diagnosis record text and a first prompt instruction, performing contextual learning processing through the generated language model, and obtaining the structured result of the target diagnosis record text output by the generated language model;
The first prompting instruction is used for indicating to obtain a structured result of the target diagnosis record text.
3. The method according to claim 1, wherein the number of mental chain paths is at least two;
the step of carrying out progressive query processing through the generated language model based on the structured result of the thinking chain path and the target diagnosis record text so as to obtain a target processing result comprises the following steps:
for each thinking chain path, carrying out progressive query processing through the generated language model based on the structured results of the thinking chain path and the target diagnosis record text to obtain at least one reference processing result of the target diagnosis record text under the thinking chain path;
the target processing result is determined from a plurality of reference processing results by a self-rightness voting scheme.
4. The method according to claim 3, wherein the step of performing progressive query processing through the generated language model based on the structured results of the mental chain path and the target diagnosis record text to obtain at least one reference processing result of the target diagnosis record text under the mental chain path includes:
Adjusting the temperature parameters of the generated language model to obtain at least one new generated language model, wherein the temperature parameters of any two generated language models are different, and the temperature parameters are used for controlling the randomness of the output of the generated language model;
and for each new generated language model, carrying out progressive query processing through the new generated language model based on the thinking chain path and the structured result of the target diagnosis record text, and obtaining at least one reference processing result of the target diagnosis record text under the thinking chain path.
5. The method according to claim 3 or 4, wherein based on the structured results of the mental chain path and the target diagnosis record text, performing progressive query processing through the generated language model to obtain at least one reference processing result of the target diagnosis record text under the mental chain path, comprising:
based on the thinking chain path, the structured result of the target diagnosis record text and a second prompt instruction corresponding to the processing sequence, carrying out progressive query processing through a generated language model to obtain at least one reference processing result output by the generated language model;
The second prompting instruction is used for indicating that a staged processing result is obtained according to the inputted paragraph, and the reference processing result is the last staged processing result.
6. The method according to claim 5, wherein the step of performing progressive query processing through a generated language model based on the thought chain path, the structured result of the target diagnosis record text, and the second prompt instruction corresponding to the processing order to obtain at least one reference processing result output by the generated language model includes:
determining a second prompt instruction corresponding to the paragraphs in the first processing order according to the first processing paragraphs and the thought chain path, carrying out query processing through the generated language model based on the paragraphs in the first processing order and the corresponding second prompt instruction, obtaining a staged processing result of the target diagnosis record text in the thought chain path, and determining the paragraphs in the first processing order as inputted paragraphs;
repeating the following steps from the second processed paragraph until each paragraph in the structured result is processed, and obtaining at least one reference processing result output by the generated language model:
Determining a paragraph of the current processing sequence and a corresponding second prompt instruction according to the input paragraph and the thinking chain path;
and carrying out query processing through the generated language model based on the paragraphs with the current processing sequence and the corresponding second prompt instructions to obtain a staged processing result of the target diagnosis record text in the thought chain path, and determining the paragraphs with the current processing sequence as inputted paragraphs.
7. The method of claim 1, wherein determining the target processing result from the plurality of reference processing results by a self-rightness voting scheme comprises:
counting the occurrence frequency of each reference processing result, and taking the occurrence frequency as the voting number of the corresponding reference processing result;
the reference processing result with the highest vote count is taken as the target processing result.
8. The method of claim 2, wherein the performing a contextual learning process by the generative language model based on the sample visit record text, the structured result of the sample visit record text, the target visit record text, and the first prompt instruction, further comprises:
determining target text characteristics of the target diagnosis record text;
Determining a preset number of text features with highest similarity with the target text features from a preset sample feature set, taking the text features as reference text features, and taking a history visit record text corresponding to the reference text features as the sample visit record text;
wherein the sample feature set includes text features of at least one historical visit record.
9. A method for processing a visit record text, comprising:
displaying at least one edit box, wherein each edit box is used for inputting information of at least one corresponding diagnosis and treatment item, and the information is text information of natural language;
responding to the information input in all edit boxes, and displaying auxiliary diagnosis results;
wherein the auxiliary diagnosis result is obtained based on the processing method of any one of claims 1 to 8 by taking the information input by the input box as a target diagnosis text.
10. A processing apparatus for a visit record text, comprising:
the diagnosis record determining module is used for determining target diagnosis record text;
the structuring module is used for carrying out contextual learning on the target diagnosis record text based on the generated language model, and determining a structuring result of the target diagnosis record text, wherein the structuring result comprises a plurality of paragraphs of the diagnosis record text, and each paragraph is information of a corresponding diagnosis and treatment project;
The path generation module is used for generating a thinking chain path according to the structured result of the target diagnosis record text, wherein the thinking chain path is used for representing the processing sequence of each paragraph of the target diagnosis record text;
and the progressive query module is used for carrying out progressive query processing through the generated language model based on the thinking chain path and the structural result of the target diagnosis record text so as to obtain a target processing result.
11. A processing apparatus for a visit record text, comprising:
the system comprises an edit box display module, a first display module and a second display module, wherein the edit box display module is used for displaying at least one edit box, each edit box is used for information belonging to at least one corresponding diagnosis and treatment project, and the information is text information of natural language;
the result display module is used for responding to the information input in all the edit boxes and displaying auxiliary diagnosis results;
wherein the auxiliary diagnosis result is obtained based on the treatment record text processing device according to claim 10 by taking the information input by the input box as target treatment text.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to carry out the steps of the method according to any one of claims 1-9.
13. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any of claims 1-9.
CN202311243188.8A 2023-09-21 2023-09-21 Text processing method and device, electronic equipment and storage medium Pending CN117151088A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311243188.8A CN117151088A (en) 2023-09-21 2023-09-21 Text processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311243188.8A CN117151088A (en) 2023-09-21 2023-09-21 Text processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117151088A true CN117151088A (en) 2023-12-01

Family

ID=88884222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311243188.8A Pending CN117151088A (en) 2023-09-21 2023-09-21 Text processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117151088A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117608764A (en) * 2024-01-18 2024-02-27 成都索贝数码科技股份有限公司 Container platform operation and maintenance method and system
CN117828087A (en) * 2024-01-08 2024-04-05 北京三维天地科技股份有限公司 LLM-based medical instrument data classification method and system
CN117892818A (en) * 2024-03-18 2024-04-16 浙江大学 Large language model rational content generation method based on implicit thinking chain

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117828087A (en) * 2024-01-08 2024-04-05 北京三维天地科技股份有限公司 LLM-based medical instrument data classification method and system
CN117608764A (en) * 2024-01-18 2024-02-27 成都索贝数码科技股份有限公司 Container platform operation and maintenance method and system
CN117608764B (en) * 2024-01-18 2024-04-26 成都索贝数码科技股份有限公司 Container platform operation and maintenance method and system
CN117892818A (en) * 2024-03-18 2024-04-16 浙江大学 Large language model rational content generation method based on implicit thinking chain
CN117892818B (en) * 2024-03-18 2024-05-28 浙江大学 Large language model rational content generation method based on implicit thinking chain

Similar Documents

Publication Publication Date Title
Aafjes-van Doorn et al. A scoping review of machine learning in psychotherapy research
US11282196B2 (en) Automated patient complexity classification for artificial intelligence tools
US20210183484A1 (en) Hierarchical cnn-transformer based machine learning
Cheng et al. The now and future of ChatGPT and GPT in psychiatry
CN104011711B (en) text analysis system
US11031103B2 (en) Personalized questionnaire for health risk assessment
CN117151088A (en) Text processing method and device, electronic equipment and storage medium
US10892056B2 (en) Artificial intelligence based alert system
US20190370383A1 (en) Automatic Processing of Ambiguously Labeled Data
CN117253576B (en) Outpatient electronic medical record generation method based on Chinese medical large model
US11990216B2 (en) Detecting discrepancies between clinical notes and administrative records
Jefford et al. Post-structural feminist interpretive interactionism
Winter et al. (De) troubling transparency: artificial intelligence (AI) for clinical applications
CN117076668A (en) Text information processing method, apparatus, device, storage medium, and program product
CN115458113A (en) Medical record generation method, system, storage medium and electronic equipment
Sovrano et al. Generating user-centred explanations via illocutionary question answering: From philosophy to interfaces
Zaghir et al. Real-world patient trajectory prediction from clinical notes using artificial neural networks and UMLS-based extraction of concepts
Biswas et al. Can ChatGPT be Your Personal Medical Assistant?
Yu et al. Large Language Models in Biomedical and Health Informatics: A Bibliometric Review
Abid et al. Artificial Intelligence in Urology: current status and future perspectives
US11568997B2 (en) Dynamic context-based collaborative medical concept interpreter
Welch et al. Grounded theory-a lens to understanding clinical reasoning
Montenegro et al. AI-Based Medical Scribe to Support Clinical Consultations: A Proposed System Architecture
Nega Localized hybrid reasoning system for TB disease diagnosis
TURKMEN et al. 888 Roles and Challenges of Semantic Intelligence in Healthcare Cognitive Computing A. Carbonaro et al.(Eds.) AKA Verlag and IOS Press, 2024© 2024 Akademische Verlagsgesellschaft AKA GmbH, Berlin. All rights reserved.

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication