Pathological tissue block number automatic identification method and system, device, and medium

By combining multi-region image acquisition and orthogonal view shooting with OCR technology, the problems of reflection and dirt interference in the identification of pathological tissue block numbers have been solved, realizing efficient and accurate automatic identification of pathological tissue block numbers, and improving the automation and intelligence of pathological diagnosis.

CN121033829BActive Publication Date: 2026-02-24XIEHE HOSPITAL ATTACHED TO TONGJI MEDICAL COLLEGE HUAZHONG SCI & TECH UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511564252.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-02-24
Estimated Expiration
2045-10-30

AI Technical Summary

Technical Problem

The numbering of pathological tissue blocks is prone to errors, omissions, or duplications during image recognition. Existing optical character recognition technology is affected by reflections and dirt, resulting in poor recognition accuracy.

Method used

Multi-region image acquisition combined with frontal view shooting is used. DM codes of pathological tissue blocks are identified through OCR recognition technology. Overlapping area images are used for matching and error analysis to ensure information integrity.

Benefits of technology

It improves the accuracy of pathological tissue block identification, shortens sample information processing time, reduces missed detections and misjudgments, and enhances the automation and intelligence of the pathological diagnosis process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121033829B_ABST
    Figure CN121033829B_ABST
Patent Text Reader

Abstract

The application provides a pathological tissue block number automatic identification method and system, equipment and a medium, and belongs to the technical field of image recognition. The method comprises the following steps: acquiring a pathological tissue block image, identifying a plurality of DM codes of pathological tissue blocks by means of an OCR identification technology based on the pathological tissue block image; extracting pathological tissue block information based on the DM codes; the pathological tissue block image comprises images of different regions of a group of pathological tissue blocks; there are overlapping regions between the images of different regions; the DM code is a spray code marked on the inclined surface of the pathological tissue block; a set of pathological tissue block numbers is acquired, the pathological tissue block information is matched with the set of pathological tissue block numbers, and a matching result is obtained; the matching result comprises matching success or matching error; error information is determined based on the matching result of the matching error, and the error information comprises the pathological tissue block number of the matching error, the pathological tissue block information and an error type. The application can improve the identification accuracy of the pathological tissue block number.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image recognition technology, and more specifically, relates to a method, system, device, and medium for automatic identification of pathological tissue block numbers. Background Technology

[0002] In pathology work, errors, omissions, or duplicates in the numbering of pathological tissue blocks are common. Current technology identifies pathological tissue block numbers through images. However, during image recognition, reflections and stains on the surface of the pathological tissue block can interfere with the accuracy of Optical Character Recognition (OCR), resulting in a large error in the identification of pathological tissue block numbers. Therefore, a more accurate method for identifying pathological tissue numbers is needed. Summary of the Invention

[0003] The purpose of this application is to provide a method, system, device, and medium for automatic identification of pathological tissue block numbers, so as to improve the accuracy of pathological tissue block number identification.

[0004] A first aspect of this application provides a method for automatically identifying the number of pathological tissue blocks, including:

[0005] The numbering and recognition module is used to acquire images of pathological tissue blocks, and based on the images, to identify the DM codes of multiple pathological tissue blocks using OCR recognition technology; to extract pathological tissue block information based on the DM codes; the pathological tissue block images are acquired based on the target shooting perspective; the pathological tissue block images include images of different regions taken for a group of pathological tissue blocks; there are overlapping areas between the images of the different regions; the DM code is a code marked on the inclined surface of the pathological tissue block;

[0006] The number matching module is used to obtain a set of pathological tissue block numbers, match the pathological tissue block information with the set of pathological tissue block numbers, and obtain a matching result; the matching result includes successful matching or incorrect matching.

[0007] The error analysis module is used to determine error information based on the matching results of the matching errors. The error information includes the pathological tissue block number, pathological tissue block information, and error type of the matching error.

[0008] A second aspect of this application provides an automatic identification system for pathological tissue block numbers, comprising:

[0009] The numbering and recognition module is used to acquire images of pathological tissue blocks, and based on the images, to identify the DM codes of multiple pathological tissue blocks using OCR recognition technology; to extract pathological tissue block information based on the DM codes; the pathological tissue block images are acquired based on the target shooting perspective; the pathological tissue block images include images of different regions taken for a group of pathological tissue blocks; there are overlapping areas between the images of the different regions; the DM code is a code marked on the inclined surface of the pathological tissue block;

[0010] The number matching module is used to obtain a set of pathological tissue block numbers, match the pathological tissue block information with the set of pathological tissue block numbers, and obtain a matching result; the set of pathological tissue block numbers includes all pathological tissue block numbers arranged in sequence; the matching result includes successful matching or incorrect matching;

[0011] The error analysis module is used to determine error information based on the matching results of the matching errors. The error information includes the pathological tissue block number, pathological tissue block information, and error type of the matching error.

[0012] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for automatically identifying pathological tissue block numbers.

[0013] In a fourth aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for automatically identifying pathological tissue block numbers.

[0014] The beneficial effects of the automatic identification method, system, device, and medium for pathological tissue block numbers provided in this application are as follows: This embodiment uses OCR recognition technology to batch process images containing multiple pathological tissue blocks, enabling rapid identification of DM codes and extraction of information, shortening the processing time of pathological tissue block sample information, and accelerating the pathological diagnosis process; This embodiment automatically matches pathological tissue block information with the number set, utilizing overlapping area images to ensure information integrity, reducing missed detections and misjudgments, thereby improving the accuracy of number identification. Errors are promptly identified when matching errors occur, facilitating rapid correction; This embodiment is applicable to image recognition of different regions of multiple pathological tissue blocks, is compatible with DM code markings on inclined surfaces, adapts to various practical application scenarios, improves the automation and intelligence level of pathological sample management, and provides reliable and efficient technical support for pathological diagnosis work. Attached Figure Description

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

