Medical expense list information extraction method and related device

By combining document parsing technology and large models with domain-specific instructions, we have achieved efficient and accurate conversion of medical expense list information extraction, solving the problems of weak generalization ability and high cost in existing technologies, and generating a structured data table with a unified format and high reliability.

CN121560889APending Publication Date: 2026-02-24太保科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511961427.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing technologies have poor generalization ability and insufficient robustness in extracting medical expense list information, and their expansion and maintenance costs are high.

Method used

By accurately extracting the expense details area through document parsing technology, and combining it with a large model and preset domain-specific instructions to perform unstructured data transformation and standard semantic mapping of header fields, a structured data table is generated.

Benefits of technology

It improves the robustness of complex layouts, reduces expansion and maintenance costs, and ensures the consistency and accuracy of structured outputs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121560889A_ABST
    Figure CN121560889A_ABST
Patent Text Reader

Abstract

The invention discloses a medical expense list information extraction method and a related device. When the method provided by the embodiment of the invention is executed, firstly, a to-be-processed medical cost list picture can be obtained, and a cost detail area in the medical cost list picture is intercepted through a document analysis technology; and converting the unstructured data in the expense detail area into a regular expense list data table based on the rank logic structure of the expense detail area, and performing non-detail data row filtering on the expense list data table to obtain a filtered data table. And performing standard semantic mapping and replacement on header fields corresponding to detail data lines in the filtered data table through a preset field special instruction in combination with the large model to obtain a standard structured data table. According to the method, the defects of a traditional scheme in long text processing are effectively avoided, the method has high adaptability to complex layout, the generalization ability of information extraction is improved, and the extension and maintenance cost in information extraction is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, specifically to a method and related apparatus for extracting information from a medical expense list. Background Technology

[0002] In extracting information from medical claim expense lists, the most representative technology currently is a fine-tuning approach combining Optical Character Recognition (OCR) and pre-trained models (such as BERT). This approach first uses an OCR module to extract text and its location information, then integrates this text and location information into a multimodal feature representation using a pre-trained model, and finally achieves entity recognition by fine-tuning the sequence annotation head. However, this approach suffers from poor generalization ability, insufficient robustness to long and complex texts, and high costs for expansion and maintenance. Summary of the Invention

[0003] To address the aforementioned issues, this application provides a method and related apparatus for extracting information from medical expense lists. This method can improve the robustness and generalization ability of medical expense lists during the information extraction process, and also significantly reduce the costs of expansion and maintenance, providing an efficient and reliable solution for extracting information from medical expense lists.

[0004] The embodiments of this application disclose the following technical solutions:

[0005] A method for extracting information from a medical expense list, the method comprising:

[0006] Obtain the image of the medical expense list to be processed; the data in the medical expense list image is unstructured data;

[0007] The detailed expense area of ​​the medical expense list image is extracted using document parsing technology; the detailed expense area includes all chargeable items and their amounts.

[0008] Based on the row and column logical structure of the expense details area, the unstructured data in the expense details area is converted into a regular expense list data table;

[0009] The expense list data table is filtered for non-detailed data rows to obtain a filtered data table;

[0010] By combining the large model and using preset domain-specific instructions, the header fields corresponding to the detailed data rows in the filtered data table are mapped and replaced using standard semantics to obtain a standard structured data table.

[0011] In one possible implementation, the large model is combined with pre-defined domain-specific instructions to perform standard semantic mapping and replacement on the header fields corresponding to the detailed data rows in the filtered data table, resulting in a standard structured data table, including:

[0012] Classify all header fields corresponding to the detailed data in the filtered data table to obtain a set of ambiguous fields and a set of unambiguous fields;

[0013] For each ambiguous field in the ambiguous field set, all fields in the column where the ambiguous field is located in the filtered data table are used as context information as input, and the domain-specific instructions are used to guide the large model to identify the standard structured field of the ambiguous field.

[0014] For each unambiguous field in the unambiguous field set, the unambiguous field is used as direct input, and the domain-specific instructions are used to guide the large model to identify the standard structured field of the unambiguous field.

[0015] Based on the standard structured fields corresponding to each ambiguous field and the standard structured fields corresponding to each unambiguous field, the fields included in the non-detailed data rows of the filtered data table are replaced at the corresponding positions to obtain the standard structured data table.

[0016] In one possible implementation, the method further includes:

[0017] If the large model cannot recognize the standard structured field of the ambiguous field, then the standard structured field of the ambiguous field is marked as empty.

[0018] In one possible implementation, the step of converting the unstructured data in the expense detail area into a regular expense list data table based on the row-column logical structure of the expense detail area includes:

[0019] Extracting field information from the cost details area yields multiple data fields;

[0020] The multiple data fields are organized and associated according to the row and column logical structure of the expense details area to obtain the expense list data table.

