Marine transportation container assembling method based on sequence generation and search

By applying the hypergraph attention network and Transformer model in the allocation of maritime container locations, and determining the container placement location with the central spiral search algorithm, the efficiency and safety challenges of maritime container location allocation are solved, and more efficient and safe container transportation is achieved.

CN120069706AActive Publication Date: 2025-05-30TIANJIN PORT SECOND CONTAINER TERMINAL CO LTD +2
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510542929.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-05-30
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

With the growth of global trade and transportation demand, the maritime container market faces higher operational pressures, and how to improve the efficiency and safety of container location allocation has become a key challenge.

Method used

The sequence generation method based on the hypergraph attention network (HGAT) and Transformer model is used to encode and update the shipping containers, predict the transportation order, and determine the placement position of the containers on the ship through the central spiral search algorithm.

Benefits of technology

It improves the accuracy and efficiency of container position allocation, ensures the balance and stability of the ship, reduces the risks caused by unreasonable stacking, and improves the terminal operation efficiency and ship navigation stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120069706A_ABST
    Figure CN120069706A_ABST
Patent Text Reader

Abstract

The invention provides a marine container assembly method based on sequence generation and search. The method comprises the following steps: step 101, coding a marine container by adopting a hybrid coding mode of comprehensively integrating various container attributes; step 102, based on the coded representation of the container, updating the feature representation of the container by adopting a hypergraph attention network (HGAT); step 103, on the basis of the feature representation of the containers, adopting a Transform model based on an encoder-decoder architecture to predict the transportation sequence of the containers in the port; and 104, based on the predicted transportation sequence of the containers, determining the placement positions of the containers on the ship by adopting a central spiral search algorithm. According to the method, efficient and reasonable container shipping stowage is achieved, and the wharf operation efficiency and the ship navigation stability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of information technology, and particularly to a method for assembling sea containers based on sequence generation and search. Background Art

[0002] With the rapid growth of the global trade transportation demand, the sea container market plays a crucial role in sea ports. Under the wave of globalization, the volume of international trade continues to climb, and the scale and frequency of commodity circulation have reached an unprecedented level. Sea transportation, with its unique cost advantage and carrying capacity, has become the main force in international trade transportation. Container transportation, as the core mode of modern sea transportation, not only greatly improves the efficiency of cargo transportation but also reduces the transportation cost and the risk of cargo damage, and its development speed is remarkable.

[0003] Container location allocation is a crucial link in container transportation, which is directly related to the efficiency and production safety of the entire transportation process. Reasonable container location allocation can ensure the balance and stability of the ship, reduce potential safety hazards during transportation, improve the loading and unloading efficiency of the port, and avoid time delays and resource waste caused by unreasonable stacking of containers.

[0004] According to the statistical data of the United Nations Conference on Trade and Development, the container throughput of ports has shown a significant growth trend in the past few decades. In 2020, the global container port throughput reached 815.6 million TEUs, a 53.5% increase compared with 531 million TEUs in 2010. This growth not only reflects the prosperity of global trade but also highlights the importance of container transportation in international trade.

[0005] The substantial increase in container transportation volume has undoubtedly brought huge working pressure to ports. Ports need to handle more containers and coordinate more complex logistics processes, which puts higher requirements on the operation efficiency and management level of ports. To address this challenge, the efficient and automated operation of ports becomes particularly important. The application of automation technologies, such as automated cranes, automated guided vehicles, and intelligent warehousing systems, can significantly improve the operation efficiency of ports, reduce labor costs and error rates, and thus ensure the rapid and safe entry and exit of goods at ports while meeting the growing transportation demand. Summary of the Invention

[0006] The present disclosure provides a method for loading and stowing sea containers based on hypergraph attention network sequence generation and deep spiral search, including:

[0007] Step 101: Encoding sea containers by using a hybrid encoding method that comprehensively integrates various container attributes;

[0008] Step 102: Based on the coded representation of the container, update the container feature representation using a hypergraph attention network (HGAT);

[0009] Step 103: Based on the container feature representation, use a Transformer model based on an encoder-decoder architecture to predict the transportation order of the containers within the port;

[0010] Step 104: Based on the predicted transportation order of the containers, use a central spiral search algorithm to determine the placement positions of the containers on the ship.

