A structured information extraction method and device for image reports and a storage medium

By parsing structured templates and generating prompts to guide the large language model in structured extraction, and performing entity recognition and relationship verification, the problem of missing detailed information in existing technologies is solved, and the accuracy and flexibility of structured extraction of medical image reports are improved.

CN121413616BActive Publication Date: 2026-03-03WANLIYUN MEDICAL INFORMATION TECH (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing technologies are prone to missing detailed information in the structured extraction of medical image reports, resulting in insufficient accuracy and flexibility.

Method used

By acquiring the text to be processed and the structured template, the fields, nesting relationships and format constraints in the template are parsed to generate prompts to guide the large language model in structured extraction. The results are verified through entity recognition and relationship extraction to ensure that no details are missed.

Benefits of technology

It achieves structured extraction without missing any details, improving the accuracy and flexibility of structured extraction from medical image reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121413616B_ABST
    Figure CN121413616B_ABST
Patent Text Reader

Abstract

The application discloses a structured information extraction method and device for image reports and a storage medium. In the method, a structured template is analyzed to obtain the fields defined in the structured template that need to be extracted, the nesting relationship between the fields, and the format constraint information of the fields, and corresponding analysis information is obtained. Then, prompt information can be generated according to the analysis information, so that a large language model can sequentially perform structured extraction on a to-be-processed text according to the nesting relationship and the format constraint through the prompt information, and target structured information without missing details is obtained. In addition, in the method, entity recognition and relationship extraction are used to determine entities having a preset logical relationship in the to-be-processed text, and the target structured information is further verified, so that the structured extraction through the method can not only not miss the detailed information in the report text of the image report, but also ensure the accuracy of the structured extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical information technology, and in particular to a method, apparatus and storage medium for extracting structured information from image reports. Background Technology

[0002] Currently, medical imaging reports are manually written by radiologists based on medical images. The report text can be extracted in a structured way to obtain structured text. The extracted structured text facilitates the formation of structured records, further analysis of medical imaging reports, or makes it easier for specialists and patients to view the imaging report results.

[0003] In existing technologies, the structured extraction of report text usually involves pre-setting some fields that need to be extracted from the report text, and then extracting the information of the corresponding fields contained in the report text according to the set fields, thereby obtaining structured text.

[0004] Using existing technologies for structured extraction may miss detailed information. For example, when the "nature of the lesion" is extracted as "tumor" from the report text, further details related to "tumor" need to be extracted, such as whether the "tumor" is "benign" or "malignant," and the "tumor stage." Similarly, when "inflammation" is extracted from the report text, further details such as "pathogen type" are needed. Existing technologies are prone to missing these details, resulting in insufficient accuracy and flexibility in structured extraction of report text.

[0005] There is currently no effective solution to the technical problem that the existing technology is prone to missing detailed information, resulting in insufficient accuracy and flexibility in the structured extraction of report text. Summary of the Invention

[0006] The embodiments of this disclosure provide a method, apparatus, and storage medium for extracting structured information from image reports, which at least solves the technical problem in the prior art that details are easily missed, resulting in insufficient accuracy and flexibility in the structured extraction of report text.

[0007] According to one aspect of the present disclosure, a method for extracting structured information from an image report is provided, comprising: acquiring a text to be processed, wherein the text to be processed is a report text of a medical image report; acquiring a structured template corresponding to the text to be processed; parsing the structured template to obtain parsing information, wherein the parsing information is used to represent the fields to be extracted contained in the structured template, the nesting relationship between the fields to be extracted, and the format constraint information corresponding to the fields to be extracted; generating prompt information based on the text to be processed and the parsing information, and determining the target structured information corresponding to the text to be processed based on the prompt information and a large language model; performing entity recognition on the text to be processed to obtain recognition results, and extracting the relationship between entities based on the recognition results to determine a first entity combination in the text to be processed that has a preset logical relationship, wherein the preset logical relationship includes at least a nesting relationship; and verifying the target structured information based on the first entity combination in the text to be processed that has a preset logical relationship and the field data in the target structured information that has a preset logical relationship, obtaining a verification result, and determining the structured output result corresponding to the text to be processed based on the verification result and the target structured information.

[0008] According to another aspect of the present disclosure, a storage medium is also provided, the storage medium including a stored program, wherein the methods described above are executed by a processor when the program is running.

[0009] According to another aspect of the present disclosure, a structured information extraction device for image reports is also provided, comprising: a text acquisition module for acquiring text to be processed, wherein the text to be processed is the report text of a medical image report; a template acquisition module for acquiring a structured template corresponding to the text to be processed; a parsing module for parsing the structured template to obtain parsing information, wherein the parsing information is used to represent the fields to be extracted contained in the structured template, the nesting relationship between the fields to be extracted, and the format constraint information corresponding to the fields to be extracted; and a generation module for generating prompt information based on the text to be processed and the parsing information, and generating prompt information based on a large language model according to the prompt information. The system comprises the following modules: a target structured information module, a relation extraction module, and a result output module. The first entity combination in the target structured information is determined to have a nested relationship. The first entity combination in the target structured information is determined to have a nested relationship. The preset logical relationship includes at least a nested relationship. The result output module is used to verify the target structured information based on the first entity combination in the target structured information with a preset logical relationship and the field data with a preset logical relationship in the target structured information. The verification result is obtained, and the structured output result corresponding to the target structured information is determined based on the verification result and the target structured information.

[0010] According to another aspect of the present disclosure, a structured information extraction apparatus for image reports is also provided, comprising: a processor; and a memory connected to the processor, configured to provide the processor with instructions for processing the following steps: acquiring a text to be processed, the text to be processed being a report text of a medical image report; acquiring a structured template corresponding to the text to be processed; parsing the structured template to obtain parsing information, the parsing information representing the fields to be extracted contained in the structured template, the nesting relationships between the fields to be extracted, and the format constraint information corresponding to the fields to be extracted; generating prompt information based on the text to be processed and the parsing information, and determining the target structured information corresponding to the text to be processed based on the prompt information and a large language model; performing entity recognition on the text to be processed to obtain recognition results, and extracting relationships between entities based on the recognition results to determine a first entity combination in the text to be processed that has a preset logical relationship, the preset logical relationship including at least a nesting relationship; and verifying the target structured information based on the first entity combination in the text to be processed that has a preset logical relationship and the field data in the target structured information that has a preset logical relationship, obtaining a verification result, and determining the structured output result corresponding to the text to be processed based on the verification result and the target structured information.

[0011] In this embodiment, the structured template can be parsed to extract the fields to be extracted (fields to be extracted), the nesting relationships between fields, and the format constraints of the fields (i.e., the format requirements for the extracted field data). Corresponding parsing information is then obtained. Prompt information is generated based on this parsing information, instructing the large language model to extract the text in a formatted manner according to the fields, nesting relationships, and format constraints defined in the structured template. This allows the large language model to sequentially extract the text in a structured manner according to the nesting relationships and format constraints, obtaining target structured information without missing details. Furthermore, this method uses entity recognition and relationship extraction to identify entities with preset logical relationships in the text to be processed, further verifying the target structured information. Therefore, this method not only ensures that no detail information in the doctor's written report is missed but also guarantees the accuracy of the structured extraction. Attached Figure Description

[0012] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this application, illustrate exemplary embodiments of this disclosure and are used to explain this disclosure, but do not constitute an undue limitation of this disclosure. In the drawings:

[0013] Figure 1 This is a hardware structure block diagram of a computing device for implementing the method described in Embodiment 1 of this disclosure;

[0014] Figure 2 This is a schematic diagram of a structured information extraction system for image reports according to the first aspect of Embodiment 1 of this disclosure;

[0015] Figure 3 This is a flowchart illustrating the structured information extraction method for image reports according to the first aspect of Embodiment 1 of this disclosure;

[0016] Figure 4 This is a schematic diagram of an entity recognition and relation extraction process according to the first aspect of Embodiment 1 of this disclosure;

[0017] Figure 5A This is a schematic diagram of a structured report according to the first aspect of Embodiment 1 of this specification;

[0018] Figure 5B This is a schematic diagram illustrating the display effect of a free text report, a structured template, and a structured report on an electronic screen, as described in the first aspect of Embodiment 1 of this specification.

[0019] Figure 6 This is a schematic diagram of a structured information extraction device for image reports according to Embodiment 2 of this disclosure; and

[0020] Figure 7 This is a schematic diagram of the structured information extraction device for image reports according to Embodiment 3 of this disclosure. Detailed Implementation

[0021] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this disclosure.

[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0023] Example 1

[0024] According to this embodiment, a method embodiment for extracting structured information from image reports is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0025] The method embodiments provided in this example can be executed on a computer terminal, server, or similar computing device. Figure 1 A hardware block diagram of a computing device for implementing a structured information extraction method for image reports is shown. Figure 1 As shown, a computing device may include one or more processors (processors may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory for storing data, a transmission device for communication functions, and an input / output interface. The memory, transmission device, and input / output interface are connected to the processor via a bus. In addition, it may also include a display, keyboard, and cursor control device connected to the input / output interface. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, a computing device may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0026] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element in a computing device. As involved in the embodiments of this disclosure, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0027] The memory can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the structured information extraction method in the embodiments of this disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the structured information extraction method for image reports of the aforementioned application. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the computing device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0028] The transmission device is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the computing device's communication provider. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0029] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows users to interact with the user interface of the computing device.

