A laboratory site reservation management method and system
By using a cloud-edge collaborative architecture and a state-bit mapping protocol, the problems of transmission redundancy and display lag in the laboratory site reservation management system under high concurrency and limited network bandwidth were solved, achieving low latency, high consistency, and visual synchronization, thus improving the user interaction experience.
Patent Information
- Application Number
- CN202610329470.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-16
AI Technical Summary
The existing laboratory site reservation management system suffers from transmission redundancy and display lag under high concurrency and limited network bandwidth conditions, making it difficult to achieve low-latency, high-consistency, and synchronized visualization.
The cloud-edge collaborative architecture is adopted. The cloud stores static spatial skeleton data and builds spatial indexes. The edge generates unique identifiers based on Hilbert curves to establish mapping indexes. Incremental state data packets are pushed in real time using state-bit mapping protocol and differential compression mechanism. The edge performs local style redrawing through GPU texture mapping technology.
In environments with limited network bandwidth and high concurrency, it achieves low-latency, high-consistency visualization and synchronization of complex spatial information, improves user interaction experience, reduces data transmission redundancy and rendering lag, and ensures efficient system operation.
Smart Images

Figure CN122222091A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent management technology, specifically to a method and system for laboratory site reservation management. Background Technology
[0002] Traditional laboratory management relies primarily on manual registration or simple spreadsheets, resulting in inefficiency and information delays. While web-based laboratory reservation management systems have emerged in recent years, significant technical bottlenecks remain in areas such as spatial visualization, real-time status synchronization, and system performance under high concurrency.
[0003] Existing laboratory site reservation management technologies can be mainly divided into the following categories: The first category is reservation systems based on text lists or two-dimensional tables. These systems list laboratory names, capacities, floors, and availability status on web pages for users to filter. However, such systems lack intuitive spatial location displays. Users see abstract text information but cannot perceive the specific location of the site within the building, the location of entrances and exits, or its relative relationship with surrounding facilities. For large laboratory centers with multiple floors and dozens or even hundreds of rooms, users find it difficult to quickly locate target resources, and administrators lack a global view when coordinating resources across floors. The second category is graphical management systems based on static images or simple vector graphics. For example, static images exported from CAD drawings or simple SVG graphics are embedded in the page as a base map. Spatial geometric information and business status information are often hard-coded in the same graphic file or tightly bound data structure. Once the laboratory layout is slightly adjusted, the base map needs to be recreated or a large amount of front-end code needs to be modified, resulting in extremely high maintenance costs. Furthermore, this static architecture struggles to support interactive operations such as stepless zooming and panning of the map, leading to a poor user experience. The third category is intelligent systems that focus on backend algorithm scheduling or rely on hardware sensors. These solutions often face a trade-off between limited network bandwidth and excessive server load when addressing large-scale visualization and real-time state synchronization on the web. On the one hand, to achieve real-time state updates, traditional technologies often employ edge-based periodic polling mechanisms, which generate massive amounts of invalid requests and cause server congestion when multiple users access the site concurrently. On the other hand, when rendering complex indoor maps in a web environment, if each state change requires retransmission of a map data packet containing complete geometric coordinates and redrawing of the entire canvas, it will lead to severe data transmission redundancy and front-end rendering stuttering, making it difficult to achieve smooth, second-level state synchronization.
[0004] In summary, how to solve the transmission redundancy and display lag caused by the strong coupling of complex spatial geographic information and high-frequency dynamic business status data in a laboratory resource management environment with limited network bandwidth and high concurrency access, and achieve low latency and high consistency visualization synchronization, is a technical problem that urgently needs to be solved in this field.
[0005] Therefore, a method and system for laboratory site reservation management is proposed. Summary of the Invention
[0006] The purpose of this invention is to provide a method and system for laboratory site reservation management. This invention adopts a cloud-edge collaborative architecture. The cloud stores static spatial skeleton data and constructs a spatial index, while the edge establishes a mapping index based on unique identifiers generated by Hilbert curves. The cloud maintains logically separated dynamic business states, generates incremental state data packets without geometric coordinates in response to change events, and pushes them to the edge in real time using a state-bit mapping protocol and differential compression mechanism. The edge directly parses the data stream and performs local style redrawing through GPU texture mapping technology. This invention effectively solves the problems of redundant transmission and rendering lag in complex spatial information under high concurrency and weak network environments, achieving low-latency, high-consistency visualization synchronization of large-scale vector maps.
[0007] To achieve the above objectives, the present invention provides the following technical solution: A method for managing laboratory site reservations includes: The cloud storage describes the static spatial skeleton data of the laboratory layout, which includes several geographic feature objects with unique identifiers and geometric coordinate information. The cloud constructs a spatial index based on the geometric coordinate information. The edge loads the static spatial skeleton data based on the spatial index and renders it as a vector layer, and establishes a mapping index between the unique identifier and the rendered vector meta-object in memory. A dynamic business status container that separates cloud maintenance from static spatial skeleton data logic stores a key-value correspondence between a unique identifier and the laboratory site reservation business status, and captures change events of the reservation business status through an event listening mechanism. In response to a change event, the cloud extracts the latest appointment status based on the unique identifier that has changed, generates an incremental status data packet that does not contain geometric coordinate information, and pushes it to the edge in real time. The edge device receives incremental status data packets, uses the mapping index to directly locate the corresponding vector primitive object, maps the latest appointment service status to a visual style, performs local style redrawing on the vector primitive object, and updates the view.
[0008] Preferably, the structure definition of the static spatial skeleton data and the process of establishing the mapping index specifically include: the static spatial skeleton data is serialized and stored using the GeoJSON standard format, wherein geographic feature objects correspond to geographic feature nodes; the geographic feature nodes contain geometric coordinate fields and attribute information fields; in the preprocessing stage, the cloud performs attribute stripping and identifier establishment operations: traversing the original design drawing data, retaining the vector coordinate data of walls, doors, windows, and experimental platforms to the geometric coordinate fields, removing non-spatial attributes from the original data, and establishing a corresponding unique identifier for each geographic feature object; when establishing the mapping index at the edge, traversing the loaded GeoJSON data object, parsing the unique identifier, using the unique identifier as the key and the object reference of the graphic element instance as the value, constructing a hash mapping table; the graphic element instance contains the path data of the graphic, the current fill style, and the hierarchical relationship, and the hash mapping table resides in the browser heap memory at the edge until the page is destroyed.
[0009] Preferably, a unique identifier is established for each geographic feature object, specifically including: discretizing the two-dimensional plane coordinate space of the laboratory into a grid of preset resolution; constructing a single continuous path traversing the grid using the Hilbert curve algorithm; calculating the sequential index value of the geometric center point of each geographic feature object on the path, and using it as the unique identifier of the geographic feature object; allocating a continuous virtual address state data buffer in memory at the edge, and writing the business state data of each vector primitive object sequentially into the state data buffer according to the numerical order of the unique identifier, so that the state data of several vector primitive objects that are adjacent in logical space occupy continuous storage units in the memory buffer, thereby improving the CPU cache hit rate.
[0010] Preferably, the spatial index is constructed as follows: the cloud establishes a quadtree spatial index for the static spatial skeleton data, recursively dividing the two-dimensional plane where the laboratory is located into four quadrants until the number of geographic feature objects contained in each quadrant is less than a preset node splitting threshold, and storing the unique identifier of the geographic feature object in the corresponding leaf node; the edge device monitors the user's map interaction operations in real time, calculates the bounding box coordinates of the current viewport, and sends them to the cloud; the cloud uses the bounding box coordinates and the quadtree spatial index to perform a spatial intersection query, identifies all leaf nodes that intersect with the current viewport, and extracts the static spatial skeleton data corresponding to the geographic feature objects contained in the leaf nodes, which is then sent to the edge device as a visible area data piece; after receiving the visible area data piece, the edge device performs incremental rendering on the vector data in the visible area data piece and performs a video memory release operation on the vector primitive objects that have moved out of the viewport area.
[0011] Preferably, generating incremental state data packets without geometric coordinate information specifically includes: a cloud-defined state-bit mapping protocol that maps N types of reservation service states for the laboratory site to binary bit strings of length M, wherein the total number of encoding combinations that the length M of the binary bit string can represent is not less than the number of types N of the reservation service states; the cloud uses the quadtree spatial index to identify all geographic feature objects within the current viewport and sorts these geographic feature objects according to the numerical value of their unique identifiers; the cloud converts the latest reservation service state of each geographic feature object into the corresponding binary bit string according to the sorted order and splices them to form a state bitmap stream; the incremental state data packet consists of a header and a body: the header contains the viewport area information targeted by the data packet; the body is the binary data of the state bitmap stream; when transmitting the same number of state changes, the data payload volume of the state bitmap stream is compressed to 1 / 8 to 1 / 32 of the original text volume.
[0012] Preferably, the edge end uses the mapping index to perform local style redrawing, including: the edge end maintains a global one-dimensional state texture covering the entire laboratory in video memory, the pixel arrangement order of the global one-dimensional state texture strictly corresponds to the numerical order of the unique identifier; after receiving the state bitmap stream, the edge end parses the state data in the data packet and updates it to the corresponding offset position of the global one-dimensional state texture; the edge end runs a fragment shader, and when rendering the pixels of each vector primitive object, executes the following logic: obtains the unique identifier corresponding to the current vector primitive object; calculates the global linear offset of the unique identifier in the global geographic feature object set and normalizes it to texture coordinates; reads the binary bit value of the global one-dimensional state texture at the texture coordinates through a texture sampling function, and converts the binary bit value into RGBA color value using a lookup table method, and outputs it to the frame buffer.
[0013] A laboratory site reservation management system includes: Index rendering module: The cloud stores static spatial skeleton data describing the layout of the laboratory, which includes several geographic feature objects with unique identifiers and geometric coordinate information. The cloud constructs a spatial index based on the geometric coordinate information. The edge loads the static spatial skeleton data based on the spatial index and renders it as a vector layer, and establishes a mapping index between the unique identifier and the rendered vector meta-object in memory. Listening Management Module: A dynamic business status container that separates cloud-based maintenance from static spatial skeleton data logic. It stores the key-value correspondence between unique identifiers and laboratory site reservation business status, and captures change events of reservation business status through an event listening mechanism. Data push module: In response to change events, the cloud extracts the latest appointment business status based on the unique identifier that has changed, generates an incremental status data package that does not contain geometric coordinate information, and pushes it to the edge in real time; Style redrawing module: The edge receives incremental status data packets, uses the mapping index to directly locate the corresponding vector primitive object, maps the latest appointment business status to the visual style, performs local style redrawing on the vector primitive object, and updates the view.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention fundamentally changes the inefficient mode of traditional technology, which bundles geometric data and attribute data for transmission, by constructing a physically decoupled architecture of a static spatial skeleton and dynamic business states. Combined with an innovative state-bit mapping protocol and a quadtree sorting and packaging mechanism, the system can generate incremental state data packets containing identifiers and extremely short binary bit strings, significantly reducing the communication load for state changes from the conventional kilobyte level to the byte level. This extreme transmission efficiency allows the system to maintain a millisecond-level state push frequency even in harsh environments with extremely limited network bandwidth or facing large-scale concurrent access across the entire university, effectively solving the problem of data display lag and ensuring a high degree of consistency between cloud and edge business states.
[0015] 2. This invention utilizes the Hilbert space-filling curve algorithm to reconstruct the memory layout at the edge, ensuring that physically adjacent laboratory primitives occupy contiguous address segments in computer memory, thereby significantly improving the CPU cache hit rate at the hardware level. Furthermore, by converting business status data into one-dimensional textures and uploading them to GPU memory, this invention creatively utilizes fragment shaders for parallel lookup table rendering, transforming cumbersome logical judgments into efficient texture sampling operations. This hardware-software co-optimization strategy enables the system to easily support high-frequency dynamic updates of tens of thousands of vector primitives, completely eliminating page reflow and visual flickering caused by traditional DOM operations or full Canvas redraws, providing users with a smooth interactive experience comparable to native desktop applications.
[0016] 3. This invention introduces a view frustum culling and on-demand loading mechanism based on quadtree spatial indexing, effectively solving the system performance degradation problem in large-scale complex laboratory scenarios. The system can dynamically calculate and distribute spatial skeleton data within the visible area based on the real-time rectangular range of the user's viewport, achieving precise data delivery. This mechanism not only significantly reduces the peak memory usage at the edge, preventing browser crashes, but also decouples the first-screen loading time from the total map data volume. This allows the system to achieve second-level startup and smooth scaling, whether managing a single laboratory or coordinating a cluster of experimental buildings across campuses, balancing the global perspective of macro-resource scheduling with the fine granularity of micro-site management. Attached Figure Description
[0017] Figure 1 A flowchart of a laboratory site reservation management method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a laboratory site reservation management system provided in an embodiment of the present invention; Figure 3 This is a flowchart illustrating the incremental update and rendering process of the laboratory site reservation service status, as provided in an embodiment of the present invention. Detailed Implementation
[0018] 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, not all, of the embodiments of the present invention. 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.
[0019] Please see Figures 1 to 3 This invention provides a method and system for laboratory site reservation management, the technical solution of which is as follows: A method for managing laboratory site reservations includes: The cloud storage describes the static spatial skeleton data of the laboratory layout, which includes several geographic feature objects with unique identifiers and geometric coordinate information. The cloud constructs a spatial index based on the geometric coordinate information. The edge loads the static spatial skeleton data based on the spatial index and renders it as a vector layer, and establishes a mapping index between the unique identifier and the rendered vector meta-object in memory. A dynamic business status container that separates cloud maintenance from static spatial skeleton data logic stores a key-value correspondence between a unique identifier and the laboratory site reservation business status, and captures change events of the reservation business status through an event listening mechanism. In response to a change event, the cloud extracts the latest appointment status based on the unique identifier that has changed, generates an incremental status data packet that does not contain geometric coordinate information, and pushes it to the edge in real time. The edge device receives incremental status data packets, uses the mapping index to directly locate the corresponding vector primitive object, maps the latest appointment service status to a visual style, performs local style redrawing on the vector primitive object, and updates the view.
[0020] Example 1: This embodiment applies to the reservation management of a laboratory with multiple experimental buildings and a large number of various laboratories. In this scenario, traditional reservation systems face significant challenges: at the beginning of each semester or during the application period for large-scale research projects, tens of thousands of faculty and students simultaneously access the system to check the site status, causing the server to crash due to high-frequency queries; simultaneously, due to the complex internal layout of the laboratories, the front-end experiences severe page lag when rendering large vector maps containing tens of thousands of primitives, and status updates are often delayed by several seconds, leading to frequent order collisions. To solve the aforementioned problems of visualization performance and status synchronization under high concurrency, this embodiment adopts a dynamic and static separation method for laboratory site reservation management.
[0021] As one embodiment of the present invention, refer to Figure 1 A flowchart of a laboratory site reservation management method, refer to Figure 3 Flowchart of incremental update and rendering process for laboratory site reservation status.
[0022] Furthermore, the structural definition of the static spatial skeleton data and the establishment process of the mapping index specifically include: the static spatial skeleton data is serialized and stored using the GeoJSON standard format, wherein geographic feature objects correspond to geographic feature nodes; geographic feature nodes contain geometric coordinate fields and attribute information fields; in the preprocessing stage, the cloud performs attribute stripping and identifier establishment operations: traversing the original design drawing data, retaining the vector coordinate data of walls, doors, windows, and experimental platforms to the geometric coordinate field, removing non-spatial attributes from the original data, and establishing a corresponding unique identifier for each geographic feature object; when establishing the mapping index at the edge, traversing the loaded GeoJSON data object, parsing the unique identifier, using the unique identifier as the key and the object reference of the graphic element instance as the value, constructing a hash mapping table; the graphic element instance contains the path data of the graphic, the current fill style, and the hierarchical relationship, and the hash mapping table resides in the browser heap memory at the edge until the page is destroyed.
[0023] Specifically, during the system initialization phase, the cloud server first extracts, transforms, and loads the original architectural drawings imported from CAD. Assume that a laboratory object in the original data contains "room number," "responsible person," "area," and a complex set of wall outline coordinates. The preprocessor performs attribute stripping, extracting non-rendering-essential business attributes such as responsible person and area to a relational database. The GeoJSON's geometric coordinate field retains the polygon coordinate set, and the attribute information field retains a system-generated 32-bit integer unique identifier. This reduces the size of a single-floor map file from 15MB to approximately 2MB. When the client loads this simplified GeoJSON, the rendering engine (such as a WebGL or Canvas context) traverses and parses each geographic feature node. A hash table is instantiated in the browser's heap memory, with the key being the UID: the unique identifier value, and the value pointing to the memory address pointer of the polygon vertex data in the video memory. When the room color needs to be updated, the system does not need to traverse the entire DOM tree or layer array. Instead, it directly uses a hash table to instantly locate the corresponding graphic object instance in O(1) time complexity, laying the foundation for subsequent high-frequency state updates.
[0024] To ensure consistent parsing across the edge rendering engine, the static spatial skeleton data adheres to a specific GeoJSON structure: the root object is a FeatureCollection, the coordinate system uses a Cartesian coordinate system with the building's specific corner as the origin, and the unit is meters. The geometry field type for each geographic feature object is selected based on the entity's shape: rooms and walls use Polygon, while doors and windows use LineString. In the properties field, a strict attribute stripping strategy is implemented: only fields directly involved in the rendering logic are retained, including "uid" (unique identifier), "element_type" (element type, with enumerated values such as walls, doors / windows, lab benches, etc.), and "layer" (floor). Other non-spatial attributes (such as the responsible person's name, asset number, and capacity) are removed and stored in the associated database. This streamlined structure significantly reduces the size of the map file for a single floor.
[0025] This invention effectively solves the problems of data overload and inefficient addressing in front-end rendering by stripping non-spatial attributes and establishing a hash mapping index based on unique identifiers during the preprocessing stage; it significantly improves the first-screen loading speed by making the map file extremely lightweight; more importantly, it uses hash mapping to replace the traditional array traversal search, which reduces the operation time for locating any laboratory object in complex scenes with tens of thousands of primitives from milliseconds to microseconds, ensuring the real-time response capability for subsequent dynamic state updates.
[0026] Furthermore, a unique identifier is established for each geographic feature object. Specifically, this includes: discretizing the two-dimensional plane coordinate space of the laboratory into a grid with a preset resolution; constructing a single continuous path traversing the grid using the Hilbert curve algorithm; calculating the sequential index value of the geometric center point of each geographic feature object on the path, and using it as the unique identifier of the geographic feature object; allocating a continuous virtual address state data buffer in memory at the edge, and writing the business state data of each vector primitive object sequentially into the state data buffer according to the numerical order of the unique identifier, so that the state data of several vector primitive objects that are adjacent in logical space occupy continuous storage units in the memory buffer, thereby improving the CPU cache hit rate.
[0027] The implementation details of the Hilbert curve algorithm are as follows: The preset resolution is usually set to The grid is defined as follows, where N is the order of the Hilbert curve. In this embodiment, for a laboratory area of A square meters, the order N is calculated as follows: N equals the logarithm (base 2) of the square root of A divided by the area of the smallest spatial unit (e.g., 0.25 square meters), rounded up, preferably in the range of 10 to 16. This resolution range ensures effective differentiation of adjacent smallest independent spaces (such as workstations spaced only 0.5 meters apart) in a laboratory building with a physical size of hundreds of meters, while also ensuring that the generated Hilbert curve index values are within the representation range of 32-bit or 64-bit integer data in a computer, avoiding numerical overflow.
[0028] The method for calculating the geometric center point is as follows: extract the coordinate set of the polygon vertices of the geographic feature object, calculate the arithmetic mean of the horizontal coordinates and the arithmetic mean of the vertical coordinates of all vertices respectively, and obtain the centroid coordinates.
[0029] The calculation steps for the sequential index value include: First, mapping the centroid coordinates to the grid system and calculating the row and column index of the grid it belongs to by rounding down; second, calling the coordinate-to-distance conversion function of the Nth-order Hilbert curve, which maps the two-dimensional row and column index to a one-dimensional curve distance value based on recursive fractal logic; finally, using this one-dimensional distance value as the unique identifier of the geographic feature object. For boundary cases, when the centroid coordinates happen to fall on the grid boundary, they are uniformly assigned to the grid with the smaller coordinate value; when multiple objects' centroids are mapped to the same grid, causing identifier conflicts, an incrementing sequence number suffix is appended to the identifier to distinguish them.
[0030] Specifically, considering the unique spatial layout of the laboratory, this embodiment employs the Hilbert curve algorithm to generate unique identifiers. Assuming the two-dimensional plane of the laboratory building is divided into a discrete grid, the Hilbert curve traverses all grids as a continuous one-dimensional line, maintaining good spatial locality. The position index of each laboratory's geometric center point falling on this curve is calculated as its UID. For example, rooms 301 and 302, which are physically adjacent, might have UIDs 5001 and 5002. During initialization, the edge browser allocates a contiguous memory space using an ArrayBuffer or Uint8Array as a state data buffer. When writing state data, it fills the memory strictly according to the UID order. This means that the state data of rooms 301 and 302 are also adjacent in physical memory addresses. When the CPU reads and processes the state of room 301, according to the principle of locality, the L1 / L2 cache of modern CPUs automatically prefetches data from adjacent addresses, thus loading the state data of room 302 and surrounding laboratories into the cache. Compared to the fragmented distribution of data in heap memory caused by traditional random ID allocation, this design significantly improves the CPU cache hit rate in the rendering loop.
[0031] This invention utilizes the principle of spatial locality in computer architecture to solve the CPU cache failure problem in large-scale vector map rendering. By mapping two-dimensional spatial proximity to one-dimensional memory proximity through Hilbert curves, the CPU can read state data in batches with extremely high efficiency when rendering continuously distributed laboratories within the viewport, which greatly reduces bus I / O overhead and significantly improves the frame rate performance of the map under large-scale data.
[0032] Further, a spatial index is constructed, including: the cloud establishes a quadtree spatial index for the static spatial skeleton data, recursively dividing the two-dimensional plane where the laboratory is located into four quadrants until the number of geographic feature objects contained in each quadrant is less than a preset node splitting threshold, and storing the unique identifier of the geographic feature object in the corresponding leaf node; the edge device monitors the user's map interaction operations in real time, calculates the bounding box coordinates of the current viewport, and sends them to the cloud; the cloud uses the bounding box coordinates and the quadtree spatial index to perform a spatial intersection query, identifies all leaf nodes that intersect with the current viewport, and extracts the static spatial skeleton data corresponding to the geographic feature objects contained in the leaf nodes, which is then sent to the edge device as a visible area data piece; after receiving the visible area data piece, the edge device performs incremental rendering on the vector data in the visible area data piece and performs a video memory release operation on the vector primitive objects that have moved out of the viewport area.
[0033] The node splitting threshold is typically set between 30 and 100 objects. This threshold is set to balance the depth of the quadtree with the rendering load of the leaf nodes; a threshold that is too small will result in an excessively deep tree, increasing traversal overhead, while a threshold that is too large will fail to effectively leverage the performance advantages of frustum culling.
[0034] The quadtree spatial index features multi-resolution hierarchical aggregation: each non-leaf node of the quadtree maintains a state aggregation metadata, which calculates the reservation occupancy percentage of all child nodes within the node's coverage area in real time. When processing viewport intersection queries, the server synchronously obtains the current view zoom level. If the zoom level is lower than a preset macro threshold, the server truncates the quadtree traversal, extracts the state aggregation metadata of the non-leaf nodes intersecting the viewport to generate a data packet, and does not send incremental state data of specific geographic features. After receiving the data, the edge device overlays and renders a semi-transparent heatmap layer on the corresponding area of the map, using color depth to represent the overall resource occupancy rate within the area, without rendering the independent state of specific geographic features. In macro browsing mode, this blocks the transmission of massive amounts of micro data. For example, when viewing the entire campus view, it is not necessary to transmit the detailed status of thousands of rooms; only the percentage values of dozens of areas need to be transmitted, reducing the data transmission volume from a linear level to a logarithmic level.
[0035] The macroscopic threshold corresponds to the zoom level of the electronic map, typically set between level 8 and level 12. When the zoom level is less than this threshold, the viewport coverage usually exceeds the physical span of a single laboratory building, entering a macroscopic overview mode at the campus or park level.
[0036] Specifically, to support seamless switching between macro views across floors and the entire campus and micro views of individual laboratories, the cloud platform employs dynamic quadtree indexing technology with multi-resolution hierarchical aggregation capabilities. A node splitting threshold of 50 is set, meaning that when the number of laboratories in an area exceeds 50, it is automatically divided into four sub-quadrants with a depth of over 10 levels. Simultaneously, each non-leaf node maintains real-time status aggregation metadata in the background, such as recording the percentage of "occupied" laboratories (e.g., 85%) among all child nodes within that quadrant. In practice, differentiated logic is executed based on the user's view zoom level: Scenario 1 (Microscopic View): When the user zooms the map to a fine level such as "East side of the third floor of the Chemistry Building" (Zoom>15), the front-end JS script sends the current viewport bounding box (e.g., [x1:100, y1:200, x2:500, y2:600]) to the cloud. The cloud retrieves the skeletal data of the 30 laboratories under these nodes by searching the intersecting leaf nodes through a quadtree. The edge device uses a diff algorithm to incrementally render and release the video memory resources that are moved off the screen. Scenario 2 (Macroscopic View): When the user zooms to a macroscopic level such as "Full Campus View" (Zoom<10), the cloud truncates the deep traversal of the quadtree and extracts the state aggregation metadata of the high-level non-leaf nodes that intersect with the viewport (e.g., "North Campus Node: 80% Occupancy"). At this time, the data packet does not contain specific room vector data. After receiving it, the edge device overlays and renders a semi-transparent red (representing high occupancy) heat map layer on the corresponding map area.
[0037] The construction and maintenance of the quadtree spatial index follow these detailed rules: During the construction phase, the termination condition for recursive partitioning is set to meet any of the following conditions: the number of objects in the current quadrant is less than or equal to the partitioning threshold (e.g., 50); or the spatial side length of the quadrant is less than the minimum partition size (e.g., 0.5 meters); or the tree depth reaches a preset maximum value (e.g., 12 levels). For geographic feature objects that cross partition lines, a multi-reference attribution strategy is adopted, that is, their unique identifier is simultaneously stored in all leaf nodes that intersect with their geometric bounding boxes. During the maintenance phase, the real-time update of state aggregation metadata adopts a bottom-up propagation mechanism: when the state of an object in a leaf node changes, the occupancy rate of that leaf node is recalculated, and the aggregation data of the parent node is updated layer by layer upwards. To avoid high-frequency oscillations, an update threshold is set, and propagation continues upwards to the root node only when the change in the occupancy rate of the parent node exceeds a preset percentage (e.g., 0.1%).
[0038] This invention effectively solves the problems of browser crashes and data explosion in macroscopic views caused by massive spatial data through a quadtree-based view frustum culling and multi-resolution LOD aggregation mechanism. On the one hand, view frustum culling ensures that the front-end loads viewport-visible data from a microscopic perspective, keeping video memory usage at a constant low level. On the other hand, the LOD aggregation mechanism creatively blocks the transmission of massive microscopic data in macroscopic browsing mode, reducing the data transmission volume from a linear level related to the total number of rooms to a logarithmic level related to screen pixels. This not only achieves map initialization in seconds but also ensures a smooth response speed for users from viewing the heat map distribution of the entire campus to locating specific experimental platforms, balancing the global perspective of macroscopic resource scheduling with the fine granularity of microscopic site management.
[0039] Furthermore, generating incremental state data packets without geometric coordinate information specifically includes: a cloud-predefined state-bit mapping protocol that maps N types of reservation service states for the laboratory site to binary bit strings of length M, wherein the total number of encoding combinations that the length M of the binary bit string can represent is not less than the number of types N of the reservation service states; the cloud uses the quadtree spatial index to identify all geographic feature objects within the current viewport and sorts these geographic feature objects according to the numerical value of their unique identifiers; the cloud, based on the sorted order, sequentially converts the latest reservation service state of each geographic feature object into the corresponding binary bit string and concatenates them to form a state bitmap stream; the incremental state data packet consists of a header and a body: the header contains the viewport area information targeted by the data packet; the body is the binary data of the state bitmap stream; when transmitting the same number of state changes, the data payload volume of the state bitmap stream is compressed to 1 / 8 to 1 / 32 of the original text volume.
[0040] The incremental state data packet employs a differential run-length encoding mechanism: the server caches the historical state bitmap stream sent to the edge at the previous moment; when generating the incremental data packet at the current moment, the current state bitmap stream and the historical state bitmap stream are XORed bitwise to generate a differential bitmap; run-length encoding is performed on the differential bitmap to compress consecutive zero bits into a counting descriptor, generating a compressed differential payload; the server periodically sends unprocessed full keyframes at a preset frame interval (the time period corresponding to this frame interval is preferably 5 to 20 seconds. Periodic full keyframe transmission aims to correct state deviations caused by network packet loss or cumulative errors in differential calculation. The setting of this interval needs to strike a balance between bandwidth consumption and state consistency recovery speed) to reset the decompression baseline at the edge; the edge uses the locally cached previous frame bitmap and the received differential payload to perform an inverse XOR operation to restore the latest state bitmap stream; this maximizes bandwidth utilization. In relatively stable laboratory conditions (e.g., only one room changes within a few seconds), the amount of data transmitted is almost zero (a few bytes of RLE descriptor), making it perfectly suited for extremely low bandwidth environments.
[0041] Specifically, to address network congestion under high concurrency, this embodiment designs a simplified communication protocol based on differential run-length encoding. The system first defines four laboratory states (N=4), represented by two binary bits (M=2) (00, 01, 10, 11). Assuming there are 1000 laboratories within the viewport, the cloud generates a basic 250-byte state bitmap stream after sorting by UID. Based on this, the cloud introduces a keyframe / differential frame mechanism similar to video encoding: the cloud caches the bitmap sent in the previous frame and performs a bitwise XOR operation between the current frame and the previous frame. In scenarios where the laboratory states are relatively stable (e.g., one laboratory changes from "idle" to "occupied" within one second), the XOR result will be a sparse bitmap containing a large number of consecutive '0's with '1's at specific positions. The system then performs run-length encoding on this differential bitmap, compressing the continuous zero sequence into a short counting descriptor (e.g., "first 400 bits unchanged"), resulting in an incremental data packet payload that may be 5 to 10 bytes. Meanwhile, the server is configured to send a full keyframe without differential processing every 60 frames (approximately 10 seconds) to calibrate the decompression baseline at the edge. Actual test data shows that, under normal operating conditions, this mechanism compresses data transmission volume from 40KB in traditional JSON format to single-digit bytes, achieving a compression ratio of several thousand times.
[0042] The specific implementation of the state-bit mapping protocol and differential run-length encoding is as follows: First, the system predefines the laboratory's reservation service status enumeration and its corresponding binary encoding: idle status is mapped to "000", reserved status to "001", in use status to "010", under maintenance status to "011", temporarily occupied status to "100", and pending approval status to "101". A 3-bit binary string (M=3) is used here to cover all states. Second, the incremental status data packet body adopts a "mark-count-data" interleaved run-length encoding format: the first byte of the encoding unit is a mark bit; if the highest bit is 0, it indicates zero run-length, and the lower 7 bits represent the number of consecutive unchanged (zero value) states; if the highest bit is 1, it indicates a non-zero data segment, and the lower 7 bits represent the number of bits of the subsequent original status data. During edge parsing, the differential bitmap is restored based on the mark bit, and then XORed with the locally cached historical bitmap to recover the current latest status bitmap stream.
[0043] This invention, by combining a hybrid "state-bit mapping" and differential run-length encoding mechanism, squeezes the bandwidth usage of network state synchronization to its theoretical limit. Utilizing the temporal sparsity of state changes in laboratory settings, through XOR differential encoding and RLE compression, the transmission load is nearly zero (transmitting extremely short change descriptors) during the time slices when most states remain unchanged. Combined with periodic full keyframe calibration, it not only perfectly adapts to congested campus networks or weak mobile network environments, but also ensures that server egress bandwidth is not exhausted under extreme high concurrency with tens of thousands of users online simultaneously, achieving low-cost, highly reliable millisecond-level real-time synchronization.
[0044] Furthermore, the edge device utilizes the mapping index to perform local style redrawing, including: the edge device maintaining a global one-dimensional state texture covering the entire laboratory in video memory, the pixel arrangement order of the global one-dimensional state texture strictly corresponding to the numerical order of the unique identifier; after receiving the state bitmap stream, the edge device parses the state data in the data packet and updates it to the corresponding offset position of the global one-dimensional state texture; the edge device runs a fragment shader, and when rendering the pixels of each vector primitive object, executes the following logic: obtains the unique identifier corresponding to the current vector primitive object; calculates the global linear offset of the unique identifier in the global geographic feature object set and normalizes it to texture coordinates; reads the binary bit value of the global one-dimensional state texture at the texture coordinates through a texture sampling function, and converts the binary bit value into an RGBA color value using a lookup table method, and outputs it to the frame buffer.
[0045] The lookup table method specifically involves: pre-constructing a color lookup table texture containing N pixels, where the i-th pixel stores the RGBA color value corresponding to the i-th business state. After obtaining the binary bit value of the state, the fragment shader uses the normalized value of the State_ID as the texture coordinate to perform secondary sampling on the color lookup table texture to obtain the final output color.
[0046] Edge web applications dynamically calculate the required texture size in GPU memory. If the total number of labs is less than the maximum texture width supported by the GPU (typically 4096 or 8192), a one-dimensional texture is requested; if the total number of labs exceeds the maximum texture width, a two-dimensional texture is requested, with its width set to the maximum texture width and its height set to the rounded-up quotient of the total number of labs divided by that width. In the fragment shader, linear unique identifiers are converted into two-dimensional texture coordinates through modulo and division operations: the horizontal texture coordinates are obtained by dividing the unique identifier modulo the texture width by the texture width, and the vertical texture coordinates are obtained by dividing the unique identifier divided by the texture width, rounded-down, by the texture height.
[0047] Specifically, to achieve optimal rendering performance, this embodiment pushes state resolution and shading logic down to the GPU hardware layer. The edge web application requests a global one-dimensional texture of size 4096×1 pixels in the GPU memory, with each pixel's R-channel value storing a state code for a laboratory. When a binary state stream is received from the cloud, the JavaScript main thread does not directly manipulate DOM color styles; instead, it calls the WebGL gl.texSubImage2D interface to directly upload the binary stream and overlay it onto a specified area of the texture. This process takes 0.1 milliseconds. Subsequently, when the fragment shader runs on the GPU, for each pixel on the screen, the shader program normalizes and calculates the texture coordinates (u,v) based on the primitive's UID (pre-passed as an attribute to the vertex shader). For example, a laboratory with UID 50 corresponds to the 50th pixel in the texture coordinates. The shader uses the texture2D function to sample this pixel value, obtain the state code (e.g., '1' represents reserved), and instantly matches the corresponding color, such as red rgba(255,0,0,1), in the GPU's internal color lookup table, finally outputting it to the screen.
[0048] The specific rendering logic of the fragment shader includes the following precise calculation steps: Step 1, the edge end passes the total number of global geographic feature objects as a unified variable to the shader. Step 2, the shader receives the UID of the current primitive and calculates the normalized texture coordinates: the horizontal coordinate u equals (UID plus 0.5) divided by the total number of global objects. Adding 0.5 here ensures that the sampling point falls on the center of the texture pixel, avoiding floating-point errors. Step 3, the texture sampling function is called to read the R channel value of the state texture at coordinate u and restore it to an integer status code. Step 4, a secondary lookup table is performed: using the normalized value of this integer status code as the new texture coordinates, the preset color lookup table texture is sampled to obtain the corresponding RGBA color value and assigned to the fragment color variable, thus completing a single rendering loop.
[0049] This invention utilizes the programmable pipeline technology of GPUs to transfer the heavy tasks of state mapping and color calculation from the CPU to the GPU, which is good at parallel computing, thus achieving style updates with zero CPU load. Through texture sampling technology, state updates no longer rely on expensive DOM operations. No matter how high the frequency of state changes (e.g., 10 times per second), the rendering engine can maintain a full frame rate of 60 FPS, providing users with a smooth and fluid interactive experience like native desktop software.
[0050] The edge device establishes a long-lived WebSocket connection with the server, enables binary transmission mode, and serializes incremental state data packets using Protocol Buffers format. The server maintains connection stability through a heartbeat keep-alive mechanism and calculates the round-trip latency of the network channel using heartbeat responses. When the connection is broken and re-established, it performs breakpoint resumption based on the last received sequence number. Furthermore, the server is configured with semantic priority-based adaptive congestion control logic: incremental state data packets are assigned different priority labels according to the business semantics they carry: security alarm states have the highest priority, appointment change states have medium priority, and environmental parameter states have low priority. The server maintains multiple priority transmission queues. When the round-trip time of the network channel exceeds a congestion threshold (the congestion threshold is dynamically set based on the baseline round-trip time of the network environment, typically ranging from 200ms to 500ms to determine a weak network condition), congestion control mode is activated. In congestion control mode, the server prioritizes clearing high-priority queues and uses a weighted round-robin strategy to schedule the transmission of data packets from medium- and low-priority queues. Simultaneously, data packets that remain in low-priority queues for more than a preset maximum lifespan are subject to forced priority promotion to prevent long-term synchronization stagnation of non-critical business states. The maximum lifespan is preferably set to 30 to 120 seconds to prevent non-critical business data from failing to synchronize for extended periods under extreme congestion.
[0051] Specifically, the edge device establishes a long-lived connection with the cloud via WebSocket, setting `binaryType` to `arraybuffer`. Data packets use a Protocol Buffers structure to compress JSON text into a compact binary stream. The server sends a heartbeat frame every 5 seconds. If network round-trip latency exceeds 300ms three times consecutively, network congestion is detected, and flow control mode is initiated. Three sending queues are maintained: smoke / access control alarms are stored in a high-priority queue, seat locking / release is stored in a medium-priority queue, and temperature / humidity / light data is stored in a low-priority queue. During flow control, the scheduler prioritizes sending high-priority data. After the high-priority queue is cleared, data from the medium and low-priority queues is sent in a round-robin fashion with a weight ratio of 7:3. If an environmental parameter packet remains in the low-priority queue for more than 60 seconds, the system automatically promotes it to medium priority for forced transmission. In addition, when a client reconnects due to signal interruption, it automatically sends a synchronization request containing `last_seq_id`, which the server uses to resend lost incremental status packets, completing the breakpoint resumption.
[0052] The communication protocol adheres to the following strict specifications to ensure the stability of cloud-edge collaboration: Incremental state data packets are defined using Protocol Buffers format, including a header and body. The header fields explicitly include: a monotonically increasing sequence number, a flag indicating whether it is a full keyframe, and a service priority label. The heartbeat keep-alive mechanism sets the edge to send a heartbeat frame every 5 seconds. If the round-trip latency calculated for three consecutive times exceeds 300 milliseconds, congestion control is triggered. The breakpoint resume mechanism is implemented through sequence number synchronization: When the connection is reset, the edge sends a synchronization request containing the last successfully received sequence number; the server retrieves the send queue cache and resends all data packets after that sequence number; if the requested sequence number exceeds the server's cache range, the server forcibly sends the latest full keyframe to reset the synchronization baseline.
[0053] This invention constructs a highly reliable communication channel with service awareness capabilities. Protocol Buffers and binary transmission significantly reduce bandwidth overhead and adapt to weak network environments. Adaptive congestion control logic based on semantic priority fundamentally solves the problem of critical data blocking under high concurrency or network jitter, ensuring the immediate arrival rate of security alarms and core reservation services under extreme conditions. Simultaneously, the breakpoint resume mechanism guarantees the continuity of the data stream, while the TTL forced elevation strategy effectively prevents long-term "starvation" of non-critical data, achieving an optimal balance between system real-time performance and data integrity.
[0054] This embodiment significantly addresses the performance drawbacks caused by the strong coupling of geometric and state data, which leads to a cascading effect, by constructing a dynamic-static separation cloud-edge collaborative architecture and an index-based local update mechanism. It focuses network transmission load on extremely small "pure state" incremental packets and rendering operations on modifying the attributes of "single primitives," achieving zero transmission redundancy and zero rendering reflow. Even in scenarios with tens of thousands of primitives refreshed 10 times per second, the system maintains a smooth 60 FPS, completely eliminating page flicker and greatly improving system stability under high concurrency.
[0055] Example 2: This embodiment provides a laboratory site reservation management system based on a cloud-edge collaborative architecture. The system constructs an efficient spatiotemporal data processing and visualization pipeline through distributed deployment of hardware resources and deep decoupling of software logic. Physically, the system consists of a server cluster deployed in the cloud and client devices (including web browsers, mobile WebViews, or smart display terminals) running at the edge. Logically, it is divided into an index rendering module, a monitoring and management module, a data push module, and a style redrawing module.
[0056] As one embodiment of the present invention, refer to Figure 2 A schematic diagram of a laboratory site reservation management system, referring to... Figure 3 Flowchart of incremental update and rendering process for laboratory site reservation status.
[0057] The index rendering module is the cornerstone of the entire system, responsible for the structured processing, index construction, and edge rendering of static spatial data. This module spans both the cloud and edge, enabling efficient distribution and loading of spatial data.
[0058] In the cloud, this module first preprocesses the original laboratory design drawings (such as CAD or BIM files). The system performs a rigorous attribute stripping operation, removing non-spatial attributes irrelevant to visual rendering (such as decoration materials, asset numbers, construction units, etc.) from the original data, extracting the vector geometric coordinates of geographic feature objects such as walls, doors, windows, and lab benches, and serializing them into static spatial skeleton data in the GeoJSON standard format. During this process, the module has a built-in unique identifier generation unit responsible for establishing a global UID (unique identifier) for each geographic feature object. To optimize subsequent memory access efficiency, this unit uses the Hilbert space-filling curve algorithm to discretize the two-dimensional plane coordinate space where the laboratory is located into a grid of preset resolution, calculate the sequential index value of the geometric center point of each geographic feature object on the Hilbert curve path, and establish this value as the UID. This generation mechanism ensures that the UID values of physically adjacent laboratories are, in high probability, also continuous.
[0059] Subsequently, the cloud constructs a dynamic quadtree spatial index based on the geometric coordinate information. This index recursively divides the laboratory plane into four quadrants until the number of primitives in each leaf node is less than a preset threshold. To support multi-scale view display, this module also has a multi-resolution hierarchical aggregation function, maintaining state aggregation metadata in the non-leaf nodes of the quadtree and calculating the resource occupancy percentage of all child nodes within the coverage area of the node in real time, so as to block the delivery of massive amounts of micro data in the macro view.
[0060] At the edge, the index rendering module is responsible for responding to user map interactions. When a user opens a page or moves the viewport, the edge calculates the bounding box coordinates of the current viewport and sends them to the cloud. The cloud uses a quadtree index to perform spatial intersection queries, extracting and returning static spatial skeleton data pieces within the viewport. The edge loads these data pieces and renders them as vector layers, while simultaneously building a mapping index in the browser's heap memory. Specifically, the system traverses and parses the loaded GeoJSON object, using the UID as the key and the object reference of the graphics element instance generated by the rendering engine as the value to build a hash mapping table. In particular, this module allocates a contiguous state data buffer in memory and reserves space for each primitive strictly according to the numerical order of the UID. Thanks to the UIDs generated by Hilbert curves, this layout ensures that the state data of physically adjacent primitives are also stored contiguously in the computer's physical memory, greatly improving the cache hit rate of the CPU / GPU during traversal rendering.
[0061] The monitoring and management module is deployed in the cloud and acts as the system's state hub, responsible for maintaining the dynamic logic of the laboratory reservation business. The core design concept of this module is the separation of dynamic and static elements, that is, the dynamic business state container it maintains is logically completely isolated from the aforementioned static spatial skeleton data.
[0062] This container (typically implemented as a high-performance in-memory database such as Redis) stores the key-value mapping between unique identifiers and the status of laboratory site reservations, without storing any geometric coordinates or shape data. This design simplifies the data structure of the business status to the extreme. This module is configured with an event listening mechanism that subscribes to the change stream of the business system via database triggers or message queues. When a reservation action occurs (such as application, approval, locking, release, or maintenance registration), the listening mechanism captures the status change event in real time and parses out the changed laboratory UID and the new status code. This module can handle frequent status changes under high concurrency, ensuring the atomicity and consistency of business logic in high-frequency access scenarios.
[0063] The data push module connects the cloud and the edge, and is responsible for efficiently synchronizing monitored change events to the client. This module integrates deep data compression algorithms and adaptive congestion control logic, and is a core component for solving network bandwidth bottlenecks.
[0064] When responding to a change event, the cloud first extracts the latest reservation service status based on the changed UID. To minimize transmission load, this module generates incremental status data packets, which strictly do not contain any geometric coordinate information. The generation process uses a state-bit mapping protocol to map N service states to a binary bit string of length M (satisfying...). To further compress the data, this module uses a quadtree index to identify all objects within the current viewport, forces these objects to be sorted according to their UID values, and concatenates the state bit strings of all objects to form a state bitmap stream.
[0065] This module further employs a differential run-length encoding mechanism: it buffers the historical state bitmap stream sent to the edge at the previous moment, performs a bitwise XOR operation between the current bitmap and the historical bitmap to generate a differential bitmap, and performs run-length encoding on the consecutive zero sequences in the differential bitmap. This allows the transmitted payload to be an extremely short change descriptor within a relatively stable time slice.
[0066] At the transport layer, this module establishes a long-lived WebSocket connection with the edge and enables binary transmission mode. To cope with weak network environments, this module is configured with semantic priority-based adaptive congestion control logic. Data packets are marked as security alarms (high priority), scheduled changes (medium priority), or environmental parameters (low priority) according to business semantics. The system calculates the round-trip latency of the network channel in real time through a heartbeat keep-alive mechanism. Once the round-trip latency is detected to exceed the congestion threshold, flow control mode is immediately activated: high-priority queues are cleared first, medium and low-priority queues are scheduled using weighted round-robin, and low-priority data packets that have timed out are forcibly prioritized to ensure that core business data is not lost or blocked in extreme network environments.
[0067] The style repaint module runs at the edge and is responsible for efficiently transforming the received abstract data into visual styles. This module abandons the traditional DOM manipulation mode and instead adopts GPU hardware-accelerated rendering technology.
[0068] When the edge receives the incremental state data packet and decompresses it to restore the state bitmap stream, this module does not directly modify the properties of the vector primitives. Instead, it uses the binary state data as a texture source and updates a global one-dimensional state texture maintained in the GPU memory using interfaces such as gl.texSubImage2D. The pixel arrangement order of this texture strictly corresponds to the numerical order of the UID.
[0069] Subsequently, this module drives the rendering engine to perform local style redraw. During the rendering loop, the system runs a custom fragment shader. For each pixel of a vector primitive being drawn, the shader first obtains the primitive's UID, calculates the global linear offset using the UID's sequence position in the global set, and normalizes it to texture coordinates. Next, the shader reads the corresponding binary bit value from the state texture using a texture sampling function and instantly maps the status code to RGBA color values using a built-in color lookup table, outputting it to the framebuffer.
[0070] The style redrawing module incorporates a multi-dimensional visualization mapping configuration strategy to support rich business scenario displays. Specifically, this strategy includes three layers of visualization logic: The first layer is status hue mapping, where the system pre-defines standard business color gamuts in the GPU's color lookup table. For example, status codes "00" (idle) correspond to highly saturated green (RGBA:0,200,83,1.0), "01" (reserved) corresponds to warning orange, "10" (in use) corresponds to dark red, and "11" (under maintenance) corresponds to gray with a diagonal texture. When the fragment shader reads the status value, it directly outputs the corresponding pixel color, achieving intuitive status differentiation. The second layer is interactive highlight feedback. Utilizing the aforementioned hash mapping index, when the user hovers the mouse over a laboratory element, the system instantly locates the element instance via its UID and triggers a "halo" effect or increases the transparency value of the element's alpha channel in the shader by modifying the Uniform variable, achieving microsecond-level pickup feedback without redrawing surrounding elements. The third layer is for dynamic visualization of alarms. For primitives that receive the high-priority "safety alarm" label (such as smoke alarms), the shader introduces a time variable and uses trigonometric functions to control the Alpha channel to fluctuate periodically, so that the laboratory appears as a "breathing light" style red flashing effect on the map, thus highlighting the emergency event in the static map background.
[0071] This process shifts the heavy tasks of state judgment and color calculation from the CPU main thread to the GPU, which excels at parallel computing, enabling flicker-free, ultra-fast refresh of massive primitives. By utilizing the mapping index and GPU textures, the system visually updates primitive regions whose states have changed without triggering layout reordering, thus significantly reducing device power consumption and heat generation while ensuring real-time view performance.
[0072] In summary, this embodiment significantly improves the system's robustness and response speed through deep optimization across the entire link. First, by reconstructing the memory layout using Hilbert curves, the CPU cache hit rate is greatly improved; combined with quadtree view frustum culling and LOD aggregation, precise on-demand data delivery is achieved, effectively preventing front-end memory overflow in the macro view. Second, at the communication level, differential run-length encoding, combined with semantic congestion control logic, avoids pushing bandwidth usage to its limits, further ensuring zero loss and priority delivery of core alarm data in weak network environments. Finally, parallel rendering technology based on GPU textures completely eliminates DOM reflow stuttering caused by high-frequency state changes, achieving millisecond-level flicker-free refresh rates in scenarios with tens of thousands of primitives.
[0073] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for managing laboratory site reservations, characterized in that, include: The cloud storage describes the static spatial skeleton data of the laboratory layout, which includes several geographic feature objects with unique identifiers and geometric coordinate information. The cloud constructs a spatial index based on the geometric coordinate information. The edge loads the static spatial skeleton data based on the spatial index and renders it as a vector layer, and establishes a mapping index between the unique identifier and the rendered vector meta-object in memory. A dynamic business status container that separates cloud maintenance from static spatial skeleton data logic stores a key-value correspondence between a unique identifier and the laboratory site reservation business status, and captures change events of the reservation business status through an event listening mechanism. In response to a change event, the cloud extracts the latest appointment status based on the unique identifier that has changed, generates an incremental status data packet that does not contain geometric coordinate information, and pushes it to the edge in real time. The edge device receives incremental status data packets, uses the mapping index to directly locate the corresponding vector primitive object, maps the latest appointment status to a visual style, performs local style redrawing on the vector primitive object, and updates the view.
2. The laboratory site reservation management method according to claim 1, characterized in that, The structure definition of the static spatial skeleton data and the process of establishing the mapping index specifically include: the static spatial skeleton data is serialized and stored using the GeoJSON standard format, where geographic feature objects correspond to geographic feature nodes; geographic feature nodes contain geometric coordinate fields and attribute information fields; in the preprocessing stage, the cloud performs attribute stripping and identifier establishment operations: iterates through the original design drawing data, retains the vector coordinate data of walls, doors, windows, and experimental platforms to the geometric coordinate field, removes non-spatial attributes from the original data, and establishes a corresponding unique identifier for each geographic feature object; when establishing the mapping index at the edge, it iterates through the loaded GeoJSON data object, parses the unique identifier, and constructs a hash mapping table using the unique identifier as the key and the object reference of the graphic element instance as the value; the graphic element instance contains the path data of the graphic, the current fill style, and the hierarchical relationship.
3. The laboratory site reservation management method according to claim 2, characterized in that, Establishing a unique identifier for each geographic feature object specifically includes: discretizing the two-dimensional plane coordinate space of the laboratory into a grid with a preset resolution; constructing a single continuous path traversing the grid using the Hilbert curve algorithm; calculating the sequential index value of the geometric center point of each geographic feature object on the path and using it as the unique identifier of the geographic feature object; allocating a continuous virtual address state data buffer in memory at the edge end, and writing the business state data of each vector primitive object sequentially into the state data buffer according to the numerical order of the unique identifier, so that the state data of several vector primitive objects that are adjacent in logical space occupy continuous storage units in the memory buffer.
4. The laboratory site reservation management method according to claim 1, characterized in that, Constructing a spatial index includes: the cloud establishing a quadtree spatial index for the static spatial skeleton data, recursively dividing the two-dimensional plane where the laboratory is located into four quadrants until the number of geographic feature objects contained in each quadrant is less than a preset node splitting threshold, and storing the unique identifier of the geographic feature object in the corresponding leaf node; the edge end monitoring the user's map interaction operations in real time, calculating the bounding box coordinates of the current viewport, and sending them to the cloud; the cloud using the bounding box coordinates and the quadtree spatial index to perform a spatial intersection query, identifying all leaf nodes intersecting with the current viewport, and extracting the static spatial skeleton data corresponding to the geographic feature objects contained in the leaf nodes, sending them as visible area data pieces to the edge end; after receiving the visible area data pieces, the edge end incrementally renders the vector data in the visible area data pieces and performs a video memory release operation on the vector primitive objects that have moved out of the viewport area.
5. The laboratory site reservation management method according to claim 4, characterized in that, Generating incremental state data packets without geometric coordinate information specifically includes: The cloud predefines a state-bit mapping protocol to map N types of reservation service states for the laboratory site into binary bit strings of length M, wherein the total number of encoding combinations that the length M of the binary bit string can represent is not less than the number of types N of the reservation service states; the cloud uses the quadtree spatial index to identify all geographic feature objects within the current viewport and sorts these geographic feature objects according to the numerical value of their unique identifiers; the cloud, based on the sorted order, sequentially converts the latest reservation service state of each geographic feature object into its corresponding binary bit string and concatenates them to form a state bitmap stream; the incremental state data packet consists of a header and a body: the header contains viewport area information; the body is the binary data of the state bitmap stream.
6. The laboratory site reservation management method according to claim 5, characterized in that, The edge-end uses the mapping index to perform local style redrawing, including: the edge-end maintains a global one-dimensional state texture covering the entire laboratory in video memory, the pixel arrangement order of the global one-dimensional state texture strictly corresponding to the numerical order of the unique identifier; after receiving the state bitmap stream, the edge-end parses the state data in the data packet and updates it to the corresponding offset position of the global one-dimensional state texture; the edge-end runs the fragment shader, and when rendering the pixels of each vector primitive object, executes the following logic: obtains the unique identifier corresponding to the current vector primitive object; calculates the global linear offset of the unique identifier in the global geographic feature object set and normalizes it to texture coordinates; reads the binary bit value of the global one-dimensional state texture at the texture coordinates through the texture sampling function, and converts the binary bit value into RGBA color value using a lookup table method, and outputs it to the frame buffer.
7. A laboratory site reservation management system, characterized in that, include: Index rendering module: The cloud stores static spatial skeleton data describing the layout of the laboratory, which includes several geographic feature objects with unique identifiers and geometric coordinate information. The cloud constructs a spatial index based on the geometric coordinate information. The edge loads the static spatial skeleton data based on the spatial index and renders it as a vector layer, and establishes a mapping index between the unique identifier and the rendered vector meta-object in memory. Listening Management Module: A dynamic business status container that separates cloud-based maintenance from static spatial skeleton data logic. It stores the key-value correspondence between unique identifiers and laboratory site reservation business status, and captures change events of reservation business status through an event listening mechanism. Data push module: In response to change events, the cloud extracts the latest appointment business status based on the unique identifier that has changed, generates an incremental status data package that does not contain geometric coordinate information, and pushes it to the edge in real time; Style redrawing module: The edge receives incremental status data packets, uses the mapping index to directly locate the corresponding vector primitive object, maps the latest appointment business status to the visual style, performs local style redrawing on the vector primitive object, and updates the view.