Intelligent Scheduling Method and System Applied to Marine Consolidated Containers
By extracting dynamic path feature features and matching dynamic strategy of sea assembled box scheduling data, a clear route adjustment and port resource allocation direction are generated, which solves the problem that existing scheduling methods cannot adapt to complex transportation needs, and realizes the intelligence and efficiency of sea assembled box scheduling.
Patent Information
- Application Number
- CN202510480111.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-04-17
AI Technical Summary
The existing shipping assembled box scheduling methods lack in-depth mining and utilization of historical scheduling data and cannot be dynamically adjusted, resulting in the scheduling strategy being unable to adapt to complex and changeable transportation needs, inefficient, untimely route adjustments, and unreasonable port resource allocation.
By obtaining the historical assembled box scheduling data under the target shipping route, dynamic path feature extraction is performed, real-time environmental correlation characteristics and path optimization characteristics are generated, and dynamic strategy matching is used to use the preset dynamic strategy matching network to generate route adjustments and port resource allocation directions, and dynamic strategy matching network is trained to update network parameters.
It realizes the intelligence and efficiency of shipping assembled boxes, improves the accuracy and adaptability of scheduling strategies, can flexibly adjust according to the actual environment and path conditions, and improves the flexibility and response speed of scheduling.
Smart Images