[0016] Figure 1 A flowchart illustrating an automatic identification method for pathological tissue block numbers provided in an embodiment of this application;

[0017] Figure 2 A flowchart illustrating an automatic identification method for pathological tissue block numbers provided in another embodiment of this application;

[0018] Figure 3 A structural block diagram of an automatic identification system for pathological tissue block numbers provided in an embodiment of this application;

[0019] Figure 4 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.

[0022] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating an automatic identification method for pathological tissue block numbers provided in an embodiment of this application. The method can be executed by an electronic device, and specifically, the method may include S101 to S103.

[0023] S101: Acquire pathological tissue block images; based on the pathological tissue block images, identify the DM codes of multiple pathological tissue blocks using OCR recognition technology; extract pathological tissue block information based on the DM codes; the pathological tissue block images are acquired based on the target shooting perspective; the pathological tissue block images include images of different regions taken for a group of pathological tissue blocks; there are overlapping areas between the images of different regions; the DM code is a code marked on the inclined surface of the pathological tissue block.

[0024] In this embodiment, acquiring pathological tissue block images may specifically include: acquiring pathological tissue block images from an image acquisition device; wherein, the pathological tissue block images are acquired by the image acquisition device in the following manner: dividing a group of pathological tissue blocks to be photographed into multiple imaging areas; taking the area directly above the center point of each imaging area as the target shooting angle, and acquiring the image corresponding to that imaging area; and using the images corresponding to multiple imaging areas as pathological tissue block images.

[0025] In this embodiment, the group of pathological tissue blocks to be photographed is divided into multiple imaging regions. Specifically, this may include dividing the group of pathological tissue blocks to be photographed into three imaging regions; the three imaging regions include an upper region, a middle region, and a lower region. The pathological tissue block image may include an upper image corresponding to the upper region, a middle image corresponding to the middle region, and a lower image corresponding to the lower region. There is an overlapping area between the upper image and the middle image, and there is an overlapping area between the middle image and the lower image.

[0026] In this embodiment, the area directly above the center point of each camera area is used as the target shooting viewpoint to acquire the image corresponding to that camera area. Specifically, this may include: using the area directly above the center point of each camera area as the target shooting viewpoint, and acquiring the image corresponding to the camera area based on the target shooting viewpoint and the target shooting angle. The target shooting angle is one or more preset shooting tilt angles with an angle parallel to the pathological tissue block as the reference angle.

[0027] In this embodiment, a group of pathological tissue blocks refers to multiple tissue blocks from the same batch, placed in the same basket. The image acquisition device can include a regular smartphone, tablet, or laboratory digital camera. The DM code is an inkjet-printed code marked on the slanted surface of the pathological tissue block, belonging to a type of two-dimensional barcode. Because the DM code is marked on the tissue block, the image of the pathological tissue block acquired in this embodiment, even when partially obscured, is actually an image of the DM codes of each tissue block, primarily used for subsequent DM code recognition. The DM code itself has strong fault tolerance; it can still be decoded even if the pattern is partially obscured or blurred, effectively reducing the impact of reflected light and stains on recognition. The DM code stores information such as the pathological tissue block's serial number. This embodiment can obtain this information by recognizing the DM code, thereby achieving automated recognition of the inkjet-printed codes on the pathological tissue blocks.

[0028] In pathological tissue block identification scenarios, acquiring high-quality images is fundamental for subsequent OCR recognition. Due to surface reflections, smudges often obscuring the tissue block surface, and the large number and close arrangement of tissue blocks, traditional single-image capture is prone to missed detections or identification errors. To reduce these issues, this embodiment employs a specific viewing angle (orthogonal view) to ensure the optical axis is perpendicular to the tissue block surface, minimizing reflections. Furthermore, this embodiment utilizes multi-region image acquisition to address residual reflections at image edges and missed detections. Additionally, since the DM code is marked on the slanted surface of the tissue block, even slight deviations in the shooting angle can significantly amplify the distortion effect of the DM code and cause occlusion between DM codes of adjacent tissue blocks. Therefore, this embodiment requires multiple shooting angles to ensure more complete, high-quality, and clear images. This embodiment combines multi-regional image capture with orthogonal view (i.e., the target shooting angle) light control and overlapping area verification to ensure that each tissue block is clearly presented in at least one image, providing a high-quality data source for DM code recognition.

[0029] For example, in the acquisition of pathological tissue block images, this embodiment can divide a basket of tissue blocks into three imaging regions—upper, middle, and lower—according to a certain ratio. Images are captured from directly above the center point of each region at the target shooting angle, with overlapping areas between the images of different regions. For instance, the pathological tissue block is placed in a basket, forming a rectangular plane. Based on the length of this rectangular plane (50cm), the portion from 0cm to 25cm is divided into the upper region, the portion from 15cm to 40cm into the middle region, and the portion from 25cm to 50cm into the lower region. The working principle and rationale for this are as follows:

[0030] Because the tissue block basket contains a large number of tissue blocks (up to 150), and the surface of these tissue blocks is reflective and may contain stains, a single image capture can easily result in edge tissue blocks reflecting light due to angle issues, while the central tissue blocks may be clear but not fully covered overall, leading to missed detections or errors in DM code recognition. Dividing the tissue block basket into three areas according to height and shooting each area separately ensures that each tissue block is in a clear, non-reflective position in at least one area's image. For example, when the tissue block basket is placed parallel to the ground or a table, when shooting the upper area, the camera is positioned directly above the center point of that area, shooting downwards at a preset tilt angle (e.g., 5°), which can cover 1 / 3 of the tissue blocks in the basket, with the lower half of the image overlapping the upper half of the middle image by 10%-20%. Shooting the middle area vertically directly above provides optimal lighting and minimal reflection, clearly showing the DM code of the central tissue block. Shooting the lower area with the camera tilted upwards covers the bottom tissue blocks, with the upper half of the image overlapping the middle image.

[0031] Overlapping images of different regions is for cross-validation. When a tissue block is reflected at the edge of one image, it may be located in the middle region of another image and be clearly displayed. By comparing pixels in the overlapping areas, the system automatically selects the clearest image of each tissue block from multiple images and merges them into a complete recognition dataset, reducing missed and false recognitions.

[0032] In practical applications, the pathology department of a top-tier hospital processes approximately 500 tissue blocks daily, divided into 30 baskets, with about 17 blocks per basket. Using a regular smartphone as the image acquisition device, each basket of tissue blocks is divided into three regions: upper (0-5cm), middle (5-10cm), and lower (10-15cm). When photographing the upper region, the phone is positioned 15cm directly above the midpoint of the upper edge, tilted downwards at a 5° angle, covering the upper 1 / 3 of the tissue block; the middle region is photographed with the phone perpendicular to the center; and the lower region is photographed with the phone tilted upwards at a 5° angle.

[0033] S102: Obtain the set of pathological tissue block numbers, match the pathological tissue block information with the set of pathological tissue block numbers, and obtain the matching result; the matching result includes whether the match is successful or incorrect.

[0034] In this embodiment, the pathological tissue block number set includes all pathological tissue block numbers arranged in sequence. The pathological tissue block number set refers to the list of tissue block numbers for this batch of pathological samples imported from the pathology information management system. It is a standard comparison dataset containing the tissue block numbers that each pathological sample should have, and their order. For example, the tissue block numbers corresponding to a certain pathology sample are T20250628-01 to T20250628-05, arranged in sequence. The pathological tissue block information is the numbering information obtained by recognizing the DM code in the pathological tissue block image using OCR. Matching the pathological tissue block number set and the pathological tissue block information means comparing the tissue block numbers recognized by OCR with the standard number set using an intelligent comparison algorithm to determine whether they match and to obtain a result indicating a successful or incorrect match.

[0035] The intelligent comparison algorithm supports order-independent matching, correcting the comparison even if the tissue blocks are out of order. It can also identify missing, incorrect, and duplicate numbers. For example, if the standard number set includes T20250628-01 to T20250628-05, and the OCR recognition result does not contain number T20250628-03, it is determined to be a matching error, possibly due to a missed image or a missing number. Similarly, if a tissue block is identified as number T20250628-06, but this number does not exist in the standard set, it is also determined to be a matching error.

[0036] For example, a pathology department processes a batch of tissue blocks. In the pathology information management system, the set of tissue block numbers for this batch is A12345 to A12350, a total of 6 numbers. After OCR recognition, the tissue block numbers are A12345, A12346, A12347, A12349, A12349, and A12350. The system comparison finds that A12348 is missing, and A12349 is a duplicate (it should actually be A12348). Therefore, the matching result is: A12345, A12346, A12347, and A12350 match successfully; A12349 is a duplicate; and A12348 is missing. The system automatically marks the error and issues a warning, reminding staff to check, which is more efficient and accurate than manual verification.

[0037] S103: Determine error information based on the matching results of the incorrect matches. The error information includes the pathological tissue block number, pathological tissue block information, and error type of the incorrect match.

[0038] In this embodiment, after determining the error information based on the matching results of the matching errors, the method further includes: annotating the pathological tissue block image based on the error information to obtain the annotated pathological tissue block image; determining the error type and error frequency based on the error information, and generating correction suggestions.

[0039] In this embodiment, after determining the error information based on the matching results of the matching error, the method further includes: determining the historical error type and historical error frequency based on the historical error information, and generating an error trend report based on the historical error type and historical error frequency.

[0040] In this embodiment, the error information is generated from the matching error results. The error information may include the number, location, and error type (e.g., missing, mis-coded, duplicate) of the specific error organization block. For example, if the standard numbers are T20250628-01 to 05, and T20250628-06 appears in the OCR recognition result, the error information would be "Number T20250628-06 does not exist in the standard set and is an incorrect number." Missing number: Exists in the standard set but was not recognized by OCR (e.g., missed image or missing label); Mis-coded number: OCR result does not conform to the standard (e.g., coding error or recognition error); Duplicate number: The same number appears more times in the OCR result than the standard count (standard count is 1). Error frequency refers to the number of times various types of errors occur within a certain period. Historical error information includes records of all past matching errors, used for trend analysis.

[0041] In this embodiment, problematic tissue blocks can be marked in pathological tissue block images based on error information. For example, incorrectly numbered tissue blocks are highlighted with a red border, image areas with missing numbers are marked with yellow question marks, and duplicate numbers are superimposed with orange warning icons on multiple images of tissue blocks with the same number.

[0042] This embodiment can automatically classify error types based on error information. For example, if a certain number in the OCR result has no approximate item in the standard set, it is determined to be a coding error; if there are only differences in a few characters, it may be an OCR recognition error.

