An ai-based structured and unstructured case report identification method and system

CN122392781APending Publication Date: 2026-07-14北京康众时代医药科技集团有限公司
0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
北京康众时代医药科技集团有限公司
Filing Date
2026-05-19
Publication Date
2026-07-14

Smart Images

  • Figure CN122392781A_ABST
    Figure CN122392781A_ABST
Patent Text Reader

Abstract

This application provides an AI-based method and system for recognizing structured and unstructured medical reports, relating to the field of image equipment technology. The method determines the recognition type based on the layout features of the image data and loads template and OCR recognition configurations. Although a pre-process is introduced, it transforms global scanning into targeted feature extraction based on defined regions and introduces a separate OCR recognition configuration, reducing ineffective calculation of the scan area and achieving refined OCR recognition. Priority is then given to scanning and checking codes, utilizing the specificity of standard codes to establish a direct mapping channel for structured data. For unstructured text without code, similarity calculations are performed based on a dedicated database. This reduces the computational redundancy overhead of full-database comparison while minimizing multiple mapping mismatches caused by complex medical noise, thus improving the accuracy of medical report data conversion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image equipment technology, and in particular to an AI-based method and system for recognizing structured and unstructured case reports. Background Technology

[0002] In the medical field, a massive amount of case report files are currently generated. These files typically exist in the form of paper snapshots or rasterized electronic images. Because of the work of Clinical Research Coordinators (CRCs) and Clinical Research Assistants (CRAs), these case report files need to be imported into backend clinical data acquisition systems for centralized statistical analysis and medical monitoring. Therefore, automated algorithm tools are used to analyze these image data, transforming them from visual forms into structured data units that can be logically accessed by computers. This process is also called data entry.

[0003] Currently, related technologies typically employ optical character recognition (OCR) and semantic comparison frameworks to accomplish the aforementioned tasks. In practice, bounding box detection algorithms are used to linearly scan and extract characters from the entire original medical image according to a preset fixed scanning span and direction, generating a low-level text stream. Subsequently, to perform database entry, all extracted discrete text sequences are uniformly merged into a global semantic mapping layer. By calculating the cosine similarity or literal edit distance between each text feature vector and all entries in the central full-scale medical terminology database, the global entry with the highest similarity score is output as the final, fixed entry.

[0004] However, as the types of case report files increase, more noise is introduced, such as jumps in the underlying two-dimensional spatial topology of images or irregular arrangements of text length and position, which can easily reduce the accuracy of case report data conversion. Summary of the Invention

[0005] This application provides an AI-based method and system for identifying structured and unstructured case reports, which can improve the accuracy of case report data conversion.

[0006] Firstly, this application provides an AI-based method for recognizing structured and unstructured case reports, comprising: performing image encoding preprocessing on the original case image to obtain encoded image data; determining the recognition type of the original case image based on the layout features of the encoded image data; wherein the recognition type is a structured case or an unstructured case; determining the corresponding template configuration and OCR recognition configuration based on the recognition type; performing block recognition on the encoded image data according to the division region specified by the template configuration to obtain a field name-field value mapping table containing coordinate and confidence information; parsing the field units in the field name-field value mapping table to determine whether the field unit contains inspection code; if the field unit contains inspection code, then the field unit is used as the matching result; if the field unit does not contain inspection code, then the database corresponding to the field unit is determined according to the OCR recognition configuration; calculating the similarity between the field of the field unit and the database to obtain a similarity score; filtering the similarity score according to the matching threshold loaded in the OCR recognition configuration to obtain a matching result; and summarizing the matching results to obtain the case recognition result.

[0007] By adopting the above technical solution, the recognition type is determined based on the layout characteristics of the image data, and template configuration and OCR recognition configuration are loaded. Although a pre-process is introduced, the global scan is transformed into targeted feature extraction based on a limited region. Furthermore, the introduction of a separate OCR recognition configuration reduces the invalid calculation of the scan area, achieving refined OCR recognition. Code is then scanned first, and the specificity of standard code is used to establish a direct mapping channel for structured data. For unstructured text without code, similarity calculation is performed based on a dedicated database. This reduces the redundant computing power overhead of full database comparison while reducing multiple mapping mismatches caused by complex medical noise, thus improving the accuracy of case report data conversion.

[0008] In conjunction with some embodiments of the first aspect, in some embodiments, after summarizing the matching results to obtain the case identification results, the method further includes: if the identification type of the original case image belongs to unstructured cases, then extracting the punctuation distribution features of the matching results; extracting the index coordinates of the delimiters in the matching results based on the punctuation distribution features, and calculating the character span variance between adjacent delimiters; determining whether the character span variance is less than a preset dispersion threshold; if the character span variance is less than the dispersion threshold, then segmenting the matching results based on the index coordinates of the delimiters to obtain a first independent semantic sentence; if the character span variance is not less than the dispersion threshold, then segmenting the matching results based on the similarity calculation and the matching threshold... The selected matching results are used to extract text fragments and position sequences that match the preset anatomy categories in the database, resulting in organ characters and their coordinates. Based on the organ character coordinates, the associated component boundaries are expanded to both sides to determine the semantic attribution interval of the modifying context containing the organ characters. Text is then truncated based on the semantic attribution interval to obtain the second independent semantic sentence. The organ characters contained in the first or second independent semantic sentence are extracted as structured field names, and the corresponding first or second independent semantic sentence is used as the structured field value. The matching results are then reorganized into a subfield name-field value mapping table, and the case identification results are updated.

[0009] By employing the aforementioned technical solutions, punctuation distribution characteristics and character span variance are extracted for unstructured cases to quantitatively assess the physical layout patterns of long texts. For continuous prose with unbounded characters and large span variance, target organ characters and position sequences are extracted using anatomical categories in the database. These sequences serve as the core probe, expanding outwards to define semantically relevant intervals that consider the core organs and their pathological modifiers. Finally, secondary mapping tables are extracted and reconstructed. This process reduces the dimensionality of lengthy unstructured prose and reconstructs it into clearly structured tables, making the data more accessible and detailed for Clinical Research Coordinators (CRCs) and Clinical Research Assistants (CRAs).

[0010] In conjunction with some embodiments of the first aspect, in some embodiments, the similarity calculation of the fields of the field unit with the database is performed to obtain a similarity score. Specifically, this includes: performing a similarity calculation of the fields of the field unit with the preset anatomy categories within the database to obtain a similarity score; and determining the semantic belonging interval of the modifying context containing the organ character by expanding the boundary of the associated components to both sides based on the organ character coordinates, based on the matching results, the method further includes: performing a similarity calculation of the fields in the field unit excluding the organ character with the preset transition words within the database to obtain a similarity score; and filtering the similarity score according to the matching threshold loaded in the OCR recognition configuration to obtain transition words.

[0011] By adopting the above technical solution, since the database corresponding to the field unit still contains medical terms of various dimensions, overall comparison is prone to similarity scoring bias due to overlapping word features. To address this, a more granular preset anatomy category sub-library and preset transition word sub-library are used for step-by-step matching. The anatomy category identifier in the field is extracted first to match and locate organ characters, and then the organ character is removed. Only the remaining modifying text is independently matched in the transition word sub-library to determine the context reversal marker, which improves the reliability of the similarity scoring results. At the same time, the independently extracted organ anchor points and transition word points provide a guarantee for subsequent execution of context-based semantic boundary diffusion.