[0030] It should be noted here that, in some optional embodiments, the above... Figure 1 The computing device shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computing devices.

[0031] Figure 2This is a schematic diagram of the structured information extraction system for image reports according to this embodiment. (Refer to...) Figure 2 As shown, the system includes: a template parsing and target definition module, an LLM targeted extraction module, a bidirectional verification module, a dynamic completion and adjustment module, and a confidence scoring module. It should be noted that the hardware devices used in the system can all utilize the hardware structure described above.

[0032] The template parsing and target definition module is used to parse dynamically updated structured templates, outputting a set of required fields, nesting logic (nesting relationships), and format constraints (such as "size" requiring "major diameter (mm) × minor diameter (mm)") as parsing information. This parsing information can then be transformed into LLM-understandable extraction targets (such as "Please extract lesion size in 'major diameter mm × minor diameter mm' format"), resulting in corresponding prompts.

[0033] The LLM targeted extraction module is used by the template parsing and target definition module to parse the structured template. It guides the Medical Large Language Model (LLM) to perform targeted extraction (such as prioritizing the extraction of required fields in the template and outputting according to format constraints) to generate a preliminary adapted entity set (i.e., the basic structured information mentioned later).

[0034] The bidirectional validation module is used to validate basic structured information. Validation includes medical logic validation and template adaptability validation. The specific steps for medical logic validation and template adaptability validation will be explained in detail later. Specifically, medical logic validation verifies the completeness and logical consistency of entities based on the radiology rule base. Template adaptability validation verifies whether entities in the initial adapted entity set match template fields (e.g., whether they contain all required fields), whether their format conforms to constraints (e.g., whether the date format is "YYYY-MM-DD"), and whether they satisfy nested logic (e.g., whether "benign / malignant" has already been filled in when "tumor" is selected).

[0035] The dynamic completion and adjustment module is used to generate the final adapted entity set by resolving issues found by the two-way verification module (such as format errors or missing nested fields) through secondary parsing of the text to be processed by LLM (which can be referred to as a free text report in this embodiment) or prompting manual supplementation.

[0036] The confidence scoring module is used to score the target structured information. The scoring rules for the confidence scoring module can include a base score, rule matching score, completion basis score, and template matching score, with the total score being a weighted average of these four (the weights can be set by the user). Here's an example of the score for the structured information (basic structured information or target structured information) determined by the confidence scoring module: Base score 45 (LLM output probability 0.9) + Rule matching score 30 (conforms to medical logic) + Completion basis score 10 (partial completion) + Template matching score 15 (matches all except TNM staging) → Total score 100. The output of the confidence scoring module can be an entity set labeled "TNM staging needs supplementation," with an overall confidence score of 100. In this case, the structured template can be directly filled based on the target structured information to obtain a structured report.

[0037] Under the aforementioned operating environment, according to the first aspect of this embodiment, a structured information extraction method is provided, which comprises... Figure 1 The computing device shown is implemented. Figure 3 A flowchart illustrating the method is shown below. (Refer to...) Figure 3 As shown, the method includes:

[0038] S302: Obtain the text to be processed, which is the report text of the medical imaging report filled out by the doctor;

[0039] S304: Obtain the structured template corresponding to the text to be processed;

[0040] S306: Parse the structured template to obtain parsing information. The parsing information is used to represent the fields to be extracted contained in the structured template, the nesting relationship between the fields to be extracted, and the format constraint information corresponding to the fields to be extracted.

[0041] S308: Generate prompt information based on the text to be processed and the parsed information, and determine the target structured information corresponding to the text to be processed based on the prompt information and the large language model;

[0042] S310: Perform entity recognition on the text to be processed, obtain the recognition result, and extract the relationship between entities based on the recognition result to determine the first entity combination in the text to be processed that has a preset logical relationship. The preset logical relationship includes at least a nested relationship.

[0043] S312: Based on the first entity combination in the text to be processed that has a preset logical relationship, and the field data in the target structured information that has a preset logical relationship, verify the target structured information, and determine the structured output result corresponding to the text to be processed based on the verification result and the target structured information.

[0044] First, the computing device can acquire the text to be processed (S302). This text can refer to free-text image report content, including descriptions of findings and diagnostic conclusions. That is, the text to be processed can be a medical image report text manually written by a doctor (since the text to be processed is unstructured data manually written by the doctor, it can be called a free-text report), meaning it is a paragraph of text manually written by the doctor. In this embodiment, structured information extraction is performed on the text to be processed, converting the corresponding report text into a structured report, thereby facilitating viewing by doctors and patients, and facilitating data analysis in medical-related fields.

