Methods, devices, equipment, storage media, and program products for processing medical reports

By identifying medical report types and abnormal items, and combining the target subject's historical diagnostic data for attention encoding and splicing personalized medical knowledge data, the problem of high iteration costs and low interpretation accuracy in existing technologies has been solved, achieving more accurate interpretation of medical reports.

CN123072607APending Publication Date: 2026-11-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510584945.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-07
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing methods for interpreting medical reports are costly to iterate, slow to update knowledge, and suffer from rigid processing of complex numerical logic in report interpretation scenarios, which affects the accuracy of interpretation.

Method used

By identifying the report type and abnormal items in medical reports, attention encoding is performed based on the target object's historical diagnostic data, personalized medical knowledge data is spliced ​​together, prompt words are constructed, and a pre-trained language model is invoked to generate interpretation data.

Benefits of technology

It improves the accuracy of medical report interpretation, reduces the risk of misinterpretation due to ambiguous context in language models, and enables dynamic integration and personalized interpretation of historical diagnostic data and medical knowledge entries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123072607A_ABST
    Figure CN123072607A_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, storage medium, and program product for processing medical reports. The method includes: identifying the report type of a medical report for a target object, wherein the target object is the subject described in the medical report; identifying abnormal items in the medical report and querying multiple medical knowledge item data based on the abnormal items; performing attention encoding on the multiple medical knowledge item data based on the target object's historical diagnostic data to obtain attention weights for each medical knowledge item data corresponding to the target object; concatenating the multiple medical knowledge item data based on the attention weights to obtain medical knowledge data adapted to the target object; constructing prompt words based on the report type, abnormal items, and medical knowledge data; and generating interpretation data for the medical report by calling a pre-trained language model based on the prompt words. This application can improve the accuracy of interpreting medical reports.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to methods, apparatus, devices, storage media, and program products for processing medical reports. Background Technology

[0002] In the processing methods of medical reports in related technologies, rich domain knowledge is used as support, a large amount of medical knowledge related to report interpretation is collected, and a special medical model is obtained through methods such as instruction fine-tuning. However, this method has high iteration costs and slow knowledge iteration speed. At the same time, in the report interpretation scenario, there are defects such as rigidity in the processing of complex numerical logic, which affects the accuracy of medical report interpretation. Summary of the Invention

[0003] This application provides methods, apparatus, devices, storage media, and program products for processing medical reports, which can improve the accuracy of interpreting medical reports.

[0004] The technical solution of this application embodiment is implemented as follows:

[0005] This application provides a method for processing medical reports, the method comprising:

[0006] Identify the report type of the medical report of the target object, wherein the target object is the subject described in the medical report;

[0007] Identify abnormal items in the medical report and query multiple medical knowledge entries based on the abnormal items;

[0008] Based on the historical diagnostic data of the target object, attention encoding is performed on the multiple medical knowledge item data to obtain the attention weights of the multiple medical knowledge item data corresponding to the target object;

[0009] Based on the attention weights, the multiple medical knowledge item data are concatenated to obtain medical knowledge data that is adapted to the target object;

[0010] Based on the report type, the abnormal items, and the medical knowledge data, construct prompt words;

[0011] Based on the prompt words, a pre-trained language model is invoked to generate interpretation data for the medical report.

[0012] In the above scheme, the report type of the medical report identifying the target object includes:

[0013] For multiple matching rules, the matching rules are read in descending order of priority to perform the following processing:

[0014] Match the currently read matching rules with the structured data;

[0015] If a match fails, continue reading the next matching rule.

[0016] If a match is successful, the report type in the currently traversed matching rule will be used as the report type of the medical report.

[0017] In the above scheme, the structured data in the medical report includes medical examination data from multiple items;

[0018] The identification of abnormal items in the medical report includes:

[0019] In response to the fact that the item is a test item, based on the preset reference information of the item and the medical examination data of each item, abnormal items in the medical report are identified;

[0020] In response to the fact that the item is an examination item, based on the medical examination data of each item and a preset abnormal item library, abnormal items in the medical report are identified.

[0021] In the above scheme, the response to the item being a test item involves identifying abnormal items in the medical report based on preset reference information for the item and medical examination data for each item, including:

[0022] When the medical examination data is numerical, the preset reference information is a preset reference range for the values ​​of normal items. The medical examination data is compared with the preset reference range to obtain a first comparison result. In response to the first comparison result indicating that the medical examination data exceeds the preset reference range, the first comparison result and the name of the item are combined to form the abnormal item. When the medical examination data is text, the preset reference information includes abnormal keywords. The medical examination data is compared with the abnormal keywords to obtain a second comparison result. In response to the second comparison result indicating that the medical examination data matches the abnormal keywords, the medical examination data and the name of the item are combined to form the abnormal item.

[0023] In the above scheme, the abnormal item library includes multiple abnormal item samples; in response to the item being an examination item, based on the medical examination data of each item and the preset abnormal item library, the abnormal items in the medical report are identified, including:

[0024] The following processing is performed on the medical examination data for each of the aforementioned items:

[0025] Obtain the first similarity between the medical examination data and each abnormal item sample; take the abnormal item sample corresponding to the highest first similarity as the abnormal item.

[0026] This application provides a method for processing medical reports, the method comprising:

[0027] Displays the medical report processing interface;

[0028] In response to the report upload operation in the medical report processing interface, the uploaded medical report is displayed;

[0029] In response to a trigger operation for interpreting the medical report, the interpretation data of the medical report is displayed, wherein the interpretation data of the medical report is generated by the medical report processing method provided in the embodiments of this application.

[0030] This application provides a medical report processing device, comprising:

[0031] The data processing module is used to identify the report type of the medical report of the target object, wherein the target object is the subject described in the medical report;

[0032] The data processing module is also used to identify abnormal items in the medical report and query multiple medical knowledge entries based on the abnormal items.

[0033] The data processing module is further configured to perform attention encoding on the multiple medical knowledge item data based on the historical diagnostic data of the target object, so as to obtain the attention weights of the multiple medical knowledge item data corresponding to the target object respectively;

[0034] The data processing module is further configured to concatenate the multiple medical knowledge item data based on the attention weights to obtain medical knowledge data that is adapted to the target object.

[0035] The prompt word construction module is used to construct prompt words based on the report type, the abnormal item, and the medical knowledge data;

[0036] The data generation module is used to generate interpretation data for the medical report based on the prompt words and by calling a pre-trained language model.

[0037] This application provides an electronic device, the electronic device comprising:

[0038] Memory is used to store executable instructions or computer programs.

[0039] The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the medical report processing method provided in the embodiments of this application.

[0040] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the medical report processing method provided in this application when executed by a processor.

[0041] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the medical report processing method provided in this application.

[0042] The embodiments of this application have the following beneficial effects:

[0043] By characterizing the medical field to which a medical report belongs through report type, and combining the abnormal items identified from the medical report as conditions for knowledge retrieval, by introducing medical knowledge data obtained in this way into the prompt words, not only is effective knowledge introduced into the language model when processing medical reports, but the generation scope of the language model is also constrained to the corresponding medical field, reducing the risk of misinterpretation of the language model due to contextual ambiguity.

[0044] Based on the target object's historical diagnostic data, attention weights are assigned to the medical knowledge item data associated with abnormal items, and personalized medical knowledge data adapted to the target object is generated by splicing them together. This achieves a dynamic combination of historical diagnostic data and medical knowledge item data. By introducing this medical data into the prompt words, the language model can use the medical knowledge item data for analysis with emphasis according to the attention weights when interpreting medical reports based on the medical knowledge data. This generates targeted interpretation data for the target object's medical reports, improving the accuracy of medical report interpretation. Attached Figure Description

[0045] Figure 1 This is a schematic diagram of the architecture of the medical report processing system provided in the embodiments of this application;

[0046] Figure 2 This is a schematic diagram of the server structure provided in an embodiment of this application;

[0047] Figure 3 This is a schematic diagram illustrating the principle of the medical report processing method provided in the embodiments of this application;

[0048] Figure 4A This is a first flowchart illustrating the medical report processing method provided in the embodiments of this application;

[0049] Figure 4BThis is a schematic diagram of the second process of the medical report processing method provided in the embodiments of this application;

[0050] Figure 4C This is a schematic diagram of the third process of the medical report processing method provided in the embodiments of this application;

[0051] Figure 4D This is a schematic diagram of the fourth process of the medical report processing method provided in the embodiments of this application;

[0052] Figure 4E This is a schematic diagram of the fifth process of the medical report processing method provided in the embodiments of this application;

[0053] Figure 4F This is a schematic diagram of the sixth process of the medical report processing method provided in the embodiments of this application;

[0054] Figure 4G This is a schematic diagram of the seventh process of the medical report processing method provided in the embodiments of this application;

[0055] Figure 4H This is a schematic diagram of the eighth process of the medical report processing method provided in the embodiments of this application;

[0056] Figure 4I This is a schematic diagram of the ninth process of the medical report processing method provided in the embodiments of this application;

[0057] Figure 4J This is a schematic diagram of the tenth process of the medical report processing method provided in the embodiments of this application;

[0058] Figure 4K This is a schematic diagram of the eleventh step of the medical report processing method provided in the embodiments of this application;

[0059] Figure 4L This is a schematic diagram of the twelfth step of the medical report processing method provided in the embodiments of this application;

[0060] Figure 4M This is a schematic diagram of the thirteenth step of the medical report processing method provided in the embodiments of this application;

[0061] Figure 4N This is a schematic diagram of the fourteenth step of the medical report processing method provided in the embodiments of this application;

[0062] Figure 5 This is a schematic diagram of the system framework of the medical report processing method provided in the embodiments of this application;

[0063] Figure 6 This is a schematic diagram illustrating the principle of structured processing provided in the embodiments of this application;

[0064] Figure 7This is a schematic diagram of the structure of the language model provided in the embodiments of this application;

[0065] Figure 8A This is a first schematic diagram of the medical report processing interface provided in the embodiments of this application;

[0066] Figure 8B This is a second schematic diagram of the medical report processing interface provided in the embodiments of this application;

[0067] Figure 8C This is a third schematic diagram of the medical report processing interface provided in the embodiments of this application.

[0068] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0070] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0071] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0072] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0073] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.

[0074] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0075] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0076] 1) In response to, used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

[0077] 2) Medical report processing interface, which provides human-computer interaction functions / displays medical report information.

[0078] For example, graphical user interfaces (GUIs) include augmented reality (AR) interfaces, virtual reality (VR) interfaces, voice user interfaces (VUIs), interactive projection interfaces (using projection technology to display information on a flat surface), eye-tracking interfaces (interfaces controlled by detecting the user's gaze), holographic interfaces (three-dimensional holograms formed by projecting images using holographic projection technology, allowing users to see stereoscopic images without wearing special glasses), multimodal interfaces (interfaces that combine multiple interaction methods, such as tactile, visual, and auditory interaction), and brain-machine interfaces (BMIs).

[0079] 3) A medical report is a report document generated by medical institutions or professionals after systematic testing, examination, or imaging examinations. It is used to objectively record an individual's health status, and its content structure may include:

[0080] Basic information: examinee's identity, examination time, institution, etc.;

[0081] Testing items: Covering dozens of quantitative / qualitative data, including complete blood count, biochemical indicators, and imaging examinations (such as ultrasound and CT scans);

[0082] Results are presented as: numerical results (such as hemoglobin values) and descriptive conclusions (such as "hypoechoic nodules in the liver");

[0083] Reference range: Marks the normal value range for different ages, genders, and physiological states;

[0084] Anomaly alerts: Results that deviate from the normal range are highlighted using symbols (↑ / ↓), text labels (such as "abnormal", "critical value") or color markings (red / yellow);

[0085] Doctor's advice: Based on the abnormal results, suggestions may be made for follow-up examinations, specialist consultations, or lifestyle adjustments.

[0086] 4) Structured data refers to the digital expression of medical information in medical reports that was originally presented in free text or semi-structured form, after being systematically organized through standardized formats and logical relationships.

[0087] 5) Report types: Based on testing technology and sample type, reports can be classified into Laboratory Test Reports (or testing reports) and Imaging / Instrumental Examination Reports (or inspection reports), which are explained below:

[0088] A laboratory report is a report of quantitative or qualitative data obtained through laboratory analysis of biological samples (such as blood, urine, secretions, tissues, etc.). Laboratory reports rely on chemical, immunological, or molecular biological methods and primarily focus on data indicators.

[0089] An examination report is a report that assesses the structure or function of the human body using medical imaging equipment or specialized instruments. Examination reports rely on physical imaging techniques or functional measurement tools, primarily consisting of images or functional parameters.

[0090] 6) Abnormal items refer to indicators (items) in medical reports that deviate from the preset reference range or indicate potential pathological conditions. These may be caused by disease, physiological fluctuations, testing errors, or individual differences, and cover biochemical indicators (such as abnormal blood glucose and blood lipids), immunological results (such as antibody positive / negative), and microbial drug sensitivity tests (such as drug resistance).

[0091] 7) Medical knowledge entries are independent units of medical knowledge stored in a structured form. Each entry corresponds to a node in the knowledge graph, covering medical entities or clinical decision-making elements such as disease characteristics, diagnostic criteria, treatment plans, and test indicators. The correlation between adjacent entries is constructed based on the logical order or semantic similarity of the medical diagnostic process, and the scientificity and timeliness of the content are ensured through the knowledge graph update mechanism.

[0092] 8) Optical Character Recognition (OCR) is a technology that converts text in images into editable text. It scans or photographs paper documents, images, etc., uses computer algorithms to recognize the text information within, and converts it into a computer-processable text format.

[0093] 9) Retrieval-Augmented Generation (RAG) is an artificial intelligence technique that combines information retrieval and text generation, aiming to improve the performance of large language models in knowledge-intensive tasks. Its core idea is to retrieve relevant information from external knowledge bases and input this information as context into the large language model, thereby generating more accurate, relevant, and richer answers.

[0094] 10) Large Language Models (LLMs), also known as large models, are large-scale language models designed to understand and generate human language. They are trained on massive amounts of text data and can perform a wide range of tasks, including text summarization, translation, sentiment analysis, and more. Large language models are characterized by their enormous scale, containing billions of parameters that help them learn complex patterns in language data. They are typically based on deep learning architectures. Large language models refer to deep learning models trained on massive amounts of text data, containing billions or even more parameters. They can be used to generate natural language text and understand its meaning. Through training, the models can learn the statistical regularities and semantic relationships of language to build a vast language knowledge base, thereby simulating human language understanding and generation capabilities.

[0095] In the processing methods of medical reports in related technologies, rich domain knowledge is used as support, a large amount of medical knowledge related to report interpretation is collected, and a special medical model is obtained through methods such as instruction fine-tuning. However, this method has high iteration costs and slow knowledge iteration speed. At the same time, in the report interpretation scenario, there are defects such as rigidity in the processing of complex numerical logic, which affects the accuracy of medical report interpretation.

[0096] This application provides methods, apparatus, devices, computer-readable storage media, and computer program products for processing medical reports, which can improve the accuracy of interpreting medical reports. The following describes exemplary applications of the electronic devices provided in this application. The electronic devices provided in this application can be implemented as various types of terminals such as laptops, tablets, desktop computers, set-top boxes, smartphones, smart speakers, smartwatches, smart TVs, and vehicle terminals, or they can be implemented as servers.

[0097] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of the medical report processing system provided in the embodiments of this application. Figure 1 The system involves server 100, terminal device 200, and network 300. Terminal device 200 is connected to server 100 through network 300, which can be a wide area network (WAN), a local area network (LAN), or a combination of both.

[0098] In some embodiments, the present application embodiments can be implemented collaboratively by a server and a terminal device. For example, the terminal device 200 sends a medical report to the server 100, the server 100 receives the medical report, and generates interpretation data of the medical report using the medical report processing method provided in the present application embodiments, and the server 100 sends the interpretation data to the terminal device 200.

[0099] In other embodiments, the embodiments of this application can be implemented by a terminal device alone. The terminal device 200 acquires a medical report and generates interpretation data for the medical report using the medical report processing method provided in the embodiments of this application.

[0100] Taking the server's use for processing medical reports as an example, see... Figure 2 , Figure 2 This is a schematic diagram of the server structure provided in an embodiment of this application. Figure 2 The server 100 shown includes at least one processor 110, memory 130, and at least one network interface 120. The various components of server 100 are coupled together via a bus system 140. It is understood that the bus system 140 is used to implement communication between these components. In addition to a data bus, the bus system 140 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 140.

[0101] The processor 110 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0102] The memory 130 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 130 may optionally include one or more storage devices physically located away from the processor 110.

[0103] The memory 130 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 130 described in this application embodiment is intended to include any suitable type of memory.

[0104] In some embodiments, memory 130 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0105] Operating system 131 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, for implementing various basic business functions and handling hardware-based tasks.

[0106] The network communication module 132 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 120, exemplary network interfaces 120 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.

[0107] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2 A processing device 133 for medical reports stored in memory 130 is shown. This device can be software in the form of programs and plugins, and includes the following software modules: a data processing module 1331, a prompt word construction module 1332, and a data interpretation generation module 1333. These modules are logically integrated and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.

[0108] In some embodiments, the terminal device or server can implement the medical report processing method provided in this application by running various computer-executable instructions or computer programs. For example, computer-executable instructions can be microprogram-level commands, machine instructions, or software instructions. Computer programs can be native programs or software modules in an operating system; they can be native applications (APPs), i.e., programs that need to be installed in the operating system to run; or they can be applets that can be embedded in any APP, i.e., programs that only need to be downloaded to a browser environment to run. In summary, the aforementioned computer-executable instructions can be any form of instruction, and the aforementioned computer programs can be any form of application, module, or plugin.

[0109] In other embodiments, the apparatus provided in this application can be implemented in hardware. As an example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the medical report processing method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0110] The following will describe the medical report processing method provided in this application embodiment, with the server as the execution subject, in conjunction with the exemplary application and implementation of the server provided in the embodiments of this application.

[0111] See Figure 3 , Figure 3This is a schematic diagram illustrating the principle of the medical report processing method provided in this application embodiment. The medical report is processed in a structured manner to obtain structured data (corresponding to step 101 below); the report type of the medical report is identified based on the structured data (corresponding to step 102 below); abnormal items in the medical report are identified based on the structured data (corresponding to step 103 below); medical knowledge data related to the abnormal items is obtained, wherein the medical knowledge data is obtained by concatenating multiple medical knowledge item data based on corresponding attention weights (corresponding to step 104 below); prompt words are constructed based on the structured data, report type, abnormal items, and medical knowledge data (corresponding to step 105 below); and interpretation data of the medical report is generated by calling a pre-trained language model based on the prompt words (corresponding to step 106 below).

[0112] See Figure 4A , Figure 4A This is a first flowchart illustrating the medical report processing method provided in this application embodiment, which will be combined with... Figure 4A The steps shown are explained.

