A Vertical Stacking Topology Reconstruction Method Based on Adjacency Data and Graph Traversal

By constructing a graph structure and using a graph traversal algorithm to allocate vertical level indices, the problem of accurately identifying vertical adjacency relationships in irregular or dynamic stacking scenarios in existing technologies is solved, and robust stacking topology reconstruction in diverse environments is achieved.

CN122087152APending Publication Date: 2026-05-26STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
Filing Date
2025-12-18
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify vertical adjacency relationships in irregular or dynamic stacking scenarios, and their application is particularly limited in open yards, temporary storage areas, and mobile logistics platforms. Furthermore, they are highly dependent on the stability of external infrastructure and the environment.

Method used

By acquiring adjacency data to construct a graph structure, and using bottom-up graph traversal to assign a vertical level index to each container, a stacking mapping is generated. Adjacency data is processed in an event-driven manner to reconstruct the stacking topology.

Benefits of technology

It enables accurate identification of vertical adjacency relationships without relying on fixed infrastructure, adapts to dynamic and irregular stacking scenarios, reduces deployment costs and complexity, and supports robust performance in diverse operating environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122087152A_ABST
    Figure CN122087152A_ABST
Patent Text Reader

Abstract

A vertical stacking topology reconstruction method based on adjacency data and graph traversal, belonging to the field of measurement, is presented. The method includes acquiring adjacency data representing confirmed vertical relationships between containers; constructing a graph structure where each container is represented as a node, and each confirmed adjacency relationship is represented as a directed edge from a lower container to an upper container; identifying the bottom container, defined as a node with no incoming edges; assigning a vertical hierarchy index to each container through bottom-up graph traversal; and generating a stacking map representing the vertical arrangement of containers. By reconstructing the stacking topology using locally acquired adjacency data and graph modeling, discrete adjacency events are transformed into a directed graph, and vertical hierarchy is assigned through structured traversal. This eliminates the need for centralized coordination or predefined stacking patterns, enabling infrastructure-independent deployment. It can reconstruct the stacking topology using locally acquired adjacency data, exhibits determinism, supports decentralized deployment, and adapts to dynamic container arrangements, without relying on fragile or expensive sensing systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of measurement, and in particular relates to a method for vertical stacking topology reconstruction based on adjacency data and graph traversal. Background Technology

[0002] Logistics refers to the flow of elements such as goods, information, and capital, including specific operational links such as transportation, warehousing, packaging, and distribution.

[0003] Logistics management is the planning, coordination, and control of logistics activities, and the optimization of processes through technical and management means.

[0004] In the process of logistics management, there is a type of logistics known as containerized logistics.

[0005] Logistics containers are standardized containers used for holding, handling, and storing materials, and are widely used in production, logistics, and commerce. Their main types include:

[0006] Turnover boxes: Made of PP or HDPE plastic, resistant to acids and alkalis, UV resistant, stackable, and suitable for material handling in industries such as machinery and electronics.

[0007] Storage cages: steel structure, strong load-bearing capacity, stackable, commonly used in industrial fields such as automobile manufacturing and home appliance production.

[0008] Logistics trolleys: used for transporting goods between processes or during sorting operations within a workshop, and can be used in conjunction with pallets or conveyors.

[0009] Containers: Standardized large cargo containers suitable for sea, land and air transport, including general cargo, bulk cargo, refrigerated cargo, etc.

[0010] Logistics container design emphasizes space utilization and adaptability, with some adopting foldable structures (such as foldable baskets that can reduce volume to 1 / 4), and their dimensions are usually designed to match pallet standardization.

[0011] A containerized logistics environment is a digital system that enables efficient collaboration across the entire logistics process through standardized container technology.

[0012] In a containerized logistics environment, accurately reconstructing the vertical stacking structure is crucial for inventory tracking, automated picking, and space optimization.

[0013] Existing systems typically rely on centralized scanning infrastructure, such as RFID triangulation, barcode recognition, or visual recognition. These methods often require environmental calibration, external anchors, and continuous polling, resulting in high deployment costs and poor scalability.

[0014] Furthermore, such systems are susceptible to dust, obstructions, and severe weather, making it difficult to accurately identify vertical adjacency relationships, especially in irregular or dynamic stacking scenarios. Their dependence on external infrastructure and environmental stability limits their application in open yards, temporary storage areas, and mobile logistics platforms.

