A method and system for optimizing empty container prediction based on spatio-temporal data

CN122736456APending Publication Date: 2026-09-11SHANGHAI COSCO INFORMATION & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610852655.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-12
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

[0010]本发明针对传统集装箱空箱管理方法存在的预测精度低、时空盲区与运力约束脱离实际等问题,提出一种基于时空数据的空箱预测优化方法,通过融合多源实时时空数据,结合图神经网络预测模型、LGBM回归模型与整数线性规划模型,实现空箱供需精准预测、航线运力动态评估与全局智能调运,从而完成从静态经验依赖到动态智能优化的跃升,将传统的被动响应调度模式转变为前瞻性调配模式,有效提升了空箱调度效率、降低了整体运营成本并增强了跨港口协同调度能力

Benefits of technology

[0034]This invention relates to an empty container prediction and optimization method based on spatiotemporal data, also known as a predictive empty container mapping and intelligent optimization method driven by spatiotemporal data. It is mainly applied to empty container inventory prediction, capacity assessment and intelligent dispatching in the container shipping and freight forwarding industries. Its multi-source spatiotemporal data acquisition and fusion steps denoise, complete and time-align multi-source heterogeneous spatiotemporal data, and use feature engineering to mine the correlation between meteorological, port congestion and empty container and ship data to construct derived features. This breaks down the barriers between different data sources, solves the data silo problem, and forms a unified standardized spatiotemporal feature vector. This provides high-quality, highly consistent input data for subsequent models, eliminating errors caused by data mismatch and ensuring the accuracy and reliability of predictions from the source. The empty container flow map construction and supply-demand prediction steps abstract the container flow network into a dynamic topology graph. The graph edge weights no longer use a simple binary connection method, but are calculated based on empty container GPS trajectories, ship AIS, and port operation data to obtain a dynamic weight matrix, which can truly reflect the physical impedance of empty container scheduling between ports, greatly improving the realism and fit of the topology network structure. This method makes full use of the topological structure information of the container flow network and effectively captures the spatial dependence and correlation characteristics between port nodes. Combined with a graph neural network prediction model (GNN model) that integrates spatial graph convolution and temporal attention mechanisms, the spatial correlation and temporal turnover trend of empty container flow between ports are simultaneously mined, accurately depicting the dynamic changes in the supply and demand of empty containers at each port, effectively improving the accuracy and reliability of the prediction results of port empty container demand and supply within the target period, and providing a basis for the rationalization and refinement of empty container resources. The system provides precise data support for efficient allocation. The steps of ship capacity prediction and predictive empty container mapping constructing utilize an LGBM regression model to model features such as ship capacity data and port congestion indices. This accurately predicts the upper limit of empty container allocation for each route while ensuring full container transport, avoiding the drawbacks of traditional scheduling that are detached from actual physical capacity. The system topologically integrates port supply and demand forecasts with route capacity limits, constructing a predictive empty container map that structures multi-dimensional information such as node supply and demand and edge capacity. This provides clear constraints for subsequent operational decisions, ensuring that the generated allocation plan is physically executable and eliminating invalid scheduling instructions at the source. The empty container allocation optimization decision-making step uses the predictive empty container map as input, combining supply and demand balance, capacity constraints, and inventory upper and lower limits to construct an integer linear programming model. A solver obtains the globally optimal allocation plan, which organically combines predicted container pickup demand, container return supply, and route capacity. This achieves globally optimal allocation of empty container resources, directly reducing overall inventory and allocation costs and improving the overall operational efficiency and economy of empty container scheduling.This invention achieves a leap from static experience-based reliance to dynamic intelligent optimization through spatiotemporal data-driven predictive empty container mapping and intelligent optimization processes. It transforms the traditional "passive response" scheduling mode into a "proactive pre-positioning" forward-looking allocation mode, effectively improving empty container scheduling efficiency, reducing overall operating costs, and enhancing cross-port collaborative scheduling capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122736456A_ABST
    Figure CN122736456A_ABST
Patent Text Reader

Abstract

The application discloses a kind of empty container prediction optimization method and system based on space-time data, the method is by collecting and fusing multi-source space-time data, by feature engineering construction derivative feature, form the standardized space-time feature vector including position sequence, time series and state label;Subsequently, the empty container flow transfer topology graph is constructed, the graph neural network model of fusion space graph convolution and time attention mechanism is used, the demand of empty container in each port in target period is predicted and the empty container supply is provided;Again, the upper limit of empty container distribution under the premise of guaranteeing heavy container transportation is predicted by LGBM regression model, and the predictive empty container atlas is constructed by integrating supply and demand and transport capacity data;Finally, the predictive empty container atlas is input, the minimum comprehensive operating cost is taken as the goal, combined with a number of constraints, an integer linear programming model is constructed and solved, and the global optimal empty container distribution scheme is obtained.The application realizes the leap from static experience dependence to dynamic intelligent optimization, improves the efficiency of empty container scheduling and reduces operating cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of logistics big data and intelligent scheduling technology, and in particular to an empty container prediction and optimization method and system based on spatiotemporal data. Background Technology

[0002] In the container shipping and freight forwarding industry, empty container management is a core element in controlling supply chain operating costs and improving logistics turnover efficiency. Existing empty container management solutions are mainly based on traditional inventory management systems and rule-driven optimization tools, with the overall process as follows: Figure 1 As shown, this includes data collection, statistical forecasting, rule scheduling, and manual execution, aiming to track the location of empty containers and plan their return routes to meet loading needs. Among these,

[0003] (1) Data collection: mainly relies on the Automatic Identification System (AIS) to obtain the real-time location and heading of the vessel where the container is located; Terminal Operating System (TOS) records the empty container entry and exit logs; trade data provides historical import and export volumes, mainly from customs data API or global trade database, and the data is mostly in structured form.

[0004] (2) Inventory forecasting: also known as statistical forecasting, uses basic statistical methods, such as moving average or exponential smoothing, to predict future inventory levels based on the empty box entry and exit records of the past 3-6 months.

[0005] (3) Scheduling optimization: i.e. rule-based scheduling, which uses rule-based algorithms or simple linear programming, treats ports as nodes and empty container transportation as edges, with the goal of minimizing return distance and cost. The dispatcher manually adjusts the routes, for example, prioritizing the allocation of empty containers returning from Europe to loading needs in Asia.

[0006] (4) Execution output: This involves manual execution, generating a scheduling plan report, and pushing it to the freight forwarder's dispatcher via email or the internal empty container management system. These systems emphasize inventory visibility, but optimization requires manual intervention.

[0007] Figure 1The traditional empty container management system shown employs a linear workflow, resembling a straight production line: data enters, is calculated, outputs a fixed plan, and then relies on manual adjustments. This model is suitable for stable trade environments but ignores real-time changes, such as sudden orders or port congestion. Specifically, existing management systems largely depend on static historical data and experience-based scheduling, failing to capture real-time spatiotemporal anomalies (such as port congestion, ship delays, or severe weather) and the correlation between upstream and downstream port operations (e.g., a full ship at an export port can lead to empty container shortages at multiple downstream ports). This affects the accuracy of empty container forecasting, resulting in longer empty container turnaround times, increased operating costs, and reduced overall supply chain efficiency.

[0008] While existing technologies play a fundamental role in shipping and freight forwarding practices, the increasing cost-efficiency issues caused by growing global trade uncertainties are making accurate empty container forecasting increasingly important.

[0009] Current mainstream solutions generally suffer from low prediction accuracy and spatiotemporal blind spots: the moving average method only looks at historical data and cannot incorporate real-time spatiotemporal factors, such as the mismatch between the actual location of empty containers displayed by the ship's AIS and port demand. For example, a batch of empty containers returning from Los Angeles may be delayed due to weather, and the inability to meet the sudden export demand in Shanghai in time can lead to a prediction deviation of more than 30%. Existing systems ignore the "spatiotemporal network"—empty containers are not static inventory, but dynamic resources that move with shipping routes and ships. Container circulation is essentially a complex flow network interconnected by multiple ports. Network topology, shipping route links, and port levels constitute the core network structure information, which can fully reflect the container source circulation path and regional linkage pattern. In the scenario of empty container pickup and return, ports do not operate independently. There are significant business dependencies and linkages between upstream and downstream nodes of the shipping route: the scale of loaded container arrivals, unloading, and empty container returns at upstream ports directly determines the supply level of empty containers along the route; the export shipment rhythm and empty container pickup demand at downstream ports, in turn, affect the regional empty container allocation rhythm. Therefore, only by fully exploring the coupling relationships between nodes can the accuracy of the empty container supply and demand estimation model be improved. Summary of the Invention