[0021] In one possible implementation, non-detailed data rows include summary rows and / or remarks rows.

[0022] A medical expense list information extraction device, the device comprising:

[0023] The acquisition unit is used to acquire images of medical expense lists to be processed; the data in the medical expense list images is unstructured data.

[0024] The cropping unit is used to crop the expense details area in the medical expense list image; the expense details area includes all chargeable items and their amounts.

[0025] The conversion unit is used to convert the unstructured data in the expense details area into a regular expense list data table based on the row and column logical structure of the expense details area.

[0026] The filtering unit is used to filter the non-detailed data rows of the expense list data table to obtain a filtered data table.

[0027] The mapping and replacement unit is used to combine the large model and, through preset domain-specific instructions, perform standard semantic mapping and replacement on the header fields corresponding to the detailed data rows in the filtered data table to obtain a standard structured data table.

[0028] In one possible implementation, the mapping replacement unit specifically includes:

[0029] A field classification unit is used to classify all fields in the non-detailed data rows to obtain a set of ambiguous fields and a set of unambiguous fields.

[0030] The ambiguous field processing unit is used to take all fields of the column where the ambiguous field is located in the filtered data table as context information as input for each ambiguous field in the ambiguous field set, and combine the domain-specific instructions to guide the large model to identify the standard structured field of the ambiguous field.

[0031] The unambiguous field processing unit is used to take each unambiguous field in the unambiguous field set as direct input and combine it with the domain-specific instructions to guide the large model to identify the standard structured field of the unambiguous field.

[0032] The replacement unit is used to replace the fields in the non-detailed data rows of the filtered data table at the corresponding positions based on the standard structured fields corresponding to each ambiguous field and the standard structured fields corresponding to each unambiguous field, so as to obtain the standard structured data table.

[0033] In one possible implementation, the conversion unit specifically includes:

[0034] The extraction unit is used to extract field information from the cost details area to obtain multiple data fields;

[0035] The processing unit is used to organize and associate the multiple data fields according to the row and column logical structure of the expense details area to obtain the expense list data table.

[0036] A medical expense list information extraction device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the medical expense list information extraction method as described above.

[0037] A computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the medical expense list information extraction method as described above.

[0038] Compared with the prior art, this application has the following beneficial effects:

[0039] This application provides a method and related apparatus for extracting information from medical expense lists. Specifically, when executing the information extraction method for medical expense lists provided in this application embodiment, an image of the unstructured medical expense list to be processed can first be obtained. Next, a detailed expense area including all chargeable items and their amounts is extracted from the medical expense list image using document parsing technology. Based on the row and column logical structure of the detailed expense area, the unstructured data in the detailed expense area is converted into a regular expense list data table. Then, the expense list data table is filtered for non-detailed data rows to obtain a filtered data table. Combined with a large model, and using preset domain-specific instructions, the header fields corresponding to the detailed data rows in the filtered data table are subjected to standard semantic mapping and replacement to obtain a standard structured data table. This application accurately extracts the detailed expense area and restores the row and column logical structure through document parsing technology, converting unstructured data into a regular data table. This fundamentally avoids the recognition errors caused by context length limitations in long text processing, while also eliminating excessive reliance on OCR position detection accuracy and significantly improving robustness to complex layouts. Furthermore, by leveraging the deep semantic understanding capabilities of large models and pre-defined domain-specific instructions, standard semantic mapping of header fields can be achieved. There is no need to fine-tune the model for specific layouts; simply adjusting the instructions is sufficient to adapt to new layouts or header variations. This not only solves the problem of weak generalization ability in traditional solutions but also avoids the high costs associated with continuous data annotation and model fine-tuning, significantly reducing the difficulty of expansion and maintenance while ensuring the consistency and accuracy of structured output. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings used in the description of the embodiment or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1A flowchart illustrating a method for extracting information from a medical expense list, as provided in this application embodiment;

[0042] Figure 2 A flowchart illustrating a field semantic mapping and field replacement method provided in this application embodiment;

[0043] Figure 3 This is a schematic diagram of a medical expense list information extraction device provided in an embodiment of this application. Detailed Implementation

[0044] To facilitate understanding of the technical solutions provided in the embodiments of this application, the background technology involved in the embodiments of this application will be described below.

[0045] In the scenario of extracting information from medical claim expense lists, the most representative existing technology is a fine-tuning scheme combining OCR with pre-trained models such as BERT. Its core process is as follows: first, the OCR module extracts the text and corresponding location coordinates from the document; then, the pre-trained model is used as an encoder to fuse the text and location information to generate a multimodal feature representation; finally, entity recognition is completed by fine-tuning the sequence annotation head. However, this scheme has significant drawbacks:

[0046] First, the generalization ability is poor. The model is essentially learning the fixed mapping relationship between specific formats and header descriptions (such as "self-funded amount" and "self-paid amount") in the training set. It is easy to fail to recognize new formats or header variations that have not been seen before.

[0047] Secondly, it lacks robustness to long texts and texts with complex layouts. When processing lengthy lists, it is limited by the length of the model context, which can easily lead to problems such as failure of long-distance dependency modeling and disordered recognition of subsequent content. The existing improved scheme that associates vertical content by locating the table header is extremely dependent on the accuracy of OCR position detection. For images with perspective distortion or unclear printing, inaccurate position information will directly lead to vertical association errors and cause recognition deviations.

[0048] Third, the expansion and maintenance costs are high. To adapt to the new version, continuous data annotation and model fine-tuning are required, which is time-consuming and costly, making it difficult to meet the needs of rapid business iteration.

[0049] To address this issue, this application provides a method and related apparatus for extracting information from medical expense lists. First, an image of the medical expense list to be processed is acquired, and document parsing technology is used to extract the detailed expense area, including expense items and amounts, from the image. Then, based on the row and column logic structure of this area, the originally scattered unstructured data is transformed into a structured expense list data table, laying a structured foundation for subsequent processing. Next, the non-detailed data rows are filtered from this data table, resulting in a filtered data table that retains only valid detailed data. Finally, leveraging the semantic understanding capabilities of a large-scale model, and using pre-defined medical claims-specific instructions, the header fields corresponding to the detailed data rows in the filtered data table are precisely mapped and replaced with standard structured fields. The final output is a standardized structured data table with a unified format that can be directly interfaced with downstream business systems, achieving efficient and accurate extraction of key information from medical expense lists. This application accurately extracts the expense detail area and restores its row and column logic structure through document parsing technology, transforming unstructured data into a structured data table. This avoids recognition errors in long text processing, reduces reliance on OCR position detection accuracy, and improves the robustness of complex layouts. Meanwhile, leveraging the deep semantic understanding capabilities of large models and pre-defined domain-specific instructions, standard semantic mapping of header fields is achieved. This eliminates the need for model fine-tuning for specific layouts; simply adjusting the instructions is sufficient to adapt to new layouts or header variations. This not only solves the problem of weak generalization capabilities in traditional solutions but also significantly reduces the cost of expansion and maintenance, ensuring the consistency and accuracy of structured output.

[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0051] See Figure 1 The figure is a flowchart of a method for extracting information from a medical expense list according to an embodiment of this application. Figure 1 As shown, the method for extracting information from the medical expense list may include steps S101-S105:

[0052] S101: Obtain the image of the medical expense list to be processed.

[0053] First, the process of obtaining the image of the medical expense list to be processed is performed. The sources of this type of image are wide-ranging, including scanned copies of hospital paper expense lists uploaded by users in medical claims, photos of the list taken by mobile phones, and electronic image format lists exported and stored by medical institutions.

[0054] The medical expense list image contains unstructured data, presented in a scattered and disordered visual format. It lacks unified field definitions and fixed logical relationships. Specifically, it covers key information related to cost accounting, such as drug names, treatment item names, specifications, unit price, quantity, amount, medical insurance attributes (e.g., Class A, Class B, self-paid), and item codes. It may also contain background auxiliary information such as hospital name, patient hospitalization time, and department. This information is mixed and distributed in different areas of the image and cannot be directly recognized, parsed, or used by computer systems for subsequent claims review and other business processing.

[0055] S102: Extract the detailed expense area from the medical expense list image using document parsing technology.

[0056] After obtaining the images of the medical expense lists to be processed, document parsing technology is used to perform in-depth layout analysis and content recognition. This technology can accurately distinguish different document elements in the images, effectively removing background information unrelated to the core charging data, such as hospital names, patient information, and page numbers, and specifically locating and extracting the expense details area containing key charging information. This expense details area is the core part of the medical expense list, completely covering all charging-related data generated during the treatment process. It includes basic attribute information such as the name, specifications, unit, quantity, and unit price of various drugs, treatment items, and medical consumables, as well as the corresponding amount data for each charging item. It also includes auxiliary accounting information directly related to the charging items, such as medical insurance attributes (e.g., Class A, Class B, out-of-pocket) and item codes, ensuring that subsequent information extraction can be based on complete and pure core data, laying an accurate and efficient foundation for subsequent data organization and semantic mapping.

[0057] It should be noted that the expense details area exists in the image as an unstructured table. This table only has a visual row and column distribution and does not have a structured data format or logical relationship that can be directly parsed by a computer.

[0058] S103: Based on the row and column logical structure of the expense details area, convert the unstructured data in the expense details area into a regular expense list data table.

