Neuronal morphology data multi-terminal real-time collaborative reconstruction method and system

By using a continuous memory-mapped data structure and a hybrid version control mechanism, the problems of memory access latency and storage overhead in multi-user collaborative annotation platforms are solved, enabling efficient real-time collaborative reconstruction of neuron morphological data across multiple terminals, and improving processor cache utilization and topology quality detection efficiency.

CN122240523APending Publication Date: 2026-06-19SOUTHEAST UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTHEAST UNIV
Filing Date
2026-03-20
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies in multi-user collaborative annotation platforms suffer from problems such as increased memory access latency, conflicting storage overhead and rollback efficiency, and lack of real-time topology quality detection, resulting in low efficiency in neuron morphological data reconstruction.

Method used

By employing a continuous memory-mapped data structure and a hybrid version control mechanism, the cache hit rate is improved by continuously arranging neuron node data in physical memory. Combined with real-time topology quality detection, efficient multi-terminal collaborative reconstruction is achieved.

Benefits of technology

It improves processor cache utilization, reduces system latency and storage overhead, enables real-time topology quality detection in high-concurrency collaborative scenarios, and enhances the efficiency of neuron morphological data reconstruction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240523A_ABST
    Figure CN122240523A_ABST
Patent Text Reader

Abstract

This invention relates to the fields of bioinformatics and distributed collaborative computing, specifically to a method and system for real-time collaborative reconstruction of neuronal morphological data across multiple terminals. The method synchronizes incremental records after memory modifications to other collaborative clients and persists the neuronal morphological data state to an underlying distributed database using a hybrid version control mechanism. This hybrid version control mechanism combines full data snapshots at discrete time points with fine-grained incremental operation records with time-series identifiers. The continuous memory-mapped data structure of this invention compactly arranges neuronal node data in physically contiguous memory regions and employs an index array and open addressing strategy to handle hash collisions, avoiding the memory fragmentation problem caused by linked list pointer jumps in traditional chained hash tables.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of bio-image informatics and distributed collaborative computing technology, specifically to a method and system for real-time collaborative reconstruction of neuronal morphological data across multiple terminals. Background Technology

[0002] Three-dimensional neuronal morphological reconstruction is one of the fundamental tasks in computational neuroscience. Accurately resolving the morphological parameters of neurons is crucial for understanding the connectivity and signal processing mechanisms of brain neural networks. With the development of high-resolution whole-brain imaging techniques (such as fluorescence microscopy optical section tomography fMOST, linear illumination modulation microscopy LIMM, etc.) and automated three-dimensional neuronal tracking algorithms, the size of digital neuronal morphological datasets continues to grow.

[0003] However, limited by the signal-to-noise ratio during optical microscopy imaging, the complexity of neuronal fibers intertwining in three-dimensional space, and topological biases in automatic tracking algorithms, reconstruction results relying entirely on algorithms often contain artifacts and topological breakpoints. Therefore, manual verification remains a necessary step to ensure reconstruction accuracy. At the whole-brain scale, traditional single-machine serial processing modes suffer from low throughput and long processing times, becoming a major factor restricting the efficiency of large-scale brain science data processing.

[0004] In existing technologies, the emergence of multi-user collaborative annotation platforms (such as FlyWire) has improved reconstruction efficiency to some extent. However, when these platforms are applied to neuronal data under optical microscopes and face real-time high-concurrency updates, the following technical problems still exist: First, the underlying data structure is not sufficiently adapted to the processor's multi-level cache, leading to increased memory access latency. Existing neuron processing software often uses hash tables based on chaining to store the topological relationships and spatial attributes of neuron nodes. When a large number of nodes are inserted, the linked list nodes in the chaining method are discretely distributed in physical memory, resulting in frequent pointer chasing operations when traversing the neuron topology. This leads to poor spatial locality, reduced utilization of the processor's high-speed cache, and increased cache miss rates, ultimately causing increased processing latency in high-concurrency scenarios.

