Structured processing method and device for medical instrument data, medium and equipment
By employing table reconstruction and semantic vector association techniques, the problem of structural parsing of complex tables in the medical device field has been solved, enabling efficient structured data processing and retrieval, and improving data utilization efficiency and accuracy.
Patent Information
- Application Number
- CN202511880074.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-05-15
AI Technical Summary
Existing OCR technology cannot effectively handle tables with complex structures in the medical device field, such as merged cells, tables spanning multiple pages, and hierarchical relationships between table headers and subheadings. This results in incomplete data structure parsing, affecting data utilization efficiency and retrieval accuracy.
By reconstructing tables, extracting structured data, and associating structured tags with semantic vectors, different enhancement strategies are used to reconstruct the initial tables in a structured manner. The separators and nesting relationships within cells are parsed, semantic vectors are generated and stored in a vector database, thus achieving accurate structured processing of complex tables.
It enables precise structuring of complex tables, improves data utilization efficiency and retrieval accuracy, meets the data traceability needs of professional fields, and ensures data standardization, consistency, and intelligence.
Smart Images

Figure CN122045231A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a structured processing method, apparatus, medium and device for medical device data. Background Technology
[0002] In highly standardized fields such as medical devices, complex tables within PDF or scanned image documents contain a large amount of core information. These tables have complex structures (including multi-level headers and merged cells), high data density (multiple values can be stored in a single cell), and include key numerical specifications and accompanying annotations.
[0003] Currently, OCR (Optical Character Recognition) and vector retrieval are typically the core technologies. OCR can extract text from PDFs or scanned documents and output simple structured data from tables. However, OCR technology can only treat documents containing tables as ordinary text, relying on shallow semantic matching and failing to parse deep structures, ignoring table structure logic, numerical ranges, and annotation information. In the field of medical devices, it cannot effectively handle complex table structures, such as merged cells, multi-page tables, and the hierarchical relationship between table headers and subheadings. Summary of the Invention
[0004] In view of this, this application provides a method, apparatus, medium and equipment for structured processing of medical device data. By reconstructing tables, extracting structured data and associating structured tags with semantic vectors, it achieves accurate structured processing and efficient traceable retrieval of medical device document table data, thereby improving data utilization efficiency and retrieval accuracy.
[0005] According to a first aspect of this application, a structured processing method for medical device data is provided, the method comprising: Initial tables are extracted from medical device documents using text recognition algorithms. The row and column matrix is reconstructed based on the enhancement strategy corresponding to the type of the initial table to form a reference table; Identify the delimiters within cells of the reference table, and obtain the structured text data within the cells of the reference table based on the delimiters; The structured text data is encoded to generate its corresponding semantic vector; Based on the physical location fingerprint and topological relationship of the cell in the reference table, and the structured fields of the structured text data, structured label information is generated for the semantic vector corresponding to the cell, wherein the structured fields are used to represent the specification numerical range and step size constraints of the structured text data; The semantic vector is associated with its structured tag information and stored in a vector database to retrieve text data in the medical device document using the structured tag information.
[0006] Optionally, the initial table is a structured table; the step of reconstructing the cell row and column matrix based on an enhancement strategy corresponding to the type of the initial table to form a reference table includes: Traverse the table elements of the structured table and find the merged cells with the merge attribute in the structured table; Based on the merge attribute, the target area occupied by the merged cell in the structured table is determined, wherein the target area consists of a logical master cell and at least one subordinate cell; Based on the span mapping relationship corresponding to the merge attribute, the text data of the main cell in the target area is filled into all the subordinate cells to generate the reference table. The span mapping relationship includes the mapping relationship between the subordinate cells occupied by the merge in the target area and their main cells.
[0007] Optionally, the method further includes: Establish a mapping relationship between each cell in the reference table and a text box with visual coordinates in the structured table; If a conflict is detected between the mapping relationship between the cell and the text box, and the conflict type is a preset type, a conflict flag is generated for the cell; Based on the spatial distribution of the text boxes, the cells in the reference table with the conflict markers are re-divided, and the text data recognized by the text recognition algorithm is filled into the re-divided cells.
[0008] Optionally, the initial table is an unstructured table; the initial table is a structured table; the step of reconstructing the cell row and column matrix based on an enhancement strategy corresponding to the type of the initial table to form a reference table includes: The header rows that match the header characteristics in the text area of the unstructured table are identified based on preset regular expression rules. Based on the title line, the text region is subjected to horizontal projection analysis to identify the spatial alignment boundary of the title line in the horizontal direction, and the text region is divided into multiple data blocks based on the spatial alignment boundary. Each data block contains a title line and its associated subsequent text lines. The text lines are divided into grids based on the common delimiters of the unstructured table to form a multi-column grid. The common delimiters are determined by statistically analyzing the frequency of consecutive spaces, tabs, or a fixed number of punctuation marks in each text line. The text data in the header row is used as the column name of the data block to which it belongs, and a structured cell is constructed based on the text data of the multi-column grid associated with the header to form the reference table.
[0009] Optionally, the method further includes: Count the number of cells corresponding to each type of text data in each column of the reference table; Calculate the percentage of cells in each column that conform to the mainstream data type, and use this percentage as the column consistency score. The mainstream data type is the data type with the most text data in each column. If the consistency score within a column is less than the scoring threshold or a preset semantic association pattern is detected between adjacent columns, then the abnormal rows are merged or split based on a preset rule base, wherein the rule base contains merging and splitting rules for specific data patterns.
[0010] Optionally, the method further includes: In response to a data query request, a semantic hybrid retrieval is performed on the vector database based on the query keywords of the data query request to obtain candidate results; The candidate results are aggregated and grouped using the physical location fingerprint as the key to form an aggregation unit; A comprehensive score is calculated based on keyword coverage, position priority, semantic matching confidence, and penalty points generated from compliance checks on the structured fields. The aggregated units are sorted based on the comprehensive score, and the sorted aggregated units are output as the target retrieval results.
[0011] Optionally, the semantic hybrid retrieval includes: similarity search, vector search with numerical filtering, and pure scalar range query.
[0012] Optionally, the method further includes: If the aggregation unit does not cover all query keywords, then compare the query keywords covered by the aggregation unit with all query keywords to determine the missing keywords; Based on the topological relationships and semantic similarities corresponding to the candidate results in the aggregation unit, the candidate results that match the missing keywords are filtered to determine the missing candidate results; The missing candidate results are added to the aggregation unit that does not cover all query keywords.
[0013] According to a second aspect of this application, a structured processing apparatus for medical device data is provided, the apparatus comprising: The table extraction module is used to extract initial tables from medical device documents based on text recognition algorithms. The enhancement processing module is used to reconstruct the row and column matrix based on the enhancement strategy corresponding to the type of the initial table to form a reference table; The data recognition module is used to recognize the segmentation markers in the cells of the reference table and obtain the structured text data in the cells of the reference table based on the segmentation markers. The encoding module is used to encode the structured text data and generate its corresponding semantic vector; The tag generation module is used to generate structured tag information for the semantic vector corresponding to the cell based on the physical location fingerprint and topological relationship of the cell in the reference table and the structured fields of the structured text data. The structured fields are used to represent the specification numerical range and step size constraints of the structured text data. A storage module is used to associate the semantic vector with its structured tag information and store it in a vector database, so as to retrieve text data in the medical device document through the structured tag information.
[0014] Optionally, the initial table is a structured table; the enhanced processing module is specifically used to traverse the table elements of the structured table, find merged cells with merge attributes in the structured table; determine the target area occupied by the merged cells in the structured table based on the merge attributes, wherein the target area consists of a logical main cell and at least one subordinate cell; fill the text data of the main cell in the target area into all subordinate cells based on the span mapping relationship corresponding to the merge attributes, generating the reference table, wherein the span mapping relationship includes the mapping relationship from the subordinate cells occupied by the merge in the target area to their main cells.
[0015] Optionally, the enhancement processing module is further configured to establish a mapping relationship between each cell in the reference table and a text box with visual coordinates in the structured table; if a conflict is detected between the mapping relationship between the cell and the text box, and the conflict type is a preset type, a conflict mark is generated for the cell; the cells with the conflict mark in the reference table are re-divided based on the spatial distribution of the text boxes, and the text data recognized by the text recognition algorithm is filled into the re-divided cells.
[0016] Optionally, the initial table is an unstructured table; the enhancement processing module is specifically used to identify header rows that conform to the title characteristics in the text area of the unstructured table based on preset regular expression rules; perform horizontal projection analysis on the text area based on the header rows to identify the spatial alignment boundary of the header rows in the horizontal direction, and divide the text area into multiple data blocks based on the spatial alignment boundary, wherein each data block contains a header row and its associated subsequent text rows; perform grid-based splitting of the text rows based on the common delimiter of the unstructured table to form a multi-column grid, wherein the common delimiter is determined by statistically analyzing the frequency of occurrence of consecutive spaces, tabs, or a fixed number of punctuation marks in each text row; use the text data in the header rows as the column names of the data blocks to which they belong, and construct structured cells based on the text data of the multi-column grid associated with the header to form the reference table.
[0017] Optionally, the enhanced processing module is further configured to: count the number of cells corresponding to text data of each data type in each column of the reference table; calculate the percentage of cells in each column that conform to the mainstream data type as the column consistency score, wherein the mainstream data type is the data type with the most corresponding text data in each column; if the column consistency score is less than the score threshold or a preset semantic association pattern is detected between adjacent columns, then the abnormal rows are merged or split based on a preset rule base, wherein the rule base contains merging rules and splitting rules for specific data patterns.
[0018] Optionally, the device further includes: The retrieval module is used to respond to data query requests, perform semantic hybrid retrieval on the vector database based on the query keywords of the data query request, and obtain candidate results. The semantic hybrid retrieval includes: similarity search, vector search with numerical filtering, and pure scalar range query. The candidate results are aggregated and grouped using the physical location fingerprint as the key to form aggregation units. A comprehensive score is calculated based on keyword coverage, location priority, semantic matching confidence, and penalty score generated by compliance verification of the structured fields. The aggregation units are sorted based on the comprehensive score, and the sorted aggregation units are output as the target retrieval results.
[0019] Optionally, the retrieval module is further configured to: if the aggregation unit does not cover all query keywords, compare the query keywords covered by the aggregation unit with all query keywords to determine missing keywords; based on the topological relationship and semantic similarity corresponding to the candidate results in the aggregation unit, filter the candidate results that match the missing keywords to determine missing candidate results; and add the missing candidate results to the aggregation unit that does not cover all query keywords.
[0020] According to a third aspect of this application, a readable storage medium is provided on which a program or instructions are stored, which, when executed by a processor, implement the steps of the above-described structured processing method for medical device data.
[0021] According to a fourth aspect of this application, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described structured processing method for medical device data.
[0022] By employing the above technical solutions, different enhancement strategies are used to structurally reconstruct the initial tables for different types of tables, and the delimiters and nesting relationships within cells are analyzed in a fine-grained manner. This effectively restores the logical structure of complex tables in different types of medical device documents, thereby obtaining accurate structured text data and enabling the processing of complex tables. It directly solves the problems of structure loss or content confusion in multi-level headers, merged cells, and non-standard pseudo-tables, and is more robust.
[0023] Building upon this foundation, the physical location fingerprints, topological relationships, and specification constraints of structured fields of cells are further integrated to construct a composite indexing mechanism that combines semantic features with structured spatiotemporal / numerical constraints. This generates semantic vectors that are rich in context and constraint-based structured tag information. This allows subsequent searches to quickly locate the original documents, tables, and page numbers corresponding to target parameters through structured tags, meeting the data traceability needs of professional fields. It also enables precise matching of specific numerical values and specification ranges, avoiding retrieval omissions or irrelevant results, thus improving the recall accuracy and data availability of medical device documents in complex query scenarios. Furthermore, while ensuring data standardization and consistency, it enhances the intelligent level of document information utilization.
[0024] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0025] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This illustration shows one of the flowcharts of a structured processing method for medical device data provided in an embodiment of this application; Figure 2This is a second schematic flowchart of a structured processing method for medical device data provided in an embodiment of this application; Figure 3 A structural block diagram of the structured processing apparatus for medical device data provided in an embodiment of this application is shown. Figure 4 A schematic diagram of the electronic structure of a computer device provided in an embodiment of this application is shown. Detailed Implementation
[0026] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.
[0027] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0028] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “attached” to another element, it can be directly connected or attached to the other element, or there may be intermediate elements. Furthermore, “connected” or “attached” as used herein can include wireless connections or wireless interconnections. The term “and / or” as used herein includes all or any unit and all combinations of one or more associated listed items.
[0029] Exemplary embodiments according to this application will now be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments may be implemented in many different forms and should not be construed as being limited to the embodiments set forth herein. It should be understood that these embodiments are provided so that the disclosure of this application is thorough and complete, and that the concept of these exemplary embodiments is fully conveyed to those skilled in the art.
[0030] This embodiment provides a structured processing method for medical device data, such as... Figure 1 As shown, the method includes: Step 110: Extract the initial table from the medical device document based on the text recognition algorithm.
[0031] The initial table can be either a structured table or an unstructured table (pseudo-table). A structured table is defined by explicit table borders, row and column separators, and header hierarchy, with clear relationships between rows, columns, and cells. Its data is strongly bound to the table structure, and the ownership of each data item is clearly identifiable; examples include HTML tables defined in XML format and LaTeX tables. An unstructured table is a pseudo-table that is not defined by standard table formats (such as borders and row and column separators), but rather simulates a table structure using text formats such as spaces, line breaks, indentation, and tabs. Its essence is a formatted arrangement of plain text, lacking explicit two-dimensional structural identifiers; the binding of data and structure depends on the consistency of the text format.
[0032] Specifically, medical device documentation can be in PDF, Excel, or scanned image format.
[0033] In this embodiment, for each medical device document, the OCR engine can transform the visual layout into logical relationships, identify individual characters, words, or lines of text by detecting text boxes containing text, and provide more granular visual coordinate information for each recognition unit.
[0034] Step 120: Reconstruct the row and column matrix based on the enhancement strategy corresponding to the type of the initial table to form a reference table.
[0035] In this embodiment, different enhancement strategies are used to restructure the initial table for different types of tables, and the separators and nesting relationships within the cells are analyzed in a fine-grained manner. This effectively restores the logical structure of complex tables in different types of medical device documents, so as to obtain accurate structured text data and realize the ability to process complex tables. It directly solves the problems of structure loss or content confusion in multi-level headers, merged cells, and non-standard pseudo-tables, and has stronger robustness.
[0036] In practical applications, the initial table is a structured table, and step 120 specifically includes the following steps: Step 121-1: Traverse the table elements of the structured table and find the merged cells with the merge attribute in the structured table.
[0037] Table elements are the basic logical components and objects that constitute a structured table data model. Examples include rows, columns, header cells, and data cells. Taking an HTML table as an example, the `` element represents a table row, and the ` / ` element represents a cell. Cell elements have attributes such as `rowspan` (number of rows spanned), `colspan` (number of columns spanned), DOM hierarchy, and relative parent node coordinates. `rowspan` and `colspan` represent merging properties; when a cell does not satisfy both `rowspan=1` and `colspan=1`, it is considered a merged cell.
[0038] It is understood that conventional OCR+table structure recognition models can be used to obtain the table elements of structured tables, and this application will not elaborate further in its embodiments.
[0039] Step 121-2: Determine the target area occupied by the merged cells in the structured table based on the merge attribute.
[0040] The target area consists of a logical master cell and at least one subordinate cell.
[0041] Step 121-3: Based on the span mapping relationship corresponding to the merged attribute, fill the text data of the main cell in the target area into all the subordinate cells to generate a reference table.
[0042] The span mapping relationship includes the mapping relationship between the subordinate cells occupied due to merging within the target area and their main cells.
[0043] In this embodiment, the merged cells are located by traversing each element of the structured table, and the actual two-dimensional space occupied by each cell due to the merging attribute is dynamically calculated, i.e., the target area occupied by the merged cells. Then, the mapping relationship between the main and subordinate cells within the target area is clarified according to the span mapping relationship, and the content of the main cell is copied and filled into all its corresponding subordinate cells using this mapping relationship. This ensures that each cell in the originally merged area contains complete content, ultimately generating a well-structured and data-complete reference table. This ensures a one-to-one correspondence between the structure of the reference table and the data, allowing each data point to be associated and processed in its correct row and column context, avoiding data loss or misalignment due to missing data in subordinate cells.
[0044] It should be noted that when filling the text data of the main cell into the subordinate cells, there is no need to split or merge the cells, so that the reference table can closely resemble the actual table structure.
[0045] In one embodiment, after steps 121-3, the structured processing method for medical device data further includes: establishing a mapping relationship between each cell in the reference table and a text box with visual coordinates in the structured table; if a conflict is detected between the cell and the text box, and the conflict type is a preset type, generating a conflict marker for the cell; re-dividing the cells with conflict markers in the reference table based on the spatial distribution of the text boxes, and filling the re-divided cells with text data recognized by the text recognition algorithm.
[0046] Specifically, if a cell is not mapped to any text box or is mapped to multiple text boxes, there is a large deviation between the visual area of the text box and the logical boundary of the cell, the text content recognized by OCR at the same position is inconsistent with the text content of the cell in the reference table, or the order of the logical rows / columns is inconsistent with the spatial order of the visual text boxes, etc., and the cells and text boxes do not overlap, the system can determine that there is a conflict in the mapping relationship between the cells and text boxes.
[0047] Understandably, the default type is the type of conflict that occurs when the confidence level of building a table through visual text boxes is higher than that of building a table through DOM (Document Object Model) properties. For example, if one cell corresponds to multiple text boxes, meaning there is visual separation but no DOM merging, the table is more likely to be over-merged, while the possibility of visual errors is lower.
[0048] In this embodiment, a mapping relationship is established between cells and text boxes obtained during OCR text recognition. The spatial overlap between logical coordinates and visual coordinates is calculated to determine whether the visual area of the text box coincides with the cell. When a conflict is detected between a cell and a text box, i.e., an inconsistency between spatial physical attributes and logical attribution attributes, and the conflict type is a preset type, a conflict marker is generated for that cell. The original coordinate information of the text box is then used to dynamically correct cells with conflict markers in the reference table. This corrects initial structure recognition errors caused by missing DOM attributes, complex layouts, etc., better restores the true row and column structure of the document, helps improve the accuracy of parameter name and parameter value correspondence, and provides a more accurate data source for subsequent structured analysis and knowledge base construction.
[0049] In practical applications, the initial table is an unstructured table, and step 120 specifically includes the following steps: Step 122-1: Identify header rows in the text area of an unstructured table that match the header characteristics based on preset regular expression rules.
[0050] The title features include general titles such as full uppercase characters and ending with a colon or semicolon, which will not be listed one by one in this application embodiment.
[0051] Step 122-2: Perform horizontal projection analysis on the text region based on the header line, identify the spatial alignment boundary of the header line in the horizontal direction, and divide the text region into multiple data blocks based on the spatial alignment boundary.
[0052] Each data block contains a header line and its associated text line.
[0053] Step 122-3: Based on the common delimiters of the unstructured table, the text lines are split into a grid to form a multi-column grid.
[0054] The common separator is determined by statistically analyzing the frequency of consecutive spaces, tabs, or a fixed number of punctuation marks in each line of text. The more frequently a symbol appears, the higher the probability that it will be used for separation.
[0055] Step 122-4: Use the text data in the header row as the column name of the data block, and construct structured cells based on the text data of the multi-column grid associated with the header to form a reference table.
[0056] In this embodiment, regular expression header features are used to locate the position of the header row within the text area, facilitating accurate differentiation between the table header and body. Using the identified header row's vertical coordinate as a reference, a horizontal virtual projection is performed to identify the vertical spatial logical boundary between the header row and subsequent text rows. Based on this spatial alignment boundary, the text area is divided into independent data blocks for header and data, improving the accuracy of attribution within the same row. Text rows following the header row in each data block are split into columns using a common delimiter, constructing a standard data frame that accurately restores the column structure of the data, avoiding data misalignment due to minor alignment differences in individual rows. This transforms a non-standard table into a processable structured table, solving the problem of unstructured text being unable to be parsed by the DOM due to the lack of numerical tags.
[0057] In one embodiment, after steps 122-4, the structured processing method for medical device data further includes: counting the number of cells corresponding to text data of each data type in each column of the reference table; calculating the proportion of cells in each column that conform to the mainstream data type as the column consistency score; if the column consistency score is less than the score threshold or a preset semantic association pattern is detected between adjacent columns, then the abnormal rows are merged or split based on the preset rule base.
[0058] The preset semantic association mode is used to determine the semantic relationship between text data in adjacent columns. For example, a column adjacent to a "Number" column is usually a "Unit of Measurement" column, or a "Attribute Name" column is adjacent to an "Attribute Value" column. The mainstream data type is the data type corresponding to the largest number of cells in each column. The rule base contains merging and splitting rules for specific data patterns.
[0059] In this embodiment, all cells in a column of the reference table are traversed. Regular expression / semantic matching is used to determine the text data type of each cell, and the data types in each column are counted. Based on the data type, the proportion of cells with the most common data types reflects the regularity of the data within the column. A high proportion of common types indicates consistent data characteristics within the column; conversely, a low proportion indicates a large amount of heterogeneous data mixed in, not conforming to the usual table data distribution rules, and a higher probability of anomalies during row parsing. Combining the column consistency judgment results and the contextual semantic matching results, the rows / columns of the reference table are split and verified. When anomalies are found, column merging or splitting operations are performed on the abnormal rows. This standardization ensures the uniformity of the correction logic and specifically addresses issues such as data type confusion and improper semantic division between columns, effectively improving the accuracy and practicality of the system's parsing of unstructured tables.
[0060] Step 130: Identify the delimiters within the cells of the reference table and obtain the structured text data within the cells of the reference table based on the delimiters.
[0061] The delimiters include separators (such as commas, pause marks, etc.), row and column boundaries, and symbol nesting relationships.
[0062] In this embodiment, multiple sets of data within a single high-density data cell can be separated using segmentation markers, forming multiple independent logical data rows. The text data within each logical data row is then read separately. This refines the data granularity, laying the foundation for subsequent precise retrieval.
[0063] Step 140: Encode the structured text data to generate its corresponding semantic vector.
[0064] Specifically, an Embedding model (e.g., BGE-M3) can be used to generate a high-dimensional vector for the key text of each data point.
[0065] Step 150: Based on the physical location fingerprint and topological relationship of the cells in the reference table, as well as the structured fields of the structured text data, generate structured label information for the semantic vector corresponding to the cell.
[0066] The physical location fingerprint of a cell records the micro-position of the structured text data within the original document, formatted as {filename}-{page number}-{row number}-{column number}, facilitating precise data-level positioning. The topological relationships between cells record their spatial connections within the table, enabling contextual tracing. Notably, these topological relationships can be stored as context snapshots (meta_data), helping to record all original data for rows / columns containing more text data. Structured fields represent the numerical range and step size constraints of the structured text data. Specifically, for regular data, regular expressions can be used to extract the minimum, maximum, and step sizes, generating structured fields such as _scope, _min, _max, and _step. For irregular data, the semantic parsing of an LLM large language model can be used to precisely match CSV column names with text descriptions, extracting corresponding step size information and generating enhanced columns to supplement the structured fields.
[0067] Step 160: Associate the semantic vector with its structured tag information and store it in the vector database to retrieve text data in medical device documents using the structured tag information.
[0068] The structured processing method for medical device data provided in this application employs different enhancement strategies to restructure the initial table for different types of tables, and performs fine-grained analysis of separators and nesting relationships within cells. This effectively restores the logical structure of complex tables in different types of medical device documents, obtaining accurate structured text data and enabling the processing of complex tables. It directly solves the problems of structure loss or content confusion in multi-level headers, merged cells, and non-standard pseudo-tables, demonstrating stronger robustness. Furthermore, it integrates the physical location fingerprints of cells, topological relationships, and the specification constraints of structured fields to construct a composite indexing mechanism that integrates semantic features and structured spatiotemporal / numerical constraints. This generates semantic vectors containing structured tag information rich in context and constraints. This allows subsequent searches to quickly locate the original document, table, and page number corresponding to the target parameters through structured tags, meeting the data traceability needs of professional fields, while also achieving accurate matching of specific numerical values and specification ranges, avoiding retrieval omissions or irrelevant results. This improves the recall accuracy and data availability of medical device documents in complex query scenarios. Ultimately, while ensuring data standardization and consistency, it enhances the intelligent level of document information utilization.
[0069] In one embodiment, such as Figure 2 As shown, the structured processing method for medical device data also includes the following steps: Step 210: In response to the data query request, perform semantic hybrid retrieval in the vector database based on the query keywords of the data query request to obtain candidate results.
[0070] In this embodiment, by using a multi-mode parallel retrieval approach, semantic information and numerical logic are combined, relevant results can be found through semantic matching, and precise filtering can be achieved through numerical constraints. While maintaining semantic flexibility, it also has the ability to strictly match numerical conditions, thus minimizing the omission of potential matching items in the retrieval results.
[0071] Semantic hybrid retrieval includes: similarity search, vector search with numerical filtering, and pure scalar range query. For example, for a user query request Q, the system first segments the query into multiple keywords. And then quantize. Subsequently, three parallel search paths are executed: (1) Similarity search based on semantic vectors: finding semantically similar records in the vector space; (2) Vector search with numerical filtering: For the numerical part of the query, the stored min_value and max_value are used for preliminary range filtering during vector search; (3) Pure scalar range query: filter directly using numerical constraint fields.
[0072] This multi-path architecture ensures that the system maximizes recall from different dimensions, without missing any potential matches.
[0073] Step 220: Aggregate and group the candidate results using the physical location fingerprint as the key to form an aggregation unit.
[0074] In this embodiment, candidate results are clustered using physical location fingerprints in structured tag information. Scattered text data originating from the same table, the same row, or having close topological relationships are reassembled into aggregation units that are more consistent with the context logic. This helps to preserve the complete row and column context of the table to which the data belongs, restore the structural meaning of the search results in the original document, and greatly enhance the readability, interpretability, and traceability of the search results.
[0075] For example, for all candidate results obtained from the hybrid retrieval, the system first uses their physical location fingerprint (filename) ,page number line number () is used as a key for aggregation and grouping.
[0076] Step 230: Calculate the comprehensive score based on keyword coverage, position priority, semantic matching confidence, and penalty score generated from compliance verification of structured fields.
[0077] Specifically, keyword coverage reflects the degree of concentration of keywords in the document space. The higher the coverage, the stronger the aggregation of candidate results in the same position.
[0078] For a specific aggregation unit C, the keyword coverage rate is calculated using the following formula: ; in, This represents the total number of keywords in the user's query. It refers to all positions within the aggregation unit. The set, Keywords The set of locations where it appears.
[0079] Position priority is used to assess the concentration of results. It can be divided into levels based on the concentration of keyword occurrences, using a discrete grading system.
[0080] Each keyword A corresponding set of matching positions is represented as follows: ; The set of all keyword matching positions in aggregation unit C is represented as follows: ; Where m is the total number of candidate results for the aggregation unit.
[0081] Based on this, the following sets are defined: This represents the set of files involved in the matching results; This represents the set of page numbers involved in the matching results; This represents the set of valid row numbers involved in the matching results; Based on the degree of dispersion of location distribution, the priority of aggregation units is assigned as follows: ; For aggregation units Final score for: ; in, Aggregation unit The number of entities in For entities For query The adjusted score.
[0082] The adjusted score includes rigorous medical device specification verification:
[0083] in, The semantic matching score is calculated from the similarity score. Penalty points are used to mark entities with non-compliant numerical values.
[0084] Numerical compliance verification function: For numeric keywords in the query : ; in, For entities The allowed numerical range for the corresponding structured field. The numerical increment step size, For tolerance, It is an integer.
[0085] Step 240: Sort the aggregated units based on the comprehensive score, and output the sorted aggregated units as the target retrieval results.
[0086] In this embodiment, the aggregation unit's comprehensive score for meeting the search request is quantified from multiple aspects, including keyword coverage, position priority, semantic matching confidence, and compliance verification penalty score, based on the comprehensiveness of the search, data saliency, content relevance, and data standardization. The scores are then sorted and output. This achieves both comprehensiveness and accuracy in the search, while also improving the readability and usability of the results. It ensures that the sorted results are not only relevant but also technically accurate and usable, better meeting the requirements of medical devices and other devices for parameter accuracy and structural rigor.
[0087] In one embodiment, the structured processing method for medical device data further includes: if the aggregation unit does not cover all query keywords, comparing the query keywords covered by the aggregation unit with all query keywords to determine the missing keywords; based on the topological relationship and semantic similarity corresponding to the candidate results in the aggregation unit, filtering the candidate results that match the missing keywords to determine the missing candidate results; and adding the missing candidate results to the aggregation unit that does not cover all query keywords.
[0088] In this embodiment, when an aggregation unit does not cover all query keywords, the missing keywords are accurately located. Then, by combining the topological relationships and semantic similarity of candidate results within the aggregation unit, the missing candidate results are filtered and filled into the corresponding aggregation unit. This ensures that each aggregation unit covers all query keywords, avoiding incomplete retrieval due to missing key information. Furthermore, the topological relationships ensure that the filled-in results are concentrated and strongly related to the original aggregation unit, while semantic similarity guarantees the relevance of the filled-in results. Ultimately, this results in more complete and logically coherent aggregate unit information, reducing the cost for users to piece together key information from multiple results and significantly improving the practicality and efficiency of search results.
[0089] For example, if a certain aggregation unit The keyword set did not fully cover the query keyword set. If this occurs, the completion logic will be triggered for the missing keywords. Search for the closest matching item among adjacent or semantically closest entities to find a suitable match. Add it to the aggregation unit to ensure that each aggregation unit is completed. At least cover all keywords .
[0090] The structured data processing method for medical devices provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0091] It should be noted that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0092] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0093] Furthermore, such as Figure 3 As shown, as a specific implementation of the above-mentioned structured processing method for medical device data, this application provides a structured processing device 300 for medical device data. The structured processing device 300 for medical device data includes: a table extraction module 301, an enhancement processing module 302, a data recognition module 303, an encoding module 304, a tag generation module 305, and a storage module 306.
[0094] Among them, the table extraction module 301 is used to extract the initial table from the medical device document based on the text recognition algorithm; Enhancement processing module 302 is used to reconstruct the row and column matrix based on the enhancement strategy corresponding to the type of the initial table to form a reference table; The data recognition module 303 is used to recognize the delimiters in the cells of the reference table and obtain the structured text data in the cells of the reference table based on the delimiters. Encoding module 304 is used to encode structured text data and generate its corresponding semantic vector; The tag generation module 305 is used to generate structured tag information for the semantic vector corresponding to the cell based on the physical location fingerprint and topological relationship of the cell in the reference table, as well as the structured fields of the structured text data. The structured fields are used to represent the specification numerical range and step size constraints of the structured text data. Storage module 306 is used to associate semantic vectors with their structured tag information and store them in a vector database to retrieve text data in medical device documents through structured tag information.
[0095] Furthermore, the initial table is a structured table; the enhanced processing module 302 is specifically used to traverse the table elements of the structured table, find the merged cells with the merge attribute in the structured table; determine the target area occupied by the merged cells in the structured table based on the merge attribute, wherein the target area consists of a logical main cell and at least one subordinate cell; fill the text data of the main cell in the target area into all subordinate cells based on the span mapping relationship corresponding to the merge attribute, and generate a reference table, wherein the span mapping relationship includes the mapping relationship from the subordinate cells occupied by the merge in the target area to their main cells.
[0096] Furthermore, the enhancement processing module 302 is also used to establish a mapping relationship between each cell in the reference table and the text box with visual coordinates in the structured table; if a conflict is detected between the cell and the text box, and the conflict type is a preset type, a conflict mark is generated for the cell; the cells with conflict marks in the reference table are re-divided based on the spatial distribution of the text boxes, and the text data recognized by the text recognition algorithm is filled into the re-divided cells.
[0097] Furthermore, the initial table is an unstructured table; the enhanced processing module 302 is specifically used to identify header rows that conform to the title characteristics in the text area of the unstructured table based on preset regular expression rules; perform horizontal projection analysis on the text area based on the header rows to identify the spatial alignment boundary of the header rows in the horizontal direction, and divide the text area into multiple data blocks based on the spatial alignment boundary, wherein each data block contains a header row and its associated subsequent text rows; perform grid-based splitting of the text rows based on the common delimiter of the unstructured table to form a multi-column grid, wherein the common delimiter is determined by statistically analyzing the frequency of occurrence of consecutive spaces, tabs, or a fixed number of punctuation marks in each text row; use the text data in the header row as the column name of the data block to which it belongs, and construct structured cells based on the text data of the multi-column grid associated with the title to form a reference table.
[0098] Furthermore, the enhanced processing module 302 is also used to count the number of cells corresponding to text data of each data type in each column of the reference table; calculate the proportion of cells in each column that conform to the mainstream data type as the column consistency score, where the mainstream data type is the data type with the most corresponding text data in each column; if the column consistency score is less than the score threshold or a preset semantic association pattern is detected between adjacent columns, then the abnormal rows are merged or split based on the preset rule base, where the rule base contains merging rules and splitting rules for specific data patterns.
[0099] Furthermore, the structured processing device 300 for medical device data also includes: The retrieval module (not shown in the figure) responds to data query requests by performing a semantic hybrid retrieval in the vector database based on the query keywords of the data query request to obtain candidate results. The semantic hybrid retrieval includes: similarity search, vector search with numerical filtering, and pure scalar range query. The candidate results are aggregated and grouped using physical location fingerprints as keys to form aggregate units. A comprehensive score is calculated based on keyword coverage, location priority, semantic matching confidence, and penalty scores generated by compliance verification of structured fields. The aggregate units are sorted based on the comprehensive score, and the sorted aggregate units are output as the target retrieval results.
[0100] Furthermore, the retrieval module is also used to compare the query keywords covered by the aggregation unit with all query keywords if the aggregation unit does not cover all query keywords, and determine the missing keywords; based on the topological relationship and semantic similarity corresponding to the candidate results in the aggregation unit, filter the candidate results that match the missing keywords to determine the missing candidate results; and add the missing candidate results to the aggregation unit that does not cover all query keywords.
[0101] Specific limitations regarding the structured processing device for medical device data can be found in the limitations of the structured processing method for medical device data described above, and will not be repeated here. Each module in the aforementioned structured processing device for medical device data can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0102] Based on the above, Figure 1 and Figure 2 Accordingly, embodiments of this application also provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. Figure 1 and Figure 2 The illustrated method is a structured processing approach for medical device data.
[0103] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.
[0104] Based on the above, Figure 1 and Figure 2 The method shown, and Figure 3 The virtual device embodiment shown is designed to achieve the above objectives, such as... Figure 4 As shown in the figure, this application embodiment also provides a computer device 400, which includes a processor 401 and a memory 402. The memory 402 stores a program or instructions that can run on the processor 401. When the program or instructions are executed by the processor 401, they implement the above-mentioned... Figure 1 The illustrated method is a structured processing approach for medical device data.
[0105] The memory 402 can be used to store software programs and various data. The memory 402 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 402 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 402 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0106] Processor 401 may include one or more processing units; optionally, processor 401 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 401.
[0107] Computer equipment can specifically include personal computers, servers, network devices, etc.
[0108] Optionally, the computer device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB ports, card reader ports, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, Wi-Fi interfaces), etc.
[0109] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0110] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platform, or it can be implemented by hardware.
[0111] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.
[0112] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A structured processing method for medical device data, characterized in that, The method includes: Initial tables are extracted from medical device documents using text recognition algorithms. The row and column matrix is reconstructed based on the enhancement strategy corresponding to the type of the initial table to form a reference table; Identify the delimiters within cells of the reference table, and obtain the structured text data within the cells of the reference table based on the delimiters; The structured text data is encoded to generate its corresponding semantic vector; Based on the physical location fingerprint and topological relationship of the cell in the reference table, and the structured fields of the structured text data, structured label information is generated for the semantic vector corresponding to the cell, wherein the structured fields are used to represent the specification numerical range and step size constraints of the structured text data; The semantic vector is associated with its structured tag information and stored in a vector database to retrieve text data in the medical device document using the structured tag information.
2. The structured processing method for medical device data according to claim 1, characterized in that, The initial table is a structured table; the process of reconstructing the cell row and column matrix based on an enhancement strategy corresponding to the type of the initial table to form a reference table includes: Traverse the table elements of the structured table and find the merged cells with the merge attribute in the structured table; Based on the merge attribute, the target area occupied by the merged cell in the structured table is determined, wherein the target area consists of a logical master cell and at least one subordinate cell; Based on the span mapping relationship corresponding to the merge attribute, the text data of the main cell in the target area is filled into all the subordinate cells to generate the reference table. The span mapping relationship includes the mapping relationship between the subordinate cells occupied by the merge in the target area and their main cells.
3. The structured processing method for medical device data according to claim 2, characterized in that, The method further includes: Establish a mapping relationship between each cell in the reference table and a text box with visual coordinates in the structured table; If a conflict is detected between the mapping relationship between the cell and the text box, and the conflict type is a preset type, a conflict flag is generated for the cell; Based on the spatial distribution of the text boxes, the cells in the reference table with the conflict markers are re-divided, and the text data recognized by the text recognition algorithm is filled into the re-divided cells.
4. The structured processing method for medical device data according to claim 1, characterized in that, The initial table is an unstructured table; the initial table is a structured table; the process of reconstructing the cell row and column matrix based on an enhancement strategy corresponding to the type of the initial table to form a reference table includes: The header rows that match the header characteristics in the text area of the unstructured table are identified based on preset regular expression rules. Based on the title line, the text region is subjected to horizontal projection analysis to identify the spatial alignment boundary of the title line in the horizontal direction, and the text region is divided into multiple data blocks based on the spatial alignment boundary, wherein each data block contains a title line and its associated subsequent text lines. The text lines are divided into grids based on the common delimiters of the unstructured table to form a multi-column grid. The common delimiters are determined by statistically analyzing the frequency of consecutive spaces, tabs, or a fixed number of punctuation marks in each text line. The text data in the header row is used as the column name of the data block to which it belongs, and a structured cell is constructed based on the text data of the multi-column grid associated with the header to form the reference table.
5. The structured processing method for medical device data according to claim 4, characterized in that, The method further includes: Count the number of cells corresponding to each type of text data in each column of the reference table; Calculate the percentage of cells in each column that conform to the mainstream data type, and use this percentage as the column consistency score. The mainstream data type is the data type with the most text data in each column. If the consistency score within a column is less than the scoring threshold or a preset semantic association pattern is detected between adjacent columns, then the abnormal rows are merged or split based on a preset rule base, wherein the rule base contains merging and splitting rules for specific data patterns.
6. The structured processing method for medical device data according to claim 1, characterized in that, The method further includes: In response to a data query request, a semantic hybrid retrieval is performed on the vector database based on the query keywords of the data query request to obtain candidate results. The semantic hybrid retrieval includes: similarity search, vector search with numerical filtering, and pure scalar range query. The candidate results are aggregated and grouped using the physical location fingerprint as the key to form an aggregation unit; A comprehensive score is calculated based on keyword coverage, position priority, semantic matching confidence, and penalty points generated from compliance checks on the structured fields. The aggregated units are sorted based on the comprehensive score, and the sorted aggregated units are output as the target retrieval results.
7. The structured processing method for medical device data according to claim 6, characterized in that, The method further includes: If the aggregation unit does not cover all query keywords, then compare the query keywords covered by the aggregation unit with all query keywords to determine the missing keywords; Based on the topological relationships and semantic similarities corresponding to the candidate results in the aggregation unit, the candidate results that match the missing keywords are filtered to determine the missing candidate results; The missing candidate results are added to the aggregation unit that does not cover all query keywords.
8. A structured processing device for medical device data, characterized in that, The device includes: The table extraction module is used to extract initial tables from medical device documents based on text recognition algorithms. The enhancement processing module is used to reconstruct the row and column matrix based on the enhancement strategy corresponding to the type of the initial table to form a reference table; The data recognition module is used to recognize the segmentation markers in the cells of the reference table and obtain the structured text data in the cells of the reference table based on the segmentation markers. The encoding module is used to encode the structured text data and generate its corresponding semantic vector; The tag generation module is used to generate structured tag information for the semantic vector corresponding to the cell based on the physical location fingerprint and topological relationship of the cell in the reference table and the structured fields of the structured text data. The structured fields are used to represent the specification numerical range and step size constraints of the structured text data. A storage module is used to associate the semantic vector with its structured tag information and store it in a vector database, so as to retrieve text data in the medical device document through the structured tag information.
9. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or instructions are executed by the processor, they implement the structured processing method for medical device data as described in any one of claims 1 to 7.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the structured processing method for medical device data as described in any one of claims 1 to 7.