[0012] In conjunction with some embodiments of the first aspect, in some embodiments, the step of determining the recognition type of the original case image based on the layout features of the encoded image data specifically includes: performing a binarization transformation and connected component analysis algorithm on the encoded image data to extract the horizontal and vertical pixel projection histogram parameters constituting the layout features; if the frequency of the grid-like pixel distribution in the horizontal and vertical pixel projection histogram parameters is greater than a frequency threshold, the case is determined to be a structured case, and a similarity judgment is made with the template configuration belonging to a structured case to determine the recognition type; if the frequency of the grid-like pixel distribution in the horizontal and vertical pixel projection histogram parameters is not greater than a frequency threshold, the case is determined to be an unstructured case, and a similarity judgment is made with the template configuration belonging to an unstructured case to determine the recognition type.

[0013] By adopting the above technical solution, when determining the image recognition type, we can perform binarization transformation and connected component analysis at the underlying level, extract the pixel projection histogram parameters in the horizontal and vertical directions, and reduce the complex two-dimensional image visual layout into a one-dimensional mathematical frequency signal that can be quantized and aggregated by the machine. By comparing the grid-like distribution frequency with the preset frequency threshold, we can determine whether the image is a regular structured test form or unstructured pathological content.

[0014] In conjunction with some embodiments of the first aspect, in some embodiments, the step of calculating the similarity between the field of the field unit and the database to obtain a similarity score specifically includes: calculating the literal editing step size parameter between the field and the term string in the database; calculating the feature distance between the text feature fingerprint of the field and the term fingerprint in the database; and combining the literal editing step size parameter and the feature distance to calculate a weighted similarity score.

[0015] By adopting the above technical solution, a cross-dimensional fusion evaluation algorithm foundation was constructed when performing similarity calculations on fields without standard codes. On the one hand, the literal editing step size parameter between the text and the database was calculated to capture and quantify the microscopic single-character spelling distortions caused by OCR recognition errors. On the other hand, text feature fingerprints were extracted and feature distances were calculated to anchor the underlying semantic structure of medical sentence stems from a macroscopic perspective. The literal variability and fingerprint feature distance were combined and weighted to construct a similarity calculation method that integrates local feature comparison with multi-dimensional fingerprint inference.

[0016] In conjunction with some embodiments of the first aspect, in some embodiments, the step of filtering the similarity scores according to the matching threshold loaded in the OCR recognition configuration to obtain the matching results specifically includes: when there are similarity scores greater than or equal to two matching thresholds corresponding to a field unit, combining the conflicting entries to construct a candidate matching subset and extracting the corresponding confidence information; calculating the corresponding similarity score and confidence information for the comparison entry to generate an arbitration weight value; calculating the weight value including product operation or weighted summation operation; filtering the entry with the largest arbitration weight value from the candidate matching subset and determining it as the matching result.

[0017] By adopting the above technical solution, when there are multiple similarity scores that meet the criteria, the underlying visual confidence information assigned during the image segmentation stage is retrieved back to the front end. By performing a product operation or weighted summation on the similarity score that represents the semantic fit of the back end and the confidence score that represents the image clarity of the front end, a fusion arbitration weighted value that takes into account both textual logic and visual confidence features is generated to further improve the recognition accuracy of the field.

[0018] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of summarizing the matching results to obtain the case identification results, the method further includes: extracting a preset privacy field identifier from the OCR recognition configuration; matching the privacy field identifier in the field name-field value mapping table to filter out the target privacy field unit, and extracting the spatial coordinate matrix corresponding to the target privacy field unit; and performing image desensitization processing on the corresponding area of ​​the original case image based on the spatial coordinate matrix.

[0019] By employing the aforementioned technical solution, after the final structured aggregation of all data is completed, privacy field identifiers are obtained from the identification configuration rules. These identifiers serve as targeted probes to delve into the underlying field name-field value mapping table, extracting a specific spatial coordinate matrix encompassing sensitive identity information. Subsequently, based on the closed axial physical boundaries provided by this spatial matrix, an irreversible image masking operation is performed at fixed points on the original case image, thus preserving most of the content of the original case image while shielding the privacy of the subject's identity.

[0020] Secondly, this application provides an AI-based structured and unstructured case report recognition system, which includes: one or more processors and a memory; the memory is coupled to one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors invoke the computer instructions to cause the AI-based structured and unstructured case report recognition system to perform the method described in the first aspect and any possible implementation thereof.

[0021] Thirdly, this application provides a computer program product containing instructions that, when the computer program product is run on an AI-based structured and unstructured case report recognition system, cause the AI-based structured and unstructured case report recognition system to perform the method described in the first aspect and any possible implementation thereof.

[0022] Fourthly, this application provides a computer-readable storage medium including instructions that, when executed on an AI-based structured and unstructured case report recognition system, cause the AI-based structured and unstructured case report recognition system to perform the method described in the first aspect and any possible implementation thereof.

[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0024] 1. Based on the layout features of the image data, the recognition type is determined and template configuration and OCR recognition configuration are loaded. Although a pre-process is introduced, the global scan is transformed into targeted feature extraction based on a limited region. Furthermore, the introduction of a separate OCR recognition configuration reduces the invalid calculation of the scan area, achieving refined OCR recognition. Code is then scanned first, and the specificity of standard code is used to establish a direct mapping channel for structured data. For unstructured text without code, similarity calculation is performed based on a dedicated database. This reduces the redundant computing power overhead of full database comparison while reducing multiple mapping mismatches caused by complex medical noise, thus improving the accuracy of case report data conversion.

[0025] 2. Punctuation distribution characteristics and character span variance are extracted from unstructured case studies to quantitatively assess the physical layout patterns of long texts. For continuous prose with large span variance and no delimiters, target organ characters and position sequences are extracted using anatomical categories in the database. This serves as the core probe, expanding outwards to define semantically relevant intervals that consider the core organs and their pathological modifiers. Finally, secondary mapping tables are extracted and reconstructed. This process reduces the dimensionality of lengthy unstructured prose and reconstructs it into clearly structured tables, making the data more accessible and detailed for Clinical Research Coordinators (CRCs) and Clinical Research Assistants (CRAs).

[0026] 3. Because the database corresponding to each field unit still contains medical terms from multiple dimensions, overall comparison is prone to similarity scoring bias due to overlapping word features. To address this, a more granular pre-defined anatomy category sub-library and a pre-defined transition word sub-library are used for step-by-step matching. Anatomy category identifiers are extracted from the field first to match and locate organ characters. Then, the organ characters are removed, and only the remaining modifying text is independently matched in the transition word sub-library to determine context reversal markers. This improves the reliability of the similarity scoring results. Simultaneously, the independently extracted organ anchor points and transition word sites provide a guarantee for subsequent context-based semantic boundary diffusion. Attached Figure Description

[0027] Figure 1 This is a flowchart illustrating an AI-based method for identifying structured and unstructured case reports in an embodiment of this application.

[0028] Figure 2 This is a schematic diagram of a structured case in an embodiment of this application;

[0029] Figure 3 This is a schematic diagram of an unstructured case in an embodiment of this application;

[0030] Figure 4 This is a schematic diagram of the case identification results of the structured case in the embodiments of this application;

