Container stowage method based on geographical barycenter clustering and multiple constraint self-adaption
By adopting a container loading method based on geographic centroid clustering and multiple constraints, the problems of low container loading efficiency and high cost under complex logistics constraints are solved, achieving efficient utilization of space and load-bearing resources and reducing logistics costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2026-05-19
- Publication Date
- 2026-07-21
AI Technical Summary
Existing container loading technologies struggle to improve space utilization under complex multi-constraint conditions, resulting in high logistics costs. Furthermore, existing algorithms are unable to optimize costs while ensuring cargo transport attributes and physical loading constraints.
A container loading method based on geographic centroid clustering and multi-constraint adaptive approach is adopted. By encapsulating strongly related goods into indivisible components, and combining multi-dimensional business attribute isolation, geographic gravity circle clustering, multi-level constraint relaxation, and dynamic adaptive filling strategy, the container loading process is optimized.
While meeting the requirements of cargo transportation and special regulatory attributes, we can improve the utilization efficiency of container space and load-bearing resources, reduce cross-regional pickup and reversing costs, and enhance the feasibility and economy of the overall loading scheme.
Smart Images

Figure CN122222538B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent logistics and supply chain management, specifically to a method for intelligent container loading based on geographic clustering and multi-dimensional attribute constraints to optimize logistics costs. Background Technology
[0002] With the development of global trade integration and cross-border logistics, container shipping, as a core link in the international logistics supply chain, directly impacts the operating costs and delivery times of logistics companies. Meanwhile, companies often need to configure container loading and transportation solutions for large quantities of heterogeneous goods while meeting multiple constraints, especially in Amazon cross-border logistics. The goods to be loaded typically exhibit characteristics such as geographically dispersed origins, complex attribute constraints (e.g., distinguishing between fast and slow vessels, standard and bulky items, and whether commodity inspection is required), and fragmented orders. How to improve container space utilization and reduce end-to-end logistics costs while meeting these multiple rigid separation constraints is a key issue that urgently needs to be addressed in the current logistics technology field.
[0003] To address these complex loading challenges, the industry has been exploring solutions that balance load factor, operational efficiency, and economic costs. Looking back at the development of container loading technology, solutions to these problems have primarily evolved from manual, experience-based decision-making to digital and intelligent algorithms. Currently, although various technologies are being explored, in practical industrial applications, mainstream technologies mainly focus on the following three aspects, each with its own insurmountable technical limitations: 1. The traditional model based on human experience. This approach essentially relies on individual tacit knowledge and lacks standardization and replicability. When faced with thousands of goods and complex channel isolation rules, human decision-making is prone to omissions or misjudgments, making it difficult to guarantee reproducibility and consistency. Furthermore, it is difficult for humans to dynamically balance the back-end ocean freight costs with the front-end multi-point collection (reversing) costs in a short period of time, often neglecting the rationality of the logistics route in order to fill containers, resulting in persistently high logistics costs.
[0004] 2. Accurate algorithms based on solvers. As the quantity of goods increases, the computation time of solvers grows exponentially, often requiring hours or even days to produce results. This cannot meet the timeliness requirements of real-time response in modern logistics operations. Furthermore, loading constraints are often frequently adjusted with changes in business operations, leading to higher modeling and maintenance costs and limiting practical applications.
[0005] 3. Single-rule heuristic greedy algorithms. While these algorithms are faster, they often have significant drawbacks when handling complex scenarios with multiple constraints. First, under multiple constraints, a single greedy strategy often prioritizes loading goods with high volume or weight fit. This short-sighted decision can easily occupy critical capacity or create irregular space fragments within the container, leaving no room for subsequent unloaded goods with stronger constraints or for lower-cost goods, resulting in unnecessary cost increases. Second, existing greedy algorithms typically only focus on filling the space inside the container, completely ignoring the geographical location of the goods' origin. The algorithm may force goods geographically distant into the same container, leading to high cross-regional trucking and reversing costs during the pickup phase. The actual logistics loading process is often a dynamic game, requiring the satisfaction of strong constraints (such as attribute incompatibility, transportation mode isolation, and size / type separation) before optimizing cost-related factors within the remaining space. However, a single greedy algorithm usually relies on a globally uniform ranking index and cannot adopt differentiated strategies for different objectives at different stages of loading, making it difficult to achieve a dynamic trade-off between satisfying hard constraints and optimizing cost indicators. Summary of the Invention
[0006] The present invention provides a container loading method based on geographic centroid clustering and multiple constraints that can solve the problems of traditional container loading algorithms being unable to handle complex business attributes and the high overall cost caused by local optima of single container cost. It can solve at least one of the above-mentioned technical problems.
[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: A container stowage method based on geographic centroid clustering and multi-constraint adaptive stowage includes the following steps: S1. Obtain the original dataset of the goods to be loaded and clean the data to obtain the goods data pool. Based on the preset hard binding constraints, the goods in the goods data pool are forcibly grouped. For each group, an indivisible component is generated, and the volume, weight and special attributes of the component are aggregated and physical feasibility is verified. S2. Establish mutually isolated loading queues based on the logistics timeliness attributes, physical specification attributes, and special attribute mutual exclusion rules of the original cargo. S3. For each loading queue, calculate the minimum number of containers required based on the maximum effective loading volume and maximum allowable load of the containers, and initialize the corresponding digital container instances for the minimum number of containers required. S4. In each loading queue, the components are divided into mutually exclusive special attribute components, ordinary components, and residual components. Hierarchical progressive loading is performed on each component, and they are dynamically allocated to digital container instances. S5. During the loading process, a dynamic adaptive filling strategy is enabled for the target container. Based on the scarcity of the remaining volume and remaining load of the target container, the scoring model is dynamically switched to iteratively select the components to be loaded until the target container resources are exhausted or there are no components to be loaded. S6. Output the component loading list corresponding to each digital container instance.
[0008] Furthermore, in S1, data cleaning of the original dataset includes: removing invalid records with volume or weight less than or equal to zero or missing, and standardizing and mapping the length, width, height, weight and logistics attribute fields to form the cargo data pool.
[0009] Furthermore, in S1, the aggregation of volume, weight, and special attributes of the original parts, as well as the physical feasibility verification, includes: When generating a meta-item for a set of original goods in the same group, the total volume of the meta-item is the sum of the volumes of the original goods in the set, the total weight of the meta-item is the sum of the weights of the original goods in the set, and for a preset set of restricted special attributes, each special attribute state of the meta-item is the result of a logical OR operation of the corresponding special attribute state in the set. The physical feasibility check involves determining whether the total volume of the component is not greater than the maximum effective loading volume of a single container, and whether the total weight of the component is not greater than the maximum allowable load of a single container. If either condition is not met, the component is intercepted from entering the loading queue, and an exception handling process is triggered.
[0010] Furthermore, in S2, establishing mutually isolated loading queues includes: Based on logistics timeliness and physical specifications, raw cargo is grouped and classified, and independent loading queues are established for different groupings. Calculate the total volume of each loading queue and determine the processing priority of the loading queues in descending order of total volume.
[0011] Furthermore, in S3, the expression for calculating the minimum required number of containers N is:
[0012] in, The total volume of goods in the loading queue. The total weight of the goods in the loading queue. The maximum effective loading volume specified for a single container. The maximum permissible load specified for a single container. This is the floor function.
[0013] Furthermore, in S4, the layered progressive loading includes: Prioritize loading of mutually exclusive components with special attributes, and then select the target container after hierarchical clustering by shipping city and warehouse under the same attribute; For ordinary raw cargo, a virtual gravity circle is constructed based on the geographical distance between the shipping cities, and the cargo is loaded according to the priority order of the core nodes; Multi-level relaxation of geographical constraints is applied to the remaining residual components, and container selection is performed among candidate containers based on the distance between the shipment location and the geographical center of gravity of the container, as well as the penalty for split loading.
[0014] Furthermore, prioritizing the loading of mutually exclusive components with special attributes includes: Identify the special attribute categories involved in the loading queue, and construct the attribute processing sequence in descending order of the total volume of the original cargo corresponding to each special attribute category; For any specific attribute category, the sub-shipments under that category are grouped by shipping city and sorted in descending order by the total volume of each city. Then, within the same city group, they are grouped by shipping warehouse and sorted in descending order by the total volume of each shipping warehouse, so as to form a batch of goods with the same attribute, the same city, and the same shipping warehouse, and loaded in sequence. Specifically, when selecting a target container among candidate containers for any batch of goods, a priority score for the current container must be calculated: For the current batch of goods pending processing Iterate through the candidate containers in the resource pool. And calculate the comprehensive matching score vector for each container. ,choose The smallest container is the optimal solution, and the vector is the optimal solution. Each component in and The definition of is:
[0015]
[0016] in, This represents the remaining space within the current container volume. This represents the total volume of the goods currently awaiting processing. It is a constant; If the current container can completely hold the current batch of goods. No need to split the loading process. If the value equals the remaining space, the container with the smallest remaining space will be chosen. Minimize to reduce wasted space; If the current container cannot completely hold the current batch of goods. It needs to be split and loaded. The value is equal to a constant. Subtracting the remaining space, the container with the largest remaining space is preferred. Minimize the number of splits.
[0017] Furthermore, constructing a virtual gravitational field for ordinary raw cargo based on the geographical distance between shipping cities includes: The total volume of ordinary components corresponding to each shipping city is calculated, and the shipping city with the largest total volume is identified as the core node of the gravitational circle. Based on the Haversine formula, the spherical distance d between other shipping cities and the core node is calculated. When d is not greater than the preset adsorption radius R, and if a shipping city is not included in the mandatory independent list, the shipping city is adsorbed to the gravitational circle and a virtual mapping relationship between the city and the gravitational circle is established. Gravitations are processed in descending order of their total volume, and within the same gravitational sphere, they are loaded in order of priority for core nodes.
[0018] Furthermore, the multi-level relaxation of geographical constraints on the remaining residual shipments includes traversing at least four constraint levels in sequence: Level 1 strict matching within the same city and warehouse, Level 2 allowing loading into containers that already contain the target city, Level 3 allowing loading into containers with adjacent geographical centers, and Level 4 removing geographical restrictions. Wherein, the geographical centroid is the centroid coordinate obtained by weighting the latitude and longitude of the shipping location of the loaded components in the candidate container according to their volume, and the distance between the candidate container and the batch of goods to be loaded is the Haversine spherical distance between the shipping location of the batch of goods and the centroid coordinate. At Level 3, calculate the effective load-bearing capacity of the cargo batch to be loaded for any candidate container. and in When the load is less than a preset threshold θ, a blocking penalty term is applied to reduce the loading priority of the candidate container, thus lowering the effective load capacity. The calculation expression is:
[0019] in, Volumetric capacity ratio, characterizing the proportion of the container's remaining space that can accommodate the current cargo. This refers to the weight load-bearing capacity.
[0020] Furthermore, for all containers in the "not fully loaded" state and all "unallocated" remaining goods, a greedy filling algorithm is executed: the unallocated components are sorted in descending order of volume, and for the current component after sorting, the feasible container with the largest remaining available volume is selected as the loading target from the set of feasible containers that meet the requirements of consistent loading queue classification, no conflict of special attributes, and both remaining available volume and remaining available load capacity.
[0021] Furthermore, in step S5, the dynamic adaptive filling strategy includes: Calculate the volume utilization rate of the target container. and load utilization rate And calculate the scarcity difference in resource utilization of the target container. Based on scarcity differences With dynamic threshold Determining whether the target container is in a state of weight deficiency, volume deficiency, or equilibrium, whereby a dynamic threshold is used. Based on the preset basic adjustment coefficient With the target container's current maximum utilization Confirmed, satisfied ; Different comprehensive scoring functions are used for candidate components under different conditions, and loading is carried out iteratively based on the scores. The comprehensive scoring function takes into account at least the following factors: the contribution of candidate components to the utilization of non-scarce resources, the fit between the density of candidate components and the target container loading strategy, and the degree of retention of scarce resources by candidate components.
[0022] Furthermore, it also includes: after all the goods to be loaded are loaded, performing full-link cost accounting on each digital container instance, and selecting the logistics execution route combination with the lowest global cost. This selection includes building a decided cargo volume pool and an undecided cargo volume pool. For the target container to be decided, the current cargo volume C of the corresponding warehouse of the target container is deducted from the undecided cargo volume pool, and the historical decided cargo volume H and future undecided cargo volume F are obtained. The virtual total quantity Q=H+C+F used to match the tiered rate price table is calculated, and the unit price is queried accordingly. The total cost of different combinations of loading points and transportation modes is calculated, the combination with the lowest total cost is selected, and a unique logistics tracking code corresponding to the selected combination is generated.
[0023] The beneficial effects of this invention are reflected in: 1. By encapsulating strongly related goods into indivisible components and combining multi-dimensional business attribute isolation, geographical gravity circle clustering, multi-level constraint relaxation, and dynamic adaptive filling strategies, intelligent container loading under complex logistics constraints is achieved.
[0024] 2. Compared with traditional manual loading, precise solver methods and single-rule greedy algorithms, this invention can improve the utilization efficiency of container space and load-bearing resources and reduce cross-regional pickup and reversing costs caused by the geographical dispersion of goods, while ensuring that the cargo transportation attributes, special regulatory attributes and physical loading constraints are all satisfied.
[0025] 3. This invention further incorporates a logistics cost decision-making mechanism based on forward-looking cargo volume to select the most cost-effective combination of container loading points, departure ports, and transportation modes for the generated container loading results, thereby improving the feasibility, stability, and economy of the overall loading plan. Attached Figure Description
[0026] The accompanying drawings, which are provided to further illustrate this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application.
[0027] Figure 1 This is a schematic diagram of the overall process of the method according to an embodiment of the present invention.
[0028] Figure 2 This is a schematic diagram of the dynamic adaptive filling strategy process according to an embodiment of the present invention. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] It should be noted that the meaning of "and / or" throughout the text includes three parallel solutions. Taking "A and / or B" as an example, it includes solution A, solution B, or a solution that simultaneously satisfies A and B. Furthermore, "multiple" refers to two or more. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0031] See Figure 1 This invention provides a container stowage method based on geographic centroid clustering and multi-constraint adaptive stowage, comprising the following steps: S1. Obtain the original data of the goods to be loaded, identify the set of goods that must be transported in the same physical space based on the preset hard constraint rules, and logically encapsulate them into indivisible "original goods". During the encapsulation process, perform physical feasibility pre-verification simultaneously to ensure that each generated transportation unit has the feasibility of physical loading. S2. Perform multi-dimensional feature extraction and classification on the original parts generated in S1, and establish mutually isolated loading queues according to preset mutual exclusion rules. S3. For each isolated loading queue generated in S2, perform precise transportation resource planning. Based on the multi-dimensional resource constraint model, perform quantitative analysis on the total physical quantity of each isolation pool, calculate the minimum number of transportation units in combination with the container's preset safety threshold, and initialize the corresponding number of digital container instances in memory accordingly to build an initial solution space for subsequent loading algorithms. S4. Traverse the goods in each isolation pool generated in S2, and use the set of digital container instances initialized in S3 as the target resource pool. For each loading queue, adopt a hierarchical progressive optimization strategy to dynamically allocate the original goods to the corresponding container instances. S5. This step, as the core execution logic of the loading algorithm, is called in real time by the filtering strategies of each stage in S4 to complete the final loading determination. S6. After all the packing is completed, solve the logistics execution plan with the lowest global cost. Through detailed accounting of the entire link cost and comparison of multiple targets, lock in the optimal route combination and generate a unique logistics tracking code for each container.
[0032] It should be noted that, in this invention, the "special attribute" refers to a business attribute, regulatory attribute, or compliance attribute that has a hard impact on whether goods can be loaded into the same transport container as other goods. This type of attribute differs from physical attributes such as volume and weight, and also from ordinary classification attributes such as transport timeliness and cargo specifications. It is mainly used to express the prohibition, isolation, or special container requirements that goods must comply with during loading. A special attribute configuration table is pre-set, which includes at least one special attribute field, the value rules for each special attribute field, the corresponding mutual exclusion relationships, and the loading priority. In one embodiment, the special attribute includes, for example, whether CPC certification is required, whether FDA testing is required, or whether it is an anti-dumping commodity. For special attributes configured as mutually exclusive, it is prohibited for components with different mutually exclusive special attributes to be loaded into the same transport container. The field names, number of attributes, value rules, and mutual exclusion relationships of the above-mentioned special attributes can be configured according to different logistics business scenarios, and are not limited to the specific attribute types listed in this embodiment.
[0033] S1 further includes: S1.1 Receive the original dataset of goods to be packed. The original dataset contains multiple goods records, each corresponding to a minimum physical packaging unit. Then, clean the original dataset, remove invalid records with abnormal volume or weight values (such as less than or equal to zero or missing), and standardize and map key fields (such as length, width, height, weight, logistics attributes, etc.) to build a standardized goods data pool.
[0034] S1.2. Traverse the cargo data pool and scan and group the cargo according to the preset "hard binding constraint". The hard constraint is "shipment ID". Identify multiple cargo records with the same unique identifier and determine them as a strongly associated set belonging to the same batch. For independent cargo without an association identifier, treat it as an independent set containing only a single cargo. It should be noted that this invention does not limit the specific field name of the constraint key, and any forced grouping logic based on the same value of a specific field is covered within the scope of this step.
[0035] S1.3. For each strongly associated set of goods identified in S1.2, instantiate it into a logical object "Meta-Item", denoted as... The original shipment This will serve as the smallest atomic operation unit for subsequent bin packing algorithms and will no longer be allowed to be split. Let the identified first... A collection of goods ,in, Represents the first in the set One original cargo unit; Attribute fusion and feasibility verification are performed using the following mathematical model: A. Accumulation and aggregation of physical properties: Extracting the set Each original cargo unit volume value and weight value The original cargo was calculated through cumulative calculation. Total physical properties:
[0036]
[0037] in, This refers to the total volume of the original shipment. This refers to the total weight of the original shipment. B. Disjunction operation for special attributes: For a predefined set of restrictive attributes (such as whether commodity inspection or FDA certification is required), set... For the first Boolean states (True / False) for special attributes, original parts The state of this attribute Determined by the logical OR operation of all elements in the set:
[0038] Right now: ; This mechanism ensures that as long as any original cargo in the set has a certain regulatory attribute, the original cargo will inherit that attribute, thereby preventing compliance omissions. C. Physical feasibility boundary verification: This is done during the generation of the original parts. At the same time, call the specifications of the currently available containers, including the maximum volume. and maximum load The following inequality constraints are constructed for verification:
[0039] If the above system of inequalities is satisfied, then Mark as "valid" and add to the loading queue; If any inequality is not true, the exception handling process is triggered, and aggregate requests that cannot be physically loaded are intercepted.
[0040] S2 further includes: S2.1, the components generated in S1 Perform multi-dimensional feature extraction and classification, and establish mutually isolated loading queues according to preset mutual exclusion rules; In this step, a cargo isolation mechanism based on business logic is constructed in the following way: Read each original item Based on the attribute data and a preset classification dimension configuration, key feature vectors for decision-making are extracted. These key feature vectors include: Timeliness dimension feature: used to identify the speed level of logistics transportation of goods, such as "fast ship" and "slow ship"; Physical specifications: Used to identify the size and handling difficulty level of goods, such as "standard items" or "oversized items".
[0041] S2.2 For each category label in S2.1, initialize an independent queue to be loaded, and add the completed category mapping components to the corresponding queue. At the same time, perform a preliminary sorting operation on the components in the queue. In this step, the total volume and total weight of each category queue are calculated, and the queues are prioritized according to the strategy of descending volume. That is, the category queue with the largest total volume will be marked as the highest priority and will enter the subsequent resource allocation and loading calculation process first. This is intended to prioritize the types of goods with a large proportion in order to maximize the overall resource utilization.
[0042] S3 further includes: S3.1 For each isolated loading queue generated in S2.2, first load the container specifications and construct a constraint model for evaluating loading capacity. This constraint model includes constraint thresholds in the following dimensions: Volume dimension: Defines the maximum effective loading volume of a single container. ; Load Capacity Dimension: Defines the maximum permissible load capacity of a single transport container. This threshold is usually determined by port weight limits or vehicle axle weight limits; Special Constraint Dimension: Defines special container quotas or mixed loading restrictions for goods with specific attributes (such as whether they require commodity inspection, FDA certification, etc.).
[0043] S3.2. For each isolated loading queue generated in S2.2, perform an independent capacity demand assessment, using the larger of the volume demand and the load demand as the baseline capacity demand for that queue. Specifically, let a certain queue... The total volume of the goods is The total weight is The minimum number of transport units required is calculated using the "maximum bottleneck method". :
[0044]
[0045]
[0046] in, This represents the floor function. This represents the minimum number of transport containers required to load all the goods in this isolated loading queue, considering only volume constraints. This represents the minimum number of transport containers required to load all goods in the isolated loading queue, considering only the load constraint. It also represents the initial base number of transport containers required for the isolated loading queue when both volume and load constraints are satisfied.
[0047] S3.3 Before formally packing, a feasibility assessment is performed on the initial solution space, mainly by executing the following verification logic: Iterate through the queue of goods with special attributes that require mutually exclusive loading, and calculate the minimum number of independent containers required for each attribute. The total number of containers available for this attribute in the current solution space is counted, which is the minimum number of transport units calculated in S3.2. Construct inequalities If the verification passes, the current solution space is locked; if the verification fails, an error is automatically reported, requiring manual adjustment of the input dataset.
[0048] S4 further includes: S4.1 Calculate the minimum number of transport units required for each isolated loading queue as described in 3.2. Based on this, we begin the formal boxing process for each isolated loading queue generated in section 2.2.
[0049] S4.2 Execute the first stage of loading: Prioritize the handling of goods with special attributes that cannot be mixed due to mutual exclusion. Through attribute hierarchical analysis, geographic clustering, and a container selection mechanism based on a dynamic scoring function, achieve dual optimization of compliance and loading rate. The specific steps are as follows: S4.2.1 Attribute Hierarchy: Identify all sets of special attributes involved in the current loading queue. Calculate the total volume of the cargo to be loaded under each attribute. And construct the attribute processing sequence in descending order of volume; This step ensures that special-attribute goods with the largest volume share occupy empty container resources first, avoiding fragmented spaces from being unable to accommodate the goods. S4.2.2, Same-city, same-warehouse clustering: For each attribute category in the sequence, further perform secondary clustering on the goods to be loaded: First-level clustering (city level): Group goods by shipping city and sort them in descending order of the total volume of goods in each city; Second-level clustering (warehouse level): Within the same city group, goods are subdivided according to specific shipping warehouses and arranged in descending order of the total volume of goods in the warehouses; This ultimately forms an ordered queue of batches to be loaded. Each batch It includes several goods belonging to the same attribute, the same city, and the same warehouse; S4.2.3, Container Priority Scoring Based on Hybrid Fitness: For the current batch of goods to be processed (Its total volume is denoted as) ), Traverse the candidate containers in the resource pool And calculate the comprehensive matching score vector for each container. ,choose The smallest container is the optimal solution, and the vector is the optimal solution. Each component in and The definition of is:
[0050]
[0051] in, This represents the remaining space within the current container volume. This represents the total volume of the goods currently awaiting processing. It is a constant; If the current container can completely hold the current batch of goods. No need to split the loading process. If the value equals the remaining space, the container with the smallest remaining space will be chosen. Minimize to reduce wasted space; If the current container cannot completely hold the current batch of goods. It needs to be split and loaded. The value is equal to a constant. (e.g., 10000) Subtract the remaining space, and in this case, the container with the largest remaining space will be preferred. Minimize the load to allow for more goods to be loaded at once and minimize the number of times the goods need to be split.
[0052] S4.3 Execute the second stage of loading: Virtual clustering based on the geographic gravity model. This stage is for ordinary goods without special attributes. It aims to optimize the logistics collection network through intelligent clustering in geospatial space. The "gravity model" is introduced to map physically discrete shipping cities into logically unified "gravity circles," and loading is performed based on this. The specific steps are as follows: S4.3.1 Dynamic Construction of Geographic Gravity Spheres: First, a global scan is performed on the shipping cities of all ordinary goods to be processed, and the following clustering algorithm is executed: Identify core nodes: Calculate the total volume of goods to be loaded in each city and define the city with the largest volume as the "core node" of the region; Gravitational attraction determination: For the remaining cities, calculate their physical distance from the "core node". The city nodes are directly calculated using the Haversine formula. With core city nodes Great circle distance between the spheres The calculation model is as follows:
[0053] in, The average radius of the Earth and These are the dimensions of core cities and other cities, respectively. and These are the longitudes of the core city and the other cities, respectively. like ( For example, the preset adsorption radius threshold, If the threshold can be customized according to the actual situation, and the city is not included in the "mandatory independence list", then the city will be attracted and together with the core node will form a "virtual gravity circle". like If so, the city is treated as an independent node, or it may become the core of the next secondary gravitational field. Virtual mapping establishment: Establishing a mapping relationship table For example, although "City A" and "City B" are physically different, they are logically mapped to members of "Region X". S4.3.2. Topological sorting of cargo processing sequences is based on the constructed gravitational circle to generate an ordered loading task queue. The sorting principle is as follows: Region sorting: Prioritize gravitational circles with larger overall volume; Sorting within the region: Within the same gravitational field, strictly follow the topological order of "core node priority", that is, process the goods of the core city first to establish the dominant geographical attributes of the container, and then process the goods of the satellite city closest to the core to ensure the smooth extension of the logistics path. S4.3.3 Container Priority Scoring Based on Region Affinity: For the currently loaded cargo batch, traverse the candidate containers in the resource pool and calculate the priority score. At this stage, the "virtual affinity matching" logic is enabled, no longer limited to the consistency of physical place names:
[0054] Within the established priority levels, the definition in section 4.2.3 will continue to be used. Perform a second sort.
[0055] S4.4, Perform the third stage of loading: For the cargo left over from S4.2 and S4.3 due to the inability to meet strict geographical constraints, this stage directly seeks the globally optimal solution between physical distance and loading efficiency. The specific process is as follows: S4.4.1 Gravitational Reordering of Residual Cargo: For the remaining cargo, instead of randomly selecting cargo for filling, it is clustered according to the shipping city, and the total volume of remaining cargo in each city is calculated. In these sets, identify The largest city is defined as the "residual core node" at the current stage. The physical distances between this "residual core node" and other remaining cities are calculated, based on a "core-first" principle. Based on the principle of "following those closest to the source," a queue of pending goods is constructed. This step ensures that even during the downgrading phase, goods that make up a large proportion and are geographically adjacent are still prioritized, thereby maintaining the continuity of the logistics path as much as possible and avoiding excessive dispersion of goods when mixed loading is unavoidable. S4.4.2, Multi-level constraint relaxation loop: Sequentially pop batches of goods from the loading queue constructed in 4.4.1 and attempt to load them into containers. To achieve a balance between "loading success rate" and "logistics cost", define... to There are four decreasing constraint levels. Each level is traversed sequentially, and the system automatically moves to the next level only when no feasible solution can be found in the current level. Level 1: Only containers that are "strictly matched within the same city" are allowed to be loaded, requiring that the main export warehouse of the container and the export warehouse of the goods be completely consistent; Level 2: Allows the loading of containers that "contain the target city", meaning that although the container is dominated by other cities, it already contains goods from the city where the current goods are located. Level 3: Allows containers with "geographically close proximity" to be loaded, based on the Haversine formula to calculate the distance between the shipment location and the container's current geographic center of gravity; Level 4: Remove geographical restrictions, allowing any remaining empty containers in the resource pool to be enabled; S4.4.3 When running at Level 3, when faced with multiple candidate containers, a "double-constraint comprehensive cost model" is constructed to rearrange the candidate containers to prevent the malicious splitting of goods due to excessive pursuit of full load rate. The specific steps are as follows: Let the total volume of the batch of goods to be loaded be... The total weight is The remaining available volume of the candidate container is The remaining available load capacity is Calculate the effective carrying capacity of the container for the current cargo. :
[0056]
[0057]
[0058] in, The volumetric capacity ratio represents the proportion of the container's remaining space that can accommodate the current cargo. Weight load capacity; Constructing an invalid splitting penalty function: To suppress "low-value cargo fragmentation" (i.e., splitting a large batch of goods to fill only a small portion of a container's capacity), a step-like virtual distance penalty function is introduced. :
[0059] in, The preset fragmentation rejection threshold (can be set to 0.50, i.e. 50%). Based on the distance penalty, For blocking penalties (e.g., 10,000 km); This means that if a container cannot hold at least 50% of the volume or weight of the current batch, the match will be deemed "invalid" and its priority will be reduced to the lowest level. Calculate the final sort key value ,in, For physical distance, select The smallest container is used for loading. If splitting is required, the maximum load capacity of the goods is filled into the container, and the remaining part is placed back at the head of the queue to await the next round of calculation.
[0060] S4.5 Execute the fourth stage of loading: Greedy filling of residual space based on mutual exclusion classification constraints. After completing the above-mentioned fine-grained loading based on geographical gravity, execute the greedy filling algorithm for all containers in the "not fully loaded" state and all "unallocated" residual cargo. This phase no longer considers geographical proximity, but focuses on "maximizing the feasibility of a single load" and "strictly adhering to business isolation boundaries." The specific process is as follows: S4.5.1 Sort the remaining goods in descending order by volume: Obtain the set of currently unassigned components. To prevent large-volume goods from becoming unloadable due to space fragmentation later on, the collection... Sort by volume in descending order, starting from... The head removes the component currently to be loaded. :
[0061] in, This refers to the collection of components that have not yet been assigned to any container after the aforementioned loading phase has ended. This indicates the volume attribute corresponding to the original part. This indicates an operation to sort the data in descending order based on the specified key field. Represents the set of residual components The ordered sequence of components obtained by rearranging them from largest to smallest volume; By prioritizing the handling of larger residual components, the risk of them being unable to be loaded due to insufficient remaining space during subsequent loading processes can be reduced, and the loading success rate during the residual space filling stage can be improved. S4.5.2, Traverse all currently open container instances. For original parts Perform strict mutual exclusion checks to select a feasible set of containers. The verification logic mainly includes: 1. Check whether the business classification of the container is consistent with the classification label of the original goods; 2. Check whether the special attributes of the original parts conflict with the existing special attributes of the container; 3. Physical space mutual exclusion: Check whether the remaining volume and remaining load capacity of the container simultaneously meet the requirements; S4.5.3, in the selected set of feasible containers In this process, the selection is not random, but rather a worst-fit diminishing strategy is used for decision-making. "Worst-fit" is a common heuristic strategy name in the bin packing problem. It does not mean that the loading effect is the worst, but rather that among the feasible container set that meets the business constraints and physical capacity constraints, the container with the largest remaining volume is selected as the loading target. Calculate the remaining volume of each feasible container. And select the container with the largest remaining volume as the optimal loading target. ; This step aims to balance the load levels of all containers. For the remaining large-volume cargo, selecting the container with the largest remaining space can significantly improve the success rate of loading and avoid leaving subsequent medium-volume cargo with nowhere to go due to prematurely filling some containers.
[0062] S5 enables a "dynamic adaptive filling strategy" for the target container instance and candidate cargo set selected in S4. By sensing the remaining resource status of the container in real time and dynamically switching the scoring model, the best cargo is iteratively selected from the candidate set for filling until the container resources are exhausted or there is no suitable cargo.
[0063] S5 further includes: S5.1 Before each loading iteration begins, first scan the current physical state of the target container and calculate key state characteristic indicators: Container resource utilization: Calculate the current volume utilization rate. and load utilization rate ; Container's remaining resources: Calculate the remaining usable volume of the container. and remaining available load capacity ; Scarcity difference in container resource utilization: Calculate the difference in the remaining percentage of the two. ; S5.2 Dynamic switching determination of filling strategy: based on the scarcity difference of container resource utilization By comparing with a preset dynamic threshold, the system intelligently determines the current resource bottleneck state of the container and activates the corresponding scoring strategy model accordingly. The preset dynamic threshold can be adjusted by increasing or decreasing the coefficient according to the overall characteristics of the current batch of goods, so as to control the sensitivity of the algorithm to resource imbalance.
[0064] Dynamic threshold calculate:
[0065] in, This represents the preset baseline adjustment coefficient, used to control the initial size of the dynamic threshold and the algorithm's sensitivity to resource imbalances. The larger the value, the higher the algorithm's tolerance for differences in volume and load capacity utilization, and the less sensitive it is to strategy switching. The smaller the value, the more sensitive the algorithm is to resource imbalances, and the easier it is to trigger strategy switching. This represents the current container volume utilization rate, which is the ratio between the total volume of loaded goods and the container's maximum effective loading capacity. This indicates the current load capacity utilization rate of the container, which is the ratio between the total weight of the loaded cargo and the container's maximum permissible load capacity. This indicates a high utilization rate of the container in terms of both volume and load capacity, representing the degree to which the container is currently nearing full capacity. This indicates the remaining proportion of containers across the primary constrained resource dimension; As container utilization increases, the decision threshold converges adaptively, meaning that the algorithm has stricter requirements for balance in the later stages of loading. Strategy switching logic: Scenario A (Scarce Resources): If It was determined to be "incomplete weight"; Scenario B (Scarce Volume Resources): If It was determined to be "missing side"; Scenario C (Resource Balance): If It was determined to be "balanced".
[0066] S5.3. Based on the activated strategy model, load the weight configuration of the corresponding scoring strategy model and apply it to the candidate goods. Calculate the overall score It supports users to independently configure weight vectors for different scenarios to achieve fine-grained control over loading preferences. The scoring function model is as follows:
[0067] in, , Harmony Configurable weight coefficient vectors, each corresponding to resource utilization Resource conservation and density regulation The importance of the three dimensions; The above three component functions The specific calculation logic is not static, but dynamically and adaptively switches according to the container state determined in S5.2.
[0068] S6 is the decision-making stage at the logistics execution level, following the physical packing of all goods in S4 and S5. This step aims to find the globally lowest-cost route combination (loading point, port of departure, etc.) for each generated container instance and generate a unique logistics tracking code for it. Due to the large number of containers to be processed and the complex rate tiers, using exhaustive or brute-force methods to calculate all possible path combinations to find the globally optimal solution would result in an exponential explosion in computational load, excessive time consumption, and failure to meet the timeliness requirements of logistics operations. Therefore, this invention proposes a sequential decision-making method based on cargo volume lookup. This method does not view the current container in isolation but utilizes the potential cargo volume of remaining unprocessed goods to assist in current pricing table lookups, thereby achieving global cost convergence while ensuring computational efficiency.
[0069] S6 further includes: S6.1 Initialization of the cargo volume state pool: First, scan all valid containers to be processed and build two dynamic data pools for auxiliary pricing: Historically decided cargo volume: Records the cumulative cargo volume of each warehouse that has been allocated to each container loading point. The initial state is empty. Undecided cargo volume: Preliminary calculation of the total cargo volume of all shipping warehouses in all available containers; Initially, the pool contains the volume of all goods to be processed in this batch.
[0070] S6.2 Process each container in sequence. Before making a decision, first execute the current container. The quantities of goods in each warehouse included are deducted from the quantities that have not yet been decided. At this point, regarding the current decision: H represents "a quantity that has been predetermined in the past". F represents the quantity that is currently being determined, and F represents the quantity that may follow in the future. When calculating the unit price for a specific route (such as "from warehouse A to loading point B"), a full-quantity overlay price lookup logic is used to calculate the virtual total quantity used to match the tiered pricing table. :
[0071] in, Indicates the current container Previously, they had already been assigned to the container loading point. And it originates from the shipping warehouse. Historical cumulative cargo volume The container that is currently making a decision. Sourced from the shipping warehouse The volume of goods, This indicates that a decision has not yet been made regarding the current container, and it originates from the shipping warehouse. The remaining potential cargo volume, This represents the total virtual pricing volume used to match the tiered pricing schedule, which is obtained by adding historical decided cargo volume, current container cargo volume, and future remaining cargo volume. Indicates according to Find the unit transportation price in the corresponding tiered price list; Even if the current shipment volume in a certain warehouse of a container is small, as long as there are a large number of goods waiting to be shipped in the future, this mechanism can predict the future shipment volume advantage in advance, obtain a lower unit price, and thus guide the current container to choose the optimal path (such as going to the loading point A in a concentrated manner).
[0072] S6.3. Based on S6.2, calculate the remaining costs for each container, compare all feasible combinations of loading points and shipping modes, select the lowest cost option as the final decision, and generate a logistics chain description for each container to ensure that the container cost reaches global convergence within the effective time.
[0073] To further verify the feasibility and superiority of this method, this invention uses the actual shipping scenario of "Amazon Global Logistics (AGL)" as an example for detailed explanation.
[0074] S1. A total of 1090 goods were received. Preprocessing and packaging of the original goods began. The number of original goods after packaging was 1090, and the number of aggregated goods was 0.
[0075] S2. Extract the characteristics of the original cargo and divide it into four physically isolated loading queues: "Fast Ship - Standard Items", "Fast Ship - Large Items", "Slow Ship - Standard Items", and "Slow Ship - Large Items". Statistics show that all input cargo is standard items for slow ships, with a total cargo volume of 275.49. The total weight is 58308.95kg.
[0076] S3, Maximum available container volume Maximum load .
[0077] Based on the formulas in the above method embodiments, the following calculations are obtained: Volume requirements: indivual; Load requirements: indivual; Take the maximum value and initialize it in memory. Each of the three digital container instances (denoted as C1, C2, and C3) is labeled with the exclusive tag "Slow Ship - Standard Parts".
[0078] S4.1 Calculate the minimum number of transport units required for each isolated loading queue in S3. Based on this, the first stage of loading begins: special attribute goods with mutually exclusive characteristics that cannot be mixed are processed first; in this example, special attribute goods are those whose field is whether they are tested by the FDA and whose value is "yes". There are no special attribute goods among the currently input goods, so we directly proceed to the second stage of loading ordinary goods.
[0079] S4.2 Execute the second phase of loading and dynamically construct the geographic gravity circle to perform a global scan of the shipping cities of all pending general cargo.
[0080] Identify core nodes: Calculate the total volume of goods to be loaded in each city and define the city with the largest volume as the "core node" of the region.
[0081] Gravitational attraction determination: For the remaining cities, calculate their physical distance from the "core node". The city nodes are directly calculated using the Haversine formula. With core city nodes Great circle distance between the spheres The calculation model is as follows:
[0082] in, The average radius of the Earth (6371 km in this example). and These are the dimensions of core cities and other cities, respectively. These are the longitudes of the core city and the other cities, respectively.
[0083] like ( The preset adsorption radius threshold is used in this example. If the threshold can be customized according to the actual situation, and the city is not included in the "mandatory independence list", then the city will be attracted and together with the core node will form a "virtual gravity circle". like If so, the city is treated as an independent node, or it may become the core of the next secondary gravitational field.
[0084] Virtual mapping establishment: Establishing a mapping relationship table For example, although "City A" and "City B" are physically different, logically they are both mapped to members of "Region X". The scan results in this example are as follows: Core: [Xuzhou] (Volume: 39.02m³) Adsorption: Bengbu (Distance: 178.9km, Volume: 5.35m³) Adsorption: Lianyungang (Distance: 186.9km, Volume: 1.01m³) Core: [Jinhua] (Volume: 35.39m³) Adsorption: Shaoxing (Distance: 138.5km, Volume: 1.22m³) Adsorption: Wenzhou (Distance: 157.2km, Volume: 11.67m³) Adsorption: Taizhou (Distance: 178.9km, Volume: 1.85m³) Core: [Heze] (Volume: 11.95m³) └── (Independent / Unqualified City Goods) S4.3.1. Topological sorting of the cargo processing sequence is based on the constructed gravitational field, generating an ordered loading task queue. The sorting principle is as follows: Region sorting: Prioritize gravitational circles with larger overall volume; Regional sorting: Within the same gravitational field, strictly follow the topological order of "core node priority", that is, process the goods of the core city first to establish the dominant geographical attributes of the container, and then process the goods of the satellite city closest to the core to ensure the smooth extension of the logistics path.
[0085] In this example, the processing order is: Changzhou, Xuzhou, Jinhua.
[0086] S4.3.2 Container Priority Scoring Based on Region Affinity: For the currently loaded cargo batch, traverse the candidate containers in the resource pool and calculate the priority score. At this stage, the "virtual affinity matching" logic is enabled, no longer limited to the consistency of physical place names:
[0087] Within the established priority level, the method defined in S4 of the above-described method embodiment will continue to be used. Perform a second sort.
[0088] S4.4. Perform the third stage of loading: For cargo that cannot meet strict geographical constraints, this stage directly seeks the globally optimal solution between physical distance and loading efficiency. The specific process is as follows: S4.4.1 Gravitational Reordering of Residual Cargo: For the remaining cargo, instead of randomly selecting cargo for filling, it is clustered according to the shipping city, and the total volume of remaining cargo in each city is calculated. In these sets, identify The largest city is defined as the "residual core node" in the current stage. Calculate the physical distance between the other remaining cities and this "residual core node." Based on "core priority..." Following the principle of "following those closest", a queue of goods to be processed is constructed.
[0089] In this example, the processing order is: Heze, Shijiazhuang, Nantong, Suzhou, Ningbo, Jieyang, Shantou.
[0090] S4.4.2, Multi-level Constraint Relaxation Loop: Sequentially pop batches of goods from the loading queue constructed in S4.4.1 and attempt to load them into containers. To achieve a balance between "loading success rate" and "logistics cost", define... to There are four decreasing constraint levels. Each level is traversed sequentially, and the system automatically moves to the next level only when no feasible solution can be found at the current level. Level 1: Only containers with "strict same-city matching" are allowed. The main export warehouse of the container must be exactly the same as the export warehouse of the goods.
[0091] Level 2: Allows loading containers that "contain the target city". That is, although the container is dominated by other cities, it already contains goods from the city where the current goods are located.
[0092] Level 3: Allows loading of containers with "geographically nearby" locations. The distance between the shipment origin and the container's current geographic center of gravity is calculated using the Haversine formula. (Note: This level introduces dual resource constraints; see S4.4.3 below for details.) Level 4: Remove geographical restrictions, allowing any remaining empty containers in the resource pool to be enabled.
[0093] S4.4.3 When running at Level 3, when faced with multiple candidate containers, a "double-constraint comprehensive cost model" is constructed to rearrange the candidate containers to prevent the malicious splitting of goods due to excessive pursuit of full load rate. The specific steps are as follows: Let the total volume of the batch of goods to be loaded be... The total weight is The remaining available volume of the candidate container is The remaining available load capacity is Calculate the effective carrying capacity of the container for the current cargo. :
[0094]
[0095]
[0096] in, The volumetric capacity ratio is an indicator that represents the proportion of the container's remaining space that can accommodate the current cargo. The weight load factor is taken as the minimum of the volume load factor and the weight load factor, which is then used as the final effective contribution rate. .
[0097] Constructing an invalid splitting penalty function: To suppress "low-value cargo fragmentation" (i.e., splitting a large batch of goods to fill only a small portion of a container's capacity), a step-like virtual distance penalty function is introduced. :
[0098] in, The preset fragmentation rejection threshold is set to 0.50 (i.e., 50%) in this embodiment. Based on the distance penalty, This is a blocking penalty (e.g., 10,000 km). This means that if a container cannot hold at least 50% of the current batch's volume or weight, the match will be deemed "invalid" and its priority will be reduced to the lowest level.
[0099] Calculate the final sort key value ( (For physical distance). Select The smallest container is used for loading. If splitting is necessary, the portion with the maximum load capacity is filled into the container, and the remaining portion is placed back at the head of the queue, awaiting the next round of calculation. The calculation model is as follows: Calculate the current geographic centroid within the container: iterate through all loaded goods within the container. Extract the latitude and longitude of its shipping location. and volume The current geocentric coordinates of the container are calculated using the volume-weighted average method. :
[0100]
[0101] By using volume weighting, larger cargoes have a greater impact on the position of the container's center of gravity, thereby ensuring that newly added cargoes are as close as possible to the origin of the bulk cargo inside the container, preventing excessive dispersion of logistics paths in geographical space.
[0102] Based on the above calculation of the container's center of gravity The current origin of the goods to be loaded The Haversine formula is called again to calculate the physical distance. :
[0103] For example, in this instance, when processing goods from Heze (11.95 m³), there are four containers to choose from, with the following corresponding attributes: Cabinet 1: Priority 3 | Geographic centroid optimization: Distance 562.7km | Remaining 0.08m³ Cabinet 2: Priority 3 | Geographic centroid optimization: Distance 562.7km | Remaining 0.84m³ Cabinet 3: Priority 3 | Geographic centroid optimization: Distance 208.9km | Remaining 26.63m³ Cabinet 4: Priority 3 | Geographic centroid optimization: Distance 827.9km | Remaining 21.87m³ Taking all the above into consideration, the algorithm will select cabinet 3 for filling.
[0104] S4.5 Execute the fourth stage of loading: After completing the above-described geo-gravity-based refined loading, execute the final greedy filling algorithm for all containers in the "not fully loaded" state and all "unassigned" remaining cargo. This stage no longer considers geographical proximity, but focuses on "maximizing the feasibility of a single loading" and "strictly adhering to business isolation boundaries." Since the first three stages have already completed the loading of all cargo in this example, this stage does not need to be executed.
[0105] S5. For the target container instance and candidate cargo set selected in S4, enable the "dynamic adaptive filling strategy", such as... Figure 2 As shown, by sensing the remaining resource status of the container in real time and dynamically switching the scoring model, the best goods are iteratively selected from the candidate set to fill the container until the container resources are exhausted or there are no suitable goods.
[0106] Here are some examples to illustrate this. In the second stage, when the goods from Changzhou and the containers to be filled are passed to the dynamic adaptive filling module, the specific details of the 7th round of goods selection are as follows: [Round 7 Selection] Remaining candidate goods: 342 pieces [Threshold Adjustment] Base Threshold: 0.0300 (3.00%) [Threshold Adjustment] Current maximum utilization: 1.02% [Threshold Adjustment] Dynamic Threshold: 0.0297 (2.97%) = 0.0300 × (1 - 0.01) [Resource Status] Volume Remaining: 98.98%, Weight Remaining: 98.99%, Difference: 0.01% [Start Scoring] Scoring 342 candidate goods using a balancing strategy... [Scoring Results] A total of 342 items met the requirements, with the top 5 receiving the highest scores: 1. Goods 671: Score = 0.1972, V = 0.108m³, W = 29.4kg, Density = 272.2kg / m³ 2. Goods 936: Score = 0.1966, V = 0.054 m³, W = 14.7 kg, Density = 272.2 kg / m³ 3. Goods 397: Score = 0.1965, V = 0.150 m³, W = 42.8 kg, Density = 285.0 kg / m³ 4. Goods 929: Score = 0.1964, V = 1.028 m³, W = 264.6 kg, Density = 257.4 kg / m³ 5. Goods 463: Score = 0.1962, V = 0.120m³, W = 34.2kg, Density = 285.0kg / m³ [Final Choice] Cargo 671 (Score: 0.1972) S6. After all goods have been physically packed, the process moves to the decision-making stage at the logistics execution level. This step aims to solve for the globally lowest-cost route combination (loading point, port of departure, etc.) for each generated container instance and generate a unique logistics tracking code for it. The specific handling of the second container is as follows: Handling AGL cabinet 2 (Northeast - Slow Ship Standard): Container 2's selected loading points: ['Benniu', 'Benniu and Jintian', 'Shanghai'] [Debugging] Original calculation: Total 34585.32, Reverse 3460.45, Extract 2834.86 [Correction] Reversing fee: 3460.45 -> 3528.86 (increased) [Final] Total Cost: 34653.73 [Debugging] Original calculation: Total 65151.32, Reverse 3460.45, Extract 2834.86 [Correction] Reversing fee: 3460.45 -> 3528.86 (increased) [Final] Total Cost: 65219.73 Cost comparison details (showing the 5 cheapest options): Benniu Jintian Dual-Pack - Shanghai (MSS): 32059.86 RMB Assembly in Shanghai - Shipped from Shanghai (MSS): 34653.73 yuan Bull Run Outfit - Shanghai (MSS): 35062.22 RMB Benniu Jintian Dual-Pack - Shanghai (AMP): 62,625.86 RMB Assembly in Shanghai - Shipped from Shanghai (AMP): 65219.73 yuan Optimal Solution: Benniu Jintian dual-location package - shipped from Shanghai (MSS) = 32059.86 yuan [Decision Locked] Cabinet 2 selected [Ben Niu Jin Tian and two other locations] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the container stowage method based on geographic centroid clustering and multiple constraint adaptation as described above.
[0107] This invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the container stowage method based on geographic centroid clustering and multiple constraints described above.
[0108] This invention also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps of the container stowage method based on geographic centroid clustering and multiple constraint adaptation described above.
[0109] It is understood that the systems, devices and storage media provided in the embodiments of the present invention correspond to the methods provided in the embodiments of the present invention, and the explanations, examples and beneficial effects of the relevant contents can be referred to the corresponding parts of the above-mentioned container loading method based on geographic centroid clustering and multiple constraint adaptation.
[0110] It should be noted that those skilled in the art will understand that all or part of the steps implemented in the embodiments of the present invention can be implemented entirely or partially by software, hardware, firmware, or any combination thereof. When implemented in hardware, it can be implemented entirely or partially by purchasing standard parts or modifications. When implemented in 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 media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid state disks (SSDs)).
[0111] In summary, this invention addresses the problem that traditional container loading algorithms cannot handle complex business attributes and that local optima in single-container cost lead to high overall costs. It provides a container intelligent loading method based on geographic centroid clustering and multi-constraint adaptive loading. By integrating multi-level constraint filtering and multi-stage heuristic greedy strategies, it can improve loading rate and reduce pickup and transportation costs while satisfying the restriction and isolation requirements.
[0112] It should be understood that the examples and embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Those skilled in the art can make various modifications or changes based on them. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the protection scope of the invention.
Claims
1. A container stowage method based on geographic centroid clustering and multi-constraint adaptive stowage, characterized in that, Includes the following steps: S1. Obtain the original dataset of the goods to be loaded and clean the data to obtain the goods data pool. Based on the preset hard binding constraints, the goods in the goods data pool are forcibly grouped. For each group, an indivisible component is generated, and the volume, weight and special attributes of the component are aggregated and physical feasibility is verified. S2. Establish mutually isolated loading queues based on the logistics timeliness attributes, physical specification attributes, and special attribute mutual exclusion rules of the original cargo. S3. For each loading queue, calculate the minimum number of containers required based on the maximum effective loading volume and maximum allowable load of the containers, and initialize the corresponding digital container instances for the minimum number of containers required. S4. In each loading queue, the components are divided into mutually exclusive special attribute components, ordinary components, and residual components. Hierarchical progressive loading is performed on each component, and they are dynamically allocated to digital container instances. S5. During the loading process, a dynamic adaptive filling strategy is enabled for the target container. Based on the scarcity of the remaining volume and remaining load of the target container, the scoring model is dynamically switched to iteratively select the components to be loaded until the target container resources are exhausted or there are no components to be loaded. S6. Output the loading list of components corresponding to each digital container instance; In step S4, the layered progressive loading includes: Prioritize loading of mutually exclusive components with special attributes, and then select the target container after hierarchical clustering by shipping city and warehouse under the same attribute; For ordinary raw cargo, a virtual gravity circle is constructed based on the geographical distance between the shipping cities, and the cargo is loaded according to the priority order of the core nodes; Multi-level relaxation of geographical constraints is applied to the remaining residual components, and container selection is performed among candidate containers based on the distance between the shipment location and the geographical center of gravity of the container, as well as the penalty for split loading. For ordinary raw cargo shipments, constructing a virtual gravitational circle based on the geographical distance between shipping cities includes: The total volume of ordinary components corresponding to each shipping city is calculated, and the shipping city with the largest total volume is identified as the core node of the gravitational circle. Based on the Haversine formula, the spherical distance d between other shipping cities and the core node is calculated. When d is not greater than the preset adsorption radius R, and if a shipping city is not included in the mandatory independent list, the shipping city is adsorbed to the gravitational circle and a virtual mapping relationship between the city and the gravitational circle is established. Gravitations are processed in descending order of their total volume, and within the same gravitational sphere, they are loaded in order of priority for core nodes.
2. The container stowage method based on geographic centroid clustering and multi-constraint adaptive loading as described in claim 1, characterized in that, In step S1, the aggregation of volume, weight, and special attributes of the original parts, as well as the physical feasibility verification, includes: When generating a meta-item for a set of original goods in the same group, the total volume of the meta-item is the sum of the volumes of the original goods in the set, the total weight of the meta-item is the sum of the weights of the original goods in the set, and for a preset set of restricted special attributes, each special attribute state of the meta-item is the result of a logical OR operation of the corresponding special attribute state in the set. The physical feasibility check involves determining whether the total volume of the component is not greater than the maximum effective loading volume of a single container, and whether the total weight of the component is not greater than the maximum allowable load of a single container. If either condition is not met, the component is intercepted from entering the loading queue, and an exception handling process is triggered.
3. The container stowage method based on geographic centroid clustering and multi-constraint adaptive loading as described in claim 1, characterized in that, In step S2, establishing mutually isolated loading queues includes: Based on logistics timeliness and physical specifications, raw cargo is grouped and classified, and independent loading queues are established for different groupings. Calculate the total volume of each loading queue and determine the processing priority of the loading queues in descending order of total volume.
4. The container stowage method based on geographic centroid clustering and multi-constraint adaptive loading as described in claim 1, characterized in that, In S3, the expression for calculating the minimum number of containers N required is: in, The total volume of goods in the loading queue. The total weight of the goods in the loading queue. The maximum effective loading volume specified for a single container. The maximum permissible load specified for a single container. This is the floor function.
5. The container stowage method based on geographic centroid clustering and multi-constraint adaptive loading as described in claim 1, characterized in that, Prioritizing loading of mutually exclusive components with special attributes includes: Identify the special attribute categories involved in the loading queue, and construct the attribute processing sequence in descending order of the total volume of the original cargo corresponding to each special attribute category; For any specific attribute category, the sub-shipments under that category are grouped by shipping city and sorted in descending order by the total volume of each city. Then, within the same city group, they are grouped by shipping warehouse and sorted in descending order by the total volume of each shipping warehouse, so as to form a batch of goods with the same attribute, the same city, and the same shipping warehouse, and loaded in sequence. Specifically, when selecting a target container among candidate containers for any batch of goods, a priority score for the current container must be calculated: For the current batch of goods pending processing Iterate through the candidate containers in the resource pool. And calculate the comprehensive matching score vector for each container. ,choose The smallest container is the optimal solution, and the vector is the optimal solution. Each component in and The definition of is: in, This represents the remaining space within the current container volume. This represents the total volume of the goods currently awaiting processing. It is a constant; If the current container can completely hold the current batch of goods. No need to split the loading process. If the value equals the remaining space, the container with the smallest remaining space will be chosen. Minimize to reduce wasted space; If the current container cannot completely hold the current batch of goods. It needs to be split and loaded. The value is equal to a constant. Subtracting the remaining space, the container with the largest remaining space is preferred. Minimize the number of splits.
6. The container stowage method based on geographic centroid clustering and multi-constraint adaptive loading as described in claim 1, characterized in that, Applying multi-level relaxation of geographical constraints to residual original shipments involves sequentially traversing at least four constraint levels: Level 1 strict matching within the same city and warehouse, Level 2 allowing loading into containers that already contain the target city, Level 3 allowing loading into containers with adjacent geographical centers, and Level 4 removing geographical restrictions. Wherein, the geographical centroid is the centroid coordinate obtained by weighting the latitude and longitude of the shipping location of the loaded components in the candidate container according to their volume, and the distance between the candidate container and the batch of goods to be loaded is the Haversine spherical distance between the shipping location of the batch of goods and the centroid coordinate. At Level 3, calculate the effective load-bearing capacity of the cargo batch to be loaded for any candidate container. and in When the load is less than a preset threshold θ, a blocking penalty term is applied to reduce the loading priority of the candidate container, thus lowering the effective load capacity. The calculation expression is: in, Volumetric capacity ratio, characterizing the proportion of the container's remaining space that can accommodate the current cargo. This refers to the weight load-bearing capacity.
7. The container stowage method based on geographic centroid clustering and multi-constraint adaptive loading as described in claim 1, characterized in that, In step S5, the dynamic adaptive filling strategy includes: Calculate the volume utilization rate of the target container. and load utilization rate And calculate the scarcity difference in resource utilization of the target container. Based on scarcity differences With dynamic threshold Determining whether the target container is in a state of weight deficiency, volume deficiency, or equilibrium, whereby a dynamic threshold is used. Based on the preset basic adjustment coefficient With the target container's current maximum utilization Confirmed, satisfied ; Different comprehensive scoring functions are used for candidate components under different conditions, and loading is carried out iteratively based on the scores. The comprehensive scoring function takes into account at least the following factors: the contribution of candidate components to the utilization of non-scarce resources, the fit between the density of candidate components and the target container loading strategy, and the degree of retention of scarce resources by candidate components.
8. The container stowage method based on geographic centroid clustering and multi-constraint adaptive loading as described in claim 1, characterized in that, Also includes: After all goods to be loaded are loaded, full-link cost accounting is performed on each digital container instance, and the logistics execution route combination with the lowest global cost is selected. This selection includes building a decided cargo volume pool and an undecided cargo volume pool. For the target container to be decided, the current cargo volume C of the corresponding shipping warehouse of the target container is deducted from the undecided cargo volume pool, and the historical decided cargo volume H and future undecided cargo volume F are obtained. The virtual total quantity Q=H+C+F used to match the tiered rate price table is calculated, and the unit price is queried accordingly. The total cost of different loading point and transportation mode combinations is calculated, the combination with the lowest total cost is selected, and a unique logistics tracking code corresponding to the selected combination is generated.
Citation Information
Patent Citations
Container position distribution method based on large model driven intelligent agent network
CN121860265A
Method for loading in container by considering weight balances
KR1020130020343A