[0015] The invention patent CN 120806822 B, with an authorization announcement date of November 18, 2025, discloses a "stone panel intelligent warehouse management method based on machine vision," including the following steps: multimodal sensing to collect temperature and distance data of stone images; grayscale quantization and time difference to generate feature sets; synchronous calibration followed by Kalman filtering fusion and dynamic weight adjustment; outputting positioning results and analyzing reflection coefficients to adjust the light source; optimizing light field parameters; collecting texture to reconstruct a 3D model and updating with error correction; extracting location information based on the model to correct inventory strategies and generate an inventory management scheme. In this technical solution, multi-source sensor collaborative acquisition and fusion maintain positioning consistency and avoid error propagation; light monitoring and reflection adjustment optimize the light field to ensure the integrity and stability of stone textures; dynamic reconstruction and correction of the 3D model update features synchronously store the status, improving the accuracy of stacking levels and location identification, and enhancing the reliability and consistency of inventory information. However, its information acquisition based on an optical vision system is susceptible to dust, obstruction, and inclement weather, making it difficult to accurately identify vertical adjacency relationships, especially performing poorly in irregular or dynamic stacking scenarios.

[0016] The invention patent with authorization announcement date of August 5, 2025, and authorization announcement number CN 118654643 B, discloses "a port stacking measurement system and method based on surveillance video," including a port area target identification module, a port stacking target 3D reconstruction module, and a stacking 3D visualization demonstration system module. The port area target identification module is used to identify the specific location and range of the stacking from the video stream; the port stacking target 3D reconstruction module is used to accurately model the identified stacking in 3D; and the stacking 3D visualization demonstration system module is used to convert the result of the stacking 3D reconstruction into a visualization form. The port area target identification module and the port stacking target 3D reconstruction module are connected, enabling the port area target identification module to transmit data and signals to the port stacking target 3D reconstruction module; the stacking target 3D reconstruction module and the stacking 3D visualization demonstration system module are also connected, enabling the stacking target 3D reconstruction module to transmit data and signals to the stacking 3D visualization demonstration system module.

[0017] The invention patent CN 113034490 B, with an authorization announcement date of October 10, 2023, discloses a "method for monitoring the safe distance of stacking in a chemical warehouse." The method includes: acquiring two sets of background image information and two sets of target image information using two sets of binocular cameras installed at two preset locations; determining two 3D reconstruction models of warning lines based on the two sets of background image information; simultaneously determining two 3D reconstruction models of the stack to be measured based on the two sets of background image information and the two sets of target image information; stitching the two 3D reconstruction models of the stack to be measured to obtain a 3D reconstruction model of the target stack; and stitching the two 3D reconstruction models of the warning lines to obtain a 3D reconstruction model of the target warning line. Finally, determining whether the stack to be measured exceeds the boundary based on the 3D reconstruction models of the target stack and the target warning line. This application can automatically determine whether the stack to be measured exceeds the boundary in all directions, reducing monitoring costs and improving monitoring efficiency and accuracy.

[0018] The invention patent application CN 121120577 A, published on December 12, 2025, discloses "a method, apparatus, device, and medium for steel coil inventory based on 3D reconstruction," comprising: acquiring images of a steel coil stack from different perspectives to obtain target image data, and generating 3D reconstruction data corresponding to the steel coil stack based on the target image data; obtaining target multimodal data corresponding to the steel coil stack based on the 3D reconstruction data; and processing the top-view depth map in the target multimodal data using a stack inventory network model to inventory the steel coils in the stack. The stack inventory network model can inventory the steel coils according to the stacking rules. By using the stack inventory network model and steel coil stacking rules to process the top-view depth map in the target multimodal data, the problem of being unable to inventory lower-layer steel coils due to mutual occlusion in the steel coil stack is avoided, thus improving the reliability of steel coil inventory.

[0019] Clearly, the aforementioned technical solutions all rely on optical vision systems to collect relevant information. Such systems are susceptible to dust, obstructions, and inclement weather, making it difficult to accurately identify vertical adjacency relationships, especially in irregular or dynamic stacking scenarios. Their dependence on external infrastructure and environmental stability limits their application in open yards, temporary storage areas, and mobile logistics platforms.

[0020] Therefore, how to accurately identify vertical adjacency relationships, especially in irregular or dynamic stacking scenarios, while avoiding the influence of dust, obstruction, and severe weather, has become an urgent technical challenge. Summary of the Invention