[0005] Second, there is a trade-off between storage overhead and rollback efficiency in multi-client real-time collaboration scenarios when using full snapshots and one-way logging. If a full snapshot strategy is adopted, high-frequency editing operations will generate a large amount of redundant data, occupying storage space and disk I / O resources; if only incremental operation logs are used for version control, when rolling back to an earlier historical state, all operation records need to be replayed from the initial state, resulting in high computational overhead and high response latency.

[0006] Third, there is a lack of real-time automated topology quality inspection mechanisms for high-throughput collaborative editing. During the parallel injection of tracking data across multiple devices, operational errors by different annotators can introduce structural errors such as topology loops, abnormal multi-way trees, and isolated branches. Existing quality control methods are mostly post-event offline inspections, failing to provide timely feedback to operators after the operation, leading to the accumulation of errors in subsequent data flow. Summary of the Invention

[0007] The purpose of this invention is to provide a method and system for real-time collaborative reconstruction of neuronal morphological data from multiple ends, so as to solve the problems mentioned in the background art.

[0008] To address the aforementioned technical problems, this invention provides the following technical solution: a method for real-time collaborative reconstruction of neuronal morphological data across multiple terminals, comprising: S1. Obtain distributed 3D neuron morphological reconstruction data to be processed from multiple devices. Based on the system state space model containing spatial coordinates, topological parameters, functional attributes and timestamps, initialize the node information of the multi-user collaborative reconstruction task. S2. Construct a neuron morphological tree-like topology data structure based on continuous memory mapping. The data structure includes a storage array with contiguous physical addresses and an index array for storing offset pointers. The design goal of this data structure is to improve the cache hit rate of the processor when traversing and retrieving neuron topology data by maintaining the continuous arrangement of data entities in physical memory. S3. During the concurrent execution of neuron topology editing operations by multiple collaborative clients, the editing operations of each client are collected in real time, and each editing operation is converted into an incremental record and pushed into the global request queue of the server in time sequence; the incremental record includes operation type identifier (such as add, modify, delete) and related node data (including node identifier, three-dimensional coordinates, parent node identifier, etc.). S4. Based on the obtained global request queue, the neuron topology data in memory is modified in situ concurrently through the constructed neuron morphology tree topology data structure based on continuous memory mapping. During the modification process, the physical address continuity of the node data in the storage array is utilized to load the data of the node to be modified and its adjacent nodes into the cache through the processor's hardware prefetching mechanism, thereby improving the cache hit rate and reducing the main memory access latency. S5. After the memory modification is completed, the incremental record is synchronized to other collaborative clients, and the neuron morphological data state is persisted to the underlying distributed database through a hybrid version control mechanism. The hybrid version control mechanism combines full data snapshots at discrete time nodes with fine-grained incremental operation records with time sequence identifiers. When rolling back to a specific historical time point, it is only necessary to load the most recent previous snapshot and replay the incremental operation records after that snapshot, thereby balancing the storage space occupation and the computational overhead of historical state reconstruction. S6. Within the same processing cycle of the memory modification in step S4, perform real-time quality detection on the updated local or global topology of neurons, locate structural errors, and generate real-time visual feedback information containing the coordinates of the error location to the client.

[0009] Furthermore, the storage array in step S2 is a pre-allocated, contiguous memory region in physical memory, used to compactly store the key-value pair data of neuron nodes according to the node write time order; The index array is used to store reference pointers to the physical offsets of each node in the storage array, and hash collisions are handled through an open addressing strategy.

[0010] Furthermore, the insertion operation of neuron nodes is performed through the contiguous memory-mapped data structure, specifically including: Parse the incremental records extracted from the global request queue to obtain the key-value pairs of the neuron nodes to be inserted; The target hash bucket position corresponding to the key is calculated using a hash function and mapped to the corresponding index in the index array; If the corresponding index position is empty, the key-value pair is appended to the current valid end of the storage array, and its physical offset is recorded in the index array; If the corresponding index position is already occupied, append the key-value pair to the end of the storage array, allocate a new bucket in the index array using the open addressing probing strategy, and record the offset pointer.