[0045] Then, the computing device can acquire a structured template corresponding to the text to be processed (S304). The computing device can determine the structured report template to use based on key information in the diagnostic conclusion. For example, if the diagnosis is clearly rectal cancer, the structured report template for rectal cancer is selected. For lung cancer, the structured report template for lung cancer is used. For instance, the computing device can determine the type of examination corresponding to the text to be processed (e.g., brain MRI or chest CT scan), and then match the appropriate structured template for the text based on the examination type. Furthermore, it can determine the examination site involved in the text to be processed (e.g., stomach, brain, or lungs), and then match the appropriate structured template for the text based on the examination site and examination type.

[0046] The structured template can be dynamically updated, meaning it can be updated over time. Users can add new fields to be extracted, as well as nested relationships and conditional constraints to the structured template.

[0047] In this embodiment, a structured template is used to define the specific content and format of the information to be extracted from the text to be processed. Table 1 below provides a simple example of a structured template. It should be noted that this example is only for understanding the form of a structured template and does not represent an actual structured template.

[0048] Table 1

[0049] As shown in Table 1, a structured template can include multiple fields (i.e., the fields to be extracted mentioned later). The structured template can define the field name, field type (single-choice option or text), field format constraints, and nesting relationships between fields. First-level fields are mandatory, while second- and third-level fields are conditionally mandatory. When a first-level field and a second-level field are nested, they can be called a nested field combination, with the first-level field being the parent field and the second-level field being the child field. Corresponding to Table 1, in the field combination (lesion nature, benign / malignant), lesion nature is the parent field, and benign / malignant is the child field. When the lesion nature is tumor, the large language model needs to fill in the benign / malignant field. When a second-level field and a third-level field have a nested relationship, the corresponding second-level field and third-level field can be used as a field combination, with the corresponding second-level field as the parent field and the third-level field as the child field. Corresponding to Table 1, in the field combination (benign / malignant, TNM stage), benign / malignant is the parent field and TNM stage is the child field. When benign / malignant is malignant, the large language model needs to fill the TNM stage field.

[0050] Taking the field named "Law Nature" as an example, this field is mainly used to extract specific information related to the nature of the lesion at the examination site from the text to be processed (report text). The extracted information can be called field data. For example, if the field is the name of the lesion, the specific field data could be tumor, inflammation, etc. The "Single Choice" option in Table 1 indicates that multiple options for this field can be provided in the structured template. For example, for the field named "Law Nature," the structured template can provide options such as "tumor" and "inflammation." In subsequent steps, the field data corresponding to the corresponding field can be extracted using a large language model. Assuming the corresponding field data is "tumor," the "tumor" option can be selected to obtain structured information. Through the nesting relationship of the corresponding fields, it can be seen that when the "tumor" option is selected, further extraction of field data is required from the field named "Benign / Malignant."

[0051] Then, the computing device can parse the structured template through the template parsing and target definition module to obtain parsing information (S306). The parsing information is used to represent the fields to be extracted contained in the structured template, the nesting relationships between the fields to be extracted, and the format constraint information corresponding to the fields to be extracted. Among them, the format constraint information is used to represent the format requirements of the field data obtained by extracting the fields to be extracted.

[0052] For example, in a structured report on rectal cancer, the following information regarding T staging needs to be extracted:

[0053] T installments {

[0054] Lesion localization {

[0055] Film folding condition;

[0056] Locate the tumor by referring to the distance from its lower margin to the anal verge;

[0057] };

[0058] lesion size {

[0059] size;

[0060] Lesion type {

[0061] Is it a T-type mass?

[0062] Oblique cross-section measurement;

[0063] Sagittal plane measurement (longitudinal diameter);

[0064] }

[0065] Is it intestinal wall infiltration type?

[0066] The thickest part of the intestinal wall is measured using an oblique cross-section.

[0067] Sagittal plane measurement (longitudinal diameter);

[0068] }

[0069] }

[0070] }

[0071] Degree of infiltration {

[0072] Installments;

[0073] }

[0074] }

[0075] In other words, the computing device can parse the structured template to determine what fields need to be extracted, the nesting relationship between the fields to be extracted, and the format constraints of the fields to be extracted (i.e., what the specific format of the extracted field data should be). This makes it easier for the computing device to extract the corresponding field data from the text to be processed, and to extract the field data according to the nesting relationship and format constraints, so that the extracted field data does not lack detailed information and that the extracted field data meets the format requirements.

[0076] Then, the computing device can generate prompts based on the text to be processed and the parsed information, and through the LLM targeted extraction module, determine the target structured information corresponding to the text to be processed based on the prompts and a large language model (S308). For example, based on the content to be extracted according to the T stage, the corresponding prompt could be: {The given image report is for rectal cancer; please extract the content regarding the T stage of rectal cancer from the images.}

[0077] In other words, after obtaining the parsed information, the computing device can generate prompts based on this parsed information and the text to be processed, guiding the large language model to extract structured information from the text. This allows the large language model to extract structured information from the text according to the corresponding prompts. Since the structured template has been parsed in the above steps, the obtained parsed information represents the structure and format of the data to be extracted as defined in the structured template. Therefore, the prompts generated according to this parsed information enable the large language model to extract information according to the structured template. The specific form of the parsed information will be illustrated with examples later.

[0078] The target structured information can refer to the structured report corresponding to the text to be processed (free text report) determined by a large language model.

[0079] Furthermore, the computing device can perform entity recognition on the text to be processed, obtain recognition results, and extract the relationships between entities based on the recognition results to determine the first entity combination in the text to be processed that has a preset logical relationship, the preset logical relationship including at least a nested relationship (S310).

[0080] The computing device can verify the target structured information based on the first entity combination with a preset logical relationship in the text to be processed and the field data with a preset logical relationship in the target structured information, and determine the structured output result corresponding to the text to be processed based on the verification result and the target structured information (S312).

[0081] In other words, the computing device performs structured extraction of the text to be processed using a large language model. After obtaining the target structured information, it can further verify the target structured information based on field data with preset logical relationships, such as nested relationships. The computing device can jointly perform entity recognition and relation extraction on the text to be processed using an entity recognition model and a relation extraction model to obtain the entities contained in the text to be processed and determine whether preset logical relationships, such as nested relationships, exist between the entities. Since the target structured information obtained by the computing device through structured extraction using the large language model in the aforementioned steps may contain field data with nested relationships, the accuracy of the target structured information can be verified based on the relationships between entities obtained after entity recognition and relation extraction of the text to be processed, and the matching of the nested relationships between field data in the target structured information. This further ensures the accuracy of the target structured information. Of course, the preset logical relationships can also include other logical relationships besides nested relationships.