[0031] Figure 5 This is a schematic diagram of the case identification results of unstructured cases in an embodiment of this application;

[0032] Figure 6 This is an exemplary hardware structure diagram of an AI-based structured and unstructured case report recognition system in this application embodiment. Detailed Implementation

[0033] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.

[0034] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0035] Please see Figure 1 , Figure 1 This is a flowchart illustrating an AI-based method for identifying structured and unstructured case reports in an embodiment of this application.

[0036] An AI-based method for identifying structured and unstructured case reports:

[0037] S101. Perform image coding preprocessing on the original case images to obtain coded image data;

[0038] In this context, raw case images refer to unstructured medical document images acquired through image acquisition equipment in clinical trial settings, encompassing various formats such as laboratory test reports and gastrointestinal endoscopy reports. Encoded image data represents the low-level pixel data stream, which has been preprocessed and transformed into a standard serialized format that computers can read and transmit.

[0039] Specifically, by transforming the pixel array in multiple dimensions, the interference noise introduced by the physical acquisition environment is reduced, the contrast between the foreground text features and the background is enhanced, and finally the non-standard two-dimensional visual matrix is ​​encapsulated into a unified network transmission code (such as Base64 format).

[0040] Please see Figure 2 and Figure 3 , Figure 2 This is a schematic diagram of a structured case in an embodiment of this application; Figure 3 This is a schematic diagram of an unstructured case in an embodiment of this application;

[0041] S102. Determine the recognition type of the original case image based on the layout characteristics of the coded image data; wherein the recognition type is either a structured case or an unstructured case.

[0042] Among them, layout features refer to the global topological structure parameters formed by pixel clusters, white space distribution, and geometric lines within the image, reflecting the spatial arrangement logic of text blocks on the page. Recognition type represents the processing strategy label determined by the system for the current image classification decision, which determines the direction of subsequent data parsing. Structured case reports refer to report types with a clearly gridded page layout, strict row and column relationships, and explicit key-value pair mappings (such as routine blood biochemistry test reports). Unstructured case reports refer to report types that are primarily descriptive in natural language, lack fixed format boundaries, and have freely generalized paragraph logic (such as pathology biopsy reports and endoscopic examination descriptions).

[0043] It should be noted that for case report archives, the underlying layout features of coded image data of the same type are relatively fixed, while there are significant differences between different types of coded image data.

[0044] Meanwhile, in some embodiments, the identification type can be a basic label used to distinguish case categories, i.e., only distinguishing between structured cases and unstructured cases; in other embodiments, the identification type can also be a specific report type further subdivided under the above-mentioned basic category, such as an electronic gastroscopy report under an unstructured case, or a blood routine test report under a structured case. It is understood that regardless of whether the identification type is set as a basic category or a specific report type, the method provided in this application can perform matching based on the corresponding layout features and achieve the extraction and identification of various types of case images.

[0045] In some specific embodiments, step S102 specifically includes:

[0046] S1021. Perform binarization transformation and connected component analysis algorithms on the encoded image data to extract the horizontal and vertical pixel projection histogram parameters that constitute the layout features.

[0047] Binarization refers to the preprocessing of an image where continuous multi-level grayscale or color pixel values ​​caused by ambient lighting are divided into pure black or pure white states according to a set mathematical threshold. Connected component analysis algorithms are computer vision methods used to find and mark adjacent sets of identical pixels in a binary black-and-white image space, thereby outlining independent graphic blocks or continuous line edges. Horizontal and vertical pixel projection histogram parameters are serialized feature datasets generated by performing penetrating integration operations on black background or black line pixels along the X and Y axes of the image coordinate system, reflecting the spatial density of the row and column layout within the page.

[0048] Specifically, to enable AI to recognize complex medical record layouts, image processing is first used to eliminate interference from paper backgrounds, vignetting, and lighting. Using binarization, the medical scan image is converted into a binary image, highlighting the table lines and dense text outlines on the form. Then, connected component analysis is introduced, performing topological probing within the two-dimensional matrix to extract connected, elongated black pixel clusters, as these typically represent physical borders or alignment lines. Next, these non-blank pixels are accumulated along both the horizontal and vertical orthogonal dimensions, transforming the two-dimensional graphic structure into one-dimensional histogram fluctuation data.

[0049] S1022. If the frequency of grid-like pixel distribution in the horizontal and vertical pixel projection histogram parameters is greater than the frequency threshold, it is judged as a structured case, and a similarity judgment is made with the template configuration belonging to the structured case to determine the identification type.

[0050] The frequency of the grid-like pixel distribution refers to the cumulative frequency value of abrupt peak pulses detected in the aforementioned projection histogram sequence signal, exhibiting obvious physical fixed gaps or perpendicular orthogonal intersection characteristics. The frequency threshold is a baseline predetermined by the system architecture for determining the boundary between tabular data systems and text data systems.

[0051] It should be noted that the identification type here refers to the specific report types further subdivided under the above basic categories.

[0052] S1023. If the frequency of the grid-like pixel distribution in the horizontal and vertical pixel projection histogram parameters is not greater than the frequency threshold, it is judged as an unstructured case, and a similarity judgment is made with the template configuration belonging to unstructured cases to determine the identification type.

[0053] As can be seen, when determining the image recognition type, binarization transformation and connected component analysis are performed to extract the pixel projection histogram parameters in the horizontal and vertical directions, transforming the two-dimensional image visual layout into a one-dimensional mathematical frequency signal that can be quantified and aggregated by the machine. By comparing the grid-like distribution frequency with a preset frequency threshold, it is possible to determine whether the image is a regularly structured examination report or unstructured pathological content.

[0054] S103. Determine the corresponding template configuration and OCR recognition configuration based on the recognition type;

[0055] The template configuration refers to the set of spatial mapping rules pre-stored in the database, which defines the two-dimensional physical coordinate boundaries of the area to be extracted and the parsing and positioning order; the OCR recognition configuration covers rules and requirements such as field type, matching threshold, and desensitization rules.

[0056] Specifically, due to the differences in the layout of different original case images, using a uniform global scan would result in high computational costs and noise interference. Therefore, template configuration and OCR recognition configuration are used for recognition, which narrows the analysis scope and transforms the global scan into feature extraction based on preset target regions. This improves data processing throughput while reducing the recognition error rate caused by irrelevant noise.

[0057] S104. According to the partitioned regions specified in the template configuration, the encoded image data is segmented for recognition to obtain a field name-field value mapping table containing coordinate and confidence information.

[0058] In this context, "region segmentation" refers to several regions of interest defined by the template configuration file, which form multiple independent closed polygons on the pixel plane. "Block recognition" refers to performing a recognition task on each region of interest. "Confidence information" refers to the probability values ​​that the AI ​​model evaluates for the output text results. The field name-field value mapping table represents the data dictionary structure formed between extracted fields such as "test item name" and their corresponding "specific test result values."

[0059] Specifically, after acquiring the encoded image data, the entire image is cropped into several independent regions of interest (ROIs) according to the spatial coordinate indices defined in the template configuration. Subsequently, the previously loaded OCR recognition configuration is read, the preset field types (such as pure numbers, Chinese and English strings, etc.) within the current ROI are parsed, and the corresponding AI recognition model is dynamically invoked to perform partial block recognition accordingly.