[0011] Furthermore, the neuron node data lookup operation is performed through the aforementioned contiguous memory-mapped data structure, specifically including: Receive node topology query requests, calculate the hash value of the target query key using a hash function, and locate the corresponding bucket in the index array; Extract the offset pointer recorded in the bucket, perform linear address calculation using the memory base address of the storage array and the offset, and directly locate the target physical address of the storage array; During the reading process, the spatial continuity of the storage array is utilized to load the data of the target node and its adjacent nodes into the cache through a hardware prefetching mechanism.

[0012] Furthermore, the deletion operation of neuron node data is performed through the contiguous memory-mapped data structure, specifically including: Based on the key of the node to be deleted, its physical offset position in the storage array is located by hash calculation and index array; Mark the node to be deleted as pending recycling. If the node is not located at the end of the valid storage array, the data of the last valid node at the end of the valid array is copied to the location of the node to be deleted, and the corresponding offset pointer in the index array is updated synchronously. Decrement the cursor at the end of the storage array by one to release the original end space, thus maintaining the continuity and compactness of the storage array.

[0013] Furthermore, in step S5, the data state is persisted to the underlying distributed database through a hybrid version control mechanism, specifically including: In response to the user's explicit trigger command or preset time threshold or operation frequency threshold, a full state snapshot of the current three-dimensional neuron tree topology is created and saved as a time anchor to the distributed database. Within the time window between any two consecutive full snapshots, capture and persist all add, modify, and delete operation instructions for neuron nodes, forming an incremental operation record stream with time sequence identifiers; When a version rollback request or cross-version difference comparison request for a specific historical timestamp is received, the previous full snapshot closest to that timestamp is extracted, and the incremental operation records after that snapshot are replayed in time sequence in memory through a continuous memory-mapped data structure to reconstruct the data state corresponding to the target timestamp.

[0014] Furthermore, in step S6, real-time quality detection is performed on the updated neuron topology, including: performing graph traversal analysis starting from the changed node to detect and locate at least one structural error among topological loops, isolated branches, and abnormal multi-way trees. Once the incremental record has completed data updates in memory, the graph traversal analysis algorithm is triggered to perform connectivity detection starting from the changed node. The system checks if there are closed loops with the same node identifier in the traversal path. If so, it is determined to be a topological loop error, and a blocking and saving instruction or a visual warning message is generated. After the statistical update, if the out-degree value of the child nodes of each node exceeds the preset biological branching threshold, it is determined to be an abnormal multi-branch tree and a topology conflict alarm is generated. Calculate the connectivity between each connected component and the main root node of the neuron cell body, mark connected components that cannot be traced back to the main root node as isolated branches, and generate calibration guidance information containing their location coordinates.

[0015] This invention also provides a multi-terminal real-time collaborative reconstruction system for neuronal morphological data, comprising: A multi-client interaction module, compatible with various terminal devices, is used to collect concurrent neuron morphology tracking and calibration instructions from distributed users through a graphical user interface; The concurrent scheduling and connection layer module is connected to the multi-client interaction module and is used to receive and process high-concurrency user requests, and aggregate the requests into a global request queue. The contiguous memory processing module, connected to the concurrent scheduling and connection layer module, is used to manage the storage array and index array of neuron topology data in a contiguous physical memory region, and to perform operations such as adding, deleting, modifying and searching node data. The hybrid version control module, connected to the continuous memory processing module, is used to execute a data persistence strategy based on a combination of full state snapshots and incremental operation records, as well as version tracing and historical state reconstruction based on full state snapshots and incremental operation records. The real-time quality control module, connected to the continuous memory processing module, is used to perform real-time quality detection on the updated neuron topology within the same processing cycle after the continuous memory processing module completes data updates, and to feed back visual information to the multi-client interaction module.

[0016] Furthermore, it also includes: The project and access control module is used to manage user permissions hierarchically based on access control lists, allocate neuronal morphology data of different brain regions or different species to corresponding user groups, and control the reading, modification and deletion operations of the data according to the permission level of the user group. The feature extraction and analysis module, connected to the continuous memory processing module, is used to extract the morphological features of the updated neurons after the continuous memory processing module completes the node data update. The morphological features include at least one of the following: number of neuron ends, total number of branches, number of bifurcation points, and bifurcation angle.