[0059] After accurately extracting the expense details area, document parsing technology is used to further explore the inherent row and column logical structure of this area. This involves identifying the core relationship in the table where "rows correspond to individual expense details, and columns correspond to unified data attributes," clarifying the attribute definition of each column (such as item name, specifications, unit price, amount, medical insurance attributes, etc.) and the details belonging to each row. Based on this clear logical framework, the originally scattered and disordered unstructured data in the expense details area is standardized and transformed: the text, numbers, and other information scattered in the image are classified, organized, and precisely aligned according to the rule of "one detail per row, one attribute per column," eliminating the problems of data misalignment and confusion in visual presentation, and finally forming an expense list data table with clear rows and columns, clear fields, and consistent data relationships. This data table not only clearly defines the complete information of each billing detail, but also realizes the structured storage of data, which completely changes the status quo that unstructured data is difficult to be directly parsed and processed by computers. It provides a regular and reliable data foundation for subsequent non-detail data row filtering, semantic mapping of table header fields, etc., and at the same time avoids the error risk caused by the reliance on OCR location coordinates to associate data in traditional solutions.

[0060] S104: Filter the non-detailed data rows of the expense list data table to obtain a filtered data table.

[0061] After obtaining the standardized expense list data table, further filtering of non-detailed data rows is required to eliminate irrelevant data interference and focus on core expense details. Based on the business characteristics of medical expense lists, non-detailed data rows mainly include summary rows (such as statistical rows like "Subtotal for Category A," "Subtotal for Western Medicine," and "Total Out-of-Potential Expenses") and remarks rows (such as rows indicating supplementary explanations of charging rules or special items). This type of data is not a specific expense item but is only used for auxiliary explanation or statistical summary; retaining it would affect the accuracy of subsequent semantic mapping and the standardization of structured output. This step utilizes the semantic understanding capabilities of the large model, combined with preset rules, to identify and judge each row of data in the table: accurately filtering out detailed data rows containing core information such as specific expense item names, specifications, unit prices, and amounts, while simultaneously eliminating all summary rows, remarks rows, and other non-detailed data rows, ultimately obtaining a filtered data table that retains only valid expense details. This filtering process ensures the purity of the data processed subsequently and provides a precise and focused data foundation for the standard semantic mapping of the header fields, avoiding interference from irrelevant data in the extraction results and further improving the overall accuracy of information extraction.

[0062] S105: Combining the large model, using preset domain-specific instructions, the header fields corresponding to the detailed data rows in the filtered data table are mapped and replaced using standard semantics to obtain a standard structured data table.

[0063] After obtaining the filtered data table containing only valid charge details, this step leverages the deep semantic understanding capabilities of the large model, along with pre-defined medical claims-specific instructions, to accurately map and replace header fields with standard structured fields, ultimately generating a standard structured data table.

[0064] Among them, the preset domain-specific instructions are designed based on the core needs of medical claims business scenarios. They are specifically used to clarify the semantic mapping rules, ambiguity judgment standards, and unified field specifications for header fields. For example: "All headers that represent the actual charge amount, such as 'Amount', 'Actual Payment', 'Amount Payable', and 'Calculated Amount', are uniformly mapped to the standard field 'Valid Amount'. If there are multiple such headers in the same table, the value corresponding to 'Actual Payment' is selected as the value of 'Valid Amount'." "If the header is an ambiguous field such as 'Attribute' or 'Category', the contents of all cells in that column need to be read. If the contents contain 'Category A', 'Category B', or 'Out-of-Pocket', it is mapped to 'Item Medical Insurance Type'; if it contains 'Laboratory Fee', 'Examination Fee', or 'Drug Fee', it is mapped to 'Cost Category'." "For headers with different expressions such as 'Specifications' or 'Model Specifications' but with the same semantics, they are uniformly replaced with the standard field 'Specification Parameters'." During execution, the large model, based on these dedicated instructions, first performs semantic parsing on the header fields (such as "project name", "actual transaction", "attribute" etc.) corresponding to the detailed data rows in the filtered data table. Then, according to the instruction rules, it accurately maps various headers and variations to preset standard structured fields (such as "expense name", "effective amount", "project medical insurance type" etc.), while completing field replacement and unification processing. Finally, it outputs a standard structured data table with standardized format, unified fields, and accurate semantics, which can be directly connected to downstream business systems such as medical claims review and expense calculation, completely solving the problem of structured data chaos caused by inconsistent header descriptions and semantic ambiguity in traditional solutions.