[0060] It should be noted that, theoretically, this step requires decomposing each field in the original case image into three dimensions: text content (field name or field value), spatial coordinates, and confidence score. However, in the actual calculation process, a strategy of performing full extraction on all regions was not adopted. Instead, a segmented processing was performed based on the inherent layout rules of medical reports.

[0061] The first dimension, based on the semantic and spatial features of the information itself, divides the character blocks to be extracted into two main categories:

[0062] The first type is constant information blocks. This type of information represents prefixes or headings with fixed content and locations in the report (e.g., labels like "Name:" or "Medical Record Number:" printed on forms). For this type of information, there is no need to initiate actual semantic recognition and coordinate verification. Instead, the default values ​​in the template configuration are directly inherited, treating it as semantically recognized, with known coordinates and a confidence level set to the preset maximum value.

[0063] The second type is non-constant information blocks. This type of information represents fill-in content that changes depending on the patient's actual medical situation (e.g., the patient's specific name or laboratory values). This application further subdivides this type of information into two categories:

[0064] Restricted non-constant information blocks: These refer to clinical data whose value range and physical location are constrained under specific medical knowledge. For example, platelet count values ​​are usually limited to a reasonable range and appear in specific cells of a table, without outputting abnormal values ​​outside the preset range. For such information blocks, the system directly inherits the known coordinates from the template configuration and assigns the confidence level to the set maximum value.

[0065] Hash-type non-constant information blocks: These refer to natural language records that lack fixed numerical boundaries and specific location constraints, such as the attending physician's observation conclusions and ward round records. Their feature scale has a clear tendency to diverge, so it is necessary to identify them simultaneously based on three dimensions: text content (field name or field value), spatial coordinates, and confidence level.

[0066] The second dimension, based on the layout structure characteristics of the image presentation, distinguishes medical record layers into two basic layouts:

[0067] One is explicit grid layout (i.e., table-like structured view). In this layout, taking dense black line constraints as an example, it actually contains not only constant information blocks (such as column names "inspection items"), but also restricted non-constant information blocks (such as measured values ​​"5.4").

[0068] The second type is implicit continuous text layout (i.e., paragraph-based unstructured views). In this type of layout, although there is a lack of separating borders on a macro level, constant information blocks are still mixed in between the lines of text (such as the content words "diagnostic opinion:" at the beginning of paragraphs), accompanied by a large amount of hash-type non-constant descriptive sequence text.

[0069] In conclusion, both structured and unstructured cases often exist in a mixed state in real medical scenarios.

[0070] Given the combined characteristics of the two underlying dimensions mentioned above, a multi-dimensional matching strategy is implemented through joint scheduling template configuration and OCR recognition configuration. On the one hand, for constant information blocks at specific locations in structured cases, since their content and pixel planar coordinates are stable over a long period, the system will call the configuration parameters during block recognition, directly inheriting the pre-registered macroscopic outline coordinates as the physical calibration of the region, and assigning the set maximum confidence information to this mapping relationship. On the other hand, the system will allocate computational resources primarily to the decoding of non-constant information blocks. Once such a region is hit: if it is determined to be restricted, the system will apply a baseline threshold and numerical pattern verification for filtering and verification; if it is determined to be hashed, a similarity model for long text sequences will be used for deep medical logic comparison to achieve the effectiveness of the data conversion process and the stability of system operation.

[0071] S105. Parse the field cells in the field name-field value mapping table and determine whether the field cells contain check code;

[0072] In this context, a field unit refers to the granularity of basic logical operations extracted from the mapping table. It typically contains a complete set of associated information for a test item (field name, field value, coordinates, confidence level, etc.). A test code refers to a standardized character sequence assigned to a specific pathological feature or test item within the healthcare industry for the purpose of unifying communication standards (such as the common LOINC code or the alphanumeric sequential code built into a hospital HIS system).

[0073] The field unit described in this application does not refer to a single isolated text character, but rather a composite data structure unit with complete semantic association. Specifically, each field unit contains paired attribute identifiers and attribute contents (for example, a key-value pair entity composed of "name" as the field name and the corresponding specific name as the field value).

[0074] Specifically, in medical information processing, compared to Chinese natural language descriptions containing synonyms and abbreviation variations, standardized examination codes have higher semantic specificity and matching uniqueness in the system database. Therefore, this step constructs a data evaluation and diversion channel in the underlying algorithm logic by prioritizing the retrieval of examination codes in field units; this aims to reduce the computational overhead of subsequent full-text similarity matching, improving the speed of core indicator extraction while ensuring the accuracy of structured medical data mapping.

[0075] S106. If a field cell contains check codes, then the field cell is used as the matching result.

[0076] The matching result represents a qualified data entity that, after verification, meets the set confidence level conditions and is used for persistent data storage or sent to the CRA for remote distribution and display.

[0077] Specifically, if the standardized check code attached to the field unit has been successfully extracted and verified during the front-end parsing process, given the high semantic specificity of medical check codes within their defined domain, the system can modify the legality flag status bit of the field unit, serialize it, and encapsulate it into a matching result object acceptable to the downstream data end.

[0078] S107. If the field unit does not contain inspection code, determine the database corresponding to the field unit according to the OCR recognition configuration;

[0079] Here, the database refers to a collection of specialized terminology dictionaries in a restricted field established for the purpose of approving medical terminology (such as an anatomical terminology database, pathology dictionary, endoscopic specialty characterization database, etc.).

[0080] S108. Calculate the similarity between the fields of the field unit and the database to obtain a similarity score;

[0081] Here, "field" refers to a plain text string variable extracted from OCR image slices, representing the original text description of a specific test requirement or symptom in the medical record. Similarity calculation refers to the quantitative deduction operation that uses mathematical algorithm models to measure the degree of overlap between two text strings in literal editing patterns or deep semantic vector space. Similarity score is a normalized floating-point score output after the calculation logic is executed, used to calibrate the degree of feature similarity between the text to be tested and a certain entry in a standard medical terminology database.

[0082] In some specific embodiments, step S108 specifically includes:

[0083] S1081, Literal editing step size parameter between calculated fields and terminology strings in the database;

[0084] The terminology string refers to standard medical or pathological English-Chinese terms pre-stored in the data persistence layer, system knowledge graph library, or in-memory dictionary. The literal editing step size parameter is a quantitative evaluation value (usually measured using the Levenshtein algorithm) representing the minimum number of basic operations required to convert the currently erroneous identification field into the target benchmark terminology string through character-by-character insertion, deletion, or replacement operations.

[0085] Specifically, the algorithm first measures the physical similarity between the word and benchmark terms in terms of literal form. This involves acquiring slices of the original recognition field and aligning them with standard test term strings from the database. Simultaneously, a dynamic programming matrix is ​​derived and verified in system memory, with the algorithm recording the total operational overhead required to add, delete, or replace incorrect Chinese characters. This cost data is the literal editing step size parameter, which directly reflects the basic confidence in the literal proximity of two word strings.

[0086] S1082. Calculate the feature distance between the text feature fingerprint of the field and the term fingerprint in the database;