[0017] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for real-time collaborative reconstruction of neuronal morphological data across multiple terminals.

[0018] Compared with the prior art, the beneficial effects achieved by the present invention are: (1) This invention improves the utilization efficiency of the underlying data structure for processor cache. The contiguous memory-mapped data structure of this invention arranges the neuron node data compactly in a physically contiguous memory region and uses an index array and open addressing strategy to handle hash collisions, thus avoiding the memory fragmentation problem caused by linked list pointer jumps in traditional chained hash tables. Under the same test conditions, compared with the chained hash table implementation, the data structure of this invention improves the processing speed of node insertion operations by about 62.8%, the search operation speed by about 31.6%, and the deletion operation speed by about 67.6%, while reducing the memory usage of the core data structure by about 39.3%. (2) This invention reduces the system's interaction latency in high-concurrency collaborative scenarios. Under the condition that the test platform is an Intel i7-12700H processor and DDR5-4800 memory, when the number of concurrent online users increases from 1 to 51 and the target neuron node size increases from 50,000 to 550,000, the system's end-to-end round-trip latency remains within the range of 1.5 milliseconds to 15 milliseconds; (3) The hybrid version control mechanism balances storage overhead and historical state rollback efficiency. When rolling back to a specific historical point in time, the system only needs to load the most recent previous full snapshot and replay the incremental operation records after that snapshot, which reduces computational overhead compared to the full replay of the pure incremental method; (4) By performing topology quality detection within the same processing cycle of data update, error location information can be fed back to the operator in a timely manner after structural errors occur, reducing the cost of post-error correction. Attached Figure Description

[0019] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of the system layered architecture topology in an embodiment of the present invention, illustrating the logical relationship between the client layer, server layer, and database layer; Figure 2 This is a flowchart illustrating the process of adding new branches during neuron reconstruction in a multi-terminal collaborative annotation process according to an embodiment of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Please see Figures 1-2 This invention provides a method for real-time collaborative reconstruction of neuronal morphological data across multiple terminals. The core of this method is to construct a real-time data processing architecture suitable for large-scale three-dimensional neuronal collaborative reconstruction. By optimizing the memory access mode, the traditional batch-level three-dimensional map construction task is transformed into a processing task that supports real-time multi-terminal and multi-person synchronous collaboration.

[0022] Example 1: System Architecture Deployment Scheme This embodiment describes the four-layer architecture design of the system of the present invention at the distributed network layer, which is used to support the access of high concurrency and heterogeneous devices.

[0023] The first layer is the multi-client layer. In this embodiment, the system supports access from various types of clients, including: desktop applications running on high-performance computing workstations, providing complete 3D visualization and fine annotation capabilities; lightweight applications running on mobile smart devices, supporting data browsing and basic verification operations; and immersive applications running on virtual reality headsets, providing interactive 3D editing support for complex neural spatial structures that are difficult to analyze on a 2D screen. All types of clients communicate with the server through a unified data interface.

[0024] The second layer is the concurrent access and load balancing layer. In large-scale annotation jobs, a large number of annotators may submit editing commands concurrently within a short period of time. This embodiment configures a load balancing mechanism in the access layer to evenly distribute user requests to backend service instances. At the communication level, the system adopts a bidirectional streaming communication mechanism based on a high-performance RPC framework. A long-lived connection is maintained between the client and the server, and incremental topology changes on the server side can be pushed to online clients in real time via RPC streams. For web terminals that do not support the RPC protocol, the system uses a reverse proxy component to translate HTTP protocol requests into RPC requests.

[0025] The third layer is the core service computation layer. This layer contains several functional modules: a continuous memory processing module for performing memory-level read and write operations on neuron topology data; a hybrid version control module for managing data persistence and version tracking; a project and permission control module for implementing access control list-based permission management; and a real-time quality control module for performing real-time topology detection and feedback. Each module is deployed in a containerized manner, supporting independent scaling.

[0026] The fourth layer is the distributed database layer. In this embodiment, the underlying database uses a document-based NoSQL database cluster (such as a MongoDB replica set). The coordinate data, metadata (including annotator identifier, brain region identifier, etc.), and incremental operation logs of each neuron in SWC / ESWC format are all stored in document form. The replica set mechanism ensures data availability through master-slave redundancy and reduces the I / O load on the master node through read-write separation.

