Checkpoint control method and device, and electronic equipment

CN122597681BActive Publication Date: 2026-11-03ZHEJIANG ELECTRONIC PORT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611095412.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-11-03
Estimated Expiration
2046-07-22

AI Technical Summary

Technical Problem

Traditional port inspections suffer from low efficiency and high error rates. Container packing optimization does not take into account the imaging patterns of machine inspections, and inspection route planning relies on human experience, leading to resource waste and low customs clearance efficiency. Existing intelligent image review solutions cannot distinguish between false anomalies and genuine illegal smuggling, making it difficult to achieve optimal overall customs clearance efficiency.

Method used

By acquiring visible light images and depth point clouds of the goods inside the container, a measured geometric voxel model of the container is generated. Combined with density attributes, a prior voxel density field is generated, and spatial rigid registration and topological constraint correction are performed to automatically correct the position and stacking offset of the goods. Combined with real-time inspection path optimization and container optimization models, the container loading station and inspection path are dynamically adjusted to achieve optimal global customs clearance efficiency.

Benefits of technology

It has improved the efficiency of customs clearance, reduced unnecessary opening and inspection, increased the accuracy of anomaly identification, reduced regulatory and enterprise customs clearance costs, and enhanced the port's throughput capacity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597681B_ABST
    Figure CN122597681B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of checkpoint control methods, comprising: the visible light image of the goods in box and depth point cloud are obtained, and the measured packing geometry voxel model is obtained by three-dimensional reconstruction and voxelization, and prior voxel density field is generated by mapping material density and internal structure parameter;Collect the projection data of goods in box to generate measured voxel density field, and calculate global density deviation matrix by spatial rigid registration;Prior density field is corrected based on spatial topological constraint propagation correction parameter, and the spatial coordinates and risk level of abnormal area are obtained according to the remaining density deviation;Initial inspection path is generated in combination with topological relationship and abnormal coordinates, and abnormal probability is updated based on measured verification incremental true value, and real-time inspection path is dynamically re-planned in real time through rolling horizon optimization;Global operation data is combined to dynamically adjust packing optimization weight, and packing and audit model are iteratively optimized, to realize efficient customs control.Through the above setting, the customs efficiency of goods can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a checkpoint control method, device, and electronic device. Background Technology

[0002] With the continuous expansion of cross-border trade, the efficiency of container cargo clearance and inspection has become a core factor restricting the cargo flow capacity of ports. Traditional port machine inspection relies on manual image interpretation to identify anomalies, resulting in low efficiency, large subjective bias, and high rates of missed and false judgments, making it difficult to adapt to the ever-increasing volume of customs clearance business. Existing intelligent image review solutions are based solely on single-modal analysis of ray images, lacking prior support from real cargo layout data at the container loading end. This makes it impossible to distinguish between false anomalies caused by stacking and obstruction and genuine illegal smuggling, leading to a persistently high false alarm rate from machine inspections and a large number of unnecessary container openings consuming regulatory resources. At the same time, existing container loading optimization only aims at space utilization, failing to incorporate machine inspection imaging patterns for proactive risk control; inspection route planning relies on manual experience, resulting in problems such as blindly opening containers and repeated handling, and a one-way disconnect between inspection execution and image review decision-making, making it impossible to dynamically adjust based on on-site verification results. Furthermore, single-container optimization does not consider the overall port regulatory resource load, easily leading to resource congestion caused by the concentrated arrival of high-risk cargo, making it difficult to achieve optimal overall customs clearance efficiency. Therefore, a comprehensive, end-to-end collaborative checkpoint control solution is urgently needed. Summary of the Invention This invention relates to a checkpoint control method, apparatus, and electronic device, which can improve the efficiency of customs clearance for goods.

[0003] The technical solution proposed in this invention is: a checkpoint control method, characterized in that the method includes: The visible light image and depth point cloud of the cargo inside the container are acquired. The measured geometric voxel model of the container is obtained through 3D reconstruction and voxelization. The density attribute is mapped to the voxel unit corresponding to the measured geometric voxel model of the container, and the actual photographic prior voxel density field is generated by combining the material density and internal structure distribution parameters of the cargo. Projection data of goods inside the container is collected to generate a measured voxel density field. The prior voxel density field of the actual photograph is spatially rigidly registered with the measured voxel density field in order to calculate the global density deviation matrix. Based on the global density deviation matrix, cargo areas with density deviations greater than a preset threshold are selected as low-confidence benchmark areas. Based on the spatial topological constraints of the measured container geometry voxel model, correction parameters are propagated to the surrounding low-confidence areas to automatically correct the position, orientation, and stacking offset of cargo in the actual photographed prior voxel density field, thus obtaining the corrected prior density field. Based on the deviation between the corrected prior density field and the remaining density of the measured voxel density field, the spatial coordinates and risk level of the abnormal area are obtained. Combining the spatial topological relationship of the measured container geometry voxel model with the spatial coordinates of the abnormal area, an initial inspection path is generated with the goal of minimizing the relocation cost. Based on the initial inspection path, the goods are measured and verified, and the corresponding measured attribute data is obtained as incremental truth value to update the abnormal probability distribution of the remaining uninspected area. Real-time inspection paths are generated by combining the rolling time-domain optimization algorithm and the dynamic replanning of the abnormal probability distribution. By combining real-time inspection paths, the system dynamically adjusts the packing optimization of packing stations as a multi-objective weighting coefficient, taking the shortest average customs clearance time as the global optimization objective. This results in the generation of a packing optimization model and a drawing review model to achieve efficient customs clearance control for goods.

[0004] Furthermore, the prior voxel density field of the live-shot image is generated, including: Receive cargo declaration information and measured packing geometry model, search the preset commodity material database, match the equivalent density parameter and internal structural density distribution parameter corresponding to each cargo, and obtain the data source for density attribute mapping; Based on the spatial coordinate range of each item in the measured container geometric voxel model, the matched density parameters are assigned to the corresponding geometric voxel units one by one, so that the density attribute corresponds one-to-one with the geometric position of the item. In the geometric voxel model, void voxel units other than cargo are uniformly assigned the standard air density to form a real-world prior voxel density field that is continuous across the entire domain and covers the entire internal space of the container. This provides a complete benchmark for subsequent alignment calculations with the measured density field.

[0005] Furthermore, the prior voxel density field captured in the photograph is spatially rigidly registered with the measured voxel density field, including: The overall outer contour features of the cargo are extracted from the prior voxel density field of the actual photograph and the measured voxel density field respectively. The initial coarse registration is completed with the goal of maximizing the overlap of the contours, so as to achieve the initial alignment of the spatial positions of the two density fields and narrow the search range for subsequent fine registration. Based on the initial alignment, high-density feature points with density values ​​higher than a preset threshold are selected as matching anchor points. The iterative nearest point algorithm is used to perform multiple rounds of iterative optimization to complete high-precision spatial registration. The final spatial transformation matrix is ​​output, which transforms the prior voxel density field of the actual image to the coordinate system of the measured voxel density field, providing a unified spatial reference for subsequent density deviation calculation.

[0006] Furthermore, the automatic correction of the prior voxel density field of the live-shot image includes: Based on the global density deviation matrix, cargo areas with density deviations less than a preset tolerance threshold are selected as high-confidence benchmark areas, and the measured density and spatial location of these areas are used as the true value benchmarks for correction. Based on the adjacent contact relationship and stacking level of the cargo in the measured container geometry model, a cargo adjacency topology map is constructed, and multiple low-confidence areas to be corrected are divided from near to far according to the adjacency level with the reference area. Starting from the high-confidence benchmark area, the position and orientation correction parameters are propagated layer by layer along the adjacent topology map to the surrounding low-confidence areas. The correction process maintains the topological connection relationship and relative stacking order between goods, and finally obtains the corrected prior density field, eliminating spurious biases caused by packing displacement and orientation deviation.

[0007] Furthermore, obtain the spatial coordinates and risk level of the abnormal area, including: The residual density deviation between the corrected a priori density field and the measured voxel density field is calculated. Voxels with deviation amplitudes exceeding the allowable range of material tolerances are subjected to threshold segmentation to extract the abnormal voxel set. Perform three-dimensional connected component clustering analysis on the set of anomalous voxels to divide spatially adjacent anomalous voxels into independent anomalous regions, extract the minimum bounding cube spatial coordinates and volume parameters of each anomalous region, and aggregate the scattered voxels into localizable physical anomalous objects. Based on the remaining deviation amplitude, spatial volume, and regulatory sensitivity of the location of each abnormal area, a preset risk classification rule is matched to determine the risk level corresponding to each abnormal area, providing a decision-making basis for subsequent inspection priority ranking.