Figure CN119990947B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology. Specifically, it relates to an intelligent scheduling method and system applied to sea freight consolidation. Background Art
[0002] In the field of sea freight logistics, the scheduling of consolidated containers is an extremely complex and crucial task, and its efficiency and accuracy directly affect the operation efficiency of the entire sea freight supply chain. Traditional methods for scheduling consolidated containers mainly rely on manual experience and fixed scheduling rules. These methods are unable to cope when faced with the increasing sea freight demand, complex shipping networks, and changing port conditions.
[0003] Specifically, existing scheduling methods often lack in-depth mining and utilization of historical scheduling data. Although basic information such as the starting position, destination port, and loaded goods of the consolidated containers is recorded, most of these data are in a scattered and isolated state and do not form an effective data set for further analysis. Due to the lack of extraction of information such as path features and environmental correlations hidden in historical scheduling data, it is difficult to fully consider various dynamic factors in the actual transportation process when formulating scheduling strategies, such as weather changes, port congestion conditions, and the impact of cargo characteristics on the transportation path.
[0004] In addition, the traditional method of matching scheduling strategies is relatively rigid, usually based on preset fixed rules, and cannot be flexibly adjusted according to the actual transportation environment and path conditions. This static method of matching strategies often fails to make effective responses in the face of emergencies or complex and changing transportation demands, resulting in frequent problems such as low scheduling efficiency, untimely route adjustment, and unreasonable allocation of port resources. At the same time, existing scheduling methods lack an effective self-optimization mechanism. Once a scheduling strategy is formulated, it is often difficult to dynamically adjust and optimize it according to the actual execution situation, and it is unable to learn and improve from each scheduling practice, thus limiting the improvement of the scheduling level. Summary of the Invention
[0005] In view of the problems mentioned above, in combination with the first aspect of the present invention, embodiments of the present invention provide an intelligent scheduling method applied to sea freight consolidation, and the method includes:
[0006] Obtain a historical consolidated container scheduling data set under a target sea freight route, where the historical consolidated container scheduling data set includes a plurality of scheduling sequences, and each scheduling sequence is composed of at least one starting position feature, destination port feature, loaded cargo attribute feature, and historical path trajectory feature of a consolidated container;
[0007] Perform dynamic path feature extraction processing on the historical consolidated container scheduling data set to obtain real-time environment correlation features and path optimization features of each scheduling sequence;
[0008] Based on a preset dynamic policy matching network, perform dynamic policy matching on the real-time environment association features and the path optimization features to generate a path annotation result of the scheduling sequence, where the path annotation result is used to indicate the route adjustment direction and port resource allocation direction of the scheduling sequence;
[0009] Generate a container stuffing and scheduling optimization policy set according to the path annotation result, and train the dynamic policy matching network based on the container stuffing and scheduling optimization policy set to update network parameters.
[0010] In a possible implementation manner of the first aspect, the processing of extracting dynamic path features from the historical container stuffing and scheduling data set to obtain the real-time environment association features and path optimization features of each scheduling sequence includes:
[0011] Extract multiple trajectory point data units corresponding to the historical path trajectory features from the scheduling sequence, and each trajectory point data unit includes a position coordinate, a timestamp, and corresponding environmental monitoring data;
[0012] Call a pre-trained path feature encoder to perform spatio-temporal association encoding processing on the multiple trajectory point data units to generate a spatio-temporal fusion vector of the scheduling sequence, where the spatio-temporal fusion vector includes the path deviation degree and environmental fluctuation association degree between adjacent trajectory points;
[0013] Perform port resource matching processing on the starting position feature and the target port feature in the scheduling sequence to obtain port resource constraint features, where the port resource constraint features include at least one of the following: the idle period of the berth at the target port, the available quantity of handling equipment, and the cargo stacking density limit;
[0014] Concatenate the spatio-temporal fusion vector and the port resource constraint features to generate the real-time environment association features;
[0015] Perform risk grading processing on the loaded cargo attribute features in the scheduling sequence to obtain cargo transportation priority features, and perform dynamic weighted fusion of the cargo transportation priority features and the spatio-temporal fusion vector to generate the path optimization features.
[0016] In a possible implementation manner of the first aspect, the calling of the pre-trained path feature encoder to perform spatio-temporal association encoding processing on the multiple trajectory point data units to generate the spatio-temporal fusion vector of the scheduling sequence includes:
[0017] For each trajectory point data unit, extract the wind speed, wave height, and ocean current direction parameters in the environmental monitoring data to construct an environmental fluctuation matrix;
[0018] Perform geographic grid encoding on the position coordinates to generate a standardized position encoding vector, and convert the timestamp into a periodic time encoding vector;
[0019] Input the environmental fluctuation matrix, the standardized position encoding vector, and the periodic time encoding vector into the path feature encoder for multi-head attention calculation to obtain the local environmental association vector of each trajectory point data unit;
[0020] Calculate the trajectory point association weight according to the time interval and distance interval between adjacent trajectory point data units, and perform sliding window aggregation on the local environmental association vector based on the trajectory point association weight to generate the spatio-temporal fusion vector.
[0021] In a possible implementation manner of the first aspect, the risk grading process for the loaded cargo attribute features in the scheduling sequence to obtain the cargo transportation priority features includes:
[0022] Extract the cargo type, weight distribution, and temperature control requirement parameters in the loaded cargo attribute features to construct a cargo attribute matrix;
[0023] Call a pre-trained risk assessment model to determine the cargo damage risk score, transportation urgency score, and priority coefficient according to the cargo attribute matrix;
[0024] Generate an initial priority feature according to the weighted sum of the cargo damage risk score and the transportation urgency score;
[0025] Perform a non-linear transformation on the initial priority feature based on the priority coefficient to obtain the cargo transportation priority feature, where the non-linear transformation includes mapping the initial priority feature to a preset priority interval through a Sigmoid function.
[0026] In a possible implementation manner of the first aspect, the dynamic weighted fusion of the cargo transportation priority feature and the spatio-temporal fusion vector to generate the path optimization feature includes:
[0027] Perform feature dimension expansion on the cargo transportation priority feature to make its dimension consistent with that of the spatio-temporal fusion vector;
[0028] Calculate the cosine similarity between the expanded cargo transportation priority feature and the spatio-temporal fusion vector to generate a dynamic weight coefficient;
[0029] Perform weighted summation on the cargo transportation priority feature and the spatio-temporal fusion vector according to the dynamic weight coefficient to generate a fusion intermediate feature;
[0030] Perform dimensionality reduction on the fused intermediate feature to obtain the path optimization feature, where the dimensionality reduction includes mapping the high-dimensional feature to a low-dimensional space through a fully connected layer and retaining the feature component with the largest variance.
[0031] In a possible implementation manner of the first aspect, performing dynamic policy matching on the real-time environment associated feature and the path optimization feature based on a preset dynamic policy matching network to generate a path annotation result of the scheduling sequence includes:
[0032] Input the real-time environment associated feature into the environment perception branch of the dynamic policy matching network to generate an environment constraint policy vector;
[0033] Input the path optimization feature into the path optimization branch of the dynamic policy matching network to generate a path adjustment policy vector;
[0034] Perform cross-attention calculation on the environment constraint policy vector and the path adjustment policy vector to generate a policy interaction matrix;
[0035] Screen key policy channels according to the values of each element in the policy interaction matrix, and generate a policy fusion vector through channel weighted pooling;
[0036] Input the policy fusion vector into a label classifier to output the path annotation result, where the label classifier includes multiple fully connected layers and a Softmax layer for mapping continuous features to discrete label categories.
[0037] In a possible implementation manner of the first aspect, screening key policy channels according to the values of each element in the policy interaction matrix and generating a policy fusion vector through channel weighted pooling includes:
[0038] Perform global average pooling on the policy interaction matrix along the channel dimension to generate a channel importance score;
[0039] Screen out target channels with channel importance scores higher than the importance threshold according to a preset importance threshold, and extract the policy interaction sub-matrix corresponding to the target channels;
[0040] Perform a max pooling operation on the policy interaction sub-matrix to obtain channel significant features;
[0041] Multiply the channel significant features and the policy interaction sub-matrix element by element to generate weighted policy interaction features;
[0042] Flatten the weighted policy interaction features to obtain the policy fusion vector.
[0043] In a possible implementation of the first aspect, generating the container shipping scheduling optimization policy set according to the path annotation result includes:
[0044] Analyze the route adjustment direction in the path annotation result to generate at least one candidate route adjustment plan, and each candidate route adjustment plan includes a route offset angle, an adjustment distance, and an estimated time loss;
[0045] Analyze the port resource allocation direction in the path annotation result to generate port resource allocation constraint conditions, and the constraint conditions include berth occupancy period limits, the number of allocated handling equipment, and cargo storage area identifiers;
[0046] Verify the feasibility of the candidate route adjustment plans, and screen out the effective adjustment plans that meet the port resource allocation constraint conditions;
[0047] Calculate a comprehensive optimization score based on the estimated time loss and path offset degree in the effective adjustment plan, and generate the container shipping scheduling optimization policy set by sorting according to the comprehensive optimization score.
[0048] In a possible implementation of the first aspect, verifying the feasibility of the candidate route adjustment plans and screening out the effective adjustment plans that meet the port resource allocation constraint conditions includes:
[0049] Extract the berth idle period in the port resource allocation constraint conditions, and match it with the estimated arrival time in the candidate route adjustment plan, and eliminate the adjustment plans whose arrival time exceeds the idle period;
[0050] Extract the number of allocated handling equipment, calculate the equipment quantity required for the candidate route adjustment plan, and eliminate the adjustment plans whose equipment requirements exceed the available quantity;
[0051] Extract the cargo storage area identifier, verify whether the cargo type corresponding to the candidate route adjustment plan is allowed to enter the target storage area, and eliminate the adjustment plans that violate the storage rules, thereby generating the effective adjustment plans that meet the port resource allocation constraint conditions.
[0052] In a possible implementation of the first aspect, training the dynamic policy matching network based on the container shipping scheduling optimization policy set to update the network parameters includes:
[0053] Extract the policy execution result data from the container shipping scheduling optimization policy set, and the policy execution result data includes the time loss, resource utilization rate, and cargo damage rate after the actual route adjustment;
[0054] Construct a strategy effect evaluation function, generate a time error loss according to the difference between the time loss after adjusting the actual shipping route and the estimated time loss, generate a resource loss according to the deviation degree of the resource utilization rate from the preset threshold, and generate a risk loss according to the cargo damage rate;
[0055] Perform a weighted sum of the time error loss, the resource loss, and the risk loss to obtain a total training loss;
[0056] Use the gradient descent algorithm to update the parameters of the dynamic policy matching network based on the total training loss until the total training loss converges to a stable interval.
[0057] On the other hand, an embodiment of the present invention further provides a shipping Internet of Things management system, including a processor and a machine-readable storage medium. The machine-readable storage medium is connected to the processor. The machine-readable storage medium is used to store programs, instructions, or codes, and the processor is used to execute the programs, instructions, or codes in the machine-readable storage medium to implement the above method.
[0058] Based on the above aspects, the embodiments of the present invention achieve the intelligence and high efficiency of sea freight consolidation scheduling, and significantly improve the accuracy and adaptability of the scheduling strategy. Specifically, by obtaining the historical freight consolidation scheduling data set under the target sea freight route and performing dynamic path feature extraction processing on it, it is possible to deeply mine the real-time environment correlation features and path optimization features of each scheduling sequence. Based on the preset dynamic policy matching network, the real-time environment correlation features and path optimization features are dynamically matched to generate a path annotation result with a clear shipping route adjustment direction and port resource allocation direction, enabling the scheduling strategy to be flexibly adjusted according to the actual environment and path conditions, greatly improving the flexibility and response speed of the scheduling. Further, generating a freight consolidation scheduling optimization strategy set according to the path annotation result and training the dynamic policy matching network based on the freight consolidation scheduling optimization strategy set to update the network parameters can not only continuously optimize the scheduling strategy and improve the scheduling efficiency, but also adapt to the changing sea freight environment and market demands. Description of the Drawings
[0059] Figure 1 is a schematic execution flow diagram of the intelligent scheduling method applied to sea freight consolidation provided by the embodiment of the present invention.
[0060] Figure 2 is a schematic diagram of an exemplary hardware and software component of the shipping Internet of Things management system provided by the embodiment of the present invention. Detailed Embodiments
[0061] The present invention will be specifically described below in conjunction with the drawings in the specification. Figure 1It is a schematic flowchart of an intelligent scheduling method for ocean shipping consolidation provided by an embodiment of the present invention. The intelligent scheduling method for ocean shipping consolidation will be introduced in detail below.
[0062] Step S110: Obtain a historical shipping consolidation scheduling data set under a target ocean shipping route. The historical shipping consolidation scheduling data set includes multiple scheduling sequences, and each scheduling sequence is composed of at least one starting position feature, target port feature, loaded cargo attribute feature, and historical path trajectory feature of a shipping consolidation.
[0063] To achieve intelligent scheduling of ocean shipping consolidation, it is first necessary to obtain a historical shipping consolidation scheduling data set under a target ocean shipping route. For example, the historical shipping consolidation scheduling data can be collected with the help of the operation database of shipping companies, port management systems, and relevant logistics information platforms, which cover the shipping consolidation transportation situations on this ocean shipping route during different time periods.
[0064] Specifically, assume that the target ocean shipping route is a busy route connecting multiple large ports. The historical shipping consolidation scheduling data set collected contains 1000 scheduling sequences, and each scheduling sequence represents a shipping consolidation transportation task, including multiple key features.
[0065] Among them, in terms of the starting position feature, taking one of the scheduling sequences as an example, the starting port of the shipping consolidation is located at 123 degrees east longitude and 35 degrees north latitude. This port is a comprehensive port with various loading and unloading facilities and service functions. The surrounding transportation network is developed, facilitating the collection and transfer of goods. The facility types at the starting port include container terminals, bulk cargo terminals, storage areas, etc. Different facility types have an important impact on the loading and unloading efficiency and transportation arrangement of the shipping consolidation. For example, container terminals are equipped with advanced cranes and automated equipment, which can quickly complete the loading and unloading operations of the shipping consolidation; while bulk cargo terminals are more suitable for handling the loading and unloading of some bulk goods.
[0066] In terms of the target port feature, the target port of this shipping consolidation is located at 130 degrees east longitude and 38 degrees north latitude. It is an important hub port with a large number of berths, advanced loading and unloading equipment, and a complete logistics service system. The type of the target port is a container - dedicated port, and its maximum throughput is 5 million standard containers per year. The busyness and operation status of the port will affect the arrival time, loading and unloading arrangement, and subsequent transportation connection of the shipping consolidation. For example, during the peak period of the port, the shipping consolidation may need to queue for a berth, resulting in a delay in the arrival time; while when the port operates efficiently, the loading and unloading operations can be completed quickly, shortening the transportation cycle.
[0067] The attribute characteristics of loaded goods include information about many aspects of the goods. For example, the types of goods loaded in the LCL are mainly electronic products, textiles and food. Electronic products are of high value and easy to damage, and have high requirements for the stability and safety of the transportation environment; textiles are relatively resistant to transportation, but attention should be paid to moisture and fire prevention; food goods have strict preservation and hygiene requirements, and some foods also need to be transported under specific temperature and humidity conditions. The weight distribution of the goods is 30 tons of electronic products, 40 tons of textiles, and 30 tons of food, with a total weight of 100 tons. Different weight distributions of goods will affect the center of gravity balance and transportation stability of the LCL, and the stacking position of the goods needs to be reasonably arranged during loading, unloading and transportation. In addition, food goods have strict requirements for temperature control and need to be transported in an environment of 2-8 degrees Celsius. This requires the LCL to be equipped with corresponding temperature control equipment and monitor temperature changes in real time during transportation.
[0068] The historical path trajectory feature records the information of each track point that the LCL passes through during transportation. For example, through the satellite positioning system and sensor equipment, the location coordinates, timestamp and corresponding environmental monitoring data of each track point can be obtained. Assume that the LCL passes through 20 track points during transportation, the location coordinates of track point 1 are 124 degrees east longitude and 36 degrees north latitude, and the timestamp is 10:00 on January 1, 2024. The environmental monitoring data at this time shows that the wind speed is 5 meters per second, the wave height is 1 meter, and the ocean current direction is due east. As the transportation progresses, the environmental conditions of each track point will change, and these changes will affect the transportation path and speed of the LCL. For example, when encountering strong winds or high waves, the ship may need to adjust the route to ensure navigation safety; while the downstream ocean current can increase the ship's sailing speed and shorten the transportation time.
[0069] Step S120: performing dynamic path feature extraction processing on the historical LCL scheduling data set to obtain real-time environment association features and path optimization features of each scheduling sequence.
[0070] In this embodiment, after obtaining the historical LCL scheduling data set, it is necessary to perform dynamic path feature extraction processing on it to mine the real-time environment association features and path optimization features of each scheduling sequence. The specific processing process is as follows:
[0071] Step S121: extracting a plurality of trajectory point data units corresponding to the historical path trajectory features from the scheduling sequence, each trajectory point data unit including a location coordinate, a timestamp and corresponding environmental monitoring data.
[0072] For example, taking the scheduling sequence containing 20 trajectory points mentioned earlier as an example, a detailed analysis is carried out on its historical path trajectory characteristics. Through data parsing and collation, relevant information of each trajectory point is extracted to form a trajectory point data unit.
[0073] Exemplarily, for trajectory point 1, its position coordinates are 124 degrees east longitude and 36 degrees north latitude, and this coordinate information accurately determines the position of this trajectory point in the geographical space. The timestamp is 10:00 on January 1, 2024, recording the specific time when the shipping container arrives at this trajectory point. The environmental monitoring data shows that the wind speed is 5 meters per second, the wave height is 1 meter, and the ocean current direction is due east. These environmental data reflect the ocean environmental conditions at that time and have a certain impact on the transportation of the shipping container.
[0074] The position coordinates of trajectory point 2 are 125 degrees east longitude and 36.5 degrees north latitude, and the timestamp is 12:00 on January 1, 2024. At this time, the wind speed changes to 6 meters per second, the wave height is 1.2 meters, and the ocean current direction is still due east. As time goes by and the position changes, the environmental conditions are also constantly changing. By extracting and analyzing each trajectory point data unit, the environmental change situation experienced by the shipping container during transportation can be understood.
[0075] Step S122: Invoke a pre-trained path feature encoder to perform spatio-temporal correlation encoding processing on the multiple trajectory point data units to generate a spatio-temporal fusion vector of the scheduling sequence, where the spatio-temporal fusion vector includes the path deviation degree and the environmental fluctuation correlation degree between adjacent trajectory points.
[0076] To generate the spatio-temporal fusion vector of the scheduling sequence, it is necessary to invoke a pre-trained path feature encoder to perform spatio-temporal correlation encoding processing on multiple trajectory point data units. The pre-trained path feature encoder is trained based on a large amount of historical trajectory data and can effectively capture the spatio-temporal correlation information between trajectory points. The specific steps are as follows:
[0077] Step S1221: For each trajectory point data unit, extract the wind speed, wave height, and ocean current direction parameters from the environmental monitoring data to construct an environmental fluctuation matrix.
[0078] Still taking trajectory point 1 as an example, the wind speed in its environmental monitoring data is 5 meters per second, the wave height is 1 meter, and the ocean current direction is due east. Thus, these parameters can be sorted and combined to construct an environmental fluctuation matrix. Assuming that the wind speed, wave height, and ocean current direction are respectively used as the three dimensions of the matrix, then the environmental fluctuation matrix of trajectory point 1 can be expressed as [5, 1, due east]. Here, the due east direction can be further quantified. For example, if the due east direction is defined as angle 0 degrees, then this environmental fluctuation matrix can be more precisely expressed as [5, 1, 0].
[0079] For trajectory point 2, its wind speed is 6 meters per second, the wave height is 1.2 meters, and the ocean current direction is still due east. The corresponding environmental fluctuation matrix is [6, 1.2, 0]. By processing the environmental monitoring data of each trajectory point data unit, the corresponding environmental fluctuation matrices are constructed, and these environmental fluctuation matrices can intuitively reflect the environmental fluctuation conditions of each trajectory point.
[0080] Step S1222: Perform geographical grid coding on the position coordinates to generate a standardized position coding vector, and convert the time stamp into a periodic time coding vector.
[0081] In this embodiment, geographical grid coding maps geographical location coordinates into a regular grid system to facilitate unified processing and analysis of location information. The geographical grid coding system can divide the earth's surface into grid units of equal size, and each grid unit has a unique code. For the position coordinates of trajectory point 1, 124 degrees east longitude and 36 degrees north latitude, by querying the geographical grid coding table, it is mapped to the corresponding grid unit, and the geographical grid coding of this trajectory point is obtained as G123. Convert the geographical grid coding into a standardized position coding vector. For example, the geographical grid coding can be represented as a binary vector with a length of 10, and the binary vector corresponding to G123 is [0, 0, 1, 0, 0, 1, 1, 0, 0, 1].
[0082] Converting the time stamp into a periodic time coding vector is to capture the periodic characteristics of time. Specifically, the time stamp can be divided according to a certain period. For example, taking one day as a period, convert 10:00 on January 1, 2024 into a periodic time coding vector. First, calculate the relative position of this time stamp in a day. The proportion of 10:00 in 24 hours of a day is 10 / 24≈0.42. Convert this proportion into a vector with a length of 10. Through the commonly predefined mapping rules in the prior art, the periodic time coding vector obtained is [0, 0, 0, 0, 0, 1, 0, 0, 0, 0].
[0083] For trajectory point 2, perform geographical grid coding and time stamp conversion in the same way to obtain its standardized position coding vector and periodic time coding vector. In this way, the position coordinates and time stamps are converted into unified coding vectors, which is convenient for subsequent multi-head attention calculation.
[0084] Step S1223: Input the environmental fluctuation matrix, the standardized position coding vector, and the periodic time coding vector into the path feature encoder for multi-head attention calculation to obtain the local environmental association vector of each trajectory point data unit.
[0085] In this embodiment, the multi-head attention calculation is the core operation in the path feature encoder, which can capture the correlation information between different features. By combining the environmental fluctuation matrix, the normalized position encoding vector, and the periodic time encoding vector of each trajectory point, a comprehensive input vector is formed.
[0086] Taking trajectory point 1 as an example, its environmental fluctuation matrix [5, 1, 0], normalized position encoding vector [0, 0, 1, 0, 0, 1, 1, 0, 0, 1], and periodic time encoding vector [0, 0, 0, 0, 0, 1, 0, 0, 0, 0] are concatenated together to obtain the input vector [5, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0].
[0087] Then, this input vector is input into the multi-head attention mechanism of the path feature encoder. The multi-head attention mechanism calculates the degree of association between different parts of the input vector in parallel through multiple attention heads. Each attention head generates a query vector, a key vector, and a value vector based on the input vector, and then calculates the similarity between the query vector and the key vector to obtain the attention weights. The attention weights are applied to the value vector to obtain the output result of each attention head. Finally, the output results of multiple attention heads are concatenated and linearly transformed to obtain the local environmental association vector of trajectory point 1. Suppose that after the multi-head attention calculation, the local environmental association vector of trajectory point 1 is [0.2, 0.3, 0.1, 0.4, 0.5, 0.2, 0.3, 0.1, 0.4, 0.5].
[0088] For trajectory point 2 and other trajectory points, the above operations are similarly performed to obtain their respective local environmental association vectors, which reflect the degree of association between each trajectory point and the surrounding environment.
[0089] Step S1224: Calculate the trajectory point association weight according to the time interval and distance interval between adjacent trajectory point data units, and perform sliding window aggregation on the local environmental association vector based on the trajectory point association weight to generate the spatio-temporal fusion vector.
[0090] In this embodiment, the time interval and distance interval between adjacent trajectory points are important indicators for measuring the degree of association between them. Still taking trajectory point 1 and trajectory point 2 as examples, the timestamp of trajectory point 1 is 10:00 on January 1, 2024, and the timestamp of trajectory point 2 is 12:00 on January 1, 2024, and the time interval is 2 hours. The distance interval between trajectory point 1 and trajectory point 2 is calculated through geographical coordinates. Suppose the calculated distance is 100 nautical miles.
[0091] Then, calculate the trajectory point correlation weight based on the time interval and distance interval. For example, a simple weighted calculation method can be adopted. For instance, after normalizing the time interval and distance interval, assign set weights respectively, and then add them to obtain the trajectory point correlation weight. Assume the weight of the time interval is 0.6 and the weight of the distance interval is 0.4. Normalize the time interval of 2 hours to the [0, 1] interval, which is 0.2, and normalize the distance interval of 100 nautical miles to the [0, 1] interval, which is 0.3. Then the trajectory point correlation weight between trajectory point 1 and trajectory point 2 is 0.6×0.2 + 0.4×0.3 = 0.24.
[0092] Then, process the local environment correlation vector using the method of sliding window aggregation. Assume the size of the sliding window is 3, that is, consider 3 adjacent trajectory points each time. For trajectory point 2, its sliding window includes trajectory point 1, trajectory point 2, and trajectory point 3. According to the calculated trajectory point correlation weight, perform weighted summation on the local environment correlation vectors of these 3 trajectory points. Assume the local environment correlation vectors of trajectory point 1, trajectory point 2, and trajectory point 3 are [0.2, 0.3, 0.1, 0.4, 0.5, 0.2, 0.3, 0.1, 0.4, 0.5], [0.3, 0.4, 0.2, 0.5, 0.6, 0.3, 0.4, 0.2, 0.5, 0.6], and [0.4, 0.5, 0.3, 0.6, 0.7, 0.4, 0.5, 0.3, 0.6, 0.7] respectively, and the correlation weight between trajectory point 1 and trajectory point 2 is 0.24, and the correlation weight between trajectory point 2 and trajectory point 3 is 0.26. Then the intermediate result obtained after weighted summation is 0.24×[0.2, 0.3, 0.1, 0.4, 0.5, 0.2, 0.3, 0.1, 0.4, 0.5] + 1×[0.3, 0.4, 0.2, 0.5, 0.6, 0.3, 0.4, 0.2, 0.5, 0.6] + 0.26×[0.4, 0.5, 0.3, 0.6, 0.7, 0.4, 0.5, 0.3, 0.6, 0.7].
[0093] Next, further process the intermediate result, such as a normalization operation, to obtain the final spatio-temporal fusion vector. Assume that after normalization, the spatio-temporal fusion vector corresponding to trajectory point 2 is [0.25, 0.35, 0.15, 0.45, 0.55, 0.25, 0.35, 0.15, 0.45, 0.55]. In this way, process each trajectory point to obtain the spatio-temporal fusion vector of the entire scheduling sequence, which contains important information such as the path deviation degree and environmental fluctuation correlation degree between adjacent trajectory points.
[0094] Step S123: Perform port resource matching processing on the starting position feature and the target port feature in the scheduling sequence to obtain port resource constraint features, where the port resource constraint features include at least one of the following: the idle period of the berth at the target port, the available quantity of handling equipment, and the cargo stacking density limit.
[0095] In this embodiment, the starting position feature and the target port feature contain important information related to port resources. By performing port resource matching processing on this information, the port resource constraint features are determined.
[0096] For the target port, by interacting with the port management system, information such as the idle period of its berth, the available quantity of handling equipment, and the cargo stacking density limit is obtained. Suppose the target port has a total of 20 berths, and during the period from January 5th to January 7th, 2024, 5 berths are in the idle state, which is the idle period of the berth at the target port during this time period.
[0097] Regarding the available quantity of handling equipment, the target port is equipped with 10 cranes and 20 forklifts. Currently, 3 cranes and 5 forklifts are in use. Then the current available number of cranes is 7, and the available number of forklifts is 15.
[0098] The cargo stacking density limit means that the port has certain requirements for the stacking density of different types of goods. For example, for container goods, the port stipulates that the stacking density per square meter cannot exceed 5 tons; for bulk goods, the stacking density per cubic meter cannot exceed 2 tons.
[0099] These information are sorted and integrated to obtain port resource constraint features. These features will have an important impact on the scheduling and transportation of consolidated containers. For example, when arranging the arrival time of consolidated containers at the port, the idle period of the berth needs to be considered; when performing loading and unloading operations, reasonable arrangements need to be made according to the available quantity of handling equipment; when stacking goods, the cargo stacking density limit needs to be observed.
[0100] Step S124: Concatenate the spatio-temporal fusion vector with the port resource constraint features to generate the real-time environment association feature.
[0101] In this embodiment, the previously obtained spatio-temporal fusion vector and port resource constraint features can be concatenated to generate the real-time environment association feature. Suppose the spatio-temporal fusion vector is [0.25, 0.35, 0.15, 0.45, 0.55, 0.25, 0.35, 0.15, 0.45, 0.55], and the port resource constraint features are represented as [5 berth idle periods (from January 5th to January 7th, 2024), 7 available cranes, 15 available forklifts, container stacking density limit not exceeding 5 tons per square meter, bulk goods stacking density limit not exceeding 2 tons per cubic meter].
[0102] For splicing, it is necessary to quantify the port resource constraint features. For example, convert the berth idle period into a time period coding vector, convert the number of available cranes and forklifts into a numerical vector, and convert the cargo stacking density limit into a constraint condition vector. Suppose that after quantification, the vector corresponding to the port resource constraint features is [0.5, 0.7, 0.15, 0.5, 0.2]. Splice the spatio-temporal fusion vector and the quantified port resource constraint feature vector to obtain a real-time environment correlation feature vector [0.25, 0.35, 0.15, 0.45, 0.55, 0.25, 0.35, 0.15, 0.45, 0.55, 0.5, 0.7, 0.15, 0.5, 0.2]. This real-time environment correlation feature vector synthesizes the spatio-temporal information and port resource constraint information in the container shipping process and can more comprehensively reflect the current transportation environment.
[0103] Step S125: Perform risk grading on the loaded cargo attribute features in the scheduling sequence to obtain cargo transportation priority features, and dynamically weighted fuse the cargo transportation priority features with the spatio-temporal fusion vector to generate the path optimization features.
[0104] To achieve more reasonable path planning, it is necessary to perform risk grading on the loaded cargo attribute features in the scheduling sequence to determine the cargo transportation priority features, and then dynamically weighted fuse them with the spatio-temporal fusion vector to generate the path optimization features. The specific steps are as follows:
[0105] Step S1251: Extract the cargo type, weight distribution, and temperature control requirement parameters in the loaded cargo attribute features to construct a cargo attribute matrix.
[0106] Continuing with the previously mentioned container as an example, its loaded cargo attribute features include cargo type (electronic products, textiles, food), weight distribution (30 tons of electronic products, 40 tons of textiles, 30 tons of food), and temperature control requirements (food needs to be maintained at 2-8 degrees Celsius). Organize and combine these parameters to construct a cargo attribute matrix. The cargo type, weight distribution, and temperature control requirements can be used as different dimensions of the matrix respectively.
[0107] Suppose electronic products, textiles, and food are coded as 1, 2, and 3 respectively, the cargo weight distribution is represented by the actual weight value, and the temperature control requirement is coded according to whether temperature control is required and the temperature control range. Then this cargo attribute matrix can be expressed as:
[0108] | Cargo type code | Weight (tons) | Temperature control requirement code |
[0109] |----|----|----|
[0110] |1|30|0 (No special temperature control for electronic products)|
[0111] |2|40|0 (No special temperature control for textiles)|
[0112] |3|30|1 (Food requires temperature control at 2 - 8 degrees Celsius)|
[0113] Thus, the above - mentioned cargo attribute matrix comprehensively reflects the basic attribute information of the goods in the consolidated container.
[0114] Step S1252: Invoke the pre - trained risk assessment model to determine the cargo damage risk score, transportation urgency score, and priority coefficient according to the cargo attribute matrix.
[0115] In this embodiment, the pre - trained risk assessment model is trained based on a large amount of historical cargo transportation data and can accurately evaluate the cargo damage risk, transportation urgency, and priority coefficient according to the cargo attribute matrix.
[0116] Thus, the above - mentioned cargo attribute matrix can be input into the pre - trained risk assessment model. For electronic products, due to their high value and susceptibility to damage, the model gives a cargo damage risk score of 8 points (out of 10) according to the information in the cargo attribute matrix, considering factors such as their transportation environment requirements. Because the delivery time of electronic products may have an important impact on subsequent production or sales, the transportation urgency score is 7 points.
[0117] Textiles are relatively transport - resistant and have a low damage risk. The model gives a cargo damage risk score of 3 points. Its transportation urgency is evaluated as 4 points according to factors such as market demand and delivery time.
[0118] Food has strict freshness - preservation requirements, so the cargo damage risk score is 7 points. If this batch of food is supplied to some markets with extremely high freshness requirements, the transportation urgency score is 8 points.
[0119] Based on the above scores, the risk assessment model further calculates the priority coefficient. The calculation of the priority coefficient can adopt a weighted comprehensive method. For example, consider that the proportion of the cargo damage risk score is 0.6 and the proportion of the transportation urgency score is 0.4. For electronic products, the priority coefficient = 0.6×8 + 0.4×7 = 7.6; for textiles, the priority coefficient = 0.6×3 + 0.4×4 = 3.4; for food, the priority coefficient = 0.6×7 + 0.4×8 = 7.4.
[0120] Among them, the training of the above - mentioned risk assessment model can refer to the common training processes in conventional existing technologies.
[0121] Step S1253: Generate an initial priority feature based on the weighted sum of the goods damage risk score and the transportation urgency score.
[0122] In this embodiment, the weighted sum of the goods damage risk score and the transportation urgency score is calculated to generate an initial priority feature. Assume that the weight of the goods damage risk score is 0.7 and the weight of the transportation urgency score is 0.3.
[0123] For electronic products, the initial priority feature = 0.7×8 + 0.3×7 = 7.7; for textiles, the initial priority feature = 0.7×3 + 0.3×4 = 3.3; for food, the initial priority feature = 0.7×7 + 0.3×8 = 7.3.
[0124] Next, combine these initial priority features into a vector. Assume that in the order of electronic products, textiles, and food, the initial priority feature vector is [7.7, 3.3, 7.3].
[0125] Step S1254: Perform a non - linear transformation on the initial priority feature based on the priority coefficient to obtain the goods transportation priority feature, where the non - linear transformation includes mapping the initial priority feature to a preset priority interval through the Sigmoid function.
[0126] To map the initial priority feature to a suitable priority interval, a non - linear transformation is performed using the Sigmoid function. The formula of the Sigmoid function is S(x)=1 / (1 + e^(-x)), which can map the input value to the interval (0, 1).
[0127] For the initial priority feature vector [7.7, 3.3, 7.3], substitute each value into the Sigmoid function for calculation.
[0128] For 7.7, S(7.7)=1 / (1 + e^(-7.7)), and through calculation, it is approximately 0.999. For 3.3, S(3.3)=1 / (1 + e^(-3.3)), approximately 0.964. For 7.3, S(7.3)=1 / (1 + e^(-7.3)), approximately 0.998.
[0129] Finally, combine these calculation results into a goods transportation priority feature vector [0.999, 0.964, 0.998]. This goods transportation priority feature vector represents the transportation priorities of different types of goods, and the closer the value is to 1, the higher the priority.
[0130] Step S1255: Dynamically weight - fuse the goods transportation priority feature and the spatio - temporal fusion vector to generate the path optimization feature.
[0131] In this embodiment, in order to generate the path optimization feature, it is necessary to dynamically and weightedly fuse the goods transportation priority feature and the spatio-temporal fusion vector. The specific steps are as follows:
[0132] Step S1255-1: Expand the dimension of the goods transportation priority feature so that it is consistent with the dimension of the spatio-temporal fusion vector.
[0133] For example, the goods transportation priority feature vector is [0.999, 0.964, 0.998], and the spatio-temporal fusion vector is [0.25, 0.35, 0.15, 0.45, 0.55, 0.25, 0.35, 0.15, 0.45, 0.55]. In order to make the dimensions of the two consistent, it is necessary to expand the goods transportation priority feature.
[0134] Exemplarily, the method of repeated filling can be used for dimension expansion. Assume that the dimension of the spatio-temporal fusion vector is 10 and the dimension of the goods transportation priority feature vector is 3. The goods transportation priority feature vector is repeatedly filled according to certain rules to make its dimension reach 10. For example, [0.999, 0.964, 0.998] is expanded to [0.999, 0.964, 0.998, 0.999, 0.964, 0.998, 0.999, 0.964, 0.998, 0.999].
[0135] Step S1255-2: Calculate the cosine similarity between the expanded goods transportation priority feature and the spatio-temporal fusion vector to generate a dynamic weight coefficient.
[0136] In this embodiment, the cosine similarity is an index to measure the cosine value of the angle between two vectors and can reflect the similarity degree between the two vectors. The calculation formula is: cosθ=(A·B) / (||A||||B||), where A and B are two vectors respectively, A·B represents the dot product of the vectors, and ||A|| and ||B|| represent the norms of the vectors respectively.
[0137] The expanded goods transportation priority feature vector A = [0.999, 0.964, 0.998, 0.999, 0.964, 0.998, 0.999, 0.964, 0.998, 0.999], and the spatio-temporal fusion vector B = [0.25, 0.35, 0.15, 0.45, 0.55, 0.25, 0.35, 0.15, 0.45, 0.55].
[0138] First, calculate the dot product A·B of the vectors, that is, sum after multiplying the corresponding elements:
[0139] A·B = 0.999×0.25 + 0.964×0.35 + 0.998×0.15 + 0.999×0.45 + 0.964×0.55 + 0.998×0.25 + 0.999×0.35 + 0.964×0.15 + 0.998×0.45 + 0.999×0.55
[0140] The value of A·B is obtained by calculation.
[0141] Then calculate the norms of the vectors ||A|| and ||B||.
[0142] ||A|| = √(0.999² + 0.964² + 0.998² + 0.999² + 0.964² + 0.998² + 0.999² + 0.964² + 0.998² + 0.999²)
[0143] ||B|| = √(0.25² + 0.35² + 0.15² + 0.45² + 0.55² + 0.25² + 0.35² + 0.15² + 0.45² + 0.55²)
[0144] The values of ||A|| and ||B|| are obtained by calculation.
[0145] Finally, calculate the cosine similarity cosθ = (A·B) / (||A||||B||). Assume that the calculated cosine similarity is 0.6, and use it as the dynamic weight coefficient.
[0146] Step S1255 - 3: Weightedly sum the goods transportation priority features and the spatio - temporal fusion vector according to the dynamic weight coefficient to generate fused intermediate features.
[0147] For example, if the dynamic weight coefficient is 0.6, then the weight of the goods transportation priority feature is 0.6, and the weight of the spatio - temporal fusion vector is 1 - 0.6 = 0.4.
[0148] The calculation method for each element of the fused intermediate feature is: fused intermediate feature element = 0.6×goods transportation priority feature element + 0.4×spatio - temporal fusion vector element.
[0149] For example, the first element of the fused intermediate feature = 0.6×0.999 + 0.4×0.25. Calculate each element in turn to obtain the fused intermediate feature vector.
[0150] Step S1255 - 4: Perform dimensionality reduction on the fused intermediate features to obtain the path optimization features, where the dimensionality reduction process includes mapping high - dimensional features to a low - dimensional space through a fully - connected layer and retaining the feature components with the largest variance.
[0151] In this embodiment, the fully connected layer is a commonly used neural network layer that can map the input high-dimensional features to a low-dimensional space. Assume that the dimension of the fused intermediate feature vector is 10, and it is desired to reduce its dimension to 5.
[0152] The fully connected layer contains multiple neurons, and each neuron is connected to each element of the input vector. Through a series of weight parameters and bias parameters, the input vector is linearly transformed and non-linearly activated to obtain the output vector.
[0153] During the dimension reduction process, the feature components with the largest variance are retained. Variance reflects the degree of dispersion of the data, and the feature components with large variance contain more information. By calculating the variance of the output of the fully connected layer, the 5 feature components with the largest variance are selected as the path optimization feature vector. Assume that after the dimension reduction process, the path optimization feature vector is [0.3, 0.5, 0.2, 0.6, 0.4], and this path optimization feature vector synthesizes the cargo transportation priority and spatio-temporal information.
[0154] Step S130: Based on a preset dynamic policy matching network, perform dynamic policy matching on the real-time environment associated features and the path optimization features to generate a path annotation result for the scheduling sequence, and the path annotation result is used to indicate the route adjustment direction and port resource allocation direction of the scheduling sequence.
[0155] In this embodiment, the preset dynamic policy matching network is a trained neural network model that can perform dynamic policy matching according to the real-time environment associated features and path optimization features to generate a path annotation result. The specific steps are as follows:
[0156] Step S131: Input the real-time environment associated features into the environment perception branch of the dynamic policy matching network to generate an environment constraint policy vector.
[0157] The real-time environment associated feature vector is [0.25, 0.35, 0.15, 0.45, 0.55, 0.25, 0.35, 0.15, 0.45, 0.55, 0.5, 0.7, 0.15, 0.5, 0.2]. Input it into the environment perception branch of the dynamic policy matching network.
[0158] The environment perception branch is composed of multiple neural network layers, including convolutional layers, pooling layers, and fully connected layers, etc. The convolutional layer is used to extract local features in the real-time environment associated features, the pooling layer is used to reduce the dimension and aggregate information of the features, and the fully connected layer is used to map the high-dimensional features to a vector with a fixed dimension.
[0159] Suppose that after a series of calculations and transformations in the environmental perception branch, the real-time environmental correlation features are mapped to a vector with a dimension of 8, and the environmental constraint policy vector is [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]. This environmental constraint policy vector represents the constraint conditions of the current transportation environment on the route and port resource allocation.
[0160] Step S132: Input the path optimization features into the path optimization branch of the dynamic policy matching network to generate a path adjustment policy vector.
[0161] In this embodiment, the path optimization feature vector is [0.3, 0.5, 0.2, 0.6, 0.4], which is input into the path optimization branch of the dynamic policy matching network. The path optimization branch is also composed of multiple neural network layers, and its structure and function are similar to those of the environmental perception branch, but it focuses more on the processing and analysis of path optimization features. Through the calculations and transformations of the path optimization branch, the path optimization features are mapped to a vector with a dimension of 8, and the path adjustment policy vector is [0.2, 0.4, 0.1, 0.5, 0.3, 0.6, 0.2, 0.7]. This path adjustment policy vector represents the adjustment policy required to optimize the path.
[0162] Step S133: Perform cross-attention calculation on the environmental constraint policy vector and the path adjustment policy vector to generate a policy interaction matrix.
[0163] In this embodiment, cross-attention calculation is used to capture the correlation information between the environmental constraint policy vector and the path adjustment policy vector. The specific calculation process is as follows:
[0164] First, the environmental constraint policy vector and the path adjustment policy vector are respectively passed through a linear transformation to obtain a query vector Q, a key vector K, and a value vector V. Suppose the environmental constraint policy vector A = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8], and the path adjustment policy vector B = [0.2, 0.4, 0.1, 0.5, 0.3, 0.6, 0.2, 0.7].
[0165] The query vector Q, the key vector K, and the value vector V are obtained through a linear transformation, and then the similarity between the query vector Q and the key vector K is calculated, usually by using the dot product method. After obtaining the similarity matrix, softmax normalization processing is performed to obtain the attention weight matrix.
[0166] The attention weight matrix is multiplied by the value vector V to obtain the policy interaction matrix. Suppose the calculated policy interaction matrix is an 8×8 matrix:
[0167] |0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8|
[0168] |0.2 0.4 0.1 0.5 0.3 0.6 0.2 0.7|
[0169] |...|
[0170] |...|
[0171] |...|
[0172] |...|
[0173] |...|
[0174] |...|
[0175] Thus, the strategy interaction matrix reflects the interaction relationship between the environmental constraint strategy and the path adjustment strategy.
[0176] Step S134: Screen key strategy channels according to the values of each element in the strategy interaction matrix, and generate a strategy fusion vector through channel weighted pooling.
[0177] In order to extract key information from the strategy interaction matrix, it is necessary to screen key strategy channels and perform channel weighted pooling. The specific steps are as follows:
[0178] Step S1341: Perform global average pooling on the strategy interaction matrix along the channel dimension to generate a channel importance score.
[0179] In this embodiment, global average pooling is to perform an average calculation on the strategy interaction matrix in the channel dimension. For each column of the strategy interaction matrix, add up all the elements in this column, and then divide by the number of elements to obtain the average value of this column, that is, the channel importance score.
[0180] Assume that the strategy interaction matrix is an 8×8 matrix. After global average pooling, a channel importance score vector of length 8 [0.3, 0.4, 0.2, 0.5, 0.3, 0.6, 0.2, 0.7] is obtained.
[0181] Step S1342: Screen out target channels with channel importance scores higher than the importance threshold according to a preset importance threshold, and extract the strategy interaction submatrix corresponding to the target channels.
[0182] The preset importance threshold is 0.4. According to this importance threshold, screen out target channels with channel importance scores higher than 0.4, that is, the 2nd, 4th, 6th, and 8th channels.
[0183] Extract the policy interaction sub-matrix corresponding to these target channels. Assume that the extracted policy interaction matrix is an 8×4 matrix, as shown below:
[0184] |0.2 0.4 0.6 0.8|
[0185] |0.4 0.5 0.6 0.7|
[0186] |...|
[0187] |...|
[0188] |...|
[0189] |...|
[0190] |...|
[0191] |...|
[0192] Step S1343: Perform a max pooling operation on the policy interaction sub-matrix to obtain channel significant features.
[0193] In this embodiment, the max pooling operation selects the maximum value in each local region of the policy interaction sub-matrix as the representative value of that region. Assume that a 2×2 window is used to perform the max pooling operation on the policy interaction sub-matrix.
[0194] Starting from the upper left corner, take a 2×2 sub-region, such as the sub-region formed by the first two columns of the first row and the first two columns of the second row:
[0195] |0.2 0.4|
[0196] |0.4 0.5|
[0197] Select the maximum value 0.5 in this sub-region. In this way, perform the max pooling operation on each 2×2 sub-region of the policy interaction sub-matrix in turn.
[0198] After the max pooling operation, a new matrix is obtained, and the elements of this matrix are the channel significant features. Assume that the obtained channel significant feature matrix is a 4×2 matrix:
[0199] |0.5 0.6|
[0200] |0.7 0.8|
[0201] |...|
[0202] |...|
[0203] Step S1344: Multiply the channel significant features and the policy interaction sub-matrix element by element to generate weighted policy interaction features.
[0204] In this embodiment, the elements at the corresponding positions of the channel significant feature matrix and the policy interaction sub-matrix are multiplied. For example, the first element 0.5 of the channel significant feature matrix is multiplied by the element at the corresponding position of the policy interaction sub-matrix, that is, 0.5 is multiplied by the element 0.2 in the first row and first column of the policy interaction sub-matrix to obtain 0.1.
[0205] In this way, multiplication operations are performed on each corresponding element of the channel significant feature matrix and the policy interaction sub-matrix to obtain a weighted policy interaction feature matrix. Suppose the obtained weighted policy interaction feature matrix is an 8×4 matrix:
[0206] |0.1 0.24 0.36 0.48|
[0207] |0.28 0.35 0.42 0.49|
[0208] |...|
[0209] |...|
[0210] |...|
[0211] |...|
[0212] |...|
[0213] |...|
[0214] Step S1345: Flatten the weighted policy interaction feature to obtain the policy fusion vector.
[0215] Flattening is to convert the weighted policy interaction feature matrix into a one-dimensional vector. The elements of each row of the weighted policy interaction feature matrix are connected in sequence to form a long vector.
[0216] Suppose the weighted policy interaction feature matrix is an 8×4 matrix, and after flattening, a policy fusion vector with a length of 32 is obtained: [0.1, 0.24, 0.36, 0.48, 0.28, 0.35, 0.42, 0.49,...]
[0217] Step S135: Input the policy fusion vector into the annotation classifier to output the path annotation result, where the annotation classifier includes a plurality of fully connected layers and a Softmax layer for mapping continuous features to discrete annotation categories.
[0218] In this embodiment, the main function of the annotation classifier is to map the continuous policy fusion vector to discrete annotation categories, thereby generating the path annotation result.
[0219] First, input the policy fusion vector of length 32 into the first fully connected layer of the annotation classifier. Each neuron in the fully connected layer is connected to each element of the input vector. Through a series of weight parameters and bias parameters, a linear transformation is performed on the input vector. Assuming the first fully connected layer has 16 neurons, there will be 32×16 weight parameters and 16 bias parameters. After the linear transformation and processing by an activation function (such as the ReLU function), a vector of length 16 is obtained.
[0220] Next, input this vector of length 16 into the second fully connected layer. Similarly, the second fully connected layer also performs a linear transformation and activation processing on the input vector. Assuming the second fully connected layer has 8 neurons, a vector of length 8 is obtained after processing.
[0221] Finally, input this vector of length 8 into the Softmax layer. The role of the Softmax layer is to convert the input vector into a probability distribution, such that each element of the input vector is between 0 and 1, and the sum of all elements is 1. Through the calculation of the Softmax function, a probability vector of length 8 is obtained.
[0222] Assume the obtained probability vector is [0.1, 0.05, 0.2, 0.05, 0.3, 0.1, 0.1, 0.1]. According to the preset correspondence between the annotation categories and the elements of the probability vector, select the annotation category corresponding to the element with the highest probability as the path annotation result. In this example, the element with the highest probability is 0.3, and its corresponding annotation category may represent a specific route adjustment direction and port resource allocation direction, such as "offset the route 10 degrees eastward and preferentially allocate berth No. 3".
[0223] Step S140: Generate a set of optimized container shipping scheduling strategies based on the path annotation result.
[0224] The path annotation result indicates the route adjustment direction and port resource allocation direction of the scheduling sequence. Based on this, a set of optimized container shipping scheduling strategies can be generated. The specific steps are as follows:
[0225] Step S141: Analyze the route adjustment direction in the path annotation result to generate at least one candidate route adjustment plan. Each candidate route adjustment plan includes a route offset angle, an adjustment distance, and an estimated time loss.
[0226] Assume the path annotation result indicates "offset the route 10 degrees eastward". Based on this information, multiple candidate route adjustment plans can be generated.
[0227] Scenario 1: The course deviation angle is 10 degrees eastward, and the adjustment distance is 50 nautical miles. To estimate the time loss, the current ship's sailing speed needs to be considered. Assuming the average sailing speed of the ship is 20 nautical miles per hour, the time required to adjust 50 nautical miles is 50÷20 = 2.5 hours, that is, the estimated time loss is 2.5 hours.
[0228] Scenario 2: The course deviation angle is 10 degrees eastward, and the adjustment distance is 80 nautical miles. Similarly, calculated at a sailing speed of 20 nautical miles per hour, the time required to adjust 80 nautical miles is 80÷20 = 4 hours, and the estimated time loss is 4 hours.
[0229] Scenario 3: The course deviation angle is 10 degrees eastward, and the adjustment distance is 100 nautical miles. The time required to adjust 100 nautical miles is 100÷20 = 5 hours, and the estimated time loss is 5 hours.
[0230] Step S142: Analyze the port resource allocation direction in the path annotation result to generate port resource allocation constraints. The constraints include berth occupancy time period limits, the number of handling equipment allocated, and the cargo stacking area identifier.
[0231] Suppose the path annotation result indicates "Give priority to allocating Berth No. 3". By further interacting with the port management system, relevant information about Berth No. 3 is obtained.
[0232] Regarding the berth occupancy time period limit, it is known that Berth No. 3 is occupied by other ships from 12:00 to 14:00 on January 10, 2024, and the rest of the time is idle. So the berth occupancy time period limit is available except from 12:00 to 14:00 on January 10, 2024.
[0233] Regarding the number of handling equipment allocated, according to the size and type of the consolidated container, the port management system recommends allocating 2 cranes and 5 forklifts for the loading and unloading operations of this consolidated container.
[0234] Regarding the cargo stacking area identifier, it is found through inquiry that the cargo of this consolidated container is suitable for stacking in Area A of the port. So the cargo stacking area identifier is Area A.
[0235] Step S143: Conduct a feasibility verification on the candidate route adjustment plan, and screen out the effective adjustment plans that meet the port resource allocation constraints.
[0236] Conduct a feasibility verification on the previously generated candidate route adjustment plan. The specific steps are as follows:
[0237] Step S1431: Extract the berth idle time period in the port resource allocation constraints, and match it with the estimated arrival time in the candidate route adjustment plan, and eliminate the adjustment plans whose arrival time exceeds the idle time period.
[0238] Taking Plan 1 as an example, assume that the assembled container was originally expected to arrive at the port at 11:00 on January 10, 2024. Since the estimated time loss of this plan is 2.5 hours, the adjusted estimated arrival time is 13:30 on January 10, 2024. And Berth 3 is occupied by other vessels from 12:00 to 14:00 on January 10, 2024, and the arrival time of this plan is within the occupied period, so this plan does not meet the requirements and is excluded.
[0239] For Plan 2, assume that the originally expected arrival time remains unchanged, and the adjusted estimated arrival time is 15:00 on January 10, 2024. This time is within the idle period of Berth 3, so this plan is temporarily retained.
[0240] For Plan 3, the adjusted estimated arrival time is 16:00 on January 10, 2024, which is also within the idle period of Berth 3, so this plan is also temporarily retained.
[0241] Step S1432: Extract the allocated quantity of the handling equipment, calculate the equipment quantity required for the candidate route adjustment plan, and exclude the adjustment plans whose equipment requirements exceed the available quantity.
[0242] The port resource allocation constraint conditions suggest allocating 2 cranes and 5 forklifts. The handling equipment required after Plan 2 and Plan 3 arrive at the port is related to the cargo situation of the assembled container. Assume that after evaluation, the number of cranes required for both Plan 2 and Plan 3 is 2, and the number of forklifts is 5, which is consistent with the recommended allocation quantity of the port. And the current available number of cranes at the port is 3, and the available number of forklifts is 6. Since the equipment requirements do not exceed the available quantity, Plan 2 and Plan 3 are retained.
[0243] Step S1433: Extract the cargo storage area identifier, verify whether the cargo type corresponding to the candidate route adjustment plan is allowed to enter the target storage area, and exclude the adjustment plans that violate the storage rules, thereby generating an effective adjustment plan that meets the port resource allocation constraint conditions.
[0244] The cargo storage area identifier is Area A. Querying the port's storage rules, it is known that Area A allows storing electronic products, textiles, and food in this assembled container. The cargo types corresponding to both Plan 2 and Plan 3 are these goods, so both meet the storage rules. Plan 2 and Plan 3 are the effective adjustment plans that meet the port resource allocation constraint conditions.
[0245] Step S144: Calculate the comprehensive optimization score according to the estimated time loss and path deviation degree in the effective adjustment plan, and generate the assembled container scheduling optimization strategy set by sorting according to the comprehensive optimization score.
[0246] For Plan 2, the estimated time loss is 4 hours, and the path deviation can be measured by an adjustment distance of 80 nautical miles. For Plan 3, the estimated time loss is 5 hours, and the path deviation is 100 nautical miles.
[0247] The calculation of the comprehensive optimization score can adopt the method of weighted summation. Assume that the weight of the estimated time loss is 0.6 and the weight of the path deviation is 0.4.
[0248] The comprehensive optimization score of Plan 2 = 0.6×4 + 0.4×80÷100 (normalize the path deviation to the 0 - 1 interval) = 2.4 + 0.32 = 2.72
[0249] The comprehensive optimization score of Plan 3 = 0.6×5 + 0.4×100÷100 = 3 + 0.4 = 3.4
[0250] Sorting according to the comprehensive optimization score from high to low, we get the container shipping scheduling optimization strategy set, in which Plan 3 is ranked ahead of Plan 2.
[0251] Step S150: Train the dynamic policy matching network based on the container shipping scheduling optimization strategy set to update the network parameters.
[0252] To continuously improve the performance of the dynamic policy matching network, it is necessary to train it based on the container shipping scheduling optimization strategy set and update the network parameters. The specific steps are as follows:
[0253] Step S151: Extract the policy execution result data from the container shipping scheduling optimization strategy set. The policy execution result data includes the time loss, resource utilization rate, and cargo damage rate after the actual route adjustment.
[0254] When actually implementing the plans in the container shipping scheduling optimization strategy set, collect the relevant execution result data. Taking Plan 3 as an example, after implementing this plan, the time loss after the actual route adjustment is 5.5 hours (due to actual ocean environment and other factors, it may be different from the estimated situation).
[0255] In terms of resource utilization rate, record the usage time of Berth No. 3 and the usage of handling equipment. Assume that Berth No. 3 is actually used for 3 hours, and the standard usage time for each use of Berth No. 3 stipulated by the port is 2.5 hours. Then the resource utilization rate of Berth No. 3 is 3÷2.5 = 1.2. For the handling equipment, 2 cranes are actually used for 2.5 hours, and the standard usage time for each use of each crane stipulated by the port is 2 hours. The resource utilization rate of the cranes is (2×2.5)÷(2×2) = 1.25; 5 forklifts are actually used for 3 hours, and the standard usage time for each use of each forklift stipulated by the port is 2.5 hours. The resource utilization rate of the forklifts is (5×3)÷(5×2.5) = 1.2. Considering the resource utilization rates of the berth and the handling equipment comprehensively, the average value can be taken as the overall resource utilization rate, that is, (1.2 + 1.25 + 1.2)÷3≈1.22.
[0256] In terms of the goods damage rate, check the goods in the consolidated container and find that 1 piece of electronic product is slightly damaged. The total number of electronic products in the consolidated container is 100 pieces. Then the damage rate of the electronic products is 1÷100 = 0.01; there is no damage to textiles and food. Considering all goods comprehensively, assume that the total number of goods is 1000 pieces (including electronic products, textiles and food), then the goods damage rate is 1÷1000 = 0.001.
[0257] Step S152: Construct a strategy effect evaluation function, generate a time error loss according to the difference between the time loss after the adjustment of the actual shipping route and the estimated time loss, generate a resource loss according to the deviation degree of the resource utilization rate from the preset threshold, and generate a risk loss according to the goods damage rate.
[0258] The strategy effect evaluation function is used to measure the quality of the strategy execution result and comprehensively evaluate it by calculating the time error loss, resource loss and risk loss.
[0259] Calculation of the time error loss: The estimated time loss is 5 hours, and the actual time loss is 5.5 hours. The time error is 5.5 - 5 = 0.5 hours. A simple linear function can be used to calculate the time error loss. Assume that the time error loss coefficient is 10, then the time error loss = 10×0.5 = 5.
[0260] Calculation of the resource loss: The preset resource utilization rate threshold is 1. The actual resource utilization rate is 1.22, and the deviation degree of the resource utilization rate from the preset threshold is 1.22 - 1 = 0.22. Assume that the resource loss coefficient is 20, then the resource loss = 20×0.22 = 4.4.
[0261] Calculation of the risk loss: The goods damage rate is 0.001. Assume that the risk loss coefficient is 1000, then the risk loss = 1000×0.001 = 1.
[0262] Step S153: Weightedly sum up the time error loss, resource loss, and risk loss to obtain the total training loss.
[0263] Suppose the weight of the time error loss is 0.5, the weight of the resource loss is 0.3, and the weight of the risk loss is 0.2.
[0264] Total training loss = 0.5×5 + 0.3×4.4 + 0.2×1 = 2.5 + 1.32 + 0.2 = 4.02
[0265] Step S154: Use the gradient descent algorithm to update the parameters of the dynamic policy matching network based on the total training loss until the total training loss converges to a stable interval.
[0266] The gradient descent algorithm is a commonly used optimization algorithm for finding the minimum value of a function. When training the dynamic policy matching network, the goal is to minimize the total training loss.
[0267] First, calculate the gradients of the total training loss with respect to each parameter in the dynamic policy matching network. The gradient represents the rate of change of the total training loss in the parameter space. Through the backpropagation algorithm, the gradients of each parameter can be calculated.
[0268] Then, update the parameters according to the direction and magnitude of the gradients. For example, assume the parameter update formula is: new parameter = old parameter - learning rate × gradient. The learning rate is a hyperparameter that controls the step size of parameter updates.
[0269] Continuously repeat the process of calculating gradients and updating parameters until the total training loss converges to a stable interval. For example, when the change in the total training loss in 10 consecutive iterations is less than 0.01, it is considered that the total training loss converges to a stable interval. At this time, the training process ends, the parameters of the dynamic policy matching network are updated, and its performance is also improved.
[0270] Through the above steps, the embodiments of the present invention achieve the intelligence and efficiency of sea freight consolidation scheduling, significantly improving the accuracy and adaptability of the scheduling strategy. Specifically, by obtaining the historical freight consolidation scheduling data set under the target sea freight route and performing dynamic path feature extraction processing on it, the real-time environment correlation features and path optimization features of each scheduling sequence can be deeply mined. Based on the preset dynamic policy matching network, the real-time environment correlation features and path optimization features are dynamically matched to generate a path annotation result with a clear shipping route adjustment direction and port resource allocation direction, enabling the scheduling strategy to be flexibly adjusted according to the actual environment and path conditions, greatly improving the flexibility and response speed of the scheduling. Further, according to the path annotation result, a set of freight consolidation scheduling optimization strategies is generated, and the dynamic policy matching network is trained based on this set of freight consolidation scheduling optimization strategies to update the network parameters, which can not only continuously optimize the scheduling strategy and improve the scheduling efficiency, but also adapt to the changing sea freight environment and market demands.
[0271] Figure 2 FIG. shows a schematic diagram of exemplary hardware and software components of a shipping IoT management system 100 that can implement the inventive concept provided by some embodiments of the present invention. For example, a processor 120 can be used on the shipping IoT management system 100 and be configured to execute the functions in the present invention.
[0272] The shipping IoT management system 100 can be a general-purpose server or a special-purpose server, both of which can be used to implement the intelligent scheduling method for sea freight consolidation of the present invention. Although only one server is shown in the present invention, for convenience, the functions described in the present invention can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0273] For example, the shipping IoT management system 100 can include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and different forms of storage media 140, such as disks, ROMs, or RAMs, or any combination thereof. Exemplarily, the shipping IoT management system 100 can also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present invention can be implemented according to these program instructions. The shipping IoT management system 100 further includes an input / output (I / O) interface 150 between the computer and other input / output devices.
[0274] For ease of explanation, only one processor is described in the shipping IoT management system 100. However, it should be noted that the shipping IoT management system 100 in the present invention may also include multiple processors. Therefore, the steps performed by one processor described in the present invention may also be jointly performed or separately performed by multiple processors. For example, if the processor of the shipping IoT management system 100 performs step A and step B, it should be understood that step A and step B may also be jointly performed by two different processors or separately performed in one processor. For example, the first processor performs step A, the second processor performs step B, or the first processor and the second processor jointly perform steps A and B.
[0275] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer-executable instructions are preset. When the processor executes the computer-executable instructions, the intelligent scheduling method applied to sea freight consolidation as described above is implemented.
[0276] It should be noted that, in order to simplify the description of the present invention disclosure and thus help the understanding of one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, sometimes multiple features are merged into one embodiment, drawing, or description thereof.
Claims
1. An intelligent scheduling method applied to sea freight consolidation containers, characterized in that, The method includes: Obtaining a historical container consolidation scheduling data set under a target sea shipping route, where the historical container consolidation scheduling data set includes multiple scheduling sequences, and each scheduling sequence is composed of at least one starting position feature of a container, a target port feature, a loaded cargo attribute feature, and a historical path trajectory feature; Performing dynamic path feature extraction processing on the historical container consolidation scheduling data set to obtain the real-time environment association feature and path optimization feature of each scheduling sequence; Based on a preset dynamic policy matching network, performing dynamic policy matching on the real-time environment association feature and the path optimization feature to generate a path annotation result of the scheduling sequence, where the path annotation result is used to indicate the shipping route adjustment direction and port resource allocation direction of the scheduling sequence; Generating a container consolidation scheduling optimization policy set according to the path annotation result, and training the dynamic policy matching network based on the container consolidation scheduling optimization policy set to update network parameters; The performing dynamic policy matching on the real-time environment association feature and the path optimization feature based on a preset dynamic policy matching network to generate a path annotation result of the scheduling sequence includes: Inputting the real-time environment association feature into the environment perception branch of the dynamic policy matching network to generate an environment constraint policy vector; Inputting the path optimization feature into the path optimization branch of the dynamic policy matching network to generate a path adjustment policy vector; Performing cross-attention calculation on the environment constraint policy vector and the path adjustment policy vector to generate a policy interaction matrix; Screening key policy channels according to the values of each element in the policy interaction matrix, and generating a policy fusion vector through channel weighted pooling; Inputting the policy fusion vector into a label classifier to output the path annotation result, where the label classifier includes multiple fully connected layers and a Softmax layer for mapping continuous features to discrete label categories.
2. The intelligent scheduling method applied to the ocean freight consolidation container according to claim 1, wherein The performing dynamic path feature extraction processing on the historical container consolidation scheduling data set to obtain the real-time environment association feature and path optimization feature of each scheduling sequence includes: Extracting multiple trajectory point data units corresponding to the historical path trajectory feature from the scheduling sequence, and each trajectory point data unit includes a position coordinate, a timestamp, and corresponding environment monitoring data; Invoking a pre-trained path feature encoder to perform spatio-temporal association encoding processing on the multiple trajectory point data units to generate a spatio-temporal fusion vector of the scheduling sequence, where the spatio-temporal fusion vector includes a path deviation degree and an environment fluctuation association degree between adjacent trajectory points; Performing port resource matching processing on the starting position feature and the target port feature in the scheduling sequence to obtain a port resource constraint feature, where the port resource constraint feature includes at least one of the following: a berth idle period of the target port, the available quantity of handling equipment, and a cargo stacking density limit; Concatenating the spatio-temporal fusion vector with the port resource constraint feature to generate the real-time environment association feature; Perform risk grading on the loading cargo attribute features in the scheduling sequence to obtain cargo transportation priority features, and dynamically weight and fuse the cargo transportation priority features with the spatio-temporal fusion vector to generate the path optimization features.
3. The intelligent scheduling method applied to ocean freight consolidation containers according to claim 2, characterized in that, The calling of the pre-trained path feature encoder to perform spatio-temporal correlation encoding on the multiple trajectory point data units to generate the spatio-temporal fusion vector of the scheduling sequence includes: For each trajectory point data unit, extract the wind speed, wave height, and ocean current direction parameters in the environmental monitoring data to construct an environmental fluctuation matrix; Perform geographic grid encoding on the position coordinates to generate a standardized position encoding vector, and convert the timestamp into a periodic time encoding vector; Input the environmental fluctuation matrix, the standardized position encoding vector, and the periodic time encoding vector into the path feature encoder for multi-head attention calculation to obtain the local environmental correlation vector of each trajectory point data unit; According to the time interval and distance interval between adjacent trajectory point data units, calculate the trajectory point correlation weight, and perform sliding window aggregation on the local environmental correlation vector based on the trajectory point correlation weight to generate the spatio-temporal fusion vector.
4. The intelligent scheduling method applied to sea freight consolidation containers according to claim 2, characterized in that, The performing of risk grading on the loading cargo attribute features in the scheduling sequence to obtain cargo transportation priority features includes: Extract the cargo type, weight distribution, and temperature control requirement parameters in the loading cargo attribute features to construct a cargo attribute matrix; Call the pre-trained risk assessment model to determine the cargo damage risk score, transportation urgency score, and priority coefficient according to the cargo attribute matrix; Generate an initial priority feature according to the weighted sum of the cargo damage risk score and the transportation urgency score; Perform a non-linear transformation on the initial priority feature based on the priority coefficient to obtain the cargo transportation priority feature, where the non-linear transformation includes mapping the initial priority feature to a preset priority interval through the Sigmoid function.
5. The intelligent scheduling method applied to ocean freight consolidation containers according to claim 2, characterized in that, The dynamically weight and fusing of the cargo transportation priority feature with the spatio-temporal fusion vector to generate the path optimization feature includes: Perform feature dimension expansion on the cargo transportation priority feature to make its dimension consistent with that of the spatio-temporal fusion vector; Calculate the cosine similarity between the expanded cargo transportation priority feature and the spatio-temporal fusion vector to generate a dynamic weight coefficient; Perform weighted summation on the cargo transportation priority feature and the spatio-temporal fusion vector according to the dynamic weight coefficient to generate a fused intermediate feature; Perform dimensionality reduction on the fused intermediate feature to obtain the path optimization feature, where the dimensionality reduction process includes mapping the high-dimensional feature to a low-dimensional space through a fully connected layer and retaining the feature component with the largest variance.
6. The intelligent scheduling method for ocean freight consolidation containers according to claim 1, characterized in that The screening of key policy channels according to the values of each element in the policy interaction matrix and the generation of the policy fusion vector through channel weighted pooling includes: Perform global average pooling on the policy interaction matrix along the channel dimension to generate a channel importance score; Filter out the target channels whose channel importance scores are higher than the preset importance threshold according to the preset importance threshold, and extract the policy interaction sub-matrix corresponding to the target channels; Perform a max pooling operation on the policy interaction sub-matrix to obtain channel significant features; Multiply the channel significant features and the policy interaction sub-matrix element by element to generate weighted policy interaction features; Flatten the weighted policy interaction features to obtain the policy fusion vector.
7. The intelligent scheduling method applied to the sea freight consolidation container according to claim 1, characterized in that, The generating the container shipping scheduling optimization policy set according to the path annotation result includes: Analyze the route adjustment direction in the path annotation result to generate at least one candidate route adjustment plan, and each candidate route adjustment plan includes a route offset angle, an adjustment distance, and an estimated time loss; Analyze the port resource allocation direction in the path annotation result to generate port resource allocation constraint conditions, where the constraint conditions include berth occupancy period limits, the number of allocated handling equipment, and cargo storage area identifiers; Verify the feasibility of the candidate route adjustment plans, and filter out the effective adjustment plans that meet the port resource allocation constraint conditions; Calculate a comprehensive optimization score based on the estimated time loss and path offset degree in the effective adjustment plan, and generate the container shipping scheduling optimization policy set according to the comprehensive optimization score ranking; Among them, the verifying the feasibility of the candidate route adjustment plans and filtering out the effective adjustment plans that meet the port resource allocation constraint conditions includes: Extract the berth idle period in the port resource allocation constraint conditions, and match it with the estimated arrival time in the candidate route adjustment plan, and eliminate the adjustment plans whose arrival time exceeds the idle period; Extract the number of allocated handling equipment, calculate the equipment quantity required for the candidate route adjustment plan, and eliminate the adjustment plans whose equipment requirements exceed the available quantity; Extract the cargo storage area identifier, verify whether the cargo type corresponding to the candidate route adjustment plan is allowed to enter the target storage area, and eliminate the adjustment plans that violate the storage rules, thereby generating effective adjustment plans that meet the port resource allocation constraint conditions.
8. The intelligent scheduling method applied to the sea freight consolidation container according to claim 1, characterized in that The training the dynamic policy matching network based on the container shipping scheduling optimization policy set to update the network parameters includes: Extract the policy execution result data from the container shipping scheduling optimization policy set, where the policy execution result data includes the time loss, resource utilization rate, and cargo damage rate after the actual route adjustment; Construct a policy effect evaluation function, generate a time error loss according to the difference between the actual time loss after the route adjustment and the estimated time loss, generate a resource loss according to the deviation degree between the resource utilization rate and the preset threshold, and generate a risk loss according to the cargo damage rate; Sum the time error loss, resource loss, and risk loss with weights to obtain the total training loss; Use the gradient descent algorithm to update the parameters of the dynamic policy matching network based on the total training loss until the total training loss converges to a stable interval.
9. A shipping IoT management system, characterized in that, The shipping IoT management system includes a processor and a memory. The memory is connected to the processor. The memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the intelligent scheduling method for maritime LCL application described in any one of the above claims 1-8.
Citation Information
Patent Citations
Ship route optimization
WO2024039906A1