[0027] Example 2: Implementation Mechanism of Contiguous Memory Mapped Data Structure This embodiment details the implementation of the ConMemMap data structure. This data structure comprises two core components: a storage array and an index array. Storage Array: During system initialization, a contiguous linear memory region with a preset initial capacity is allocated in the operating system heap. All input neuron node key-value pairs (including node identifiers, 3D coordinates, radius, and topological parent node identifiers, etc.) are compactly arranged in the contiguous memory region according to their write time order. When the amount of stored data reaches a preset threshold of the current capacity, dynamic expansion is achieved by reallocating a larger contiguous memory region and copying existing data.

[0028] Index Array: As the hash logic layer, the length of the index array corresponds to the preset number of hash buckets. Each element in the index array does not store actual neuron node data, but only an integer offset value, which points to the physical location of the corresponding node in the storage array relative to the base address.

[0029] Based on the above data structure, the specific procedures for various operations are as follows: Node insertion operation: When a client adds a new neuron branch node, this operation is transformed into incremental recording. The system extracts the globally unique identifier of the new node as the key and calculates the target bucket index in the index array using a hash function. If the bucket is empty, the node's key-value pair is appended to the valid end of the storage array, and the offset of the data relative to the base address of the storage array is recorded in that bucket. If a hash collision occurs and the bucket is already occupied, the system uses an open addressing probing strategy (such as linear probing) to find the next available bucket in the index array, while appending the data entity to the valid end of the storage array and recording the corresponding offset in the new bucket. This method ensures the physical continuity of data entities in the storage array and avoids memory fragmentation caused by linked list allocation.

[0030] Node lookup operation: When a node query request is received, the system calculates the hash value of the target key using a hash function, locates the corresponding bucket in the index array with constant time complexity, extracts the offset value, and then directly locates the target physical address in the storage array by calculating the linear address of the base address plus the offset. Since the node data in the storage array is physically contiguous, the processor's hardware prefetch mechanism loads the adjacent node data in its physical memory (these nodes are inserted sequentially in time and usually have topological correlation) into the L1 or L2 cache in units of cache lines (usually 64 bytes) when reading the target node. Subsequent accesses to adjacent topological nodes can directly hit the cache, reducing the number of accesses to main memory.

[0031] Node deletion operation: This embodiment employs a swap-and-pop strategy for deletion. The system first uses hash calculations and an index array to locate the physical position of the node to be deleted within the storage array, marking it as awaiting recycling. If the node is not located at the end of the storage array, all attribute data of the last valid node at the end of the storage array is copied to the physical location of the node to be deleted, and the offset pointer in the index array originally belonging to that end node is simultaneously updated to point to the new physical address. Finally, the cursor at the end of the storage array is decremented by one. This strategy avoids memory gaps caused by directly deleting intermediate elements, maintaining the compactness of the storage array.

[0032] Example 3: Hybrid Version Control Model This embodiment describes the specific implementation of a hybrid version control mechanism. This mechanism divides the database into the following three dimensions: Active Status Data Table: A dedicated area in the database stores the latest status data of each neuron. Regular data access by the client reads directly from this table, eliminating the need to assemble incremental records for each access.

[0033] Incremental operation log stream: Within the time window between any two consecutive full snapshots, the system captures and records all atomic modification operations on neuron nodes. Each record contains the operation type, operator identifier, timestamp, target node identifier, and data values ​​before and after the modification, forming an operation log sequence with strict time sequence identification.

[0034] Anchor-level state snapshot: Snapshot creation is triggered by two conditions: first, explicit triggering by the user through interface operations; second, automatic triggering when the system detects that the number of operations or the elapsed time since the last snapshot has reached a preset threshold. The snapshot content is a full copy of the complete topology and attribute data of all current neuron nodes.