[0113] In step 101, the medical report is processed to obtain structured data.

[0114] In some embodiments, where the medical report is in text format, see [link to relevant documentation]. Figure 4B , Figure 4A Step 101 shown can be implemented through steps 201 to 202, which are explained in detail below.

[0115] Here, "text format" refers to a medical report format where the main component is editable and searchable text content, rather than images or scanned documents. For example, a medical report can be a Word document, an editable text PDF, etc.

[0116] For example, a text-based medical report could read: "Ms. Wang, female, 62 years old. Ultrasound findings: Irregular liver shape with multiple hypoechoic nodules (maximum 1.2cm), enhanced CT recommended. Blood biochemistry: ALT 58U / L (reference range 9-50), AST 65U / L↑, triglycerides 2.8mmol / L. Preliminary diagnosis: Nonalcoholic fatty liver disease."

[0117] In step 201, a preset data structure prompt is obtained. The data structure prompt is used to define the field template of structured data. The field template includes multiple fields, and each field corresponds to an entity type.

[0118] Here, data structure prompts are standardized field templates designed for the structured processing of medical text. By predefining entity types and their constraints, they guide language models to accurately extract information from medical reports, resulting in structured data. Data structure prompts consist of hierarchical fields, which organize data according to a hierarchical structure, used to standardize data by dividing it into different levels of fields.

[0119] For example, the "Patient Information" field is a high-level field, which includes low-level fields such as "Name (string type)", "Gender (enumeration type: male / female / other)" and "Age (integer type)"; the "Test Indicator" field is a high-level field, which includes low-level fields such as "Item Name (pre-set medical thesaurus matching)", "Test Value (numerical + unit composite type)" and "Reference Range (range expression)".

[0120] Hierarchical fields standardize data entry and avoid type errors by clearly defining the data type of each field, such as limiting the data type of "name" to string and the data type of "age" to integer. They also prevent unreasonable values ​​by constraining the value range type (such as limiting the blood pressure unit to mmHg). Furthermore, they standardize medical terminology by establishing medical knowledge mappings (such as standardizing "ALT (Alanine Aminotransferase)" to "alanine aminotransferase"). These multiple constraints work together to ensure the accuracy and standardization of the extracted data.

[0121] For example, data structure hints can be represented as:

[0122] Please extract and organize the following JSON structure from the medical report:

[0123] Basic information: {

[0124] "Patient Name" (string, required, extracted from the beginning of the medical report)

[0125] "Gender" (enumeration: male / female / other, required, supports mapping of synonyms such as "male" and "female")

[0126] "Age" (integer, required; if the text contains "years" or "age in years", the numerical part will be extracted first).

[0127] }

[0128] Test results: {

[0129] "Project Name" (string, required, must be mapped to a standard medical thesaurus, e.g., "ALT" converted to "alanine aminotransferase")

[0130] "Detection value" (compound type, the numerical value and unit need to be separated, such as "6.3×10^9 / L" which is parsed as {"numerical value": 6.3, "unit": "10^9 / L"}).

[0131] "Reference range" (interval expression, such as "4-10" is converted to [4, 10], supports inequalities such as "<5" and "≥20")

[0132] }

[0133] Imaging examinations (array): [{

[0134] "Organ / Part" (string, required, e.g., "liver", "chest CT scan", etc.)

[0135] "Description" (string, retaining the original description, such as "blurred boundaries, uneven density")

[0136] "Conclusion" (enumeration: normal / abnormal / suspicious, judged based on keywords such as "no abnormality found" and "suspicious placeholder")

[0137] }]

[0138] Diagnostic opinion: {

[0139] "Preliminary Diagnosis" (string, required, based on the content following "Diagnosis:" and "Considered as")

[0140] "Final Diagnosis" (string, if "Confirmed as" or "Revised Diagnosis" exists, it overrides the initial diagnosis).

[0141] "ICD-11 code" (string, automatically matched with the International Classification of Diseases code based on the diagnosis name).

[0142] }

[0143] Constraints:

[0144] Unit standardization (e.g., mandatory standardization of "mmHg" and "mmol / L", and removal of Chinese units such as "millimeters of mercury");

[0145] Numerical logic verification (e.g., "blood pressure 130 / 85 mmHg" needs to be split into {"systolic pressure": 130, diastolic pressure: 85}, and the unit should be converted to "mmHg");

[0146] Conflict resolution (if the same item occurs multiple times, only the last test result is retained)".

[0147] In step 202, the language model is invoked to perform entity recognition on the medical report using data structure prompts, resulting in multiple entity types and entity values ​​for each entity type. The entity values ​​for each entity type are then filled into the fields corresponding to the entity type to obtain structured data.

[0148] In the structured processing of medical reports, Named Entity Recognition (NER) refers to using Natural Language Processing (NLP) technology to identify predefined entity types (such as "patient name," "test item," and "test value") from unstructured text and extract their corresponding entity values ​​(such as "Wang," "ALT," and "58U / L"). These entities need to be mapped to field templates defined in the data structure prompts. Through steps such as type constraints, logical verification, and standardization transformation, structured data that conforms to medical data specifications is finally generated.

[0149] In some embodiments, a medical report in text format is concatenated with data structure prompts to form an input sequence; the input sequence is segmented to obtain multiple tokens; each token is embedded and encoded to obtain its embedding features; the language model performs attention encoding on the embedding features of each token to dynamically capture the association between rule constraints (such as field types and unit standardization requirements) in the prompts and entity semantics (such as test items and numerical descriptions) in the medical text, thus obtaining attention-encoded features for each token; and the data is decoded based on the attention-encoded features of each token to generate structured data layer by layer.

[0150] For example, the input sequence can be segmented to obtain multiple tokens in the following ways: using punctuation marks such as spaces, periods, and commas as tokenization markers to perform tokenization processing on the input sequence; or it can be segmented by a tokenizer based on byte-pair encoding (BPE) or a tokenizer based on byte-level byte-pair encoding. The embodiments of this application do not limit the specific tokenizer or segmentation method used to perform tokenization processing on the input sequence.

[0151] For example, embedding each word into an encoding layer to obtain its embedding features can be achieved by: performing embedding encoding on multiple words through an embedding layer to obtain the embedding features. For example, the embedding layer can use word embeddings, character embeddings, and subword embeddings to perform embedding encoding on the word to obtain the embedding features of each word.

[0152] Here, embedding features refer to the digital representation of each word element obtained through word segmentation after embedding encoding. This digital representation characterizes the semantic information of the word element.

[0153] For example, suppose the input sequence is "...white blood cell count: 10.5, unit: cells / μL...". Using a word segmenter to segment the input sequence yields multiple word units [..."white blood cells", "count", "10.5", ",", "unit", ":", "cells", " / ", "μL"...]. Before embedding encoding, these word units are in text form, such as "white blood cells", "10.5", "cells", etc., just individual text strings. After embedding encoding, for example, "white blood cells" can be encoded into a 4-dimensional vector [0.1, 0.3, -0.2, 0.4] (this is just an example; the dimension is pre-set), and "10.5" is encoded into a vector [0.2, 0.5, 0.1, -0.3]. Each word unit is converted into a fixed-dimensional numerical vector; these vectors are called embedding features. At this point, the original text-based word units are transformed into numerical embedding features that the language model can process, and these embedding features contain the semantic information of the corresponding word units.

[0154] For example, attention weights of the embedded features are calculated using an attention mechanism (e.g., self-attention mechanism). The attention weights represent the importance of the embedded features to the current task (i.e., medical report structuring). Multiplying the attention weights of the embedded features with the embedded features yields a weighted embedded feature, which is the attention-encoded feature.

[0155] Medical report text and data structure prompts contain complex semantics. By calculating attention weights, the correlation between the rule constraints in the data structure prompts (i.e., the conditions defined in the data structure prompts for standardizing structured data entry, such as field type limitations, value range constraints, and medical terminology standardization) and the entity semantics in the medical text (i.e., the semantic information of content in the medical report such as the test item name (white blood cell count) and specific numerical values ​​(e.g., 10.5, unit: cells / μL)) can be dynamically captured. The attention weights represent the importance of the embedded features to the current task of structuring medical reports. In this way, the correlation between the rule constraints in the prompts (e.g., the "test value" field is a composite type, requiring separation of numerical value and unit) and the entity semantics in the medical text (e.g., the semantics of "white blood cell count," "10.5," etc.) can be dynamically captured. For example, the attention mechanism increases the attention weight between "10.5" and "detection value", clarifying the correspondence between "10.5" and "detection value". In other words, through the attention mechanism, the model can clearly determine that "10.5" is a value belonging to the category of "detection value" and is the specific result corresponding to the detection value.

[0156] Meanwhile, attention weights can highlight key information in medical reports that is relevant to structured processing and effectively suppress interference from irrelevant information such as punctuation marks. For example, in the above example, the attention weights of words such as "white blood cell count", "10.5", and "cells / μL" are increased, while the attention weights of words such as ":" and "," are decreased. This improves the efficiency and accuracy of key information extraction and processing (i.e., the higher the attention weight, the more attention the word is received), and ensures the quality of structured data.

[0157] Furthermore, given the diversity and uncertainty of medical report texts, the calculation of attention weights allows language models to flexibly adapt to different text content and contexts, adaptively focusing on key information, thereby accurately performing entity recognition and structured processing.

[0158] For example, decoding based on the attention-encoded features of each word to generate structured data layer by layer is achieved as follows: The attention-encoded features are transformed using a Multilayer Perceptron (MLP) in the language model's decoder. A linear layer is then used to predict the entity type probability distribution corresponding to each word in the medical report, selecting the category with the highest probability as the entity type for that word. A pointer network is used to identify entity boundaries, determining the start and end positions of each entity in the input sequence. For the identified entity values, regular expression matching and string replacement are used to clean and standardize them according to predefined transformation rules in the data structure prompts. Finally, the entity values ​​are nested and assembled with the fields in the data structure prompts according to the logical relationships between entities, outputting structured data.

[0159] Here, the entity type of the word corresponds to the lower-level field in the hierarchical field of the data structure prompt word. Following the example in step 201, the entity type may include patient name, gender, age, project name, detection value, etc.

[0160] For example, suppose the medical report text is "Patient Zhang, male, 35 years old. The test item for this test was white blood cell count, and the value was 10.5 cells / μL". The input sequence after concatenating this with the data structure prompt is: "Please extract and organize the following JSON structure from the medical report: Basic Information: {'Patient Name' (string, required, extracted from the header of the medical report), 'Gender' (enumeration: male / female / other, required, supports mapping of synonyms such as 'male', 'female', etc.), 'Age' (integer, required, if...} (Text containing 'years' or 'years in years' will prioritize extracting the numerical portion.) Test results: {'Item Name' (string, required, must be mapped to a standard medical thesaurus, e.g., 'ALT' converted to 'alanine aminotransferase'), 'Detection Value' (compound type, must separate the numerical value and unit, e.g., '6.3×10^9 / L' parsed as {'numerical value': 6.3, 'unit': '10^9 / L'})} Patient Zhang, male, 35 years old. The test item in this study was white blood cell count, with a detection value of 10.5 cells / μL. After embedding encoding and attention encoding, the attention-encoded features are transformed using a multilayer perceptron in the decoder, and combined with a linear layer to predict the entity type probability distribution corresponding to each word. For example, for the word "Zhang Moumou", the linear layer predicts that it has the highest probability of belonging to "patient name"; for the word "male", it predicts that it has the highest probability of belonging to "gender"; "35" has the highest probability of belonging to "age"; "white blood cell count" has the highest probability of belonging to "item name"; "10.5" has the highest probability of belonging to the numerical part of "detection value"; and "number / μL" has the highest probability of belonging to the unit part of "detection value". Finally, the category with the highest probability for each word is selected as its corresponding entity type, thus mapping the words in the medical text one-to-one with the lower-level fields in the hierarchical fields of the data structure prompts, laying the foundation for subsequent generation of structured data.

[0161] For example, identifying entity boundaries and determining the start and end positions of each entity in the input sequence using a pointer network can be achieved as follows: The pointer network takes the attention-encoded features of each word in the input sequence as input and uses two independent pointer models to predict the start and end positions of the entities. Each pointer model is an attention-based classifier that calculates a probability value for each position in the input sequence, representing the likelihood that the position is the start or end position of an entity. During training, the pointer network optimizes its parameters by minimizing the error between the predicted and true positions, enabling it to accurately identify entity boundaries. During inference, the pointer network outputs the combination of positions with the highest probability values ​​based on the trained pointer models as the start and end positions of the entities.

[0162] For example, given the input sequence "Patient Name: Zhang San, Age: 28 years old", after obtaining the attention encoding features of each word through previous processing, the first pointer model of the pointer network calculates the position of each word and finds that the starting position of "Zhang" has the highest probability, thus determining it as the starting position of the "Patient Name" entity. Next, the second pointer model continues calculation and finds that the ending position of "San" has the highest probability, so it determines it as the ending position of the "Patient Name" entity. Thus, based on the starting and ending positions (entity boundaries), the entity value "Zhang San" corresponding to the "Patient Name" entity is identified. Similarly, for the "Age" entity, the pointer network identifies the starting and ending positions of "28", thus identifying the entity value "28" corresponding to the "Age" entity.

[0163] For example, based on the predefined transformation rules in the data structure prompts, entity values ​​can be cleaned and standardized using regular expression matching and string replacement. This can be achieved as follows: Regular expressions match character sequences in entity values ​​by defining specific patterns, accurately locating data segments that meet the conditions. Combined with operations such as replacement and extraction, this achieves data cleaning and format conversion. String replacement, on the other hand, replaces non-standard, redundant, or erroneous characters and words in entity values ​​with standard forms according to rules, eliminating noise and inconsistencies in the data and making it conform to the requirements of structured storage and analysis. The two work together to efficiently standardize entity values.

[0164] For example, for an entity value like "blood pressure: 130 / 85 mmHg" in a medical report, the regular expression \d+ / \d+ can be used to match "130 / 85". Then, using the capture and conversion functions of the regular expression, the Chinese numerals "130" and "85" are converted into the Arabic numerals "130" and "85". Then, using string replacement, "mmHg" is replaced with the standardized unit "mmHg" required by the data structure prompt, finally obtaining the standardized entity value "130 / 85mmHg" to meet the format and specification requirements of structured data storage.

[0165] For example, to nest and assemble entity values ​​with fields in the data structure prompts according to the logical relationships between entities and output structured data, this can be achieved as follows: For logical relationships between entities, such as inclusion relationships, the decoder of the transformer sorts out the hierarchical relationships between entities. According to the hierarchical fields specified in the data structure prompts (see the explanation in step 201), the entity values ​​of the entities corresponding to the lower-level fields are nested within the entity structures corresponding to the higher-level fields. For example, the specific numerical value corresponding to the lower-level field "detection value" is nested into the entity structure corresponding to the higher-level field "inspection item". In this process, following the format, data type, and other pattern constraints specified by the data structure prompts, entities and their relationships are accurately assembled one by one, ultimately outputting structured data that meets the requirements, thus successfully achieving a complete conversion from unstructured text to structured data.

[0166] Here, the entity structure is a framework with specific hierarchical relationships and attribute constraints built based on the field templates in the data structure prompts. It is used to accommodate the corresponding entity values. For example, "inspection item" is a high-level field, including low-level fields such as "item name", "test value", and "reference range". These low-level fields together form a structured framework, namely the entity structure of "inspection item", which is used to standardize and organize related entity values.

[0167] For example, the decoder of the transformer takes the attention-encoded features of each word as input and processes the features using an internal neural network structure (such as a multilayer perceptron, self-attention mechanism, etc.). During the processing, it analyzes the associations and dependencies between each entity according to the hierarchical rules and logical constraints predefined in the data structure prompt words, identifies which entities belong to high-level fields and which belong to low-level fields, and then determines the hierarchical nesting relationship between them, and finally accurately nests the entities in the corresponding hierarchical structure.

[0168] Here, the Transformer is a deep learning model based on a self-attention mechanism, primarily used for sequence-to-sequence natural language processing tasks, such as machine translation and text summarization. The Transformer model mainly consists of an encoder and a decoder, responsible for processing the input sequence and generating the output sequence, respectively. The self-attention mechanism allows the Transformer to capture long-range dependencies in a sequence without using recurrent neural networks or convolutional neural network structures.

[0169] Steps 201 and 202 achieve automated structured transformation of medical reports: through deep collaboration between predefined data structure prompts and language models, the entity types and related semantics in medical reports can be accurately identified, and the standardized transformation and hierarchical assembly of entity values ​​are completed under rule constraints. This process achieves high-precision and high-efficiency medical data standardization processing, providing a high-quality, machine-readable structured data foundation for subsequent processing.

[0170] In some embodiments, where the medical report is in image format, see [link to relevant documentation]. Figure 4C , Figure 4A Step 101 shown can be implemented through steps 301 to 303, which will be explained in detail below.

[0171] Here, image format refers to the specific file format used to store and represent image data. In the medical field, common image formats include the following:

[0172] Digital Imaging and Communications in Medicine (DICOM) format is an international standard for the storage, transmission, and display of medical images. It can contain rich image information, such as basic patient information, examination equipment parameters, and image pixel data, and supports various medical image types, such as X-rays, CT scans, and MRI scans. DICOM format images can be recognized and processed by various medical imaging devices and image management systems.

[0173] JPEG format: A commonly used lossy compression image format with a high compression ratio, capable of reducing file size while maintaining a certain image quality, facilitating storage and transmission. In medicine, it is often used in scenarios where image precision requirements are not particularly high, such as auxiliary images in medical teaching materials and medical records.

[0174] PNG format: This is a lossless compression image format that supports transparent backgrounds and preserves image details and transparency information, resulting in high image quality, but the file size is relatively large. In medical imaging, PNG format may be used for images that require clear display of details and transparency, such as annotations on certain pathological slides.

[0175] BMP format: It is a simple image file format that usually contains pixel data, color information, etc. of the image. The image quality is high, but the file size is large. It is generally used in situations where image quality is extremely important and file size is not a major concern.

[0176] In step 301, the medical report is subjected to text recognition processing to obtain text recognition results, which include multiple recognized texts and the position of each recognized text in the medical report.

[0177] In some embodiments, text recognition processing of medical reports (images) is performed using optical character recognition technology to obtain text recognition results.