[0082] As described in the background section, in existing technologies, structured extraction of report text typically involves pre-defining certain fields to be extracted from the report text. Then, information from these fields is extracted to obtain structured text. However, this method may miss some detailed information. For example, when the "nature of the lesion" is extracted as "tumor" from the report text, further detailed information related to "tumor" needs to be extracted, such as whether the tumor is benign or malignant, and the "tumor stage." Similarly, when "inflammation" is extracted from the report text, further detailed information such as "pathogen type" is required. Existing methods are prone to missing these details, resulting in insufficient accuracy and flexibility in structured extraction of report text.

[0083] Therefore, in this embodiment, the structured template can be parsed to extract the fields to be extracted (fields to be extracted), the nesting relationships between fields, and the format constraints of the fields (i.e., the format requirements for the extracted field data) defined in the structured template. Corresponding parsing information is then obtained. Prompt information is generated based on this parsing information, which enables the large language model to extract the text in a formatted manner according to the fields, nesting relationships, and format constraints defined in the structured template. Thus, the large language model can sequentially extract the text in a structured manner according to the nesting relationships and format constraints, obtaining target structured information without missing any details. Furthermore, this method further verifies the target structured information based on preset logical relationships through entity recognition and relationship extraction. Therefore, this method not only ensures that no detail information in the doctor's written report is missed but also guarantees the accuracy of the structured extraction.

[0084] Optionally, the operation of obtaining the structured template corresponding to the text to be processed includes: obtaining the dynamically updated structured template corresponding to the text to be processed; the operation of generating prompt information based on the text to be processed and the parsing information includes: if the structured template contains a combination of fields with nested relationships to be extracted, as determined by the parsing information, generating prompt information based on the text to be processed and the parsing information, wherein the prompt information includes a first prompt statement, which is used to prompt that when there is preset field data of the parent field in the field combination, the field data of the child field in the field combination needs to be extracted.

[0085] Optionally, the prompt message may also include a second prompt statement for prompting the extraction of field data for required fields, and a third prompt statement for prompting the extraction of field data for the corresponding fields to be extracted according to the format constraints.

[0086] Specifically, the computing device can obtain a dynamically updated structured template corresponding to the text to be processed. In this embodiment, the structured template can be continuously updated, that is, the fields to be extracted defined in the structured template can be updated (such as adding new fields), the format constraint information in the structured template can be updated (such as adding new format requirements), and the nesting relationship can be updated (such as adding a subordinate field to a field, or adding a sub-field to a field).

[0087] Therefore, the structured template acquired by the computing device can be the latest structured template of the text to be processed. The computing device can then parse the structured template to obtain parsing information and generate prompts based on this information. The parsing information can be a list of extraction targets for structured extraction. Taking the example shown in Table 1, the parsing information may include: "Required fields: nature of lesion, size; Conditional required fields: if nature of lesion = "tumor", then extract benign / malignant; if benign / malignant = "malignant", then extract TNM stage; Format requirements: the size field must be output as "major diameter (mm) × minor diameter (mm)". In other words, the parsing information is a list for information extraction (extraction target list), which indicates which information needs to be extracted according to the structured template and how this information should be extracted. The parsing information may include required fields, conditional required fields to be extracted based on nested relationships, and format constraints on the fields.

[0088] Then, the computing device needs to convert the parsed information into prompts that the large language model can understand. These prompts then enable the large language model to extract structured information from the text to be processed; in other words, the parsed information needs to be converted into natural language that the large language model can understand. Therefore, the computing device can generate corresponding prompts based on the text to be processed and the parsed information. These prompts are used to enable the large language model to extract structured information from the text to be processed according to the fields, nested logic (nested relationships), and format constraints defined in the structured template. As can be seen from the above example of parsed information, it can include required fields, conditionally required fields, and format requirement information.

[0089] The prompts may include a first prompt, a second prompt, and a third prompt. The first prompt instructs the large language model to extract more detailed field data according to nested relationships (i.e., extracting required fields based on nested relationships). The second prompt instructs the large language model to extract required fields. The third prompt instructs the large language model to extract field data according to format requirements. Required fields can refer to sub-fields within a nested field combination. For example, the lesion nature field and the benign / malignant field can be considered a nested field combination, where lesion nature is the parent field and benign / malignant is the child field. When the text to be processed contains lesion nature data of "tumor," the benign / malignant sub-field needs to be extracted (i.e., this benign / malignant sub-field is a required field).

[0090] For example, the prompt message could be: "Please extract the nature and size of the lesion from the report text (in the format of major diameter (mm) × minor diameter (mm); if the lesion is a tumor, please specify whether it is benign or malignant; if it is benign or malignant, please specify the TNM stage." Here is an example of the corresponding report text, which could be: "Left lower lobe lesion, approximately 30mm × 25mm in size, considered malignant, leaning towards adenocarcinoma."

[0091] The corresponding prompts are input into the large language model, allowing it to determine the basic structural information. Based on the example above, the basic structural information is: {lesion nature: tumor, size: 30mm × 25mm, benign / malignant: malignant}. Then, the computing device can verify the basic structural information using a bidirectional verification module (including medical logic verification and template adaptability verification), thereby determining whether adjustments (such as additions and modifications) to the basic structural information are needed through a dynamic completion and adjustment module.

[0092] Optionally, based on the prompt information, the operation of determining the target structured information corresponding to the text to be processed in the large language model includes: determining the basic structured information output by the large language model; performing medical logic verification on the basic structured information to obtain a first verification result, and performing template adaptability verification on the basic structured information to obtain a second verification result; adjusting the basic structured information through the large language model according to the first and second verification results to obtain adjusted structured information; and determining the target structured information according to the adjusted structured information.

[0093] The medical logic verification performed on the basic structured information can be used to check whether the extracted field data conforms to medical logical relationships and whether the corresponding fields conform to medical entities. For example, whether there is a medical correlation between the extracted field data "tumor," the size "30mm×25mm," and the benign / malignant status "malignant." If a correlation exists, it indicates that the extracted field data conforms to medical logic. Similarly, if the extracted fields "tumor," "30mm×25mm," and "malignant" conform to entity information (medical terms) defined in a pre-defined radiology rule base, it also indicates that the corresponding field data conforms to medical logic. The radiology rule base can refer to a knowledge base that defines multiple entities related to medical images and their corresponding medical terms.

[0094] Optionally, the operation of performing template adaptability verification on the basic structured information includes: determining whether the basic structured information includes required fields, determining whether the format of the field data in the basic structured information conforms to the corresponding format constraints, and determining whether to extract the corresponding conditional required fields according to the nesting relationship in the structured template, wherein the conditional required fields are the child fields in the corresponding field combination when there is preset field data of the parent field of the field combination in the text to be processed.

[0095] Template compatibility verification of basic structured information refers to whether the field data in the basic structured information includes all fields to be extracted as defined in the structured template (including required fields and conditionally required fields), whether it conforms to the format requirements (format constraint information) of the structured template, and whether the corresponding field data has been extracted according to the nested logic. Among them, required fields can refer to the first-level fields in the structured template shown in Table 1.