[0043] This embodiment can generate different correction suggestions based on different error types. For missing numbers, a correction suggestion is provided, such as: "Check if the tissue block is missing a label; it is recommended to add label T20250628-03"; for incorrect numbers, a suggestion is provided, such as: "The standard should be T20250628-04; it is recommended to recheck the inkjet printing"; for duplicate numbers, a suggestion is provided, such as: "Number T20250628-02 appears twice; it needs to be renumbered to ensure uniqueness."

[0044] This implementation can statistically analyze historical error types and frequencies over time, such as "in a certain year and month, the percentage of incorrect numbers was 45%, and the percentage of missing numbers was 30%." This implementation can also display changes in error rates using line graphs, such as "since the system went live in a certain month, the error rate of duplicate numbers has decreased from 15% to 5%", helping departments pinpoint systemic problems.

[0045] For example, an example of error message labeling: A basket of tissue blocks has standard numbers from A12345 to A12350 (6 blocks). The OCR recognition results are A12345, A12346, A12347, A12349, and A12350, with A12349 appearing twice.

[0046] Notes: The image area corresponding to missing number A12348 is marked in yellow "missing"; the two tissue block images with duplicate number A12349 are marked in orange "duplicate"; the physical tissue block without A12348 needs to be manually checked to see if the label is missing.

[0047] Error types: 1 missing case (A12348), 1 duplicate case (A12349).

[0048] Correction suggestions: For missing numbers: "Please check if there are any unlabeled tissue blocks in the basket and add the label A12348"; For duplicate numbers: "Tissue blocks A12349 (position 1) and A12349 (position 2) have duplicate numbers. It is recommended to re-print one of them as A12348".

[0049] Trend Analysis: Departmental statistics for a certain month of a certain year: a total of 1000 tissue blocks were verified, with an error rate of 8% (5% misnumbering, 2% missing, and 1% duplicates); compared with the error rate of 12% in a certain month, it was found that the misnumbering rate decreased, but the missing rate increased by 1%.

[0050] For example, such as Figure 2As shown, the automatic identification method for pathological tissue block numbers in this embodiment may include acquiring images of pathological tissue blocks using a smartphone or camera to provide raw material for subsequent identification. The acquired images are then subjected to OCR recognition to extract the tissue block numbers. Standard tissue block numbers from the system are imported as a matching verification basis. The OCR-recognized numbers are compared with the imported system numbers to determine if they match. When discrepancies are found, error types are categorized and analyzed (e.g., missing or duplicate numbers). Error information is highlighted, trend analysis is performed, and the results are presented intuitively for easy viewing and processing by staff, assisting in process optimization.

[0051] As can be seen from the above, this embodiment uses OCR recognition technology to batch process images containing multiple pathological tissue blocks, which can quickly identify DM codes and extract information, shorten the processing time of pathological tissue block sample information, and accelerate the pathological diagnosis process. This embodiment automatically matches pathological tissue block information with the set of numbers, effectively avoiding the oversights and errors that may occur with manual matching. It uses overlapping area images to ensure information integrity, reduce missed detections and misjudgments, and promptly identifies error information when matching errors occur, facilitating rapid correction. This embodiment is applicable to image recognition of different regions of multiple pathological tissue blocks, is compatible with DM code markings on inclined surfaces, adapts to various practical application scenarios, improves the automation and intelligence level of pathological sample management, and provides reliable and efficient technical support for pathological diagnosis.

[0052] In one embodiment of this application, based on a pathological tissue block image, multiple DM codes of pathological tissue blocks are identified using OCR recognition technology. This includes: identifying all DM code regions in the pathological tissue block image using OCR recognition technology to obtain a DM code set; selecting duplicate DM codes from the DM code set and determining the duplication type of each duplicate DM code; for each duplicate DM code, if the duplication type of the duplicate DM code is an image overlap type, then performing deduplication processing on the duplicate DM code to delete the duplicate DM code; the image overlap type refers to the DM code duplication caused by the same pathological tissue block appearing multiple times in the pathological tissue block image.

[0053] In this embodiment, each duplicated DM code corresponds to multiple DM codes identified by OCR recognition technology. In this embodiment, determining the duplication type of each duplicated DM code includes: determining the target DM code corresponding to each position of the DM code, wherein the target DM code is the DM code adjacent to the DM code at that position in the set of DM codes identified by OCR recognition technology; comparing the target DM codes corresponding to each position of the DM code; if the comparison result is a first comparison result, then the code duplication type is determined as the duplication type of the duplicated DM code; if the comparison result is a second comparison result, then the image overlap type is determined as the duplication type of the duplicated DM code.

[0054] The target DM code corresponding to a DM code at a given location includes: DM codes at different adjacent locations adjacent to that location; the first comparison result includes: the DM codes at each adjacent location corresponding to the DM code at each location are all inconsistent, or the DM codes at some adjacent locations corresponding to the DM code at each location are inconsistent; the second comparison result includes: the DM codes at each adjacent location corresponding to the DM code at each location are consistent.

[0055] In this embodiment, after processing each duplicated DM code, the method further includes: if the duplication type of the duplicated DM code is inkjet printing duplication type, then retaining the identification result of the duplicated DM code; inkjet printing duplication type refers to the duplication of DM codes between different pathological tissue blocks due to inkjet printing duplication.

