A container yard single matching box identification method in a digital twin scene

By using directional dual-ray detection and height threshold screening in a digital twin container yard system, the problems of high resource consumption and low recognition accuracy in existing technologies are solved, achieving efficient and accurate single-box identification in container yards, adapting to containers of different scenarios and specifications.

CN122366484APending Publication Date: 2026-07-10BEIJING JINAO HERUN TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING JINAO HERUN TECHNOLOGY CO LTD
Filing Date
2026-04-13
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies for single-container identification in digital twin container yard systems suffer from high resource consumption, low identification accuracy, and poor adaptability. In particular, performance degrades when there are many containers, failing to meet the needs of real-time monitoring and operation scheduling.

Method used

A method combining directional dual-ray detection with height thresholds and dedicated labels is adopted. By adding Collider and Transform components to the container model, setting height and distance thresholds, and using the Raycast function of the Unity engine for directional ray detection, non-container objects are excluded, achieving accurate identification.

Benefits of technology

It achieves low-resource consumption, high efficiency and accurate single-box identification, adapts to different yards and container specifications, meets the needs of real-time monitoring and operation scheduling, and reduces system latency and misjudgment rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122366484A_ABST
    Figure CN122366484A_ABST
Patent Text Reader

Abstract

This invention relates to a method for identifying single containers in a container yard within a digital twin scenario, belonging to the field of intelligent container yard identification technology. The method includes: adding collision body components and coordinate components to all container models; obtaining the height parameters of the target container in the digital twin system and comparing the height parameters with a preset height threshold; emitting a first ray forward from a preset emission position of the target container, performing collision body detection on the first ray, and determining that other containers exist in front of the target container if a collision body is detected and its label is a preset container-specific label. This invention is based on a single container identification method using directional dual-ray detection, label filtering, and parameter threshold determination based on the Unity engine, and is customized and optimized for the identification needs of single containers in container yards, solving the pain points of existing technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent identification technology for container yards, and in particular to a method for identifying single containers in a container yard in a digital twin scenario. Background Technology

[0002] As one of the core modes of modern logistics, container shipping directly impacts the overall speed of port logistics due to the operational and management efficiency of container yards. With the advancement of digital transformation, digital twin technology is widely used in the management of container yards. By constructing a 1:1 digital 3D model of the physical yard, real-time monitoring of the yard status, simulation of operational processes, and intelligent assistance for operational decision-making can be achieved.

[0003] In a digital twin container yard system, the identification of individual containers is a fundamental and crucial technical aspect. The location and quantity of individual containers directly determine the yard's storage planning, the operation scheduling of gantry cranes / overhead cranes, and the efficiency of container lifting and loading onto ships. Therefore, achieving rapid and accurate identification of individual containers is of great significance for the intelligent operation of digital twin container yards.

[0004] Currently, single-container identification in digital twin container yard systems mainly employs traditional detection methods, including three types: global traversal method, coordinate comparison method, and global collision detection method. Global traversal method: This method iterates through all container models in the digital twin system, comparing the relative position of each container with all other containers to determine if there are adjacent containers. The core problem with this method is its extremely low performance. When the number of containers in the yard reaches thousands or even tens of thousands, the time complexity of the traversal increases exponentially, consuming a large amount of the system's processor and memory resources. This leads to a significant drop in the frame rate of the digital twin system, and may even cause stuttering and latency, making it unable to meet the needs of real-time monitoring and job scheduling. Coordinate comparison method: Each container model is set with a fixed coordinate range. The method determines whether the target container is a single container by judging whether the coordinate range of the target container overlaps with the coordinate range of other containers. This method has poor adaptability. Since the container placement in the container yard is not completely regular, and the container model in the digital twin system moves in real time with the operation process, the coordinate range needs to be constantly reset. The manual maintenance cost is high, and it is easy to make identification errors due to coordinate deviation, making it difficult to guarantee accuracy. Global Collider Detection Method: This method adds collider components to all container models. By detecting whether the target container's colliders come into contact with other colliders, it determines whether adjacent containers exist. This method detects colliders across the entire container area, including not only adjacent containers in front and behind, but also objects to the left, right, up, and down. However, single-container identification in a container yard only needs to focus on the arrangement of containers in front and behind. Excessive detection leads to inefficient resource consumption and can easily misclassify non-container objects such as equipment and supports in the yard as containers, resulting in reduced accuracy.