[0096] Specifically, template adaptability verification of basic structured information includes: determining whether the basic structured information includes field data of required fields, and determining whether the format of field data with format constraint information (which is obtained from the structured template) conforms to the corresponding format constraint information, and determining whether the corresponding conditional required fields are extracted according to the nesting relationship (nesting logic) in the structured template (e.g., when "benign malignancy = malignancy", whether the corresponding third-level field "TNM staging" field data is extracted). That is, the large language model has extracted the corresponding preset field data for the parent field in the field combination (field combination with nested relationship), and the computing device continues to determine whether the large language model has extracted the corresponding child field (conditional required field) field data.

[0097] After completing medical logic verification and template compatibility verification, missing information in the basic structured information can be identified. Missing information refers to required fields and conditionally required fields that have not been extracted from the basic structured information. It can also be determined whether there is any anomalous information in the basic structured information. Anomalous information indicates specific locations in the basic structured information that do not conform to medical logic verification or format constraints. Missing information and anomalous information (provided if present, not provided if absent) can be provided to the large language model, allowing the large language model to readjust the basic structured information according to the text to be processed and the structured template, resulting in adjusted structured information. This adjustment can refer to the large language model modifying the format, supplementing missing information, etc. If the original text to be processed does not contain the corresponding required or conditionally required fields, the large language model can directly provide a prompt stating that "a certain required or conditionally required field is missing in the original text."

[0098] Furthermore, for example, after the computing device provides the free text report and the missing information obtained after verifying the basic structural information to the large language model, the large language model finds that the free text report does not mention the corresponding missing information, generates a completion prompt "Please supplement TNM staging (not mentioned in the original text)", and retains "prone to adenocarcinoma" in the original report text as supplementary explanation, thereby ensuring that important information in the free text report is not lost. Then the large language model can output the adjusted entity set: {lesion nature: tumor, size: 30mm×25mm, benign / malignant: malignant, TNM staging: to be supplemented (not mentioned in the original text), supplementary explanation: prone to adenocarcinoma}.

[0099] Optionally, the method further includes: obtaining training samples based on a structured template, wherein the training samples are determined by the structured template, and the training samples include a first training sample and a second training sample, wherein the first training sample is determined by fields and corresponding field data in the structured template, and the second training sample is determined by a combination of fields with preset logical relationships and a combination of fields without preset logical relationships in the structured template; performing supervised training on the entity recognition model based on the first training sample, and performing supervised training on the relation extraction model based on the second training sample.

[0100] As mentioned above, the first entity combination determined by the entity recognition model and relation extraction model can be used to further verify the target structured information extracted by LLM, thereby ensuring the accuracy of the target structured information and guaranteeing that no fields with nested or contextual relationships are omitted. (Reference) Figure 4 As shown, Figure 4 The document illustrates the process of identifying entities contained in the text to be processed and determining the relationships between entities.

[0101] First, the computing device needs to perform supervised training on the entity recognition model and the relation extraction model beforehand. The entity recognition model is used to identify entities in the text to be processed that are related to the structured template, and the relation extraction model is used to determine whether there are preset logical relationships between the entities identified by the entity recognition model. In this embodiment, the preset logical relationship can refer to a nested relationship or... Figure 5A The contextual relationships are shown below. Nesting relationships have already been explained above; please refer to [reference needed]. Figure 5A As shown, since imaging reports typically contain two parts: imaging findings and diagnostic conclusions, therefore, refer to... Figure 5A The structured template shown also contains structured information for these two parts respectively. Based on this, the contextual relationship in this embodiment means that the field data in the two fields corresponding to image findings and diagnostic conclusions should be consistent, such as... Figure 5A The selected field data in the invasion degree field of the structured report is "T3b: tumor breaks through the muscle layer", and the corresponding diagnostic opinion also includes the field data "T3b", indicating a consistent relationship between the two fields.

[0102] In this embodiment, for example, for a given predefined logical relationship, a corresponding relationship extraction model can be trained to determine whether the predefined logical relationship exists between two entities. That is, one relationship extraction model can be trained to determine whether a nested relationship exists between two entities, and another relationship extraction model can be trained to determine whether a contextual relationship exists between two entities. In this case, it is equivalent to obtaining two binary classification models. Alternatively, a unified relationship extraction model can be used to determine entities with nested relationships and entities with contextual relationships; in this case, the relationship extraction model is equivalent to a multi-classification model.

[0103] Therefore, the training samples for training the entity recognition model and the relation extraction model are obtained through structured templates. For the entity recognition model, the first training sample can be obtained through the fields and field data in the structured template. The fields correspond to the entity types that the entity recognition model needs to output, and the field data corresponds to the input of the entity recognition model. Furthermore, the input of the entity recognition model can also include the complete text to be processed. For the relation extraction model, the second training sample can be obtained through the nested relationships in the structured template. The second training sample contains sample data and annotation information. The sample data can include two entities and their corresponding entity types. The annotation information indicates whether there is a nested relationship between the two entities and whether there is a contextual relationship between them. Since the entity and field data are consistent, the annotation information in the second training sample can be directly determined through the structured template.

[0104] Then, the entity recognition model can be trained in a supervised manner using the first training sample, enabling it to identify entities present in the structured template of the text to be processed. Similarly, the relation extraction model can be trained in a supervised manner using the second training sample, enabling it to identify whether nested relationships or contextual relationships exist between entities.

[0105] Optionally, the operation of performing entity recognition on the text to be processed to obtain recognition results, and extracting relationships between entities based on the recognition results to determine the first entity combination with nested relationships in the text to be processed includes: identifying entities in the text to be processed through an entity recognition model, and identifying whether there is a preset logical relationship between every two entities in the text to be processed through a relationship extraction model to obtain relationship extraction results; determining the first entity combination with preset logical relationships in the text to be processed based on the relationship extraction results; and verifying the target structured information based on the first entity combination with preset logical relationships in the text to be processed and the field data with preset logical relationships in the target structured information, including: determining that the target structured information passes verification if the first entity combination and the field data with nested relationships match.

[0106] Taking a nested logical relationship as an example, specifically, during the verification of the target structured information using an entity recognition model and a relation extraction model, the computing device can identify the entities contained in the free text report (i.e., the text to be processed) and their corresponding entity types using the entity recognition model, and pair the entities together. The relation extraction model then determines whether a nested relationship exists between any two entities. Finally, the relation extraction results from the relation extraction model are used to verify the target structured information. That is, if the first entity combination with a nested relationship matches any pair of nested field data in the target structured information, the target structured information is considered to have passed the verification. Similarly, when the preset logical relationship is a contextual relationship, after the computing device identifies the entities contained in the free text report and their corresponding types, it can use the relation extraction model to determine whether a contextual relationship exists between any two entities. If a contextual relationship exists between two entities, these two entities are considered the first entity combination with a contextual relationship, and it is determined whether they match any pair of contextual field data in the target structured information. If so, the target structured information is considered to have passed the verification.