[0010] This invention addresses the problems of low prediction accuracy, spatiotemporal blind spots, and disconnect between actual capacity constraints and traditional empty container management methods. It proposes an empty container prediction and optimization method based on spatiotemporal data. By integrating multi-source real-time spatiotemporal data and combining graph neural network prediction models, LGBM regression models, and integer linear programming models, it achieves accurate prediction of empty container supply and demand, dynamic assessment of shipping route capacity, and global intelligent dispatching. This represents a leap from static experience-based reliance to dynamic intelligent optimization, transforming the traditional passive response scheduling mode into a proactive dispatching mode. This effectively improves empty container dispatching efficiency, reduces overall operating costs, and enhances cross-port collaborative dispatching capabilities. This invention also relates to an empty container prediction and optimization system based on spatiotemporal data.

[0011] The technical solution of the present invention is as follows:

[0012] An empty box prediction optimization method based on spatiotemporal data, characterized by the following steps:

[0013] Multi-source spatiotemporal data acquisition and fusion steps: Collect empty container GPS trajectory data, ship AIS data, port operation data, ship booking space data, meteorological data, and port congestion data; denoise the collected data, use spatiotemporal interpolation algorithms to fill in missing data, and uniformly align and convert all data into minute-level time series data; then, through feature engineering, mine the intrinsic correlation between meteorological data, port congestion data, empty container GPS trajectory data, ship AIS data, and port operation data, and construct corresponding derived features; fuse the converted time series data with the constructed derived features to form a standardized spatiotemporal feature vector containing location sequence, time sequence, and status label;

[0014] The steps for constructing an empty container circulation map and forecasting supply and demand are as follows: Ports are used as graph nodes, and direct and transit routes between ports are used as graph edges. Initial feature vectors for nodes are constructed using time-series data obtained through denoising, completion, and alignment transformations in the multi-source spatiotemporal data acquisition and fusion steps. Dynamic weight matrices for graph edges are calculated by combining empty container GPS trajectory data, ship AIS data, and port operation data from the time-series data, thereby constructing an empty container circulation topology map. The standardized spatiotemporal feature vectors and the empty container circulation topology map are input into a pre-constructed and trained graph neural network prediction model that integrates spatial graph convolution and temporal attention mechanisms. This model calculates the predicted demand for empty containers and the predicted supply of empty containers for each port within the target period.

[0015] The steps for ship capacity prediction and predictive empty container map construction are as follows: Ship AIS data, port congestion data, and ship booking capacity data are extracted from the time-series data obtained through denoising, completion, and alignment transformation in the multi-source spatiotemporal data acquisition and fusion steps. Port congestion index is extracted from the port congestion data, and historical capacity utilization rate and ship booking snapshots are extracted from the ship booking capacity data. These, along with the ship AIS data, constitute a feature set. A pre-built and trained LGBM regression model is invoked, and the feature set is input into the LGBM regression model for calculation to obtain the upper limit of empty container allocation for each route under the premise of ensuring full container transportation. The predicted values ​​of empty container demand, empty container supply, and empty container allocation upper limit are topologically integrated to construct a predictive empty container map with ports as nodes and routes as edges.

[0016] The decision-making steps for optimizing empty container relocation are as follows: using the constructed predictive empty container map as the input data source, with the goal of minimizing the overall operating cost, and combining the constraints of port empty container supply and demand balance, shipping route capacity constraints, and port inventory upper and lower limits, an integer linear programming model is constructed; the solver is used to solve the integer linear programming model to obtain the globally optimal empty container relocation scheme.

[0017] Preferably, in the multi-source spatiotemporal data acquisition and fusion step, the port operation data includes port ERP system data, port throughput data, and event stream data. The event stream data includes gate entry / exit event data, loading / unloading event data, shipping schedule event data, and transshipment event data. The unified alignment and conversion to minute-level time series data specifically involves aligning all data according to a unified timestamp and completing data sampling and format conversion in one-minute units to obtain minute-level time series data.

[0018] Preferably, in the multi-source spatiotemporal data acquisition and fusion step, the derived features constructed through feature engineering include a meteorological demand adjustment factor and a port congestion demand adjustment factor. The meteorological demand adjustment factor is used to characterize the degree of correlation between meteorological data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, and is calculated based on the probability of severe weather in the meteorological data. The port congestion demand adjustment factor is used to characterize the degree of correlation between port congestion data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, and is calculated based on the degree of congestion in the port congestion data.

[0019] Preferably, in the empty container circulation map construction and supply and demand forecasting step, the initial feature vector of the node includes the port's current inventory status, historical turnover rate, and frequency of inbound and outbound events corresponding to the port operation data in the time series data; wherein, the port's current inventory status comes from port ERP system data, the frequency of inbound and outbound events comes from inbound / outbound event data in event stream data, and the historical turnover rate is calculated from port ERP system data and port throughput data;

[0020] The dynamic weight matrix of the graph edges is calculated by combining empty container GPS trajectory data, ship AIS data, and port operation data in the time series data. Specifically, the dynamic weight matrix of the graph edges is calculated based on the voyage frequency and average sailing time in the ship AIS data, the historical route cargo volume in the port operation data, and the empty container GPS trajectory data.

[0021] Preferably, in the empty container flow map construction and supply and demand forecasting steps, after the graph neural network prediction model receives the standardized spatiotemporal feature vector and the empty container flow topology map, it defines a graph adjacency matrix based on the route topology relationship of the empty container flow topology map, and calls the graph adjacency matrix during the calculation process. It captures the spatial correlation of empty container flow between different ports through the spatial graph convolution operator, identifies the empty container turnover trend by combining the time attention mechanism, and finally calculates the predicted value of empty container demand and empty container supply for each port within the target period. Among them, the predicted value of empty container demand is used to quantify the expected consumption of empty containers by export orders in the future period, and the predicted value of empty container supply is used to quantify the incremental amount of empty containers available for allocation in the future.

[0022] Preferably, in the steps of ship capacity prediction and predictive empty container map construction, the LGBM regression model automatically learns and expresses the nonlinear interaction and conditional constraint relationship between features from historical samples through gradient ensemble of multiple decision trees, thereby realizing dynamic remaining capacity modeling of the route; the upper limit of empty container relocation is the maximum number of empty containers that can be transported from one port to another on a specific voyage under the premise of ensuring full container transportation, reflecting the actual capacity boundary of the route under spatiotemporal constraints;

[0023] The constructed predictive empty container map uses ports as nodes, with node attributes including the predicted value of empty container demand and empty container supply for the corresponding port; and uses inter-port shipping routes as edges, with edge attributes including the upper limit of empty container transportation for the corresponding shipping route; the predictive empty container map provides a standardized topology input data source for subsequent empty container transportation optimization decision-making steps.

[0024] Preferably, in the empty container allocation optimization decision-making step, the comprehensive operating cost includes the penalty cost for insufficient empty containers, the penalty cost for empty containers falling below the lower limit of the inventory setting, the penalty cost for empty containers exceeding the upper limit of the inventory setting, and the empty container allocation cost; the port empty container supply and demand balance constraint ensures that the inflow and outflow of empty containers at each port remain balanced, and unmet empty container demand is represented by the container shortage; the route capacity constraint ensures that the empty container allocation volume of each route does not exceed the predicted upper limit of the empty container allocation; and the port inventory upper and lower limit constraints ensure that the empty container inventory at each port does not exceed the upper limit of the inventory setting and is not lower than the lower limit of the inventory setting.

[0025] The integer linear programming model is solved using the Gurobi solver to obtain the globally optimal empty container transportation scheme.

[0026] A system for predicting and optimizing empty containers based on spatiotemporal data is characterized by comprising, in sequence, a multi-source spatiotemporal data acquisition and fusion layer, an empty container flow map construction and supply-demand prediction layer, a ship space prediction and predictive empty container map construction layer, and an empty container allocation and operational decision-making layer; wherein...

[0027] The multi-source spatiotemporal data acquisition and fusion layer is used to collect empty container GPS trajectory data, ship AIS data, port operation data, ship booking data, meteorological data, and port congestion data. The collected data undergoes denoising processing, and spatiotemporal interpolation algorithms are used to fill in missing data. All data is then uniformly aligned and converted into minute-level time series data. Feature engineering is then used to mine the intrinsic correlations between meteorological data, port congestion data, and empty container GPS trajectory data, ship AIS data, and port operation data, respectively, and corresponding derived features are constructed. The converted time series data is then fused with the constructed derived features to form a standardized spatiotemporal feature vector containing location sequences, time sequences, and status labels.