[0065] Based on the content of S101-S105, the process first involves acquiring images of medical expense lists to be processed, which contain unstructured data. Next, document parsing technology is used to precisely extract the expense details area, which includes all charges and their corresponding amounts. Then, based on the row and column logic structure of this expense details area, the unstructured data is converted into a well-organized expense list data table. Subsequently, the generated data table is filtered to remove non-detailed data rows, resulting in a more concise filtered data table. Finally, combining the deep semantic understanding capabilities of a large model and preset domain-specific instructions, the header fields of the detailed data rows in the filtered data table are standardized and replaced, ultimately generating a standard structured data table. This application utilizes document parsing technology to restore the row and column logic of the expense list, transforming unstructured data into a well-organized data table. This solves the problem of long text recognition errors, reduces reliance on OCR positional accuracy, and improves adaptability to complex layouts. Meanwhile, by using large-scale model semantic understanding and domain-specific instructions to achieve standard mapping of table header fields, no model fine-tuning is required. Only the instructions need to be adjusted to adapt to the new layout, which not only enhances the generalization ability but also reduces the cost of expansion and maintenance, ensuring the consistency and accuracy of structured output.

[0066] In one possible implementation, such as Figure 2 As shown, step S105, in conjunction with the large model, uses preset domain-specific instructions to perform standard semantic mapping and replacement on the header fields corresponding to the detailed data rows in the filtered data table, resulting in a standard structured data table, including steps S201-S203:

[0067] S201: Classify all header fields corresponding to the detail data rows in the filtered data table to obtain a set of ambiguous fields and a set of unambiguous fields.

[0068] After filtering non-detailed data rows and obtaining a filtered data table containing only valid charge details, semantic classification processing can be performed on all header fields corresponding to the detailed data rows in this data table. The core purpose is to provide a clear basis for subsequent differentiated semantic mapping and ensure the accuracy of field identification. The classification process is based on the semantic specifications of medical claims business scenarios. The unambiguous field set includes header fields with clear semantics, unique references, and consistent expressions within the industry, such as "Project Name," "Quantity," "Unit Price," and "Main Project Code." These fields do not require additional contextual assistance; their corresponding standard structured fields can be directly identified by their names, eliminating the possibility of multiple interpretations. On the other hand, the ambiguous field set includes header fields with broad semantics, multiple references, or non-standard expressions, such as "Attribute," "Category," and "Remarks." These fields themselves cannot clearly represent the core information (e.g., "Attribute" may correspond to "Project Medical Insurance Type," "Cost Category," or "Item Material"), and their semantic attribution must be accurately determined by combining them with subsequent contextual information. This classification operation distinguishes and categorizes header fields with different characteristics, laying the foundation for subsequent rapid and direct mapping of unambiguous fields and context-assisted identification of ambiguous fields, effectively improving the efficiency and accuracy of overall semantic mapping.

[0069] S2021: For each ambiguous field in the ambiguous field set, take all fields in the column where the ambiguous field is located in the filtered data table as context information as input, and combine the domain-specific instructions to guide the large model to identify the standard structured field of the ambiguous field.

[0070] For each field in the ambiguous field set (such as "attribute" or "category"—table headers with broad semantics and no fixed reference), this application employs a dual mechanism of "contextual information supplementation + domain instruction guidance" to achieve accurate identification of standard structured fields.

[0071] Specifically, firstly, all cell contents of the corresponding column in the filtered data table for the ambiguous field are extracted. These contents are the direct carriers of the semantics of the ambiguous field. For example, detailed data such as "Category A", "Category B", "Out-of-pocket" or "Laboratory Fee", "Examination Fee" under the "Attribute" column are used together with the ambiguous field itself as input information to provide a complete semantic judgment basis for the large model. At the same time, preset medical claims-specific instructions are loaded. These instructions clarify the judgment rules of ambiguous fields based on business scenarios. For example, "if the cell contents of the column containing the ambiguous field contain medical insurance-related identifiers such as 'Category A', 'Category B', and 'Out-of-pocket', then the ambiguous field is mapped to 'Item Medical Insurance Type'; if it contains cost classification identifiers such as 'Laboratory Fee', 'Examination Fee', and 'Drug Fee', then it is mapped to 'Cost Category'; if it contains material or usage descriptions such as 'Disposable' and 'Medical', then it is mapped to 'Item Attribute'."

[0072] With the support of dual information, the large model can deeply analyze the semantic features of the context, strictly follow the judgment logic of domain-specific instructions, accurately identify the true semantic belonging of ambiguous fields, and then match the corresponding standard structured fields. This completely solves the problems of fuzzy mapping and recognition errors caused by ambiguous table headers in traditional solutions, and significantly improves the accuracy and reliability of field mapping in complex scenarios.

[0073] S2022: For each unambiguous field in the set of unambiguous fields, the unambiguous field is used as direct input, and the domain-specific instructions are used to guide the large model to identify the standard structured field of the unambiguous field.