[0056] In this embodiment, image overlap refers to the repeated appearance of the same tissue block in multiple images, resulting in duplicate DM codes (a normal phenomenon). For example, if a tissue block is captured in both the upper and middle images, the OCR will identify two identical DM codes. Code repetition refers to different tissue blocks being mistakenly sprayed with the same DM code (an abnormal phenomenon). For example, tissue block A and tissue block B are both sprayed with the code T20250628-01. Target DM code refers to DM codes at different locations adjacent to a DM code at a given location, used to determine the repetition type. For example, if a DM code location has three adjacent DM codes, these three are the target DM codes. Adjacent locations refer to the spatial neighborhood of a DM code in the image, defined as a circular or rectangular area centered on the DM code, such as other DM code locations within a radius of 50 pixels.

[0057] In this embodiment, OCR recognition is performed on pathological tissue block images (such as three overlapping images: upper, middle, and lower), resulting in a set of DM codes. For each DM code identified by OCR, the geometric center of the DM code printing area in the corresponding pathological tissue block image (upper, middle, and lower images) is used as a marker point, or the upper left corner vertex of its smallest bounding rectangle is selected as a coordinate anchor point to accurately locate the spatial position of the DM code in the image. Simultaneously, the region to which it belongs (such as "upper image," "middle image," or "lower image") is recorded to distinguish the recognition results of different shooting areas. Specifically, this embodiment can use an image pixel coordinate system as a reference when calibrating the position. This coordinate system can have the upper left corner of a single image as the origin (0,0), with the x-axis extending horizontally to the right along the image and the y-axis extending vertically downwards along the image, with the unit being pixels. Because the three sets of images have overlapping areas, to ensure coordinate consistency in the overlapping areas, the coordinate systems of all images must be established based on the same shooting field of view. That is, the top left corner of the upper image is used as the global origin, and the middle and lower images are incorporated into the same coordinate system after being calibrated with the overlapping area of ​​the upper image. The advantage of this setting is that when calculating the adjacent DM codes within 50 pixels around a certain DM code, the pixel distance can be directly calculated using the Euclidean distance formula of the coordinate difference (Δx, Δy) without additional coordinate system transformation. This ensures that adjacent DM codes across images (such as the upper and middle images) in the overlapping area can be accurately identified, providing a unified spatial reference for subsequent matching of adjacent relationships of duplicate codes.

[0058] This embodiment can traverse the DM code set to find recurring DM codes (such as codes that appear more than or equal to 2 times). For each recurring code, this embodiment extracts the adjacent DM codes at all its identification positions. For example, the recurring code T20250628-01 appears at position 1 (upper image x1, y1) and position 2 (middle image x2, y2), and the DM codes within 50 pixels around each of them (target DM codes) are extracted.

[0059] This embodiment compares and determines the type of adjacent codes. If the adjacent DM codes at positions 1 and 2 are completely identical (e.g., both are T20250628-02 and T20250628-03), it indicates that the two positions belong to the same tissue block and are repeated in different images (second comparison result), and are determined to be of the image overlap type. If the adjacent DM codes are inconsistent (e.g., T20250628-02 is around position 1, and T20250628-04 is around position 2), it indicates that the two positions correspond to different tissue blocks (first comparison result), and are determined to be of the inkjet printing repetition type.

[0060] For DM codes with overlapping images, this embodiment can delete duplicate DM code records and retain only the recognition result with the best image quality (such as a clear image without reflection in the central image). For DM codes with duplicate inkjet printing, this embodiment can retain all recognition results of such duplicate codes for subsequent triggering of warnings and prompting manual verification (such as two different tissue blocks being mistakenly printed with the same number).

[0061] This embodiment can accurately distinguish DM code repetition types, remove duplicates for overlapping images, retain high-quality recognition results, and avoid interference from repeated recordings of multiple images; it retains and warns of repetitive inkjet code types, detects the same code being mistakenly sprayed on different tissue blocks, improves the accuracy and reliability of DM code recognition, and provides a guarantee for the automatic identification of pathological tissue block numbers.

[0062] In one embodiment of this application, the matching result includes multiple sub-matching results. Each sub-matching result is the matching result between the DM code of each pathological tissue block and the set of pathological tissue block numbers obtained by OCR recognition technology. Each sub-matching result includes a successful match or a mismatch. For a sub-matching result that is a mismatch, the sub-matching result also includes an error type, which includes missing number, duplicate number, or incorrect number.

[0063] Among them, determining error information based on the matching results includes: using the pathological tissue block number, pathological tissue block information, and error type as error information when the sub-matching result is an incorrect match.

[0064] In this embodiment, the matching result refers to the comparison result between the DM code recognized by OCR and the standard number set, which consists of multiple sub-matching results. For example, if the OCR recognizes 10 DM codes in a batch of tissue blocks, 10 sub-matching results are generated after comparison with the standard set. The sub-matching result refers to the matching status of the DM code of a single pathological tissue block, specifically including: successful matching: the OCR result is completely consistent with the standard number (e.g., DM code T20250628-01 matches the corresponding number in the standard set); incorrect matching: includes three types: missing number, duplicate, or incorrect number. For example, if T20250628-02 exists in the standard set but is not recognized by OCR, it belongs to missing number.

[0065] For example, this embodiment compares the set of DM codes identified by OCR with the set of pathological tissue block numbers. For instance, the set of DM codes identified by OCR includes 15 DM codes obtained after the fusion of three images, and the set of pathological tissue block numbers includes standard numbers imported from the pathology information management system.

[0066] This embodiment detects three types of errors separately. For the detection of missing numbers: this embodiment can traverse the standard set, and if a number is not in the OCR result, it is marked as "missing number", such as the standard number T20250628-07 not being recognized by OCR;