[0028] The empty container circulation map construction and supply-demand prediction layer is used to construct initial feature vectors for nodes, with ports as graph nodes and direct and transit routes between ports as graph edges. It uses time-series data obtained from the multi-source spatiotemporal data acquisition and fusion layer after denoising, completion, and alignment transformation to construct initial feature vectors for nodes. Combined with empty container GPS trajectory data, ship AIS data, and port operation data from the time-series data, it calculates the dynamic weight matrix of the graph edges, thereby constructing an empty container circulation topology map. The standardized spatiotemporal feature vectors and the empty container circulation topology map are then input into a pre-constructed and trained graph neural network prediction model that integrates spatial graph convolution and temporal attention mechanisms to calculate the predicted empty container demand and supply for each port within the target period.

[0029] The ship capacity prediction and predictive empty container map construction layer is used to extract ship AIS data, port congestion data, and ship booking capacity data from the time series data obtained by the multi-source spatiotemporal data acquisition and fusion layer after denoising, completion, and alignment transformation. It extracts the port congestion index from the port congestion data and historical capacity utilization and ship booking snapshots from the ship booking capacity data, which, together with the ship AIS data, constitute a feature set. It then calls a pre-built and trained LGBM regression model, inputs the feature set into the LGBM regression model for calculation, and obtains the upper limit of empty container allocation for each route under the premise of ensuring full container transportation. Finally, it performs topological integration of the predicted empty container demand, the predicted empty container supply, and the upper limit of empty container allocation to construct a predictive empty container map with ports as nodes and routes as edges.

[0030] The empty container relocation and operation decision-making layer is used to construct an integer linear programming model with the constructed predictive empty container map as the input data source, aiming at minimizing the overall operating cost, and combining port empty container supply and demand balance constraints, shipping route capacity constraints, and port inventory upper and lower limits constraints. The solver is used to solve the integer linear programming model to obtain the globally optimal empty container relocation scheme.

[0031] Preferably, in the multi-source spatiotemporal data acquisition and fusion layer, the derived features constructed through feature engineering include a meteorological demand adjustment factor and a port congestion demand adjustment factor. The meteorological demand adjustment factor is used to characterize the degree of correlation between meteorological data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, and is calculated based on the probability of severe weather in the meteorological data. The port congestion demand adjustment factor is used to characterize the degree of correlation between port congestion data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, and is calculated based on the degree of congestion in the port congestion data.

[0032] Preferably, in the empty container flow map construction and supply and demand prediction layer, after the graph neural network prediction model receives the standardized spatiotemporal feature vector and the empty container flow topology map, it defines a graph adjacency matrix based on the route topology relationship of the empty container flow topology map, and calls the graph adjacency matrix during the calculation process. It captures the spatial correlation of empty container flow between different ports through the spatial graph convolution operator, identifies the empty container turnover trend by combining the time attention mechanism, and finally calculates the predicted value of empty container demand and empty container supply for each port within the target period. Among them, the predicted value of empty container demand is used to quantify the expected consumption of empty containers by export orders in the future period, and the predicted value of empty container supply is used to quantify the incremental amount of empty containers available for allocation in the future.

[0033] The technical effects of this invention are as follows:

[0034] This invention relates to an empty container prediction and optimization method based on spatiotemporal data, also known as a predictive empty container mapping and intelligent optimization method driven by spatiotemporal data. It is mainly applied to empty container inventory prediction, capacity assessment and intelligent dispatching in the container shipping and freight forwarding industries. Its multi-source spatiotemporal data acquisition and fusion steps denoise, complete and time-align multi-source heterogeneous spatiotemporal data, and use feature engineering to mine the correlation between meteorological, port congestion and empty container and ship data to construct derived features. This breaks down the barriers between different data sources, solves the data silo problem, and forms a unified standardized spatiotemporal feature vector. This provides high-quality, highly consistent input data for subsequent models, eliminating errors caused by data mismatch and ensuring the accuracy and reliability of predictions from the source. The empty container flow map construction and supply-demand prediction steps abstract the container flow network into a dynamic topology graph. The graph edge weights no longer use a simple binary connection method, but are calculated based on empty container GPS trajectories, ship AIS, and port operation data to obtain a dynamic weight matrix, which can truly reflect the physical impedance of empty container scheduling between ports, greatly improving the realism and fit of the topology network structure. This method makes full use of the topological structure information of the container flow network and effectively captures the spatial dependence and correlation characteristics between port nodes. Combined with a graph neural network prediction model (GNN model) that integrates spatial graph convolution and temporal attention mechanisms, the spatial correlation and temporal turnover trend of empty container flow between ports are simultaneously mined, accurately depicting the dynamic changes in the supply and demand of empty containers at each port, effectively improving the accuracy and reliability of the prediction results of port empty container demand and supply within the target period, and providing a basis for the rationalization and refinement of empty container resources. The system provides precise data support for efficient allocation. The steps of ship capacity prediction and predictive empty container mapping constructing utilize an LGBM regression model to model features such as ship capacity data and port congestion indices. This accurately predicts the upper limit of empty container allocation for each route while ensuring full container transport, avoiding the drawbacks of traditional scheduling that are detached from actual physical capacity. The system topologically integrates port supply and demand forecasts with route capacity limits, constructing a predictive empty container map that structures multi-dimensional information such as node supply and demand and edge capacity. This provides clear constraints for subsequent operational decisions, ensuring that the generated allocation plan is physically executable and eliminating invalid scheduling instructions at the source. The empty container allocation optimization decision-making step uses the predictive empty container map as input, combining supply and demand balance, capacity constraints, and inventory upper and lower limits to construct an integer linear programming model. A solver obtains the globally optimal allocation plan, which organically combines predicted container pickup demand, container return supply, and route capacity. This achieves globally optimal allocation of empty container resources, directly reducing overall inventory and allocation costs and improving the overall operational efficiency and economy of empty container scheduling.This invention achieves a leap from static experience-based reliance to dynamic intelligent optimization through spatiotemporal data-driven predictive empty container mapping and intelligent optimization processes. It transforms the traditional "passive response" scheduling mode into a "proactive pre-positioning" forward-looking allocation mode, effectively improving empty container scheduling efficiency, reducing overall operating costs, and enhancing cross-port collaborative scheduling capabilities.

[0035] Furthermore, port operation data includes port ERP system data, port throughput data, and event stream data. The event stream data includes gate entry / exit event data, loading / unloading event data, shipping schedule event data, and transshipment event data. By clarifying the specific sub-types of port operation data and the specific composition of event stream data, the scope of multi-source data collection is improved, ensuring that the input data dimensions are comprehensive and closely match the actual port operation scenario. At the same time, the specific implementation method of minute-level time series alignment and transformation is clarified. By unifying timestamps and minute-level sampling to regularize the spatiotemporal granularity of multi-source heterogeneous data, the problem of inconsistent time scales and messy formats of different types of data is effectively solved, and the data regularity and computational accuracy of subsequent feature fusion, model prediction, and optimization calculations are greatly improved.

[0036] Furthermore, the derived features constructed through feature engineering include meteorological demand adjustment factors and port congestion demand adjustment factors. These two types of exclusive derived features constructed through feature engineering correspond to demand adjustment factors affected by meteorological impact and port congestion impact, respectively. By quantifying the correlation between the probability of severe weather, the degree of port congestion and various basic data, the nonlinear correlation patterns hidden in the original data are fully explored. This makes up for the shortcomings of the original basic features in terms of their singular representation ability and inability to reflect the impact of external environmental disturbances on the flow of empty containers. It enriches the spatiotemporal feature dimensions and significantly improves the adaptability and prediction accuracy of subsequent prediction models to complex scenarios.

[0037] Furthermore, by clarifying the specific composition and data source of the initial feature vectors of the graph nodes, the core operational status of ports, such as inventory, turnover, and event frequency, is accurately anchored, enabling the characteristics of port nodes to truly reflect the actual operation of empty containers at each port. At the same time, the specific calculation basis of the dynamic weight matrix of graph edges is defined, abandoning the traditional fixed binary connection method. By combining voyage frequency, sailing time, historical cargo volume, and empty container trajectory data, edge weights are dynamically generated, which truly restores the flow resistance and navigation differences of empty container scheduling between ports. This makes the constructed empty container flow topology map more in line with the actual logistics scenario, laying a solid topological data foundation for accurately capturing the flow patterns of empty containers and improving the accuracy of supply and demand forecasting.

[0038] Furthermore, the graph neural network prediction model possesses specific computational logic and learning mechanisms. By combining the graph adjacency matrix with the spatial graph convolution operator, it effectively captures the spatial correlation characteristics between multiple ports. Relying on the time attention mechanism, it adaptively mines the temporal change trend of empty container flow, achieving a dual-depth mining of the spatiotemporal correlation characteristics of empty container supply and demand. At the same time, it clarifies the quantitative representation meaning of supply and demand forecast values, achieving accurate quantitative output of the port's empty container supply and demand situation. This avoids the problems of traditional static forecasts ignoring spatiotemporal coupling relationships and biased forecast results, significantly improving the scientificity and accuracy of port empty container return volume forecasts within the target period.