[0074] For each field in the unambiguous field set, its core characteristics are clear semantics and unique reference. In medical claims scenarios, there are no multiple interpretations or confusing expressions. Examples include header fields such as "Project Name," "Quantity," "Unit Price," and "Main Project Code." For these fields, no additional contextual information is needed for judgment; the field name itself can be directly passed as input to the large model. Simultaneously, pre-defined medical claims domain-specific instructions are loaded. These instructions, based on business specifications and data standardization requirements, clearly define the one-to-one correspondence between unambiguous fields and standard structured fields. For example, "Map 'Project Name' directly to the standard field 'Expense Name,' keep 'Quantity' unchanged, map 'Unit Price' to 'Charge Unit Price,' map 'Main Project Code' to 'Expense Project Code,' and map 'Amount' to 'Amount Receivable.'" After receiving the field input, the large model strictly follows the mapping rules of the domain-specific instructions, quickly completing semantic matching and field recognition. Without complex context parsing or multi-round reasoning, it can efficiently and accurately map the original unambiguous header fields to their corresponding standard structured fields. This approach not only ensures the accuracy of field mapping but also significantly improves the overall efficiency of information extraction. Furthermore, it aligns with the stringent data standardization requirements of the medical claims scenario, providing a standardized and unified field foundation for the subsequent generation of structured data tables.

[0075] S203: Based on the standard structured fields corresponding to each ambiguous field and the standard structured fields corresponding to each unambiguous field, the fields included in the non-detailed data rows of the filtered data table are replaced at the corresponding positions to obtain the standard structured data table.

[0076] After accurately identifying ambiguous and unambiguous fields into standard structured fields, the next step will be to perform field replacement operations on the filtered data table based on the established complete mapping relationship between "original header fields and standard structured fields".

[0077] It should be noted that the data table filtered here has already removed non-detailed data rows such as summary rows and remarks rows through the previous steps, retaining only valid detailed data rows containing specific chargeable items. The replacement operation will focus on the header fields corresponding to these detailed data rows. Specifically, following the "column alignment replacement" principle, the original header fields of each column in the data table (such as ambiguous fields "", "attribute", "category", and unambiguous fields such as "item name", "actual payment", etc.) will be uniformly replaced with their corresponding standard structured fields (such as "item medical insurance type", "fee name", "effective amount", etc.). During the replacement process, strict adherence to the precise matching between the detailed data corresponding to each column and the new fields is maintained to ensure the logical consistency of "one row, one detail; one column, one standard attribute".

[0078] Through this standardized replacement process, the original data tables, which had inconsistencies in header descriptions and semantic ambiguities, will be transformed into standardized structured data tables with unified fields, standardized formats, and clear semantics. This data table perfectly meets the standardization requirements of medical claims processing, with all fields having clear and consistent meanings. It can be directly integrated with downstream claims review and expense calculation systems, achieving automated processing without additional data preparation. This completely solves the business integration obstacles caused by inconsistent fields in traditional solutions, while ensuring data accuracy and reusability.

[0079] By following the steps above, all header fields in the filtered data table can be effectively processed, ensuring that the generated standard structured data table has high accuracy and consistency.

[0080] In one possible implementation, the method further includes:

[0081] If the large model cannot recognize the standard structured field of the ambiguous field, then the standard structured field of the ambiguous field is marked as empty.

[0082] Specifically, the fallback mechanism for handling the failure of ambiguous field recognition includes: after performing the recognition process of "contextual information input + domain-specific instruction guidance" on the fields in the ambiguous field set, if the large model still cannot accurately identify the standard structured field corresponding to the ambiguous field due to reasons such as the field semantics being too ambiguous, the content of the cell in the column having no clear direction, or not matching the preset judgment rules in the instruction, then the field will not be forcibly mapped, but its corresponding standard structured field will be directly marked as empty.

[0083] This design ensures the standardization and accuracy of fields in the standard structured data table, avoiding semantic confusion or incorrect associations caused by forced mapping. It also provides clear guidance for subsequent manual verification by explicitly marking null values. At the same time, it meets the data rigor requirements of medical claims business, ensuring that the overall structured output is both efficient and reliable, and that the failure to identify individual ambiguous fields will not affect the normal mapping of other valid fields and the overall usability of the data table.

[0084] In one possible implementation, step S103, based on the row-column logical structure of the expense details area, converts the unstructured data in the expense details area into a regular expense list data table, including A1-A2:

[0085] A1: Extract the field information from the cost details area to obtain multiple data fields.

[0086] The extracted expense details area was processed by extracting field information. Leveraging the text recognition and content segmentation capabilities of document parsing technology, all scattered raw data fields were precisely extracted from the table layout within the area. These data fields cover the core information of the medical expense list, including basic fields directly related to billing calculation such as "item name," "specification," "unit," "quantity," "unit price," and "amount," as well as auxiliary classification or identification fields such as "attribute" and "main item code," ultimately forming multiple independent and complete sets of raw data fields.

[0087] A2: Arrange and associate the multiple data fields according to the row and column logic structure of the expense details area to obtain the expense list data table.