[0107] For example, if the entity recognition model identifies the entities "tumor" and "malignant" in a free text report, and determines that the entity type of "tumor" is a lesion type, and the entity type of "malignant" is benign or malignant, then the relation extraction model identifies whether there is a nested relationship between the "tumor" and "malignant" entities, confirming that a nested relationship exists between the two entities. Thus, the "tumor" and "malignant" entities can be considered a first entity combination. The computing device can input the "tumor" entity and its corresponding entity type "lesion type," as well as the "malignant" entity and its corresponding entity type "benign or malignant," into the relation extraction model to determine whether a nested relationship exists between the two entities. Then, based on the target structured information, the computing device can determine that there is a nested relationship between the fields "tumor" and "malignant" in the target structured information. Therefore, in this example, the corresponding first entity combination matches a pair of field data in the target structured information. If no other first entity combination exists in the text to be processed, the target structured information passes the verification. Of course, if there are other first entity combinations in the text to be processed, it is necessary to further determine whether there are field data in the target structured information that match other first entity combinations and have a preset logical relationship.

[0108] If the target structured information fails this verification (i.e., fails the joint verification of the entity recognition model and the relation extraction model), the verification result can be input into the large language model, so that the large language model can adjust the target structured information and supplement the corresponding field data with nested or contextual relationships.

[0109] The relationship between the text to be processed (report text), the structured template, and the structured output is as follows: Figure 5B As shown. Among them, Figure 5B The image shows how free text reports (i.e., the text to be processed), structured templates, and structured reports (i.e., structured output results) are displayed to the user on an electronic screen. This is for ease of use... Figure 5B The display effects of the free text report, structured template, and structured report are all shown, but only a portion of the content of each is displayed.

[0110] Compared with the prior art, the present invention has the following advantages:

[0111] 1. Dynamic template adaptability: Through template parsing and targeted extraction, it can adapt to more than 95% of dynamically updated templates (such as adding fields or modifying formats) without retraining the model (no need to retrain the large language model).

[0112] 2. Precise handling of nested logic: The accuracy of nested field filling is ≥90%, avoiding omissions (such as tumor staging) or misfilling (such as filling in the staging of inflammatory lesions).

[0113] 3. Information integrity guarantee: While meeting the template requirements, important information not covered by the template fields in the free text report (such as "prone to adenocarcinoma") is retained through the "Supplementary Notes" field, with an information retention rate of ≥98%;

[0114] 4. Improved format standardization: The template format compliance rate has been increased from 70% to 99% of the existing technology, reducing manual correction costs.

[0115] The hardware used in this method can be: Intel Xeon E5-2690 processor, 64GB memory, and NVIDIA RTX 3090 graphics card. On the software level, a new template parsing engine (based on an XML / JSON parsing library) is added, and the prompting module supports dynamically generating nested logic prompts. The dynamic template set used in this method contains structured templates for 10 types of imaging examinations (CT / MRI / DR, etc.), with 5-10 versions for each type of template (simulating dynamic updates), and a maximum nesting level of 3 levels. The nested logic rule base stores 200 nested dependency relationships (e.g., "Examination type = Enhanced CT → Enhancement method required"). The test data includes 2000 free text reports, covering scenarios of field differences before and after the structured template updates.

[0116] In addition, refer to Figure 1 As shown, according to a second aspect of this embodiment, a storage medium is provided. The storage medium includes a stored program, wherein, when the program is executed, a processor performs any of the methods described above.

[0117] Therefore, according to the technical solution of this embodiment, the structured template can be parsed to extract the fields to be extracted (fields to be extracted), the nesting relationships between fields, and the format constraints of the fields (i.e., the format requirements for the extracted field data) defined in the structured template. Corresponding parsing information is obtained. Then, prompt information can be generated according to the parsing information. The prompt information is used to enable the large language model to extract the text to be processed in a formatted manner according to the fields, nesting relationships, and format constraints defined in the structured template. Thus, the large language model can sequentially extract the text to be processed in a structured manner according to the nesting relationships and format constraints through the prompt information, obtaining target structured information without missing any details. Furthermore, this method also identifies entities with nested relationships and entities with contextual relationships in the text to be processed through entity recognition and relationship extraction to further verify the target structured information. Therefore, the structured extraction using this method not only ensures that no details in the doctor's written report text are missed, but also guarantees the accuracy of the structured extraction.

[0118] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0119] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0120] Example 2

[0121] Figure 6 A structured information extraction apparatus 600 for image reports according to this embodiment is shown, which corresponds to the method described according to the first aspect of Embodiment 1. (See also:) Figure 6As shown, the structured information extraction device includes: a text acquisition module 610, used to acquire the text to be processed, which is the report text of a medical imaging report filled out by a doctor; a template acquisition module 620, used to acquire the structured template corresponding to the text to be processed; a parsing module 630, used to parse the structured template to obtain parsing information, which represents the fields to be extracted contained in the structured template, the nesting relationship between the fields to be extracted, and the format constraint information corresponding to the fields to be extracted; and a generation module 640, used to generate prompt information based on the text to be processed and the parsing information, and based on the prompt information and a large language model, determine the relationship between the text to be processed and the data. The corresponding target structured information; the relationship extraction module 650 is used to perform entity recognition on the text to be processed, obtain recognition results, and extract the relationship between entities based on the recognition results to determine the first entity combination in the text to be processed that has a preset logical relationship, the preset logical relationship including at least nested relationships; and the result output module 660 is used to verify the target structured information based on the first entity combination in the text to be processed that has a preset logical relationship and the field data in the target structured information that has a preset logical relationship, obtain the verification result, and determine the structured output result corresponding to the text to be processed based on the verification result and the target structured information.

[0122] Optionally, the template acquisition module 620 is used to acquire a dynamically updated structured template corresponding to the text to be processed; the generation module 640 is used to generate prompt information based on the text to be processed and the parsing information when it is determined from the parsing information that the structured template contains a field combination with a nested relationship. The prompt information includes a first prompt statement, which is used to prompt that when the text to be processed contains preset field data of the parent field of the field combination, the field data of the child field in the field combination needs to be extracted.

[0123] Optionally, the prompt message may also include a second prompt statement for prompting the extraction of field data for required fields, and a third prompt statement for prompting the extraction of field data for the corresponding fields to be extracted according to the format constraints.

[0124] Optionally, the generation module 640 is used to determine the basic structured information output by the large language model; perform medical logic verification on the basic structured information to obtain a first verification result, and perform template adaptability verification on the basic structured information to obtain a second verification result; adjust the basic structured information through the large language model according to the first verification result and the second verification result to obtain adjusted structured information; and determine the target structured information according to the adjusted structured information.

[0125] Optionally, the generation module 640 is used to determine whether the basic structured information includes required fields, whether the format of the field data in the basic structured information conforms to the corresponding format constraints, and whether to extract the corresponding conditional required fields according to the nesting relationship in the structured template. The conditional required fields are the child fields in the corresponding field combination when there is preset field data of the parent field of the field combination in the text to be processed.