[0067] For the detection of duplicate numbers: This embodiment can count the number of times each number appears in the OCR result. If the number exceeds the standard count, it is marked as "duplicate number". For example, T20250628-09 appears only once in the standard set, but the OCR recognizes it twice.

[0068] For detecting incorrect numbering: If the OCR result contains a number that is not in the standard set, or if there are character differences from the standard number, such as the OCR recognition being T20250628-09A, while the standard should be T20250628-09, then it is marked as incorrect numbering.

[0069] This embodiment can automatically integrate all records with a sub-match result of "match error" into an error message. Before comparison, this embodiment sorts both the OCR results and the standard set (e.g., in ascending order by number) to avoid misjudgments caused by disordered organization block order. For example, if the standard set order is 01-05 and the OCR result order is 03-01-04-02-05, the OCR results are sorted before comparison.

[0070] This embodiment can accurately locate missing, duplicate, or incorrect numbers, avoid misjudgment due to disordered order by sorting, distinguish between inkjet printing and identification errors by setting an editing distance threshold, automatically integrate error information, improve error detection efficiency and accuracy, and provide a reliable basis for the verification of pathological tissue block numbers.

[0071] In one embodiment of this application, based on a pathological tissue block image, the DM code of multiple pathological tissue blocks is identified by OCR recognition technology, including: cropping the upper image, middle image and lower image respectively based on a first ratio to obtain the cropped upper image, cropped middle image and cropped lower image;

[0072] Identify the first overlapping region between the cropped upper image and the cropped middle image, and crop the cropped middle image based on the first overlapping region to obtain the first middle image. The first middle image and the cropped upper image do not have an overlapping region.

[0073] Identify the second overlapping region between the first middle image and the cropped lower image, and crop the cropped lower image based on the second overlapping region to obtain the first lower image. The first lower image and the first middle image do not have an overlapping region.

[0074] Based on the cropped upper image, first middle image, and first lower image, the DM codes of multiple pathological tissue blocks were obtained by OCR recognition technology.

[0075] In this embodiment, the first ratio is a scaling parameter for the initial cropping of the upper, middle, and lower images, for example, cropping the top and bottom edges by 15% of the image height. The first ratio is used to remove heavily reflective areas at the image edges, retaining the clear middle portion. The first overlapping area / second overlapping area refers to the overlapping portion between adjacent images, such as the pixel area where the upper and middle images overlap vertically. The cropped upper / middle / lower images refer to the images after cropping the edges according to the first ratio, removing reflective interference areas. The first middle image / first lower image refers to the area that does not overlap with adjacent images after secondary cropping, ensuring that the image area for subsequent OCR recognition is unique and avoiding duplicate recognition.

[0076] For example, this embodiment performs initial cropping on the image to remove reflective areas at the edges. For the upper image: the bottom edge (highly reflective area) is cropped by a first ratio (e.g., 15%), retaining the clear upper portion; for the middle image: the top and bottom edges are cropped by a first ratio, retaining the non-reflective middle area; for the lower image: the top edge is cropped by a first ratio, retaining the clear lower portion.

[0077] In this embodiment, the surface reflection of the tissue block is mostly concentrated at the edge of the image (due to the shooting angle). Cropping the edge by 10%-20% can quickly remove more than 70% of the reflection interference, while retaining the high-quality central area.

[0078] This embodiment performs overlapping region identification and secondary cropping on the cropped image. This embodiment identifies the first overlapping region between the cropped upper and middle images; based on the first overlapping region, it performs secondary cropping on the middle image to remove the overlapping portion, generating a first middle image (without overlap with the upper image). This embodiment identifies the second overlapping region between the first middle image and the lower image; based on the second overlapping region, it performs secondary cropping on the lower image, generating a first lower image (without overlap with the first middle image). Removing overlapping regions in this embodiment avoids the same tissue block appearing repeatedly in adjacent images, preventing duplicate DM code recognition. For example, if a tissue block appears once at the bottom of the upper image and once at the top of the middle image, only one is retained after cropping, improving recognition efficiency. This embodiment performs OCR recognition on the cropped upper image, first middle image, and first lower image respectively, summarizing the DM code set to ensure that each tissue block is recognized only once.

[0079] This embodiment removes most of the reflective interference by cropping the reflective area at the edge of the image according to the first ratio, while retaining the clear part. This embodiment identifies and removes overlapping areas to avoid repeated recognition of the same tissue block, thereby improving recognition efficiency. The image size is reduced after cropping, the OCR recognition time is reduced, and it can ensure that each tissue block is recognized only once, thereby improving the accuracy and efficiency of DM code recognition.

[0080] Corresponding to the automatic identification method for pathological tissue block numbers in the above embodiment, Figure 3 This is a structural block diagram of an automatic identification system for pathological tissue block numbering provided in one embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown. Reference Figure 3 The automatic identification system 20 for pathological tissue block numbers includes: a number identification module 21, a number matching module 22, and an error analysis module 23.

[0081] The numbering and identification module 21 is used to acquire images of pathological tissue blocks, and based on the images, to identify the DM codes of multiple pathological tissue blocks using OCR recognition technology; to extract pathological tissue block information based on the DM codes; the pathological tissue block images are acquired based on the target shooting perspective; the pathological tissue block images include images of different areas taken for a group of pathological tissue blocks; there are overlapping areas between the images of different areas; the DM code is a code marked on the inclined surface of the pathological tissue block.

[0082] The number matching module 22 is used to obtain a set of pathological tissue block numbers, match the pathological tissue block information with the set of pathological tissue block numbers, and obtain the matching result; the matching result includes whether the match is successful or incorrect.