[0088] After acquiring multiple data fields, the data is organized and arranged according to the inherent row and column logic structure of the expense details area. Combining the core logic identified by document parsing technology—"rows correspond to single expense details, columns correspond to unified data attributes"—the multiple data fields extracted in step A1 are categorized by column (e.g., all "project name" related fields are grouped into one column, and all "amount" related fields are grouped into another column). Simultaneously, each field corresponding to each expense detail is aligned by row, achieving logical association and orderly arrangement between fields. This ultimately forms an expense list data table with clear rows and columns, well-defined field affiliations, and consistent data relationships, providing a structured foundation for subsequent non-detail data row filtering and semantic mapping.

[0089] In one possible implementation, non-detailed data rows include summary rows and / or remarks rows. These data rows do not contain specific details of the charging items, but only serve the function of statistical description or supplementary notes, and need to be removed in the filtering stage.

[0090] Among them, the summary row is a statistical summary of multiple charge details, such as the "Subtotal of Category A", "Subtotal of Category B", "Subtotal of Western Medicine", and "Total Out-of-Pocket Expenses" rows commonly found in medical expense lists. Its core function is to present the total amount and quantity summary of a certain category or all charge items, rather than the specific information of a single charge item.

[0091] The remarks row provides supplementary annotations for charging rules, special items, and data explanations. Examples include textual descriptions such as "Special drugs require a prescription" and "Medical insurance reimbursement rates are subject to the latest local policies." This type of data is unrelated to the core attributes of the charging item (such as name, specifications, and amount) and has no business accounting value. By accurately identifying and filtering these non-detailed data rows, it ensures that subsequent field mapping and structured processing focus solely on valid charging details, avoiding identification biases caused by irrelevant data interference. This lays a clean data foundation for generating standardized and accurate structured data tables.

[0092] See Figure 3 , Figure 3 This is a schematic diagram of a medical expense list information extraction device provided in an embodiment of this application. Figure 3 As shown, the information extraction device for the medical expense list includes:

[0093] The acquisition unit 301 is used to acquire a medical expense list image to be processed; the data in the medical expense list image is unstructured data.

[0094] The cropping unit 302 is used to crop the expense details area in the medical expense list image; the expense details area includes all chargeable items and their amounts.

[0095] The conversion unit 303 is used to convert the unstructured data in the expense details area into a regular expense list data table based on the row and column logical structure of the expense details area.

[0096] Filtering unit 304 is used to filter non-detailed data rows in the expense list data table to obtain a filtered data table.

[0097] The mapping and replacement unit 305 is used to combine the large model and, through preset domain-specific instructions, perform standard semantic mapping and replacement on the header fields corresponding to the detailed data rows in the filtered data table to obtain a standard structured data table.

[0098] In one possible implementation, the mapping replacement unit 305 specifically includes:

[0099] A field classification unit is used to classify all fields in the non-detailed data rows to obtain a set of ambiguous fields and a set of unambiguous fields.

[0100] The ambiguous field processing unit is used to take all fields of the column where the ambiguous field is located in the filtered data table as context information as input for each ambiguous field in the ambiguous field set, and combine the domain-specific instructions to guide the large model to identify the standard structured field of the ambiguous field.

[0101] The unambiguous field processing unit is used to take each unambiguous field in the unambiguous field set as direct input and combine it with the domain-specific instructions to guide the large model to identify the standard structured field of the unambiguous field.

[0102] The replacement unit is used to replace the fields in the non-detailed data rows of the filtered data table at the corresponding positions based on the standard structured fields corresponding to each ambiguous field and the standard structured fields corresponding to each unambiguous field, so as to obtain the standard structured data table.

[0103] In one possible implementation, the device further includes:

[0104] The field marking unit is used to mark the standard structured field of the ambiguous field as empty if the large model cannot recognize the standard structured field of the ambiguous field.

[0105] In one possible implementation, the conversion unit 303 specifically includes:

[0106] The extraction unit is used to extract field information from the cost details area to obtain multiple data fields;

[0107] The processing unit is used to organize and associate the multiple data fields according to the row and column logical structure of the expense details area to obtain the expense list data table.

[0108] In one possible implementation, non-detailed data rows include summary rows and / or remarks rows.

[0109] In addition, this application embodiment also provides a medical expense list information extraction device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the medical expense list information extraction method as described above.

[0110] In addition, this application embodiment also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the medical expense list information extraction method as described above.