[0178] For example, the input medical report (such as a scan or photograph) is first preprocessed, including grayscale conversion, noise reduction, and tilt correction to optimize image quality. Then, a deep learning-based text detection model (such as the Efficient and Accurate Scene Text detector (EAST) or Character Region Awareness for Text Detection (CRAFT)) is used to locate text regions in the image, generating bounding boxes containing text location information. These bounding boxes are represented by pixel coordinates (such as top-left corner coordinates, width, and height). Next, a text recognition model (such as a Convolutional Recurrent Neural Network (CRNN) or Transformer OCR) is used to recognize characters in each detected text region, converting the text in the image into a machine-readable string. Finally, the recognized text is associated with its corresponding location coordinates (e.g., "patient name" is located in rows 100-200 and columns 50-150 of the image) and output as a structured text recognition result. The entire process is achieved through an end-to-end model or a phased pipeline, ensuring high-fidelity reproduction of the text content and its original layout information in medical reports.

[0179] For example, suppose we are processing a scanned blood test report containing tables and paragraphs. First, we detect the text "Patient Name: Li Mou" in the top region of the image (coordinate range: x1=50, y1=30, x2=300, y2=80), recognizing it as the string "Li Mou" and recording its location. Then, in the middle region (x1=50, y1=100, x2=400, y2=150), we locate the table row "ALT58U / L↑", recognizing the text as "ALT58U / L↑" and marking it as located in the second row and third column of the table. Finally, at the bottom of the image (x1=50, y1=400, x2=600, y2=450), we recognize "Preliminary Diagnosis: Non-alcoholic Fatty Liver" in the conclusion paragraph. The final output contains all the recognized text and its coordinates in the original image, providing a raw data foundation with location context for subsequent structured processing.

[0180] In step 302, a preset structured data template is obtained. The structured data template includes multiple fields and text position rules corresponding to each field. The text position rules are used to characterize the position of the identified text corresponding to each field in the medical report.

[0181] Here, a structured data template is a pre-defined standardized data framework consisting of multiple specific fields and text location rules for each field. These location rules are used to accurately identify the specific location of the identification text associated with each field in the medical report, thereby providing clear guidance and constraints for the structured processing of unstructured medical reports.

[0182] Taking a structured data template for a blood test report as an example, the structured data template can include fields such as "Patient Name", "Gender", "Age", "Test Item Name", "Test Result", "Reference Range", and "Test Date". Among them, the text position rule for the "Patient Name" field can be the text in a fixed area in the upper left corner of the first page of the medical report; the fields such as "Test Item Name", "Test Result", and "Reference Range" are presented in table form in the body of the report, and each table cell has a fixed row and column position relationship.

[0183] In step 303, the location that matches the text location rule is taken as the target location, and the identified text in the medical report located at the target location is filled into the field of the corresponding text location rule in the structured data template to obtain structured data.

[0184] In some embodiments, the corresponding identified text is searched and located in the medical report according to the text location rules corresponding to the fields in the structured data template. For example, the text in the corresponding area of ​​the report is found according to the text location rules of "Patient Name", and then extracted and filled into the "Patient Name" field of the template. For test data presented in tabular form, the table row and column information is identified according to the text location rules of fields such as "Test Item Name" and "Test Result", and the content of each cell is accurately extracted and filled into the corresponding field, thereby completing the conversion from unstructured medical reports to structured data.

[0185] For example, when the examination report is a CT scan report, the text position rule for the "Examination Site" field in the structured data template is set to the name of the site appearing in the first sentence of the report text. Based on this rule, "Examination Site: Chest" is quickly located, and "Chest" is extracted and filled into the "Examination Site" field of the template. If the rule for the "Examination Conclusion" field in the template is the paragraph content at the end of the report that begins with "Conclusion:", then the corresponding paragraph is found, and the specific conclusion text is completely extracted and filled into the field, ultimately forming structured data that meets the template structure requirements.

[0186] Steps 301 to 303 complete the process of transforming unstructured medical reports in image format into standardized structured data through text recognition, matching structured data template field position rules, and field filling. This achieves the beneficial effect of improving the efficiency and accuracy of structured processing of medical reports. On the one hand, the automated processing significantly reduces the time and labor costs of manually entering structured data and reduces errors that may occur during manual operation. On the other hand, structured data is easier to store, retrieve, and analyze, providing a high-quality data foundation for subsequent in-depth mining of medical data (such as disease diagnosis assistance, medical quality assessment, and medical research).

[0187] See also Figure 4A In step 102, the report type of the medical report is identified based on the structured data.

[0188] Here, report type is a classification of medical reports based on testing technology and sample type. It is mainly divided into test reports and examination reports. The former uses laboratory technology to analyze biological samples to obtain quantitative or qualitative data, relying on chemical, immunological and other methods; the latter uses medical imaging equipment or specialized instruments to evaluate human structure or function, relying on physical imaging or functional measurement methods.

[0189] Common types of test reports include:

[0190] Blood type report: Tests ABO blood type, Rh blood type, etc.

[0191] Biochemical test report: metabolic indicators such as blood glucose, liver and kidney function, and blood lipids.

[0192] Microbiological test report: bacterial culture, drug sensitivity test, viral load detection, etc.

[0193] Gene diagnostic reports: These reports analyze genetic variations or pathogenic microbial genes using gene sequencing technologies such as Next-Generation Sequencing (NGS).

[0194] Common types of inspection reports include:

[0195] Imaging reports: Images and diagnostic descriptions generated by X-rays, computed tomography (CT), magnetic resonance imaging (MRI), etc.

[0196] Bone mineral density test (DEXA) report: assesses the degree of osteoporosis using dual-energy X-ray absorptiometry.

[0197] Ophthalmological optometry report: Visual function parameters such as refractive error and pupillary distance are measured using an optometer.

[0198] Electrocardiogram (ECG) report: Records the waveform of the heart's electrical activity.

[0199] In some embodiments, see Figure 4D , Figure 4A Step 102 shown can be implemented through steps 401 to 403, which will be explained in detail below.

[0200] In step 401, a preset type judgment prompt word is obtained, wherein the type judgment prompt word is used to instruct the language model to perform the following process: determine the report type of the medical report from a preset multiple candidate report types.

[0201] Here, the type judgment prompt is a pre-set guiding text information. Its function is to instruct the language model to accurately determine the specific type of the medical report based on multiple pre-set candidate report types. Through clear semantic guidance, it helps the language model focus on key features and achieve accurate identification and classification of medical report types.

[0202] For example, the type judgment prompt could be: "Determine the type of the following text. Candidate types: [Laboratory Report, Examination Report, Other]. Please output only the corresponding text type. If the input content is completely unrelated to medical laboratory tests, output 'Other.' If the input content involves medical laboratory tests, output only the most likely report type, without any extra content or analysis."

[0203] In step 402, the type judgment prompt words and structured data are encoded to obtain the encoded features of the structured data.

[0204] In some embodiments, type judgment prompts and structured data are concatenated into an input sequence; the input sequence is segmented into multiple word units; each word unit is embedded and encoded to obtain the embedding features of each word unit; the language model performs attention encoding on the embedding features of each word unit to obtain the attention encoding features of each word unit; and the attention encoding features of each word unit are used as the encoding features of the structured data.

[0205] For example, segmenting an input sequence into multiple tokens can be achieved in the following ways: using punctuation marks such as spaces, periods, and commas as segmentation markers to segment the input sequence; or using a segmenter based on byte-pair encoding, a segmenter based on byte-level byte-pair encoding, etc. The embodiments of this application do not limit the specific segmenter or segmentation method used to segment the input sequence.

[0206] For example, multiple lexical units can be embedded and encoded using an embedding layer to obtain embedding features. For example, the embedding layer can use embedding methods such as word embedding, character embedding, and subword embedding to perform embedding and encoding processes to obtain the embedding features of each lexical unit.

[0207] For example, attention weights of embedded features are calculated using an attention mechanism (e.g., self-attention mechanism). These attention weights represent the importance of the embedded features to the current task. Multiplying the attention weights of the embedded features by the embedded features yields a weighted embedded feature, which is the attention-encoded feature.

[0208] In step 403, the encoded features of the structured data are mapped using a language model to obtain the probability value of each candidate report type, and the candidate report type with the highest probability value is selected as the report type of the medical report.

[0209] In some embodiments, by setting up a multi-layer fully connected neural network in the language model, the encoded features of structured data are taken as input and subjected to multiple nonlinear transformations to progressively extract high-order semantic features. Each fully connected neural network layer multiplies the input features by a weight matrix and adds a bias vector, then performs nonlinear activation using an activation function (such as ReLU, GELU, etc.), enabling the model to learn semantic representations at different levels. Finally, an output layer maps the features to a vector space of the same dimension as the number of candidate report types, with each dimension's value corresponding to the probability value of a candidate report type.

[0210] For example, suppose there are three candidate report types: "complete blood count," "complete urine count," and "other." The input structured data encoding features are a 128-dimensional vector. This vector is input into a language model containing three fully connected neural networks. The first fully connected layer maps the 128-dimensional features to 256 dimensions, and outputs them after passing through the ReLU activation function. The second fully connected layer then maps the 256-dimensional features back to 128 dimensions, also passing through ReLU activation. The last fully connected layer maps the 128-dimensional features to a 3-dimensional vector, corresponding to the probability values ​​of "complete blood count," "complete urine count," and "other," respectively. If the output vector is [0.2, 0.7, 0.1], then "complete urine count," with the highest probability value, is selected as the report type for the medical report.

[0211] Steps 401 to 403 achieve automated intelligent determination of medical report types: By using type-judgment prompts to semantically guide the language model, and combining the encoding features of structured data with the feature mapping capabilities of multi-layer fully connected neural networks, the system can accurately capture the deep semantic relationships between medical report content and candidate types (such as the matching degree between "blood routine" and test indicator fields). This dynamically calculates the probability distribution of candidate types and outputs the most matching report type. This process achieves efficient and reliable medical text classification, avoiding the generalization limitations of traditional rule-based matching methods for complex texts, and reducing manual annotation and parameter tuning costs through end-to-end probabilistic modeling, thereby improving the efficiency and accuracy of medical report processing.

[0212] In other embodiments, see Figure 4E , Figure 4A Step 102 shown can also be implemented through steps 501 to 503, which will be explained in detail below.

[0213] In step 501, the structured data is matched with multiple preset type keywords to obtain matching results.

[0214] Here, type keywords can be a pre-defined set of words or phrases that characterize the core features of a specific report type. By comparing the text content in the structured data with these type keywords, it is determined whether a matching relationship exists. This matching can be based on exact string matching or through fuzzy matching algorithms (such as edit distance algorithms), thereby obtaining the matching results between the structured data and each type keyword, providing a basis for subsequent report type determination.

[0215] For example, edit distance algorithms (such as Levenshtein distance) measure the similarity between two strings by calculating the minimum number of editing operations (such as inserting, deleting, or replacing characters) required. This algorithm dynamically compares characters one by one, quantifying the differences into a numerical value; the smaller the value, the higher the similarity. When matching typographic keywords, if the edit distance is below a preset threshold (e.g., allowing 1-2 character differences), even if there are spelling errors or abbreviation differences (e.g., "heart enlargement" vs. "heart enlargement"), it can still be considered a valid match, thus enhancing the tolerance for text variations.

[0216] For example, suppose we set "blood routine" as the type keyword for blood routine reports, "urine routine" as the type keyword for urine routine reports, and "blood glucose test" as the type keyword for blood glucose monitoring reports. When the structured data contains the message "This urine routine test result shows abnormal protein content," the structured data is matched with the preset type keywords. This quickly identifies the type keyword "urine routine," resulting in a successful match.

[0217] In step 502, in response to the matching result indicating that the structured data and the type keyword are successfully matched, the report type pre-associated with the type keyword is used as the report type of the medical report.

[0218] In some embodiments, when the matching result in step 501 shows that the structured data successfully matches a certain type of keyword, the report type corresponding to that type of keyword is directly determined as the report type of a medical report based on this pre-association relationship. This method can quickly and directly determine the report type, reduce the consumption of computing resources, and improve processing efficiency.

[0219] Following the example in step 501, if the structured data "the result of this routine urine test shows abnormal protein content" successfully matches the type keyword "routine urine", since "routine urine" is pre-set to be associated with "routine urine report", the type of the medical report will be directly determined as "routine urine report", without the need for complex analysis and calculation.

[0220] In step 503, in response to the matching result indicating that the structured data failed to match the type keyword, the pre-trained classification model is invoked to perform report type classification processing on the structured data to obtain the report type of the medical report.

[0221] In some embodiments, when the structured data does not match any type of keyword in step 501, it indicates that the report type cannot be determined by simple keyword matching. In this case, the structured data is input into a pre-trained classification model. Based on the features and patterns it has learned, the model analyzes and predicts the structured data, calculates the probability that the structured data belongs to each candidate report type, and finally selects the report type with the highest probability as the type of medical report.

[0222] Steps 501 to 503 achieve efficient and accurate identification of medical report types. First, structured data is matched with type keywords to quickly identify medical report types with distinct characteristics. If a match fails, a pre-trained classification model is used to perform in-depth analysis and classification of complex or atypical reports. This process organically combines the efficiency of rule matching with the flexibility of machine learning. It achieves the beneficial effects of improving the efficiency and accuracy of medical report type identification while reducing the cost of manual intervention.

[0223] In other embodiments, identifying the report type of a medical report based on structured data can also be achieved by: for multiple matching rules, reading the matching rules in descending order of priority to perform the following processing: matching the currently read matching rule with the structured data; if the matching fails, continuing to read the next matching rule; if the matching succeeds, using the report type in the currently traversed matching rule as the report type of the medical report.

[0224] For example, based on the principle of rule priority matching, a hierarchical judgment system is constructed by pre-setting multiple matching rules with different priorities. Each matching rule contains specific text matching conditions and a corresponding report type. During execution, the rules are traversed sequentially in descending order of priority, matching the structured data with the current rule. The matching process can be based on exact string matching, regular expression matching, or semantic matching. Once the structured data successfully matches a rule, the traversal stops, and the report type associated with that rule is directly determined as the medical report type. If all rules fail to match, the report type cannot be determined in this way. This mechanism ensures that more important and targeted rules are executed first, so as to quickly and accurately complete the report type identification.

[0225] For example, suppose we set three matching rules, with priorities from highest to lowest: Rule 1, if the structured data contains keywords such as "CT image" or "MRI scan," the report type is "examination report"; Rule 2, if the structured data contains words such as "complete blood count" or "complete urine count," the report type is "laboratory report"; Rule 3, if the structured data contains "vaccination record," the report type is "preventive healthcare report." When processing a medical report whose structured data is "patient's lung CT image shows nodules," we first iterate through Rule 1. Finding the keyword "CT image," a successful match is found, and the report type is directly determined as "examination report," without continuing to iterate through subsequent rules. If the structured data is "this complete blood count showed an abnormal white blood cell count," after failing to iterate through Rule 1, we continue to iterate through Rule 2. Because the keyword "complete blood count" is matched, the report type is determined as "laboratory report."

[0226] See also Figure 4A In step 103, abnormal items in the medical report are identified based on structured data.

[0227] Here, abnormal items refer to indicators (items) in medical reports that deviate from the preset reference range or indicate potential pathological conditions due to reasons such as disease, physiological fluctuations, detection errors, or individual differences.

[0228] Preset reference ranges refer to normal ranges of physiological or biochemical indicators established using statistical methods based on data from healthy populations. They typically cover the distribution of typical measurements (such as 95% confidence intervals) of a specific population (e.g., age, gender) under standard testing conditions. They are used in clinical judgment to determine whether test results deviate from the normal range and serve as the benchmark for identifying abnormal items.

[0229] In some embodiments, structured data includes medical examination data from multiple items, see [link to relevant documentation]. Figure 4F , Figure 4A Step 103 shown can be implemented through steps 1031 to 1032, which will be explained in detail below.

[0230] Here, "item" refers to a test content unit with a specific name and meaning in a medical report. It defines a specific object or indicator, such as blood glucose, blood lipids, hepatitis B antibody, penicillin sensitivity test, etc. Each item has its unique testing purpose and significance, used to reflect a certain aspect of human health.

[0231] Medical examination data refers to the results obtained after conducting various tests. This information can be numerical, such as blood glucose levels or specific blood lipid levels, or text-based, such as a hepatitis B test result of "positive" or "negative," or an antibiotic sensitivity test result of "drug resistance" or "sensitive." It is a specific presentation of the test results and carries key information reflecting the human body's health status.

[0232] In step 1031, in response to the item being a test item, abnormal items in the medical report are identified based on the preset reference information of the item and the medical examination data of each item.

[0233] Here, laboratory testing refers to the analysis and testing of various human samples, such as blood, urine, and tissues, to obtain information about the physiological and pathological state of the human body. This can include various biochemical indicators, microbiological testing, immune testing, and genetic testing. For example, complete blood count (CBC), blood biochemistry, urinalysis, and pathogen detection all fall under the category of laboratory testing.

[0234] Preset reference information refers to a series of standards or reference data set in advance to determine whether a test result is normal or abnormal. It is derived from a large amount of data from healthy individuals and clinical experience, and includes preset reference ranges for test items, reference values ​​for different ages and genders, and thresholds for specific disease-related indicators. For example, the preset reference range for fasting blood glucose in adults is 3.9-6.1 mmol / L. This is one type of preset reference information for blood glucose testing. Doctors can compare a patient's actual blood glucose test value with this reference range to determine whether the patient's blood glucose is abnormal.

[0235] In some embodiments, see Figure 4G , Figure 4F Step 1031 shown can be implemented through steps 10311 to 10314, which will be explained in detail below.

[0236] In step 10311, when the medical examination data is numerical, the preset reference information is the preset reference range of the values ​​of normal items. The medical examination data is compared with the preset reference range to obtain the first comparison result.

[0237] In some embodiments, when medical examination data is numerical, a preset reference range for normal values ​​is set as the basis for judgment. The actual medical examination data is compared with this preset range to determine whether the data is within the normal range, thus providing a basis for judging whether the item is abnormal. This method utilizes the principle of numerical comparison to clearly and explicitly define the boundary between normal and abnormal.

[0238] For example, suppose a blood test report (medical report) has a preset reference range of 3.9-6.1 mmol / L for blood glucose. If a patient's blood glucose test result is 7.0 mmol / L, then this 7.0 mmol / L result is compared with the preset reference range. It is found that 7.0 mmol / L is greater than the upper limit of the reference range (6.1 mmol / L), resulting in the first comparison result indicating that the result exceeds the preset reference range.

[0239] In step 10312, in response to the first comparison result indicating that the medical examination data exceeds the preset reference range, the first comparison result and the name of the item are combined into an abnormal item.

[0240] In some embodiments, if the first comparison result shows that the medical examination data exceeds a preset reference range, it means that an anomaly has occurred in that item. Combining the first comparison result and the item name as an abnormal item is to clearly identify which specific item is abnormal and the nature of the anomaly.

[0241] Following the example in step 10311, since the blood glucose test data of 7.0 mmol / L exceeds the preset reference range, according to the rules, the first comparison result of "exceeds the preset reference range" and the item name "blood glucose" are combined to form an abnormal item description such as "blood glucose - exceeds the preset reference range", which can also be simplified to "blood glucose is high".