[0008] Further, an initial verification path is generated, including: Based on the measured geometric voxel model of the packing, the stacking and occlusion relationships of the goods and the front and back placement order are sorted out, a spatial topological dependency graph of the goods is constructed, the list of goods to be moved before each goods is marked, and the physical constraints of the unpacking operation are clarified. For each abnormal area, the total quantity and weight of goods that need to be moved in advance are statistically verified, and the relocation cost of the abnormal point is calculated by weighted quantitative calculation, thus converting the physical operation cost into a quantifiable numerical indicator. The optimization objective is to minimize the total relocation cost of all abnormal locations. An improved A algorithm is then adopted. The algorithm iterates through the system to find the optimal inspection order and moving route, generating an initial inspection path to minimize duplicate moving and invalid operations.

[0009] Furthermore, dynamic replanning generates real-time verification paths, including: The inspection work is carried out sequentially according to the initial inspection path. After the physical verification of each inspection point is completed, the measured material, internal structure and actual spatial location data of the goods at that point are immediately collected and sent back to the drawing review unit as incremental true value data. Based on the returned incremental true data, the probability of anomalies in the remaining uninspected areas is re-estimated, points that have been confirmed to be without anomalies are removed, and high-risk points newly discovered during the verification process are added to update the distribution of anomalies across the entire region, thereby narrowing the scope of subsequent inspection operations. A rolling time-domain optimization algorithm is adopted to minimize the cumulative relocation cost of the remaining uninspected locations. The optimal inspection sequence and operation route of the remaining locations are re-solved to generate real-time inspection paths. Changes in inspection workload are pushed to the resource scheduling unit simultaneously to dynamically adjust the allocation of handling equipment and inspection personnel.

[0010] Furthermore, a packing optimization model and a drawing review model are generated, including: After each batch of goods completes the entire customs clearance process, the actual customs clearance time, abnormal verification results, inspection resource consumption, and real-time port load data of that batch of goods are collected to form a closed-loop optimization sample set. The abnormal verification results are used as incremental training samples. A time-decay weighting mechanism is used to give higher training weights to recent samples. Incremental fine-tuning is performed on the image review model so that the model can continuously learn the latest cargo features and abnormal patterns. By combining the correlation between port-wide load data and corresponding clearance times, the multi-objective weight coefficients for container loading optimization are iteratively optimized, and the optimization priorities of machine inspection risk and space utilization are dynamically balanced to form a self-evolving checkpoint control model that can adapt to the port's operational status.

[0011] To achieve the above technical solution, this application also includes a checkpoint control device, comprising: an image acquisition section and a checkpoint control section. To achieve the above technical solution, this application also includes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory, wherein the processor is configured to run the computer program to execute the checkpoint control method.

[0012] To achieve the above technical solution, this application also includes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory, wherein the processor is configured to run the computer program to execute a gate control method.

[0013] The aforementioned checkpoint control method generates a prior voxel density field based on real-time packing data, eliminating prior distortions caused by packing execution errors at the source and providing a highly reliable benchmark for anomaly identification. Through spatial registration and topological constraint self-correction, it automatically filters out false anomalies caused by cargo displacement, effectively improving the accuracy of anomaly identification and reducing unnecessary unpacking. Combined with rolling time-domain optimization and dynamic replanning of inspection paths, it can adjust operational strategies in real time according to verification results, reducing invalid handling and shortening the inspection time per container. Simultaneously, it dynamically adjusts the packing optimization weight in conjunction with the overall port load, achieving synergistic optimization of single-container efficiency and overall customs clearance efficiency. Without increasing hardware investment, it simultaneously improves regulatory accuracy, operational efficiency, and port throughput capacity, reducing regulatory costs and enterprise customs clearance costs. Attached Figure Description

[0014] Figure 1 This is a structural block diagram of an electronic device.

[0015] Figure 2 This is a flowchart of a gate control method.

[0016] Explanation of reference numerals in the attached figures: 100, electronic device; 11, processor; 12, memory. Detailed Implementation

[0017] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.