[0083] Error analysis module 23 is used to determine error information based on the matching results of the matching errors. The error information includes the pathological tissue block number, pathological tissue block information and error type of the matching error.

[0084] In one embodiment of this application, the number identification module 21 is specifically used to acquire images of pathological tissue blocks from an image acquisition device;

[0085] The pathological tissue block images are acquired by an image acquisition device in the following way: the group of pathological tissue blocks to be photographed is divided into multiple imaging areas; the area directly above the center point of each imaging area is taken as the target shooting angle, and the image corresponding to that imaging area is acquired; the images corresponding to multiple imaging areas are used as the pathological tissue block images.

[0086] In one embodiment of this application, the number identification module 21 is further used for:

[0087] The DM code set is obtained by identifying all DM code regions in the pathological tissue block image using OCR recognition technology.

[0088] Select duplicate DM codes from the DM code set and determine the duplication type of each duplicate DM code;

[0089] For each duplicate DM code, if the duplication type of the duplicate DM code is image overlap, then the duplicate DM code is deduplicated to remove the duplicate DM code.

[0090] Image overlap type refers to the repetition of DM codes caused by the same pathological tissue block appearing multiple times in a pathological tissue block image.

[0091] In one embodiment of this application, each duplicate DM code corresponds to multiple DM codes identified by OCR recognition technology; the numbering recognition module 21 is further used for:

[0092] Determine the target DM code corresponding to each position of the DM code. The target DM code is the DM code adjacent to the DM code at that position in the set of DM codes identified by OCR recognition technology. Compare the target DM codes corresponding to the DM codes at each position.

[0093] If it is the first comparison result, then the code repetition type is determined to be the repetition type of the DM code that is being repeated;

[0094] If the result is the second comparison, the image overlap type is determined to be the repetition type of the DM code that is being repeated.

[0095] The target DM code corresponding to a DM code at a given location includes: DM codes at different adjacent locations adjacent to that location; the first comparison result includes: the DM codes at each adjacent location corresponding to the DM code at each location are all inconsistent, or the DM codes at some adjacent locations corresponding to the DM code at each location are inconsistent; the second comparison result includes: the DM codes at each adjacent location corresponding to the DM code at each location are consistent.

[0096] In one embodiment of this application, the number identification module 21 is further configured to retain the identification result of the repeated DM code if the repetition type of the repeated DM code is the inkjet printing repetition type; the inkjet printing repetition type refers to the repetition of DM codes between different pathological tissue blocks due to inkjet printing repetition.

[0097] In one embodiment of this application, the matching result includes multiple sub-matching results. Each sub-matching result is the matching result between the DM code of each pathological tissue block and the set of pathological tissue block numbers obtained by OCR recognition technology. Each sub-matching result includes a successful match or a mismatch. For a sub-matching result that is a mismatch, the sub-matching result also includes an error type, which includes missing number, duplicate number, or incorrect number. The error analysis module 23 is specifically used to take the pathological tissue block number, pathological tissue block information, and error type of the sub-matching result as error information.

[0098] In one embodiment of this application, the automatic identification system 20 for pathological tissue block numbers further includes: a correction and visualization module, used to annotate the pathological tissue block image based on error information to obtain an annotated pathological tissue block image;

[0099] Based on the error information, the error type and frequency are determined, and correction suggestions are generated.

[0100] See Figure 4 , Figure 4 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 4 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of the modules in the aforementioned system embodiments, for example... Figure 3 The functions of the number recognition module 21, number matching module 22, and error analysis module 23 are shown.

[0101] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0102] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.

[0103] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store information about organization block numbers.

[0104] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation methods described in the embodiments of the automatic identification method for pathological tissue block numbers provided in the embodiments of this application, or they can execute the implementation methods of the electronic device 300 described in the embodiments of this application, which will not be repeated here.

[0105] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0106] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the foregoing embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, etc., equipped on the electronic device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the electronic device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0107] Those skilled in the art will recognize that the modules / units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0108] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the electronic devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0109] In the embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules, units, or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or modules / units, or it may be an electrical, mechanical, or other form of connection.

[0110] The modules / units described as separate components may or may not be physically separate. Similarly, the components shown as modules / units may or may not be physical modules / units; they may be located in one place or distributed across multiple network modules / units. Some or all of the modules / units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0111] Furthermore, the functional modules / units in the various embodiments of this application can be integrated into one processing module / unit, or each module / unit can exist physically separately, or two or more modules / units can be integrated into one module / unit. The integrated modules / units described above can be implemented in hardware or in the form of software functional modules / units.