[0126] Optionally, the device further includes: a training module 670, used to obtain training samples based on a structured template, wherein the training samples are determined by the structured template, and the training samples include a first training sample and a second training sample. The first training sample is determined by fields and corresponding field data in the structured template, and the second training sample is determined by field combinations with preset logical relationships and field combinations without preset logical relationships in the structured template; supervised training of the entity recognition model based on the first training sample, and supervised training of the relation extraction model based on the second training sample; a relation extraction module 650, used to identify entities in the text to be processed through the entity recognition model, and to identify whether there is a preset logical relationship between every two entities in the text to be processed through the relation extraction model, thereby obtaining a relation extraction result; and determine a first entity combination in the text to be processed that has a preset logical relationship based on the relation extraction result; and a result output module 660, used to determine that the target structured information passes verification if the first entity combination matches the field data with the preset logical relationship.

[0127] Therefore, according to the technical solution of this embodiment, the structured template can be parsed to extract the fields to be extracted (fields to be extracted), the nesting relationships between fields, and the format constraints of the fields (i.e., the format requirements for the extracted field data) defined in the structured template. Corresponding parsing information is obtained. Then, prompt information can be generated according to the parsing information. The prompt information is used to enable the large language model to extract the text to be processed in a formatted manner according to the fields, nesting relationships between fields, and format constraints defined in the structured template. Thus, the large language model can sequentially extract the text to be processed in a structured manner according to the nesting relationships and format constraints through the prompt information, obtaining target structured information without missing any details. Furthermore, entity recognition and relationship extraction are used to identify entities with nested relationships and entities with contextual relationships in the text to be processed, further verifying the target structured information. Therefore, by performing structured extraction, not only can no detailed information in the doctor's written report be missed, but the accuracy of structured extraction can also be guaranteed.

[0128] Example 3

[0129] Figure 7 A structured information extraction apparatus 700 according to this embodiment is shown, which corresponds to the method described according to the first aspect of Embodiment 1. (See reference...) Figure 6 As shown, the structured information extraction device includes: a processor 710; and a memory 720 connected to the processor 710, used to provide the processor 710 with instructions to process the following steps: acquiring text to be processed; acquiring a structured template corresponding to the text to be processed; parsing the structured template to obtain parsing information, the parsing information being used to represent the fields to be extracted contained in the structured template, the nesting relationships between the fields to be extracted, and the format constraint information corresponding to the fields to be extracted; generating prompt information based on the text to be processed and the parsing information, and determining the target structured information corresponding to the text to be processed based on the prompt information and a large language model; performing entity recognition on the text to be processed to obtain recognition results, and extracting relationships between entities based on the recognition results to determine a first entity combination in the text to be processed that has a preset logical relationship; and verifying the target structured information based on the first entity combination in the text to be processed that has a preset logical relationship and the field data in the target structured information that has a preset logical relationship, obtaining verification results, and determining the structured output result corresponding to the text to be processed based on the verification results and the target structured information.

[0130] Optionally, the operation of obtaining the structured template corresponding to the text to be processed includes: obtaining the dynamically updated structured template corresponding to the text to be processed; the operation of generating prompt information based on the text to be processed and the parsing information includes: if the structured template contains a field combination with a nested relationship as determined by the parsing information, generating prompt information based on the text to be processed and the parsing information, wherein the prompt information contains a first prompt statement, which is used to prompt that when the text to be processed contains preset field data of the parent field of the field combination, the field data of the child field in the field combination needs to be extracted.

[0131] Optionally, the prompt message may also include a second prompt statement for prompting the extraction of field data for required fields, and a third prompt statement for prompting the extraction of field data for the corresponding fields to be extracted according to the format constraints.

[0132] Optionally, the operation of determining the target structured information corresponding to the text to be processed based on the large language model, through prompt information, includes: determining the basic structured information output by the large language model; performing medical logic verification on the basic structured information to obtain a first verification result, and performing template adaptability verification on the basic structured information to obtain a second verification result; adjusting the basic structured information through the large language model based on the first and second verification results to obtain adjusted structured information; and determining the target structured information based on the adjusted structured information.

[0133] Optionally, the operation of performing template adaptability verification on the basic structured information includes: determining whether the basic structured information includes required fields, determining whether the format of the field data in the basic structured information conforms to the corresponding format constraints, and determining whether to extract the corresponding conditional required fields according to the nesting relationship in the structured template, wherein the conditional required fields are the child fields in the corresponding field combination when there is preset field data of the parent field of the field combination in the text to be processed.

[0134] Optionally, the memory 720 is further configured to provide the processor 710 with instructions for processing the following steps: obtaining training samples based on a structured template, wherein the training samples are determined by the structured template and include a first training sample and a second training sample, wherein the first training sample is determined by fields and corresponding field data in the structured template, and the second training sample is determined by combinations of fields with preset logical relationships and combinations of fields without preset logical relationships in the structured template; performing supervised training on an entity recognition model based on the first training sample and on a relation extraction model based on the second training sample; performing entity recognition on the text to be processed to obtain recognition results, and performing entity identification based on the recognition results. The operation of extracting relationships between entities and determining the first entity combination in the text to be processed that has a preset logical relationship includes: identifying entities in the text to be processed through an entity recognition model, and identifying whether there is a preset logical relationship between every two entities in the text to be processed through a relationship extraction model, thereby obtaining a relationship extraction result; determining the first entity combination in the text to be processed that has a preset logical relationship based on the relationship extraction result; and verifying the target structured information based on the first entity combination in the text to be processed that has a preset logical relationship and the field data in the target structured information that has a preset logical relationship, including: determining that the target structured information passes the verification if the first entity combination and the field data with a preset logical relationship match.

[0135] Therefore, according to the technical solution of this embodiment, the structured template can be parsed to extract the fields to be extracted (fields to be extracted), the nesting relationships between fields, and the format constraints of the fields (i.e., the format requirements for the extracted field data) defined in the structured template. Corresponding parsing information is obtained. Then, prompt information can be generated according to the parsing information. The prompt information is used to enable the large language model to extract the text to be processed in a formatted manner according to the fields, nesting relationships between fields, and format constraints defined in the structured template. Thus, the large language model can sequentially extract the text to be processed in a structured manner according to the nesting relationships and format constraints through the prompt information, obtaining target structured information without missing any details. Furthermore, entity recognition and relationship extraction are used to identify entities with nested relationships and contextual relationships in the text to be processed, further verifying the target structured information. Therefore, by performing structured extraction, not only can no detailed information in the doctor's written report be missed, but the accuracy of structured extraction can also be guaranteed.