[0021] The purpose of this invention is to provide a vertical stacking topology reconstruction method based on adjacency data and graph traversal. This method can reconstruct the stacking topology using locally acquired adjacency data, exhibits determinism, supports decentralized deployment, and can adapt to dynamic container arrangements, without relying on fragile or expensive sensing systems.

[0022] The technical solution of this invention provides a method for vertical stacking topology reconstruction based on adjacency data and graph traversal, characterized by:

[0023] 1) Obtain adjacency data that confirms the vertical relationship between containers;

[0024] 2) Construct a graph structure, where each container is represented as a node, and each confirmed adjacency is represented as a directed edge from the lower container to the upper container;

[0025] 3) Identify the bottom container and define it as a node with no incoming edges;

[0026] 4) Assign a vertical level index to each container by traversing the graph from bottom to top;

[0027] 5) Generate a stacking map representing the vertical arrangement of containers.

[0028] Specifically, the adjacency data is acquired in an event-driven manner, triggered by physical stacking or relocation events.

[0029] Specifically, the confirmation of bidirectional adjacency leads to the conversion of directed edges into undirected edges to reflect bidirectional vertical perception.

[0030] Furthermore, the traversal algorithm includes depth-first search or breadth-first search for allocating vertical levels.

[0031] Furthermore, the stacking mapping is transmitted to an external inventory management system for integration.

[0032] The vertical stacking topology reconstruction method described in this invention reconstructs the stacking topology through locally collected adjacency data and graph modeling, possessing determinism. It transforms discrete adjacency events into a directed graph and allocates vertical levels through structured traversal. It does not require centralized coordination or predefined stacking patterns, enabling deployment independent of infrastructure.

[0033] The present invention also provides a system for reconstructing vertical stacking topology, characterized by comprising the following modules:

[0034] A data acquisition module is used to collect adjacency data that represents the confirmed vertical relationship between containers;

[0035] A graph building module for modeling container relationships as directed edges in a graph;

[0036] A traversal module for assigning vertical hierarchy indices by traversing the graph starting from the bottom node;

[0037] A topology output module for generating and exporting stacking maps that represent the reconstructed stacking topology.

[0038] Specifically, the data acquisition module operates in a point-to-point configuration without the need for centralized coordination; the graph construction module supports dynamic updates during container repositioning or stacking reconstruction.

[0039] Specifically, the traversal module is configured to use a recursive or iterative graph traversal algorithm to allocate vertical levels; the topology output module provides real-time visualization of the reconstructed stacking mapping.

[0040] Furthermore, each container is associated with only one container directly above and one container directly below, thus enforcing a one-to-one vertical stacking structure.

[0041] Compared with the prior art, the advantages of the present invention are:

[0042] 1. The technical solution of this invention reconstructs the stacking topology through locally collected adjacency data and graph modeling; it transforms discrete adjacency events into a directed graph and allocates vertical levels through structured traversal; it achieves deployment independent of infrastructure without centralized coordination or predefined stacking patterns; the algorithm runs autonomously and has determinism.

[0043] 2. The technical solution of the present invention represents a significant advancement in the field of containerized logistics automation, supporting scalable integration, real-time response, and robust performance in diverse operating environments.

[0044] 3. The technical solution of this invention reconstructs the stacking topology using locally collected adjacency data. It employs an event-driven approach to process adjacency data, treating each container as a logical node in a distributed adjacency network. The stacking topology is reconstructed in real-time using lightweight graph computation, independent of fixed infrastructure or predefined stacking patterns. It supports seamless expansion without reconfiguration and can be deployed across multiple stacks. It is compatible with future integration into automated vehicles, robotic stackers, and intelligent inventory systems. Attached Figure Description

[0045] Figure 1 is a schematic diagram showing the location and orientation of the infrared module of the present invention installed on the container.

[0046] Figure 2 is a schematic diagram showing the infrared module contact between the upper and lower containers of the present invention, displaying the internal infrared emitting and receiving components.

[0047] Figure 3 This is a schematic diagram of the handshake detection Python code graphical representation of the present invention.

[0048] Figure 4 This is a schematic diagram of the Python code that interprets each confirmed adjacency relationship within the construction as a directed edge Ei→j, indicating that container Cj is located directly above container Ci.

[0049] Figure 5 This is a schematic diagram of the graphical representation of the Python code identified at the bottom node in this invention.