[0242] In step 10313, when the medical examination data is text, the preset reference information includes abnormal keywords. The medical examination data is compared with the abnormal keywords to obtain a second comparison result.

[0243] In some embodiments, when medical examination data is in text format, comparison and judgment are performed using preset reference information containing anomalous keywords. The medical examination data is compared with these anomalous keywords to see if there are any matches, thereby determining whether the item is abnormal. This method is based on the principle of text matching, identifying anomalies through specific keywords.

[0244] For example, in a hepatitis B test report, the medical examination data shows "positive," while the preset abnormal keywords include "positive." Comparing the medical examination data "positive" with the abnormal keywords reveals a match, resulting in a second comparison result of agreement.

[0245] In step 10314, in response to the second comparison result indicating that the medical examination data matches the abnormal keywords, the medical examination data and the name of the item are combined into an abnormal item.

[0246] In some embodiments, when the second comparison result indicates that the medical examination data matches the abnormal keywords, it indicates that the item is abnormal. Combining the medical examination data and the item name into abnormal items is also for the purpose of accurately recording and identifying abnormal situations.

[0247] Following the example in step 10313, since the medical test data "positive" matches the abnormal keyword, the medical test data "positive" and the item name "hepatitis B antibody" are combined to form an abnormal item description such as "hepatitis B antibody - positive", that is, "hepatitis B antibody positive", which clearly indicates that the patient's hepatitis B antibody test result is abnormally positive.

[0248] Steps 10311 to 10314 achieve comprehensive and accurate identification of abnormalities in laboratory test items within medical reports. For both numerical and text-based medical examination data, pre-defined reference range comparisons and abnormal keyword matching are used to systematically determine whether any items are abnormal, and then effectively combine the abnormalities with the item names. This achieves the beneficial effect of improving the efficiency and accuracy of identifying abnormal items in medical reports.

[0249] See also Figure 4F In step 1032, in response to the item being an examination item, abnormal items in the medical report are identified based on the medical examination data of each item and a preset abnormal item library.

[0250] Here, "examination-related items" is a general term encompassing all kinds of items that directly or indirectly observe and detect the structure, function, physiological or pathological state of the human body using various professional equipment, technologies and methods. Its scope is broad, including but not limited to imaging examinations (such as X-ray examinations, CT scans, MRI, etc.), functional examinations (such as electrocardiograms, pulmonary function tests, electroencephalograms, etc.), endoscopic examinations (such as gastroscopy, colonoscopy, bronchoscopy, etc.), and routine physical examinations (such as blood pressure measurement, cardiopulmonary auscultation, visual acuity tests, etc.).

[0251] The Abnormal Items Repository is a pre-built and continuously improved medical database specifically designed to store and manage information related to various known medical abnormalities. It contains a large number of clinically validated abnormal item samples with typical characteristics. Each sample includes detailed information such as the abnormality's name, specific description, relevant medical examination data characteristics, potential underlying diseases or health problems, and related clinical diagnostic criteria and treatment recommendations. Its purpose is to serve as a reference standard for medical examination data. In practical applications, by comparing and calculating similarity with patients' medical examination data, potential abnormal items in medical reports can be identified.

[0252] In some embodiments, the anomalous item library includes multiple anomalous item samples, see [link to relevant documentation]. Figure 4H , Figure 4F Step 1032 shown can be achieved by performing the following steps 10321 to 10322 on the medical examination data of each item, as explained in detail below.

[0253] In step 10321, the first similarity between the medical examination data and each abnormal item sample is obtained.

[0254] In some embodiments, a similarity measurement method is used to obtain the first similarity between the medical examination data and each abnormal item sample. The similarity measurement method can employ various algorithms such as cosine similarity and Euclidean distance. These algorithms can quantify the similarity between the medical examination data and the abnormal item samples in feature dimensions, thereby providing a basis for subsequent screening of abnormal items.

[0255] Taking a thyroid ultrasound examination as an example, the medical data from one examination was described as "a hypoechoic area is visible in the right lobe of the thyroid gland, with relatively clear borders and heterogeneous internal echoes." Several related abnormal item samples exist in the abnormal item database, such as "right lobe thyroid nodule," "right lobe thyroid cyst," and "thyroiditis." By calculating the text similarity between this medical examination data and each abnormal item sample, for example using an edit distance algorithm to calculate the degree of difference in text descriptions, the highest similarity was found with the "right lobe thyroid nodule" sample. Therefore, it was preliminarily determined that this examination data is highly associated with "right lobe thyroid nodule."

[0256] In step 10322, the abnormal item sample corresponding to the highest first similarity is taken as the abnormal item.

[0257] Based on the multiple first similarities calculated in step 10321, a screening decision is made to identify the abnormal item sample corresponding to the highest similarity. This process is equivalent to selecting the one with the best match to the actual medical examination data from multiple candidate abnormal items, thereby achieving accurate identification of abnormal items in the medical report.

[0258] Following the aforementioned thyroid ultrasound examination case, after calculating the first similarity scores (0.7, 0.3, and 0.2) between the medical examination data and the abnormal items "right thyroid lobe nodule," "right thyroid lobe cyst," and "thyroiditis" samples in step 10321, step 10322 compares these similarity values. Since 0.7 is the highest value, the "right thyroid lobe nodule" sample is identified as an abnormal item in this thyroid ultrasound examination medical report.

[0259] Steps 10321 and 10322 achieve efficient and accurate identification of abnormalities in examination items within medical reports. This process utilizes a data similarity calculation and screening mechanism to systematically compare medical examination data with samples in an abnormality database, significantly improving the speed of abnormality identification. Simultaneously, by leveraging a large number of clinically validated samples in the pre-set abnormality database, the accuracy of abnormality identification in medical reports is further enhanced.

[0260] In other embodiments, the structured data includes medical examination data for multiple items. Step 103 above can be implemented by a language model performing the following processing: concatenating the structured data of the medical report with preset anomaly identification prompts as input to the language model, wherein the anomaly identification prompts include instructions to the language model to call the anomaly item library and perform data comparison. After receiving the input, the language model encodes the medical examination data for each item to obtain the encoded features of each item, and retrieves anomaly item samples from the anomaly item library. It then uses similarity measurement algorithms such as cosine similarity and Euclidean distance to calculate the first similarity between the encoded features of each item and each anomaly item sample. The anomaly item sample corresponding to the highest first similarity (or the top k anomaly item samples corresponding to the first similarity) is identified as the anomaly item in the medical report, thereby efficiently and accurately completing the anomaly item identification process, fully leveraging the powerful capabilities of the language model in data processing and analysis, and improving the intelligence level of anomaly item identification.

[0261] See also Figure 4A In step 104, medical knowledge data related to the abnormal item is obtained.

[0262] In some embodiments, based on the identified abnormal items in the medical report (see step 103 above), multiple medical knowledge entries are queried; based on the historical diagnostic data of the target object, attention encoding is performed on the multiple medical knowledge entries to obtain the attention weights of the target object corresponding to the multiple medical knowledge entries; based on the attention weights, the multiple medical knowledge entries are concatenated to obtain medical knowledge data adapted to the target object.

[0263] In some embodiments, querying multiple medical knowledge entry data based on abnormal items can be achieved in the following way: determining the first node corresponding to each of the multiple abnormal items from a pre-constructed knowledge graph, reading the first knowledge entry data from each first node, wherein the knowledge graph includes multiple nodes, each node includes one knowledge entry data, and the types of medical knowledge entry data included in adjacent nodes match the types of medical knowledge entry data used sequentially in the diagnostic process of medical experts; for each first node, performing a traversal operation starting from the first node, and reading the second medical knowledge entry data from the second nodes traversed by the traversal operation.

[0264] For example, by utilizing the correspondence between nodes in a knowledge graph and medical knowledge entries, and taking anomalies as the starting point, the system obtains directly related first knowledge entries by identifying the relevant first node. Then, based on the matching logic between the connections between nodes in the knowledge graph and the medical diagnostic process, the system performs a walking operation on the first node to mine second medical knowledge entries that are indirectly related to the anomalies. This allows the system to construct a multi-level, multi-dimensional medical knowledge system around the anomalies, thus broadening the knowledge boundaries for interpreting anomalies.

[0265] For example, if the medical report identifies the abnormal item "high blood sugar", the corresponding node (first node) for "high blood sugar" is found in the knowledge graph. Data such as symptoms and diagnostic criteria of diabetes are read from this node. Then, starting from the "high blood sugar" node, the system moves through nodes related to complications and reads data such as diabetic nephropathy and diabetic retinopathy as second medical knowledge items.

[0266] The above processing can broaden the knowledge base for interpreting abnormal items, such as knowledge of diseases directly related to abnormal items and knowledge of associated diseases, making the interpretation more comprehensive.

[0267] As an example, the order of knowledge items in the medical diagnostic process corresponds to the order in which the knowledge is used in each step of the process. This accurately reflects the application patterns of knowledge involved in the diagnostic thinking process of medical experts. An example can be represented as follows:

[0268] 1) Symptoms and signs

[0269] For example, the patient complains of "chest pain" (symptom node), accompanied by "sweating and difficulty breathing" (sign node).

[0270] 2) Preliminary inspection direction

[0271] For example, triggering "ECG check" (check node type) or "myocardial enzyme test" (test node type).

[0272] 3) Differential diagnosis

[0273] For example, to link "angina pectoris" (disease node) and "pulmonary embolism" (differential diagnosis node), it is necessary to verify "D-dimer detection" (test node).

[0274] 4) Basis for diagnosis

[0275] For example, matching "coronary angiography shows stenosis >70%" (imaging diagnosis node) and "elevated troponin" (laboratory node) as diagnostic criteria.

[0276] 5) Treatment plan

[0277] For example, sequentially associate "nitroglycerin" (drug node) and "PCI surgery" (treatment operation node).

[0278] 6) Prognostic assessment

[0279] For example, linking "cardiac rehabilitation plan" (prognostic milestone) and "LDL-C control target <1.8mmol / L" (follow-up indicator milestone).

[0280] The diagnostic process (diagnostic logic chain) of the medical expert in the above example can be represented as: symptoms → test / examination → disease identification → diagnostic basis → treatment → prognosis, thereby guiding the language model to learn and simulate the doctor's progressive thinking pattern from clue collection to decision-making closed loop.

[0281] In some embodiments, starting from a first node, the walking operation is performed, and the second medical knowledge entry data is read from the second nodes traversed by the walking operation. This can be achieved by: determining the transition probability from the starting node to a neighboring node of the starting node, wherein the initial starting node is the first node; selecting at least one neighboring node as the second node in descending order of transition probability; if the walking termination condition is not met, using the second node as the new starting node, and returning to the step of determining the transition probability from the starting node to a neighboring node of the starting node; wherein the walking termination condition includes: the cumulative number of walking steps starting from the first node reaches a preset number of steps, and the transition probability from the starting node to a neighboring node of the starting node is less than a transition probability threshold.

[0282] For example, starting from the first node, the degree of correlation between different knowledge items is quantified by calculating the transition probability from the starting node to its neighboring nodes. Based on the probability, neighboring nodes with high correlation are explored first to obtain corresponding medical knowledge item data. The cumulative number of steps and the transition probability threshold are used as termination conditions to control the range of exploration. Knowledge exploration paths are dynamically constructed in the knowledge graph, and indirect medical knowledge related to abnormal items is selectively mined to ensure the comprehensiveness and effectiveness of knowledge acquisition.

[0283] In some embodiments, starting from a first node, the walking operation is performed, and the second medical knowledge entry data is read from the second nodes traversed by the walking operation. This can be achieved by: determining the transition probability from the starting node to a neighboring node of the starting node, wherein the initial starting node is the first node; selecting at least one neighboring node as the second node in descending order of transition probability; if the walking termination condition is not met, using the second node as the new starting node, and returning to the step of determining the transition probability from the starting node to a neighboring node of the starting node; wherein the walking termination condition includes: the cumulative number of walking steps starting from the first node reaches a preset number of steps, and the transition probability from the starting node to a neighboring node of the starting node is less than a transition probability threshold.

[0284] For example, starting from the first node, the degree of correlation between different knowledge items is quantified by calculating the transition probability from the starting node to its neighboring nodes. Based on the probability, neighboring nodes with high correlation are explored first to obtain corresponding medical knowledge item data. The cumulative number of steps and the transition probability threshold are used as termination conditions to control the range of exploration. Knowledge exploration paths are dynamically constructed in the knowledge graph, and indirect medical knowledge related to abnormal items is selectively mined to ensure the comprehensiveness and effectiveness of knowledge acquisition.

[0285] In some embodiments, the preset number of steps can be a fixed value, such as 3 steps, which ensures that relevant and relatively comprehensive knowledge data can be obtained from the medical report by interpreting the knowledge graph.

[0286] In some embodiments, the preset number of steps described above can also be a dynamic value. In setting a dynamic number of steps, its value logic can be determined from the following perspectives:

[0287] 1) Exceptional project complexity driven

[0288] The number of steps is dynamically expanded based on the semantic depth of the abnormal items. For example, in the case of a single indicator abnormality (i.e., an indicator abnormality associated with a disease or organ, such as a single elevated blood sugar), the preset number of steps is the first step, such as 1-2 steps. In the case of a multi-system associated abnormality (i.e., an indicator abnormality associated with multiple organs, such as a combined liver and kidney damage indicator), the preset number of steps is the second step, which is greater than the first step (e.g., 3-5 steps). This ensures cross-domain knowledge connectivity and drives the language model to interpret multiple possible diseases.

[0289] 2) Knowledge graph density perception

[0290] The density of node connections in the current traversal region (i.e., the number of neighboring nodes of a node) is calculated in real time. In high-density regions where the density is greater than the density threshold (such as knowledge clusters of diabetic complications), the preset number of steps is the first step to prevent information overload. In low-density regions where the density is less than the density threshold (such as knowledge related to rare diseases), the preset number of steps is the second step (e.g., 3-5 steps) which is greater than the first step, so that the language model can break through knowledge silos and achieve a more comprehensive interpretation.

[0291] In summary, dynamically adjusting the preset number of steps can improve the efficiency of knowledge acquisition, while ensuring the integrity of knowledge, reducing redundant knowledge retrieval for simple cases, and enhancing the mining of tacit knowledge associations for complex cases.

[0292] For example, assuming the first node is "lung shadow", the probabilities of its transfer to neighboring nodes "pneumonia", "lung cancer", and "tuberculosis" are calculated to be 0.6, 0.3, and 0.1, respectively. "Pneumonia" is selected as the first second node, and medical knowledge entries such as the etiology and treatment of pneumonia are read. At this point, the end condition of the walk is not met, so "pneumonia" is used as the new starting node, and the probabilities of its transfer to neighboring nodes "bacterial pneumonia" and "viral pneumonia" are calculated. If they are 0.7 and 0.3, respectively, "bacterial pneumonia" is selected as the next second node to read the corresponding knowledge. When the cumulative number of steps reaches the preset 5 steps, or the transfer probability of subsequent nodes is less than the transfer probability threshold of 0.1, the walk stops, and the in-depth mining of medical knowledge related to "lung shadow" is completed.

[0293] The above-mentioned probability-based node selection mechanism can prioritize the capture of strongly correlated knowledge and effectively filter out irrelevant knowledge. The interpretation results not only focus on the symptoms related to the current abnormal item, but also interpret the correlation of potential complications (such as the progressive relationship of hypertension → left ventricular hypertrophy → heart failure). By setting the number of steps (usually 5-8 steps), the depth of interpretation can be controlled to avoid the interpretation results being too divergent. By selecting multiple nodes according to probability each time, multi-dimensional interpretation can be ensured, such as interpreting the various symptoms that abnormal items may cause.

[0294] In some embodiments, the transition probability from the starting node to a neighboring node of the starting node can be determined by: for each neighboring node of the starting node, determining the similarity between the knowledge entry data included in the starting node and the knowledge entry data included in the neighboring nodes, and using the similarity as the transition probability from the starting node to the neighboring node.

[0295] For example, the connections between nodes in a knowledge graph are transformed into a similarity metric for knowledge entry data. By calculating the similarity between the starting node and the knowledge entry data contained in each neighboring node, the tightness of the knowledge association between nodes is quantified. The similarity value is directly mapped to the transition probability, so that the traversal process prioritizes exploring neighboring nodes with a higher degree of knowledge association with the current node. This ensures that the medical knowledge entry data obtained in the knowledge graph is more closely related to the abnormal items, thereby expanding the knowledge scope required for interpreting abnormal items more accurately and efficiently.

[0296] For example, if the starting node is "fever," and its neighboring nodes are "common cold," "pneumonia," and "leukemia," the similarity between the knowledge entries related to abnormal body temperature and symptoms in the "fever" node and the knowledge entries related to nasal congestion, runny nose, and fever in the "common cold" node is 0.8; the similarity between the knowledge entries related to cough, sputum, and fever in the "pneumonia" node is 0.7; and the similarity between the knowledge entries related to anemia, bleeding, and fever in the "leukemia" node is 0.3. Therefore, the transition probabilities from the "fever" node to the "common cold," "pneumonia," and "leukemia" nodes are 0.8, 0.7, and 0.3, respectively. Subsequent walks will prioritize the "common cold" node, reading medical knowledge entries related to the causes and treatment of the common cold, and gradually acquiring more relevant medical knowledge around the "fever" abnormality.

[0297] By determining the similarity between the knowledge entry data of the starting node and the knowledge entry data of the neighboring nodes, the transition probability can be calculated. This allows for the rapid identification of medical knowledge entry data that conforms to diagnostic logic with minimal computational overhead, thereby improving the efficiency of outputting interpretation data.

[0298] In some embodiments, the transition probability from the starting node to a neighboring node of the starting node can be determined as follows: for the starting node, the traversed path from the first node to the starting node is determined, the knowledge entry data included in the traversed path is encoded to obtain a context vector, and the similarity between the context vector and the feature vector of the knowledge entry data included in the neighboring node is determined as the transition probability from the starting node to the neighboring node.

[0299] For example, the knowledge graph's traversal paths are treated as contextual information. By encoding the knowledge entries along the traversed paths, a context vector containing past knowledge exploration information is generated, representing the knowledge context of the current traversal state. Subsequently, by calculating the similarity between this context vector and the feature vectors of the knowledge entries of neighboring nodes, the degree of fit between the neighboring node's knowledge and the current knowledge context is quantified. This is used as a transition probability, enabling the traversal process to incorporate historical exploration paths and prioritize neighboring nodes that better match the existing knowledge context, achieving coherent and in-depth mining of medical knowledge.