[0035] When a rollback to any historical point in time is required, the version control engine processes the following: First, it retrieves the full snapshot closest to and earlier than the target timestamp from the snapshot index; then, it loads this snapshot data into a contiguous memory-mapped data structure in memory; next, it extracts all operation records from the incremental operation record stream between this snapshot and the target timestamp, and replays them sequentially in memory; once the replay is complete, the complete data state at the target time point is obtained. This mechanism reduces storage space usage compared to a pure snapshot approach and shortens the computation time for historical state reconstruction compared to a pure incremental approach.

[0036] Example 4: Real-time Topology Quality Detection This embodiment describes the workflow of the real-time quality control module. When an operator submits and saves a topology edit operation on the client, the corresponding incremental record is updated in the continuous memory processing module. Within the same processing cycle, the quality control module is triggered to perform the following checks, starting from the changed node: Topological loop detection: In the biological structure of neurons, the typical neuron topology is an acyclic tree structure. The quality control module starts from the changed node and performs a depth-first traversal along the parent node. If, during the traversal, a node that has already been visited is found on the current path (i.e., the path forms a closed loop), a topological loop error is determined, and a warning message containing the identifiers and coordinates of each node in the loop is generated and pushed to the client.

[0037] Abnormal Multibranch Tree Detection: In neuronal branching development, binary bifurcation is a common branching pattern. The quality control module counts the out-degree values ​​of the child nodes of each node in the local topology where the node changes. If the out-degree value of a node's child nodes exceeds a preset biological bifurcation threshold (the default threshold is 2, which can be configured according to the specific species and brain region), the node is marked as a suspected abnormal multibranch tree and a conflict alert is generated.

[0038] Isolated branch detection: The quality control module periodically verifies whether each connected component in memory can be traced back to the main root node of the neuron cell body through topological links. For connected components that cannot be traced back to the main root node, they are marked as isolated branches, and calibration guidance information containing the spatial coordinates of each node in the branch is generated to prompt the operator to perform bridging repair.

[0039] The above detection operations are performed based on a contiguous memory-mapped data structure. Due to the caching performance advantage brought by the contiguous arrangement of data in physical memory, the detection process can be completed in a short time. The detection results are pushed to the operator via bidirectional RPC communication, and different types of errors are highlighted in different colors in the user interface (e.g., loops are highlighted in purple, multi-branch anomalies are marked in orange, and isolated branches are marked in blue), so that the operator can make timely corrections.

[0040] Furthermore, the system's feature extraction and analysis module runs in the background in a plug-in manner. After the neuronal topology data is updated, it continuously extracts morphological feature information, including but not limited to the number of neuronal terminals, the total number of branches, the number of bifurcation points, local bifurcation angles, remote bifurcation angles, and spatial distribution characteristics within specific brain regions. This feature data can be used for downstream scientific research such as cross-species comparisons, analysis of neural diversity in brain regions, or pathological morphological analysis.

[0041] Example 5: System Performance Testing To verify the performance of the method and system described in this invention, a concurrent stress test was conducted in a controlled local area network environment. The host hardware configuration of the test platform was an Intel i7-12700H processor (supporting multi-threading) equipped with DDR5-4800 random access memory. The neuron sample data used in the test was taken from the whole-brain anatomy dataset of the NeuroMorpho.Org platform.

[0042] Test plan: Gradually increase the number of users operating online simultaneously from 1 to 51, and gradually increase the node size of the target neuron from 50,000 to 550,000.

[0043] Concurrency latency test results: Under the above test conditions, the system's end-to-end round-trip latency (including network transmission, load balancing, memory data processing, quality detection, data persistence, and result return) remained within the range of 1.5 milliseconds to 15 milliseconds.

[0044] Performance test results for single operations: When dealing with neuron data with a large number of nodes, the time taken for a single node insertion operation is 5 to 69 milliseconds, the time taken for search and traversal operations is 2 to 557 milliseconds, and the time taken for deletion operations involving a wide range of branches is 2 to 977 milliseconds.

[0045] Comparative test results with the baseline implementation based on chained hash tables: Under the same test dataset and hardware conditions, the continuous memory-mapped data structure of the present invention improves the processing speed of node insertion operations by approximately 62.8%, search operations by approximately 31.6%, deletion operations by approximately 67.6%, and reduces the memory footprint of the core data structure by approximately 39.3%.