[0050] Figure 6 This is a schematic diagram illustrating the Python code for hierarchical allocation traversal of this invention.

[0051] Figure 7 This is a schematic diagram of the graphical representation generated by the present invention.

[0052] Figure 8 This is a block diagram illustrating the method flow of the present invention. Detailed Implementation

[0053] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0054] like Figure 8 As shown, this invention provides a decentralized algorithmic method for reconstructing vertical stacking topology based on locally acquired adjacency data. The algorithm operates based on discrete adjacency events to confirm direct vertical relationships between modular containers. These events can be generated by any direction-aware sensing mechanism, such as an infrared module, although the algorithm itself remains neutral to the specific sensing method.

[0055] Specifically, the technical solution of this invention provides a method for vertical stacking topology reconstruction based on adjacency data and graph traversal, the inventive point of which is:

[0056] 1) Obtain adjacency data that confirms the vertical relationship between containers;

[0057] 2) Construct a graph structure, where each container is represented as a node, and each confirmed adjacency is represented as a directed edge from the lower container to the upper container;

[0058] 3) Identify the bottom container and define it as a node with no incoming edges;

[0059] 4) Assign a vertical level index to each container by traversing the graph from bottom to top;

[0060] 5) Generate a stacking map representing the vertical arrangement of containers.

[0061] 1. Technical Solution:

[0062] exist Figure 1Each container can be equipped with four infrared modules: two on the top and two on the bottom, symmetrically installed on both sides of the container. The top infrared modules are flush with the top surface of the container, facing upwards, emitting signals upwards at a narrow angle and receiving signals from above; the bottom infrared modules are flush with the bottom surface of the container, facing downwards, emitting signals downwards at a narrow angle and receiving signals from below.

[0063] The symmetrical structure of the infrared module's transmitter and receiver ensures that when the container is in Figure 2 When stacked vertically, the transmitter at the bottom of the upper container is precisely aligned with the receiver at the top of the lower container, and vice versa. This design enables reliable vertical signal exchange and effectively shields against lateral interference.

[0064] The algorithm enforces strict vertical stacking logic. Each container is assumed to be directly connected vertically to only one adjacent cell, and lateral adjacency or bridging structures are excluded by design. This constraint ensures that the generated topology reflects a one-to-one vertical alignment that conforms to physical stacking behavior.

[0065] Confirmed adjacency events are collected and stored as data pairs, representing directional proximity relationships between containers. These raw inputs are then transformed into a directed graph structure for logical topology reconstruction. Each container is modeled as a node, and each confirmed adjacency is interpreted as a directed edge from the container below to the container above it. Directionality is derived from the relative position metadata contained in the adjacency events.

[0066] In the case of bidirectional acknowledgment (i.e., both containers detect each other), edges can be modeled as undirected edges to reflect bidirectional perception. However, when performing vertical hierarchical assignments, directional interpretations are still retained to ensure deterministic traversal.

[0067] To reconstruct the stacking topology, the algorithm analyzes the graph structure to identify the bottom containers, i.e., nodes with no incoming edges. These bottom nodes serve as the starting point for graph traversal. A recursive or iterative algorithm is then applied to propagate upwards along the graph structure, assigning a level index to each container based on its vertical position relative to the bottom.

[0068] 2. Traversal logic:

[0069] 2.1 Handshake Detection:

[0070] The process begins with vertical adjacency detection between containers, using locally collected data.

[0071] This data can be generated by directional sensing mechanisms, such as infrared modules, installed on the top and bottom of the modular container. When two containers are directly stacked, their respective sensing modules can perform a handshake to confirm vertical adjacency. Directional masking or filtering ensures that only direct vertical relationships are detected, preventing containers from bridging across multiple cells. This event-driven interaction generates a data packet containing the container identifier and adjacency metadata.

[0072] Each confirmed adjacency event represents a container located below another container. These events are collected in ordered pairs, each pair containing the identifiers of the container below and the container above it. This set of adjacency confirmations serves as the initial input for constructing a directed graph used for stacking topology reconstruction.

[0073] Mathematically represented as:

[0074] H = {(Ci, Cj) | Ci lies below Cj}

[0075] The container identifiers, such as Ci and Cj, can correspond to system-assigned labels, such as "D1" or "D7", for example:

[0076] Python code:

[0077] # Simulated infrared handshake events (ungrouped, random order)

[0078] # Each tuple represents a confirmed vertical adjacency:

[0079] # ("bottom container", "top container")

[0080] handshake_events = [

[0081] ("D1", "D7"),

[0082] ("D12", "D5"),

[0083] ("D7", "D9"),

[0084] ("D5", "D1"),

[0085] ("D8", "D2"),

[0086] ("D6", "D13"),

[0087] ("D4", "D8"),

[0088] ("D13", "D4"),

[0089] ("D10", "D3")

[0090] # D11 did not participate in any adjacency events and may be an independent container.

[0091] Figure 3 The image below is a graphical representation of the Python code above.

[0092] 2.2 Graph Construction:

[0093] After the handshake data is collected, the system converts it into a directed graph structure to reconstruct the stacking topology.

[0094] Each container is modeled as a node Ci, and each confirmed adjacency is interpreted as a directed edge Ei→j, indicating that container Cj is directly above container Ci.

[0095] The form of a graph is defined as follows:

[0096] G = (V, E), where:

[0097] - V represents the set of container identifiers that participated in the handshake event;

[0098] - E ⊆ H, where HH is the set of all confirmed adjacency relationships.

[0099] Variable explanation:

[0100] - H={(Ci,Cj)|Ci is below Cj}: Raw handshake data, representing vertical adjacency relationships;

[0101] - V = {Ci | Ci appears in any pair in H}: All unique container identifiers;

[0102] - E ⊆ H: Used to construct a subset of adjacency relations in the graph.

[0103] If two-way confirmation occurs, the edges can be modeled as undirected edges to reflect two-way perception.

[0104] However, due to the directional shielding of the infrared module and the physical constraint that the container cannot span multiple units, all adjacency relationships are strictly vertical one-to-one.

[0105] To assign vertical levels, directionality is still preserved to ensure deterministic traversal.

[0106] Graph structures can be built programmatically, for example, using Python's "defaultdict" (from the "collections" module) to store adjacency relationships, where each lower container maps to its upper neighbor:

[0107] Python code:

[0108] from collections import defaultdict;

[0109] # Construct an adjacency graph based on the handshake data;

[0110] adjacency_graph = defaultdict(list);

[0111] # Filled graph structure: Each lower container points to the container above it;

[0112] for lower, upper in handshake_events;

[0113] adjacency_graph[lower].append(upper);

[0114] # Example results;

[0115] # { ,

[0116] # "D1": ["D7"],

[0117] # "D12": ["D5"],

[0118] # "D7": ["D9"],

[0119] # "D5": ["D1"],

[0120] # "D8": ["D2"],

[0121] # "D6": ["D13"],

[0122] # "D4": ["D8"],

[0123] # "D13": ["D4"],

[0124] # "D10": ["D3"],

[0125] #} .

[0126] Figure 4 The image below is a graphical representation of the Python code above.

[0127] 2.3 Bottom Node Recognition:

[0128] To identify bottom containers (i.e. containers without lower neighbors), the system analyzes the graph structure to detect nodes without incoming edges.

[0129] These containers do not appear as targets in any adjacency relationships, meaning that no other containers point to them.

[0130] They serve as the starting nodes for each stack, and are used for subsequent vertical hierarchy allocation and traversal.

[0131] The mathematical definition is as follows:

[0132] Base={Ci∣∀j, Ej→i ∉E}

[0133] Variable explanation:

[0134] - Ci: Container node in the diagram;

[0135] - Ej→i: A directed edge from container Cj to container Ci, indicating that Ci is above Cj;

[0136] - E: The set of all directed edges in the graph;

[0137] - This expression means that if container Ci is not the target node of any edge, then it is the bottom container.

[0138] The code implementation logic is as follows:

[0139] - Collect all container identifiers involved in the graph structure;

[0140] - Identify containers that appear as targets within any edge;

[0141] - Filter out containers that are not the target, i.e., the bottom container.

[0142] Python code:

[0143] # Identify all involved containers;

[0144] all_containers = set(adjacency_graph.keys()) | { ;

[0145] target for targets in adjacency_graph.values() for target intargets;

[0146] } ;

[0147] # Identify containers with incoming edges (i.e., containers that are pointed to by other containers);

[0148] containers_with_incoming = {target for targets in adjacency_graph.values() for target in targets};

[0149] # Bottom containers are those without an inner edge;

[0150] base_containers = list(all_containers - containers_with_incoming);

[0151] # Example output:

[0152] # base_containers = ["D12","D6","D10","D11"];

[0153] Figure 5 The image below is a graphical representation of the Python code above.

[0154] 2.4 Hierarchical traversal:

[0155] After identifying the bottom container, the system applies a graph traversal algorithm to assign a vertical level to each container. Each bottom container serves as the starting point for the traversal, and the algorithm propagates upwards along the graph structure, incrementing the level index at each step to reconstruct the vertical structure of each stack.

[0156] The vertical hierarchy of container Cj is recursively defined as follows:

[0157] Level(Cj) = Level(Ci) + 1, for each Ei→j ∈ E;

[0158] Variable explanation:

[0159] Ci: The container node located below;

[0160] Cj: The container located directly above Ci;

[0161] Ei→j: A directed edge from Ci to Cj, representing a vertical adjacency relationship;

[0162] Level(Ci): The level that has been assigned to the container below;

[0163] Level(Cj): The level of the container above, defined as one level higher than Ci.

[0164] This recursive definition ensures that the hierarchy of each container is uniquely and deterministically derived based on its position in the graph. The traversal process is performed independently for each bottom container, thus supporting parallel structure identification of multiple stacks:

[0165] Python code:

[0166] # Initialization: Container hierarchy mapping grouped by stack;

[0167] stack_maps = {};

[0168] # Traversal function: Stores the container level of each stack into the corresponding stack group;

[0169] def assign_levels(container, level, stack_id);

[0170] if stack_id not in stack_maps;

[0171] stack_maps[stack_id] = {};

[0172] stack_maps[stack_id][container] = level;

[0173] for upper in adjacency_graph.get(container, []);

[0174] if upper not in stack_maps[stack_id];

[0175] assign_levels(upper, level + 1, stack_id);

[0176] # Iterate through each bottom container, marking the stack it belongs to;

[0177] for base in base_containers;

[0178] assign_levels(base, 1, base);

[0179] # Example results (stack_maps):

[0180] # { ;

[0181] # "D12": {"D12": 1, "D5": 2, "D1": 3, "D7": 4, "D9": 5};

[0182] # "D6": {"D6": 1, "D13": 2, "D4": 3, "D8": 4, "D2": 5};

[0183] # "D10": {"D10": 1, "D3": 2};

[0184] # "D11": {"D11": 1};

[0185] #} .

[0186] Figure 6 The image below is a graphical representation of the Python code above.

[0187] 2.5 Output Generation:

[0188] Finally, the system outputs a stacking map that associates each container with its vertical hierarchy.

[0189] Each stack is displayed separately and sorted by hierarchy from highest to lowest.

[0190] This mapping can be used for visualization, export, or integration into external inventory management systems to achieve real-time tracking and space optimization.

[0191] Python code:

[0192] # Output stacking map (grouped by stack, top container first);

[0193] print("[Stacking Mapping] Containers and levels for each stack:\n");

[0194] for stack_id, levels in stack_maps.items();

[0195] print(f"Stack start container: {stack_id}");

[0196] for container, level in sorted(levels.items();

[0197] key=lambda x: x[1], reverse=True);

[0198] print(f"{container} : the {level}th layer");

[0199] print() # Separate stacks with blank lines.

[0200] Example output:

[0201] Stacking starting container: D12;

[0202] D9: 5th floor;

[0203] D7: 4th floor;

[0204] D1: Level 3;

[0205] D5: Level 2;

[0206] D12: Level 1.

[0207] Stacking starting container: D6;

[0208] D2: Floor 5;

[0209] D8: 4th floor;

[0210] D4: The 3rd floor;

[0211] D13: Level 2;

[0212] D6: Level 1.

[0213] Stacking starting container: D10;

[0214] D3: Level 2;

[0215] D10: Level 1;

[0216] Stacking starting container: D11;

[0217] D11: Level 1.

[0218] Figure 7 The image below is a graphical representation of the Python code above.

[0219] This traversal logic ensures that the stacking topology can be reconstructed deterministically and accurately based solely on local handshake data and graph reasoning.

[0220] 3. Key technological innovations of this invention:

[0221] 3.1 Graph structure transformation of adjacency data:

[0222] Discrete adjacency events are collected in the form of data pairs to confirm that one container is located under another container.

[0223] These inputs are transformed into a directed graph structure, where each node represents a container and each edge encodes a confirmed vertical relationship. The graph structure reflects strict one-to-one vertical alignment, conforming to the algorithm's logical constraints and the physical assumption of stackable units.

[0224] 3.2 Hierarchical allocation based on traversal:

[0225] A deterministic traversal algorithm is used to assign a vertical level index to each container.

[0226] Starting from the bottom node (with no incoming edges), the algorithm traverses the graph structure from bottom to top, incrementing the level index at each step.

[0227] This method ensures the reproducibility of topology mapping and supports seamless integration with logistics automation systems, including real-time inventory tracking and space optimization.

[0228] 3.3 Decentralized adjacency handling:

[0229] The algorithm is designed to process adjacency data acquired in an event-driven manner.

[0230] Containers or awareness agents initiate adjacency confirmation only when a physical stacking event occurs, thereby reducing computational and power consumption burdens. The algorithm does not require continuous polling or centralized coordination, supporting scalable deployment in dynamic, irregular, or infrastructure-constrained environments.

[0231] These innovations together constitute a robust, infrastructure-independent real-time stacking reconstruction solution, suitable for application scenarios with high requirements for accuracy, modularity, and algorithm efficiency.

[0232] The beneficial effects of the technical solution of this invention:

[0233] 4.1 Eliminate dependence on centralized infrastructure:

[0234] This algorithm reconstructs stack topology using locally collected adjacency data, eliminating the need for fixed scanning stations, external readers, or centralized coordination. It can be deployed in various environments and is not limited by infrastructure.

[0235] 4.2 Event-driven energy efficiency optimization:

[0236] The algorithm uses an event-driven approach to process adjacent data, responding only when stacking or relocation events occur, reducing computational burden and supporting long-term use in power-constrained or intermittently operating systems.

[0237] 4.3 Real-time topology reconstruction with low system complexity:

[0238] Stacking topology is reconstructed in real time using lightweight graph computation, eliminating the need for complex hardware such as cameras, RFID arrays, or mechanical indexing systems. The algorithm logic is compatible with simple, low-cost data acquisition methods, reducing implementation complexity and supporting scalable deployment.

[0239] 4.4 Adaptation to dynamic and outdoor environments:

[0240] The algorithm does not rely on fixed infrastructure or predefined stacking patterns and is capable of adapting to irregular, dynamic, or outdoor environments. It can be applied to open yards, temporary storage areas, or mobile logistics platforms, improving operational flexibility and deployment agility.

[0241] 4.5 Scalability and Modularity in Logistics Automation:

[0242] The algorithm treats each container as a logical node in a distributed adjacency network.

[0243] This modular architecture supports seamless expansion without reconfiguration and can be deployed across multiple stackers. It is compatible with future integration into automated vehicles, robotic stackers, and smart inventory systems.

[0244] 5. Comparison of the technical solution of the present invention with the prior art:

[0245] 5.1 Limitations of traditional stacking detection systems:

[0246] Traditional container stacking inspection systems typically rely on centralized scanning infrastructure, visual recognition technology, or fixed environmental anchors. These methods are costly to deploy, vulnerable in dynamic or outdoor environments, and have limited scalability. Their dependence on external infrastructure increases operational complexity and limits adaptability in irregular or mobile logistics scenarios.

[0247] 5.2 Significant advantages of the present invention:

[0248] In contrast, this invention reconstructs the stacking topology using locally collected adjacency data and graph modeling. The algorithm operates autonomously and is deterministic, transforming discrete adjacency events into a directed graph and allocating vertical levels through structured traversal; it requires no centralized coordination or predefined stacking patterns, enabling deployment independent of infrastructure.

[0249] This technical solution represents a significant advancement in the field of containerized logistics automation, supporting scalable integration, real-time response, and robust performance in diverse operating environments.

[0250] 6. Example 1:

[0251] 6.1 Adjacency Data Acquisition:

[0252] In one implementation, adjacency data is acquired via a directional sensing mechanism mounted on the top and bottom surfaces of the modular container.

[0253] This mechanism is configured to detect only direct vertical adjacency, excluding lateral interference. When two containers are stacked, their respective modules can exchange signals to confirm the adjacency relationship, generating a data packet containing container identifiers and relative position metadata.

[0254] This data serves as input to the algorithm and is not limited by any specific sensing method.

[0255] 6.2 Graph Construction and Topological Traversal:

[0256] In another implementation, the algorithm constructs a directed graph based on the collected adjacency data.

[0257] Each node in the graph represents a container, and each directed edge corresponds to a confirmed vertical relationship from the lower container to the upper container.

[0258] The bottom container is identified as a node with no incoming edges. A deterministic reconstruction of the stacking topology is achieved by progressively assigning vertical level indices from bottom to top using a recursive or iterative traversal algorithm.

[0259] 6.3 Multi-stacking support and real-time integration:

[0260] In another implementation, the algorithm supports managing multiple independent stacks within the same operating environment.

[0261] The graph structure can be dynamically updated based on events such as container movement, repositioning, or restacking.

[0262] The generated stacking maps can be visualized in real time and exported to external systems for inventory tracking, space optimization, or integration with automated logistics platforms. This implementation enhances scalability and responsiveness in dynamic or infrastructure-constrained deployment scenarios.

[0263] In summary, the technical solution of this invention reconstructs the stacking topology using locally collected adjacency data. It employs an event-driven approach to process adjacency data, treating each container as a logical node in a distributed adjacency network. The stacking topology is reconstructed in real-time using lightweight graph computation, independent of fixed infrastructure or predefined stacking patterns. It supports seamless expansion without reconfiguration and can be deployed across multiple stacks. It is also compatible with future integration into automated vehicles, robotic stackers, and intelligent inventory systems.

[0264] This invention can be widely used in the field of containerized logistics automation management.

Claims

1. A vertical stacking topology reconstruction method based on adjacency data and graph traversal, characterized by: 1) Obtain adjacency data that confirms the vertical relationship between containers; 2) Construct a graph structure, where each container is represented as a node, and each confirmed adjacency is represented as a directed edge from the lower container to the upper container; 3) Identify the bottom container and define it as a node with no incoming edges; 4) Assign a vertical level index to each container by traversing the graph from bottom to top; 5) Generate a stacking map representing the vertical arrangement of containers.