[0111] This application's embodiments accurately extract the expense details area and restore the row and column logical structure through document parsing technology, transforming unstructured data into a well-organized data table. This fundamentally avoids the recognition errors caused by context length limitations in long text processing. Simultaneously, this application eliminates excessive reliance on OCR position detection accuracy, significantly improving robustness to complex layouts. Furthermore, leveraging the deep semantic understanding capabilities of a large model and pre-defined domain-specific instructions, standard semantic mapping of header fields is achieved. This eliminates the need for model fine-tuning for specific layouts; adaptation to new layouts or header variations can be achieved simply by adjusting instructions. This solves the weakness of traditional solutions in generalization and avoids the high costs of continuous data annotation and model fine-tuning, significantly reducing the difficulty of expansion and maintenance while ensuring the consistency and accuracy of structured output.

[0112] The foregoing has provided a detailed description of a method and related apparatus for extracting medical expense lists. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

[0113] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0114] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for extracting information from a medical expense list, characterized in that, The method includes: Obtain the image of the medical expense list to be processed; the data in the medical expense list image is unstructured data; The detailed expense area of ​​the medical expense list image is extracted using document parsing technology; the detailed expense area includes all chargeable items and their amounts. Based on the row and column logical structure of the expense details area, the unstructured data in the expense details area is converted into a regular expense list data table; The expense list data table is filtered for non-detailed data rows to obtain a filtered data table; By combining the large model and using preset domain-specific instructions, the header fields corresponding to the detailed data rows in the filtered data table are mapped and replaced using standard semantics to obtain a standard structured data table.

2. The method according to claim 1, characterized in that, The combined large model, through preset domain-specific instructions, performs standard semantic mapping and replacement on the header fields corresponding to the detailed data rows in the filtered data table, resulting in a standard structured data table, including: Classify all header fields corresponding to the detailed data in the filtered data table to obtain a set of ambiguous fields and a set of unambiguous fields; For each ambiguous field in the ambiguous field set, all fields in the column where the ambiguous field is located in the filtered data table are used as context information as input, and the domain-specific instructions are used to guide the large model to identify the standard structured field of the ambiguous field. For each unambiguous field in the unambiguous field set, the unambiguous field is used as direct input, and the domain-specific instructions are used to guide the large model to identify the standard structured field of the unambiguous field. Based on the standard structured fields corresponding to each ambiguous field and the standard structured fields corresponding to each unambiguous field, the fields included in the non-detailed data rows of the filtered data table are replaced at the corresponding positions to obtain the standard structured data table.

3. The method according to claim 2, characterized in that, The method further includes: If the large model cannot recognize the standard structured field of the ambiguous field, then the standard structured field of the ambiguous field is marked as empty.

4. The method according to claim 1, characterized in that, The step of converting the unstructured data in the expense details area into a regular expense list data table based on the row and column logical structure of the expense details area includes: Extracting field information from the cost details area yields multiple data fields; The multiple data fields are organized and associated according to the row and column logical structure of the expense details area to obtain the expense list data table.

5. The method according to claim 1, characterized in that, Non-detail data rows include summary rows and / or remarks rows.

6. A medical expense list information extraction device, characterized in that, The device includes: The acquisition unit is used to acquire images of medical expense lists to be processed; the data in the medical expense list images is unstructured data. The cropping unit is used to crop the expense details area in the medical expense list image; the expense details area includes all chargeable items and their amounts. The conversion unit is used to convert the unstructured data in the expense details area into a regular expense list data table based on the row and column logical structure of the expense details area. The filtering unit is used to filter the non-detailed data rows of the expense list data table to obtain a filtered data table. The mapping and replacement unit is used to combine the large model and, through preset domain-specific instructions, perform standard semantic mapping and replacement on the header fields corresponding to the detailed data rows in the filtered data table to obtain a standard structured data table.

7. The apparatus according to claim 6, characterized in that, The mapping replacement unit specifically includes: A field classification unit is used to classify all fields in the non-detailed data rows to obtain a set of ambiguous fields and a set of unambiguous fields. The ambiguous field processing unit is used to take all fields of the column where the ambiguous field is located in the filtered data table as context information as input for each ambiguous field in the ambiguous field set, and combine the domain-specific instructions to guide the large model to identify the standard structured field of the ambiguous field. The unambiguous field processing unit is used to take each unambiguous field in the unambiguous field set as direct input and combine it with the domain-specific instructions to guide the large model to identify the standard structured field of the unambiguous field. The replacement unit is used to replace the fields in the non-detailed data rows of the filtered data table at the corresponding positions based on the standard structured fields corresponding to each ambiguous field and the standard structured fields corresponding to each unambiguous field, so as to obtain the standard structured data table.

8. The apparatus according to claim 6, characterized in that, The conversion unit specifically includes: The extraction unit is used to extract field information from the cost details area to obtain multiple data fields; The processing unit is used to organize and associate the multiple data fields according to the row and column logical structure of the expense details area to obtain the expense list data table.

9. A medical expense list information extraction device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the information extraction method for a medical expense list as described in any one of claims 1-5.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the information extraction method for medical expense lists as described in any one of claims 1-5.