[0005] Furthermore, some of the improved identification methods in the existing technology only optimize a single technical aspect, such as reducing the number of traversals or optimizing the coordinate comparison algorithm. They do not fundamentally solve the core problems of "excessive detection range, high resource consumption, and misjudgment of non-container objects." Moreover, most methods are designed with fixed parameters and cannot be adjusted according to the actual scenarios of different yards and the specifications of containers, resulting in poor adaptability and versatility. Summary of the Invention

[0006] (a) Technical problems to be solved In view of the above-mentioned shortcomings and deficiencies of the existing technology, the present invention proposes a method for identifying single-piece containers in a container yard in a digital twin scenario. The method is based on directional dual-ray detection, label screening, and parameter threshold determination using the Unity engine. It is customized and optimized for the identification needs of single-piece containers in container yards, and innovates in terms of detection logic, detection range, and target screening to solve the pain points of the existing technology.

[0007] (II) Technical Solution To achieve the above objectives, the main technical solution of the method for identifying single containers in a container yard in a digital twin scenario according to the present invention includes the following steps: Step 1: Add Collider and Transform components to all container models and set container-specific tags; preset height threshold, preset distance threshold, and preset launch position; Step 2: Obtain the height parameter of the target container in the digital twin system, and compare the height parameter with the preset height threshold. If the height parameter is less than or equal to the preset height threshold, the target container is directly determined to be a non-single container; if the height parameter is greater than the preset height threshold, the single container detection process is started, and Step 3 is executed. Step 3: The single-container detection process begins. A first ray is emitted from the preset launch position of the target container and a collision detection is performed on the first ray. If a collision is detected and the label of the collision is a preset container-specific label, it is determined that there are other containers in front of the target container; if no collision is detected or the collision label is not a container-specific label, it is determined that there are no other containers in front of the target container. Step 4: Launch a second ray from the same preset launch position of the target container to the rear. The length of the second ray is the same as the preset distance threshold and the first ray. Detect collision objects on the second ray. If a collision object is detected and the label of the collision object is a preset container-specific label, it is determined that there are other containers behind the target container. If no collision object is detected or the label of the collision object is not a container-specific label, it is determined that there are no other containers behind the target container. Step 5: If there are no other containers in front of or behind the target container, the target container is determined to be a single container; if there are other containers in front of or behind the target container, the target container is determined to be a non-single container.

[0008] In step 2, the height parameter of the target container in the digital twin system is obtained by calling the built-in parameter interface of the Transform component or Collider component of the Unity engine to directly read the height attribute value of the container model; the height parameter is the actual modeling height of the container model in the digital twin system, in meters.

[0009] The preset launch position in steps 3 and 4 is the coordinate point of the center position of the target container model offset upwards. Specifically, it is the world coordinate center of the container model plus the upward three-dimensional vector in the Unity engine, and the offset height is adapted to the actual modeling size of the container model.

[0010] In step 3, the length of the first ray is a preset distance threshold.

[0011] The first and second rays are physical rays created in the Unity engine using the Raycast function. The rays are emitted in the directions directly in front of and behind the target container, respectively, consistent with the container's orientation.

[0012] Collision detection is a physical collision detection method used in the Unity engine. The detection range is from the starting point of the ray to the end point of the ray's length. It only identifies collision objects on the ray's propagation path; objects that do not enter the ray's range are not included in the detection.

[0013] The container-specific label is a unified identification label set for all container models in the digital twin system. Non-container object models are not configured with this label, and the label name can be customized according to system development requirements.

[0014] The preset height threshold is adaptively adjusted according to the actual operating scenario of the container yard and the specifications of the containers, with an adjustment range of 0.5 meters to 2 meters; The preset distance threshold is adaptively adjusted according to the container placement spacing and operational requirements of the container yard, with an adjustment range of 1 meter to 5 meters.

[0015] The preset launch position is adjusted according to the coordinate system and modeling method of the container model, and the offset direction and offset distance are adapted to different container 3D models.