[0039] Furthermore, by defining the gradient ensemble learning mechanism of the LGBM regression model, it can autonomously learn the complex nonlinear interactions and conditional constraints among multiple features, achieving accurate modeling of dynamic remaining capacity on shipping routes. This effectively adapts to the dynamic changes in capacity under the coupling of multiple factors such as full container bookings and port congestion, and accurately defines the empty container relocation capacity boundaries for each route. At the same time, it clarifies the standardized topological structure and attribute composition of the predictive empty container map, and unifies the integration of port supply and demand data and shipping route capacity data to form a structured topological data source. This provides a standardized, accurate, and practical input basis for subsequent empty container relocation optimization models, ensuring that relocation optimization decisions are aligned with actual shipping route capacity constraints.

[0040] Furthermore, by clarifying the four specific components of comprehensive operating costs and the various constraints of the integer linear programming model, the target dimensions and boundary constraints of empty container relocation optimization are refined, which can comprehensively cover various operational loss scenarios such as empty container relocation, inventory imbalance, and supply and demand gaps. By solving the optimization model under complete constraints using the Gurobi solver, the optimization model is effectively balanced with port supply and demand, shipping capacity limits, and port inventory upper and lower limits. This avoids the problems of traditional relocation schemes that only consider relocation costs, are prone to inventory overruns, capacity overruns, and container shortages, and ultimately obtains the globally optimal, feasible, and lowest comprehensive cost empty container relocation scheme, which significantly improves the overall economy and rationality of empty container scheduling.

[0041] This invention also relates to an empty container prediction and optimization system based on spatiotemporal data. Corresponding to the empty container prediction and optimization method based on spatiotemporal data described above, it can be understood as a system that implements the empty container prediction and optimization method based on spatiotemporal data. It includes a multi-source spatiotemporal data acquisition and fusion layer, an empty container flow map construction and supply and demand prediction layer, a ship space prediction and predictive empty container map construction layer, and an empty container dispatch and operation decision-making layer connected in sequence. Each layer works together to achieve a leap from static experience dependence to dynamic intelligent optimization through the spatiotemporal data-driven "predictive empty container map" and hierarchical architecture, objectively improving efficiency, reducing costs, and enhancing collaboration.

[0042] This system fully leverages the rich structural information of the container flow network to effectively capture the dependencies and correlations between nodes. During the construction of the empty container flow map and supply-demand forecasting, it utilizes a graph neural network prediction model that integrates spatial graph convolution and temporal attention mechanisms, based on the empty container flow topology map, to accurately depict and reasonably predict the dynamic changes in empty container pickup demand and empty container return supply. This significantly improves the accuracy and reliability of empty container pickup and return volume estimation, providing strong support for the rational allocation and efficient scheduling of empty container resources. Furthermore, the system organically combines the pickup demand, return supply, and shipping capacity resources output from the predicted map to comprehensively optimize empty container scheduling schemes and reduce overall inventory and transportation costs. Attached Figure Description

[0043] Figure 1 This is a flowchart of the workflow for a traditional empty container management system.

[0044] Figure 2 This is a flowchart of the empty box prediction optimization method based on spatiotemporal data according to the present invention.

[0045] Figure 3 This is a flowchart of the steps involved in the acquisition and fusion of multi-source spatiotemporal data.

[0046] Figure 4 A flowchart of the steps for constructing an empty container circulation map and forecasting supply and demand.

[0047] Figure 5 A flowchart of the steps for predicting ship space and constructing predictive empty container maps.

[0048] Figure 6 This is a diagram of the empty box prediction optimization system based on spatiotemporal data according to the present invention. Detailed Implementation

[0049] The present invention will now be described with reference to the accompanying drawings.

[0050] This invention provides an empty container prediction and optimization method based on spatiotemporal data, aiming to solve problems such as insufficient prediction accuracy, unrealistic capacity assessment, and lagging supply and demand matching in traditional empty container scheduling, thereby achieving efficient allocation and cost optimization of empty container resources. The core technical idea of ​​this method is: constructing a graph neural network model to predict the demand for empty container pickup and return, achieving accurate capture of supply and demand at port nodes; building a ship space prediction model to estimate the remaining available space on each route while ensuring the transportation of loaded containers; combining the predicted empty container pickup and return demand with the remaining ship space, and using an operations research optimization model to globally allocate empty containers, reducing empty container idle rates and overall operating costs. Its core innovation lies in fully considering the impact of port network topology on empty container flow, combined with route ship space prediction, to achieve dynamic matching of empty container supply and demand. Figure 2As shown, it includes the following steps:

[0051] (1) Multi-source spatiotemporal data acquisition and fusion steps: Collect empty container GPS trajectory data, ship AIS data, port operation data, ship booking space data, meteorological data and port congestion data; Denoise the collected data, use spatiotemporal interpolation algorithm to fill in missing data, and uniformly align all data to convert into minute-level time series data; Then, through feature engineering, mine the intrinsic correlation between meteorological data and port congestion data and empty container GPS trajectory data, ship AIS data and port operation data, respectively, and construct corresponding derived features; Fusion the converted time series data with the constructed derived features to form a standardized spatiotemporal feature vector containing location sequence, time sequence and status label.

[0052] like Figure 3 As shown, this step first involves multi-source spatiotemporal data acquisition. This includes collecting raw location data of empty containers via GPS devices, collecting port operation data from the port ERP system and extracting demand tags, and further, port operation data including port ERP system data, port throughput data, and event stream data. The event stream data includes gate entry / exit event data, loading / unloading event data, shipping schedule event data, and transshipment event data. Ship maritime trajectory data is acquired via AIS ship dynamics, and meteorological data is obtained through a weather forecast interface to generate disturbance factors. Simultaneously, ship booking data and port congestion data are collected. Subsequently, the collected data undergoes noise reduction processing, and spatiotemporal interpolation algorithms are used to complete the data. Missing data is identified; next, data alignment is performed according to a unified timestamp, transforming it into minute-level time series data. Specifically, all data is aligned according to a unified timestamp, and data sampling and format conversion are completed in one-minute increments to obtain minute-level time series data. Then, feature engineering is carried out to uncover the inherent correlations between meteorological, port congestion, empty container, ship, and port operation data. This involves extracting implicit patterns (e.g., the seasonal correlation of a 10% decrease in demand on rainy days) through relevant feature engineering to construct derived features. Finally, the minute-level time series data and derived features are fused to output a fused dataset, including location sequences, time sequences, and state labels, forming a standardized spatiotemporal feature vector. This multi-source spatiotemporal data acquisition and fusion step models "port inventory + yard turnover + en route arrivals" as a state space, using event flows (entry / exit gates, loading / unloading, ship schedules, transshipment) as observations to form a preliminary estimate of the "real but not directly observable inventory status." This step solves the data silo problem, ensuring that the accuracy of downstream forecasts reaches over 95%.

[0053] Furthermore, the derived features constructed through feature engineering may specifically include weather-related demand adjustment factors and port congestion-related demand adjustment factors. The weather-related demand adjustment factor characterizes the correlation between weather data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, such as a rainy day demand adjustment factor or a foggy day demand adjustment factor. This weather-related demand adjustment factor is calculated based on the probability of severe weather in the weather data. The port congestion-related demand adjustment factor characterizes the correlation between port congestion data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, such as a mild congestion demand adjustment factor or a severe congestion demand adjustment factor. This port congestion-related demand adjustment factor is calculated based on the congestion level in the port congestion data.

[0054] Let's take the Shanghai-Ningbo route as an example:

[0055] This multi-source spatiotemporal data acquisition and fusion process addresses the issues of scattered and isolated data. It collects and fuses spatiotemporal information through multi-source APIs, ensuring comprehensive coverage of the "location, time, and status" of empty containers. The acquisition process includes: GPS devices directly acquiring real-time location information from each empty container; the port ERP system retrieving demand tags (e.g., Ningbo Port needs 200 TEU empty containers with an urgency level of 0.9, indicating they must arrive the next day); ship AIS data supplementing dynamic trajectories (e.g., TEU001 is at the midpoint of the Pacific Ocean, expected to arrive in 3 days); and weather APIs injecting external disturbance factors (e.g., wind speed of 5 m / s, rainfall probability of 0.2, affecting land transport delays). Through multi-source acquisition, like collecting "multi-angle photos," it covers the entire chain of empty containers from warehouse to port, avoiding the "blind spots" of a single source. After data collection, invalid records (such as GPS points with lost signals) are first removed, either automatically discarded or estimated using neighboring points to keep the data clean. Then, a unified format (latitude and longitude + time + attribute) is adopted. For example, a simple Python script converts AIS latitude and longitude into "distance from the port" to make the data more intuitive. Since the time of data from different sources is inconsistent, interpolation methods are used to align the time of all data sources to a unified minute-level sequence (e.g., interpolating from hourly GPS data to minute-level sampling) to avoid prediction bias caused by time misalignment. Next, feature engineering is used to uncover hidden patterns, such as calculating the rainy day demand adjustment factor (demand × (1 - 0.1 × probability of rainfall)) to reveal the correlation of "port clearance being 10% slower under severe weather." Finally, a "unified view" is created, and all fused information is output as a standardized spatiotemporal vector (e.g., JSON format: {timestamp, latitude and longitude, empty container status, adjusted demand}). This vector is published via a Kafka topic for further use.