[0046] Regarding access control: The system supports a project-based access control mechanism, using access control lists to manage user permissions hierarchically. Teams and operators are assigned to user groups with clearly defined permission boundaries. Project managers can configure differentiated access permissions for lower-level users, for example, restricting specific user groups to only have data read and anomaly marking permissions, but not node deletion permissions.

[0047] In summary, this invention reduces the system response latency and computational overhead of large-scale three-dimensional neuron morphological collaborative reconstruction by using a continuous memory-mapped data structure designed for processor cache characteristics, a hybrid version control mechanism that balances storage overhead and rollback efficiency, and a real-time topology quality detection method based on graph traversal.

[0048] 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.

[0049] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention 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 the present invention should be included within the protection scope of the present invention.

Claims

1. A method for real-time collaborative reconstruction of neuronal morphological data across multiple terminals, characterized in that, include: S1. Obtain distributed 3D neuron morphological reconstruction data to be processed from multiple devices. Based on the system state space model containing spatial coordinates, topological parameters, functional attributes and timestamps, initialize the node information of the multi-user collaborative reconstruction task. S2. Construct a neuron morphological tree topology data structure based on continuous memory mapping. The data structure includes a storage array with contiguous physical addresses and an index array for storing offset pointers. S3. During the concurrent execution of neuron topology editing operations by multiple collaborative clients, the editing operations of each client are collected in real time, and each editing operation is converted into an incremental record and pushed into the global request queue of the server in time sequence. S4. Based on the obtained global request queue, perform in-situ concurrent modification of the neuron topology data in memory through the constructed neuron morphology tree topology data structure based on continuous memory mapping; S5. After the memory modification is completed, the incremental record is synchronized to other collaborative clients, and the neuron morphological data state is persisted to the underlying distributed database through a hybrid version control mechanism; the hybrid version control mechanism combines full data snapshots at discrete time nodes with fine-grained incremental operation records with time sequence identifiers. S6. Within the same processing cycle of the memory modification in step S4, perform real-time quality detection on the updated local or global topology of neurons, locate structural errors, and generate real-time visual feedback information containing the coordinates of the error location to the client.

2. The method for real-time collaborative reconstruction of neuronal morphological data across multiple terminals according to claim 1, characterized in that: The storage array in step S2 is a pre-allocated, contiguous memory region in physical memory, used to compactly store the key-value pair data of neuron nodes according to the node write time order; The index array is used to store reference pointers to the physical offsets of each node in the storage array, and hash collisions are handled through an open addressing strategy.

3. The method for real-time collaborative reconstruction of neuronal morphological data across multiple terminals according to claim 1, characterized in that: The insertion operation of neuron nodes is performed through the contiguous memory-mapped data structure, specifically including: Parse the incremental records extracted from the global request queue to obtain the key-value pairs of the neuron nodes to be inserted; The target hash bucket position corresponding to the key is calculated using a hash function and mapped to the corresponding index in the index array; If the corresponding index position is empty, the key-value pair is appended to the current valid end of the storage array, and its physical offset is recorded in the index array; If the corresponding index position is already occupied, append the key-value pair to the end of the storage array, allocate a new bucket in the index array using the open addressing probing strategy, and record the offset pointer.

4. The method for real-time collaborative reconstruction of neuronal morphological data across multiple terminals according to claim 1, characterized in that: The operation of searching for neuron node data using the contiguous memory-mapped data structure specifically includes: Receive node topology query requests, calculate the hash value of the target query key using a hash function, and locate the corresponding bucket in the index array; Extract the offset pointer recorded in the bucket, perform linear address calculation using the memory base address of the storage array and the offset, and directly locate the target physical address of the storage array; During the reading process, the spatial continuity of the storage array is utilized to load the data of the target node and its adjacent nodes into the cache through a hardware prefetching mechanism.