[0087] Among them, text fingerprint refers to using hash cryptography or deep neural networks of natural language processing to map plaintext of varying lengths into a set of fixed-dimensional numerical sequences or tensor representations, used to represent the inherent semantic logic of the text. Term fingerprint refers to standard test pathology terminology characters existing in a fixed database, converted using the same encoding mechanism to generate a control feature identifier string. Feature distance is a parameter used to measure the magnitude of difference in the extracted numerical identifiers from these two abstractions within a multidimensional space.

[0088] Specifically, searching for matches solely based on literal features of misplaced characters (i.e., literal editing steps) can easily lead to misjudgments. Medical terminology commonly contains homophones and even lab test items with no shared characters but representing the same meaning. Therefore, the system delves into deep semantic dimensions for computational consideration. The system first performs natural language feature processing on the extracted test fields, extracting their pinyin pronunciation, radical components, or model-learned latent meanings to generate a specially crafted digital summary (i.e., text feature fingerprint). Simultaneously, it retrieves pre-coded fingerprints of similarly formatted baseword entries from the database. Finally, a mapping metric mechanism compares the geometric intervals of the two entries within a multi-dimensional computational projection space, thereby quantifying the abstract mathematical distance.

[0089] S1083. The similarity score is obtained by combining the literal editing step size parameter and the feature distance in a weighted calculation.

[0090] Among them, the combined weighted calculation refers to merging the measurement items of two independent evaluation dimensions into a unified logical scoring mathematical operation mechanism by configuring weight coefficients or using a product superposition mechanism. The similarity score refers to the result of unified output mapping quantitative numerical form after the dual parameter convergence of appearance comparison and internal semantic feature detection, which is used to intuitively calibrate the semantic similarity between the uncertain text to be identified and its corresponding standard terms in the database.

[0091] Specifically, relying solely on literal feature comparison can easily accumulate shape-related recognition errors, while depending solely on semantic features may lead to the loss of local fine-grained features; therefore, a comprehensive balance needs to be struck. A specific proportional algorithm is used to assign corresponding weight coefficients (e.g., a weighted combination of 0.4 and 0.6 based on morphology and features); finally, an additive or filtering mechanism is used to obtain a comprehensive numerical representation score, i.e., the similarity score.

[0092] As can be seen, when there are multiple similarity scores that meet the criteria, the underlying visual confidence information assigned during the image segmentation stage is retrieved back to the front end. By performing a product operation or weighted summation on the similarity score that represents the semantic fit of the back end and the confidence score that represents the image clarity of the front end, a fusion arbitration weighted value that takes into account both textual logic and visual confidence features is generated, thereby further improving the recognition accuracy of the field.

[0093] S109. Based on the similarity score, filter according to the matching threshold loaded in the OCR recognition configuration to obtain the matching result;

[0094] The matching threshold refers to a pre-existing baseline in system memory or a recognition configuration file, used to set the tolerance boundary for fuzzy matching of medical terms. Filtering refers to the process of judging and eliminating data associations that do not meet the matching threshold requirements. The matching result here refers to the text key-value combination after scoring and filtering, representing the completion of the conversion and mapping from natural language to a structured dictionary.

[0095] In some embodiments, step S109 specifically includes:

[0096] S1091. When there are similarity scores greater than or equal to two matching thresholds corresponding to a field unit, the conflicting entries are combined to form a candidate matching subset, and the corresponding confidence information is extracted.

[0097] Conflicting entry combinations refer to sets of entries with associated conflicts that occur when traversing a medical database. This is because overlapping or ambiguous similarity of the source text results in a source field being matched with two or more standard dictionary entries, each with a similarity score higher than or equal to a preset matching threshold. Candidate matching subsets are specific data containers allocated in memory by the system to temporarily isolate and store these conflicting entry combinations for subsequent secondary arbitration.

[0098] S1092. Calculate the corresponding similarity score and confidence information for the comparison item to generate the arbitration weighted value; the calculation includes product operation or weighted summation operation;

[0099] Among them, product operation and weighted summation operation refer to two numerical fusion operation methods, which involve directly multiplying two data indicators to amplify the difference verification, or performing linear superposition after configuring corresponding external bias parameters.

[0100] S1093. Select the entry with the largest arbitration weight value from the candidate matching subset and determine it as the matching result;

[0101] Among them, the item with the highest arbitration weight value refers to the unique object with the highest comprehensive evaluation value among all the comparison items covered in the candidate matching subset after the above multi-dimensional parameter weighting or product fusion calculation is completed.

[0102] As can be seen, when there are multiple similarity scores that meet the criteria, the underlying visual confidence information assigned during the image segmentation stage is retrieved back to the front end. By performing a product operation or weighted summation on the similarity score that represents the semantic fit of the back end and the confidence score that represents the image clarity of the front end, a fusion arbitration weighted value that takes into account both textual logic and visual confidence features is generated, thereby further improving the recognition accuracy of the field.

[0103] Please see Figure 4 , Figure 4 This is a schematic diagram of the case identification results of the structured case in the embodiments of this application;

[0104] S110. Summarize the matching results to obtain the case identification results.

[0105] In this context, "aggregation" refers to an integrated merging behavior that involves assembling, merging, and reclassifying data within computer memory.

[0106] As can be seen, although determining the recognition type and loading template and OCR recognition configurations based on the layout features of image data introduces a pre-process, it transforms global scanning into targeted feature extraction based on limited regions. Furthermore, the introduction of separate OCR recognition configurations reduces ineffective calculations of the scanning area, achieving refined OCR recognition. Prioritizing the scanning of code, the specificity of standard code is used to establish a direct mapping channel for structured data. For unstructured text without code, similarity calculations are performed based on a dedicated database. This reduces the computational overhead of full-database comparisons while minimizing multiple mapping mismatches caused by complex medical noise, thus improving the accuracy of case report data conversion.

[0107] S111. Extract the preset privacy field identifier from the OCR recognition configuration;

[0108] Among them, the privacy field identifier is used to indicate the sensitive character sequence set in the above control file that can be associated with or traced back to real identity characteristics (such as patient name, medical treatment identity association number, contact number, etc.).

[0109] Specifically, after extracting structured medical indicator data for medical research, the transfer of related files typically requires review by external clinical research institutions (such as CRA verification). Due to medical data compliance and privacy protection laws, the output source data image pages must not reveal any non-disease characteristics that could reveal the patient's true identity. Therefore, this final step requires a privacy-protecting pre-screening process.

[0110] S112. Match the target privacy field unit in the field name-field value mapping table according to the privacy field identifier, and extract the spatial coordinate matrix corresponding to the target privacy field unit;

[0111] Among them, the spatial coordinate matrix refers to a two-dimensional numerical array group that is synchronously retained during the preceding character image raster reading stage, and is used to depict the exact location, width and height boundary data, etc. of the field paragraph in the coordinate system of the entire original two-dimensional check sheet image.

[0112] Specifically, after obtaining the privacy field identifier representing the patient's personal privacy information, the extracted privacy field identifier is used as the discrimination criterion to traverse the field name-field value mapping table and perform a matching operation. When a specific item in the mapping table matches the aforementioned privacy field identifier, it is determined and filtered as the target privacy field unit for which image masking operation needs to be performed. In order to achieve effective coverage of plaintext entities on the physical layer corresponding to the original input image, the initial coordinate points of the target privacy field unit are extracted and combined with the internal coordinate matrix set in the OCR recognition configuration to generate the spatial coordinate matrix corresponding to the target privacy field unit.