[0011] In some embodiments, Step 101 includes:

[0012] For different types of attributes of the container, encode multiple attributes of the container to obtain a feature vector of numerical representation of the container, where the attributes of the container include: the id of the container, the destination; the weight and height of the container; the bay row layer of the yard where the container is located; whether the container needs to be transported and the container model;

[0013] Divide the yard bay row layer data according to the data order, extract the location information of the yard where it is located and the order of the container in the stack longitudinally; through the encoding, convert the attribute data of the container into a unified numerical form;

[0014] To integrate the attribute information of the container, splice the feature vectors in numerical form, and then use a feed-forward neural network (FFN) to capture the non-linear dependence relationship between the features, as follows:

[0015]

[0016]

[0017] In the formula, is the spliced feature vector, n is the number of container features, is the learnable parameter, X 1、 X 2、 X n is the initial embedding of different features of the container, X is the container feature, and ReLU is the activation function.

[0018] In some embodiments, Step 102 includes:

[0019] Construct a hypergraph structure according to the features of the container, where each container constitutes a node in the hypergraph, and containers with the same features establish hyperedges. The hypergraph structure is as follows:

[0020]

[0021]

[0022] In the formula is the constructed hypergraph, is the set of nodes, is the set of hyperedges, is a Boolean matrix representing the connection relationship of the hypergraph. When the node is connected by the hyperedge , the value is 1; otherwise, it is 0; H v,e is a 0 / 1 variable representing the connection relationship between the hyperedge and the node;

[0023] For each node contained in the hyperedge , the feature representation of the hyperedge is obtained by aggregating the initialized node features :

[0024]

[0025] In the formula, is the ReLU activation function, is a trainable weight matrix, is the attention coefficient;

[0026] After obtaining the feature representation of the hyperedge, a new aggregator is defined to aggregate all the hyperedges of each node to obtain the updated node features, denoted as :

[0027]

[0028] In the formula, W 2 is a trainable weight matrix.

[0029] In some embodiments, step 103 includes:

[0030] The container transportation order prediction problem is reduced to a sequence-to-sequence problem: that is, given a random container sequence, through model modeling and processing, an ordered container sequence is obtained to represent the container transportation order;

[0031] For the container feature X, the input is mapped to a query (Query) vector Q, a key (Key) vector K, and a value (Value) vector V by defining three learnable weight matrices:

[0032]

[0033]

[0034]

[0035] In the formula is a trainable weight matrix, is the feature embedding dimension of the container, ;

[0036] For each query vector , calculate its similarity with all key vectors :

[0037]

[0038] In the formula, is the transpose of the vector ; is the attention score, which captures the pairwise relationships in the input elements. When the value is larger, the correlation between the containers and is stronger; Subsequently, use the Softmax function to normalize to obtain the attention weights; Finally, weight and sum the value vectors with the attention weights to obtain the final attention output:

[0039]

[0040] In the formula, is the transpose matrix of the key vector K; In order for each container to capture different levels of feature information, the multi-head attention mechanism is selected to splice the self-attention output, as follows:

[0041]

[0042] In the formula is the number of heads,

[0043] After linearly transforming and layer-normalizing the splicing result of the multi-head attention, the final multi-head attention output is obtained:

[0044]

[0045]

[0046] In the formula, is a trainable parameter, X attn is the output of the multi-head attention, X input is the original feature input; Subsequently, pass the multi-head attention output through a feed-forward neural network to obtain the output of the encoder:

[0047]

[0048] In the decoder of the model, it includes a multi-head self-attention mechanism, an encoder-decoder attention mechanism, and a feed-forward neural network; the multi-head self-attention mechanism in the decoder is used to calculate the attention for the target sequence:

[0049]

[0050] wherein, Y attn is the output of the masked multi-head attention, is the target sequence, that is, the accurate container arrival order, is the mask matrix, which is used to mask future information;

[0051] The encoder-decoder attention mechanism allows the decoder to focus on the output of the encoder; the , ;

[0052]

[0053] wherein, Y enc-dec is the output of the cross multi-head attention mechanism;

[0054] Subsequently, similar to the encoder, after passing through the feed-forward neural network and layer normalization, the final output Y dec of the decoder is:

[0055]

[0056] The output of the decoder passes through a linear layer and a Softmax function to obtain the predicted probability of each container step by step:

[0057]

[0058] wherein, W , b are learnable parameters.

[0059] In some embodiments, step 104 includes:

[0060] According to the transportation order of the containers predicted in step 103, each container is placed on the ship in sequence according to a preset rule. The preset rule includes: placing the containers with the same destination in one area for unloading and management; in the same area, the containers satisfy that the container with a larger weight ordinal number is closer to the middle, the container with a smaller weight ordinal number is relatively closer to the outside, and the containers placed in the same stack satisfy that the container with a larger weight ordinal number is below, while the container with a smaller weight ordinal number is above; the height ordinal number of the containers stored in each stack conforms to the corresponding hull.

[0061] The advantages of the present disclosure are as follows:

[0062] The present disclosure fully considers key attributes such as the weight, height, and destination of containers, encodes them, and thus obtains the feature representation of containers. By using a graph attention network, each container can pay attention to other containers with the same specific features.

[0063] The present disclosure transforms the transportation sequence problem into a Seq2Seq task, and utilizes the global dependency modeling ability of the Transformer model to improve the accuracy of transportation sequence prediction.

[0064] The present disclosure adopts a central spiral search algorithm to determine the placement positions of containers on the ship, and can efficiently find the optimal placement positions. This algorithm starts placing heavy containers from the center, which conforms to the rule that heavy containers are placed closer to the center and light containers are placed closer to the outside. At the same time, through the depth-first search tree algorithm, the most suitable placement positions are accurately searched according to the handling sequence of containers. This improves the space utilization rate, ensures the stability and safety of the ship, and reduces potential risks caused by unreasonable container placement. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic, and the elements and components are not necessarily drawn to scale.

[0066] Figure 1 is a flowchart of the method for allocating the central spiral search position of a marine container according to an embodiment of the present disclosure.

[0067] Figure 2 shows the construction process of the container hypergraph structure according to an embodiment of the present disclosure.

[0068] Figure 3 shows an overview of the container loading and stowage process according to an embodiment of the present disclosure.

[0069] Figure 4 shows the central spiral search algorithm process according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0070] The embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0071] It should be understood that the various steps described in the method embodiments of the present disclosure can be executed sequentially and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.

[0072] As used herein, the term "comprising" and its variations are open-ended, that is, "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0073] It should be noted that the concepts such as "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0074] It should be noted that the modification of "one" mentioned in the present disclosure is illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly specified in the context, it should be understood as "one or more".

[0075] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0076] The present disclosure provides a method for allocating the central spiral search position of a maritime container based on Transformer sequence prediction and rules, which is used to utilize the attribute information of the maritime container to confirm the allocation position on the ship for the containers in the port, so as to improve the performance and efficiency of container position allocation.

[0077] Reference Figure 1 , a method for allocating the central spiral search position of a maritime container based on Transformer sequence prediction and rules is provided, and the method includes:

[0078] 101: Coding the maritime container by adopting a hybrid coding method that comprehensively integrates various container attributes;

[0079] 102: Updating the container feature representation by adopting a hypergraph attention network (HGAT);

[0080] 103: Predicting the transportation order of the containers in the port by adopting a Transformer model based on the encoder-decoder architecture;

[0081] 104: Determining the placement position of the container on the ship by adopting a central spiral search algorithm.