[0016] (III) Beneficial Effects The beneficial effects of this invention are: 1. The present invention provides a method for identifying single containers in a container yard in a digital twin scenario. This method abandons global traversal and full-domain detection, and only performs two directional ray detections at a specified distance before and after the container. The detection range is accurate and controllable, and the time complexity and computational load are significantly reduced, thus meeting the requirements of real-time monitoring and operation scheduling in a digital twin container yard. 2. This invention assigns a unique tag to each container, allowing for collision detection only of objects carrying that tag. This eliminates misjudgments caused by non-container objects such as the ground, supports, and operating equipment. Combined with height threshold filtering to remove incomplete or abnormal models, the accuracy of single-container identification is stable and reliable, significantly improving the authenticity and usability of the identification results. The entire process is implemented using native Unity engine components and physical ray interfaces, without relying on third-party plugins or complex algorithms, resulting in low development costs, good compatibility, and stable operation. The ray emission position, detection direction, and judgment rules are all optimized for actual yard placement scenarios, making them less susceptible to model offsets and scene changes, and ensuring long-term stable operation.

[0017] 3. The height threshold, ray distance threshold, and ray emission position of this invention can be flexibly adjusted according to the yard layout, container specifications, and modeling standards. It can adapt to digital twin container yard systems of different container types, different stacking spacings, and different scales, and has a wide range of applications and strong promotion potential. Attached Figure Description

[0018] Figure 1 This is a flowchart of the method for identifying single containers in a container yard in a digital twin scenario according to the present invention. Detailed Implementation

[0019] To better explain and facilitate understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0020] This invention discloses a method for identifying single-unit containers in a container yard in a digital twin scenario. It is applied to a digital twin container yard system built with the Unity engine and is used to quickly, accurately, and with low resource consumption identify single-unit containers in the yard that have no adjacent containers. The invention will be further described in detail below with reference to the accompanying drawings and specific steps.

[0021] This method runs on a digital twin container yard system built with the Unity engine, which includes 3D objects such as container 3D models, yard ground models, operating equipment models, and support models.

[0022] Before implementing this method, complete the following configurations in advance: Add Collider and Transform components to all container 3D models to ensure proper physical detection and coordinate reading functions. Set a unique container label for all container models; do not add this label to non-container objects (ground, supports, gantry cranes, equipment). Preset detection parameters: Preset height threshold: can be adjusted within the range of 0.5 meters to 2 meters according to the yard operation scenario and container specifications, to adapt to standard containers and non-standard models of different sizes. In this embodiment, 1 meter is preferred.

[0023] Preset distance threshold: can be adjusted within the range of 1 meter to 5 meters according to the container placement spacing and the safe operating distance. In this embodiment, 3 meters is preferred to meet the detection requirements of adjacent container distance in conventional yards.

[0024] Preset launch position: The upward offset distance and direction can be adjusted according to the modeling coordinate system and model structure to ensure that the ray is not blocked by the base or the ground, thus improving the detection stability.

[0025] Preset height threshold: In this embodiment, 1 meter is preferred; Preset distance threshold: In this embodiment, 3 meters is preferred; Preset launch position: The coordinate point after the center of the container model is shifted upwards.

[0026] Step 1: Initial screening to eliminate invalid models Obtain the height parameters of the target container in the digital twin system.

[0027] The height parameter is read directly by calling the built-in parameter interface of the Unity engine's Transform or Collider component, and is the actual modeling height of the container model.

[0028] Compare the read height parameter with the preset height threshold (1 meter): If the height parameter is ≤ 1 meter, the target container is directly determined to be a non-single-piece container, and the detection ends; If the height parameter is greater than 1 meter, it is determined to be a valid container model, and the single-piece container inspection process is initiated.

[0029] This step is used to filter out invalid container models that are incomplete, not fully modeled, or have abnormal dimensions, thereby avoiding invalid detection and improving overall recognition efficiency.

[0030] Step 2: Front X-ray inspection The first ray is fired directly forward from the preset launch position of the target container.

[0031] The preset launch position is the world coordinate center of the target container model, superimposed with the coordinate point after the three-dimensional vector offset upward by the Unity engine. The offset height matches the container modeling size to ensure that the ray avoids interference from the ground and base.

[0032] The length of the first ray is equal to the preset distance threshold (3 meters). The ray is created by the Raycast function of the Unity engine, and the emission direction is consistent with the orientation of the container.

[0033] Physical collision detection is performed on the first ray, with the detection range limited to the ray propagation path: If a collision object is detected, and the collision object carries a container-specific tag, it is determined that there are other containers in front of the target container; If no collision object is detected, or the collision object label is not a container-specific label, it is determined that there are no other containers in front of the target container.

[0034] Step 3: Rear X-ray inspection Maintaining the same preset launch position, fire a second ray directly behind the target container.

[0035] The length and detection rules of the second ray are exactly the same as those of the first ray, both being preset distance thresholds (3 meters).