[0113] S113. Perform image desensitization processing on the corresponding regions of the original case image based on the spatial coordinate matrix.

[0114] As can be seen, after the final structured aggregation of all data is completed, privacy field identifiers are obtained from the identification configuration rules. These identifiers are then used as directional probes to delve into the underlying field name-field value mapping table, extracting a specific spatial coordinate matrix encompassing sensitive identity information. Subsequently, based on the closed axial physical boundaries provided by this spatial matrix, an irreversible image masking operation is performed at fixed points on the original case images. This ensures that while protecting the privacy of the subjects' identities, most of the content of the original case images is preserved.

[0115] In actual use, step S110 is laid out and summarized in the form of a field name-field value mapping table. However, in some unstructured cases, the field values ​​may be too long. For example, in the analysis of electronic gastroscopy, the field values ​​may be hundreds of characters long, resulting in the output recognition results being coarsely superimposed. This makes it difficult for subsequent clinical research coordinators (CRCs) and monitors (CRAs) to read the data, thus reducing the automation efficiency and usability of clinical data extraction.

[0116] Therefore, in some embodiments, after step S110, the following steps are also included:

[0117] S201. If the recognition type of the original case image belongs to unstructured cases, then extract the punctuation distribution features of the matching results.

[0118] Among them, the punctuation distribution feature is used to represent the set of position indices of various punctuation marks (such as commas, periods, semicolons, etc.) in the text sequence, as well as their spatial density information in the entire text sequence.

[0119] S202. Extract the index coordinates of the delimiter in the matching result based on the distribution characteristics of punctuation marks, and calculate the character span variance between adjacent delimiters;

[0120] Here, delimiters refer to specific types of punctuation marks (such as semicolons, periods, or sequence numbers) that have the function of blocking or segmenting the semantic context in the punctuation distribution features. Index coordinates represent the numerical placeholder of the delimiter in the one-dimensional character array of the text. Adjacent delimiters refer to two boundary demarcation symbols that appear consecutively in the text reading order. Character span variance represents the dispersion of the distance difference between multiple adjacent delimiters, reflecting whether the physical block size of the text is uniform.

[0121] Specifically, after acquiring the full distribution information of punctuation marks, the system further performs a purification operation to filter out delimiters that can serve as segmentation benchmarks. The system pinpoints the exact order of these delimiters within the long text, then simulates the text reading path, calculating the number of valid Chinese characters or letters between the Nth and N+1th delimiters to obtain the character spacing span of that interval. After traversing all delimiters, the system collects a series of span values, and then applies the discreteness calculation rule to calculate the variance of this set of span values, thereby quantitatively analyzing whether the current prose paragraph has hidden typesetting attributes.

[0122] It should be noted that, due to differences in writing habits (description or diagnosis), the extracted structured field values ​​mainly fall into two categories in terms of data form: one is characteristic short sentences with local layout rules (semi-structured text such as "pylorus: [specific signs]", "globus globus: [specific signs]"); the other is natural language text without obvious layout features, which usually manifests as complex diagnostic result narrative paragraphs freely written by doctors based on clinical thinking.

[0123] S203. Determine whether the character span variance is less than the preset dispersion threshold;

[0124] The preset dispersion threshold refers to the numerical boundary set by the system in the background configuration parameter library. It is used to measure whether a piece of text belongs to a structured list with parallel short sentences or to a paragraph describing complex diagnostic results.

[0125] S204. If the character span variance is less than the dispersion threshold, the matching result is segmented according to the index coordinates of the delimiter to obtain the first independent semantic sentence.

[0126] Here, the matching result refers to the original medical text that underwent the string segmentation operation. The first independent semantic sentence refers to the basic text unit formed after punctuation structure truncation, which contains a relatively complete description of a single medical examination action or a single symptom.

[0127] Specifically, based on the judgment results of the previous step, if the system confirms that the current text content has a neat layout pattern, the system uses the previously marked paragraph end coordinates as segmentation nodes. The system then segments the matching text one by one according to these segmentation nodes, dividing the one-dimensional text string into multiple segments. Through this processing flow, the original discrete data is reconstructed into independent, non-overlapping sentence structures, laying the foundation for subsequent structured content extraction.

[0128] S205. If the character span variance is not less than the dispersion threshold, then for the matching results that have been calculated for similarity and filtered by the matching threshold, extract the text fragments and position sequences that match the preset anatomy category in the database to obtain the organ characters and organ character coordinates.

[0129] Among these, the matching threshold refers to the lower limit of similarity tolerance set during the lexical comparison process. The preset anatomy category refers to a professional medical dictionary configured by the system to describe human tissue systems and organ names. Text fragments and position sequences refer to the characters extracted from the corpus and their sequence numbers within the original paragraphs. Organ characters refer to combinations of Chinese characters representing biological organ names such as liver and left ventricle. Organ character coordinates refer to the placeholder indexes of the organ names' start and end points within the text scroll.

[0130] Specifically, when the system determines that the original medical record is an unstructured narrative text and does not conform to physical punctuation rules, the system employs a semantic analysis strategy to proactively identify core anchor points. The system uses a pre-defined dictionary of human organ names to scan and compare the cleaned text. When a human organ term matching the dictionary is identified, the system extracts the term and records its absolute coordinates, thus establishing a location benchmark within the context.

[0131] S206. Based on the matching results, expand the boundaries of associated components to both sides according to the coordinates of the organ character to determine the semantic belonging range of the modifying context containing the organ character.

[0132] Among these, the diffusion of related components refers to the process of gradually extending and probing outwards from the locked organ-related words in the surrounding context to find attributive, adverbial, or supplementary descriptive components belonging to that organ. Modifying context refers to the set of descriptive phrases surrounding the organ that describe the severity, size, or positive / negative characteristics of the pathological condition. Semantic attribution interval refers to the range of positions from the starting point to the ending point spanned by the descriptive text of the organ and its corresponding pathological state.

[0133] Specifically, after establishing the coordinates of isolated human organs, the system uses the coordinates of the organ term as the origin to perform a semantic detection process. The system traces back bidirectionally to the text before and after the organ term to determine whether the surrounding words modify the current organ. The system continuously expands outward until it detects a transitional conjunction, a paragraph end marker, or the starting boundary of another different organ name. This method delineates semantic association intervals, ensuring that all clinical descriptive terms within these intervals logically belong to the centrally anchored organ subject.

[0134] S207. Extract text based on semantic attribution intervals to obtain the second independent semantic sentence;

[0135] Text extraction refers to the action of splitting and extracting text based on calculated boundaries. The second independent semantic sentence refers to a logically consistent diagnostic descriptive sentence extracted from a long passage of prose, centered on a single organ and modified with corresponding disease-related modifiers. Compared to the first independent semantic sentence, it is derived through semantic understanding calculation.

[0136] S208. Extract the organ characters contained in the first independent semantic sentence or the second independent semantic sentence as structured field names, and use the corresponding first independent semantic sentence or the second independent semantic sentence as structured field values.

[0137] Specifically, at this stage, the system has acquired independent single-symptom description sentences. Next, the system converts these unstructured sentences into a database-standard format. The system sets the organ name (as the origin) as the structured field name for this list module; simultaneously, it packages complete, independent sentences containing detailed disease descriptions and maps them to the corresponding field value data areas. This step transforms the text into a key-value structured format.