[0082] In some embodiments, a hybrid coding method that comprehensively integrates various container attributes is adopted to code the maritime containers. Specifically, in actual port operations, the attribute data of containers is rich and complex. To effectively process this data and make it suitable for subsequent analysis and decision-making processes, the present disclosure uses a hybrid coding method that comprehensively integrates various container attributes. For different types of container attributes, general coding techniques (e.g., one-hot coding, ordinal coding, ordinal number coding) are used to code most of the container attributes to obtain a numerical feature representation of the container. The main attributes of the container include: the id of the container, the destination; the weight and height of the container; the bay row layer of the yard where the container is located (Bay: the position number of the container, which is equivalent to a row of shelves in a warehouse in space, for example, 01 is the first "Bay"; Row: the number of columns of the container in the "Bay", which is equivalent to the number of columns of a certain cargo position in a certain shelf in the warehouse. Generally, taking the left side as the origin, it increases sequentially from left to right, for example, the first row is row A, the second row is row B; Layer: the number of layers of the container in the "Row", which is equivalent to the cargo position layer of a certain cargo position in a certain shelf in the warehouse. The bottom layer is layer 01, layer 02 is the second layer, and it accumulates upwards in sequence); whether the container needs to be transported and the container type. Among many attributes, the coding of the bay row layer of the yard where the container is located is a key issue in port operations. The main approach is to divide the yard bay row layer data in the form of "Y-TSCT-6C4910.4" according to the data position, and extract the location information of the yard where it is located and the position of the container in the longitudinal direction of the stack. Through this hybrid coding method, various container attribute data can be converted into a unified numerical form.

[0083] To integrate the attribute information of the container, these feature vectors are concatenated, and then a feed-forward neural network (FFN) is used to capture the non-linear dependence relationship between the features, as follows:

[0084]

[0085]

[0086] In the formula is the concatenated feature vector, n is the number of container features, is the learnable parameter, X 1、 X 2、 X n is the initial embedding of different container features, X is the container feature, and ReLU is the activation function.

[0087] In some embodiments, a hypergraph attention network (HGAT) is used to update the container feature representation as follows: a hypergraph structure is constructed based on the container features, where each container constitutes a node in the hypergraph, and containers with the same features (destination, berth location, model) establish hyperedges. The specific graph structure is shown as follows:

[0088]

[0089]

[0090] where is the constructed hypergraph, is the set of nodes, is the set of hyperedges, is a boolean matrix representing the connection relationship of the hypergraph. When the node is connected by the hyperedge the value is 1, otherwise 0; H v,e is a 0 / 1 variable representing the connection relationship between the hyperedge and the node.

[0091] For each node contained in the hyperedge , the feature representation of the hyperedge is obtained by aggregating the initial node features as follows:

[0092]

[0093] where is the ReLU activation function, is a trainable weight matrix, is the attention coefficient.

[0094] After obtaining the feature representation of the hyperedge, a new aggregator is defined to aggregate all the hyperedges of each node to obtain the updated node feature, denoted as as follows:

[0095]

[0096] where W 2 is a trainable weight matrix. Through the above two aggregators, each container can pay attention to the information of other containers with the same features; at the same time, due to the existence of the attention coefficient, more important containers are given higher attention, effectively improving the feature expression ability of the containers.

[0097] Figure 2The figure shows the process diagram of container hypergraph construction: Each container is used as a node of the hypergraph, and containers with the same characteristics are connected using hyperedges; in the figure, for example, containers with the same unloading port, container type, and yard are connected using hyperedges to construct the hypergraph.

[0098] In some embodiments, a Transformer model based on the encoder-decoder architecture is used to predict the transportation order of in-port containers, as follows: The problem of predicting the container transportation order is reduced to a sequence-to-sequence (Seq2Seq) problem: Given a random sequence of containers, through model modeling and processing, an ordered sequence of containers is obtained to represent the transportation order of the containers. Here, a Transformer based on the encoder-decoder architecture is used as the main model architecture.

[0099] For the container feature X, the input is mapped to a query vector Q, a key vector K, and a value vector V by defining three learnable weight matrices:

[0100]

[0101]

[0102]

[0103] In the formula is a trainable weight matrix, is the feature embedding dimension of the container, .

[0104] For each query vector , its similarity with all key vectors can be calculated:

[0105]

[0106] In the formula, is the transpose of the vector ; is the attention score, which captures the pairwise relationships in the input elements. When the value is larger, the correlation between the containers and is stronger; Subsequently, the Softmax function is used to normalize to obtain the attention weights. Finally, the attention weights are weighted and summed for the value vectors to obtain the final attention output:

[0107]

[0108] In the formula, is the transpose matrix of the key vector K; in order to enable each container to capture feature information at different levels, the multi-head attention mechanism is selected to splice the self-attention output, specifically as follows:

[0109]

[0110] In the formula is the number of heads,

[0111] After performing linear transformation and layer normalization on the splicing result of the multi-head attention, the final multi-head attention output is obtained:

[0112]

[0113]