[0056] Example: In the Shanghai-Ningbo dispatching process, the multi-source spatiotemporal data acquisition and fusion step collected 200 TEUs of orders for Shanghai Port during rainy weather. However, the weather API warning indicated a rainfall probability of 0.2. The weather factor was adjusted to 180 TEUs to avoid excessive use of empty containers and resulting in additional storage fees. The final output standardized spatiotemporal feature vector is multi-dimensional spatiotemporal data of the Shanghai-Ningbo area containing this adjusted demand data, providing a unified input benchmark for subsequent prediction calculations.

[0057] (2) Empty container circulation map construction and supply and demand forecasting steps: Ports are used as graph nodes, and direct routes and transit routes between ports are used as graph edges; the time series data obtained by the multi-source spatiotemporal data acquisition and fusion steps after denoising, completion and alignment transformation are used to construct the initial feature vector of the nodes. Combined with the empty container GPS trajectory data, ship AIS data and port operation data in the time series data, the dynamic weight matrix of the graph edges is calculated, and then the empty container circulation topology map is constructed; the standardized spatiotemporal feature vector and the empty container circulation topology map are input into the pre-constructed and trained graph neural network prediction model with fusion spatial graph convolution and time attention mechanism, and the predicted value of empty container demand and empty container supply of each port in the target period are calculated.

[0058] like Figure 4 As shown, this step involves inputting the fused port inventory status, shipping schedules, and historical turnover data into a graph neural network prediction model (GNN prediction model) composed of graph convolution operators. Each port is treated as a graph node, and the actual direct or transshipment routes between ports are used as edges to construct an empty container turnover topology. Based on this empty container turnover topology, feature parameters are configured, including initial node feature vectors and dynamic edge weight matrices. The initial node feature vectors contain the port's current inventory status, historical turnover rate, and frequency of entry and exit events corresponding to the port operation data output in step (1). Specifically, the current port inventory status comes from port ERP system data, the frequency of gate entry and exit events comes from gate entry / exit event data in event stream data, and the historical turnover rate is calculated from port ERP system data and port throughput data; the edge weights are no longer simple binary connections, but dynamic weight matrices calculated based on historical route cargo volume, voyage frequency, and average sailing time, combined with empty container GPS trajectory data, thereby truly reflecting the physical impedance of empty container scheduling between ports. Among them, historical route cargo volume comes from port operation data, and voyage frequency and average sailing time both come from ship AIS data.

[0059] After completing the construction of the empty container circulation topology map and the configuration of feature parameters, the GNN prediction model is operated (spatial graph convolution): the GNN prediction model receives the standardized spatiotemporal feature vector and the empty container circulation topology map, defines the graph adjacency matrix based on the port route topology relationship of the empty container circulation topology map, and calls the graph adjacency matrix during the operation.

[0060] The Graph Neural Network (GNN) used in this invention is a learning model specifically designed for processing graph-structured data. Its message propagation mechanism is as follows: each node collects information from its neighboring nodes and then updates it by combining it with its own information. This process is repeated until all nodes can understand the entire network, that is, learn the global features of the entire network. The spatial graph convolution operator can aggregate neighborhood information. It is no longer limited to regular grid data, but rather, based on the actual adjacency relationships between nodes, it merges and updates the feature information of each node with that of its neighboring nodes. Essentially, it uses the spatial connectivity of the graph to automatically mine and learn the correlation features between nodes.

[0061] The GNN prediction model captures the spatial correlation of empty container flows between different ports through spatial graph convolution operators, while introducing a temporal attention mechanism. This mechanism is a deep learning technique focused on processing time-series data. By assigning weights to different time steps, the model can focus on key time points, thereby more effectively capturing important information in the sequence and identifying empty container turnover trends. Finally, it calculates two core prediction values ​​for the target period (e.g., the next 72 hours) from end-to-end:

[0062] port Forecast of empty container demand ( ): Quantify the expected consumption of empty containers by export orders in the future period;

[0063] port The forecast value of empty container supply ( ): Quantify the future available increase in empty containers.

[0064] These two indicators are like the "expected outflow" and "expected inflow" of a reservoir, realizing the transformation of port inventory from the "current visible state" to the "future certain state".

[0065] This step can be understood as node supply and demand forecasting. This process decouples the “real but not directly observable inventory status” and the complex port network interaction relationship in step (1) and maps them into deterministic spatiotemporal node supply and demand characteristics, providing a high-precision input benchmark for subsequent operations planning.

[0066] Let's take the Shanghai-Ningbo route as an example:

[0067] In the traditional model, dispatchers only search for empty containers when Ningbo Port is truly depleted, often resulting in lost export orders due to lack of vessel space or excessively long relocation times. However, in this example of the invention, the multi-dimensional spatiotemporal data from the Shanghai-Ningbo area received during the multi-source spatiotemporal data acquisition and fusion process is input into a GNN prediction model to construct an empty container flow topology with Shanghai Port and Ningbo Port as nodes. The GNN prediction model analyzes recent regional export surge time-series data and the correlation characteristics of surrounding ports to capture the spatial correlation of empty container flows between ports, predicting the node supply and demand situation within the next 72 hours.

[0068] Ningbo Port (Node A) will experience a significant shortage of empty containers, and its demand for empty containers is projected to be [missing information]. =500 TEU, while empty containers are extremely scarce. =50 TEU, showing a net shortfall of 450 TEU;

[0069] Meanwhile, Shanghai Port (Node B) is expected to see increased demand for empty containers due to a large number of imported loaded containers about to be cleared and unloaded. =100TEU, and still supplied in empty containers =600 TEU, showing a net surplus of 500 TEU.

[0070] (3) Ship space prediction and predictive empty container map construction steps: Extract ship AIS data, port congestion data, and ship booking space data from the time series data obtained by the multi-source spatiotemporal data acquisition and fusion steps after denoising, completion, and alignment transformation. Extract the port congestion index from the port congestion data and extract the historical space utilization rate and ship booking snapshot from the ship booking space data. Combine these with the ship AIS data to form a feature set. Call the pre-built and trained LGBM regression model and input the feature set into the LGBM regression model for calculation to obtain the upper limit of empty container transportation for each route under the premise of ensuring full container transportation. Perform topological integration of the predicted value of empty container demand, the predicted value of empty container supply, and the upper limit of empty container transportation to construct a predictive empty container map with ports as nodes and routes as edges.

[0071] To address the nonlinear issues affecting shipping capacity, such as fluctuations in vessel space, container congestion, and dynamic route adjustments, an LGBM regression model, also known as the LightGBM regression model, is introduced. LightGBM (Light Gradient Boosting Machine) is a lightweight gradient boosting machine that utilizes an optimized gradient boosting decision tree algorithm, specifically designed for handling large-scale data and efficiently performing various prediction tasks such as classification and regression. Figure 5As shown, the LGBM regression model takes the ship AIS data, port congestion index, historical cabin utilization rate, and ship booking snapshots from step (1) as multi-source feature data inputs. Through gradient ensemble of multiple decision trees, it automatically learns and expresses the nonlinear interaction and conditional constraint relationships between features from historical samples, naturally adapting to the nonlinear interaction between these features, and realizing the dynamic modeling of remaining cabin space on the route: for example, when "high heavy cargo booking rate" is superimposed with "severe port congestion", the loss effect of remaining cabin space is far nonlinearly superimposed, but rather presents a multiplier-level compression; while in the off-season and under conditions of smooth port, even if the booking snapshot shows a certain amount of heavy cargo, the elastic space of remaining cabin space is relatively abundant; such cross effects can be automatically learned and expressed from historical samples by LGBM, and these complex conditional constraint relationships can be expressed, ultimately realizing the modeling of remaining cabin space on the route. Dynamic remaining cargo space modeling allows for accurate prediction of the upper limit of empty container relocation on shipping routes. It refers to the route under the premise of meeting the requirements for heavy container transportation. From the port Shipped to the port The maximum allowable empty container allocation limit. Compared to traditional static quotas, this predicted value reflects the actual capacity boundary under spatiotemporal constraints. This step can be understood as a link capacity limit prediction. This empty container allocation limit is equivalent to the "maximum dynamic pipe diameter" connecting two pools, directly indicating how many empty containers can be carried in a single voyage under the premise of prioritizing the transportation of loaded containers, thereby avoiding the generation of scheduling instructions that are "physically impossible to execute".