[0136] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0137] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0138] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0139] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0140] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0141] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0142] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method of structured information extraction for imaging reports, the method comprising: The method comprises the following steps: obtaining a to-be-processed text, wherein the to-be-processed text is a report text of a medical image report filled by a doctor; obtaining a structured template corresponding to the to-be-processed text; parsing the structured template to obtain parsing information, wherein the parsing information is used to represent a to-be-extracted field contained in the structured template, a nested relationship between the to-be-extracted fields, and format constraint information corresponding to the to-be-extracted fields; generating prompt information according to the to-be-processed text and the parsing information, and determining target structured information corresponding to the to-be-processed text based on a large language model according to the prompt information; performing entity recognition on the to-be-processed text to obtain a recognition result, and performing relationship extraction between entities according to the recognition result to determine a first entity combination having a preset logical relationship in the to-be-processed text, wherein the preset logical relationship at least includes a nested relationship; and verifying the target structured information according to the first entity combination having the preset logical relationship in the to-be-processed text and field data having the preset logical relationship in the target structured information to obtain a verification result, and determining a structured output result corresponding to the to-be-processed text according to the verification result and the target structured information.

2. The method of claim 1, wherein, The operation of obtaining the structured template corresponding to the to-be-processed text comprises: obtaining a dynamically updated structured template corresponding to the to-be-processed text; The operation of generating prompt information according to the to-be-processed text and the parsing information comprises: in a case where it is determined according to the parsing information that the structured template contains a field combination having a nested relationship, generating prompt information according to the to-be-processed text and the parsing information, wherein the prompt information contains a first prompt sentence, and the first prompt sentence is used to prompt that field data of a child field in the field combination needs to be extracted in a case where the to-be-processed text contains preset field data of a parent field of the field combination.

3. The method according to claim 1 or 2, characterized in that, The prompt information further includes a second prompt sentence used to prompt extraction of field data of a mandatory field, and a third prompt sentence used to prompt extraction of field data of a corresponding to-be-extracted field according to the format constraint information.

4. The method of claim 1, wherein, The operation of determining the target structured information corresponding to the to-be-processed text based on the large language model through the prompt information comprises: determining basic structured information output by the large language model; performing medical logic verification on the basic structured information to obtain a first verification result, and performing template adaptability verification on the basic structured information to obtain a second verification result; adjusting the basic structured information through the large language model according to the first verification result and the second verification result to obtain adjusted structured information; determining the target structured information according to the adjusted structured information.

5. The method of claim 4, wherein, The operation of performing template adaptability verification on the basic structured information comprises: Determine whether the mandatory field is included in the basic structured information, and determine whether the format of the field data in the basic structured information conforms to the corresponding format constraint information, and according to the nesting relationship in the structured template, determine whether to extract the corresponding conditional mandatory field according to the corresponding nesting relationship, wherein the conditional mandatory field is a child field in a field combination when the parent field of the field combination has preset field data in the to-be-processed text.

6. The method of claim 1, wherein, The method further comprises: According to the structured template, obtain training samples, which are determined by the structured template, and the training samples include first training samples and second training samples, the first training samples are determined by the fields in the structured template and the corresponding field data, and the second training samples are determined by the field combinations with the preset logical relationship and the field combinations without the preset logical relationship in the structured template; According to the first training samples, the entity recognition model is supervised trained, and according to the second training samples, the relationship extraction model is supervised trained; The operation of performing entity recognition on the to-be-processed text to obtain an identification result, and performing relationship extraction between entities according to the identification result to determine a first entity combination with a preset logical relationship in the to-be-processed text, comprises: Identify the entities in the to-be-processed text through the entity recognition model, and identify whether each two entities in the to-be-processed text have a preset logical relationship through the relationship extraction model to obtain a relationship extraction result; According to the relationship extraction result, determine the first entity combination with the preset logical relationship in the to-be-processed text; According to the first entity combination with the preset logical relationship in the to-be-processed text and the field data with the preset logical relationship in the target structured information, the operation of verifying the target structured information, comprises: In a case where it is determined that the first entity combination and the field data with the preset logical relationship match, it is determined that the target structured information passes the verification.

7. A storage medium, characterized by The storage medium comprises a stored program, wherein the program is executed by the processor when the program is executed.

8. A structured information extraction device for image reports, characterized in that, Comprise: A text acquisition module is configured to acquire a to-be-processed text, wherein the to-be-processed text is a report text of a medical image report. A template acquisition module is configured to acquire a structured template corresponding to the to-be-processed text. An analysis module is configured to analyze the structured template to obtain analysis information, wherein the analysis information is used to represent to-be-extracted fields in the structured template, nesting relationships between the to-be-extracted fields, and format constraint information corresponding to the to-be-extracted fields. A generation module is configured to generate prompt information according to the to-be-processed text and the analysis information, and determine target structured information corresponding to the to-be-processed text based on a large language model according to the prompt information. The relationship extraction module is configured to perform entity recognition on the to-be-processed text to obtain a recognition result, perform relationship extraction between entities according to the recognition result, and determine a first entity combination in which a preset logical relationship exists in the to-be-processed text, the preset logical relationship at least including a nested relationship. The result output module is configured to verify the target structured information according to the first entity combination in which the preset logical relationship exists in the to-be-processed text and field data having the preset logical relationship in the target structured information, obtain a verification result, and determine a structured output result corresponding to the to-be-processed text according to the verification result and the target structured information. The template acquisition module is configured to acquire a dynamically updated structured template corresponding to the to-be-processed text, and the generation module is configured to generate prompt information according to the to-be-processed text and the analysis information in a case where the structured template contains a field combination in which a nested relationship exists, the prompt information containing a first prompt statement, the first prompt statement being used to prompt that field data of a child field in the field combination needs to be extracted in a case where preset field data of a parent field of the field combination exists in the to-be-processed text.

9. The apparatus of claim 8, wherein, The processor and the memory connected with the processor are configured to provide the processor with instructions for processing the following processing steps:

10. A structured information extraction device for image reports, characterized in that, acquiring a to-be-processed text, the to-be-processed text being a report text of a medical image report; acquiring a structured template corresponding to the to-be-processed text; performing analysis on the structured template to obtain analysis information, the analysis information being used to indicate a to-be-extracted field contained in the structured template, a nested relationship between to-be-extracted fields, and format constraint information corresponding to the to-be-extracted fields; generating prompt information according to the to-be-processed text and the analysis information, and determining target structured information corresponding to the to-be-processed text based on a large language model according to the prompt information; performing entity recognition on the to-be-processed text to obtain a recognition result, performing relationship extraction between entities according to the recognition result, and determining a first entity combination in which a preset logical relationship exists in the to-be-processed text, the preset logical relationship at least including a nested relationship; and verifying the target structured information according to the first entity combination in which the preset logical relationship exists in the to-be-processed text and field data having the preset logical relationship in the target structured information, obtaining a verification result, and determining a structured output result corresponding to the to-be-processed text according to the verification result and the target structured information. ​ ​ ​ ​

Citation Information

Patent Citations

  • Electronic medical record free text analysis method, system and equipment

    CN120821854A

  • Image text report quality control method and system based on LLM and structured report

    CN120913738A