[0114] In the formula, is the trainable parameter, X attn is the output of the multi-head attention, X input is the original feature input. Subsequently, the multi-head attention output passes through the feed-forward neural network to obtain the output of the encoder:

[0115]

[0116] In the decoder of the model, it includes a multi-head self-attention mechanism, an encoder-decoder attention mechanism, and a feed-forward neural network. The multi-head self-attention mechanism in the decoder is used to calculate the attention for the target sequence. The difference between it and the multi-head self-attention mechanism in the encoder is that a masking operation needs to be added, specifically as follows:

[0117]

[0118] In the formula, Y attn is the output of the masked multi-head attention, is the target sequence (i.e., the accurate container arrival order), is the mask matrix, which is used to mask future information.

[0119] The encoder-decoder attention mechanism allows the decoder to focus on the output of the encoder. The difference from the self-attention mechanism is that the , . The output of this structure is:

[0120]

[0121] In the formula,Y enc-dec is the output of the cross-head attention mechanism;

[0122] Then, like the encoder, after the feedforward neural network and layer normalization, the final output of the decoder is Y dec for:

[0123]

[0124] Finally, the output of the decoder passes through a linear layer and a Softmax function to obtain the prediction probability of each container step:

[0125]

[0126] In the formula, W , b are learnable parameters.

[0127] In some embodiments, a central spiral search algorithm is used to determine the placement of containers on the ship, as follows: In the process of ship loading, it is of great significance to reasonably determine the placement of containers on the ship to ensure the balance, stability and space utilization of the ship. In the key link of ship loading, the placement of containers has a vital impact on the safety and space utilization of the entire voyage. The present disclosure uses a central spiral search algorithm to accurately determine the placement of containers on the ship. This algorithm is an efficient solution that has been deeply studied and verified in practice. Since heavier containers should be as close to the center as possible, the algorithm for placing heavy containers from the center can best adapt to the task, which can effectively reduce the center of gravity of the ship and improve the stability of navigation. The depth-first search tree algorithm can accurately search for the most suitable placement position for containers according to the order of container handling. It can comprehensively consider various possible placement combinations to ensure that the optimal solution is found. Considering the rules that heavier containers need to be as close to the center as possible, lighter ones are closer to the outside, and heavier containers need to be placed below lighter containers as much as possible, the order of depth-first search should also be used as the search order of depth-first search in the order of unfolding around the central spiral. Therefore, we chose to use the depth-first algorithm with an intermediate spiral expansion to iterate and find the optimal placement of the container. This method not only improves space utilization, ensures the stability and safety of the ship, but also reduces the potential risks caused by unreasonable placement of containers, providing a solid guarantee for the navigation of the ship and the transportation of cargo.

[0128] In some embodiments, the idea of the central spiral search algorithm is derived from the depth-first search (DFS) algorithm in traditional algorithms. Depth-first search is an algorithm used to traverse or search trees or graphs, where the data structures of trees or graphs have more direct pointing relationships compared to ordinary data and are usually used to model hierarchically structured data. It starts from the root node and searches as deep as possible along the branches of the tree until it can no longer continue, then backtracks to the previous node and continues to explore other branches. During this process, DFS stores each node it passes by and looks for elements that meet the conditions. Although, in the worst case, the time complexity of DFS is O(N), which is no different from traversing the list of all boxes and finding the maximum value. However, in the scenario of container placement at ports, it is usually the case that "light boxes are placed on top and heavy boxes are placed at the bottom", and containers of the same type (going to the same row of destinations or from the same company) are generally stacked within the same bay. Therefore, combined with the actual application scenario at ports, DFS can efficiently search for the specific location of the target container in most cases.

[0129] Figure 3 The framework diagram of the depth spiral algorithm is shown: (1) Sort the container lifting order according to the yard location and the space on the ship for randomly stacked containers; (2) According to the container lifting order in (1), find the most reasonable position on the ship according to the depth spiral algorithm.

[0130] The specific steps of the algorithm for using the central spiral search algorithm to determine the placement position of containers on the ship are as follows ( Figure 4 ):

[0131] (1) First, determine the carrying specifications of the transport ship and the order of containers boarding in the input data. The order of containers boarding is obtained by the method of restoring the yard state in 102 and is defined as , as the initial input sequence.

