A pathological image block transmission and recombination method, device and computer storage medium
Patent Information
- Application Number
- CN202611315681.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-10-09
AI Technical Summary
本申请核心解决现有病理图像传输方案通信架构冗余、分级可靠传输能力缺失、图像与标注信息无法同步传输的异构融合问题,可广泛应用于病理科样本数字化扫描、医学影像离线交互、远程病理会诊等对图像传输稳定性、同步性、轻量化要求严苛的场景
1、统一通信架构:图像数据通过已有命令通信协议的分块命令传输,无需额外部署HTTP/FTP服务,简化了系统架构。8KB分块大小与命令协议单次发送上限对齐,保证每个分块在一个调度周期内发出,不产生额外的协议开销。
Smart Images

Figure CN122891533A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image data communication technology, and a method, device and computer storage medium for block transmission and reconstruction of pathological images, specifically a method for block transmission and reconstruction of large-scale whole slide pathological images (WSI) suitable for medical testing instruments and equipment such as liquid-based cytology slide scanners. Background Technology
[0002] With the widespread adoption of liquid-based cytology pathology testing technology, the size of whole-slide pathology images (WSI) output by slide scanners can reach hundreds of MB to several GB. Transmitting these ultra-large pathology images from the instrument to the quality control workstation has become a core communication requirement for medical testing equipment. Equipment is generally equipped with independent command interaction links for transmitting short commands such as equipment alarms, status queries, and scan control. Currently, the mainstream image transmission solutions in the industry mainly include three types: HTTP / FTP file transfer, RTSP / RTP streaming, and TCP full-image one-time transmission. Each of these solutions has inherent defects in practical implementation, severely restricting the efficiency of pathology image transmission, system stability, and compatibility with embedded devices.
[0003] However, existing pathological image transmission solutions have some core technical deficiencies in medical testing instrument applications, making it difficult to meet the stable, efficient, and lightweight image interaction requirements of liquid-based cytology equipment: 1. Lack of a unified chunked transmission mechanism with the command communication protocol. Existing solutions require the deployment of an additional independent file transfer service, which cannot reuse the existing command communication link between the instrument and the workstation, increasing the complexity of the system architecture and maintenance costs.
[0004] 2. Lack of reliable transmission guarantees at the segment level. The whole-image transmission scheme requires retransmission of the entire image when a data segment is lost due to network fluctuations; while the HTTP breakpoint resume scheme relies on server support and is complex to implement, making it difficult to deploy on embedded instruments.
[0005] 3. Lack of synchronous transmission of image data and diagnostic annotation information. Pathological images often require the inclusion of region of interest (ROI) bounding boxes. Existing solutions require image transmission and annotation data transmission to be completed separately, increasing operational steps and the risk of errors.
[0006] Therefore, there is an urgent need for a method for the block transmission and reconstruction of whole slide pathological images that can reuse the original command communication link of the instrument, support block-level retransmission and fault tolerance, be lightweight and have low overhead, and can simultaneously transmit images and lesion annotations. Summary of the Invention
[0007] This application relates to the field of medical image data communication technology, specifically to a method for the segmented transmission and reconstruction of large-scale whole-slide pathological images (WSI) suitable for medical testing instruments such as liquid-based cytology slide scanners. The core solution of this application addresses the problems of redundant communication architecture, lack of hierarchical reliable transmission capabilities, and heterogeneous fusion issues arising from the inability to synchronously transmit image and annotation information in existing pathological image transmission schemes. It can be widely applied in scenarios with stringent requirements for image transmission stability, synchronization, and lightweight design, such as digital scanning of pathology samples, offline medical image interaction, and remote pathology consultations.
[0008] To address the technical shortcomings of existing technologies, such as complex multi-protocol architectures, the need to retransmit all images in case of transmission failure, cumbersome operation due to the separate transmission of images and diagnostic annotations, and the difficulty in deploying embedded devices, the core objective of this application is to provide a method for block transmission and reconstruction of whole slide pathological images that reuses the instrument's native communication link, supports hierarchical retransmission and fault tolerance, is lightweight and has low overhead, and can simultaneously transmit images and lesion annotations.
[0009] Specific objectives include: 1. Solve the problem of efficient transmission of large-volume pathological images on limited bandwidth links, avoid dependence on additional transmission protocols such as HTTP / FTP, and unify the communication architecture; 2. Solves the problem of needing to retransmit all data when transmission fails midway, and achieves reliable transmission at the block level, where only the lost data blocks need to be retransmitted in case of failure; 3. Solve the problem of separating the transmission of image data and diagnostic region of interest (ROI) annotation information, and realize the synchronous transmission of image and annotation in a single transmission session.
[0010] Specifically, the technical solutions include the following: A method for segmented transmission and reconstruction of pathological images, comprising: Step 1: Image encoding; Step 2: Divide the blocks into equal-sized sections; Step 3: Encapsulate block by block; Step 4: Send in sequence and ensure reliable transmission; Step 5: Receiver buffer and complete reception judgment; Step Six: Splicing, Decoding, and Reassembling.
[0011] Preferably, it includes: Step 7: Synchronous transmission of bounding box annotations.
[0012] Preferably, in step one, the sending end converts the binary image data into a string that can be embedded in a text protocol for transmission.
[0013] Preferably, in step two, the string formed in step one is divided into N data blocks of a fixed size. The size of each data block is consistent with the maximum size of a single transmission in the command communication protocol. If the size of the last data block is less than the fixed size of the data block division, the receiving end will automatically process it according to the total length during reassembly.
[0014] Preferably, in step three, Each data block is encapsulated as an independent key-value pair command, using the binary frame structure of the communication protocol for encapsulation; Each block splitting command carries three additional block-specific fields in addition to the original required fields: the sequence number of the current data block, the total number of data blocks N, and the unique identifier of the image being transmitted.
[0015] Preferably, in step four, Each data block command is sent in ascending order of its sequence number. Reliable delivery of each block command is ensured through the communication protocol's priority scheduling mechanism and ACK / NAK acknowledgment mechanism. If an ACK is received for a certain command block, continue sending the next block; If a block command receives a NAK or times out, the block will be automatically retransmitted according to the retransmission mechanism of the communication protocol, without needing to retransmit other data blocks that have been successfully delivered.
[0016] Preferably, in step five, The receiving end maintains a block cache dictionary with the unique identifier of the image transmitted in this session as the key: When a block division command is received: 5a. Extract the unique identifier of the image transmitted this time. If the cache list of the unique identifier of the image transmitted this time does not exist, create a new empty list. 5b. Store the data of the current block into the corresponding position in the cache list according to the sequence number of the current data block; 5c. Check if the number of data blocks currently received is equal to the total number of data blocks N: If not equal: continue waiting for subsequent data blocks; if equal: trigger step six.
[0017] Preferably, in step six, 6a. Concatenate all strings in the cache list into a complete encoded string according to the sequence number of the current data block from 0 to N-1; 6b. Decode the concatenated string to restore it to the original image binary data; 6c. Deliver the reconstructed image data to the upper-layer application; 6d. Remove the cache containing the unique identifier of the image being transmitted from the block cache dictionary to free up memory.
[0018] Preferably, in step seven, while sending the image segmentation command, the bounding box annotation information of the region of interest can be carried in the first segmentation command or a separate annotation command.
[0019] Preferably, each annotation in the bounding box annotation information includes the following fields: the coordinates of the upper left corner of the annotation box, the width and height of the annotation box, and the annotation text description.
[0020] A medical instrument communication device that operates as described in any of the preceding methods.
[0021] A workstation or server device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the method as described in any of the preceding claims.
[0022] A computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method as described in any of the preceding claims.
[0023] Compared with the prior art, this application has the following significant advantages: 1. Unified Communication Architecture: Image data is transmitted via chunked commands using the existing command communication protocol, eliminating the need for additional HTTP / FTP services and simplifying the system architecture. The 8KB chunk size is aligned with the single-transmission limit of the command protocol, ensuring that each chunk is sent within a scheduling cycle without incurring additional protocol overhead.
[0024] 2. Block-level reliable transmission: Each data block is guaranteed to be delivered via ACK / NAK confirmation mechanism. If the transmission fails midway, only the lost 8KB data block needs to be retransmitted (instead of the entire hundreds of MB image), which significantly improves the efficiency and fault tolerance of large image transmission.
[0025] 3. Synchronous transmission of images and annotations: Bounding box annotation information can be transmitted synchronously in the same transmission session as an additional field of the block command, so that image data and diagnostic annotation information can be completed in one interaction, reducing operation steps.
[0026] This system consists of a scanner transmitter and a quality control workstation receiver. Pathological images are first Base64 encoded and evenly divided into blocks. Independent commands with unique identifiers are then encapsulated and transmitted in an orderly manner, relying on a response mechanism to ensure reliable transmission of each block. The receiver caches the blocks using unique image identifiers, and after all data is complete, it stitches, decodes, and images the images, simultaneously transmitting lesion annotations. This system reuses the instrument's existing command communication link to achieve efficient transmission of large-volume pathological images, eliminating the need for additional file transfer services. In case of network transmission failures, only the lost single data block is retransmitted, significantly improving transmission fault tolerance and efficiency. It simultaneously completes integrated transmission of images and diagnostic annotations, simplifying the operation process. It can be widely applied to digital image interaction scenarios in various medical pathology testing equipment, demonstrating significant economic and social benefits. Attached Figure Description
[0027] The present application will now be described in further detail with reference to the accompanying drawings: Figure 1 This application presents a flowchart of the large-scale pathological image block transmission and reconstruction process. Detailed Implementation
[0028] like Figure 1 As shown, this application provides a method for block transmission and reconstruction of pathological images using the native communication link of an instrument. Through seven core steps—image encoding, equal-sized block division, block-by-block encapsulation, ordered and reliable transmission, receiving buffer alignment, splicing, decoding and reconstruction, and annotation-based synchronous transmission—it achieves efficient, stable, and synchronous transmission of ultra-large pathological images in an embedded medical instrument environment. Specifically, it includes the following steps: Step 1: Image Encoding The sending end (scanner) encodes the raw image data using Base64, converting the binary image data into an ASCII string that can be embedded in a text protocol for transmission.
[0029] The image data in this application is encoded using various techniques, such as: Encoding characteristics and typical scenarios; Base16 (Hex) is the simplest, with double the expansion for debugging and MD5 / SHA hash output; Base64 encoding is balanced, resulting in an expansion of approximately 33%; images are embedded in data-urls, and binary data is transmitted via APIs. Base64URL is an improved version of Base64, adapted to link JWT and REST interface parameters; Base32 case-insensitive key, one-time verification code; Base58 blockchain wallet addresses without easily confused characters; Base62 concise short links with no special characters, distributed IDs; Ascii85 (Base85) offers the best compression ratio for PDF and Redis.
[0030] Step 2: Divide into equal-sized blocks The Base64 encoded string is divided into N data blocks of a fixed size (8KB) (N = ceil(total length / 8KB)). The 8KB block size is consistent with the single-transmission limit of the command communication protocol, ensuring that each data block can be sent within a single communication scheduling cycle and is not split into multiple TCP transmissions.
[0031] The last data block may be less than 8KB in length, and the receiving end will automatically handle this according to the total length during reassembly.
[0032] Step 3: Packaging block by block Each data block is encapsulated as an independent key-value pair (KVCommand) command, using the binary frame structure of the communication protocol. In addition to the original required command fields (cmd, id, pri, ver), each block command carries the following three block-specific fields: - chunk_index: The sequence number of the current data block (incrementing from 0), used by the receiving end for sorting and concatenating; - total_chunks: The total number of data blocks N, used by the receiver to determine whether all data blocks have been received; - image_id: A unique identifier for the image being transmitted (GUID can be used), which is used by the receiving end to distinguish data blocks of different images and avoid data block confusion when multiple images are transmitted concurrently.
[0033] Step 4: Ordered Sending and Reliable Transmission Each data block command is sent in ascending order of its chunk_index number. Reliable delivery of each block command is ensured through the communication protocol's priority scheduling mechanism and ACK / NAK acknowledgment mechanism. - If an ACK is received for a certain command block, continue sending the next block; - If a block command receives a NAK or times out, the block will be automatically retransmitted according to the retransmission mechanism of the communication protocol (the default maximum retransmission is 2 times), without needing to retransmit other data blocks that have been successfully delivered.
[0034] This design ensures reliable transmission at the block level: if a transmission fails midway, only the lost single data block needs to be retransmitted, rather than the entire image.
[0035] Step 5: Receiver buffering and collection judgment The receiving end (workstation server) maintains a chunked cache dictionary with image_id as the key: ConcurrentDictionary <string, List<byte[]> imageBuffers Upon receiving a chunking command: (a) Extract the image_id. If the cache list for the image_id does not yet exist, create a new empty list; (b) Store the Base64 data of the current chunk into the corresponding position in the cache list according to the chunk_index; (c) Check if the number of data chunks received is equal to total_chunks: - If not equal: continue to wait for subsequent data chunks; - If equal: trigger the reassembly process (step six).
[0036] Step Six: Splicing, Decoding, and Reassembling When received_chunks == total_chunks: (a) Concatenate all Base64 strings in the cache list into a complete Base64 encoded string in chunk_index order from 0 to N-1; (b) Decode the concatenated string into Base64 and restore it to the original image binary data; (c) Deliver the reconstructed image data to the upper layer application (e.g., render and display it on the interface via SkiaSharp); (d) Remove the cache for image_id from the chunk cache dictionary and release memory.
[0037] Step 7: Synchronous Transmission of Bounding Box Annotations (Optional Enhancement) When sending a chunked image command, the bounding box annotation information of the region of interest (ROI) can be carried in the first chunk command (chunk_index=0) or a separate annotation command. Each annotation contains the following fields: - X, Y: Coordinates of the top left corner of the annotation box; - Width, Height: The width and height of the label box; - Remark: A textual description (such as cell type, lesion grade, etc.).
[0038] The annotation information and image data are synchronized in the same transmission session, avoiding the cumbersome operation of transmitting them in two separate sessions.
[0039] The following is in conjunction with the appendix Figure 1 The present application will be further described in detail with reference to specific embodiments. The embodiments are only used to explain the present application and are not intended to limit the scope of protection of the present application.
[0040] Example: A slide scanner transmits whole-slide pathology images to a quality control workstation. This embodiment describes the process of a SCANNER1650 slide scanner (transmitter) transmitting a full-slide scan pathological image to a quality control workstation (receiver).
[0041] (1) Transmission trigger Step A1: The operator selects a defective specimen on the quality control workstation interface, triggering a QueryQcSampleImage request.
[0042] Step A2: The workstation sends a query command to the scanner, and the scanner begins preparing image data.
[0043] (2) Image coding and segmentation Step B1: The scanner loads the original all-glass slide image and performs Base64 encoding. Assume the original image size is 200KB. After Base64 encoding, it is approximately 267KB.
[0044] Step B2: Split the 267KB Base64 string into 8KB (8192 bytes) segments. 267KB / 8KB ≈ 33.4 Rounding up, we get N=34 data blocks. The first 33 blocks are each 8KB, and the last block is approximately 3.3KB.
[0045] Step B3: Generate image_id = "a1b2c3d4e5f6..." (GUID) to identify this transmission.
[0046] (3) Block-by-block encapsulation and transmission Step C1: Encapsulate the 0th block (chunk_index=0, total_chunks=34) into a KVCommand command. It is sent after being encapsulated in a frame structure. This block may also carry additional bounding box annotation information (if any).
[0047] Step C2: After receiving the ACK confirmation, send the first block (chunk_index=1); and so on, until the 33rd block. (chunk_index=33).
[0048] Step C3: Assuming a network fluctuation causes a NAK (Network Access Denial) when sending block 15, the scanner automatically retransmits block 15 (up to 2 times). After ACK confirmation, it continues to send block 16. Blocks 0-14, which have already been successfully delivered, do not need to be retransmitted.
[0049] (4) Reception and Reassembly Step D1: The workstation receiving end maintains the imageBuffers["a1b2c3d4e5f6..."] buffer list.
[0050] Step D2: Upon receiving each data block, store it in the corresponding position of the cache list according to the chunk_index. The number of blocks received is incremented.
[0051] Step D3: When received_chunks reaches 34, trigger the reconstruction: concatenate all Base64 strings according to chunk_index 0→33, decode the Base64 to restore the 200KB original image data, and render and display it on the interface through SkiaSharp.
[0052] Step D4: Remove the image_id from the cache dictionary, freeing up approximately 267KB of memory.
[0053] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0054] Finally, it should be noted that the above descriptions are merely preferred embodiments of this application and are not intended to limit this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for segmented transmission and reconstruction of pathological images, characterized in that, include: Step 1: Image encoding; Step 2: Divide the blocks into equal-sized sections; Step 3: Encapsulate block by block; Step 4: Send in sequence and ensure reliable transmission; Step 5: Receiver buffer and complete reception judgment; Step Six: Splicing, Decoding, and Reassembling.
2. The method for segmented transmission and reconstruction of pathological images as described in claim 1, characterized in that, include: Step 7: Synchronous transmission of bounding box annotations.
3. The method for segmented transmission and reconstruction of pathological images as described in claim 1, characterized in that, In step one, the sending end converts the binary image data into a string that can be embedded in a text protocol for transmission.
4. The method for segmented transmission and reconstruction of pathological images as described in claim 1, characterized in that, In step two, the string formed in step one is divided into N data blocks of a fixed size. The size of each data block is consistent with the maximum size of a single transmission in the command communication protocol. If the size of the last data block is less than the fixed size of the data block division, the receiving end will automatically process it based on the total length during reassembly.
5. The method for segmented transmission and reconstruction of pathological images as described in claim 1, characterized in that, In step three, Each data block is encapsulated as an independent key-value pair command, using the binary frame structure of the communication protocol for encapsulation; Each block splitting command carries three additional block-specific fields in addition to the original required fields: the sequence number of the current data block, the total number of data blocks N, and the unique identifier of the image being transmitted.
6. The method for segmented transmission and reconstruction of pathological images as described in claim 1, characterized in that, In step four, Each data block command is sent in ascending order of its sequence number. Reliable delivery of each block command is ensured through the communication protocol's priority scheduling mechanism and ACK / NAK acknowledgment mechanism. If an ACK is received for a certain command block, continue sending the next block; If a block command receives a NAK or times out, the block will be automatically retransmitted according to the retransmission mechanism of the communication protocol, without needing to retransmit other data blocks that have been successfully delivered.
7. The method for segmented transmission and reconstruction of pathological images as described in claim 1, characterized in that, In step five, The receiving end maintains a block cache dictionary with the unique identifier of the image transmitted in this session as the key: When a block division command is received: 5a. Extract the unique identifier of the image transmitted this time. If the cache list of the unique identifier of the image transmitted this time does not exist, create a new empty list. 5b. Store the data of the current block into the corresponding position in the cache list according to the sequence number of the current data block; 5c. Check if the number of data blocks currently received is equal to the total number of data blocks N: if not, continue waiting for subsequent data blocks; If they are equal: trigger step six.
8. The method for segmented transmission and reconstruction of pathological images as described in claim 1, characterized in that, In step six, 6a. Concatenate all strings in the cache list into a complete encoded string according to the sequence number of the current data block from 0 to N-1; 6b. Decode the concatenated string to restore it to the original image binary data; 6c. Deliver the reconstructed image data to the upper-layer application; 6d. Remove the cache containing the unique identifier of the image being transmitted from the block cache dictionary to free up memory.
9. The method for segmented transmission and reconstruction of pathological images as described in claim 2, characterized in that, In step seven, while sending the image segmentation command, the bounding box annotation information of the region of interest can be carried in the first segmentation command or a separate annotation command.
10. The method for segmented transmission and reconstruction of pathological images as described in claim 9, characterized in that, Each annotation in the bounding box annotation information includes the following fields: the coordinates of the top left corner of the annotation box, the width and height of the annotation box, and the annotation text description.
11. A medical instrument communication device, characterized in that, Perform the method as described in any one of claims 1 to 10.
12. A workstation or server device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 10.