[0072] The above prediction results are then topologically integrated, and the empty container "relationship network" in the graph database (such as JanusGraph) is updated in real time to construct a network with ports as nodes (node ​​attributes are...). and ), with the flight path as the edge (edge ​​attribute is This includes a "predictive empty container map" (covering transportation costs and ETA delay distribution). This predictive empty container map is not a static display, but rather uses three core prediction parameters (container pickup demand, container return supply, and transportation limit) as high-dimensional constraint operators. These parameters are transmitted in real time through a message queue (such as Kafka) to subsequent empty container transportation optimization decision-making steps, providing them with a standardized topology input data source.

[0073] Let's take the Shanghai-Ningbo route as an example:

[0074] The task now involves transporting empty containers from Shanghai to Ningbo. This step retrieves AIS and current booking data for barges and mainline vessels stopping at Shanghai for tomorrow's journey to Ningbo, and inputs this data into the LGBM regression model. Due to existing loaded container allocation, LGBM calculates the upper limit for empty container transport from Shanghai to Ningbo on a specific route (e.g., voyage M) tomorrow. TEU.

[0075] Subsequently, based on the node supply and demand forecast results from step (2) and the empty container allocation limit forecast results from this step, a predictive empty container graph is constructed: a dynamic network is generated in the graph database containing two nodes, "Ningbo (-450 TEU)" and "Shanghai (+500 TEU)," and an edge "Shanghai to Ningbo, capacity limit 250 TEU, estimated time 8 hours." This graph will serve as a set of constrained topology data and will be passed to the subsequent empty container allocation optimization decision-making steps to provide a precise input benchmark for scheduling. This will avoid blindly issuing unexecutable instructions to call 500 TEU empty containers, and instead accurately guide the terminal to load the 250 available empty containers that will overflow from Shanghai Port onto voyage M and transport them to Ningbo in advance.

[0076] (4) Empty container transportation optimization decision-making steps: Using the constructed predictive empty container map as the input data source, with the goal of minimizing the overall operating cost, and combining the port empty container supply and demand balance constraints, shipping route capacity constraints, and port inventory upper and lower limits constraints, an integer linear programming model is constructed; the solver is used to solve the integer linear programming model to obtain the globally optimal empty container transportation scheme.

[0077] This step, based on the forecast results and considering the empty container relocation costs and the upper and lower limits of port inventory management, sets the objective and constraints of the decision model. The objective is to minimize the overall operating cost, which includes the penalty cost for insufficient empty containers, the penalty cost for empty containers falling below the lower limit of inventory, the penalty cost for empty containers exceeding the upper limit of inventory, and the empty container relocation cost. Specifically, it minimizes the penalty for insufficient empty containers + the penalty for empty containers falling below the lower limit of inventory + the penalty for empty containers exceeding the upper limit of inventory + the empty container relocation cost. The objective function is expressed as:

[0078]

[0079] in, This indicates a failure to pay penalties for empty containers. Indicates port The empty box shortage quantity, an integer variable; This indicates a penalty for excessive empty box inventory; two non-negative slack variables are introduced. , This represents the amount exceeding the upper and lower limits of empty container inventory; it is an integer variable. This indicates a penalty for excessively low empty container inventory; This indicates the cost of transporting empty containers; Indicates via flight route From the port Transferred to port Empty bin quantity, an integer variable.

[0080] The business constraints that need to be met are as follows:

[0081] 1) The supply and demand balance constraint of empty containers at each node of the network ensures that the inflow and outflow of empty containers at each port are balanced, with the shortfall expressed as the container shortage; specifically, the current number of empty containers... +Empty boxes that arrived + Empty box + The empty box (variable) that was transferred in = Empty box + Remaining empty boxes -Insufficient empty containers :

[0082]

[0083] When the demand for empty containers is not fully met, the remaining number of empty containers is 0; when there are remaining empty containers, it means that the demand for empty containers has been fully met.

[0084]

[0085] 2) The capacity constraint for the remaining transportable empty container volume on each route is that the empty container transfer volume on each route does not exceed the predicted upper limit for empty container transfer; that is, the route Able to access from the port Arrival at the port The upper limit for empty container capacity (requires subtracting the predicted cargo space from the ship's capacity):

[0086]

[0087] 3) If the empty container inventory at the port exceeds the upper and lower limits of the inventory management target, the empty container inventory at each port should not exceed the upper limit set by the inventory management target, and should not be lower than the lower limit set by the inventory management target. Exceeding these limits will incur penalty costs; that is, exceeding the upper and lower limits of the empty container inventory.

[0088]

[0089]

[0090]

[0091] 4) Other variable ranges:

[0092]

[0093]

[0094] 5) Constrained linearization:

[0095]

[0096]

[0097]

[0098]

[0099] in, Indicates port The predicted demand for empty containers; (predicted by the GNN model); Indicates port The empty box supply forecast (obtained by the GNN model); This indicates that the item is currently in transit and will arrive at the port on the target date. Empty boxes; Indicates that it is currently in the port. The quantity of empty containers; This indicates the incurred penalty costs for empty containers; This indicates a penalty for excessive empty container inventory; This indicates a penalty for excessively low empty container inventory; This indicates the cost of transporting empty containers; Indicates the upper limit of empty containers; Indicates the lower limit of empty containers; Indicates flight route Able to access from the port Arrival at the port The upper limit of empty container capacity (obtained from LGBM space prediction); Indicates port The remaining empty bin quantity, an integer variable; It is an auxiliary variable, and its type is an integer variable.

[0100] This model is an integer linear programming model, which can be efficiently solved using Gurobi. Gurobi is a mainstream commercial operations research optimization solver based on core operations research algorithms. It supports solving various mathematical optimization models such as linear programming and integer programming, and can quickly output the optimal decision solution under multiple constraints. It is widely used in optimization computing scenarios such as resource allocation and scheduling planning. After solving, the globally optimal empty container transportation plan is obtained, that is, from one port to another via a specific shipping route.

[0101] The present invention provides an empty container prediction optimization method based on spatiotemporal data. By replacing experience-based scheduling with spatiotemporal prediction, it realizes the transformation from a passive response to a proactive allocation mode, which can "foresee" the flow trend of empty containers in advance and effectively reduce the overall logistics cost.

[0102] This invention also relates to an empty box prediction and optimization system based on spatiotemporal data, which corresponds to the spatiotemporal data-based empty box prediction and optimization method described above. It can be understood as a system for implementing the spatiotemporal data-based empty box prediction and optimization method, such as... Figure 6As shown, the system adopts a layered design, with the core architecture divided into four layers: multi-source spatiotemporal data acquisition and fusion layer, empty container flow map construction and supply and demand prediction layer, ship space prediction and predictive empty container map construction layer, and empty container dispatching and decision-making layer. Each layer realizes data flow through API interfaces and message queues (such as Kafka) to ensure low latency response (<100ms) in high-concurrency scenarios (capable of processing 100,000+ spatiotemporal events per second).

[0103] The core of this invention's empty container prediction and optimization system based on spatiotemporal data comprises four collaborative layers, forming a complete decision-making chain: The multi-source spatiotemporal data acquisition and fusion layer is responsible for acquiring and preprocessing the raw spatiotemporal data. Through feature engineering, it constructs derived features and completes data fusion, forming a standardized spatiotemporal feature vector containing location sequences, time sequences, and state labels, providing a unified data foundation for downstream layers. The empty container circulation map construction and supply-demand prediction layer, based on the standardized spatiotemporal feature vector output by the multi-source spatiotemporal data acquisition and fusion layer, combines topology to construct and invoke a graph neural network prediction model, accurately outputting the predicted empty container demand and supply for the target period. The measurement layer extracts ship AIS data, port congestion data, and ship booking data to form a feature set. Based on the LGBM regression model, it completes route capacity prediction, obtaining the upper limit of empty container allocation under the premise of ensuring full container transportation. This defines the capacity boundary for empty container allocation. Then, it integrates port supply and demand forecasts with route capacity data to construct a predictive empty container map. The empty container allocation decision-making layer uses the predictive empty container map output from previous layers as demand and capacity inputs. With the lowest overall operating cost as the core objective, it combines various constraints to achieve global optimization of intelligent empty container allocation and allocation schemes, ultimately outputting the optimal empty container allocation decision scheme.