[0132] (2) According to the structure and load balance requirements of the ship, define the central area of the ship as the priority placement area for heavy containers.

[0133] (3) Starting from the central position, construct a depth search tree in the order of spiral expansion, and start placing containers in the spiral order strictly according to the rule that heavy boxes are placed below and light boxes are placed above. Each node represents a possible container placement position. During the search process, follow the depth-first search strategy, search for C s based on weight, and match each search node node of DFS one by one. Define the balance , w bi represents the weight of box bi, w bjRepresents the weight of the box bj, and sets the hyperparameter β. If the current balance B > β, the rule is violated, and a new search is conducted to make the container layout of the entire ship satisfy the placement rules while maximizing space utilization and transportation stability.

[0134] After placing all the boxes, calculate the total weight of each stack. Denote it as .

[0135] Re - sort each stack in descending order of the total weight. Thus, the rule that heavier boxes are as close to the center as possible can be satisfied, and here the index V cen (This parameter represents the horizontal balance index) is minimized.

[0136] Re - arrange each stack in a spiral order starting from the center position according to the sorted order, either from left to right or from right to left. In this way, the optimal placement position of each box can be obtained, and the index B < β is satisfied.

[0137] This method combines the DFS algorithm and the adaptability of the ship - loading principle, greatly improving the real - time response speed of the algorithm. Moreover, due to its good adaptability, the algorithm can output a stowage plan highly similar to traditional manual operations, that is, an operation plan that follows the physical laws of ship navigation and does not affect the ship's transportation efficiency and safety.

[0138] During the ship stowage process, reasonably determining the placement position of containers on the ship is of great significance for ensuring the balance, stability, and space utilization of the ship. This disclosure uses a central spiral search algorithm to optimize the placement position of containers. According to the container transportation sequence formulated in step 103, each container is successively placed on the ship according to certain rules as follows: Containers with the same destination are concentrated in one area for easy unloading and management; in the same area, containers should meet the requirement that containers with a larger weight ordinal number are as close to the middle as possible, containers with a smaller weight ordinal number are as close to the outside as possible, and containers placed in the same stack should strictly satisfy that containers with a larger weight ordinal number are below and containers with a smaller weight ordinal number are above. In addition, the height ordinal numbers of the containers stored in each stack should meet the requirements of the ship's hull. Through these rules, the center - of - gravity distribution of the ship is ensured to be reasonable, the navigation stability is improved, at the same time, the space of the ship is utilized to the maximum extent, the cargo transportation volume of a single voyage is increased, and the transportation efficiency is improved. Therefore, the method of this disclosure realizes efficient and reasonable container ship stowage, improving the terminal operation efficiency and the ship navigation stability.

[0139] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.

[0140] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.

[0141] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms for implementing the claims.

Claims

1. A method for assembling a shipping container based on sequence generation and search, characterized in that: include: Step 101: Encode the shipping container using a hybrid encoding method that integrates multiple container attributes; Step 102: Based on the encoding representation of the container, a hypergraph attention network is used to update the feature representation of the container; Step 103: Based on the container feature representation, a Transformer model based on an encoder-decoder architecture is used to predict the transportation sequence of containers in the port; Step 104: Based on the predicted shipping sequence of the containers, a central spiral search algorithm is used to determine the placement position of the containers on the ship.

2. The method for assembling a shipping container based on sequence generation and search according to claim 1, characterized in that: Step 101 includes: According to the different types of attributes of containers, multiple attributes of containers are encoded to obtain the feature vector of the numerical representation of the container, where the attributes of the container include: the ID and destination of the container; the weight and height of the container; the layer of the container in the field where the container is located; whether the container needs to be transported and the container model; Divide the stacking layer data of the field area according to the data position, extract the location information of the field area and the position of the container in the vertical direction of the stack; convert the attribute data of the container into a unified numerical form by performing the encoding; In order to integrate the attribute information of the container, the feature vectors in numerical form are concatenated, and then a feedforward neural network (FFN) is used to capture the nonlinear dependencies between the features, as shown below: ; ; In the formula, is the concatenated feature vector, n is the number of container features, is a learnable parameter, X 1、 X 2、 X n is the initialization embedding of different features of the container, X is the container feature, and ReLU is the activation function.

