Method, device and storage medium for partitioning and parallel collaborative labeling of whole slide pathology images
By generating fragmented copies and pre-locking locally when lock preemption fails, the partitioned parallel collaborative annotation method solves the problem of low efficiency caused by lock waiting in multi-person collaborative annotation, and realizes efficient annotation data synchronization and smooth editing process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN SHENGQIANG TECH
- Filing Date
- 2026-06-12
- Publication Date
- 2026-07-14
AI Technical Summary
When multiple people collaboratively annotate whole-slice pathological images online, the existing technology suffers from low efficiency due to the preemptive locking mechanism of locking fixed areas. Users must wait for the current user to finish editing and release the locked resources before they can proceed, resulting in operation blockage and annotation data version conflicts.
A partitioned parallel collaborative annotation method for whole-slice pathological images is proposed. When the client fails to acquire the lock, it generates a copy of the slice and pre-locks it locally, saving the editing information and slice coordinates. When the lock is released, it is asynchronously synchronized to the server task queue to ensure that the user can continue to edit and render the pre-edited information locally.
It improves the efficiency of annotation work in multi-person collaborative scenarios, avoids waiting time when lock conflicts occur, reduces annotation data version conflicts, and improves the overall work efficiency and smoothness.
Smart Images

Figure CN122387699A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method, device and storage medium for partitioned parallel collaborative annotation of whole-slice pathological images. Background Technology
[0002] In the field of digital pathology, whole-slice pathological images are core foundational data for clinical pathological diagnosis and remote expert consultations. In practice, multiple medical professionals or annotators typically collaborate to complete annotation tasks such as lesion delineation and pathological semantic annotation. During multi-user online collaborative annotation, if multiple users simultaneously edit the same area of the pathological image, problems such as overlapping annotation content, conflicting annotation data versions, and inconsistent annotation results can easily occur.
[0003] Current solutions generally adopt a preemptive locking mechanism that locks fixed areas, allowing a single user to exclusively occupy the corresponding editing area. When other users need to perform annotation operations on the same area, they must passively wait for the current user to finish editing and release the locked resources before they can perform their operations, resulting in operation blockage and low efficiency of collaborative annotation work.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a method, device and storage medium for partitioned parallel collaborative annotation of whole-section pathological images, aiming to solve the technical problem of low efficiency in collaborative annotation of pathological sections.
[0006] To achieve the above objectives, this application proposes a partitioned parallel collaborative annotation method for whole-section pathological images, the partitioned parallel collaborative annotation method for whole-section pathological images comprising: In response to an editing operation on a target partition within the visible area of the front-end interface, a lock preemption request for the target partition is sent to the server. When a lock acquisition failure message is received from the server, the data in the target partition is copied to generate a sharded copy, and the sharded copy is rendered on the front-end interface to perform local pre-locking on the target partition. Acquire and save the pre-edit information received within the fragment copy and the coordinates of the first slice corresponding to the pre-edit information; The pre-edited information and the first slice coordinates are encapsulated into synchronization information, and the synchronization information is sent to the task queue in the server so that when the server detects that the lock of the target partition is released, it sends the synchronization information to other online clients based on the order of the synchronization information in the task queue. Upon receiving the synchronization information sent by the server, the pre-edited information is synchronized to the local machine according to the first slice coordinates; The target rendering partition is determined based on the first slice coordinates and partition index; When the target rendering partition is located in the visible area, the pre-edited information is rendered within the target rendering partition.
[0007] In one embodiment, after the step of sending a lock preemption request for the target partition to the server in response to an editing operation of the target partition within the visible area of the front-end interface, the method further includes: When a lock acquisition success message is received from the server, a new worker thread is created; Send the target partition index corresponding to the target partition to the worker thread, so that the worker thread can determine the editing information in the target partition and the second slice coordinates corresponding to the editing information based on the target partition index; The edit information and the second slice coordinates are sent to other online clients so that the other online clients can synchronize the edit information within the target partition according to the second slice coordinates.
[0008] In one embodiment, the partitioning parallel collaborative annotation method for whole-slice pathological images further includes: Upon receiving the edit information and the second slice coordinates sent by the other online client, the edit information is synchronized to the local machine based on the second slice coordinates; The target rendering partition is determined based on the second slice coordinates and partition index; When the target rendering partition is located in the visible area, the editing information is rendered within the target rendering partition.
[0009] In one embodiment, after the step of sending the edit information and the second slice coordinates to other online clients, the method further includes: If no edit operation is detected in the target partition within a preset time, a lock release request for the target partition is sent to the server, and the worker thread corresponding to the target partition is deleted.
[0010] In one embodiment, before the step of sending a lock preemption request for the target partition to the server in response to an editing operation of the target partition within the visible area of the front-end interface, the method further includes: The whole slide pathological image is divided into equal parts according to the preset value to obtain the first part, and each of the first parts is further divided into equal parts according to the preset value to obtain the second part; The partition size is determined based on the current annotation density within the second block; Based on the partition size, the whole-slice pathological image is divided into a partition grid, and the slice coordinates and partition size corresponding to the partition grid are used as the partition index of the partition grid.
[0011] In one embodiment, after the step of sending a lock preemption request for the target partition to the server in response to an editing operation of the target partition within the visible area of the front-end interface, the method further includes: When a lock preemption failure message is received from the server, the adjacent partitions of the target partition are determined; An editable prompt is displayed on the adjacent partition, and a lock preemption request for the adjacent partition is sent to the server.
[0012] Furthermore, to achieve the above objectives, this application also proposes a partitioned parallel collaborative annotation device for whole-slice pathological images. The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program is configured to implement the steps of the partitioned parallel collaborative annotation method for whole-slice pathological images as described above.
[0013] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the partitioning parallel collaborative annotation method for whole-slice pathological images as described above.
[0014] This application provides a method for parallel collaborative annotation of whole-slice pathological images. In response to editing operations on a target partition within the visible area of the front-end interface, a lock acquisition request for the target partition is sent to the server. When a lock acquisition failure message is received from the server, data within the target partition is copied to generate a slice copy, which is then rendered on the front-end interface. Subsequently, the received pre-edited information and the corresponding first slice coordinates within the slice copy are acquired and saved. The pre-edited information and the first slice coordinates are encapsulated into synchronization information and sent to the task queue on the server. When the server detects that the lock on the target partition has been released, it sends the synchronization information to other online clients based on the order of the synchronization information in the task queue. Upon receiving the synchronization information from the server, the pre-edited information is synchronized locally based on the first slice coordinates. The target rendering partition is determined based on the first slice coordinates and the partition index. When the target rendering partition is located within the visible area, the pre-edited information is rendered within the target rendering partition.
[0015] In the above method, when the server returns a lock acquisition failure message, the client does not interrupt its work. Instead, it generates a sharded copy by copying the target partition data and performs local pre-locking, allowing the user to continue editing in the local environment. The pre-edited information and the first slice coordinates generated by the user in the sharded copy are first saved locally on the client, then encapsulated as synchronization information and stored in the server's task queue. After the target partition lock is released, the server sends the synchronization information to the client. The client determines the target rendering partition based on the first slice coordinates and partition index. When the target rendering partition is within the visible area, the pre-edited information is rendered within the target rendering partition. Therefore, users do not need to passively wait when there is a lock conflict and can immediately start annotation work locally, transforming the idle time caused by waiting for lock release in traditional solutions into effective working time, significantly improving the overall work efficiency in multi-person collaborative scenarios. Attached Figure Description
[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating the first embodiment of the method for partitioning and parallel collaborative annotation of whole-slice pathological images in this application; Figure 2 A flowchart illustrating Embodiment 2 of the method for partitioning and parallel collaborative annotation of whole-slice pathological images in this application; Figure 3 A flowchart illustrating Embodiment 3 of the method for partitioning and parallel collaborative annotation of whole-slice pathological images in this application; Figure 4 A simplified flowchart illustrating the partitioning parallel collaborative annotation method for whole-slice pathological images provided in Embodiment 4 of this application; Figure 5 A simplified flowchart illustrating the system initialization and tile loading process provided in Embodiment 4 of this application; Figure 6 A simplified flowchart illustrating the generation of a partition index provided in Embodiment 4 of this application; Figure 7 A simplified flowchart illustrating the preemption of the front-end partitioned distributed lock provided in Embodiment 4 of this application; Figure 8This is a simplified flowchart illustrating the startup process of the partition parallel annotation engine provided in Embodiment 4 of this application; Figure 9 A simplified flowchart illustrating the real-time annotation and local caching process provided in Embodiment 4 of this application; Figure 10 A simplified flowchart illustrating the incremental data synchronization and global layer fusion provided in Embodiment 4 of this application; Figure 11 A simplified flowchart illustrating the lock release and front-end resource reclamation process provided in Embodiment 4 of this application; Figure 12 This is a schematic diagram of the hardware operating environment involved in the partitioning parallel collaborative annotation method for whole-slice pathological images in this application embodiment.
[0019] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0020] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not intended to limit this application.
[0021] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific embodiments. It should be noted that all actions involving the acquisition of signals, information, or data in this application are performed in accordance with the relevant data protection laws and regulations of the country where the application is located, and with authorization from the owner of the corresponding device.
[0022] In the field of digital pathology, whole-slice pathological images are core foundational data for clinical pathological diagnosis and remote expert consultations. In practice, multiple medical professionals or annotators typically collaborate to complete annotation tasks such as lesion delineation and pathological semantic annotation. During multi-user online collaborative annotation, if multiple users simultaneously edit the same area of the pathological image, problems such as overlapping annotation content, conflicting annotation data versions, and inconsistent annotation results can easily occur.
[0023] Current solutions generally adopt a preemptive locking mechanism that locks fixed areas, allowing a single user to exclusively occupy the corresponding editing area. When other users need to perform annotation operations on the same area, they must passively wait for the current user to finish editing and release the locked resources before they can perform their operations, resulting in operation blockage and low efficiency of collaborative annotation work.
[0024] In view of the above problems, this application proposes a parallel collaborative annotation method for whole-slice pathological images. In response to editing operations on target partitions within the visible area of the front-end interface, a lock preemption request for the target partition is sent to the server. When a lock preemption failure message is received from the server, data within the target partition is copied to generate a slice copy, which is then rendered on the front-end interface. Subsequently, the received pre-edited information and the corresponding first slice coordinates within the slice copy are acquired and saved. The pre-edited information and the first slice coordinates are encapsulated into synchronization information and sent to the task queue on the server. When the server detects that the lock on the target partition has been released, it sends the synchronization information to other online clients based on the order of the synchronization information in the task queue. Upon receiving the synchronization information from the server, the pre-edited information is synchronized locally according to the first slice coordinates. The target rendering partition is determined based on the first slice coordinates and the partition index. When the target rendering partition is located within the visible area, the pre-edited information is rendered within the target rendering partition.
[0025] In the above method, when the server returns a lock acquisition failure message, the client does not interrupt its work. Instead, it generates a sharded copy by copying the target partition data and performs local pre-locking, allowing the user to continue editing in the local environment. The pre-edited information and the first slice coordinates generated by the user in the sharded copy are first saved locally on the client, then encapsulated as synchronization information and stored in the server's task queue. After the target partition lock is released, the server sends the synchronization information to the client. The client determines the target rendering partition based on the first slice coordinates and partition index. When the target rendering partition is within the visible area, the pre-edited information is rendered within the target rendering partition. Therefore, users do not need to passively wait when there is a lock conflict and can immediately start annotation work locally, transforming the idle time caused by waiting for lock release in traditional solutions into effective working time, significantly improving the overall work efficiency in multi-person collaborative scenarios.
[0026] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device and collaborative annotation system capable of performing the above functions. The following description uses a collaborative annotation system as an example to illustrate this embodiment and the subsequent embodiments.
[0027] Example 1 Embodiment 1 of this application provides a method for partitioning and parallel collaborative annotation of whole-slice pathological images, referring to... Figure 1 In this embodiment, the method for partitioning and parallel collaborative annotation of whole-slice pathological images includes steps S10-S40: Step S10: In response to the editing operation of the target partition in the visible area on the front-end interface, a lock preemption request for the target partition is sent to the server.
[0028] It should be noted that the front-end interface refers to the user-interactive client interface in the collaborative annotation system, used to display pathological images and annotation tools. The visible area is the range of pathological images displayed to the user in the current front-end interface. A partition refers to a rectangular or polygonal grid of regions with independent logical boundaries divided on the whole-slice pathological image, serving as the concurrent control and editing unit for collaborative annotation. The target partition refers to the partition currently specified by the user for annotation. Editing operations include lesion delineation, semantic annotation, annotation modification, or deletion within the target partition during the annotation process. Multiple clients can edit the same whole-slice pathological image simultaneously; the server, i.e., the back-end server of the collaborative annotation system, is responsible for global lock state management and multi-client coordination. A lock preemption request refers to a communication message initiated by the client to the server, requesting access to edit the target partition.
[0029] For example, the front-end interface module continuously monitors user mouse or touch interaction events within the visible area. When a user initiates an editing operation on a target section within the visible area, such as clicking, dragging, or activating annotation tools, the front-end interface module captures the interaction event and extracts its screen coordinates in the visible area coordinate system. Based on the captured screen coordinates of the interaction event, and combined with the zoom level and translation offset of the current whole-slice pathological image, the front-end interface module calculates the slice coordinates in the whole-slice pathological image coordinate system. Subsequently, according to a preset partitioning rule, the front-end interface module maps the slice coordinates to the corresponding target section and obtains the partition index of the target section.
[0030] Subsequently, the front-end interface module constructs a structured lock preemption request based on the target partition's partition index, client identity, current session identifier, and current timestamp. This lock preemption request declares the client's current editing intent for the target partition to the server. The front-end communication module encapsulates the generated lock preemption request into a request message conforming to the system communication protocol, such as HTTP or WebSocket, and sends this request message to the server via a network connection. The server communication interface receives the lock preemption request message from the client, extracts the target partition's partition index, client identity, and timestamp from the parsed data, and uses these as input for subsequent lock status determination.
[0031] Step S20: When the lock acquisition failure information sent by the server is received, the data in the target partition is copied to generate a sharded copy, and the sharded copy is rendered on the front-end interface to perform local pre-locking on the target partition.
[0032] A lock acquisition failure message indicates that after receiving a lock acquisition request from a client, the server verifies and determines that the target partition is currently occupied by another online client, i.e., it is in a locked state, and thus returns a rejection response message to the requesting client. A fragmented copy refers to a complete data copy of the target partition created locally by the client, including the original image data, existing annotation data, and their coordinate information within the target partition, used to simulate the editing environment locally.
[0033] For example, the client monitors the server's response. When it receives a lock acquisition failure message from the server, it reads and copies the original image data, existing annotation data, and coordinate information of the target partition from its local cache, generating a slice copy corresponding to the target partition. This slice copy is isolated from the original whole-slice pathological image data in memory, ensuring that subsequent editing operations do not affect the original whole-slice pathological image data or the state of other partitions. The front-end rendering engine obtains the data from the slice copy and uses it as input for visualization rendering. The rendering process includes converting the image pixel data in the slice copy into screen pixels, overlaying the annotation data onto the image, and finally presenting an editable view of the target partition in the front-end interface, performing local pre-locking on the target partition.
[0034] Step S30: Obtain and save the pre-edit information received in the shard copy and the coordinates of the first shard corresponding to the pre-edit information.
[0035] Pre-editing information refers to the annotation data generated when the client performs editing operations on the slice copy locally, including newly added lesion outlines, semantic labels, and records of annotation attribute modifications or deletions. The first slice coordinates are the position coordinates of the pre-editing information in the coordinate system of the whole slice pathological image.
[0036] For example, the client continuously monitors input behavior on the editable view corresponding to the rendered slice copy. When the user performs an editing operation, the client obtains the pre-editing information generated by the editing operation and the screen coordinates corresponding to the editing operation trajectory, and maps the screen coordinates to the first slice coordinates in the whole slice pathological image coordinate system.
[0037] Step S40: Encapsulate the pre-edited information and the first slice coordinates into synchronization information, and send the synchronization information to the task queue in the server, so that when the server detects that the lock of the target partition is released, it sends the synchronization information to other online clients based on the order of the synchronization information in the task queue.
[0038] After obtaining the aforementioned pre-edited information and the coordinates of the first slice corresponding to the pre-edited information, the client encapsulates it into information to be synchronized. This information is then encapsulated into a message and sent to the server via a network connection. Optionally, the information to be synchronized may also include the partition index of the target partition, the client's identity identifier, and the pre-edited timestamp.
[0039] For example, when no editing operation is detected in the editable view corresponding to the shard copy within a preset time, the pre-edited information and the first shard coordinates are encapsulated into synchronization information, and a submission prompt window is displayed. In response to the submission confirmation operation in the submission prompt window, the synchronization information is sent to the task queue in the server. The task queue can sort the synchronization information according to the time order in which the synchronization information is received, or according to the priority order of the client identity identifier, to ensure the determinism of the subsequent processing order.
[0040] Based on the order of the information to be synchronized in the task queue, the server extracts the coordinates of the first slice in the first piece of information to be synchronized, determines the target partition corresponding to the first slice coordinates, and continuously monitors the lock status of the target partition. When it is determined that the lock of the target partition is released, the information to be synchronized is sent to other online clients to synchronize the whole slice pathological image data in other online clients.
[0041] Traditional collaborative annotation methods employ locks, such as write locks (X locks) in relational databases or the built-in `synchronized` lock in Java concurrent programming, all using synchronous blocking processing. When the target partition is occupied, subsequent users must wait for the lock to be released before performing any editing operations. The above embodiment, however, uses asynchronous non-blocking processing, decoupling the editing process into two stages: local pre-editing and asynchronous synchronization. When the server returns a lock acquisition failure message, the client does not interrupt the job but instead generates a sharded copy of the target partition data and performs local pre-locking, allowing users to continue editing in their local environment. The pre-editing information and the first slice coordinates generated by the user within the sharded copy are first saved locally on the client, then encapsulated as synchronization information and stored in the server's task queue. After the target partition lock is released, these are merged into the global data in sequence. Through this scheme, users do not need to passively wait during lock conflicts and can immediately begin annotation work locally, transforming the idle time caused by waiting for lock release in traditional solutions into effective working time, significantly improving the overall work efficiency in multi-user collaborative scenarios. Meanwhile, by managing the information to be synchronized by multiple users sequentially through a task queue, and by combining the precise spatial positioning of the first slice coordinates, the server ensures that the labeled data is merged in order after the lock is released, effectively avoiding label overwriting, version conflicts or result disorder caused by concurrent writes.
[0042] Alternatively, in another optional solution of this embodiment, when the client receives the lock preemption failure information sent by the server, it determines the adjacent partitions of the target partition, displays an editable prompt on the adjacent partition, and sends a lock preemption request for the adjacent partition to the server.
[0043] For example, when the client receives a lock acquisition failure message from the server for the target partition, it queries at least one or more adjacent partitions that have edge or point contact with the target partition, using the spatial coordinates of the target partition as the center, and sends a lock status query request for the adjacent partitions to the server. After receiving the lock status query request for the adjacent partitions, the server-side lock management module retrieves the global lock status table and returns the current lock status of the adjacent partitions to the client. After receiving the current lock status of the adjacent partitions, the client renders a prompt window on each adjacent partition in the front-end interface to display the current lock status of each adjacent partition. Alternatively, it further filters out the adjacent partitions that are in an unlocked state and renders editable prompts on these unlocked adjacent partitions in the front-end interface. These editable prompts can be overlaid editable views or overlaid flashing animations, etc., to intuitively show the user that these adjacent partitions are available for immediate editing.
[0044] Step S50: Upon receiving the synchronization information sent by the server, synchronize the pre-edited information to the local machine according to the first slice coordinates.
[0045] Step S60: Determine the target rendering partition based on the first slice coordinates and partition index.
[0046] Step S70: When the target rendering partition is located in the visible area, render the pre-edited information within the target rendering partition.
[0047] When the client receives the pre-editing information and the corresponding first slice coordinates from the server, it writes the pre-editing information into the full-slice pathological image data using the first slice coordinates as an index. This ensures that the local annotation data is consistent with the server and other clients, completing memory-level data synchronization. Simultaneously, the client matches the first slice coordinates with the partition index of the full-slice pathological image to determine the target rendering partition corresponding to the first slice coordinates in the current partition index. Once the target rendering partition is determined to be within the visible area, the pre-editing information is rendered in the target rendering partition to synchronize the annotation information edited by other clients.
[0048] Compared to traditional solutions that can only passively report errors or blindly wait when lock conflicts occur, the above-mentioned alternative solutions provide users with alternative editing paths by intelligently inferring adjacent available areas and providing visual guidance. Users can choose to edit content on adjacent partitions, thereby further optimizing the overall smoothness and response speed of multi-person collaborative annotation.
[0049] Example 2 Based on the above embodiment one, in this embodiment, referring to... Figure 2 Following step S10 above, the method for partitioning and parallel collaborative annotation of whole-slice pathological images further includes steps S80-S100: Step S80: When the lock acquisition success message sent by the server is received, a new worker thread is created.
[0050] A successful lock acquisition message indicates that after receiving a lock acquisition request from a client, the server verifies that the target partition is currently unlocked or the lock has expired, and returns a confirmatory response message to the requesting client, indicating that the user has obtained exclusive editing rights to the target partition. The worker thread refers to a background execution unit independently created by the client outside of the main thread, specifically for handling image data loading, coordinate calculation, and editing logic for a particular target partition, to avoid blocking user interface interactions.
[0051] The client monitors the server's response. Upon receiving a successful lock acquisition message from the server, it sends a heartbeat renewal message to the server at a preset frequency to request that the server retain the client's exclusive editing rights. Simultaneously, after receiving the successful lock acquisition message, the client calls the underlying system interface to create a new independent worker thread. This worker thread is allocated an independent execution stack and event loop, running in parallel with the main rendering thread to ensure that subsequent heavy data processing does not affect the smoothness of the front-end interface.
[0052] Step S90: Send the target partition index corresponding to the target partition to the worker thread, so that the worker thread can determine the editing information in the target partition and the second slice coordinates corresponding to the editing information based on the target partition index.
[0053] Editing information refers to the annotation operation data actually generated within the target partition after the client obtains exclusive editing rights, including newly added vector graphics data, modified attribute information, or deletion operation records. The second slice coordinates refer to the coordinates of the editing information in the coordinate system of the whole-slice pathological image.
[0054] The client's main thread sends a startup message to the newly created independent worker thread via an inter-thread communication mechanism. The payload of this startup message contains the target partition index acquired upon successful lock acquisition. After starting, the worker thread monitors the user's drawing trajectory within the target partition in real time. When the user draws or annotates, the worker thread captures the screen coordinates of the drawing trajectory and maps these screen coordinates to the second slice coordinates in the full-slice pathological image coordinate system.
[0055] Step S100: Send the edit information and the second slice coordinates to other online clients so that the other online clients can synchronize the edit information within the target partition according to the second slice coordinates.
[0056] Once the client that has acquired the edit lock detects that the user has completed the editing operation within the target partition, it broadcasts the generated edit information and the corresponding second slice coordinates to other online clients to synchronize the whole-slice pathological image data in those clients. These other online clients refer to clients currently logged into the collaborative annotation system, excluding the client currently editing.
[0057] Alternatively, in another optional scheme of this embodiment, after the client sends the editing information and the second slice coordinates to other online clients, if no editing operation is detected in the target partition within a preset time, the client sends a lock release request for the target partition to the server and deletes the worker thread corresponding to the target partition.
[0058] For example, after the client successfully acquires the lock of the target partition and begins working, a timer is started, and the countdown duration of the timer is set to the aforementioned preset time. If an edit operation is detected within the target partition, the timer is reset to zero and the countdown restarts. If no edit operation is detected in the target partition within the preset time, a lock release request is constructed based on the partition index of the target partition and the client's identity and sent to the server, and the worker thread corresponding to the target partition is deleted.
[0059] The parallel collaborative annotation method for whole-slice pathological images provided in Embodiment 2 above separates the high-load image data processing and coordinate calculation from the front-end main thread by creating a new independent working thread in response to the lock preemption success information, effectively avoiding interface blocking and significantly improving the smoothness of interaction. At the same time, a lease-style heartbeat renewal mechanism is introduced to enhance the system's fault tolerance while maintaining the stability of the client's exclusive editing rights. Combined with an intelligent resource reclamation strategy based on idle detection, the server lock resources are automatically released and the local working thread is destroyed when no editing operation is detected within a preset time, avoiding the lock resources being occupied by zombies and improving the efficiency of multi-person collaborative concurrency.
[0060] Example 3 Based on the above embodiments, in this embodiment, referring to... Figure 3 Before step S10 above, the method for partitioning and parallel collaborative annotation of whole-slice pathological images further includes steps S110 to S130: Step S110: Divide the whole slide pathological image into a first block according to a preset value, and then divide each first block into a second block according to the preset value.
[0061] The preset value refers to the baseline parameter pre-configured by the collaborative annotation system for image segmentation. It is an integer greater than 1 and is used to define the granularity of the initial and secondary segmentation of the image.
[0062] For example, in response to the initiation of the collaborative annotation task, the client loads the underlying data stream of the whole-slice pathological image and reads the preset values configured by the collaborative annotation system. Using the preset values as divisors, it performs integer division operations on the width and height directions of the whole-slice pathological image, dividing the entire image into several equally sized rectangular regions to obtain various first blocks. Each first block contains its own local image data. Further, the first blocks are traversed, and the same preset values are applied again to divide the first blocks into equal parts in width and height, further refining the larger first blocks into smaller second blocks.
[0063] Step S120: Determine the partition size based on the current annotation density within the second block.
[0064] For example, the client queries all existing annotation data on the current whole-slice pathological image, filters out annotation elements whose center point coordinates fall within the bounding box of the current second block, and performs quantitative statistics on these annotation elements, such as counting the number of marker points, calculating the total length of line segments or the area covered by polygons, to obtain the amount of annotation data within the current second block. The amount of annotation data within the current second block is divided by the physical area of the second block to calculate the current annotation density of the second block. According to a preset density and size mapping table, the calculated current annotation density is mapped to the partition size in physical space, where the partition size is proportional to the current annotation density.
[0065] Step S130: Based on the partition size, the whole-slice pathological image is divided into a partition grid, and the slice coordinates and partition size corresponding to the partition grid are used as the partition index of the partition grid.
[0066] Based on the second block obtained above and the partition size within the second block, the whole-slice pathological image is divided into a partition grid. Each partition grid corresponds to a partition, and the slice coordinates of the partition grid in the coordinate system of the whole-slice pathological image and its partition size are used as the partition index of the partition grid.
[0067] In traditional fixed-block schemes, if a pathological image contains a complex cancerous area and a large area of normal tissue, multiple clients may flood into the cancerous area to compete for the same lock, causing queuing congestion; while the lock for the normal tissue area remains unclaimed, resulting in wasted concurrent resources. The third embodiment described above dynamically determines the region of interest based on the annotation density in the whole-slice pathological image and subdivides this region into smaller-granular partitions. This allows a cancerous area that might have previously been editable by only one client to now accommodate more clients working in parallel within different micro-partitions, thereby improving the efficiency of concurrent editing.
[0068] Example 4 Based on the above embodiments, in the first optional scheme of this embodiment, the partitioning parallel collaborative annotation method for whole-section pathological images further includes steps S140~S160: Step S140: Upon receiving the editing information and the second slice coordinates sent by the other online client, synchronize the editing information to the local machine according to the second slice coordinates.
[0069] Step S150: Determine the target rendering partition based on the second slice coordinates and partition index.
[0070] Step S160: When the target rendering partition is located in the visible area, the editing information is rendered within the target rendering partition.
[0071] For example, when a client receives the editing information and the second slice coordinates sent by other online clients, it writes the editing information into the full-slice pathological image data using the second slice coordinates as an index, ensuring that the local annotation data is consistent with the server and other clients, thus completing data synchronization at the memory level. Simultaneously, the client matches the second slice coordinates with the partition index of the full-slice pathological image to determine the target rendering partition corresponding to the second slice coordinates in the current partition index. When the target rendering partition is determined to be within the visible area, the editing information is rendered in the target rendering partition to synchronize the annotation information edited by other clients.
[0072] To better understand the solution presented in this example, we will further explain this example in conjunction with specific application scenarios.
[0073] Assuming the partition index includes the slice coordinates (x1, y1) of the top-left corner of the partition and the slice size s1, the coordinate range of a partition can be determined by the slice coordinates (x1, y1) and the slice size s1. Furthermore, by comparison, it can be determined which partition in the whole-slice pathological image the second slice coordinates belong to, thus locating the target rendering partition.
[0074] Understandably, since the partition size is determined by the current annotation data density in the whole-slice pathological image, the slice index in the whole-slice pathological image may change during collaborative annotation by multiple people. Therefore, this application synchronizes the slice coordinates of the edited information and then maps these slice coordinates back to the partition index to maintain correct synchronization of the edited information between different clients and servers.
[0075] Furthermore, when the target rendering partition is determined to be within the visible area, the editing information is rendered within the target rendering partition. For example, suppose client A adds a label at the second slice coordinate (x, y) of target partition q1 at time T1, and synchronizes the second slice coordinate (x, y) and the label information to other online clients. Another client B receives the second slice coordinate (x, y) and the label information sent by client A at time T2 (T2 is greater than T1), and determines the corresponding target rendering partition as q2 based on the second slice coordinate (x, y). If target rendering partition q2 is within the visible area of client B, target rendering partition q2 is re-rendered, and the label information is synchronously displayed on the front-end interface of client B. At this time, the re-rendering range is the partition size of target rendering partition q2, avoiding the waste of computing resources caused by full-image refresh.
[0076] In this embodiment, when the client receives editing information and the corresponding second slice coordinates from other online clients, or pre-editing information and the corresponding first slice coordinates from the server, the editing information is precisely written into the local full-slice pathological image data using spatially unique slice coordinates as an index, ensuring strong consistency of data state at the memory level. Subsequently, by matching and calculating the slice coordinates with the latest partition index in real time, the target rendering partition is dynamically determined. This ensures that the collaborative annotation system can maintain accurate anchoring of annotation data to physical spatial location while adaptively adjusting the partition size, avoiding annotation drift or misalignment caused by partition grid reconstruction. Thus, while ensuring data synchronization accuracy, it significantly improves the rendering performance and interactive smoothness of large-scale collaborative pathological image browsing.
[0077] For example, to help understand the implementation process of the partitioning parallel collaborative annotation method for whole-slice pathological images obtained by combining the above embodiments, refer to... Figure 4 , Figure 4 A simplified flowchart of a method for partitioning and parallel collaborative annotation of whole-slice pathological images is provided, specifically: The collaborative annotation system first initializes and renders the pathological slide metadata using the OpenSeadragon engine to obtain the full-slice pathological image. Then, it dynamically calculates the partition size of the full-slice pathological image and generates partition indexes. Upon entering the target partition, the client initiates a lock preemption request: if preemption fails, the partition data is copied to generate a slice copy for the user to pre-edit, and the pre-editing information along with the first slice coordinates is sent to the server. Simultaneously, the collaborative annotation system can recommend adjacent free partitions. If preemption succeeds, a partition heartbeat renewal is initiated, and a worker thread is created, allowing the user to perform formal editing. The editing information and the second slice coordinates are globally broadcast to other clients, who then locate the target rendering partition based on the coordinates and synchronously render the edited information within their visible areas. Finally, when the lock is released, the collaborative annotation system destroys the worker thread and reclaims memory resources, completing a single collaborative annotation cycle.
[0078] Furthermore, referring to Figure 5 , Figure 5 A simplified flowchart illustrating system initialization and tile loading is provided, specifically: First, the collaborative annotation system is launched, entering the initialization phase. The front-end page loads the OpenSeadragon rendering engine to display ultra-high-resolution pathological slides. The rendering engine reads and parses the pathological slide files, obtaining the metadata information needed to construct the tile pyramid, and creates a rendering canvas on the page to prepare the rendering environment for subsequent image data loading. The current online client's identity (User ID) is globally bound to the pathological slide identifier being processed (Slide ID), establishing a connection between the user session and the data. After completing the above preparations, memory or local cache space is initialized to prepare resources for the upcoming slide data loading and collaborative interaction.
[0079] For example, the key code for implementing the above system initialization and tile-based loading is as follows: / / Initialize the OpenSeadragon engine and load the ultra-large pathological slide tile pyramid. function initViewer(slideId, userId) { / / Create a rendering container and load the DCM (Digital Imaging and Communications in Medicine) tile source. const viewer = new OpenSeadragon.Viewer({ id: "osd-container", tileSources: ` / slide / ${slideId}.dcm`, / / Metadata of pathological slide tiles crossOriginPolicy: "Anonymous" }); / / Globally bind slice identifier, online client identity identifier, rendering instance window.GLOBAL = { slideId, userId, viewer}; return viewer; }” Furthermore, referring to Figure 6 , Figure 6 A simplified flowchart illustrating the process of generating a partitioned index is provided, specifically: The collaborative annotation system first reads the basic attributes of the current pathological slide, including image resolution, the visible area of the current view, and the density of existing annotation data. Next, the system automatically determines the partition size based on a threshold of annotation density. For example, small partitions (e.g., 256px) are used in densely annotated areas to improve concurrent accuracy, while large partitions (e.g., 1024px) are used in sparsely annotated areas to reduce computational overhead. Then, based on the dynamically determined partition size, the system recursively partitions and manages the spatial grid of the full-slice pathological image using a quadtree data structure, establishing an efficient hierarchical index. It also determines the partition index for each generated partition (e.g., the MD5 hash value in the key code below) and establishes a mapping relationship between partition coordinates and slice coordinates, providing a location basis for subsequent lock preemption and data synchronization. After the partition index is built, the rendering engine implements an on-demand loading strategy, requesting and rendering only the image tiles of the currently visible partitions and their surrounding buffers, thus achieving efficient and smooth browsing of ultra-large pathological slides.
[0080] For example, the key code for generating the partitioned index is as follows: / / Generate partitions adaptively based on annotation density; use smaller partitions for dense areas and larger partitions for sparse areas. function buildAdaptiveZone(viewer, annotationDensity) { / / Dynamically calculate partition size: 256px for annotation density > 50, otherwise 1024px const zoneSize = annotationDensity>50 ? 256 : 1024; const viewport = viewer.viewport.getBounds(); / / Get the visible area / / Generate a partition grid and generate a unique partition index const zoneList = splitToGrid(viewport, zoneSize).map(item =>({ zoneId: md5(`${item.x}-${item.y}-${zoneSize}`), coord: item })); return zoneList; }” Furthermore, referring to Figure 7 , Figure 7 A simplified flowchart of the front-end partitioned distributed lock preemption process is provided, specifically: When a client user browses and focuses on a specific image partition (target partition) through the rendering engine, a locking process is triggered. The collaborative annotation system generates a globally unique lock key based on the current tile identifier and the tile coordinates of the target partition, as shown in the key code below: `lock:slideId:zoneId`, serving as the credential for concurrency control. The client initiates an exclusive atomic lock request to the server, attempting to acquire operation rights to the target partition. If the target partition is already occupied by another client user, the collaborative annotation system will execute a strategy of recommending adjacent free partitions, guiding the user to a conflict-free area to continue working. If the lock acquisition is successful, the collaborative annotation system immediately initiates a 1-second heartbeat renewal mechanism, corresponding to `setInterval` in the key code below, maintaining exclusive rights to the target partition through high-frequency heartbeat packets and informing the user that the partition locking is complete, allowing them to perform subsequent editing operations.
[0081] For example, the key code for implementing the above front-end partitioned distributed lock preemption is as follows: / / Preemptive partition lock, 5-second timeout, 1-second heartbeat to keep alive async function acquireZoneLock(zoneId) { / / Get the current pathological slide identifier and client identity identifier const { slideId, userId} = window.GLOBAL; const lockKey = `lock:${slideId}:${zoneId}`; / / Globally unique lock key / / Atomic request lock Const lockSuccess = await fetch(` / lock / acquire?key=${lockKey}&user=${userId}&timeout=5000`); lockSuccess&&setInterval(()=>fetch(` / lock / keep?key=${lockKey}`),1000); / / Heartbeat renewal return lockSuccess; }” Furthermore, referring to Figure 8 , Figure 8 A simplified flowchart illustrating the startup process of the partitioned parallel annotation engine is provided, specifically: If the target partition lock is successfully acquired, it indicates that the current client has obtained exclusive operation rights to the target partition and can safely load and initialize data without worrying about concurrency conflicts. At this point, the collaborative annotation system instantiates an independent worker thread, Web Worker, as shown in annotation-worker.js in the key code below, and binds it to the current target partition. In the background worker thread, the collaborative annotation system establishes the transformation relationship between the local coordinates of the partition and the global pathological image coordinates based on the current viewport parameters, laying the spatial benchmark for subsequent accurate positioning and rendering of annotation data. The worker thread sends a request to the data management layer to retrieve all existing annotation records within the partition, i.e., historical annotation data. Once the historical annotation data is successfully loaded into memory and the coordinate system is constructed, the worker thread enters the ready state. At this point, the collaborative annotation system is capable of responding to users' real-time editing and rendering of annotations within the current target partition.
[0082] For example, the key code for implementing the above-mentioned parallel annotation engine for partitioning is as follows: / / Create a dedicated worker thread for each partition to process annotations in parallel without blocking UI rendering. function createZoneWorker(zoneId) { const worker = new Worker("annotation-worker.js"); / / Create a new worker thread / / Send partition initialization data to worker threads worker.postMessage({ type: "INIT_ZONE", zoneId, coord: window.GLOBAL.viewer.viewport.getBounds()}); window.GLOBAL.workers[zoneId] = worker; / / Store worker thread instances return worker; }” Furthermore, referring to Figure 9 , Figure 9 A simplified flowchart illustrating real-time annotation and local caching is provided, specifically: Client users perform annotation actions on the rendering canvas, such as drawing graphics and entering text, triggering change requests for annotation data. To prevent invalid or conflicting data from contaminating the collaborative annotation system, change requests are forwarded to background worker threads. These worker threads rigorously validate the annotation data according to preset business rules, such as boundary detection and mandatory field validation. Once validation passes, the collaborative annotation system first renders the geometric shape of the annotations in real-time on the local rendering layer (UI). Finally, the annotation data is serialized and stored in the local IndexedDB database, achieving persistent data storage to handle network outages and providing underlying data support for subsequent incremental synchronization or version control.
[0083] For example, the key code for implementing the above real-time annotation and local caching is as follows: / / Local persistence of annotation data, offline caching function saveAnnotationToLocal(zoneId, annotationData) { const db = indexedDB.open("PathologyAnnotationDB", 1); / / Open the local database db.onsuccess = () =>{ const transaction = db.result.transaction("annotations", "readwrite"); transaction.objectStore("annotations").put({ zoneId, time: Date.now(), data: annotationData}); }; }” Furthermore, referring to Figure 10 , Figure 10 A simplified flowchart illustrating the incremental data synchronization and global layer fusion process is provided, specifically: Once a client user completes annotation editing in the current partition and saves it to the local database, the collaborative annotation system extracts the changes from this operation and constructs a lightweight incremental data packet. This incremental data packet is sent to all online clients via real-time communication channels such as WebSocket. Clients browsing the same tile, except for the client that initiated the operation, receive the incremental data packet, determine the partition index (zoneId) contained within it, and quickly retrieve and locate the corresponding target rendering partition locally. Other online clients directly apply the received incremental data to the layer of the target rendering partition, achieving a partial refresh of the interface and ensuring that all collaborators see a consistent annotation view.
[0084] For example, the key code for implementing the above incremental data synchronization and global layer fusion is as follows: Incremental synchronization: Only transmits changed data, not full data synchronization. function syncAnnotationIncrement(zoneId, annotationData) { / / Build incremental data packets const incrementData = { op: "ADD", zoneId, userId:window.GLOBAL.userId, points: annotationData.coordinates}; window.ws.send(JSON.stringify(incrementData)); / / Broadcast to all other online clients renderZoneAnnotation(zoneId, incrementData); / / Local re-render }” Furthermore, referring to Figure 11 , Figure 11 A simplified flowchart illustrating the lock release and front-end resource reclamation process is provided, specifically: When the collaborative annotation system detects that a client user has manually switched to another region, or that the user has not interacted with the current partition for an extended period, it determines that the session has ended to prevent deadlock and resource waste. At this point, the client sends a lock release request to the server, relinquishing its exclusive control over the partition (corresponding to the `fetch` request in the following key code snippet). Next, the background worker thread process bound to that partition is terminated (corresponding to `workers[zoneId]?.terminate()` in the following key code snippet). Afterward, the front-end rendering engine is notified to remove image tile data that is no longer needed to reduce the browser's graphics rendering burden and free up bandwidth and video memory for loading data from the new viewport. After these cleanup steps, the core memory occupied by the partition is released, and the collaborative annotation system returns to an idle, ready state, awaiting the next user access or a new partition loading request.
[0085] For example, the key code for implementing the above lock release and front-end resource reclamation is as follows: "function releaseZoneResource(zoneId) { const { slideId, userId, workers} = window.GLOBAL; fetch(` / lock / release?key=lock:${slideId}:${zoneId}&user=${userId}`); / / Release the lock workers[zoneId]?.terminate(); / / Destroy worker threads window.GLOBAL.viewer.world.removeItem(zoneId); / / Unload the tile }” It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the method of partitioning parallel collaborative annotation of whole-slice pathological images in this application. Any simple transformations based on this technical concept are within the protection scope of this application.
[0086] This application provides a partitioned parallel collaborative annotation device for whole-slice pathological images. The partitioned parallel collaborative annotation device for whole-slice pathological images includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the partitioned parallel collaborative annotation method for whole-slice pathological images in the above embodiment 1.
[0087] The following is for reference. Figure 12 This document illustrates a schematic diagram of a partitioned parallel collaborative annotation device suitable for implementing whole-slice pathological images according to embodiments of this application. The partitioned parallel collaborative annotation device for whole-slice pathological images in embodiments of this application may include, but is not limited to, mobile terminals such as laptops and tablets (PADs, Portable Application Descriptions) and fixed terminals such as desktop computers. Figure 12 The partitioned parallel collaborative annotation device for whole-slice pathological images shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0088] like Figure 12 As shown, the partitioned parallel collaborative annotation device for whole-slice pathological images may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The random access memory 1004 also stores various programs and data required for the operation of the partitioned parallel collaborative annotation device for whole-slice pathological images. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the partitioned parallel collaborative annotation device for whole-slice pathology images to wirelessly or wiredly communicate with other devices to exchange data. Although partitioned parallel collaborative annotation devices for whole-slice pathology images with various systems are shown in the figures, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0089] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0090] The partitioned parallel collaborative annotation device for whole-slice pathological images provided in this application employs the partitioned parallel collaborative annotation method for whole-slice pathological images described in the above embodiments, which can solve the technical problem of low efficiency in collaborative annotation of pathological slices. Compared with the prior art, the beneficial effects of the partitioned parallel collaborative annotation device for whole-slice pathological images provided in this application are the same as those of the partitioned parallel collaborative annotation method for whole-slice pathological images provided in the above embodiments, and other technical features in this partitioned parallel collaborative annotation device for whole-slice pathological images are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0091] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0092] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included 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.
[0093] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the partitioning parallel collaborative annotation method for whole-slice pathological images in the above embodiments.
[0094] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.
[0095] The aforementioned computer-readable storage medium may be included in a partitioned parallel collaborative annotation device for whole-slice pathological images; or it may exist independently and not be assembled into a partitioned parallel collaborative annotation device for whole-slice pathological images.
[0096] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a partitioned parallel collaborative annotation device for whole-slice pathological images, enable the partitioned parallel collaborative annotation device to write computer program code for performing the operations of this application in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, or as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0097] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation that may be implemented in systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0098] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0099] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described method for partitioned parallel collaborative annotation of whole-slice pathological images, thereby solving the technical problem of low efficiency in collaborative annotation of pathological slices. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the partitioned parallel collaborative annotation method for whole-slice pathological images provided in the above embodiments, and will not be repeated here.
[0100] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the partitioning parallel collaborative annotation method for whole-slice pathological images as described above.
[0101] The computer program product provided in this application can solve the technical problem of low efficiency in collaborative annotation of pathological slides. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the partitioned parallel collaborative annotation method for whole-slide pathological images provided in the above embodiments, and will not be repeated here.
[0102] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for partitioning and parallel collaborative annotation of whole-section pathological images, characterized in that, The partitioning parallel collaborative annotation method for the whole-slice pathological images includes: In response to an editing operation on a target partition within the visible area of the front-end interface, a lock preemption request for the target partition is sent to the server. When a lock acquisition failure message is received from the server, the data in the target partition is copied to generate a sharded copy, and the sharded copy is rendered on the front-end interface to perform local pre-locking on the target partition. Acquire and save the pre-edit information received within the fragment copy and the coordinates of the first slice corresponding to the pre-edit information; The pre-edited information and the first slice coordinates are encapsulated into synchronization information, and the synchronization information is sent to the task queue in the server so that when the server detects that the lock of the target partition is released, it sends the synchronization information to other online clients based on the order of the synchronization information in the task queue. Upon receiving the synchronization information sent by the server, the pre-edited information is synchronized to the local machine according to the first slice coordinates; The target rendering partition is determined based on the first slice coordinates and partition index; When the target rendering partition is located in the visible area, the pre-edited information is rendered within the target rendering partition.
2. The method for partitioning and parallel collaborative annotation of whole-slice pathological images as described in claim 1, characterized in that, After the step of sending a lock preemption request for the target partition to the server in response to an editing operation of the target partition within the visible area of the front-end interface, the method further includes: When a lock acquisition success message is received from the server, a new worker thread is created; Send the target partition index corresponding to the target partition to the worker thread, so that the worker thread can determine the editing information in the target partition and the second slice coordinates corresponding to the editing information based on the target partition index; The edit information and the second slice coordinates are sent to other online clients so that the other online clients can synchronize the edit information within the target partition according to the second slice coordinates.
3. The method for partitioning and parallel collaborative annotation of whole-slice pathological images as described in claim 2, characterized in that, The partitioning parallel collaborative annotation method for whole-slice pathological images also includes: Upon receiving the edit information and the second slice coordinates sent by the other online client, the edit information is synchronized to the local machine based on the second slice coordinates; The target rendering partition is determined based on the second slice coordinates and partition index; When the target rendering partition is located in the visible area, the editing information is rendered within the target rendering partition.
4. The method for partitioning and parallel collaborative annotation of whole-slice pathological images as described in claim 2, characterized in that, After the step of sending the edited information and the second slice coordinates to other online clients, the method further includes: If no edit operation is detected in the target partition within a preset time, a lock release request for the target partition is sent to the server, and the worker thread corresponding to the target partition is deleted.
5. The method for partitioning and parallel collaborative annotation of whole-slice pathological images as described in claim 1 or 2, characterized in that, Before the step of sending a lock preemption request for the target partition to the server in response to an editing operation of the target partition within the visible area of the front-end interface, the method further includes: The whole slide pathological image is divided into equal parts according to the preset value to obtain the first part, and each of the first parts is further divided into equal parts according to the preset value to obtain the second part; The partition size is determined based on the current annotation density within the second block; Based on the partition size, the whole-slice pathological image is divided into a partition grid, and the slice coordinates and partition size corresponding to the partition grid are used as the partition index of the partition grid.
6. The method for partitioning and parallel collaborative annotation of whole-slice pathological images as described in claim 1, characterized in that, After the step of sending a lock preemption request for the target partition to the server in response to an editing operation of the target partition within the visible area of the front-end interface, the method further includes: When a lock preemption failure message is received from the server, the adjacent partitions of the target partition are determined; An editable prompt is displayed on the adjacent partition, and a lock preemption request for the adjacent partition is sent to the server.
7. A partitioned parallel collaborative annotation device for whole-section pathological images, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the partitioned parallel collaborative annotation method for whole-slice pathological images as described in any one of claims 1 to 6.
8. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the partitioning parallel collaborative annotation method for whole-slice pathological images as described in any one of claims 1 to 6.