[0138] It should be noted that in this embodiment, there is no need to perform additional organ character semantic extraction operations for the first independent semantic sentence; combined with the aforementioned text features with local layout rules, the starting character sequences of each first independent semantic sentence obtained by delimitation and segmentation have essentially directly represented the corresponding organ characters.

[0139] Please see Figure 5 , Figure 5 This is a schematic diagram of the case identification results of unstructured cases in an embodiment of this application;

[0140] S209. Reorganize the matching results into a subfield name-field value mapping table and update the case identification results.

[0141] Here, "reorganization" refers to the operation of reorganizing independent key-value pairs into a unified structure according to clinical diagnosis and treatment logic. The subfield name-field value mapping table refers to the matrix-type data view formed after rearrangement, which has hierarchical nesting or column display functions. "Update case identification results" refers to replacing the discrete typed text in the initial case with the dimensionality-reduced structured data area, thereby completing the delivery and feedback of structured content.

[0142] Specifically, the generated key-value pairs are still in a discrete arrangement. To ensure the presented results conform to medical information usage standards, the system categorizes and aggregates the mapping relationship blocks of extracted organ names and descriptive sentences, constructing a detailed structure matrix table with a clear logical hierarchy. The system then replaces the lengthy pathological text paragraphs with the above-mentioned organized mapping table structure and updates it to the main case report, thereby achieving a structured transformation of the case document display format.

[0143] It is evident that, due to the presence of multiple dimensions of medical terminology within the database corresponding to each field unit, overall comparison is prone to biases in similarity scores caused by overlapping features of phrases. To address this, a more granular pre-defined sub-library of anatomical categories and a pre-defined sub-library of transition words are used for step-by-step matching. Anatomical category identifiers are extracted from the fields first to match and locate organ characters. These organ characters are then removed, and only the remaining modifying text is independently matched in the transition word sub-library to determine context reversal markers. This improves the reliability of the similarity score results. Furthermore, the independently extracted organ anchor points and transition word sites provide a guarantee for subsequent context-based semantic boundary diffusion.

[0144] In actual use, the above embodiments performed organ character recognition and associated component boundary diffusion through steps S205 and S206 respectively; however, considering that the basic entity recognition work for the global text has been completed in the previous step S108 (the database on which step S108 is based is difficult to directly reuse in terms of extraction granularity for the fine matching and boundary diffusion tasks for specific anatomical organ entities in steps S205 and S206), this path will lead to repeated extraction of feature sequences and redundant computing power.

[0145] Therefore, in some embodiments, step S108 has been replaced, and thus:

[0146] An AI-based method for identifying structured and unstructured case reports, comprising:

[0147] S101. Perform image coding preprocessing on the original case images to obtain coded image data;

[0148] S102. Determine the recognition type of the original case image based on the layout characteristics of the coded image data; wherein the recognition type is either a structured case or an unstructured case.

[0149] S103. Determine the corresponding template configuration and OCR recognition configuration based on the recognition type;

[0150] S104. According to the partitioned regions specified in the template configuration, the encoded image data is segmented for recognition to obtain a field name-field value mapping table containing coordinate and confidence information.

[0151] S105, Field cells in the field name-field value mapping table, determine whether the field cell contains check code;

[0152] S106. If a field cell contains check codes, then the field cell is used as the matching result.

[0153] S107. If the field unit does not contain inspection code, determine the database corresponding to the field unit according to the OCR recognition configuration;

[0154] If the recognition type of the original case image belongs to a structured case, S108, calculate the similarity between the fields of the field unit and the database to obtain a similarity score;

[0155] S109. Based on the similarity score, filter according to the matching threshold loaded in the OCR recognition configuration to obtain the matching result;

[0156] S110. Summarize the matching results to obtain the case identification results.

[0157] If the recognition type of the original case image does not belong to the structured case, S301, calculate the similarity between the fields of the field unit and the preset anatomical categories in the database to obtain a similarity score;

[0158] The preset anatomy category refers to a dedicated sub-dictionary map module derived from the general medical terminology database, containing terms related to the human skeleton, organs, blood tissues, etc. Similarity calculation refers to the measurement of the degree of literal similarity or semantic relevance between the text to be identified and the vocabulary in the lexicon, using algorithms such as mathematical vectors. The similarity score is the final matching probability value used to characterize the above calculations.

[0159] S109. Based on the similarity score, filter according to the matching threshold loaded in the OCR recognition configuration to obtain the matching result;

[0160] S201. Extract the punctuation distribution features of the matching results;

[0161] S202. Extract the index coordinates of the delimiter in the matching result based on the distribution characteristics of punctuation marks, and calculate the character span variance between adjacent delimiters;

[0162] S203. Determine whether the character span variance is less than the preset dispersion threshold;

[0163] S204. If the character span variance is less than the dispersion threshold, the matching result is segmented according to the index coordinates of the delimiter to obtain the first independent semantic sentence.

[0164] S205. If the character span variance is not less than the dispersion threshold, then for the matching results that have been calculated for similarity and filtered by the matching threshold, extract the text fragments and position sequences that match the preset anatomy category in the database to obtain the organ characters and organ character coordinates.

[0165] S302. Calculate the similarity between the field in the field unit excluding the organ character and the preset transition words in the database to obtain a similarity score;

[0166] Among them, the field excluding organ characters refers to the remaining text fragments composed of descriptive modifiers or descriptions of the condition after the system removes characters representing the names of human organ structures from the original paragraph content. Preset transition words refer to a dictionary category library built into the system that lists words such as "and," "moreover," "however," "none," and "not seen," representing changes in the progression of the condition or descriptions of special states.

[0167] Specifically, after extracting the anchor organ characters, to prevent semantic interference from known organ names in subsequent comparisons, the system isolates the data at the location of the organ characters from the text. Subsequently, the system performs data matching and scoring tests on the extracted remaining surrounding descriptive components against a dictionary set of tone transition and contrast judgment categories. This aims to determine whether the target statement implicitly contains special clinical meanings such as contextual shifts or negation in describing the disease state or severity.

[0168] S303. Based on the similarity score, filter according to the matching threshold loaded in the OCR recognition configuration to obtain transition words.

[0169] The matching threshold refers to the parameter used by the system at startup, which is a configuration file preloaded by the optical recognition engine, to measure the acceptance boundary for extracting modal particles and contextual pronouns. Obtaining transition words refers to extracting and retaining items that exceed the matching scale, confirming the existence of a set of entity keywords in the medical corpus that express the disease's progression.

[0170] Specifically, after obtaining a series of similarity probability scores by comparing preset transition words, the system reads the sensitivity rule parameters set in the configuration benchmark to avoid semantic interference. The system filters out low similarity score items or irrelevant interference items according to the preset matching threshold. The data score items that pass the benchmark parameter screening are extracted and regarded as decisive words with real clinical indication characteristics and used as the final transition words.

[0171] It is evident that, due to the presence of multiple dimensions of medical terminology within the database corresponding to each field unit, overall comparison is prone to biases in similarity scores caused by overlapping features of phrases. To address this, a more granular pre-defined sub-library of anatomical categories and a pre-defined sub-library of transition words are used for step-by-step matching. Anatomical category identifiers are extracted from the fields first to match and locate organ characters. These organ characters are then removed, and only the remaining modifying text is independently matched in the transition word sub-library to determine context reversal markers. This improves the reliability of the similarity score results. Furthermore, the independently extracted organ anchor points and transition word sites provide a guarantee for subsequent context-based semantic boundary diffusion.