[0300] For example, assuming the first node is "headache," the system first navigates to the neighboring node "migraine," acquiring relevant knowledge data and encoding the knowledge data for "headache" and "migraine" into context vectors. Using "migraine" as the starting node, its neighboring nodes are "vascular headache" and "tension headache." The knowledge data of these neighboring nodes are converted into feature vectors. The similarity between the context vector and the feature vector of "vascular headache" is calculated to be 0.7, and the similarity with the feature vector of "tension headache" is 0.5. Therefore, the transition probabilities from "migraine" to "vascular headache" and "tension headache" are 0.7 and 0.5, respectively. Subsequently, the "vascular headache" node is prioritized, and its pathological mechanisms, diagnostic criteria, and other medical knowledge data are read, achieving a progressive exploration of knowledge.

[0301] By using context vectors to reflect the inherent connections used in diagnosis, and by selecting medical knowledge data entries from neighboring nodes with high transition probabilities, the interpretation results are made to fit the logical thinking process of diagnosis and treatment.

[0302] In some embodiments, attention encoding is performed on multiple medical knowledge item data based on the historical diagnostic data of the target object to obtain attention weights for the target object corresponding to each of the multiple medical knowledge item data. This can be achieved by: encoding the historical diagnostic data of the target object into a query vector, mapping the multiple medical knowledge item data into multiple key vectors respectively; determining the similarity between the query vector and the multiple key vectors respectively, normalizing the similarity between the query vector and the multiple key vectors respectively, and obtaining the attention weights of the multiple key vectors. The attention weight of one key vector is used as the attention weight of the target object corresponding to the medical knowledge item data of the key vector.

[0303] For example, historical diagnostic data of the target object is encoded into query vectors, which serve as "retrieval conditions" for retrieving medical knowledge. Multiple medical knowledge entries are mapped to key vectors, representing different pieces of medical knowledge. By calculating the similarity between the query vector and each key vector, the correlation between historical diagnostic data and each medical knowledge entry is measured. After normalization, the similarity is converted into attention weights, thereby determining the importance of each medical knowledge entry to the target object. This allows the model to focus on medical knowledge more relevant to the target object.

[0304] Here, attention encoding maps the historical diagnostic data of the target object to a query vector (Q), and the medical knowledge items to key vectors (K). The similarity between Q and each K (e.g., the dot product) is calculated as a relevance score, which is then normalized by softmax to become attention weights. The attention weights reflect the dynamic correlation strength between the historical diagnostic data and the knowledge items.

[0305] For example, suppose the target object's historical diagnostic data includes "long-term cough, history of smoking," which is encoded as a query vector. Several existing medical knowledge items, such as "symptoms and diagnosis of lung cancer," "pathology of chronic bronchitis," and "treatment plans for pneumonia," are mapped as key vectors. The similarity between the query vector and the key vector for "symptoms and diagnosis of lung cancer" is calculated to be 0.8, with the key vector for "pathology of chronic bronchitis" to be 0.7, and with the key vector for "treatment plans for pneumonia" to be 0.3. After normalizing these similarities, the attention weights for "symptoms and diagnosis of lung cancer," "pathology of chronic bronchitis," and "treatment plans for pneumonia" are 0.4, 0.35, and 0.15, respectively. This indicates that for this target object, the medical knowledge item "symptoms and diagnosis of lung cancer" is of higher importance, and subsequent analysis and diagnosis can be prioritized based on this.

[0306] In some embodiments, multiple medical knowledge item data can be concatenated based on attention weights in the following way: concatenating each medical knowledge item data and its corresponding attention weight to obtain medical knowledge data adapted to the target object.

[0307] For example, suppose that for a certain target object, three medical knowledge items are calculated: "diagnostic criteria for diabetes", "prevention and treatment of diabetes complications", and "dietary management for diabetes", with corresponding attention weights of 0.6, 0.3, and 0.1, respectively. When concatenating these items, the text content of "diagnostic criteria for diabetes" is concatenated with 0.6, the text content of "prevention and treatment of diabetes complications" is concatenated with 0.3, and the text content of "dietary management for diabetes" is concatenated with 0.1. The resulting medical knowledge data can be represented as "diagnostic criteria for diabetes [0.6] prevention and treatment of diabetes complications [0.3] dietary management for diabetes [0.1], where the specific numerical value represents the importance of the medical knowledge item data, with higher values ​​indicating higher importance." This approach preserves the individual medical knowledge items while clearly indicating their importance to the target object, thus forming medical knowledge data tailored to that target object.

[0308] In some embodiments, the structured data includes multiple types of feature data for an object, which is the subject described in the medical report. The multiple types of feature data are used to characterize the object's biological attributes and diagnostic / treatment outcomes. The medical knowledge database includes multiple medical knowledge entry data and a medical knowledge feature vector for each medical knowledge entry data. See [link to relevant documentation]. Figure 4I To query multiple medical knowledge entries based on abnormal items, the following steps 1041 to 1044 can be used, which are explained in detail below.

[0309] Here, multiple types of feature data refer to the data set obtained from structured data that quantifies or describes the subject (such as a patient) from multiple different aspects. This data can comprehensively reflect various characteristics of the subject, including but not limited to the subject's basic information, physical examination data, test indicators, disease symptoms, and other dimensions.

[0310] Biological attributes are the inherent biological characteristics of the subject of a medical report (usually a human being), including basic information such as age, sex, height, weight, and blood type. These attributes are the biological characteristics of an individual.

[0311] Diagnostic and treatment outcomes refer to the relevant conclusions and results data obtained after the diagnosis and treatment process of the subject in a medical report.

[0312] A medical knowledge database is a system or collection specifically designed to store and manage a large amount of medical knowledge entries. It contains knowledge from various medical fields, such as the etiology of diseases, pathophysiological mechanisms, symptoms, diagnostic criteria, treatment methods, drug information, and medical research findings. Each medical knowledge entry is transformed into a corresponding medical knowledge feature vector. The construction of the medical database can be seen in the explanations of steps 701 to 704 below.

[0313] Medical knowledge entry data may include the following:

[0314] Analysis of abnormal items (e.g., "high glucose" corresponds to diabetes risk, methods to eliminate detection errors);

[0315] Disease correlation (e.g., positive hepatitis B antibody and the stage of viral infection);

[0316] Diagnostic and intervention recommendations (such as alternative drug libraries matched to drug resistance results, retesting protocols);

[0317] Health guidance knowledge (such as dietary and exercise recommendations for dyslipidemia).

[0318] Each medical knowledge entry is coded using standardized terms (such as the International Classification of Diseases, 10th Revision (ICD-10) and Systematized Nomenclature of Medicine-Clinical Terms (SNOMED CT)) and is kept in sync with the latest medical consensus through a dynamic association and update mechanism of the knowledge graph.

[0319] In step 1041, multiple types of feature data and anomaly items are concatenated to obtain concatenated data.

[0320] In some embodiments, multiple types of feature data already contain rich, multi-dimensional information about the subject of the medical report (such as the patient). Concatenating the abnormal items with this feature data aims to integrate all relevant information into a comprehensive dataset. This allows subsequent processing to consider both the overall characteristics of the subject and specific anomalies, enabling more accurate analysis and matching. This concatenation merges data from different sources and types, providing a more comprehensive data foundation for subsequent operations such as coding.

[0321] For example, suppose a medical report describes a patient with multiple data points including age (35 years old), gender (male), height (175cm), weight (70kg), blood type (A), and various laboratory indicators (such as white blood cell count and hemoglobin level). The abnormal item is a persistent cough. By combining these data points and the abnormal item, the resulting composite data includes the patient's basic information, laboratory indicators, and comprehensive information about the abnormal symptom of cough, such as "35 years old, male, 175cm, 70kg, blood type A, white blood cell count [specific value], hemoglobin level [specific value], persistent cough."

[0322] In step 1042, the spliced ​​data is encoded to obtain the feature vector of the spliced ​​data.

[0323] In some embodiments, the concatenated data is segmented into multiple word units; each word unit is embedded and encoded to obtain the embedding features of each word unit; the language model performs attention encoding on the embedding features of each word unit to obtain the attention encoding features of each word unit; and the attention encoding features of each word unit are used as the feature vector of the concatenated data.

[0324] For example, segmenting concatenated data into multiple word units can be achieved in the following ways: using punctuation marks such as spaces, periods, and commas as segmentation markers to segment the concatenated data; or using a segmenter based on byte-pair encoding, a segmenter based on byte-level byte-pair encoding, etc. The embodiments of this application do not limit the specific segmenter or segmentation method used to segment the concatenated data.

[0325] For example, multiple lexical units can be embedded and encoded using an embedding layer to obtain embedding features. For example, the embedding layer can use embedding methods such as word embedding, character embedding, and subword embedding to perform embedding and encoding processes to obtain the embedding features of each lexical unit.

[0326] For example, attention weights of embedded features are calculated using an attention mechanism (e.g., self-attention mechanism). These attention weights represent the importance of the embedded features to the current task. Multiplying the attention weights of the embedded features by the embedded features yields a weighted embedded feature, which is the attention-encoded feature.

[0327] In step 1043, for each medical knowledge entry in the medical knowledge database, the second similarity between the medical knowledge feature vector and the feature vector of the concatenated data is obtained.

[0328] In some embodiments, a second similarity is obtained between the feature vector of the spliced ​​data and the feature vector of each medical knowledge item using a similarity measurement method. The similarity measurement method can employ various algorithms such as cosine similarity and Euclidean distance, which can quantify the degree of similarity between the spliced ​​data and the medical knowledge item data in the feature dimension.

[0329] In step 1044, in response to the second similarity being greater than a preset similarity threshold, the medical knowledge entry data corresponding to the medical knowledge feature vector is taken as the medical knowledge entry data related to the abnormal item.

[0330] In some embodiments, when the similarity between the feature vector of the concatenated data and a certain medical knowledge feature vector is greater than a certain threshold, it indicates that the medical knowledge entry data has a high similarity and relevance to the current patient condition (including abnormal items and other features). In this case, the corresponding medical knowledge entry data is used as the matching result, that is, the medical knowledge entry data corresponding to the medical knowledge feature vector is used as the medical knowledge entry data related to the abnormal item.

[0331] Steps 1041 to 1044 achieve the process of accurately matching relevant medical knowledge entries in a medical knowledge database with multi-dimensional feature data and abnormal items from the main body of the medical report. In this process, through data splicing, encoding, similarity calculation, and threshold judgment, the patient's actual situation is organically combined with medical knowledge. This achieves the beneficial effect of quickly and accurately obtaining information related to abnormal items from massive amounts of medical knowledge.

[0332] See also Figure 4A In step 105, prompt words are constructed based on structured data, report type, abnormal items, and medical knowledge data.

[0333] In some embodiments, the structured data, report type, abnormal items, medical knowledge data, and report interpretation prompts of the medical report are concatenated into prompts. The report interpretation prompts include the requirements that need to be met when interpreting the report corresponding to the report type. The requirements include at least one of the following: the description requirements of the report interpretation role, the content standardization requirements, the interpretation focus requirements, and the format requirements.

[0334] Here, the prompts are constructed based on structured data, report types, anomaly items, and medical knowledge data, and are used to guide the language model to generate instructional text for interpreting the data.

[0335] Report interpretation prompts are a part of the prompts and are textual descriptions of the requirements that must be met when interpreting reports of a specific report type. These requirements cover the description of the interpreter's role (e.g., interpreting from a doctor's perspective), content standardization requirements (e.g., using professional terminology, avoiding ambiguity), key interpretation requirements (the key interpretation content determined according to different report types, such as focusing on changes in indicators like white blood cells and red blood cells in a blood routine report, and focusing on indicators like protein and occult blood in a urine routine report), and formatting requirements (e.g., paragraph structure, heading settings).

[0336] By constructing prompts based on structured data, report types, anomaly data, and medical knowledge data, the system achieves precise multi-dimensional focus on medical report interpretation scenarios. Specifically, combining structured data allows the language model to more clearly understand the logical relationships between data; setting different interpretation focus requirements based on report type ensures that the interpretation aligns with the characteristics of various reports; and combining anomaly data and related medical knowledge data guarantees the scientific rigor of the interpretation. Thus, the system guides the language model to output professional, standardized interpretation data that meets the needs of medical scenarios from multiple dimensions.

[0337] For example, assuming the medical report is a complete blood count report, its structured data includes the patient's basic information (age, gender, etc.) and the test values ​​of various blood indicators (white blood cell count: 8.0 × 10⁻⁶). 9 / L, Red blood cell count: 4.5×10 12 / L, etc.); the report type is a complete blood count report; the identified abnormality is a low platelet count (platelet count: 80×10). 9 / L, normal range 100-300×10 9 / L); Medical knowledge data is represented as "Potential bleeding tendency due to low platelet count [0.6], common causes (such as bone marrow hematopoietic dysfunction, immune thrombocytopenia, etc.) [0.3], dietary recommendations [0.1], where the specific values ​​represent the importance of the medical knowledge item data, and the higher the value, the higher the importance." The report interpretation prompt is "Please interpret the abnormal indicator of low platelet count from the perspective of a professional doctor, using standard medical terminology, explaining the possible health risks and potential causes. The report interpretation content should be clearly explained in paragraphs, with a subheading added before each key point."

[0338] The concatenated prompt would then read: "Patient basic information: Age 30, Male. Blood routine test results: White blood cell count 8.0 × 10⁻⁶." 9 / L, red blood cell count 4.5×10 12 / L, platelet count 80×10 9 / L, etc. Report type: Complete blood count report. Abnormal item: Low platelet count (platelet count: 80×10 9 / L, normal range 100-300×10 9 / L). Medical knowledge data: bleeding tendency that may result from low platelet count [0.6], common causes (such as bone marrow hematopoietic dysfunction, immune thrombocytopenia, etc.) [0.3], dietary recommendations [0.1]. Among them, the specific values ​​represent the importance of the medical knowledge item data, and the higher the value, the higher the importance. Please interpret the abnormal indicator of low platelet count using standard medical terminology, and explain its possible health risks and potential causes. The interpretation of the report should be clearly explained in paragraphs, and a subheading should be added before each key point.

[0339] In step 106, based on the prompt words, a pre-trained language model is invoked to generate interpretation data for the medical report.

[0340] In some embodiments, see Figure 4J , Figure 4A Step 106 shown can be implemented through steps 1061 to 1062, which will be explained in detail below.

[0341] In step 1061, the prompt words are encoded using a language model to obtain the encoded features of the prompt words.

[0342] In some embodiments, the prompt word is segmented to obtain multiple word units; each word unit is embedded and encoded to obtain the embedding feature of each word unit; the language model performs attention encoding on the embedding feature of each word unit to obtain the attention encoding feature of each word unit; and the attention encoding feature of each word unit is used as the encoding feature of the prompt word.

[0343] For example, segmenting the prompt word to obtain multiple word units can be achieved in the following ways: using punctuation marks such as spaces, periods, and commas as segmentation markers to segment the prompt word; or using a segmenter based on byte-pair encoding, a segmenter based on byte-level byte-pair encoding, etc. The embodiments of this application do not limit the specific segmenter or segmentation method used to segment the prompt word.

[0344] For example, see Figure 7 , Figure 7 This is a schematic diagram of the structure of the language model provided in the embodiments of this application, which can be implemented through an embedding layer (corresponding to...). Figure 7 The embedding layer shown in the diagram performs embedding encoding on multiple lexical units of the prompt word to obtain the embedding features (corresponding to...). Figure 7(The embedding features of the prompt words shown in the figure) For example, the embedding layer can use embedding methods such as word embedding, character embedding and subword embedding for embedding encoding to obtain the embedding features of each word element.

[0345] For example, attention weights of embedded features are calculated using an attention mechanism (e.g., self-attention mechanism). These attention weights represent the importance of the embedded features to the current task. Multiplying the attention weights of the embedded features by the embedded features yields a weighted embedded feature, which is the attention-encoded feature.

[0346] In step 1062, the encoded features of the prompt words are decoded using a language model to obtain the interpretation data of the medical report.

[0347] In some embodiments, the language model uses the encoded features of the cue words as the initial hidden state to perform autoregressive decoding, progressively interpreting each word of the data to obtain the interpreted data.

[0348] For example, decoding is implemented through a decoder in the language model. At each step, the decoder receives the generated lexical sequence (e.g., "The patient's blood test report shows a low platelet count"), and uses a self-attention mechanism to associate the current word with key information in the encoded features (e.g., patient age, gender, other blood indicators, and medical knowledge and interpretation requirements related to low platelet count). Simultaneously, it utilizes cross-attention to align the encoded features with the most relevant semantic or structural cues at the current generation position, thereby predicting the next most likely lexical (e.g., "this situation"). Specifically, the self-attention mechanism calculates the attention weights of the current lexical with each lexical in the preceding sequence, highlighting contextual information relevant to the current prediction task; cross-attention interacts the encoded features with the current decoding state, enabling the decoder to focus on key medical knowledge and interpretation points in the prompt word.

[0349] Predicted word sequence (corresponding) Figure 7 When decoding a sequence of words (e.g., a sequence of words), the accuracy and diversity of the generated interpretation results can be balanced through probability sampling (such as Greedy Search, Beam Search, Top-K sampling, etc.). Greedy Search selects the word with the highest probability at each time step as the output. This method is fast but may get stuck in local optima, resulting in a lack of diversity in the generated interpretation data. For example, when explaining the cause of low platelet count, it might only output the most common cause. Beam Search maintains a candidate word set of size K (beam width). In each decoding step, it retains the K words with the highest probability and their corresponding preceding sequences, and then continues the next round of decoding based on these K candidates. Finally, it selects the sequence with the highest probability from the K candidate paths as the result.

[0350] Taking beam search as an example, in each decoding step, beam search calculates and retains the K words with the highest probabilities and their corresponding preceding sequences. These candidate words and their preceding sequences each carry their own probability information. As the decoding progresses, the word probabilities on each candidate path accumulate. After all decoding steps are completed, the probabilities of all words on these K candidate paths (one candidate path corresponds to one sequence) are multiplied (or added in logarithmic space) to obtain the overall probability of each candidate path. Finally, the sequence corresponding to the candidate path with the highest overall probability among the K candidate paths is taken as the final result.

[0351] Assuming the beam width K of the beam search is set to 3, in the first decoding step, the decoder predicts the output words. For example, the three words with the highest probabilities are "this kind" (probability 0.4), "that kind" (probability 0.3), and "that kind" (probability 0.2). Since it is the first decoding step, the initial preorder sequence corresponding to these three words is empty. Based on the three words obtained in the first decoding step, three candidate paths are formed: path 1: "this kind", path 2: "that kind", and path 3: "that kind". In the second decoding step, for path 1, the next three words with the highest probabilities are predicted to be "disease" (probability 0.5), "symptom" (probability 0.3), and "condition" (probability 0.2). At this time, path 1 expands into three new candidate paths:

[0352] Path 1-1: "This disease" (overall probability is 0.4 × 0.5 = 0.2);