[0104] A data-driven cascading response relationship is formed between the various levels: the multi-source spatiotemporal data acquisition and fusion layer outputs standardized spatiotemporal feature vectors (such as timestamps, latitude and longitude, empty container status, etc.), which are directly input into the empty container flow map construction and supply and demand forecasting layer to avoid prediction bias caused by data inconsistency; the empty container flow map construction and supply and demand forecasting layer generates empty container demand forecasts and empty container supply forecasts, which are then transmitted to the ship space forecasting and predictive empty container map construction layer. This layer performs topological integration of the supply and demand forecast results with the calculated empty container allocation limit to generate a predictive empty container map and send it to the empty container allocation operation decision-making layer to ensure that scheduling and allocation are based on future trends rather than static real-time data; the empty container allocation operation decision-making layer combines all the aforementioned data and constraints to solve the model, generates the globally optimal allocation plan, and executes it through API.

[0105] Specifically, the multi-source spatiotemporal data acquisition and fusion layer is used to collect empty container GPS trajectory data, ship AIS data, port operation data, ship booking space data, meteorological data, and port congestion data; denoise the collected data, use spatiotemporal interpolation algorithms to fill in missing data, and uniformly align and convert all data into minute-level time series data; then, through feature engineering, it mines the intrinsic correlation between meteorological data, port congestion data, empty container GPS trajectory data, ship AIS data, and port operation data, respectively, and constructs corresponding derived features; the converted time series data is fused with the constructed derived features to form a standardized spatiotemporal feature vector containing location sequence, time sequence, and status label;

[0106] The empty container circulation map construction and supply-demand prediction layer is used to construct initial feature vectors for nodes, with ports as graph nodes and direct and transit routes between ports as graph edges. It uses time-series data obtained from the multi-source spatiotemporal data acquisition and fusion layer after denoising, completion, and alignment transformation to construct initial feature vectors for nodes. Combined with empty container GPS trajectory data, ship AIS data, and port operation data from the time-series data, it calculates the dynamic weight matrix of the graph edges, thereby constructing an empty container circulation topology map. The standardized spatiotemporal feature vectors and the empty container circulation topology map are then input into a pre-constructed and trained graph neural network prediction model that integrates spatial graph convolution and temporal attention mechanisms to calculate the predicted empty container demand and supply for each port within the target period.

[0107] The ship capacity prediction and predictive empty container map construction layer is used to extract ship AIS data, port congestion data, and ship booking capacity data from the time series data obtained by the multi-source spatiotemporal data acquisition and fusion layer after denoising, completion, and alignment transformation. It extracts the port congestion index from the port congestion data and historical capacity utilization and ship booking snapshots from the ship booking capacity data, which, together with the ship AIS data, constitute a feature set. It then calls a pre-built and trained LGBM regression model, inputs the feature set into the LGBM regression model for calculation, and obtains the upper limit of empty container allocation for each route under the premise of ensuring full container transportation. Finally, it performs topological integration of the predicted empty container demand, the predicted empty container supply, and the upper limit of empty container allocation to construct a predictive empty container map with ports as nodes and routes as edges.

[0108] The empty container relocation and operation decision-making layer is used to construct an integer linear programming model with the constructed predictive empty container map as the input data source, aiming at minimizing the overall operating cost, and combining port empty container supply and demand balance constraints, shipping route capacity constraints, and port inventory upper and lower limits constraints. The solver is used to solve the integer linear programming model to obtain the globally optimal empty container relocation scheme.

[0109] Furthermore, in the multi-source spatiotemporal data acquisition and fusion layer, the derived features constructed through feature engineering include a meteorological demand adjustment factor and a port congestion demand adjustment factor. The meteorological demand adjustment factor is used to characterize the degree of correlation between meteorological data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, and is calculated based on the probability of severe weather in the meteorological data. The port congestion demand adjustment factor is used to characterize the degree of correlation between port congestion data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, and is calculated based on the degree of congestion in the port congestion data.

[0110] Furthermore, in the empty container flow map construction and supply and demand prediction layer, the graph neural network prediction model receives the standardized spatiotemporal feature vector and the empty container flow topology map, defines a graph adjacency matrix based on the route topology relationship of the empty container flow topology map, and calls the graph adjacency matrix during the calculation process. It captures the spatial correlation of empty container flow between different ports through the spatial graph convolution operator, identifies the empty container turnover trend by combining the time attention mechanism, and finally calculates the predicted value of empty container demand and empty container supply for each port within the target period. Among them, the predicted value of empty container demand is used to quantify the expected consumption of empty containers by export orders in the future period, and the predicted value of empty container supply is used to quantify the future available increase in empty containers.

[0111] The present invention provides an empty container prediction optimization system based on spatiotemporal data, applicable to empty container scheduling scenarios for 20GP / 40GP standard containers. The system is deployed in a cloud-edge collaborative architecture: the main cloud node is responsible for the prediction calculation stages in multi-source spatiotemporal data acquisition and fusion, empty container flow map construction and supply and demand prediction, ship space prediction and predictive empty container map construction, and empty container dispatching and operational decision-making; the edge devices are responsible for executing the final empty container scheduling instructions. Simultaneously, the system stores the empty container "relationship network" based on a graph database (such as JanusGraph), which includes predictive empty container map data containing port nodes, shipping route edges, and corresponding supply and demand and capacity characteristics, enabling efficient storage and querying of topology data.

[0112] This invention, based on spatiotemporal data, presents an empty container prediction and optimization system. Through a four-layer architecture and the collaborative relationships between each layer, it models port empty containers as dynamic nodes and shipping routes as edges. A GNN prediction model predicts the future supply and demand of empty containers at port nodes, and an LGBM regression model predicts the dynamic capacity constraints of shipping routes, thus shifting from a passive response to a proactive pre-planning scheduling mode. Based on the supply and demand and capacity prediction results, a predictive empty container map is constructed. An operations research optimization model (integer linear programming model) is established in conjunction with business objectives and constraints, outputting an executable, globally optimal empty container transportation plan that reduces empty container transportation costs while ensuring container demand.

[0113] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail with reference to the accompanying drawings and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention. In short, all technical solutions and improvements that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention patent.

Claims

1. A method for predicting and optimizing empty bins based on spatiotemporal data, characterized in that, Includes the following steps: Multi-source spatiotemporal data acquisition and fusion steps: Collect empty container GPS trajectory data, ship AIS data, port operation data, ship booking space data, meteorological data, and port congestion data; denoise the collected data, use spatiotemporal interpolation algorithms to fill in missing data, and uniformly align and convert all data into minute-level time series data; then, through feature engineering, mine the intrinsic correlation between meteorological data, port congestion data, empty container GPS trajectory data, ship AIS data, and port operation data, and construct corresponding derived features; fuse the converted time series data with the constructed derived features to form a standardized spatiotemporal feature vector containing location sequence, time sequence, and status label; The steps for constructing an empty container circulation map and forecasting supply and demand are as follows: Ports are used as graph nodes, and direct and transit routes between ports are used as graph edges. Initial feature vectors for nodes are constructed using time-series data obtained through denoising, completion, and alignment transformations in the multi-source spatiotemporal data acquisition and fusion steps. Dynamic weight matrices for graph edges are calculated by combining empty container GPS trajectory data, ship AIS data, and port operation data from the time-series data, thereby constructing an empty container circulation topology map. The standardized spatiotemporal feature vectors and the empty container circulation topology map are input into a pre-constructed and trained graph neural network prediction model that integrates spatial graph convolution and temporal attention mechanisms. This model calculates the predicted demand for empty containers and the predicted supply of empty containers for each port within the target period. The steps for ship capacity prediction and predictive empty container map construction are as follows: Ship AIS data, port congestion data, and ship booking capacity data are extracted from the time-series data obtained through denoising, completion, and alignment transformation in the multi-source spatiotemporal data acquisition and fusion steps. Port congestion index is extracted from the port congestion data, and historical capacity utilization rate and ship booking snapshots are extracted from the ship booking capacity data. These, along with the ship AIS data, constitute a feature set. A pre-built and trained LGBM regression model is then invoked, and the feature set is input into the LGBM regression model for calculation to obtain the upper limit of empty container relocation for each route under the premise of ensuring full container transportation. The predicted demand for empty containers, the predicted supply of empty containers, and the upper limit for empty container transportation are topologically integrated to construct a predictive empty container map with ports as nodes and shipping routes as edges. The decision-making steps for optimizing empty container relocation are as follows: using the constructed predictive empty container map as the input data source, with the goal of minimizing the overall operating cost, and combining the constraints of port empty container supply and demand balance, shipping route capacity constraints, and port inventory upper and lower limits, an integer linear programming model is constructed; the solver is used to solve the integer linear programming model to obtain the globally optimal empty container relocation scheme.