[0172] S206. Based on the matching results, expand the boundaries of associated components to both sides according to the coordinates of the organ character to determine the semantic belonging range of the modifying context containing the organ character.

[0173] S207. Extract text based on semantic attribution intervals to obtain the second independent semantic sentence;

[0174] S304. Calculate the similarity between the fields in the field unit (excluding organ characters and transition words) and the database to obtain a similarity score;

[0175] S109. Based on the similarity score, filter according to the matching threshold loaded in the OCR recognition configuration to obtain the matching result;

[0176] S208. Extract the organ characters contained in the first independent semantic sentence or the second independent semantic sentence as structured field names, and use the corresponding first independent semantic sentence or the second independent semantic sentence as structured field values.

[0177] S209. Reorganize the matching results into a subfield name-field value mapping table and update the case identification results.

[0178] The following describes an exemplary AI-based structured and unstructured case report recognition system 600 provided in an embodiment of this application. Figure 6 This is an exemplary hardware structure diagram of the AI-based structured and unstructured case report recognition system 600 provided in this application embodiment.

[0179] In some embodiments, the AI-based structured and unstructured case report recognition system 600 is a computer device or includes a computer device. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores data. The network interface of the computer device is used to communicate with other external terminals or servers via a network connection. In some embodiments, the network interface can be a wired network interface; in some embodiments, the network interface can also be a wireless network interface. When the computer program is executed by the processor, it implements the methods in the embodiments of this application.

[0180] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0181] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0182] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".

[0183] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0184] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. An AI-based method for identifying structured and unstructured case reports, characterized in that, include: Image encoding preprocessing is performed on the original case images to obtain encoded image data; The recognition type of the original case image is determined based on the layout features of the encoded image data; wherein the recognition type belongs to a structured case or an unstructured case; Determine the corresponding template configuration and OCR recognition configuration based on the recognition type; Based on the partitioned regions specified in the template configuration, the encoded image data is segmented for recognition to obtain a field name-field value mapping table containing coordinate and confidence information; Parse the field cells in the field name-field value mapping table and determine whether the field cell contains check code; If the field unit contains the check code, then the field unit is used as the matching result; If the field unit does not contain the inspection code, then the database corresponding to the field unit is determined according to the OCR recognition configuration; The similarity score is obtained by comparing the fields of the field unit with the database. The similarity score is filtered according to the matching threshold loaded in the OCR recognition configuration to obtain the matching result; The matching results are then aggregated to obtain the case identification results.

2. The method according to claim 1, characterized in that, After the step of summarizing the matching results to obtain the case identification results, the method further includes: If the recognition type of the original case image belongs to the unstructured case, then the punctuation distribution features of the matching result are extracted; Based on the punctuation distribution characteristics, extract the index coordinates of the delimiters within the matching results, and calculate the character span variance between adjacent delimiters; Determine whether the variance of the character span is less than a preset dispersion threshold; If the character span variance is less than the discreteness threshold, the matching result is segmented according to the index coordinates of the delimiter to obtain the first independent semantic sentence; If the character span variance is not less than the dispersion threshold, then for the matching results that have been calculated by the similarity and filtered by the matching threshold, extract the text fragments and position sequences that match the preset anatomy category in the database to obtain organ characters and organ character coordinates; Based on the matching results, the semantic belonging range of the modifier context containing the organ character is determined by expanding the associated component boundary to both sides according to the coordinates of the organ character. Text is extracted based on the semantic attribution interval to obtain a second independent semantic sentence; Extract the organ characters contained in the first independent semantic sentence or the second independent semantic sentence as structured field names, and use the corresponding first independent semantic sentence or the second independent semantic sentence as structured field values; The matching results are reorganized into a subfield name-field value mapping table, and the case identification results are updated.

3. The method according to claim 2, characterized in that, The similarity score is obtained by comparing the fields of the field unit with those of the database, specifically including: The similarity score is obtained by comparing the fields of the field unit with the preset anatomical categories in the database. Before the step of determining the semantic belonging range of the modifying context containing the organ character by expanding the associated component boundary to both sides based on the organ character coordinates in relation to the matching result, the method further includes: The similarity score is obtained by comparing the field in the field unit excluding the organ character with the preset transition words in the database. The similarity score is filtered based on the matching threshold loaded in the OCR recognition configuration to obtain transition words.

4. The method according to claim 1, characterized in that, The step of determining the recognition type of the original case image based on the layout features of the encoded image data specifically includes: Binarization and connected component analysis algorithms are performed on the encoded image data to extract the horizontal and vertical pixel projection histogram parameters that constitute the layout features; If the frequency of the grid-like pixel distribution in the horizontal and vertical pixel projection histogram parameters is greater than the frequency threshold, it is judged as a structured case, and a similarity judgment is made with the template configuration belonging to the structured case to determine the identification type. If the frequency of the grid-like pixel distribution in the horizontal and vertical pixel projection histogram parameters is not greater than the frequency threshold, it is judged as an unstructured case, and a similarity judgment is made with the template configuration belonging to unstructured cases to determine the identification type.

5. The method according to claim 1, characterized in that, The step of calculating the similarity between the fields of the field unit and the database to obtain a similarity score specifically includes: Calculate the literal edit step size parameter between the field and the term string in the database; Calculate the feature distance between the text feature fingerprint of the field and the term fingerprint in the database; The similarity score is obtained by combining the literal editing step size parameter with the feature distance and calculating a weighted average.

6. The method according to claim 1, characterized in that, The step of filtering the similarity score based on the matching threshold loaded in the OCR recognition configuration to obtain the matching result specifically includes: If there are similarity scores greater than or equal to two of the matching thresholds corresponding to the field unit, the conflicting entries are combined to form a candidate matching subset, and the corresponding confidence information is extracted. For each comparison item, the corresponding similarity score and confidence information are calculated to generate an arbitration weighted value; the calculation includes product operation or weighted summation operation; The entry with the largest arbitration weight value is selected from the candidate matching subset and determined as the matching result.

7. The method according to claim 1, characterized in that, After the step of summarizing the matching results to obtain the case identification results, the method further includes: Extract the preset privacy field identifier from the OCR recognition configuration; The target privacy field unit is selected by matching the privacy field identifier in the field name-field value mapping table, and the spatial coordinate matrix corresponding to the target privacy field unit is extracted. Image desensitization processing is performed on the corresponding regions of the original case image based on the spatial coordinate matrix.

8. An AI-based system for recognizing structured and unstructured medical reports, characterized in that, The AI-based structured and unstructured case report recognition system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the AI-based structured and unstructured case report recognition system to perform the method as described in any one of claims 1-7.

9. A computer program product containing instructions, characterized in that, When the computer program product is run on an AI-based structured and unstructured case report recognition system, the AI-based structured and unstructured case report recognition system performs the method as described in any one of claims 1-7.

10. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an AI-based structured and unstructured case report recognition system, the AI-based structured and unstructured case report recognition system performs the method as described in any one of claims 1-7.