[0112] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for automatic identification of pathological tissue block numbers, characterized in that, include: Obtain images of pathological tissue blocks, and based on the images of pathological tissue blocks, identify the DM codes of multiple pathological tissue blocks using OCR recognition technology; Pathological tissue block information is extracted based on the DM code; The pathological tissue block images are acquired based on the target shooting perspective; the pathological tissue block images include images of different regions taken for a set of pathological tissue blocks; there are overlapping areas between the images of the different regions; the DM code is a code marked on the inclined surface of the pathological tissue block; Obtain a set of pathological tissue block numbers, match the pathological tissue block information with the set of pathological tissue block numbers, and obtain a matching result; the matching result includes successful matching or incorrect matching. Error information is determined based on the matching results of the incorrect matches. The error information includes the pathological tissue block number, pathological tissue block information, and error type of the incorrectly matched tissue block. The step of identifying multiple DM codes for pathological tissue blocks based on the pathological tissue block image using OCR recognition technology includes: identifying all DM code regions in the pathological tissue block image using OCR recognition technology to obtain a DM code set; selecting duplicate DM codes from the DM code set and determining the duplication type of each duplicate DM code; for each duplicate DM code, if the duplication type of the duplicate DM code is an image overlap type, then performing deduplication processing on the duplicate DM code to delete the duplicate DM code; the image overlap type refers to the DM code duplication caused by the same pathological tissue block appearing multiple times in the pathological tissue block image; each duplicate DM code corresponds to multiple DM codes identified by OCR recognition technology. Determining the repetition type of each duplicated DM code includes: determining the target DM code corresponding to each position of the DM code, wherein the target DM code is a DM code adjacent to the DM code at that position in the set of DM codes identified by OCR recognition technology; comparing the target DM codes corresponding to each position of the DM code; if the comparison result is a first comparison result, then the code repetition type is determined as the repetition type of the duplicated DM code; if the comparison result is a second comparison result, then the image overlap type is determined as the repetition type of the duplicated DM code; wherein, the target DM code corresponding to a position of the DM code includes: DM codes at different adjacent positions adjacent to that position; the first comparison result includes: the DM codes at each adjacent position corresponding to each position of the DM code are all inconsistent, or the DM codes at some adjacent positions corresponding to each position of the DM code are inconsistent; the second comparison result includes: the DM codes at each adjacent position corresponding to each position of the DM code are consistent.

2. The method for automatic identification of pathological tissue block numbers as described in claim 1, characterized in that, The acquisition of pathological tissue block images includes: Acquire images of the pathological tissue blocks from an image acquisition device; The pathological tissue block image is acquired by the image acquisition device in the following manner: Divide the group of pathological tissue blocks to be photographed into multiple imaging areas; The image corresponding to the camera area is obtained by taking the area directly above the center point of each camera area as the target shooting angle. Images corresponding to multiple camera areas are used as pathological tissue block images.

3. The method for automatic identification of pathological tissue block numbers as described in claim 1, characterized in that, Following the description of each duplicate DM code, the following is also included: If the repetition type of the repeated DM code is inkjet printing repetition type, then the identification result of the repeated DM code is retained; The repeated inkjet coding type refers to the repetition of DM codes between different pathological tissue blocks due to repeated inkjet coding.

4. The method for automatic identification of pathological tissue block numbers as described in claim 1, characterized in that, The matching result includes multiple sub-matching results. Each sub-matching result is the matching result between the DM code of each pathological tissue block obtained by OCR recognition technology and the set of pathological tissue block numbers. Each sub-matching result includes a successful match or a mismatch. For a sub-matching result that is a mismatch, the sub-matching result also includes an error type, which includes missing number, duplicate number, or incorrect number. The step of determining error information based on the matching result of the matching error includes: The pathological tissue block number, pathological tissue block information, and error type that are incorrectly matched in the sub-matching results are used as error information.

5. The method for automatic identification of pathological tissue block numbers as described in claim 1, characterized in that, After determining the error information based on the matching result of the matching error, the method further includes: The pathological tissue block image is annotated based on the error information to obtain an annotated pathological tissue block image. Based on the error information, the error type and error frequency are determined, and correction suggestions are generated.

6. An automatic identification system for numbering pathological tissue blocks, characterized in that, include: The number recognition module is used to acquire images of pathological tissue blocks and, based on the images of pathological tissue blocks, to identify the DM codes of multiple pathological tissue blocks using OCR recognition technology. Pathological tissue block information is extracted based on the DM code; The pathological tissue block images are acquired based on the target shooting perspective; the pathological tissue block images include images of different regions taken for a set of pathological tissue blocks; there are overlapping areas between the images of the different regions; the DM code is a code marked on the inclined surface of the pathological tissue block; The number recognition module is specifically used to recognize all DM code regions in the pathological tissue block image using OCR recognition technology to obtain a DM code set; select duplicate DM codes from the DM code set and determine the duplication type of each duplicate DM code; for each duplicate DM code, if the duplication type of the duplicate DM code is an image overlap type, then perform deduplication processing on the duplicate DM code to delete the duplicate DM code; the image overlap type refers to the DM code duplication caused by the same pathological tissue block appearing multiple times in the pathological tissue block image; each duplicate DM code corresponds to multiple DM codes identified by OCR recognition technology. The number recognition module is further used to determine the target DM code corresponding to each position of the DM code. The target DM code is the DM code adjacent to the DM code at that position in the set of DM codes identified by OCR recognition technology. The target DM codes corresponding to the DM codes at each position are compared. If the first comparison result is obtained, the coding repetition type is determined as the repetition type of the DM code that has been repeated. If the comparison result is the second one, then the image overlap type is determined as the repetition type of the repeated DM code; wherein, the target DM code corresponding to a DM code at a position includes: DM codes at different adjacent positions adjacent to that position; the first comparison result includes: the DM codes at each adjacent position corresponding to the DM code at each position are all inconsistent, or the DM codes at some adjacent positions corresponding to the DM code at each position are inconsistent; the second comparison result includes: the DM codes at each adjacent position corresponding to the DM code at each position are consistent; The number matching module is used to obtain a set of pathological tissue block numbers, match the pathological tissue block information with the set of pathological tissue block numbers, and obtain a matching result; the matching result includes successful matching or incorrect matching. The error analysis module is used to determine error information based on the matching results of the matching errors. The error information includes the pathological tissue block number, pathological tissue block information, and error type of the matching error.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Pathological number identification method and device, information identification method and device and information identification system

    CN110767292A