2. The empty box prediction optimization method based on spatiotemporal data according to claim 1, characterized in that, In the multi-source spatiotemporal data acquisition and fusion step, the port operation data includes port ERP system data, port throughput data, and event stream data. The event stream data includes gate entry / exit event data, loading and unloading event data, shipping schedule event data, and transshipment event data. The unified alignment and conversion to minute-level time series data specifically involves aligning all data according to a unified timestamp and completing data sampling and format conversion in one-minute units to obtain minute-level time series data.

3. The empty box prediction optimization method based on spatiotemporal data according to claim 1 or 2, characterized in that, In the multi-source spatiotemporal data acquisition and fusion step, the derived features constructed through feature engineering include a meteorological demand adjustment factor and a port congestion demand adjustment factor. The meteorological demand adjustment factor is used to characterize the degree of correlation between meteorological data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, and is calculated based on the probability of severe weather in the meteorological data. The port congestion demand adjustment factor is used to characterize the degree of correlation between port congestion data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, and is calculated based on the degree of congestion in the port congestion data.

4. The empty box prediction optimization method based on spatiotemporal data according to claim 2, characterized in that, In the empty container circulation map construction and supply and demand forecasting steps, the initial feature vector of the node includes the port's current inventory status, historical turnover rate, and frequency of inbound and outbound events corresponding to the port operation data in the time series data; wherein, the port's current inventory status comes from the port ERP system data, the frequency of inbound and outbound events comes from the inbound / outbound event data in the event stream data, and the historical turnover rate is calculated from the port ERP system data and the port throughput data; The dynamic weight matrix of the graph edges is calculated by combining empty container GPS trajectory data, ship AIS data, and port operation data in the time series data. Specifically, the dynamic weight matrix of the graph edges is calculated based on the voyage frequency and average sailing time in the ship AIS data, the historical route cargo volume in the port operation data, and the empty container GPS trajectory data.

5. The empty box prediction optimization method based on spatiotemporal data according to claim 1 or 4, characterized in that, In the empty container flow map construction and supply and demand forecasting steps, the graph neural network prediction model receives standardized spatiotemporal feature vectors and an empty container flow topology map. Based on the route topology relationships in the empty container flow topology map, it defines a graph adjacency matrix and calls this matrix during the computation process. It captures the spatial correlation of empty container flows between different ports through spatial graph convolution operators and identifies empty container turnover trends using a time attention mechanism. Finally, it calculates the predicted empty container demand and empty container supply for each port within the target period. The predicted empty container demand is used to quantify the expected consumption of empty containers by export orders in the future period, and the predicted empty container supply is used to quantify the future available incremental empty containers.

6. The empty box prediction optimization method based on spatiotemporal data according to claim 1, characterized in that, In the steps of ship capacity prediction and predictive empty container map construction, the LGBM regression model automatically learns and expresses the nonlinear interaction and conditional constraint relationship between features from historical samples through gradient ensemble of multiple decision trees, thereby realizing dynamic remaining capacity modeling of the route; the upper limit of empty container transportation is the maximum number of empty containers that can be transported from one port to another on a specific voyage under the premise of ensuring full container transportation, reflecting the actual capacity boundary of the route under spatiotemporal constraints. The constructed predictive empty container map uses ports as nodes, with node attributes including the predicted value of empty container demand and empty container supply for the corresponding port; and uses inter-port shipping routes as edges, with edge attributes including the upper limit of empty container transportation for the corresponding shipping route; the predictive empty container map provides a standardized topology input data source for subsequent empty container transportation optimization decision-making steps.

7. The empty box prediction optimization method based on spatiotemporal data according to claim 1, characterized in that, In the empty container allocation optimization decision-making step, the comprehensive operating cost includes the penalty cost for insufficient empty containers, the penalty cost for empty containers falling below the lower limit of the inventory setting, the penalty cost for empty containers exceeding the upper limit of the inventory setting, and the empty container allocation cost; the port empty container supply and demand balance constraint ensures that the inflow and outflow of empty containers at each port remain balanced, and unmet empty container demand is represented by the container shortage; the route capacity constraint ensures that the empty container allocation volume of each route does not exceed the predicted empty container allocation upper limit. The upper and lower limits of port inventory are constrained so that the empty container inventory of each port does not exceed the upper limit set by the inventory and is not lower than the lower limit set by the inventory. The integer linear programming model is solved using the Gurobi solver to obtain the globally optimal empty container transportation scheme.

8. An empty box prediction and optimization system based on spatiotemporal data, characterized in that, This includes a multi-source spatiotemporal data acquisition and fusion layer, an empty container circulation map construction and supply and demand forecasting layer, a ship space forecasting and predictive empty container map construction layer, and an empty container dispatching and decision-making layer, all connected in sequence; among them, The multi-source spatiotemporal data acquisition and fusion layer is used to collect empty container GPS trajectory data, ship AIS data, port operation data, ship booking data, meteorological data, and port congestion data. The collected data undergoes denoising processing, and spatiotemporal interpolation algorithms are used to fill in missing data. All data is then uniformly aligned and converted into minute-level time series data. Feature engineering is then used to mine the intrinsic correlations between meteorological data, port congestion data, and empty container GPS trajectory data, ship AIS data, and port operation data, respectively, and corresponding derived features are constructed. The converted time series data is then fused with the constructed derived features to form a standardized spatiotemporal feature vector containing location sequences, time sequences, and status labels. The empty container circulation map construction and supply-demand prediction layer is used to construct initial feature vectors for nodes, with ports as graph nodes and direct and transit routes between ports as graph edges. It uses time-series data obtained from the multi-source spatiotemporal data acquisition and fusion layer after denoising, completion, and alignment transformation to construct initial feature vectors for nodes. Combined with empty container GPS trajectory data, ship AIS data, and port operation data from the time-series data, it calculates the dynamic weight matrix of the graph edges, thereby constructing an empty container circulation topology map. The standardized spatiotemporal feature vectors and the empty container circulation topology map are then input into a pre-constructed and trained graph neural network prediction model that integrates spatial graph convolution and temporal attention mechanisms to calculate the predicted empty container demand and supply for each port within the target period. The ship capacity prediction and predictive empty container map construction layer is used to extract ship AIS data, port congestion data, and ship booking capacity data from the time series data obtained by the multi-source spatiotemporal data acquisition and fusion layer after denoising, completion, and alignment transformation. It extracts the port congestion index from the port congestion data and historical capacity utilization and ship booking snapshots from the ship booking capacity data, which, together with the ship AIS data, constitute a feature set. It then calls a pre-built and trained LGBM regression model, inputs the feature set into the LGBM regression model for calculation, and obtains the upper limit of empty container allocation for each route under the premise of ensuring full container transportation. Finally, it performs topological integration of the predicted empty container demand, the predicted empty container supply, and the upper limit of empty container allocation to construct a predictive empty container map with ports as nodes and routes as edges. The empty container relocation and operation decision-making layer is used to construct an integer linear programming model with the constructed predictive empty container map as the input data source, aiming at minimizing the overall operating cost, and combining port empty container supply and demand balance constraints, shipping route capacity constraints, and port inventory upper and lower limits constraints. The solver is used to solve the integer linear programming model to obtain the globally optimal empty container relocation scheme.

9. The empty box prediction and optimization system based on spatiotemporal data according to claim 8, characterized in that, In the multi-source spatiotemporal data acquisition and fusion layer, the derived features constructed through feature engineering include a meteorological demand adjustment factor and a port congestion demand adjustment factor. The meteorological demand adjustment factor is used to characterize the degree of correlation between meteorological data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, and is calculated based on the probability of severe weather in the meteorological data. The port congestion demand adjustment factor is used to characterize the degree of correlation between port congestion data and empty container GPS trajectory data, ship AIS data, and port operation data as a whole, and is calculated based on the degree of congestion in the port congestion data.

10. The empty box prediction optimization system based on spatiotemporal data according to claim 8 or 9, characterized in that, In the empty container flow map construction and supply and demand forecasting layer, the graph neural network prediction model receives standardized spatiotemporal feature vectors and an empty container flow topology map. Based on the route topology relationship of the empty container flow topology map, it defines a graph adjacency matrix and calls this graph adjacency matrix during the calculation process. It captures the spatial correlation of empty container flow between different ports through spatial graph convolution operators and identifies the empty container turnover trend by combining a time attention mechanism. Finally, it calculates the predicted value of empty container demand and empty container supply for each port within the target period. The predicted value of empty container demand is used to quantify the expected consumption of empty containers by export orders in the future period, and the predicted value of empty container supply is used to quantify the future available increase in empty containers.