[0353] Path 1-2: "This disease" (overall probability is 0.4 × 0.3 = 0.12);

[0354] Path 1-3: "This type of illness" (overall probability is 0.4 × 0.2 = 0.08);

[0355] Similarly, the above extensions are also applied to path 2 and path 3 respectively.

[0356] After multiple decoding steps, multiple candidate paths were obtained (the number is much greater than K, because each path may expand into K new paths at each step), but only the K paths with the highest current probability were retained.

[0357] Suppose that the three candidate paths that are ultimately retained and their overall probabilities are as follows:

[0358] Path A: "The main symptoms of this disease are" (overall probability 0.06);

[0359] Path B: "The symptoms of this disease are quite unique" (overall probability 0.05);

[0360] Path C: "That disease symptom often accompanies" (overall probability 0.04);

[0361] By comparing the overall probabilities of these three paths, 0.06 > 0.05 > 0.04, path A, "The main symptoms of this disease are" is selected as the final generated result.

[0362] For example, when a medical report reads, "Ms. Wang, female, 62 years old. Ultrasound findings: irregular liver shape, multiple hypoechoic nodules (maximum 1.2cm), enhanced CT recommended. Blood biochemistry: ALT 58U / L (reference range 9-50), AST 65U / L↑, triglycerides 2.8mmol / L. Preliminary diagnosis: non-alcoholic fatty liver disease.", the corresponding structured interpretation data can be represented as:

[0363] "Patient Wang, female, 62 years old. The results of the combined ultrasound and blood biochemistry tests are interpreted as follows:"

[0364] Ultrasound examination analysis: The liver has an irregular shape and contains multiple hypoechoic nodules (the largest being 1.2 cm). This suggests that the normal structure of the liver has been altered. The nodules may be caused by various reasons, including but not limited to benign liver cysts and hemangiomas, and there may also be a risk of malignancy. Since ultrasound examination cannot definitively determine the nature of the nodules, further enhanced CT scans are recommended to more clearly observe the blood supply to the nodules and their relationship with surrounding tissues, thereby aiding in the determination of whether the nodules are benign or malignant.

[0365] Interpretation of blood biochemistry indicators: Alanine aminotransferase (ALT) was 58 U / L, higher than the upper limit of the reference range (9-50 U / L); aspartate aminotransferase (AST) was 65 U / L and also elevated. ALT and AST are important indicators reflecting hepatocellular damage, and their elevation suggests that hepatocellular cells may have some degree of damage. Triglyceride level was 2.8 mmol / L, higher than the normal range, indicating that the patient has abnormal lipid metabolism, which is closely related to the occurrence and development of non-alcoholic fatty liver disease. Excessive triglyceride deposition in the liver can lead to hepatocellular steatosis, thereby affecting liver function and causing elevated transaminase levels.

[0366] Preliminary Diagnosis and Follow-up Recommendations: Based on the patient's liver ultrasound morphological changes, abnormal blood biochemistry indicators, and the preliminary diagnosis of non-alcoholic fatty liver disease (NAFLD), which is consistent with the common manifestations of this disease, NAFLD is a liver disease related to metabolic disorders, often associated with obesity, hyperlipidemia, and diabetes. Given the current situation, it is recommended that the patient first adjust their lifestyle, such as controlling their diet, reducing the intake of high-calorie, high-fat, and high-sugar foods, and increasing the intake of fiber-rich vegetables and fruits; moderately increasing physical activity, such as at least 150 minutes of moderate-intensity aerobic exercise per week, such as brisk walking or jogging, to reduce weight and improve lipid metabolism. Simultaneously, an enhanced CT scan should be performed as soon as possible to clarify the nature of the liver nodules. In addition, regular follow-up examinations of liver function and blood lipids are necessary to dynamically monitor changes in the condition, and medication should be administered under the guidance of a doctor if necessary.

[0367] Steps 1061 and 1062 realize the entire process of intelligent interpretation of medical reports based on a pre-trained language model. First, the medical features in the prompt words (such as patient information, test indicators, and image descriptions) are subjected to deep semantic representation (i.e., the prompt words are encoded using a language model in step 1061). Then, combined with a self-attention mechanism, the attention weights of the current word unit and each word unit in the preceding word unit sequence are calculated, highlighting contextual information relevant to the current prediction task. Through cross-attention, the encoded features interact with the current decoding state, enabling the decoder to focus on key medical knowledge and interpretation priorities in the prompt words. This achieves dynamic association of medical knowledge and interpretation priorities within the medical knowledge data through a combination of self-attention and cross-attention mechanisms, ultimately generating structured interpretation data with professionalism and interpretability. It can dynamically adjust the interpretation priorities according to the report context, ensuring accurate pathological analysis of key indicators (such as ALT / AST anomalies) and enabling personalized generation of multi-dimensional clinical suggestions (such as differential diagnosis, supplementary examinations, and treatment plans), significantly improving the completeness, accuracy, and clinical decision support value of medical report interpretation.

[0368] Steps 101 to 106 achieve intelligent analysis and knowledge-enhanced interpretation of medical reports throughout the entire process. By identifying report types and abnormal items, and based on the target audience's historical diagnostic data, attention weights are encoded into medical knowledge entries associated with abnormal items, and these are then concatenated to generate personalized medical knowledge data tailored to the target audience. This dynamic combination of historical diagnostic data and medical knowledge entry data enhances the personalization, scientific rigor, and timeliness of the medical knowledge data. Finally, through the construction of prompts based on multi-dimensional data fusion, a pre-trained language model is guided to generate personalized interpretation data, improving the accuracy of medical report interpretation.

[0369] In other embodiments, see Figure 4KBefore identifying abnormal items in the medical report, the following steps 601 to 602 can be performed, which are explained in detail below.

[0370] In step 601, if the report type is a preset first report type, the process proceeds to identify abnormal items in the medical report and query multiple medical knowledge item data based on the abnormal items. The first report type includes: test reports containing text information and examination reports containing text information.

[0371] In some embodiments, when the report type is a preset first report type (e.g., blood type report, biochemical test report, etc.), the process proceeds to step 103.

[0372] Here, laboratory reports containing textual information refer to medical reports that record in detail the test items, results, and reference ranges after laboratory testing and analysis of human blood, body fluids, tissues, and other samples. These reports reflect the physiological and pathological state of the human body and assist in disease diagnosis and monitoring treatment effectiveness. Examples include blood type reports and biochemical test reports.

[0373] Examination reports containing textual information are medical reports that describe the examination process, the observed organ morphology and structure, the presence or absence of lesions, and the characteristics of lesions after examining human organs and tissues using imaging techniques such as ultrasound, CT, and MRI, or endoscopic examinations. These reports provide important evidence for disease diagnosis. Examples include CT reports and MRI reports.

[0374] In step 602, if the report type is a preset second report type, a preset text corresponding to the second report type is obtained, and the preset text is used as the interpretation data of the medical report. The second report type includes: medical reports that do not contain text information, medical reports with timeliness, reports that cannot be interpreted due to technical limitations, and reports that cannot be interpreted due to legal limitations.

[0375] In some embodiments, when the report type is a type in a preset second report type (e.g., an ophthalmology prescription, an electrocardiogram report (image only)), a preset text corresponding to the second report type is obtained, and the preset text is used as the interpretation data of the medical report.

[0376] Here, a medical report without textual information refers to a medical report that presents examination or test results only in the form of data, charts, images, etc., lacking necessary textual explanations and interpretations. For example, an electrocardiogram report that only contains images.

[0377] Time-sensitive medical reports are those whose validity and applicability are only meaningful within a specific time frame; beyond that time, the patient's physical condition reflected in the report may have changed. Examples include blood test reports.

[0378] Reports that cannot be interpreted due to technological limitations refer to medical reports where, due to the limitations of current testing technologies, analytical methods, and algorithm models, the data, images, and other information in the report cannot be effectively analyzed and interpreted, making it difficult to arrive at an accurate diagnostic conclusion. Examples include gene testing reports for certain rare diseases.

[0379] Reports that cannot be interpreted due to legal restrictions refer to medical reports whose content is prohibited from public or specific interpretation due to laws, regulations, and policies, in order to protect patient privacy, comply with specific legal requirements, or maintain medical order. For example, certain mental illness diagnostic reports involving provisions of the Mental Health Law can only be interpreted and used in a professional medical environment and in accordance with legal procedures to protect patient privacy and social rights.

[0380] For example, the second report type and its corresponding preset text can be represented by Table 1:

[0381] Table 1

[0382]

[0383] Steps 601 and 602 achieve differentiated interpretation processing based on report type. This ensures the professional analytical efficiency of interpretable reports (i.e., medical reports of the first report type) while avoiding potential legal disputes, technical misjudgments, or privacy leaks that may arise from forcibly interpreting high-risk reports (i.e., medical reports of the second report type). This achieves multiple goals of optimized resource allocation, enhanced medical compliance, and risk control, providing crucial support for the scenario adaptability and ethical safety of the medical report processing method provided in this application embodiment.

[0384] In other embodiments, when the report type is a preset second report type, online medical services that match the type of medical report are queried; an online medical service guide for the medical report is generated, wherein the online medical service guide includes the appointment address and introductory information of the online medical service.

[0385] For example, online medical services can come from different medical institutions or platforms, covering a variety of professional fields to ensure accurate medical consultation channels are provided. Online consultation guidance includes the appointment address and introductory information for the online service. The appointment address will be clearly presented as a link, allowing users to directly click and jump to the corresponding appointment page. The introductory information will describe in detail the features of the online service, applicable symptoms, and the qualifications of the medical team, helping users fully understand the service details and make an appropriate choice.

[0386] For example, see Figure 8C , Figure 8C This is a third schematic diagram of the medical report processing interface provided in this application embodiment. When the report type is the preset second report type, the interface will automatically pop up an online medical consultation guidance area, prominently displaying the appointment address and introduction information of the online medical consultation service that matches the medical report type. In response to the trigger operation of the online medical consultation guidance control 001, the user is redirected to the corresponding online medical consultation service appointment page, where they can complete the appointment process, such as filling in personal information and selecting an appointment time. Simultaneously, the medical report processing interface will also provide necessary prompts and guidance during the appointment process to ensure the user successfully completes the appointment.

[0387] In other embodiments, the medical knowledge database includes multiple medical knowledge entry data and a medical knowledge feature vector for each medical knowledge entry data, see [link to relevant documentation]. Figure 4L The medical knowledge database is constructed through the following steps 701 to 704, which are explained in detail below.

[0388] In step 701, medical document data related to the abnormal item in multiple dimensions are obtained, including description of detection method, interpretation of clinical significance, reference range threshold, related abnormality type and health guidance strategy.

[0389] In some embodiments, Natural Language Processing (NLP) technology is used to accurately extract data related to abnormal items, such as descriptions of detection methods, interpretations of clinical significance, reference range thresholds, relevant abnormality types, and health guidance strategies, from various data sources including medical literature and research reports. This data acquisition lays the foundation for subsequent knowledge analysis and database construction, enabling the medical knowledge database to cover comprehensive dimensions of medical knowledge and meet the needs of knowledge query and application in different scenarios.

[0390] Taking abnormal blood glucose levels as an example, clinical interpretations are extracted from medical literature, such as "a fasting blood glucose level consistently above 7.0 mmol / L may indicate diabetes"; the reference range threshold is "normal fasting blood glucose range of 3.9-6.1 mmol / L"; related abnormality types include "hypoglycemia (below 2.8 mmol / L)" and "hyperglycemia (above the normal range)"; and health guidance strategies include "controlling diet, reducing sugar intake, and appropriately increasing exercise." Through these operations, multi-dimensional medical document data related to abnormal blood glucose levels is obtained.

[0391] In step 702, the medical document data is segmented according to a preset character length to obtain multiple medical knowledge item data.

[0392] In some embodiments, due to the length of the original medical document data, which is not conducive to subsequent processing and analysis, it is necessary to segment it according to a preset character length. This process can be achieved using text segmentation algorithms to divide the long text into multiple relatively independent medical knowledge data of appropriate length. Appropriate length settings can balance data integrity and processing efficiency, ensuring that each medical knowledge entry contains a relatively complete fragment of medical knowledge, facilitating subsequent encoding and feature extraction.

[0393] For example, assuming a preset character length of 200 characters, a medical document about "diagnosis and treatment of hypertension," containing information on testing methods, clinical significance, and treatment plans, has a total length of 800 characters. Using a text segmentation algorithm, it is divided into four medical knowledge item data points.

[0394] In step 703, each medical knowledge entry data is encoded to obtain a medical knowledge feature vector for each medical knowledge entry data.

[0395] In some embodiments, each piece of medical knowledge data is encoded using a pre-trained text encoding model, such as Word2Vec, GloVe, or Transformer. This transforms the medical knowledge data from textual form into numerical medical knowledge feature vectors. These vectors capture the semantic information and contextual relationships within the text, allowing the medical knowledge data to exist in a more easily processed and analyzed form in the computer, facilitating subsequent operations such as similarity calculations and knowledge retrieval based on the vectors.

[0396] For example, the medical knowledge data "diabetic patients should monitor their blood sugar regularly and adjust their insulin dosage according to blood sugar levels" is encoded using the Word2Vec model. The model maps each word to a low-dimensional vector, and then combines the word vectors of the entire sentence into a fixed-length medical knowledge feature vector using certain rules (such as vector averaging). Assuming each word vector has a dimension of 100, and the sentence contains 10 words, the final result is a 100-dimensional feature vector. This vector contains the semantic information of the sentence and represents the features of this medical knowledge data in the vector space.

[0397] In step 704, a medical knowledge database is constructed based on multiple medical knowledge item data and the medical knowledge feature vector of each medical knowledge item data.

[0398] In some embodiments, a Database Management System (DBMS), such as a relational database (e.g., MySQL, Oracle) or a non-relational database (e.g., MongoDB), is used to store medical knowledge data in tables or documents within the database, while simultaneously creating indexes to associate corresponding medical knowledge feature vectors. This allows for rapid retrieval and matching of relevant medical knowledge data through feature vectors during subsequent use, achieving efficient medical knowledge querying and application.

[0399] Through steps 701 to 704, medical document data is acquired from multiple dimensions and segmented and encoded to ultimately construct a medical knowledge database, realizing the transformation of medical knowledge from multi-source heterogeneous data to a structured and digital knowledge system.

[0400] The following describes the medical report processing method provided in the embodiments of this application, using a terminal device as the execution subject. See also: Figure 4M The following is combined with Figure 4M Please provide an explanation.

[0401] In step 801, the medical report processing interface is displayed.

[0402] In some embodiments, after the terminal device opens the medical report processing application and completes the user authentication process, the medical report processing interface is then fully displayed on the screen.

[0403] For example, see Figure 8A , Figure 8A This is a first schematic diagram of the medical report processing interface provided in the embodiments of this application. The medical report processing interface adopts a modular layout to display report management related functions in different areas, such as data input area, operation instruction area, and result display area, thus building a basic interactive platform for a series of subsequent operations on medical reports.

[0404] In step 802, in response to the report upload operation in the medical report processing interface, the uploaded medical report is displayed.

[0405] See Figure 8A In response to the "Upload Image" or "Upload File" control in the medical report processing interface, the file selection function is activated. The user selects the medical report file to be uploaded from the device's storage directory. After the file is selected, the upload process begins. Once the upload is complete, the uploaded medical report is displayed.

[0406] In step 803, in response to the interpretation trigger operation of the medical report, the interpretation data of the medical report is displayed, wherein the interpretation data of the medical report is generated by the medical report processing method provided in the above-described embodiments of this application.

[0407] In some embodiments, the interpretation of a medical report is automatically triggered after the report is successfully uploaded.

[0408] In other embodiments, the user triggers the interpretation function by clicking the "Interpret" button or performing a specific gesture.

[0409] For example, see Figure 8A as well as Figure 8B The medical report processing interface displays the interpretation data of the medical report.

[0410] For an explanation of how the data was generated, please refer to steps 101 to 106 above; they will not be repeated here.

[0411] In some embodiments, see Figure 4N , Figure 4N This is a schematic diagram of the fourteenth step of the medical report processing method provided in the embodiments of this application, which will be combined with... Figure 4N The steps shown illustrate the medical report processing method provided in the embodiments of this application.

[0412] In step 901, the report type of the medical report of the target object is identified, wherein the target object is the subject described in the medical report.

[0413] In some embodiments, the report type of a medical report is identified based on structured data from the medical report.

[0414] Here, the structured data of the medical report is obtained by structuring the medical report. For specific implementation methods, please refer to the description of step 101 above. For implementation methods that identify the report type of the medical report based on the structured data of the medical report, please refer to the description of step 102 above.

[0415] In step 902, abnormal items in the medical report are identified, and multiple medical knowledge entries are queried based on the abnormal items.

[0416] In some embodiments, abnormal items in medical reports are identified based on structured data from the medical reports.

[0417] Here, the structured data of the medical report is obtained by structuring the medical report. For specific implementation methods, please refer to the description of step 101 above. For the implementation methods of identifying abnormal items in the medical report based on the structured data of the medical report, please refer to the description of step 103 above.

[0418] In step 903, attention encoding is performed on multiple medical knowledge item data based on the historical diagnostic data of the target object to obtain the attention weights of the target object corresponding to the multiple medical knowledge item data.

[0419] In some embodiments, the historical diagnostic data of the target object is encoded into a query vector, and multiple medical knowledge entries are mapped to multiple key vectors respectively; the similarity between the query vector and the multiple key vectors is determined, and the similarity between the query vector and the multiple key vectors is normalized to obtain the attention weights of the multiple key vectors, wherein the attention weight of one key vector is used as the attention weight of the target object corresponding to the medical knowledge entry data of the key vector.

[0420] For a detailed description of the implementation method, please refer to step 104 above.

[0421] In step 904, based on attention weights, multiple medical knowledge entries are concatenated to obtain medical knowledge data that is adapted to the target object.

[0422] In some embodiments, multiple medical knowledge entries are queried based on the identified abnormal items in the medical report; attention encoding is performed on the multiple medical knowledge entries based on the historical diagnostic data of the target object to obtain the attention weights of the multiple medical knowledge entries corresponding to the target object; based on the attention weights, the multiple medical knowledge entries are concatenated to obtain medical knowledge data adapted to the target object.

[0423] For a detailed description of the implementation method, please refer to step 104 above.

[0424] In step 905, prompt words are constructed based on report type, abnormal items, and medical knowledge data.

[0425] In some embodiments, the structured data, report type, abnormal items, medical knowledge data, and report interpretation prompts of the medical report are concatenated into prompts. The report interpretation prompts include the requirements that need to be met when interpreting the report corresponding to the report type. The requirements include at least one of the following: the description requirements of the report interpretation role, the content standardization requirements, the interpretation focus requirements, and the format requirements.

[0426] For a detailed description of the implementation method, please refer to step 105 above.