5. The method for real-time collaborative reconstruction of neuronal morphological data across multiple terminals according to claim 1, characterized in that: The deletion operation of neuron node data is performed through the aforementioned contiguous memory-mapped data structure, specifically including: Based on the key of the node to be deleted, its physical offset position in the storage array is located by hash calculation and index array; Mark the node to be deleted as pending recycling. If the node is not located at the end of the valid storage array, the data of the last valid node at the end of the valid array is copied to the location of the node to be deleted, and the corresponding offset pointer in the index array is updated synchronously. Decrement the cursor at the end of the storage array by one to release the original end space, thus maintaining the continuity and compactness of the storage array.

6. The method for real-time collaborative reconstruction of neuronal morphological data across multiple terminals according to claim 1, characterized in that: Step S5 involves persisting the data state to the underlying distributed database using a hybrid version control mechanism, specifically including: In response to the user's explicit trigger command or preset time threshold or operation frequency threshold, a full state snapshot of the current three-dimensional neuron tree topology is created and saved as a time anchor to the distributed database. Within the time window between any two consecutive full snapshots, capture and persist all add, modify, and delete operation instructions for neuron nodes, forming an incremental operation record stream with time sequence identifiers; When a version rollback request or cross-version difference comparison request for a specific historical timestamp is received, the previous full snapshot closest to that timestamp is extracted, and the incremental operation records after that snapshot are replayed in time sequence in memory through a continuous memory-mapped data structure to reconstruct the data state corresponding to the target timestamp.

7. The method for real-time collaborative reconstruction of neuronal morphological data across multiple terminals according to claim 1, characterized in that: In step S6, real-time quality detection is performed on the updated neuron topology, including: performing graph traversal analysis starting from the changed node to detect and locate at least one structural error in topological loops, isolated branches, and abnormal multi-way trees. Once the incremental record has completed data updates in memory, the graph traversal analysis algorithm is triggered to perform connectivity detection starting from the changed node. The system checks if there are closed loops with the same node identifier in the traversal path. If so, it is determined to be a topological loop error, and a blocking and saving instruction or a visual warning message is generated. After the statistical update, if the out-degree value of the child nodes of each node exceeds the preset biological branching threshold, it is determined to be an abnormal multi-branch tree and a topology conflict alarm is generated. Calculate the connectivity between each connected component and the main root node of the neuron cell body, mark connected components that cannot be traced back to the main root node as isolated branches, and generate calibration guidance information containing their location coordinates.

8. A multi-terminal real-time collaborative reconstruction system for neuronal morphological data, employing the multi-terminal real-time collaborative reconstruction method for neuronal morphological data according to any one of claims 1 to 7, characterized in that, include: A multi-client interaction module, compatible with various terminal devices, is used to collect concurrent neuron morphology tracking and calibration instructions from distributed users through a graphical user interface; The concurrent scheduling and connection layer module is connected to the multi-client interaction module and is used to receive and process high-concurrency user requests, and aggregate the requests into a global request queue. The contiguous memory processing module, connected to the concurrent scheduling and connection layer module, is used to manage the storage array and index array of neuron topology data in a contiguous physical memory region, and to perform operations such as adding, deleting, modifying and searching node data. The hybrid version control module, connected to the continuous memory processing module, is used to execute a data persistence strategy based on a combination of full state snapshots and incremental operation records, as well as version tracing and historical state reconstruction based on full state snapshots and incremental operation records. The real-time quality control module, connected to the continuous memory processing module, is used to perform real-time quality detection on the updated neuron topology within the same processing cycle after the continuous memory processing module completes data updates, and to feed back visual information to the multi-client interaction module.

9. The multi-terminal real-time collaborative reconstruction system for neuronal morphological data according to claim 1, characterized in that, Also includes: The project and access control module is used to manage user permissions hierarchically based on access control lists, allocate neuronal morphology data of different brain regions or different species to corresponding user groups, and control the reading, modification and deletion operations of the data according to the permission level of the user group. The feature extraction and analysis module, connected to the continuous memory processing module, is used to extract the morphological features of the updated neurons after the continuous memory processing module completes the node data update. The morphological features include at least one of the following: number of neuron ends, total number of branches, number of bifurcation points, and bifurcation angle.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for real-time collaborative reconstruction of neuronal morphological data from multiple terminals as described in any one of claims 1 to 7.