[0018] To enable those skilled in the art to better understand the present application, the technical solutions in specific embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0019] It should be noted that the terms "first," "second," and similar terms used in this application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, "a" or "one," and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. "A plurality of" or "multiple" indicates at least two. Unless otherwise stated, terms such as "front," "back," "left," "right," "lower," and / or "upper" are for illustrative purposes only and are not limited to a location or spatial orientation. Terms such as "comprising" or "including" indicate that the elements or objects preceding "comprising" or "including" encompass the elements or objects listed following "comprising" or "including" and their equivalents, and do not exclude other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0020] The singular forms “a,” “the,” and “the” used in this application specification and appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0021] The checkpoint control method provided in this embodiment can be executed in electronic device 100 or similar device. Figure 1 This is a hardware structure block diagram of an electronic device 100 that implements an embodiment of this application. For example... Figure 1 As shown, the electronic device 100 may include one or more ( Figure 1 (Only one is shown) memory 12 and processor 11. This electronic device 100 is a cross-border control terminal used to establish a packing situation and detection path that can be adapted to different goods entering the country, thereby improving the efficiency of goods clearance.

[0022] The memory 12 stores program instructions, such as software programs and modules for application software, as in a checkpoint control method in this embodiment. The processor 11 executes the program instructions stored in the memory 12. By running the computer program stored in the memory 12, it can perform various functional applications and data processing, thereby realizing checkpoint control.

[0023] The processor 11 may include, but is not limited to, a microprocessor 11 (Microcontroller Unit, abbreviated as MCU) or a programmable gate array (FPGA).

[0024] Those skilled in the art will understand that Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device 100 described above. For example, the electronic device 100 may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.

[0025] like Figure 2 As shown, this invention discloses a checkpoint control method, the method comprising: S1 acquires visible light images and depth point clouds of the cargo inside the container. Through 3D reconstruction and voxelization, a measured geometric voxel model of the container is obtained. Combining the material density and internal structure distribution parameters of the cargo, the density attribute is mapped to the voxel unit corresponding to the measured geometric voxel model of the container to generate a priori voxel density field of the actual image. S2 collects the projection data of the goods inside the box, generates the measured voxel density field, and performs spatial rigid registration between the actual a priori voxel density field and the measured voxel density field to calculate the global density deviation matrix. S3 selects cargo areas with density deviations greater than a preset threshold as low-confidence benchmark areas based on the global density deviation matrix. Based on the spatial topological constraints of the measured container geometry voxel model, it propagates correction parameters to the surrounding low-confidence areas, automatically corrects the position, orientation, and stacking offset of cargo in the actual photographed prior voxel density field, and obtains the corrected prior density field. Based on the deviation between the corrected prior density field and the remaining density of the measured voxel density field, it obtains the spatial coordinates and risk level of the abnormal area. S4 combines the spatial topological relationship of the measured container geometry voxel model with the spatial coordinates of the abnormal area to generate an initial inspection path with the goal of minimizing the relocation cost. Based on the initial inspection path, the goods are measured and verified, and the corresponding measured attribute data is obtained as incremental truth value to update the abnormal probability distribution of the remaining uninspected area. The real-time inspection path is generated by combining the rolling time domain optimization algorithm and the dynamic replanning of the abnormal probability distribution. S5 combines real-time inspection paths with operational data on the load rate of machine inspection channels, saturation of inspection stations, and backlog of goods to be inspected across the entire checkpoint. It dynamically adjusts the packing optimization of packing stations as a multi-objective weighting coefficient, with the shortest average customs clearance time as the global optimization objective. This generates a packing optimization model and a drawing review model to achieve efficient customs clearance control for goods.

[0026] In the above steps, visible light images and depth point clouds of the goods inside the container are acquired by a multi-view image acquisition device deployed on the gantry of the packing station. The visible light images are used to capture the appearance contours, textures, and boundary information of the goods, while the depth point clouds are used to obtain the spatial coordinates and dimensions of each item. These two elements complement each other, providing multi-dimensional raw data for 3D reconstruction. By performing 3D reconstruction and voxelization processing on the multi-view images and point cloud data, a measured container geometric voxel model is obtained. In this application, a voxel can be understood as the smallest volume unit in three-dimensional space, analogous to a pixel in a two-dimensional image. Voxelization discretizes the continuous three-dimensional space into regular grid units, allowing the container space and the shape of the goods to be quantified and calculated. This geometric model can restore the actual placement, orientation, and stacking state of the goods inside the container before sealing, unlike traditional simulation models generated solely based on the packing scheme, and can eliminate geometric information distortion caused by packing execution errors. Based on this, combined with the material density and internal structural distribution parameters corresponding to the declared information of the goods, the density attribute is mapped to the voxel unit corresponding to the measured container geometric voxel model, generating a priori voxel density field. The material density and internal structural parameters are derived from the commodity database and correspond one-to-one with the declared name, specifications, and material of the goods.

[0027] Meanwhile, density mapping can expand a voxel model containing only geometric shape information into a multi-dimensional voxel field that includes density attributes, ensuring consistency with the imaging dimension of subsequent X-ray inspection and enabling data comparison across stages and devices. The final generated real-image prior voxel density field will be synchronously transmitted to the port map review control unit as benchmark data for subsequent machine inspection comparison.

[0028] Once a cargo container arrives at the port and enters the machine inspection channel, a 3D X-ray scanning device collects the projection data of the cargo inside the container, reconstructing and generating a measured voxel density field. This density field is the true density distribution obtained by inverting the X-ray attenuation law of different materials after X-rays penetrate the container, representing the current actual physical state of the cargo inside the container and serving as the actual measurement basis for judging anomalies during customs inspection. Because the loading station and the port inspection channel use independent spatial coordinate systems, and the container may undergo overall displacement and deflection during transportation and loading / unloading, directly comparing the two density fields would result in systematic deviations due to inconsistent spatial references. Therefore, a rigid spatial registration operation must be performed first. The core function of rigid spatial registration is to align the previously captured voxel density field and the measured voxel density field to the same spatial coordinate system through spatial coordinate transformation, ensuring that voxels at corresponding positions in the two density fields point to the same point inside the container. After registration, the density difference between the two density fields is calculated for each voxel, generating a global density deviation matrix. The matrix, presented in the form of a three-dimensional array, quantifies the degree of deviation between the prior density and the measured density at each spatial location within the box.

[0029] After obtaining the global density deviation matrix, the system does not directly classify all deviations as abnormal. Instead, it first performs a self-correction operation on the prior density field. Since containers undergo multiple stages from loading to port inspection, including transportation, hoisting, and storage, cargo within the container may experience positional shifts, orientation changes, or slight stacking displacements. These are normal deviations in the logistics process and do not constitute false declarations or illegal smuggling. Directly classifying such deviations as abnormal would generate numerous false alarms, increasing unnecessary inspection costs. In practice, based on the global density deviation matrix, the system first distinguishes regions with different confidence levels: regions with density deviations within a reasonable range indicate a high degree of agreement between prior data and measured data, belonging to high-confidence benchmark regions; regions with density deviations exceeding a reasonable range belong to lower-confidence regions requiring correction. Based on the spatial topological constraints of the measured container geometry voxel model—that is, the inherent physical constraints such as the adjacent contact relationships and stacking support relationships between goods—correction parameters are propagated to the surrounding low-confidence areas, using the actual position of the high-confidence benchmark area as a reference. This automatically corrects the position, orientation, and stacking offset of the goods in the prior voxel density field, resulting in a corrected prior density field. During the correction process, the relative topological relationships between goods remain unchanged, ensuring that the correction results conform to the physical stacking logic and avoiding unreasonable correction results. After completing the prior self-correction, the remaining density deviation between the corrected prior density field and the measured voxel density field is used to identify the true abnormal areas and obtain their spatial coordinates and risk levels. The remaining deviation cannot be explained by positional offset and typically corresponds to real regulatory risks such as material discrepancies, undeclared contraband, and internal structural anomalies. This step, by first correcting the prior and then determining the anomaly, effectively eliminates false anomalies caused by goods displacement during logistics, significantly improving the accuracy of anomaly identification and reducing unnecessary unpacking inspections. Meanwhile, the output of abnormal spatial coordinates and risk levels also provides precise target guidance for subsequent inspection path planning, achieving a seamless connection between the review results and the inspection execution.

[0030] After anomaly identification, the system generates an inspection task and pushes it to the inspection work area to begin inspection path planning and job scheduling. First, combining the spatial topology of the measured packing geometry model with the spatial coordinates of the anomaly area, an initial inspection path is generated with the goal of minimizing relocation cost. The spatial topology clarifies the stacking and obstruction order of goods; that is, to inspect a particular obstructed item, the obstructing items in front of and above it must be moved first. The goal of minimizing relocation cost is to minimize the total amount of goods to be moved while covering all anomaly points, thereby reducing the physical workload and time cost of inspection. The initial inspection path is generated only based on the preliminary judgment results from the drawing review stage. However, in the actual inspection process, the actual situation of anomalies often changes. Some predicted anomalies may be confirmed as normal deviations upon verification, or new suspected anomalies may be discovered during the verification process. If the fixed initial path is still followed, a large amount of invalid relocation and duplicate work will occur. Therefore, this application adopts a rolling time domain and performs dynamic replanning during the inspection process. That is, after each inspection point is completed, the measured attribute data of that point is sent back as an incremental truth value. Based on the latest verification results, the anomaly probability distribution of the remaining uninspected areas is updated. Then, the real-time inspection path is replanned and generated in combination with the updated anomaly distribution, which can effectively reduce the amount of invalid work and shorten the overall time of a single inspection.

[0031] Building upon single-container inspection practices, this application optimizes customs clearance efficiency at the port-wide level. By collecting real-time operational data across the entire customs area, including machine inspection channel load rates, inspection station saturation, and backlog of goods awaiting inspection, this data directly reflects the current saturation of port regulatory resources and the state of customs congestion. Combined with the real-time consumption of inspection resources corresponding to inspection routes, the multi-objective weighting coefficients for container loading optimization at loading stations are dynamically adjusted. When port inspection resources are strained and there is a large backlog of goods awaiting inspection, the weight of the objective of "reducing machine inspection anomaly rates" is increased, guiding the container loading process to adopt lower-risk layout schemes and reducing the need for unpacking at the source. When port resources are abundant and customs clearance is smooth, the weight of the objective of "space utilization rate" is increased, taking into account the container loading costs of logistics companies. Based on this, all containers awaiting customs clearance are treated as game subjects, with the shortest average customs clearance time as the global optimization objective. Through evolutionary game theory using group strategies, the optimal packing strategy and inspection channel allocation scheme for each container are obtained. This avoids the strain on regulatory resources caused by the concentrated arrival of high-risk goods, achieving optimal overall customs clearance efficiency. Simultaneously, data such as the actual customs clearance time and verification results for each batch of goods are fed back, continuously optimizing the packing optimization model and drawing review model. This allows the entire customs control system to automatically adapt to changes in port business characteristics and cargo structure, forming a self-evolving virtuous cycle. This step expands the optimization scope from single-container-level inspection efficiency to overall customs clearance efficiency across the entire customs area, breaking the industry's current disconnect between packing optimization and port scheduling. It achieves dynamic two-way adaptation between front-end packing strategies and mid-level regulatory resources, improving the overall customs clearance throughput capacity of the port without increasing hardware investment.

[0032] As one implementation method, generating a real-world prior voxel density field includes: Receive cargo declaration information and measured packing geometry model, search the preset commodity material database, match the equivalent density parameter and internal structural density distribution parameter corresponding to each cargo, and obtain the data source for density attribute mapping; Based on the spatial coordinate range of each item in the measured container geometric voxel model, the matched density parameters are assigned to the corresponding geometric voxel units one by one, so that the density attribute corresponds one-to-one with the geometric position of the item. In the geometric voxel model, void voxel units other than cargo are uniformly assigned the standard air density to form a real-world prior voxel density field that is continuous across the entire domain and covers the entire internal space of the container. This provides a complete benchmark for subsequent alignment calculations with the measured density field.

[0033] In the above steps, two input data streams are first received: one is the measured container geometry voxel model output by the front-end multi-view image acquisition device, and the other is the cargo declaration information synchronously pushed by the cargo declaration system. The measured container geometry voxel model originates from visual acquisition and 3D reconstruction processing before sealing. It discretizes the continuous 3D space inside the container into regularly arranged minimum volume units, or voxel units. Each voxel unit contains only spatial coordinates and geometric occupancy attributes, accurately reproducing the actual shape, placement, and stacking state of each item of cargo. However, it does not contain any physical properties such as material or density, and therefore cannot be directly compared quantitatively with the X-ray density data from the machine inspection process. The cargo declaration information includes basic information such as the name, specifications, material, and HS code of each item of cargo, serving as the index for matching physical attributes.

[0034] Based on these two inputs, the system first searches a pre-defined commodity material database to match the corresponding equivalent density parameter and internal structural density distribution parameter for each item, thereby obtaining the data source for density attribute mapping. This pre-defined commodity material database is a pre-built standardized attribute library, where each data point corresponds one-to-one with the commodity category, material, and structure. The equivalent density parameter refers to the equivalent attenuation density of the corresponding material in a X-ray detection scenario, used to simulate the attenuation effect when X-rays penetrate the commodity. The internal structural density distribution parameter corresponds to the density distribution patterns of different components inside the commodity, such as the density differences in the metal shell, internal circuit boards, and components of electromechanical products, avoiding systematic errors caused by treating the commodity as a homogeneous block. The reason for obtaining density parameters through database matching is that visible light visual acquisition can only obtain external geometric information of the commodity and cannot penetrate the packaging to identify the internal material and structure. Combining declaration information with a standardized database is a reasonable technical path to obtain the commodity's density attributes without opening the box or damaging the commodity.

[0035] After parameter matching is completed, the system assigns the matched density parameters to the corresponding geometric voxel units on a voxel-by-voxel basis, based on the spatial coordinate range of each item in the measured container geometric voxel model. This establishes a one-to-one correspondence between density attributes and the geometric position of the goods. In the measured container geometric voxel model, each item corresponds to a continuous set of voxel units, and its spatial coordinate range can be accurately divided from the overall voxel model using an instance segmentation algorithm, clearly identifying which voxels belong to a specific item. The execution logic of voxel-by-voxel assignment is as follows: combining the internal structural density distribution parameters of each item, and according to the internal structural layering and component distribution of the goods, different density values ​​are assigned to the corresponding voxel units, rather than assigning a uniform average density value to the entire item. The core reason for using refined voxel-by-voxel assignment is that the measured voxel density field output by the machine inspection process is a refined density distribution at the voxel level. If the prior data only uses the average density of the entire item, it will introduce a natural systematic bias due to ignoring internal structural differences, leading to a large number of meaningless spurious biases in subsequent bias calculations. By establishing a one-to-one correspondence between density attributes and geometric locations, the spatial distribution of the prior density field can be made to closely match the actual physical state of the goods. This upgrades the original voxel model, which only has a geometric shape, into a multi-dimensional voxel field with physical density attributes, thus providing a basis for point-to-point quantitative comparison with the density field measured by machine inspection.

[0036] After assigning density values ​​to the cargo area, the system uniformly assigns standard air density to all void voxel units outside the cargo area in the geometric voxel model. This results in a fully continuous, real-image prior voxel density field covering the entire container interior, providing a complete benchmark for subsequent alignment calculations with the measured density field. Inside the container, besides the voxels occupied by the cargo, the remaining spaces between cargo and between cargo and the container walls are air-filled areas, i.e., void voxel units. During X-ray imaging, air areas generate a fixed amount of X-ray attenuation, corresponding to fixed density values. If the prior density field only covers the cargo area, and the void areas lack corresponding density values, the following problems will occur: First, during subsequent rigid spatial registration, the features available for matching are limited to the cargo edge contours, lacking global feature support, resulting in insufficient registration accuracy; second, when calculating the global density deviation matrix, data will be missing in the void areas, failing to form a complete deviation result covering the entire container, thus reducing the coverage of anomaly detection. Therefore, assigning a standard air density to void voxels ensures that the spatial coverage of the prior density field is completely consistent with the measured density field, forming continuous, complete, and global three-dimensional density data. This guarantees that subsequent spatial registration and deviation calculations can be performed across the entire chamber without any data blind spots.

[0037] As one implementation method, spatial rigid registration is performed between the photographed prior voxel density field and the measured voxel density field, including: The overall outer contour features of the cargo are extracted from the prior voxel density field of the actual photograph and the measured voxel density field respectively. The initial coarse registration is completed with the goal of maximizing the overlap of the contours, so as to achieve the initial alignment of the spatial positions of the two density fields and narrow the search range for subsequent fine registration. Based on the initial alignment, high-density feature points with density values ​​higher than a preset threshold are selected as matching anchor points. The iterative nearest point algorithm is used to perform multiple rounds of iterative optimization to complete high-precision spatial registration. The final spatial transformation matrix is ​​output, which transforms the prior voxel density field of the actual image to the coordinate system of the measured voxel density field, providing a unified spatial reference for subsequent density deviation calculation.

[0038] In the actual operation of customs inspection, the prior voxel density field is generated at the packing station, reconstructed by multi-view visual acquisition equipment at the packing end based on the cargo state before sealing, with its coordinate system based on the visual equipment at the packing station. The measured voxel density field, on the other hand, is generated at the port inspection channel, reconstructed by 3D X-ray scanning equipment scanning the cargo containers arriving at the port, with its coordinate system based on the port inspection equipment. The two sets of acquisition equipment are deployed independently in different spatial locations, resulting in inherent differences in the origin, axial orientation, and spatial scale of their coordinate systems. Furthermore, during the transport of the cargo containers from the packing station to the port, they undergo multiple logistics stages such as hoisting, stacking, and transshipment, causing overall displacement and deflection of the containers themselves, and the overall relative position of the cargo inside the containers also shifts spatially along with the containers. If two density fields are directly compared voxel-by-voxel without spatial registration, a systematic deviation will occur due to the complete misalignment of the spatial reference. The calculated density difference will not reflect the actual material or content differences, but rather a spurious deviation caused by the mismatch in spatial positions, making it completely unusable for anomaly identification. Therefore, rigid spatial registration is a necessary prerequisite for the comparability of prior data and measured data. Here, rigid registration means that the registration process only performs rigid transformations such as translation, rotation, and scaling on the density field as a whole, without changing the relative shape, position, and density distribution of the goods within the density field. This aligns with the physical reality that the goods are rigid bodies that only undergo overall displacement and deflection.

[0039] During the registration operation, the overall outer contour features of the cargo in the prior voxel density field of the actual photograph and the measured voxel density field are extracted first. Initial coarse registration is completed with the goal of maximizing the overlap of the contours, achieving preliminary alignment of the spatial positions of the two density fields and narrowing the search range for subsequent fine registration. The overall outer contour features of the cargo refer to the three-dimensional boundary surface of the space occupied by all cargo entities in the density field. This is unaffected by internal density fluctuations or local structural differences and reflects the overall spatial distribution of the cargo within the container. The core logic of coarse registration is to find a set of optimal translation and rotation parameters through a global search, maximizing the overlap area and minimizing the misalignment distance of the outer contour surfaces of the two density fields, thus achieving preliminary alignment of the two density fields in macroscopic space. Because the high-precision fine registration algorithm is sensitive to the initial position, if the initial spatial deviation between the two density fields is too large, the fine registration algorithm can easily get trapped in a local optimum, resulting in registration failure or alignment to the wrong position. By first completing the macroscopic position alignment through coarse registration, the parameter search range of subsequent fine registration can be narrowed from the global space to a local small range. This can significantly improve the convergence speed of fine registration and effectively avoid registration failure caused by local optima, thus ensuring the stability and reliability of the entire registration process.

[0040] Based on the initial alignment, high-density feature points with density values ​​exceeding a preset threshold are selected as matching anchor points. An iterative nearest-point algorithm is used for multiple rounds of optimization to achieve high-precision spatial registration. Coarse registration only achieves approximate alignment of macroscopic contours, and its registration accuracy is insufficient to support voxel-level density deviation calculations. Therefore, fine registration is needed to further improve the accuracy of spatial alignment. High-density feature points are chosen as matching anchor points because high-density areas typically correspond to metal components and high-density material parts in cargo. These components have clear boundaries and stable features in X-ray imaging, and are minimally affected by factors such as material tolerances and packaging gaps. Their feature recognition and positional accuracy are far higher than low-density areas, making them more reliable as matching benchmarks. The preset density threshold is pre-set based on the density range of common cargo materials to select sufficiently stable and discriminative high-density feature points. The execution logic of the iterative nearest point algorithm is as follows: In each iteration, for each high-density feature point in the prior density field, the nearest corresponding point in the measured density field is found to form a matching point pair; based on all matching point pairs, the optimal spatial transformation parameters are calculated, the prior density field is transformed, and the point pair distance is recalculated; this iterative process is repeated until the average distance between point pairs converges to within a preset accuracy threshold, thus completing the fine registration. Through multiple rounds of iterative optimization, the alignment accuracy of the two density fields can be improved from the contour level to the voxel level, ensuring that the voxels at the vast majority of corresponding positions can be accurately matched, providing accuracy assurance for subsequent voxel-by-voxel deviation calculation.

[0041] After fine registration, the final spatial transformation matrix is ​​output, uniformly transforming the prior voxel density field from the actual image to the coordinate system of the measured voxel density field, providing a unified spatial reference for subsequent density deviation calculations. The spatial transformation matrix is ​​a set of rigid body transformation parameters obtained during the fine registration process, including three-dimensional translation vectors, three-dimensional rotation matrices, and scale coefficients. It completely records all spatial transformation operations required to align the prior density field to the measured density field. Since the measured voxel density field is generated based on the actual physical state obtained from the current scan at the port, it serves as the measured reference in checkpoint detection. All subsequent deviation judgments and anomaly identifications must use the measured data as the reference standard. Unifying the prior data to the measured coordinate system ensures that all subsequent calculations are based on the same spatial reference, with each voxel coordinate strictly corresponding to the same physical point within the box. After completing coordinate system one, the two density fields have a spatial basis with a one-to-one correspondence per voxel. Subsequently, the density difference can be calculated by subtracting voxels one by one to generate a global density deviation matrix, providing quantitative data for subsequent prior correction and anomaly identification.

[0042] As one implementation method, automatic correction of the prior voxel density field of the live image includes: Based on the global density deviation matrix, cargo areas with density deviations less than a preset tolerance threshold are selected as high-confidence benchmark areas, and the measured density and spatial location of these areas are used as the true value benchmarks for correction. Based on the adjacent contact relationship and stacking level of the cargo in the measured container geometry model, a cargo adjacency topology map is constructed, and multiple low-confidence areas to be corrected are divided from near to far according to the adjacency level with the reference area. Starting from the high-confidence benchmark area, the position and orientation correction parameters are propagated layer by layer along the adjacent topology map to the surrounding low-confidence areas. The correction process maintains the topological connection relationship and relative stacking order between goods, and finally obtains the corrected prior density field, eliminating spurious biases caused by packing displacement and orientation deviation.

[0043] In the above steps, after spatial rigid registration, the prior voxel density field of the actual photograph and the measured voxel density field have achieved overall spatial alignment at the container level. They are unified under the same coordinate system, eliminating systematic deviations caused by overall container displacement and deflection. However, the essence of rigid registration is to perform a uniform rigid transformation on the entire density field, which can only correct overall spatial misalignment at the container level. It cannot correct relative displacement, orientation deflection, and stacking offset of individual goods within the container during transportation, hoisting, and storage. In actual logistics operations, after long-distance transportation and multiple hoisting operations, it is very common and normal for cargo containers to experience slight positional shifts, orientation rotations, and changes in stacking gaps. These deviations are physical displacement changes and are not due to false declarations or illegal smuggling. If anomalies are directly judged based on the global density deviation matrix without correction, a large number of density deviations caused by such normal displacements will be misidentified as anomalies, generating a large number of meaningless false warnings, wasting regulatory resources and prolonging customs clearance time. Therefore, before formally determining an anomaly, adaptive correction of the prior density field and filtering of displacement-related pseudo-biases can improve the accuracy of checkpoint detection.

[0044] Based on the global density deviation matrix, cargo areas with density deviations less than a preset tolerance threshold are selected as high-confidence benchmark areas. The measured density and spatial location of these areas are used as the true value benchmark for correction. After the global density deviation matrix registration is completed in this step, a three-dimensional data matrix is ​​obtained by calculating the difference between the actual prior density and the measured density on a voxel-by-voxel basis, which completely records the degree of density deviation at each spatial point within the container. The preset tolerance threshold is a reasonable fluctuation threshold pre-set by combining the inherent detection error of the X-ray imaging system and the density tolerance range of common cargo materials. Areas where the deviation amplitude falls within this threshold range indicate that the prior density data and the measured density data are highly consistent. The spatial location and density attributes of the cargo in this area are consistent with the actual physical state, and there is no obvious displacement or material difference. Defining these areas as high-confidence benchmark areas essentially involves selecting reliable areas from the global data that are "completely consistent with the prior and actual measurements," using the actual measured state as the true value anchor point for correction, and providing a basis for correction for surrounding areas with deviations.

[0045] Then, based on the adjacent contact relationships and stacking levels of the goods in the measured container geometry model, a goods adjacency topology map was constructed, dividing the area into multiple low-confidence areas to be corrected according to the adjacency level with the reference area, from near to far. The measured container geometry model, derived from visual acquisition and 3D reconstruction, recorded the external dimensions and spatial position of each item, as well as the adjacent contact relationships and vertical stacking support relationships between goods. The goods adjacency topology map is a topological network constructed with individual goods as nodes and the physical contact and support relationships between goods as connections, fully restoring the stacking logic and spatial relationships of the goods within the container. Since the goods within the container are not independent individuals but rather a stacked whole that contacts and supports each other, when some goods shift, their adjacent goods usually experience a linked shift, and the relative topological connections and stacking order between goods generally remain stable. If each item is corrected individually without considering topological constraints, erroneous results that do not conform to the laws of physical stacking can easily occur, such as goods being suspended or having conflicting positions—deviations that defy common sense. Based on this, the system uses a high-confidence benchmark area as the center and divides the areas to be corrected into multiple layers according to their adjacency. Goods directly in contact with the benchmark area are in the first layer of the correction area, goods directly in contact with the first layer are in the second layer, and so on, forming a hierarchical structure that diffuses outward from the benchmark. Goods closer to the benchmark have a stronger correlation between their offset and the benchmark, resulting in higher correction accuracy; conversely, the greater the distance, the higher the uncertainty of the offset. This layer-by-layer propagation method ensures the stability and rationality of the correction process, preventing the deviation from amplifying layer by layer.

[0046] Finally, starting from the high-confidence reference area, position and orientation correction parameters are propagated layer by layer along the adjacent topology map to the surrounding low-confidence areas. The correction process maintains the topological connectivity and relative stacking order between goods, ultimately yielding the corrected prior density field and eliminating spurious biases caused by packing displacement and orientation deviation. Specifically, the position offset and orientation deflection of the reference goods are first calculated based on the difference between the measured position and the original prior position in the reference area, serving as initial correction parameters. Then, along the first layer of adjacent nodes in the topology map, combined with the contact surface constraints of adjacent goods, the position and orientation correction values ​​of the first layer of goods to be corrected are derived, completing the position correction of the first layer. After completing the first layer correction, the first layer of goods is used as the new reference benchmark to continue propagating correction parameters to the second layer of areas to be corrected, iterating through all levels to complete the correction. During the correction process, the topological connectivity and relative stacking order between goods are strictly maintained; that is, only the overall spatial position and orientation of the goods are corrected, without changing the relative contact relationships, stacking order, or adjacent gap ratio between goods. This ensures that the correction results fully conform to the objective laws of physical stacking and avoids correction results that violate common sense. After completing the calibration of all regions, the calibrated prior density field is obtained. Density deviations caused by normal physical changes such as cargo displacement and orientation shifts during logistics are eliminated by adaptively matching prior data with the actual state. This allows the prior data to actively align with the actual position of the cargo, effectively filtering out such spurious deviations from interfering with subsequent anomaly detection.

[0047] As one implementation method, obtaining the spatial coordinates and risk level of the abnormal area includes: The residual density deviation between the corrected a priori density field and the measured voxel density field is calculated. Voxels with deviation amplitudes exceeding the allowable range of material tolerances are subjected to threshold segmentation to extract the abnormal voxel set. Perform three-dimensional connected component clustering analysis on the set of anomalous voxels to divide spatially adjacent anomalous voxels into independent anomalous regions, extract the minimum bounding cube spatial coordinates and volume parameters of each anomalous region, and aggregate the scattered voxels into localizable physical anomalous objects. Based on the remaining deviation amplitude, spatial volume, and regulatory sensitivity of the location of each abnormal area, a preset risk classification rule is matched to determine the risk level corresponding to each abnormal area, providing a decision-making basis for subsequent inspection priority ranking.

[0048] Before performing this step, two types of spurious biases caused by overall spatial misalignment of the container and displacement of individual cargo items can be eliminated through spatial rigid registration and topology propagation correction. After correction, the spatial position of the prior voxel density field is highly consistent with the actual physical state of the cargo. The density bias calculated at this point has largely eliminated the interference caused by spatial position differences and can reflect the real differences in attributes such as cargo material, internal structure, and concealed items. However, the global bias data at this point is still a discrete value for each voxel, which cannot be mapped to specific physical anomalies, nor can it distinguish the severity and regulatory priority of anomalies, and cannot directly support on-site inspection operations.

[0049] The first step in anomaly identification is to calculate the residual density deviation between the corrected prior density field and the measured voxel density field. Voxels with deviation amplitudes exceeding the allowable range of material tolerances are segmented using a threshold method to extract an abnormal voxel set. The residual density deviation refers to the difference between the measured density value calculated for each voxel and the corrected prior density value. Its magnitude directly reflects the degree of density difference between the actual goods and the prior expectation at the corresponding spatial location, serving as the core quantitative basis for anomaly determination. The allowable range of material tolerances is a reasonable fluctuation range pre-set by combining the material production tolerances of common goods and the inherent detection errors of the X-ray imaging system. Since the material density of goods of the same model is not absolutely consistent in reality, normal fluctuations in the production process, batch differences in raw materials, and system noise in X-ray detection can all lead to small-scale density deviations. These deviations are within the normal acceptable range and do not possess the attributes of regulatory anomalies. By using threshold segmentation, only voxels with deviation amplitudes exceeding the normal tolerance range are retained, while invalid deviations caused by normal fluctuations are eliminated. This allows for the initial screening of voxel units suspected of being abnormal, forming an abnormal voxel set.

[0050] The second step in anomaly identification is to perform 3D connected component clustering analysis on the set of anomalous voxels. This divides spatially adjacent anomalous voxels into independent anomalous regions, extracts the spatial coordinates and volume parameters of the minimum bounding cube for each anomalous region, and aggregates scattered voxels into locatable physical anomalous objects. Anomalous voxels obtained through threshold segmentation are discrete, independent minimum units that cannot be directly mapped to real-world physical anomalous objects, nor can they provide clear location guidance for on-site inspections. Furthermore, scattered voxels cannot distinguish between a large-scale anomaly and multiple independent small anomalies, thus lacking decision-making support value. 3D connected component clustering, based on the adjacency relationship in 3D space, aggregates spatially connected anomalous voxels into a connected component. Each connected component corresponds to an independent physical anomalous region. For example, an undeclared concealed item, a shipment with a material inconsistent with the declaration, or a region with an internal structural anomaly will each form an independent connected component. Non-adjacent anomalies will be divided into different regions. After clustering, the system generates a minimum bounding cube for each anomalous region—the smallest volume cube that can completely enclose the anomalous region—and extracts the spatial coordinates and volume parameters of this cube. The role of the minimum bounding cube is to transform irregular anomaly shapes into regular spatial ranges. This not only clearly identifies the specific three-dimensional location of the anomaly within the container but also matches it with the cargo coordinates in the measured container geometry model, quickly locating the target cargo to which the anomaly belongs. This provides precise spatial guidance for subsequent inspection operations. Through these steps, anomalies are transformed from "discrete voxels" to "physical objects," directly corresponding to real-world cargo and spatial locations. Furthermore, dividing anomaly areas into independent processing units provides independent processing units for subsequent risk classification and inspection prioritization, allowing subsequent resource scheduling to be carried out precisely on a per-anomaly-area basis.

[0051] The third step in anomaly identification is to match the remaining deviation amplitude, spatial volume, and regulatory sensitivity of each anomaly area with pre-defined risk grading rules to determine the risk level of each anomaly area, providing a basis for subsequent inspection priority ranking. If all anomalies are handled indiscriminately, high-risk anomalies will not receive priority inspection, while low-risk anomalies will consume excessive regulatory resources. Therefore, this step introduces a multi-dimensional risk assessment logic. The remaining deviation amplitude reflects the degree of density difference between the anomaly area and the prior expectation; a larger deviation amplitude indicates a more significant difference in material properties, a higher probability of illegal smuggling or concealment of materials, and a higher corresponding risk level. Spatial volume reflects the size of the anomaly; a larger anomaly area involves a wider range of goods, resulting in higher potential regulatory risks and a greater workload for handling. The regulatory sensitivity of the location is determined by the category of goods corresponding to the anomaly area. For example, areas corresponding to key regulated categories such as food, cosmetics, and hazardous chemicals have higher regulatory sensitivity, and their risk level will be correspondingly higher under the same deviation conditions. The pre-defined risk classification rules are based on port regulatory requirements, cargo regulatory categories, and historical experience in handling anomalies. They are typically divided into low, medium, and high risk levels, each corresponding to different inspection and handling strategies and resource allocation standards. By matching the classification rules with multi-dimensional features, the corresponding risk level can be determined for each independent anomaly area. By assigning risk attributes to anomaly areas, regulatory personnel can clearly distinguish the urgency and importance of different anomalies, facilitating the rational allocation of regulatory resources, prioritizing the handling of high-risk anomalies, and avoiding the waste of resources caused by indiscriminate inspections. Simultaneously, the risk classification results also provide a decision-making basis for subsequent inspection strategy formulation; anomalies of different risk levels can correspond to different inspection depths and handling procedures.

[0052] As one implementation method, generating an initial verification path includes: Based on the measured geometric voxel model of the packing, the stacking and occlusion relationships of the goods and the front and back placement order are sorted out, a spatial topological dependency graph of the goods is constructed, the list of goods to be moved before each goods is marked, and the physical constraints of the unpacking operation are clarified. For each abnormal area, the total quantity and weight of goods that need to be moved in advance are statistically verified, and the relocation cost of the abnormal point is calculated by weighted quantitative calculation, thus converting the physical operation cost into a quantifiable numerical indicator. The optimization objective is to minimize the total relocation cost of all abnormal locations. An improved A algorithm is then adopted. The algorithm iterates through the system to find the optimal inspection order and moving route, generating an initial inspection path to minimize duplicate moving and invalid operations.

[0053] In the above steps, precise location and risk classification of abnormal areas can identify the target locations within the container that require key verification. However, the anomaly results at this stage only provide spatial coordinates and risk attribute data, without considering the actual stacking state of the goods inside the container to provide a feasible inspection sequence. In container cargo inspection, goods are distributed within the container in a stacked or piled-up manner. Goods in different locations have clear obstruction and being obstructed relationships. To verify goods in deeper, obstructed positions, the outer and upper layers of obstructing goods must be moved first. This is a physical constraint that must be followed in container unpacking operations. Ignoring this constraint and randomly arranging the inspection sequence based on abnormal locations easily leads to repeated moving and ineffective operations, significantly lengthening the inspection time. Therefore, it is necessary to rationally plan the inspection sequence and operation route based on the actual stacking state of the goods inside the container, with the goal of minimizing operational costs.

[0054] First, based on the measured geometric voxel model of the container, the stacking and occlusion relationships of the goods and their front-to-back placement order are analyzed to construct a cargo spatial topological dependency graph. This graph marks the list of goods that must be moved before verification for each item, clarifying the physical constraints of the unpacking operation. The measured geometric voxel model of the container is obtained through visual acquisition and 3D reconstruction before sealing, accurately recording the 3D shape, spatial coordinates, orientation, and positional relationships of each item within the container. The cargo spatial topological dependency graph is a topological network constructed with individual goods as nodes and the occlusion and support relationships between goods as directed edges. The direction of the directed edges represents the dependency order of the operations. For example, if there is a directed edge from goods A to goods B, it means that goods A must be moved before verifying goods B; goods A are the prerequisite goods for goods B. By traversing this topological graph, the system can generate a corresponding list of goods to be moved for each item, completely listing all goods that must be moved before verifying that item. The core significance of constructing this topology dependency graph lies in transforming the physical stacking rules of goods in the container into constraints that can be recognized and calculated by the algorithm, ensuring that the subsequently generated inspection paths fully conform to the physical reality of on-site operations, and that there are no solutions that violate stacking logic or cannot be implemented.

[0055] Then, for the target goods corresponding to each abnormal area, the total quantity and weight of goods requiring pre-processing for verification are statistically analyzed. A weighted quantitative calculation is then performed to obtain the relocation cost of that abnormal location, transforming physical operation costs into quantifiable numerical indicators. Specifically, spatial matching is performed between the spatial coordinates of the abnormal area and the cargo coordinates in the measured container geometry model to locate the target goods corresponding to each abnormal area, clarifying the specific objects requiring verification. Based on the generated pre-processing goods list, the total number of pieces and total weight of pre-processing goods corresponding to each target goods are statistically analyzed. During goods relocation, the quantity directly affects the number of operations and the time consumed, while the weight determines the required equipment specifications and manpower input. The system uses preset weighting coefficients to perform weighted calculations on the quantity and weight dimensions to obtain the comprehensive relocation cost of each abnormal location. A higher cost indicates a higher operational cost for verifying that location; conversely, a lower cost indicates a lower cost.

[0056] Finally, with the optimization objective of minimizing the total relocation cost of all abnormal locations, an improved A method was adopted. The algorithm iterates through the system to find the optimal inspection order and transfer route, generating an initial inspection path to minimize redundant transfers and invalid operations. Traditional A* algorithms are mostly used for path planning in two-dimensional planes. In this embodiment, the transfer cost in a three-dimensional stacked scenario is incorporated into the cost function. Simultaneously, node expansion rules are designed based on cargo topology dependencies to ensure the search process always follows physical operation logic. During the solution process, the algorithm traverses all possible combinations of inspection orders, combining the transfer cost of each point with the connection cost between points to calculate the total transfer cost for each combination, ultimately selecting the solution with the minimum total cost as the optimal solution. The generated initial inspection path not only includes the verification order of abnormal points but also synchronously includes a list of pre-transferable goods and operation instructions for each point, directly guiding on-site personnel to perform unpacking and verification in sequence. An improved A* algorithm is adopted. The algorithm performs global optimization and can find the path with the lowest operating cost from a large number of feasible solutions while satisfying all physical constraints. This effectively avoids problems such as unreasonable order and repeated movement that are easy to occur when planning manually. For example, it can first check the abnormal points in the outer layer that do not need to be moved, and then gradually move to the deeper layers to minimize the repeated movement of goods.

[0057] As one implementation method, dynamic replanning generates real-time verification paths, including: The inspection work is carried out sequentially according to the initial inspection path. After the physical verification of each inspection point is completed, the measured material, internal structure and actual spatial location data of the goods at that point are immediately collected and sent back to the drawing review unit as incremental true value data. Based on the returned incremental true data, the probability of anomalies in the remaining uninspected areas is re-estimated, points that have been confirmed to be without anomalies are removed, and high-risk points newly discovered during the verification process are added to update the distribution of anomalies across the entire region, thereby narrowing the scope of subsequent inspection operations. A rolling time-domain optimization algorithm is adopted to minimize the cumulative relocation cost of the remaining uninspected locations. The optimal inspection sequence and operation route of the remaining locations are re-solved to generate real-time inspection paths. Changes in inspection workload are pushed to the resource scheduling unit simultaneously to dynamically adjust the allocation of handling equipment and inspection personnel.

[0058] In actual inspection operations, the initial inspection path is generated based on the anomaly prediction results from the drawing review stage, and its planning is based on the anomaly points and risk levels identified during the machine inspection stage. However, the on-site unpacking and verification process is essentially a verification process of the drawing review prediction results. After physical verification, the predicted anomaly points may be confirmed to have violations or may be proven to be misjudgments. At the same time, new suspected anomalies that were not identified during the machine inspection stage may also be discovered during the verification process. If the initial path is always followed, a large amount of invalid work will occur. For example, points that have been confirmed to be without anomalies still need to be arrived at for verification as planned, wasting relocation and labor costs; newly discovered high-risk points cannot be included in the inspection sequence in a timely manner, resulting in a chaotic work process. Therefore, introducing a dynamic replanning mechanism during the inspection execution process, adjusting subsequent work plans in real time based on actual measurement results, can better fit the actual on-site operations and improve inspection efficiency.

[0059] In the above steps, the inspection work is first carried out sequentially according to the initial inspection path. Upon completion of the physical verification of each inspection point, the measured material, internal structure, and actual spatial location data of the goods at that point are immediately collected and sent back to the drawing review unit as incremental truth data. The initial inspection path is the optimal operational plan and serves as the baseline execution route when on-site inspections begin, ensuring clear and orderly operational guidance at the initial stage. During the verification process at each point, on-site inspection personnel obtain data on the actual material properties, internal structural details, actual placement position, and orientation of the goods at that point through portable testing equipment and visual verification, thus serving as incremental truth data. Unlike the indirect detection data and prior estimate data in the machine inspection stage, incremental truth data allows the latest measured results to be applied to subsequent operational planning immediately, eliminating confirmed non-abnormal points as early as possible, adjusting the pace of subsequent operations in advance, and avoiding the accumulation of ineffective work.

[0060] Then, based on the returned incremental truth data, the anomaly probability of the remaining uninspected areas is recalculated, points confirmed to be without anomalies are removed, and newly discovered high-risk points are added during the verification process to update the overall anomaly distribution and narrow the scope of subsequent inspections. When the measured data of a certain point is returned, the system can not only confirm whether the point itself is abnormal, but also combine the spatial topological relationships of the measured packing geometry model to perform linked correction of the anomaly probability of adjacent, same batch, and same type of goods. If the verification confirms that the material and structure of a certain item are consistent with the declaration and there are no anomalies, the anomaly probability of closely adjacent and stacked goods in the same batch will also be reduced accordingly, and those that meet the conditions can be directly removed from the list of items to be inspected. Conversely, if problems such as discrepancies between the declaration and the actual contents or the inclusion of accessories are found during the verification process that were not identified in the initial drawing review, the newly added abnormal areas are included in the list of items to be inspected and marked with the corresponding risk level. The core value of updating the global anomaly distribution is to ensure that the set of targets to be inspected always remains consistent with the current known real situation. By using verified true data, the scope of subsequent inspections can be narrowed, avoiding repeated operations on areas that have been confirmed to be risk-free. At the same time, it will not miss newly discovered risk points on site, thus ensuring that subsequent path planning always targets the points that truly need to be inspected, thereby improving the targeting of operations from the target level.

[0061] Finally, a rolling time-domain optimization algorithm is employed. With the objective of minimizing the cumulative relocation cost of the remaining uninspected locations, the optimal inspection sequence and work route for the remaining locations are recalculated, generating a real-time inspection path. Simultaneously, changes in inspection workload are pushed to the resource scheduling unit, dynamically adjusting the allocation of handling equipment and inspection personnel. Rolling time-domain optimization is a dynamic optimization method that does not pursue a globally optimal solution for the entire process in one go. Instead, at each decision point, based on the latest system state, it optimizes the work only for a future time domain. The state is updated and the solution is recalculated after each step, thus adapting to dynamic changes in the system state. Unlike one-time global planning based on fixed abnormal locations, rolling time-domain optimization can adapt to scenarios where abnormal locations are dynamically added or removed. After verifying each location and updating the abnormal distribution, the relocation cost and optimal sequence for the remaining uninspected locations can be recalculated immediately, ensuring that each subsequent work segment is the optimal solution under the current state. The real-time inspection path generated after replanning is simultaneously updated with the relocated goods list and work sequence, directly pushed to the on-site operation terminal to guide subsequent operations. At the same time, the system will dynamically adjust the number of supporting handling equipment and inspection personnel based on the changes in the number of locations to be inspected and the total relocation workload: if a large number of abnormal locations are eliminated and the workload is greatly reduced, some redundant resources will be released to support other inspection tasks; if a large number of high-risk locations are added and the workload increases, reinforcement resources will be dispatched in a timely manner to avoid operational congestion. Through this step, the changes in the distribution of abnormalities can be transformed into an executable operation plan and resource allocation.

[0062] As one implementation method, generating a packing optimization model and a drawing review model includes: After each batch of goods completes the entire customs clearance process, the actual customs clearance time, abnormal verification results, inspection resource consumption, and real-time port load data of that batch of goods are collected to form a closed-loop optimization sample set. The abnormal verification results are used as incremental training samples. A time-decay weighting mechanism is used to give higher training weights to recent samples. Incremental fine-tuning is performed on the image review model so that the model can continuously learn the latest cargo features and abnormal patterns. By combining the correlation between port-wide load data and corresponding clearance times, the multi-objective weight coefficients for container loading optimization are iteratively optimized, and the optimization priorities of machine inspection risk and space utilization are dynamically balanced to form a self-evolving checkpoint control model that can adapt to the port's operational status.

[0063] In this embodiment, the front-end prior construction, machine inspection registration, anomaly identification, and inspection scheduling together constitute the execution chain for a single cargo clearance, enabling intelligent inspection and handling of a single batch of goods. However, if it only stays at the single execution level, the system's recognition accuracy and scheduling strategy will always remain at the initial setting level, unable to automatically adapt to changes in port cargo categories, anomaly pattern updates, and business volume fluctuations. Due to the limited initial training samples of the image review model, the recognition accuracy will gradually decrease and the false judgment rate will increase when facing constantly emerging new cargo categories and new concealed violation methods. Furthermore, if the target weight of container optimization remains fixed, it cannot match the load fluctuations of the port at different times. During peak hours, congestion is easily caused by excessive container openings, while during off-peak hours, container space is wasted due to an excessive pursuit of low risk. Therefore, by using a closed-loop feedback and iterative optimization mechanism to continuously correct the model and strategy with real operating data, the autonomous evolution capability of checkpoint control can be improved.

[0064] The above steps first involve collecting data on the actual clearance time, anomaly verification results, inspection resource consumption, and real-time port load data for each batch of goods after the entire customs clearance process is completed, forming a closed-loop optimization sample set. The actual clearance time refers to the time taken from the goods entering the machine inspection channel to completion of inspection and release, directly reflecting the rationality of the current inspection strategy and resource allocation. Anomaly verification results are derived from the final measured conclusions returned during the inspection execution phase, comprehensively recording which anomalies predicted during the drawing review were genuine violations, which were misjudgments, and which were unpredicted anomalies discovered during the verification process. Inspection resource consumption includes the man-hours of handling equipment, inspection personnel, and inspection station duration occupied by the batch of goods, reflecting the physical cost of the inspection for that batch. Real-time port load data records the overall operational status during the clearance period for that batch, including the machine inspection channel load rate, inspection station saturation, and backlog of goods awaiting inspection, used for correlation analysis of factors affecting clearance efficiency under different load scenarios. Integrating these multi-dimensional data into a standardized closed-loop optimization sample set essentially transforms the entire process execution results of a single level-clearing operation into structured data that can be used for model training and strategy optimization.

[0065] Then, the anomaly verification results are used as incremental training samples. A time-decay weighting mechanism is employed to assign higher training weights to recent samples, performing incremental fine-tuning on the image review model. This allows the model to continuously learn the latest cargo characteristics and anomaly patterns. The initial image review model is trained based on historical samples. Using incremental fine-tuning instead of full retraining allows for small parameter updates to the model based on continuously operating port operations and incorporating newly added verification samples. This approach quickly incorporates the latest cargo characteristics and anomaly patterns while retaining the model's original recognition capabilities, preventing significant performance fluctuations. The time-decay weighting mechanism is designed to adapt to the dynamic changes in business operations. Samples more recent than the current time better reflect current cargo characteristics and regulatory risks, thus having higher reference value and are assigned higher training weights. Conversely, older samples have lower correlation with the current business status and weaker reference value, so their weights are gradually reduced to prevent outdated data from misleading the model. Through this weighted incremental learning, the image review model can continuously accumulate experience from real inspection results, constantly correct misjudgments, and supplement its understanding of new anomalies. Its anomaly recognition accuracy and recall rate will continue to improve over time, thereby reducing invalid inspections caused by misjudgments and helping to reduce the overall inspection workload.

[0066] Finally, by combining the correlation between port-wide load data and corresponding clearance times, the multi-objective weighting coefficients for container loading optimization are iteratively optimized. This dynamically balances the optimization priorities of machine inspection risk and space utilization, forming a self-evolving checkpoint control model that can adapt to the port's operational status. The container loading optimization process needs to reduce the probability of machine inspection anomalies, decrease the need for container opening and inspection, corresponding to clearance efficiency, and improve container space utilization to reduce logistics loading costs. If the pursuit of low anomaly risk is excessive, a dispersed and orderly container layout is required, which will correspondingly reduce space utilization. Conversely, if the pursuit of space utilization is excessive, dense stacking and complex structures of goods will increase the machine inspection misjudgment rate and anomaly rate, increasing the risk of clearance congestion. Fixed weighting coefficients cannot adapt to the dynamically changing load status of the port: during peak business periods and when inspection resources are saturated, reducing the anomaly rate and ensuring smooth clearance takes higher priority; during off-peak business periods and when inspection resources are abundant, improving space utilization and reducing logistics costs takes higher priority. The system analyzes the actual clearance time corresponding to different weight combinations under different load scenarios in historical samples, continuously iterates and corrects the weight coefficients, and finds the optimal weight ratio that minimizes the average clearance time across the entire area under each load scenario. This allows the container loading optimization strategy to automatically adapt to the real-time operating status of the port, thereby improving the inspection efficiency at the single container level to the clearance efficiency optimization across the entire port area.

[0067] This application also includes a level control device, comprising: an image acquisition part and a level control part, for implementing a level control method.

[0068] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.

[0069] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A checkpoint control method, characterized in that, The method includes: The visible light image and depth point cloud of the cargo inside the box are acquired. The measured geometric voxel model of the box is obtained through 3D reconstruction and voxelization. The density attribute is mapped to the voxel unit corresponding to the measured geometric voxel model of the box, and the actual photographic prior voxel density field is generated by combining the material density and internal structure distribution parameters of the cargo. Projection data of goods inside the container is collected to generate a measured voxel density field. The prior voxel density field of the actual photograph is spatially rigidly registered with the measured voxel density field in order to calculate and obtain the global density deviation matrix. Based on the global density deviation matrix, cargo areas with density deviations greater than a preset threshold are selected as low-confidence areas. Based on the spatial topological constraints of the measured container geometry voxel model, correction parameters are propagated to the surrounding low-confidence areas to automatically correct the position, orientation, and stacking offset of cargo in the actual photographed prior voxel density field, resulting in a corrected prior density field. Based on the deviation of the remaining density between the corrected prior density field and the measured voxel density field, the spatial coordinates and risk level of the abnormal area are obtained. Combining the spatial topological relationship of the measured container geometry voxel model with the spatial coordinates of the abnormal area, an initial inspection path is generated with the goal of minimizing the relocation cost. The goods are measured and verified based on the initial inspection path, and the corresponding measured attribute data is obtained as incremental truth values ​​to update the abnormal probability distribution of the remaining uninspected areas. Real-time inspection paths are generated by combining the rolling time-domain optimization algorithm and the dynamic replanning of the abnormal probability distribution. By combining real-time inspection paths, the multi-objective weight coefficients of the packing optimization model are dynamically adjusted based on the operational data of the machine inspection channel load rate, inspection station saturation, and backlog of goods to be inspected across the entire checkpoint. With the shortest average clearance time for goods as the global optimization objective, a packing optimization model and a drawing review model are generated. The drawing review model is used to identify cargo characteristics and abnormal patterns to achieve efficient customs clearance control for goods.

2. The checkpoint control method according to claim 1, characterized in that, The generation of the live-shot prior voxel density field includes: Receive cargo declaration information and measured packing geometry model, search the preset commodity material database, match the equivalent density parameter and internal structural density distribution parameter corresponding to each cargo, and obtain the data source for density attribute mapping; Based on the spatial coordinate range of each item in the measured container geometric voxel model, the matched density parameters are assigned to the corresponding geometric voxel units one by one, so that the density attribute corresponds one-to-one with the geometric position of the item. In the geometric voxel model, void voxel units other than cargo are uniformly assigned the standard air density to form a real-world prior voxel density field that is continuous across the entire domain and covers the entire internal space of the container. This provides a complete benchmark for subsequent alignment calculations with the measured density field.

3. The checkpoint control method according to claim 2, characterized in that, The step of performing spatial rigid registration between the photographed prior voxel density field and the measured voxel density field includes: The overall outer contour features of the cargo are extracted from the prior voxel density field of the actual photograph and the measured voxel density field respectively. The initial coarse registration is completed with the goal of maximizing the overlap of the contours, so as to achieve the initial alignment of the spatial positions of the two density fields and narrow the search range for subsequent fine registration. Based on the initial alignment, high-density feature points with density values ​​higher than a preset threshold are selected as matching anchor points. The iterative nearest point algorithm is used to perform multiple rounds of iterative optimization to complete high-precision spatial registration. The final spatial transformation matrix is ​​output, which transforms the prior voxel density field of the actual image to the coordinate system of the measured voxel density field, providing a unified spatial reference for subsequent density deviation calculation.

4. The checkpoint control method according to claim 3, characterized in that, The automatically corrected prior voxel density field includes: Based on the global density deviation matrix, cargo areas with density deviations less than a preset tolerance threshold are selected as high-confidence benchmark areas, and the measured density and spatial location of these areas are used as the true value benchmarks for correction. Based on the adjacent contact relationship and stacking level of the cargo in the measured container geometry model, a cargo adjacency topology map is constructed, and multiple low-confidence areas to be corrected are divided from near to far according to the adjacency level with the reference area. Starting from the high-confidence benchmark area, the position and orientation correction parameters are propagated layer by layer along the adjacent topology map to the surrounding low-confidence areas. The correction process maintains the topological connection relationship and relative stacking order between goods, and finally obtains the corrected prior density field, eliminating spurious biases caused by packing displacement and orientation deviation.

5. The checkpoint control method according to claim 4, characterized in that, The acquisition of the spatial coordinates and risk level of the abnormal area includes: The residual density deviation between the corrected a priori density field and the measured voxel density field is calculated. Voxels with deviation amplitudes exceeding the allowable range of material tolerances are subjected to threshold segmentation to extract the abnormal voxel set. Perform three-dimensional connected component clustering analysis on the set of anomalous voxels to divide spatially adjacent anomalous voxels into independent anomalous regions, extract the minimum bounding cube spatial coordinates and volume parameters of each anomalous region, and aggregate the scattered voxels into localizable physical anomalous objects. Based on the remaining deviation amplitude, spatial volume, and regulatory sensitivity of the location of each abnormal area, a preset risk classification rule is matched to determine the risk level corresponding to each abnormal area, providing a decision-making basis for subsequent inspection priority ranking.

6. The checkpoint control method according to claim 5, characterized in that, The generation of the initial verification path includes: Based on the measured geometric voxel model of the packing, the stacking and occlusion relationships of the goods and the front and back placement order are sorted out, a spatial topological dependency graph of the goods is constructed, the list of goods to be moved before each goods is marked, and the physical constraints of the unpacking operation are clarified. For each abnormal area, the total quantity and weight of goods that need to be moved in advance are statistically verified, and the relocation cost of the abnormal point is calculated by weighted quantification, thus converting the physical operation cost into a quantifiable numerical indicator. With the goal of minimizing the total relocation cost of all abnormal points, an improved A* algorithm is used to traverse and solve for the optimal inspection order and relocation route, generating an initial inspection path to minimize duplicate relocations and invalid operations.

7. The checkpoint control method according to claim 6, characterized in that, The dynamic replanning to generate real-time verification paths includes: The inspection work is carried out sequentially according to the initial inspection path. After the physical verification of each inspection point is completed, the measured material, internal structure and actual spatial location data of the goods at that point are immediately collected and sent back to the drawing review unit as incremental true value data. Based on the returned incremental true data, the probability of anomalies in the remaining uninspected areas is re-estimated, points that have been confirmed to be without anomalies are removed, and high-risk points newly discovered during the verification process are added to update the distribution of anomalies across the entire region, thereby narrowing the scope of subsequent inspection operations. A rolling time-domain optimization algorithm is adopted to minimize the cumulative relocation cost of the remaining uninspected locations. The optimal inspection sequence and operation route of the remaining locations are re-solved to generate real-time inspection paths. Changes in inspection workload are pushed to the resource scheduling unit simultaneously to dynamically adjust the allocation of handling equipment and inspection personnel.

8. The checkpoint control method according to claim 7, characterized in that, The generated packing optimization model and drawing review model include: After each batch of goods completes the entire customs clearance process, the actual customs clearance time, abnormal verification results, inspection resource consumption, and real-time port load data of that batch of goods are collected to form a closed-loop optimization sample set. The abnormal verification results are used as incremental training samples. A time-decay weighting mechanism is used to give higher training weights to recent samples. Incremental fine-tuning is performed on the image review model so that the model can continuously learn the latest cargo features and abnormal patterns. By combining the correlation between port-wide load data and corresponding clearance time, the multi-objective weight coefficients of the container loading optimization model are iteratively optimized, and the optimization priorities of machine inspection risk and space utilization are dynamically balanced to form a self-evolving checkpoint control model that can adapt to the port's operating status.

9. A checkpoint control device, characterized in that, include: The image acquisition section and the level control section are used to execute the level control method according to any one of claims 1 to 8.

10. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored on the memory, wherein the processor is configured to run the computer program to perform the gate control method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Encasement path planning method and system based on deep learning

    CN120645233A

  • Empty container detection method and system based on multi-modal fusion

    CN121482501A