[0036] Physical collision detection of the second ray: If a collision object is detected and its tag is a container-specific tag, it is determined that there are other containers behind the target container. No collision object was detected or the label did not match, indicating that there are no other containers behind the target container.

[0037] Step 4: Final determination of a single-piece box The final decision will be made based on the results of the front and rear inspections. If there are no containers in front and no containers behind, the target container is determined to be a single container. If there is a container in front, a container behind, or containers in both front and back, it is determined to be a non-single-cargo container.

[0038] In the description of this invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0039] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make modifications, alterations, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for identifying single containers in a container yard within a digital twin scenario, applied to a digital twin container yard system built using the Unity engine, characterized in that... Includes the following steps: Step 1: Add Collider and Transform components to all container models and set container-specific tags; Preset height threshold, preset distance threshold, preset launch position; Step 2: Obtain the height parameter of the target container in the digital twin system, and compare the height parameter with the preset height threshold. If the height parameter is less than or equal to the preset height threshold, the target container is directly determined to be a non-single container; if the height parameter is greater than the preset height threshold, the single container detection process is started, and Step 3 is executed. Step 3: The single container detection process begins. The first ray is emitted forward from the preset launch position of the target container. The first ray is used to detect collision objects. If a collision object is detected and the label of the collision object is the preset container-specific label, it is determined that there are other containers in front of the target container. If no collision object is detected or the collision object label is not a container-specific label, it is determined that there are no other containers in front of the target container; Step 4: Launch a second ray from the same preset launch position of the target container to the rear. The length of the second ray is the same as the preset distance threshold and the first ray. Detect collision objects on the second ray. If a collision object is detected and the label of the collision object is a preset container-specific label, it is determined that there are other containers behind the target container. If no collision object is detected or the label of the collision object is not a container-specific label, it is determined that there are no other containers behind the target container. Step 5: If there are no other containers in front of or behind the target container, the target container is determined to be a single container; if there are other containers in front of or behind the target container, the target container is determined to be a non-single container.

2. The method for identifying single containers in a container yard in a digital twin scenario according to claim 1, characterized in that: In step 2, the height parameter of the target container in the digital twin system is obtained by calling the built-in parameter interface of the Transform component or Collider component of the Unity engine to directly read the height attribute value of the container model; the height parameter is the actual modeling height of the container model in the digital twin system, in meters.

3. The method for identifying a single container in a container yard in a digital twin scenario according to claim 1, characterized in that: The preset launch position in steps 3 and 4 is the coordinate point of the center position of the target container model offset upwards. Specifically, it is the world coordinate center of the container model plus the upward three-dimensional vector in the Unity engine, and the offset height is adapted to the actual modeling size of the container model.

4. The method for identifying a single container in a container yard in a digital twin scenario according to claim 1, characterized in that: In step 3, the length of the first ray is a preset distance threshold.

5. The method for identifying a single container in a container yard in a digital twin scenario according to claim 1, characterized in that: The first and second rays are physical rays created in the Unity engine using the Raycast function. The rays are emitted in the directions directly in front of and behind the target container, respectively, consistent with the container's orientation.

6. The method for identifying a single container in a container yard in a digital twin scenario according to claim 1, characterized in that: Collision detection is a physical collision detection method used in the Unity engine. The detection range is from the starting point of the ray to the end point of the ray's length. It only identifies collision objects on the ray's propagation path; objects that do not enter the ray's range are not included in the detection.

7. The method for identifying single containers in a container yard in a digital twin scenario according to claim 1, characterized in that: The container-specific label is a unified identification label set for all container models in the digital twin system. Non-container object models are not configured with this label, and the label name can be customized according to system development requirements.

8. The method for identifying single containers in a container yard in a digital twin scenario according to claim 1, characterized in that: The preset height threshold is adaptively adjusted according to the actual operating scenario of the container yard and the specifications of the containers, with an adjustment range of 0.5 meters to 2 meters.

9. The method for identifying a single container in a container yard in a digital twin scenario according to claim 1, characterized in that: The preset distance threshold is adaptively adjusted according to the container placement spacing and operational requirements of the container yard, with an adjustment range of 1 meter to 5 meters.

10. The method for identifying single containers in a container yard in a digital twin scenario according to claim 1, characterized in that: The preset launch position is adjusted according to the coordinate system and modeling method of the container model, and the offset direction and offset distance are adapted to different container 3D models.