[0427] In step 906, based on the prompt words, a pre-trained language model is invoked to generate interpretation data for the medical report.

[0428] In some embodiments, the prompt words are encoded using a language model to obtain the encoded features of the prompt words (see the description of step 1061 above); the encoded features of the prompt words are decoded using a language model to obtain the interpretation data of the medical report (see the description of step 1062 above).

[0429] Through steps 901 to 906, the medical field to which the medical report belongs is characterized by the report type. The abnormal items identified from the medical report are used as conditions for knowledge retrieval. By introducing medical knowledge data obtained in this way into the prompt words, not only is effective knowledge introduced into the language model when processing medical reports, but the generation scope of the language model is also constrained to the corresponding medical field, reducing the risk of misinterpretation caused by the ambiguity of the context.

[0430] Based on the target object's historical diagnostic data, attention weights are assigned to the medical knowledge item data associated with abnormal items, and personalized medical knowledge data adapted to the target object is generated by splicing them together. This achieves a dynamic combination of historical diagnostic data and medical knowledge item data. By introducing this medical data into the prompt words, the language model can use the medical knowledge item data for analysis with emphasis according to the attention weights when interpreting medical reports based on the medical knowledge data. This generates targeted interpretation data for the target object's medical reports, improving the accuracy of medical report interpretation.

[0431] In the processing methods of medical reports in related technologies, rich domain knowledge is used as support. A large number of reports are collected and interpreted to obtain relevant medical knowledge. Specialized medical models are obtained through methods such as fine-tuning instructions. On the one hand, this method has high iteration costs and slow knowledge iteration speed. On the other hand, the test data in medical reports are extremely complex. Even for the same test item, different test methods will have different reference index normal values, and the knowledge base is always in need of updating.

[0432] The medical report processing method provided in this application involves structuring the medical report (corresponding to the structuring processing above), intelligently analyzing anomalies in the report, and then applying RAG technology to retrieve relevant knowledge (corresponding to the abnormal items above) from the corresponding knowledge base (corresponding to the medical knowledge database above) based on the anomalies (corresponding to the medical knowledge data related to the abnormal items above). This retrieved knowledge is then input into the base model (corresponding to the language model above) to obtain accurate and highly professional interpretation results (corresponding to the interpretation data above). The medical report processing method provided in this application does not rely on a large base language model and does not require a large amount of medical data or fine-tuning costs. Both general-purpose large base language models and proprietary medical models can be quickly accessed and applied.

[0433] For example, retrieval enhancement generation mainly includes:

[0434] Document segmentation: dividing text data into units suitable for retrieval (such as paragraphs or sentences) and creating an index for fast searching.

[0435] Vectorization: By converting text data into vector form, computers can process and compare information more efficiently, simulating human attention mechanisms to achieve efficient and accurate filtering and processing of information.

[0436] Similarity stage: Calculate the similarity between the query vector and the stored vector in the vector database (usually using cosine similarity or Euclidean distance).

[0437] Search results ranking: Based on similarity scores, select several of the most relevant documents or paragraphs as search results.

[0438] The retrieved relevant document content is combined with the original user query to form a new input sequence.

[0439] For example, large language models have the following characteristics:

[0440] Learning ability: Through training with massive amounts of text data, large language models can learn rich language knowledge and expressions, including grammar, semantics and common expression habits.

[0441] Pattern recognition: Large language models can identify common text patterns and semantic relationships, such as co-occurrence relationships between words, logical structure of sentences, and semantic roles.

[0442] Contextual understanding: Large language models can capture contextual information in text, understand the influence of previous text on subsequent text, and generate corresponding responses based on the context.

[0443] Generative capabilities: Large language models can generate relevant natural language text based on input information, including answering questions, generating articles, and engaging in dialogue.

[0444] Resolving ambiguity: Despite the existence of polysemy and ambiguity in language, large language models resolve ambiguity through contextual information and linguistic rules, providing more accurate and appropriate text generation or understanding.

[0445] Large language models have a wide range of applications, including intelligent customer service, intelligent question answering, natural language generation, advertising recommendation, and games. They can improve the efficiency and accuracy of human-computer interaction and enhance the user experience.

[0446] At the product design level, such as Figure 8A As shown, firstly, the application supports file types such as PDF, image, and plain text formats, such as... Figure 8A As shown on the left, clicking the upload image or file allows you to select the report to be interpreted. Clicking the send button initiates the interpretation process. Alternatively, you can directly enter the text to be interpreted in the dialog box, such as... Figure 8A As shown on the right, the output is displayed sequentially in a streaming format, showing the cited source content and interpretation results. For example... Figure 8B As shown, the interpretation results include anomalies identified in the report, summaries of the report content, and recommendations. The specific output format can be customized according to actual needs.

[0447] The implementation details of the medical report processing method provided in the embodiments of this application will be described below.

[0448] See Figure 5 , Figure 5 This is a schematic diagram of the system framework of the medical report processing method provided in the embodiments of this application, which will be combined with... Figure 5 An explanation is needed. It should be noted that... Figure 5 The system framework shown is a schematic diagram of the functional architecture of the medical report processing device described above. Various modifications made by those skilled in the art based on their understanding of the following text without creative effort should fall within the protection scope of the embodiments of this application.

[0449] Input: First, the input can be in the format of text, PDF, image, etc.

[0450] Report structuring module: These inputs first pass through the report structuring module, which uses technologies such as OCR to identify test values, reference ranges, and whether anomalies are present from images, PDFs, and other files. The structured reports then undergo separate modules for report type determination and report anomaly identification, identifying key points for interpretation and preparing for subsequent adaptation to different interpretation strategies and retrieval of the laboratory test knowledge base.

[0451] Report type determination module: Based on information such as report title and report content, determine the report type, which serves as the basis for different interpretation strategies for different types of reports.

[0452] Report anomaly judgment module: Extract report anomalies based on the reference range and the anomaly description, and simplify and optimize the information in the report.

[0453] Knowledge base retrieval module: Based on information such as abnormalities, diagnoses, departments, genders, and ages in the report, it retrieves information related to the abnormalities, such as suggestions and test purposes, providing strong medical support for interpreting the results.

[0454] The prompt word construction module integrates the content and format requirements of the interpretation results from the previous modules, the key anomalies in the report, and relevant inspection and testing information. It then calls the backend base language big language model to obtain the final report interpretation results.

[0455] The following section provides a detailed explanation of each module.

[0456] 1) Report Structure Module

[0457] See Figure 6 , Figure 6 This is a schematic diagram illustrating the principle of structured processing provided in this application embodiment. The input to the report structuring module is text, PDF, or image, and the output is a structured report (i.e., structured data). The structured report includes key information such as report title, time, department, and diagnosis, as well as the test and examination results contained in the report. Among them, the test results can be further subdivided into fields such as test name, test value, test range, and test unit; the examination results can be further divided into fields such as examination name, examination findings, and examination conclusion.

[0458] When the input content is plain text (corresponding to the case where the medical report is in text format above), instructions can be constructed (corresponding to the data structure prompts above) to specify the output format as shown in the figure, allowing the large language model to extract the corresponding structured content (corresponding to the processing in steps 201 to 202 above).

[0459] When the input content is a PDF (non-editable PDF) and an image (corresponding to the above case where the medical report is in image format), the medical report processing method provided in this application embodiment first calls the OCR engine to extract structured content based on the recognized text, relative position and other information (corresponding to the processing in steps 301 to 303 above).

[0460] 2) Report Type Judgment Module

[0461] The report type determination module is designed to determine the report type. It takes structured data from medical reports as input and outputs the report type, aiming to specify different interpretation strategies for different report types. Supported report types include, but are not limited to: blood type reports, ophthalmology reports, bone density tests, laboratory reports, genetic diagnosis reports, examination reports, and physical examination reports.

[0462] The judgment method is to call the large language model based on structured data and preset prompt words, so that the large language model can automatically determine the report type (corresponding to steps 401 to 403 above).

[0463] Example of a Prompt used to determine the report type (corresponding to the type-determining prompts above):

[0464] "Determine the type of the following text. Candidate types: {reportTypes}. Output the corresponding text type. If the input content is completely unrelated to medical testing, output 'other'. Except for the above cases, the report type must be categorized and defined: Laboratory reports: such as blood routine, urine routine, biochemical test reports, etc. Examination reports: such as gastroscopy, etc. Output only the most likely text type, without any extra content."

[0465] Requirements: Output a report directly, without analysis or interpretation.

[0466] After identifying the report type, for some specific report types (corresponding to the second report type above), the corresponding text is returned directly. For examples of the text returned for specific report types, please refer to the explanation in Table 1 above.

[0467] 3) Report Anomaly Judgment Module

[0468] The purpose of the report anomaly detection module is to identify anomalies (corresponding to the anomaly items mentioned above) in the inspection report based on the structured report content (i.e., structured data), helping the model focus on the anomalies in the report and improve the information density and accuracy of the interpretation results.

[0469] Based on the content of medical reports, they can be mainly divided into laboratory tests and examinations.

[0470] For test-related content, the judgment of report anomalies mainly involves the following situations:

[0471] Both the test results and the reference range are numerical values ​​(corresponding to steps 10311 to 10312 above): Extract the upper and lower limits of the reference range from the test results, compare them with the test results, and obtain the indicators as high, low, or normal, respectively. The reference range includes, but is not limited to, having both upper and lower limits (e.g., 3.1-6.8), having only the upper limit (<3.1), and having only the lower limit (>6.8). The abnormality name is organized as the test name + abnormality condition, such as high glucose, and an abnormality of a test result is recorded as vi.

[0472] The test results and reference range are in text (corresponding to steps 10313 to 10314 above): such as hepatitis B test results being negative or positive, antibiotic resistance in antibiotic sensitivity test, or sensitivity to antibiotics. In such special cases, if the test result is positive or resistant, the abnormal name of the test result shall be used: such as: hepatitis B antibody positive, penicillin resistance, etc.

[0473] All abnormal test results in the report can be denoted as V.

[0474] For examination-related content (corresponding to step 1032 above), the method for identifying abnormalities mainly involves comparing the identified examination findings with entries in the examination abnormality knowledge base (corresponding to the preset abnormality item library above) to obtain the corresponding abnormal item. For example, if the examination finding is "hypoechoic area visible in the right lobe of the thyroid gland," the most matching abnormal item is: right lobe thyroid nodule.

[0475] All abnormal test results in the report can be denoted as E.

[0476] Judging report anomalies helps to obtain the most critical information in report interpretation, reducing errors such as omissions and extraneous information in numerical judgment and summarization by large language models. On the other hand, it also facilitates the improvement of the accuracy of knowledge base retrieval and matches more targeted professional knowledge. For example, using "glucose result is 6.9 mmol / L" as input to search the knowledge base, the proportion of knowledge related to high and low glucose levels in the search results is almost consistent. However, using "glucose result is high" can more accurately retrieve the abnormal significance and precautions when glucose results are high.

[0477] 4) Knowledge Base Retrieval Module

[0478] During the knowledge base retrieval phase (corresponding to the medical knowledge database mentioned above), the gender, age, and diagnosis (represented uniformly by patient basic information P) from the structured report, along with any abnormalities {V, E} in the report, are used as input to retrieve professional knowledge strongly related to report interpretation (corresponding to the medical knowledge data related to abnormal items mentioned above). For example, if the report abnormality indicates elevated glucose, information such as the significance of elevated glucose, corresponding disease risks, and necessary lifestyle adjustments can be retrieved.

[0479] Specifically, the knowledge base retrieval module can be divided into the following processes (corresponding to steps 701 to 704 above):

[0480] Knowledge base construction: This includes the collection of databases related to abnormal reports, such as the testing methods, significance, reference ranges, related diseases, health guidance, and other test-related information for the test items in the report interpretation.

[0481] Knowledge base document segmentation: Organize the content of the knowledge base into multiple documents to improve the accuracy of retrieval. The maximum number of characters in each document is 1000.

[0482] Knowledge base vectorization: Vectorize the documents in the knowledge base to facilitate searching and comparison. The component used here is the BGEM3embedding component.

[0483] Retrieval: Concatenate texts such as gender, age, diagnosis, and anomalies to convert them into query vectors. Calculate the vector similarity between the query vector and the stored vector (knowledge base text) to obtain several knowledge base texts that are most relevant to the anomalies.

[0484] 5) The prompt word construction module calls the large language model to generate interpretation results (interpretation data).

[0485] The prompts (instructions) consist of three main parts: 1) requirements for content and format (corresponding to the prompts for report interpretation above); 2) content from the structured report (i.e., structured data); and 3) content from the knowledge base retrieved from the anomaly (i.e., medical knowledge data).

[0486] When organizing instructions, the requirements for content formatting vary depending on the application scenario, including but not limited to:

[0487] a) Description of system roles (corresponding to the description requirements for roles in the report interpretation above);

[0488] b) Description of content format (corresponding to the content standardization requirements above): Whether only abnormal results are retained in the model output results, whether a reference range is required, whether a summary, suggestions, or other sections are required, and the level of detail in the content.

[0489] c) Key points for interpreting different types of reports (corresponding to the key points for interpretation mentioned above): For example, test reports focus on indicators that are not within the reference range; inspection reports focus more on the meaning of the specific results observed, such as the corresponding significance of nodule size, grading, and corresponding recommendations.

[0490] d) Formatting requirements (corresponding to the formatting requirements above): Whether the output content follows Markdown format, whether the headings are bolded, etc.

[0491] When using structured report building instructions, it is essential to include all necessary information from the original report, such as report name, test items, test results, and basic information about the department and user (gender, age, diagnosis, etc.). However, the specific organization of the content can be tailored to the task description to improve the language model's understanding and execution of the instructions. For example, in scenarios involving anomaly analysis of report content, only the anomalies can be retained; in scenarios involving queries for a specific indicator value, the original test results and reference ranges can be preserved.

[0492] For example, test data for a single structured item can be represented as follows:

[0493] {name: "Glucose Detection",

[0494] value: 9.9

[0495] range: "3.9--6.1",

[0496] unit: "mmol / L"}.

[0497] The report content in the prompts corresponding to different interpretation requirements can be represented by Table 2:

[0498] Table 2

[0499] Interpretation Requirements Report Content It only indicates whether it is abnormal. Test item: Glucose test; Test result: Elevated. Keep the value Test item: Glucose test; Test result: 9.9 mmol / L, slightly elevated. Retain numerical values ​​and reference ranges Test item: Glucose test; result: 9.9 mmol / L, slightly elevated; reference range: 3.9-6.1 mmol / L.

[0500] When constructing the knowledge base, only the top 5 results with the highest score (corresponding to the second similarity above) that are greater than 0.5 are selected from the search results, and the total number of characters is guaranteed not to exceed 4000. If it exceeds 4000, the last result is removed while ensuring the integrity of each knowledge base.

[0501] Based on the confirmed content and structure requirements, the report content, and the knowledge base related to the report anomalies, the three elements are combined, and the constructed instructions are input into the underlying model to obtain the results.

[0502] Example of prompt word construction:

[0503] "Please refer to {{Knowledge Base}} and follow {{Content and Structure Requirements}}. The report to be processed is {{Report Content}}."

[0504] By decoupling the requirements for content and format from the report content, it is possible to quickly adapt to the interpretation requirements of different scenarios; by incorporating the content of the retrieved knowledge base, the professionalism and effectiveness of the interpretation results are improved.

[0505] The medical report processing method provided in this application has the following beneficial effects:

[0506] 1) Comparison of the effectiveness of interpreting structured report results versus plain text.

[0507] The test sample consisted of 100 laboratory reports, including complete blood counts, thyroid hormone tests, and other laboratory examinations. The evaluation method involved using the same content and structure requirements, inputting the data into the model, and statistically analyzing cases of missed and false positives. A missed positive occurs when an abnormal indicator is present in the report but not reflected in the interpretation results. A false positive occurs when the test value in the report is within the reference range, but is mistakenly interpreted as abnormal. Both situations represent interpretation errors; a smaller value indicates a more accurate interpretation.

[0508] Table 3

[0509]

[0510] As shown in Table 3, when directly requiring the summarization and analysis of report content, and placing high demands on the capabilities of the base model, the probability of error in the comparison model is also relatively high. However, by using comparison model 2 as the base, the medical report processing method provided in this application embodiment can effectively reduce missed and false identifications. Analyzing the errors of the comparison model, missed identification errors mainly manifest as omissions of report content during summarization, while false identifications mainly manifest as contradictory numerical judgments due to limitations in the capabilities of the large language model, for example:

[0511] Glucose (GLU): Result: 6.41 mmol / L, slightly above the reference range (4.16-6.44 mmol / L).

[0512] Thanks to the anomaly extraction and instruction construction module of the medical report processing method provided in this application embodiment, such as in the task of extracting anomalies in interpreting reports, the content input to the model base only includes abnormal test items and abnormal situations, without normal test results and reference ranges, which reduces the difficulty of model processing numerical judgment and summarization and improves accuracy.

[0513] 2) Comparison of enhanced search effects using knowledge bases

[0514] In interpreting certain test indicators, extensive medical knowledge is required to enhance the information content and professionalism of the interpretation results. For example, interpreting sex hormones requires comprehensive consideration of diagnostic and testing significance to provide an accurate interpretation. The knowledge base retrieval module of the medical report processing method provided in this application incorporates the most relevant medical knowledge to the current report into the input, enabling even general models to provide highly professional interpretation results. For example, in the example in Table 4, after incorporating medical knowledge, the interpretation results can be analyzed on a case-by-case basis according to the diagnostic and testing significance, providing users with richer and more effective information.

[0515] Table 4

[0516]

[0517]

[0518] The following description continues to illustrate the exemplary structure of the medical report processing device 133 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software module in the medical report processing device 133 stored in the memory 130 may include:

[0519] The data processing module 1331 is used to identify the report type of the medical report of the target object, wherein the target object is the subject described in the medical report.

[0520] In some embodiments, the data processing module 1331 is further configured to identify abnormal items in the medical report and query multiple medical knowledge entry data based on the abnormal items.

[0521] In some embodiments, the data processing module 1331 is further configured to perform attention encoding on the plurality of medical knowledge item data based on the historical diagnostic data of the target object, so as to obtain the attention weights of the plurality of medical knowledge item data corresponding to the target object respectively.

[0522] In some embodiments, the data processing module 1331 is further configured to concatenate the multiple medical knowledge item data based on the attention weights to obtain medical knowledge data adapted to the target object.

[0523] The prompt word construction module 1332 is used to construct prompt words based on the report type, the abnormal item, and the medical knowledge data.

[0524] The data generation module 1333 is used to generate interpretation data of the medical report based on the prompt words by calling a pre-trained language model.