2. The vertical stacking topology reconstruction method based on adjacency data and graph traversal as described in claim 1, characterized in that: The adjacency data is acquired in an event-driven manner, triggered by physical stacking or relocation events.

3. The vertical stacking topology reconstruction method based on adjacency data and graph traversal as described in claim 1, characterized in that: The confirmation of bidirectional adjacency leads to the conversion of directed edges into undirected edges to reflect bidirectional vertical perception.

4. The vertical stacking topology reconstruction method based on adjacency data and graph traversal as described in claim 1, characterized in that: The traversal algorithm includes depth-first search or breadth-first search, used to allocate vertical levels.

5. The vertical stacking topology reconstruction method based on adjacency data and graph traversal as described in claim 1, characterized in that: The stacking mapping is transmitted to an external inventory management system for integration.

6. The vertical stacking topology reconstruction method based on adjacency data and graph traversal as described in claim 1, characterized in that: The described vertical stacking topology reconstruction method reconstructs the stacking topology through locally collected adjacency data and graph modeling, which is deterministic. It transforms discrete adjacency events into a directed graph and allocates vertical levels through structured traversal. It does not require centralized coordination or predefined stacking patterns, and can achieve deployment independent of infrastructure.

7. A system for reconstructing a vertical stacking topology, characterized by comprising the following modules: A data acquisition module is used to collect adjacency data that represents the confirmed vertical relationship between containers; A graph building module for modeling container relationships as directed edges in a graph; A traversal module for assigning vertical hierarchy indices by traversing the graph starting from the bottom node; A topology output module for generating and exporting stacking maps that represent the reconstructed stacking topology.

8. The vertical stacking topology reconstruction method based on adjacency data and graph traversal as described in claim 7, characterized in that: The data acquisition module described above operates in a point-to-point configuration, requiring no centralized coordination. The graph building module supports dynamic updates during container repositioning or stacking reconfiguration.

9. The vertical stacking topology reconstruction method based on adjacency data and graph traversal as described in claim 7, characterized in that: The traversal module is configured to use a recursive or iterative graph traversal algorithm to allocate vertical levels; The topology output module provides real-time visualization of reconstructed stacking mappings.

10. The vertical stacking topology reconstruction method based on adjacency data and graph traversal as described in claim 7, characterized in that: Each container is associated with only one container directly above and one container directly below, thus enforcing a one-to-one vertical stacking structure.