3. The method for assembling a shipping container based on sequence generation and search according to claim 1, characterized in that: Step 102 includes: A hypergraph structure is constructed based on the characteristics of the containers, where each container constitutes a node in the hypergraph, and containers with the same characteristics establish hyperedges. The hypergraph structure is as follows: ; ; In the formula To construct a hypergraph, is the set and number of nodes, is the set sum of hyperedges, is a Boolean matrix, representing the connection relationship of the hypergraph. Being surpassed The value is 1 when connected, otherwise it is 0; H v,e is a 0 / 1 variable, indicating the connection relationship between the hyperedge and the node; For the super edge Each node contained , by aggregating the initial node features, we get the feature representation of the hyperedge : ; In the formula, is the ReLU activation function, is the trainable weight matrix, is the attention coefficient; After obtaining the feature representation of the hyperedge, a new aggregator is defined to aggregate all the hyperedges of each node to obtain the updated node features, which are expressed as : ; Where W2 is the trainable weight matrix.

4. The method for assembling a shipping container based on sequence generation and search according to claim 1, characterized in that: Step 103 includes: The container transport sequence prediction problem is reduced to a sequence-to-sequence problem: given a random container sequence, an ordered set sequence is obtained after modeling and processing to represent the container transport sequence; For the container feature X, three learnable weight matrices are defined to map the input into a query vector Q, a key vector K, and a value vector V: ; ; ; In the formula is the trainable weight matrix, is the feature embedding dimension of the container, ; For each query vector , calculate it and all key vectors Similarity: ; In the formula, For vector The transpose of is the attention score, which captures the pairwise relationship in the input elements. When the value is larger, the container and The stronger the correlation between them, the Softmax function is then used to Normalize to get the attention weight; finally, add the attention weight to the value vector to get the final attention output: ; In the formula, is the transposed matrix of the key vector K; in order to allow each container to capture feature information at different levels, a multi-head attention mechanism is used to concatenate the self-attention outputs, as follows: ; In the formula is the number of heads, ; After linear transformation and layer normalization of the concatenated results of the multi-head attention, the final multi-head attention output is obtained: ; ; In the formula, are trainable parameters, X attn is the output of multi-head attention, X input is the original feature input; then the multi-head attention output is passed through the feedforward neural network to obtain the output of the encoder: ; In the decoder of the model, there are multi-head self-attention mechanism, encoder-decoder attention mechanism and feedforward neural network; the multi-head self-attention mechanism in the decoder is used to perform attention calculation on the target sequence: ; In the formula, Y attn is the output of the masked multi-head attention, is the target sequence, i.e. the exact order of container arrival, is the mask matrix, used to shield future information; The encoder-decoder attention mechanism allows the decoder to pay attention to the output of the encoder; the encoder-decoder attention mechanism , ; ; In the formula, Y enc-dec is the output of the cross-head attention mechanism; Then, like the encoder, after the feedforward neural network and layer normalization, the final output of the decoder is Y dec for: ; The output of the decoder passes through a linear layer and a Softmax function to obtain the prediction probability of each container step: ; In the formula, W , b are learnable parameters.

5. The method for assembling a shipping container based on sequence generation and search according to claim 1, characterized in that: Step 104 includes: According to the transportation sequence of the containers predicted in step 103, each container is put on the ship in turn according to the preset rules. The preset rules include: containers with the same destination are put in one area for unloading and management; in the same area, containers with larger weight numbers are placed in the middle, and containers with smaller weight numbers are placed relatively outside, and containers placed in the same stack meet the requirements that containers with larger weight numbers are at the bottom and containers with smaller weight numbers are at the top; the height numbers of the containers stored in each stack are consistent with the corresponding hull.

Citation Information

Patent Citations

  • Time sequence anomaly detection method and system based on hypergraph attention network

    CN117290800A

  • Goods taking and delivery sequence prediction method based on multi-target deep reinforcement learning

    CN118446613A

  • Multi-decoder dynamic attention model for container turnover

    CN118965953A

  • Article sales prediction method and device

    CN119722165A

  • Marine container position distribution method based on attribute double-view stack learning network

    CN119849749A