[0525] In some embodiments, the data processing module 1331 is further configured to determine first nodes corresponding to the plurality of abnormal items from a pre-constructed knowledge graph, and read first knowledge entry data from each first node, wherein the knowledge graph includes a plurality of nodes, each node includes one knowledge entry data, and the type of medical knowledge entry data included in adjacent nodes matches the type of medical knowledge entry data used sequentially in the diagnostic process of medical experts; for each first node, a traversal operation is performed starting from the first node, and second medical knowledge entry data is read from the second nodes traversed by the traversal operation.

[0526] In some embodiments, the data processing module 1331 is further configured to determine the transition probability of walking from the starting node to a neighboring node of the starting node, wherein the initial starting node is the first node; select at least one neighboring node as the second node in descending order of the transition probabilities; if the walking end condition is not met, use the second node as the new starting node and return to the step of determining the transition probability of walking from the starting node to a neighboring node of the starting node; wherein the walking end condition includes: the cumulative number of walking steps starting from the first node reaches a preset number of steps, and the transition probability of walking from the starting node to a neighboring node of the starting node is less than a transition probability threshold.

[0527] In some embodiments, the data processing module 1331 is further configured to, for each of the neighboring nodes of the starting node, determine the similarity between the knowledge entry data included in the starting node and the knowledge entry data included in the neighboring nodes, and use the similarity as the transition probability from the starting node to the neighboring node.

[0528] In some embodiments, the data processing module 1331 is further configured to perform structured processing on the medical report to obtain structured data; wherein the structured data includes multiple types of feature data of the target object, the multiple types of feature data being used to characterize the biological attributes and treatment results of the target object; concatenating the multiple types of feature data and the abnormal item to obtain concatenated data; encoding the concatenated data to obtain a feature vector of the concatenated data; for each medical knowledge entry data in the medical knowledge database, obtaining a second similarity between the medical knowledge feature vector and the feature vector of the concatenated data; in response to the second similarity being greater than a preset similarity threshold, using the medical knowledge entry data corresponding to the medical knowledge feature vector as medical knowledge entry data related to the abnormal item.

[0529] In some embodiments, the medical knowledge database includes multiple medical knowledge entry data and a medical knowledge feature vector for each medical knowledge entry data. The data processing module 1331 is further configured to acquire medical document data of multiple dimensions related to the abnormal item; segment the medical document data according to a preset character length to obtain multiple medical knowledge entry data; encode each medical knowledge entry data to obtain a medical knowledge feature vector for each medical knowledge entry data; and construct the medical knowledge database based on the multiple medical knowledge entry data and the medical knowledge feature vector for each medical knowledge entry data.

[0530] In some embodiments, the data processing module 1331 is further configured to encode the historical diagnostic data of the target object into a query vector, map the plurality of medical knowledge entry data into a plurality of key vectors respectively; determine the similarity between the query vector and the plurality of key vectors respectively, normalize the similarity between the query vector and the plurality of key vectors respectively, and obtain the attention weights of the plurality of key vectors, wherein the attention weight of one key vector is used as the attention weight of the target object corresponding to the medical knowledge entry data of the key vector; and concatenate each medical knowledge entry data and the attention weight corresponding to the medical knowledge entry data to obtain medical knowledge data adapted to the target object.

[0531] In some embodiments, the data processing module 1331 is further configured to perform structured processing on the medical report to obtain structured data; obtain preset type judgment prompts, wherein the type judgment prompts are used to instruct the language model to perform the following processing: determine the report type of the medical report from a preset plurality of candidate report types; call the language model through the type judgment prompts to perform the following processing: encode the type judgment prompts and the structured data to obtain the encoding features of the structured data; perform feature mapping on the encoding features of the structured data through the language model to obtain the probability value of each candidate report type, and select the candidate report type with the highest probability value as the report type of the medical report.

[0532] In some embodiments, the data processing module 1331 is further configured to perform structured processing on the medical report to obtain structured data; match the structured data with a plurality of preset type keywords to obtain matching results; in response to the matching result indicating that the structured data and the type keywords are successfully matched, use the report type pre-associated with the type keywords as the report type of the medical report; in response to the matching result indicating that the structured data and the type keywords are not matched, call a pre-trained classification model to perform report type classification processing on the structured data to obtain the report type of the medical report.

[0533] In some embodiments, the data processing module 1331 is further configured to obtain preset data structure prompts, wherein the data structure prompts are used to define the field template of the structured data, the field template includes multiple fields, each field corresponding to an entity type; through the data structure prompts, the language model is invoked to perform entity recognition on the medical report to obtain multiple entity types and entity values ​​of each entity type, and the entity values ​​of each entity type are filled into the field corresponding to the entity type to obtain the structured data.

[0534] In some embodiments, the data processing module 1331 is further configured to perform text recognition processing on the medical report to obtain a text recognition result, wherein the text recognition result includes multiple recognized texts and the position of each recognized text in the medical report; obtain a preset structured data template, wherein the structured data template includes multiple fields and a text position rule corresponding to each field, the text position rule being used to characterize the position of the recognized text corresponding to each field in the medical report; take the position matching the text position rule as the target position, and fill the recognized text in the medical report located at the target position into the field corresponding to the text position rule in the structured data template to obtain the structured data.

[0535] In some embodiments, the data processing module 1331 is further configured to, when the report type is a preset first report type, proceed to the process of identifying abnormal items in the medical report and querying multiple medical knowledge item data based on the abnormal items, wherein the first report type includes: test reports containing text information and examination reports containing text information; and when the report type is a preset second report type, obtain a preset text corresponding to the second report type and use the preset text as the interpretation data of the medical report, wherein the second report type includes: medical reports without text information, medical reports with timeliness, reports that cannot be interpreted due to technical limitations, and reports that cannot be interpreted due to legal limitations.

[0536] In some embodiments, the data processing module 1331 is further configured to query online medical services that match the type of the medical report; and generate an online medical service guide for the medical report, wherein the online medical service guide includes the appointment address and introductory information of the online medical service.

[0537] In some embodiments, the prompt word construction module 1332 is further configured to concatenate the structured data of the medical report, the report type, the abnormal items, the medical knowledge data, and the report interpretation prompt words into prompt words, wherein the report interpretation prompt words include the requirements that need to be met when interpreting the report corresponding to the report type.

[0538] In some embodiments, the interpretation data generation module 1333 is further configured to encode the prompt word using the language model to obtain the encoding features of the prompt word; and to decode the encoding features of the prompt word using the language model to obtain the interpretation data of the medical report.

[0539] In some embodiments, the data processing module 1331 is further configured to read the matching rules in descending order of priority to perform the following processing: matching the currently read matching rule with the structured data; if the matching fails, continuing to read the next matching rule; if the matching succeeds, using the report type in the currently traversed matching rule as the report type of the medical report.

[0540] In some embodiments, the structured data of the medical report includes medical examination data for multiple items; the data processing module 1331 is further configured to, in response to the item being a test item, identify abnormal items in the medical report based on preset reference information of the item and medical examination data for each item; and in response to the item being a test item, identify abnormal items in the medical report based on medical examination data for each item and a preset abnormal item library.

[0541] In some embodiments, the data processing module 1331 is further configured to: when the medical examination data is numerical, wherein the preset reference information is a preset reference range for the values ​​of normal items; compare the medical examination data with the preset reference range to obtain a first comparison result; and in response to the first comparison result indicating that the medical examination data exceeds the preset reference range, combine the first comparison result and the name of the item to form the abnormal item; when the medical examination data is text, wherein the preset reference information includes abnormal keywords; compare the medical examination data with the abnormal keywords to obtain a second comparison result; and in response to the second comparison result indicating that the medical examination data matches the abnormal keywords, combine the medical examination data and the name of the item to form the abnormal item.

[0542] In some embodiments, the data processing module 1331 is further configured to perform the following processing on the medical examination data of each item: obtain a first similarity between the medical examination data and each abnormal item sample; and take the abnormal item sample corresponding to the highest first similarity as the abnormal item.

[0543] This application provides a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the medical report processing method described above in this application.

[0544] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the medical report processing method provided in this application. For example... Figure 4A The methods for processing medical reports shown or Figure 4N The procedure for processing medical reports is shown.

[0545] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0546] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0547] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).

[0548] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.

[0549] In summary, through the embodiments of this application, the medical field to which the medical report belongs is characterized by the report type. Abnormal items identified from the medical report are used as conditions for knowledge retrieval. By introducing medical knowledge data obtained in this way into the prompt words, not only is effective knowledge introduced into the language model when processing medical reports, but the generation scope of the language model is also constrained to the corresponding medical field, reducing the risk of misinterpretation due to contextual ambiguity. Based on the historical diagnostic data of the target object, attention weights are assigned to the medical knowledge item data associated with abnormal items, and personalized medical knowledge data adapted to the target object is generated. This achieves a dynamic combination of historical diagnostic data and medical knowledge item data. By introducing this medical data into the prompt words, the language model can selectively use medical knowledge item data for analysis based on attention weights when interpreting medical reports, thereby generating targeted interpretation data for the target object's medical reports and improving the accuracy of medical report interpretation.

[0550] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A method for processing medical reports, characterized in that, The method includes: Identify the report type of the medical report of the target object, wherein the target object is the subject described in the medical report; Identify abnormal items in the medical report and query multiple medical knowledge entries based on the abnormal items; Based on the historical diagnostic data of the target object, attention encoding is performed on the multiple medical knowledge item data to obtain the attention weights of the multiple medical knowledge item data corresponding to the target object; Based on the attention weights, the multiple medical knowledge item data are concatenated to obtain medical knowledge data that is adapted to the target object; Based on the report type, the abnormal items, and the medical knowledge data, construct prompt words; Based on the prompt words, a pre-trained language model is invoked to generate interpretation data for the medical report.

2. The method according to claim 1, characterized in that, The query of multiple medical knowledge entries based on the abnormal items includes: From the pre-constructed knowledge graph, a first node corresponding to each of the multiple abnormal items is determined, and a first knowledge entry data is read from each first node. The knowledge graph includes multiple nodes, each node includes one knowledge entry data, and the types of medical knowledge entry data included in adjacent nodes match the types of medical knowledge entry data used sequentially in the diagnostic process of medical experts. For each of the first nodes, a traversal operation is performed starting from the first node, and the second medical knowledge entry data is read from the second nodes traversed by the traversal operation.

3. The method according to claim 2, characterized in that, The step of performing a traversal operation starting from the first node and reading second medical knowledge item data from the second nodes traversed by the traversal operation includes: Determine the transition probability of a person from a starting node to a neighboring node of the starting node, wherein the initial starting node is the first node; According to the order of the transition probabilities from high to low, at least one of the neighboring nodes is selected as the second node; If the walk termination condition is not met, the second node is taken as the new starting node, and the process returns to the step of determining the transition probability of walking from the starting node to the neighboring node of the starting node; wherein, the walk termination condition includes: the cumulative number of walk steps starting from the first node reaches a preset number of steps, and the transition probability of walking from the starting node to the neighboring node of the starting node is less than the transition probability threshold.

4. The method according to claim 3, characterized in that, Determining the transition probability of traversing from the starting node to a neighboring node of the starting node includes: For each of the neighboring nodes of the starting node, the similarity between the knowledge entry data included in the starting node and the knowledge entry data included in the neighboring nodes is determined, and the similarity is used as the transition probability from the starting node to the neighboring node.

5. The method according to claim 3, characterized in that, Determining the transition probability of traversing from the starting node to a neighboring node of the starting node includes: For the starting node, determine the traversed path from the first node to the starting node, and encode the knowledge entry data included in the traversed path to obtain a context vector; The similarity between the context vector and the feature vector of the knowledge entry data included in the neighboring node is determined as the transition probability from the starting node to the neighboring node.

6. The method according to claim 1, characterized in that, The query of multiple medical knowledge entries based on the abnormal items includes: The medical report is processed into structured data to obtain structured data; wherein, the structured data includes multiple types of feature data of the target object, and the multiple types of feature data are used to characterize the biological attributes and diagnosis and treatment results of the target object; The feature data of the multiple types and the abnormal items are concatenated to obtain concatenated data; The spliced ​​data is encoded to obtain the feature vector of the spliced ​​data; For each medical knowledge entry in the medical knowledge database, a second similarity is obtained between the medical knowledge feature vector and the feature vector of the concatenated data. In response to the second similarity being greater than a preset similarity threshold, the medical knowledge entry data corresponding to the medical knowledge feature vector is taken as the medical knowledge entry data related to the abnormal item.

7. The method according to claim 6, characterized in that, The medical knowledge database includes multiple medical knowledge entry data and a medical knowledge feature vector for each medical knowledge entry data. The medical knowledge database is constructed in the following manner: Obtain medical document data from multiple dimensions related to the abnormal item; The medical document data is segmented according to a preset character length to obtain multiple medical knowledge item data; Each medical knowledge entry data is encoded to obtain a medical knowledge feature vector for each medical knowledge entry data; The medical knowledge database is constructed based on multiple medical knowledge item data and the medical knowledge feature vector of each medical knowledge item data.

8. The method according to claim 1, characterized in that, The process of encoding attention into the multiple medical knowledge entries based on the historical diagnostic data of the target object, thereby obtaining attention weights for each of the multiple medical knowledge entries corresponding to the target object, includes: The historical diagnostic data of the target object is encoded into a query vector, and the multiple medical knowledge entries are mapped into multiple key vectors respectively. The similarity between the query vector and the plurality of key vectors is determined, and the similarity between the query vector and the plurality of key vectors is normalized to obtain the attention weights of the plurality of key vectors. The attention weight of one key vector is used as the attention weight of the target object corresponding to the medical knowledge entry data of the key vector. The concatenation of the multiple medical knowledge item data based on the attention weights includes: Each medical knowledge item data and its corresponding attention weight are concatenated to obtain medical knowledge data adapted to the target object.

9. The method according to claim 1, characterized in that, The report types of medical reports that identify the target object include: The medical report is processed into structured data to obtain structured data; Obtain preset type judgment prompt words, wherein the type judgment prompt words are used to instruct the language model to perform the following process: determine the report type of the medical report from a preset plurality of candidate report types; Based on the type-determined prompt word, the language model is invoked to perform the following processing: The type judgment prompt and the structured data are encoded to obtain the encoding features of the structured data; The language model is used to perform feature mapping on the encoded features of the structured data to obtain the probability value of each candidate report type, and the candidate report type with the highest probability value is taken as the report type of the medical report.

10. The method according to claim 1, characterized in that, The report types of medical reports that identify the target object include: The medical report is processed into structured data to obtain structured data; The structured data is matched with multiple preset keyword types to obtain matching results; In response to the matching result indicating that the structured data is successfully matched with the type keyword, the report type pre-associated with the type keyword is used as the report type of the medical report; In response to the matching result indicating that the structured data failed to match the type keyword, a pre-trained classification model is invoked to perform report type classification processing on the structured data to obtain the report type of the medical report.

11. The method according to claim 6, 9 or 10, characterized in that, When the medical report is in text format, the step of performing structured processing on the medical report to obtain structured data includes: Obtain preset data structure prompts, wherein the data structure prompts are used to define the field templates of the structured data, the field templates include multiple fields, and each field corresponds to an entity type; Using the data structure prompts, the language model is invoked to perform entity recognition on the medical report, resulting in multiple entity types and entity values ​​for each entity type. The entity values ​​for each entity type are then filled into the fields corresponding to the entity type to obtain the structured data.

12. The method according to claim 6, 9 or 10, characterized in that, When the medical report is in image format, the step of performing structured processing on the medical report to obtain structured data includes: The medical report is subjected to text recognition processing to obtain text recognition results, wherein the text recognition results include multiple recognized texts and the position of each recognized text in the medical report; Obtain a preset structured data template, wherein the structured data template includes multiple fields and text position rules corresponding to each field, and the text position rules are used to characterize the position of the identified text corresponding to each field in the medical report; The location that matches the text location rule is taken as the target location. The identified text in the medical report located at the target location is filled into the field of the structured data template corresponding to the text location rule to obtain the structured data.

13. The method according to claim 1, characterized in that, Before identifying abnormal items in the medical report, the method further includes: When the report type is a preset first report type, the process proceeds to identifying abnormal items in the medical report and querying multiple medical knowledge item data based on the abnormal items. The first report type includes: test reports containing text information and examination reports containing text information. When the report type is a preset second report type, a preset text corresponding to the second report type is obtained, and the preset text is used as the interpretation data of the medical report. The second report type includes: medical reports that do not contain text information, medical reports with timeliness, reports that cannot be interpreted due to technical limitations, and reports that cannot be interpreted due to legal limitations.

14. The method according to claim 13, characterized in that, When the report type is a preset second report type, the method further includes: Search for online medical services that match the type of the medical report; The online medical consultation guide that generates the medical report includes the appointment address and introductory information for the online medical consultation service.

15. The method according to any one of claims 1 to 9, characterized in that, The method of constructing prompt words based on the report type, the abnormal items, and the medical knowledge data includes: The structured data of the medical report, the report type, the abnormal items, the medical knowledge data, and the report interpretation prompts are concatenated into prompts, wherein the report interpretation prompts include the requirements that need to be met when interpreting the report corresponding to the report type; The step of generating interpretation data for the medical report based on the prompt words and calling a pre-trained language model includes: The prompt words are encoded using the language model to obtain the encoded features of the prompt words; The medical report interpretation data is obtained by decoding the encoded features of the prompt words using the language model.

16. A method for processing medical reports, characterized in that, The method includes: Displays the medical report processing interface; In response to the report upload operation in the medical report processing interface, the uploaded medical report is displayed; In response to a trigger operation for interpreting the medical report, the interpretation data of the medical report is displayed, wherein the interpretation data of the medical report is generated by the medical report processing method according to any one of claims 1 to 15.

17. A medical report processing device, characterized in that, The device includes: The data processing module is used to identify the report type of the medical report of the target object, wherein the target object is the subject described in the medical report; The data processing module is also used to identify abnormal items in the medical report and query multiple medical knowledge entries based on the abnormal items. The data processing module is further configured to perform attention encoding on the multiple medical knowledge item data based on the historical diagnostic data of the target object, so as to obtain the attention weights of the multiple medical knowledge item data corresponding to the target object respectively; The data processing module is further configured to concatenate the multiple medical knowledge item data based on the attention weights to obtain medical knowledge data that is adapted to the target object. The prompt word construction module is used to construct prompt words based on the report type, the abnormal item, and the medical knowledge data; The data generation module is used to generate interpretation data for the medical report based on the prompt words and by calling a pre-trained language model.

18. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, configured to execute computer-executable instructions or computer programs stored in the memory, implements the medical report processing method according to any one of claims 1 to 15, or implements the medical report processing method according to claim 16.

19. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, they implement the medical report processing method according to any one of claims 1 to 15, or the medical report processing method according to claim 16.

20. A computer program product comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, they implement the medical report processing method according to any one of claims 1 to 15, or the medical report processing method according to claim 16.