Ship storage demand prediction method and system based on machine learning
Through machine learning-based methods, multimodal feature analysis and spatiotemporal coding processing, the problem that traditional prediction methods cannot fully reflect the complexity of shipping warehousing systems is solved, more accurate warehousing demand prediction is achieved, and operational efficiency is improved.
Patent Information
- Application Number
- CN202510336474.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-21
AI Technical Summary
The traditional shipping warehousing demand forecasting method is based on single-dimensional data and cannot fully reflect the complexity and dynamics of the shipping warehousing system, resulting in poor accuracy of the forecast results.
Using a machine learning-based method, we collect dynamic data sets of shipping logistics, perform multimodal feature analysis to generate composite feature vectors, perform spatiotemporal encoding processing, extract features using cyclic convolution networks and graph attention mechanisms, and input pre-trained models for prediction.
It improves the information value of the data, generates more detailed and accurate warehousing demand forecast results, helping the port to reasonably plan warehousing space and resource allocation, and reduces operating costs.
Smart Images

Figure CN119886733A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning technology, and in particular to a method and system for predicting shipping and warehousing demand based on machine learning. Background Art
[0002] In today's booming global trade landscape, shipping, as one of the most important modes of transport in international trade, and its associated warehousing management are crucial to the efficiency and economy of port operations. Accurately forecasting shipping warehousing demand can help ports rationally plan storage space, allocate human and material resources, thereby reducing operating costs and improving service quality.
[0003] Traditional methods for forecasting shipping and warehousing demand are mostly based on simple statistical models and empirical rules. These methods often consider only a single dimension of data, such as predicting future warehousing demand based solely on historical port throughput or focusing solely on the approximate cargo turnover cycle while ignoring other key factors such as vessel scheduling and the status of warehousing equipment. This single-dimensional approach fails to fully reflect the complexity and dynamic nature of shipping and warehousing systems, resulting in poorly accurate forecasts that are difficult to meet the actual operational needs of ports.
[0004] With the development of data technology, some existing techniques have begun to attempt to leverage multi-source data for forecasting. However, these methods simply combine or aggregate data from different sources, failing to deeply explore the inherent connections and synergies between different types of data. For example, while simultaneously capturing port throughput and container load data, they fail to fundamentally analyze the relationship between the two in terms of time series and spatial distribution. As a result, multi-source data fails to fully leverage its intended advantages, resulting in limited improvements in forecasting effectiveness. Summary of the Invention
[0005] In view of the above-mentioned problems, in combination with the first aspect of the present invention, an embodiment of the present invention provides a method for predicting shipping and warehousing demand based on machine learning, the method comprising: Collect a dynamic shipping logistics dataset from the target port and perform multimodal feature analysis on it to generate a composite feature vector that includes ship scheduling time series, cargo turnover cycle, and storage capacity fluctuations. The multimodal feature analysis includes joint feature extraction from port throughput time series, container transport maps, and storage equipment status logs. Performing spatiotemporal coding processing on the composite feature vector to generate a multidimensional spatiotemporal coding matrix; the spatiotemporal coding processing includes extracting ship arrival time dependency features using a recurrent convolutional network and capturing cargo flow correlation across storage areas in combination with a graph attention mechanism; Inputting the multidimensional spatiotemporal coding matrix into a pre-trained basic shipping warehousing demand prediction model to output preliminary warehousing demand distribution data; the preliminary warehousing demand distribution data includes the expected cargo accumulation volume and storage cycle probability curve of each storage zone; The preliminary storage demand distribution data is corrected to generate a target storage demand forecast result.
[0006] On the other hand, an embodiment of the present invention also provides a shipping storage demand forecasting system based on machine learning, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium is connected to the processor, the machine-readable storage medium is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the machine-readable storage medium to implement the above method.
[0007] Based on the above aspects, the embodiment of the present application collects the dynamic data set of shipping logistics of the target port and performs multimodal feature analysis to generate a composite feature vector, breaking through the limitations of the traditional single data source. By jointly extracting features from the port throughput time series, container loading map and storage equipment status log, it not only comprehensively covers the key information in the shipping and warehousing system, but also captures the complex internal correlations between different modal data, and generates a composite feature vector that includes ship scheduling timing, cargo turnover cycle and storage capacity fluctuations, providing rich and accurate basic data for subsequent predictions, greatly improving the information value of the data.
[0008] During the feature encoding phase, spatiotemporal encoding is performed on the composite feature vector. Using a recurrent convolutional network to extract the time-dependent features of ship arrivals, the model accurately captures the dynamic patterns of changes in ship arrival time series. Combined with a graph attention mechanism, the model captures the correlations between cargo flows across storage areas. This allows the model to automatically focus on important storage area relationships and adaptively assign attention weights, accurately capturing the complex patterns of cargo flows between different storage areas. This spatiotemporal encoding method generates a multidimensional spatiotemporal encoding matrix that effectively integrates information from both temporal and spatial dimensions, providing a more comprehensive and in-depth feature representation for storage demand forecasting and improving the model's ability to model complex real-world scenarios. Traditional methods often struggle to effectively handle complex cross-regional cargo flow relationships.
[0009] The multidimensional spatiotemporal encoding matrix is fed into a pre-trained basic shipping storage demand forecasting model. The resulting preliminary storage demand distribution data includes the expected cargo accumulation volume and storage cycle probability curves for each storage zone. Compared to the general data provided by traditional forecasting methods, this provides port operators with more detailed and accurate information. This data allows operators to plan storage resource allocation in advance, such as rationally arranging cargo storage plans for different storage zones, optimizing warehouse layout, improving storage space utilization, and reducing cargo backlogs and handling costs.
[0010] Finally, the preliminary storage demand distribution data was revised to generate a target storage demand forecast, further improving the accuracy and reliability of the forecast. By considering more complex factors and uncertainties in real-world scenarios, the preliminary results were optimized and adjusted, making the final forecast more reflective of reality. This helps ports make more flexible and efficient decisions in the face of changing shipping and logistics demands, rationally allocate resources, improve overall operational efficiency, and reduce operational risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a schematic diagram of the execution flow of the shipping and warehousing demand forecasting method based on machine learning provided by an embodiment of the present invention.
[0012] Figure 2 2 is a schematic diagram of the hardware architecture of a shipping and warehousing demand forecasting system based on machine learning provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0013] The present invention will be described in detail below with reference to the accompanying drawings. Figure 1 This is a flow chart of a method for predicting shipping and warehousing demand based on machine learning provided by an embodiment of the present invention. The method for predicting shipping and warehousing demand based on machine learning is introduced in detail below.
[0014] Step S110 collects a dynamic shipping logistics dataset for the target port and performs multimodal feature analysis on it to generate a composite feature vector that includes vessel scheduling time series, cargo turnover cycle, and storage capacity fluctuations. This multimodal feature analysis involves joint feature extraction from port throughput time series, container transport patterns, and storage equipment status logs.
[0015] Specifically, the target port is the specific port targeted by the entire shipping storage demand forecasting process. This port is the object of data collection, analysis, and forecasting, and has its own unique operating characteristics, infrastructure, cargo types, and traffic.
[0016] The shipping logistics dynamics dataset covers dynamic information on various aspects of the target port's shipping logistics process. This information includes, but is not limited to, vessel arrivals and departures, cargo loading and unloading, and the operational status of storage equipment. This data is continuously updated and changes over time, reflecting both the real-time and historical dynamics of the port's shipping logistics.
[0017] Therefore, multimodal feature extraction aims to extract meaningful features from multiple data sources of different types (modalities). In this scenario, the goal is to comprehensively understand shipping logistics from different perspectives and to obtain richer and more accurate information by exploring the inherent connections between different modal data.
[0018] The composite feature vector is a data structure that integrates feature information related to ship scheduling, cargo turnover, and storage capacity fluctuations, derived from multimodal feature analysis. This composite feature vector forms the basis for subsequent analysis and prediction, combining multiple related features for unified processing and analysis.
[0019] The port throughput time series is a chronological record of the number of cargo handled by a port. Port throughput is a key indicator of the scale and efficiency of port operations. This time series can reflect the changing patterns of cargo flow in and out of a port over different time periods, such as peaks and troughs in cargo flow during different seasons and on weekdays and weekends.
[0020] The container transport map is a data structure that records detailed information about each container's transportation. It contains various information about the entire container's journey from the port of departure to the port of destination, such as the length of time spent at each terminal, whether it underwent special inspections, and the transshipment route. This helps to fully understand the flow of containerized cargo and is crucial for analyzing cargo turnover cycles.
[0021] The storage equipment status log records the operational status of storage equipment within the port over time. This equipment includes racks, stackers, and conveyors in automated warehouses. The log contains information such as equipment speed, load capacity, and conveyor efficiency. This log reflects the equipment's operating status and its impact on cargo storage and turnover, ultimately reflecting fluctuations in storage capacity.
[0022] Joint feature extraction involves using a specific algorithm to simultaneously extract features related to ship scheduling, cargo turnover cycles, and storage capacity fluctuations from three different types of data: port throughput time series, container load maps, and storage equipment status logs. Joint feature extraction can uncover relationships between these different data types, providing a more comprehensive picture of shipping logistics.
[0023] In this example, consider a large port, such as Port AA. In daily operations, there are numerous data sources used to construct a dynamic data set for shipping logistics. For the port throughput time series, precise metering equipment is installed at each import and export channel of the port. These devices can record the amount of cargo carried by each ship when entering and leaving the port in real time. For example, different types of ships enter and leave the port every day, such as large oil tankers and container ships. The cargo volume of oil tankers may be measured in tons, while the cargo volume of container ships is measured in standard containers (TEUs). Within a time span of one month, the port management department can collect a large amount of throughput data, which is arranged in chronological order to form a port throughput time series.
[0024] The container traffic map records every container's transportation details. At the container terminal, each container has a unique identification code. Every step of the journey from a container unloaded from a ship, transferred to the terminal yard, and then loaded onto another ship or transported to an inland warehouse is recorded. This includes information such as its port of departure and destination, the length of stay at the terminal, and whether it underwent special inspections. This information is aggregated to form the container traffic map.
[0025] The storage equipment status log covers the status of equipment in each storage area within the port. For example, in an automated warehouse, the shelves, stackers, conveyors, and other equipment are equipped with sensors. These sensors monitor the operating status of the equipment in real time, such as the stacker's operating speed, the shelf's load capacity, and the conveyor's efficiency. When a piece of goods needs to be stored, it is first transported to the designated shelf area via a conveyor, and then the stacker deposits the goods in the appropriate location. During this process, a sudden drop in the conveyor's speed may affect the goods' turnover cycle; if the shelf's load capacity approaches its upper limit, it will reflect fluctuations in storage capacity.
[0026] A specific algorithm is used to jointly extract features from port throughput time series, container traffic patterns, and storage equipment status logs. For port throughput time series, peaks and troughs in cargo flow can be analyzed within different time periods, which helps determine ship scheduling. For example, a sudden increase in throughput within a certain time period may indicate the simultaneous arrival of multiple ships, necessitating a rational arrangement of their docking and loading / unloading sequences. From the container traffic patterns, the dwell time of cargo at various transport links can be calculated, thereby determining the cargo turnover cycle. Equipment load information from storage equipment status logs can reflect fluctuations in storage capacity. Combining this information, a composite feature vector is generated that represents the ship scheduling time series, cargo turnover cycle, and storage capacity fluctuations. For example, the composite feature vector might be represented as a multidimensional array, where the ship scheduling time series is represented as time intervals, the cargo turnover cycle is expressed in days, and storage capacity fluctuations are expressed as a percentage of capacity utilization.
[0027] Step S120: Perform spatiotemporal coding on the composite feature vector to generate a multi-dimensional spatiotemporal coding matrix. The spatiotemporal coding process includes extracting the time-dependent features of ship arrivals using a recurrent convolutional network and combining it with a graph attention mechanism to capture the correlation of cargo flows across storage areas.
[0028] In detail, spatiotemporal coding processing is an operation performed on a composite feature vector, the purpose of which is to encode the information in the feature vector according to the dimensions of time and space, so as to better capture the spatiotemporal relationship in shipping logistics, thereby helping to better utilize the time-dependent features and spatial correlation features in subsequent prediction models.
[0029] The multidimensional spatiotemporal encoding matrix is a matrix data structure obtained through spatiotemporal encoding. It contains shipping logistics feature information encoded across multiple dimensions, such as time, storage area, and cargo characteristics. It provides a more comprehensive and structured representation of the composite feature vector in spatiotemporal dimensions, preparing the input to the pre-trained basic shipping and warehousing demand forecasting model.
[0030] The recurrent convolutional network (RCN) is a neural network architecture designed to extract ship arrival time dependencies. It can process sequential data (such as ship arrival time series) and captures temporal dependencies within the data through convolutional layers and recurrent structures (such as LSTM or GRU units). In this scenario, it can learn both long-term and short-term dependencies between ship arrival times, such as when ships arrive at ports at fixed intervals or when arrival times fluctuate due to external factors.
[0031] The ship arrival time dependency characteristic reflects the relationship between ship arrival times, including long-term cyclical patterns (such as the fixed arrival period of certain cargo ships) and short-term fluctuation factors (such as changes in arrival time caused by weather, shipping market, etc.). It is of great significance for the rational arrangement of ship scheduling and storage resources in ports.
[0032] The graph attention mechanism is a mechanism for processing graph-structured data. In this scenario, it is used to construct a graph structure with storage areas as nodes and cargo flow paths as edges, and to capture the correlation of cargo flow across storage areas. It can dynamically focus on the relationship between different nodes (storage areas) in the graph and adjust the attention to the relationship between each area based on the actual situation of cargo flow, thereby better analyzing the complex correlation of cargo flow.
[0033] Cross-storage area cargo flow relevance describes the relationship between cargo transfers between different storage areas. The transfer of cargo from one storage area to another within a port involves complex relationships, such as the direction of cargo flow, the order of transfers, and the mutual influence of cargo flows between different areas. These relationships are influenced by a variety of factors, including cargo type, storage equipment layout, and market demand.
[0034] Continuing with Port AA as an example, after obtaining the composite feature vector, spatiotemporal encoding is performed. For the recurrent convolutional network to extract ship arrival time dependency features, assume that the port has ship arrival records for the past year. The arrival time of each ship is a critical time node. The recurrent convolutional network uses these arrival time series as input and can capture the dependencies between different ship arrival times. For example, some large cargo ships may arrive at the port on a fixed schedule, such as every two months, which is a long-term time dependency. In the short term, ship arrival times may fluctuate due to factors such as weather and the shipping market. The recurrent convolutional network can learn these time dependency features. For example, in a particular season, due to the influence of typhoons, ship arrival times will be relatively dispersed, avoiding concentrated arrivals that cause port congestion.
[0035] At the same time, a graph attention mechanism is incorporated to capture the inter-storage area correlations. Port AA has multiple storage areas, each storing different types of goods or serving different shipping routes. After cargo is unloaded from a ship, it is transferred to a specific storage area. During this process, complex inter-storage area correlations exist. For example, some imported electronic products may first undergo inspection in a temporary storage area near the dock before being transferred to a dedicated electronics storage area. The graph attention mechanism constructs a graph structure with storage areas as nodes and cargo flow paths as edges. Each storage area has unique attributes, such as area, storage capacity, and equipment sophistication. The graph attention mechanism dynamically monitors the cargo flow relationships between different storage areas. If a storage area experiences a cargo backlog, the graph attention mechanism can analyze which upstream storage areas are experiencing cargo transfer issues, or which downstream storage areas are experiencing insufficient demand, preventing timely cargo transfer. In this way, the time-dependent characteristics of ship arrivals and the inter-storage area cargo flow correlations are integrated to generate a multidimensional spatiotemporal encoding matrix. This multi-dimensional spatiotemporal coding matrix can be a three-dimensional matrix, in which one dimension represents time, one dimension represents storage area, and another dimension represents characteristic information of goods.
[0036] Step S130: Input the multi-dimensional spatiotemporal coding matrix into a pre-trained basic shipping storage demand prediction model to output preliminary storage demand distribution data, which includes the expected cargo accumulation volume and storage cycle probability curve of each storage zone.
[0037] In detail, the pre-trained basic shipping and warehousing demand prediction model is a model that has been pre-trained with a large amount of data, and is used to predict shipping and warehousing demand. It can be constructed based on a sample shipping and warehousing operation data set, and includes components such as a time feature extractor, a spatial feature extractor, and a fully connected prediction layer. It can predict the preliminary warehousing demand distribution data of each warehousing partition based on the input multi-dimensional spatiotemporal coding matrix.
[0038] The preliminary storage demand distribution data, generated by a pre-trained basic shipping storage demand forecasting model, includes the expected cargo accumulation volume and storage cycle probability curve for each storage zone. The expected cargo accumulation volume represents the amount of cargo that is likely to accumulate in each storage zone over a period of time, while the storage cycle probability curve describes the probability of cargo remaining in a storage zone for different lengths of time. These data constitute the preliminary storage demand forecast results.
[0039] The expected cargo volume for each storage zone is the amount of cargo that is expected to accumulate within a specific future timeframe, as predicted by the basic shipping storage demand forecasting model for each storage zone within the port. This volume, expressed in specific units (such as tons or TEUs), reflects the cargo storage demand for each storage zone and serves as a key basis for storage planning and resource allocation.
[0040] The storage period probability curve represents the probability distribution of different lengths of time goods reside within a storage zone. Due to factors such as market demand and product characteristics, the residence time of different types of goods within a storage zone is uncertain. The storage period probability curve quantifies this uncertainty. For example, for certain seasonal goods, the storage period may be shorter before peak season but longer during off-season. This curve helps warehouse operators optimize the storage and turnover of goods.
[0041] Taking a specific storage zone at Port AA as an example, the multidimensional spatiotemporal encoding matrix is input into a pre-trained basic shipping and storage demand forecasting model. This model is built based on a large amount of historical data, including ship arrivals, cargo transshipments, and storage equipment operation data from past years. Within the model, for each storage zone, complex calculations are performed based on the input multidimensional spatiotemporal encoding matrix.
[0042] Let's assume a storage area primarily stores textiles. The model predicts the expected cargo volume for this storage area over a period of time. If a large number of textile import orders arrive during a certain time period, and ship arrival schedules indicate the arrival of several ships carrying textiles, the model predicts an increase in cargo volume for this storage area. This expected cargo volume can be expressed in tons or TEUs.
[0043] The model also outputs a storage cycle probability curve. For textile storage zones, storage cycles can be affected by various factors, such as seasonal fluctuations in market demand and the type of textile (high-end fashion fabrics versus standard home textiles). High-end fashion fabrics may be in high demand before seasonal changes, resulting in shorter storage cycles. Standard home textiles, on the other hand, may have longer storage cycles and be less affected by market fluctuations. By learning and analyzing historical data, the model can predict the probability of different storage cycles. For example, the probability of a storage cycle of one month is 20%, two months is 30%, and three months is 40%. This preliminary storage demand distribution data provides a foundation for subsequent refinements.
[0044] Step S140: Modify the preliminary storage demand distribution data to generate a target storage demand forecast result.
[0045] In this embodiment, the target storage demand forecast is the final forecast obtained by modifying the preliminary storage demand distribution data. This forecast is more accurate and reliable than the preliminary forecast, taking into account more factors, such as demand influencing factors at storage nodes and temporal and spatial explanatory feature traceability data. It can better reflect actual storage demand and provide decision support for port storage management.
[0046] The correction process of the preliminary storage demand distribution data is illustrated by taking the textile storage division of Port AA as an example.
[0047] Based on the local sensitive feature domain of the multidimensional spatiotemporal coding matrix and the storage cycle probability curve, the demand influencing factors of different storage nodes (here, storage nodes can be understood as different storage areas or locations within a storage partition) are calculated. Feature slices corresponding to each storage node are extracted from the local sensitive feature domain of the multidimensional spatiotemporal coding matrix. Assume that the textile storage partition has three different storage areas, A, B, and C. For storage area A, its corresponding feature slice includes information such as the recent maintenance status of the equipment in that area and the efficiency of cargo transfer with adjacent areas. The local sensitivity index of this feature slice is calculated. For example, if the equipment in this area has just undergone comprehensive maintenance and is operating efficiently, then this feature slice is likely to contribute more to the prediction of cargo accumulation, resulting in a larger local sensitivity index.
[0048] At the same time, a cargo detention risk score is calculated for each storage node based on the storage cycle probability curve. For storage area A, if the storage cycle probability curve indicates a high probability of cargo being stored for more than three months, the cargo detention risk score will be higher, as textiles may be affected by the storage environment (such as moisture and discoloration). The local sensitivity index and detention risk score are then normalized and weighted to generate a comprehensive demand impact factor matrix. For example, if the local sensitivity index of storage area A is 0.6 and the detention risk score is normalized to 0.8, the weighted comprehensive demand impact factor is 0.7.
[0049] Next, a target extractor with significant explanatory power is selected from the multiple feature extractors of the basic shipping and warehousing demand forecasting model. The explanatory power index of each feature extractor in the basic shipping and warehousing demand forecasting model is identified. This explanatory power index is calculated using the back-propagation saliency map. Assume that the model contains multiple feature extractors, such as a temporal feature extractor and a spatial feature extractor. If the explanatory power index of a temporal feature extractor exceeds a preset threshold, it is selected as the target extractor. The intermediate feature representations of the target extractor in the multi-layer network of the basic shipping and warehousing demand forecasting model are extracted to form a multi-granularity feature set. For example, the temporal feature extractor may extract cargo turnover features at different time scales at different layers. These features are aggregated to form a multi-granularity feature set.
[0050] Hierarchical attention weighting is applied to multi-granular feature sets based on demand influencing factors to generate feature traceability data with spatiotemporal interpretability. Different features in the multi-granular feature set are assigned different weights based on demand influencing factors. If a feature is highly correlated with cargo detention risk, it will be given a higher weight.
[0051] A spatiotemporal attention distribution map reflecting the weights of cargo flow patterns is constructed based on the feature traceability data. The feature traceability vectors of the feature traceability data are input into the multi-head self-attention module to generate an initial attention weight matrix. For example, this initial attention weight matrix may represent the degree of attention paid to cargo flow in different temporal and spatial dimensions. The initial attention weight matrix is decomposed into temporal and spatial dimensions to obtain a temporal attention sub-matrix and a spatial attention sub-matrix. These two sub-matrices are fused using a gating mechanism to generate a spatiotemporal joint attention distribution. This spatiotemporal joint attention distribution is then sparsified, retaining the top K attention connections with weights above a dynamic threshold to construct a spatiotemporal attention distribution map reflecting the weights of cargo flow patterns. This map may indicate which storage areas cargo tends to flow from and to during specific time periods.
[0052] The spatiotemporal attention map is combined with a dynamic shipping logistics dataset for feature enhancement and fusion to generate an optimized input matrix. The spatiotemporal attention map is converted into a feature enhancement mask matrix, and the original features in the dynamic shipping logistics dataset are normalized to obtain a normalized feature tensor. For example, the original cargo throughput data is normalized to a certain numerical range. The normalized feature tensor is then Hadamard-producted with the feature enhancement mask matrix to obtain primary enhanced features. The primary enhanced features are then added to the original features via residual connections to generate the final optimized input matrix.
[0053] Finally, the preliminary storage demand distribution data is modified based on the optimized input matrix to generate a target storage demand forecast. For example, for the expected cargo backlog in the textile storage zone, if a textile order for a ship arriving soon is canceled, the expected cargo backlog will be reduced accordingly based on the information in the optimized input matrix. Furthermore, the storage cycle probability curve is adjusted based on new information. For example, if a new competitor appears in the market and textile sales are expected to accelerate, the storage cycle probability curve will be adjusted toward a shorter cycle, thereby generating a more accurate target storage demand forecast.
[0054] Based on the above steps, the embodiment of the present application collects the dynamic data set of shipping logistics of the target port and performs multimodal feature analysis to generate a composite feature vector, breaking through the limitations of the traditional single data source. By jointly extracting features from the port throughput time series, container loading map and storage equipment status log, it not only comprehensively covers the key information in the shipping and warehousing system, but also captures the complex internal correlations between different modal data, and generates a composite feature vector that includes ship scheduling timing, cargo turnover cycle and storage capacity fluctuations, providing rich and accurate basic data for subsequent predictions, greatly improving the information value of the data.
[0055] During the feature encoding phase, spatiotemporal encoding is performed on the composite feature vector. Using a recurrent convolutional network to extract the time-dependent features of ship arrivals, the model accurately captures the dynamic patterns of changes in ship arrival time series. Combined with a graph attention mechanism, the model captures the correlations between cargo flows across storage areas. This allows the model to automatically focus on important storage area relationships and adaptively assign attention weights, accurately capturing the complex patterns of cargo flows between different storage areas. This spatiotemporal encoding method generates a multidimensional spatiotemporal encoding matrix that effectively integrates information from both temporal and spatial dimensions, providing a more comprehensive and in-depth feature representation for storage demand forecasting and improving the model's ability to model complex real-world scenarios. Traditional methods often struggle to effectively handle complex cross-regional cargo flow relationships.
[0056] The multidimensional spatiotemporal encoding matrix is fed into a pre-trained basic shipping storage demand forecasting model. The resulting preliminary storage demand distribution data includes the expected cargo accumulation volume and storage cycle probability curves for each storage zone. Compared to the general data provided by traditional forecasting methods, this provides port operators with more detailed and accurate information. This data allows operators to plan storage resource allocation in advance, such as rationally arranging cargo storage plans for different storage zones, optimizing warehouse layout, improving storage space utilization, and reducing cargo backlogs and handling costs.
[0057] Finally, the preliminary storage demand distribution data was revised to generate a target storage demand forecast, further improving the accuracy and reliability of the forecast. By considering more complex factors and uncertainties in real-world scenarios, the preliminary results were optimized and adjusted, making the final forecast more reflective of reality. This helps ports make more flexible and efficient decisions in the face of changing shipping and logistics demands, rationally allocate resources, improve overall operational efficiency, and reduce operational risks.
[0058] In one possible implementation, the pre-trained basic shipping and warehousing demand forecasting model is constructed by the following steps: Step S101: Acquire a sample shipping and warehousing operation data set, wherein the sample shipping and warehousing operation data set includes ship arrival and departure records, a cargo type distribution matrix, and a warehousing equipment operation status time series.
[0059] In this example, taking Port AA as an example, the sample shipping and warehousing operations dataset contains rich and comprehensive information. Ship arrival and departure records detail the precise time, ship name, and ship owner information for each ship entering and leaving Port AA. For example, a large container ship named "Oriental" arrived at a terminal at Port AA at 9:00 AM on May 1, 2023, and departed at 5:00 PM on May 3. These records cover various types of ships, including tankers, bulk carriers, and container ships, operating at Port AA, and can span several years. The cargo type distribution matrix presents the distribution of cargo types and quantities entering and leaving the port during various time periods. For example, in a particular quarter, electronic products accounted for 30% of the total cargo volume, textiles for 20%, and chemical products for 15%. This data also includes detailed breakdowns of the percentages of different types of electronic products and textiles. The storage equipment operating status time series records the changes in the operating status of equipment in each storage area within Port AA over time. For example, the stacker cranes in automated warehouses are recorded for their operating speed, fault conditions, and changes in shelf load weight at different times. This data provides the foundation for building a basic shipping and warehousing demand forecasting model.
[0060] Step S102: construct a bidirectional gated recurrent unit network as a time feature extractor to process the sample shipping and warehousing operation data set to perform time dependency modeling on the ship arrival interval and the cargo turnover cycle, and generate a time dependency modeling result.
[0061] Taking Port AA as an example, when processing ship arrival and departure records, the bidirectional gated recurrent unit network analyzes each ship's arrival time as a time node. Over the long term, the operating cycles of different ships exhibit certain regularities. For example, large container ships on certain international routes may arrive at fixed intervals. The network processes the ship arrival time series separately in the forward and backward propagation layers. The forward propagation layer can capture positive trends in ship arrival intervals over time, such as the gradual decrease in arrival intervals on certain routes due to shipping market development. The backward propagation layer can analyze from back to front and discover potentially overlooked temporal dependencies. For example, during a specific period in the past, due to port facility upgrades, ship arrival intervals experienced a brief fluctuation, which had a long-term impact on subsequent arrival intervals. By extracting forward and backward temporal dependency features, the network outputs forward and backward hidden state sequences, which are then strided together to generate a fused hidden state matrix that incorporates bidirectional temporal correlations.
[0062] To model the temporal dependencies of cargo turnover cycles, a time slice sequence of the cargo type distribution matrix is extracted from a sample shipping and warehousing operations dataset and concatenated with the periodic pattern feature vector of the ship scheduling time series time step by time to form a joint temporal feature input. For example, for electronic products, the turnover cycle varies in different seasons. Before the new product launch season, the import volume of electronic products increases, and the turnover cycle is shorter because the goods need to be shipped to sales channels as quickly as possible. A deep stack of bidirectional gated recurrent unit networks captures the long-term and short-term dependencies of cargo turnover cycles through a multi-layer gating mechanism, outputting a multi-level temporal feature tensor. For example, in the short term, the turnover of a batch of electronic products may be affected by the recent logistics efficiency of the port; in the long term, it may be affected by changes in the supply and demand relationship of the entire electronics market. This multi-level temporal feature tensor is then compressed in the temporal dimension, and an adaptive pooling layer is used to extract the maximum temporal response feature and the average temporal trend feature, which are then concatenated as the initial results for temporal dependency modeling. A temporal attention mechanism module is then constructed to calculate the contribution weights of the initial results' features at different time steps to the warehouse demand forecast. The initial results are dynamically weighted and adjusted based on the contribution weights to generate an optimized time-dependent feature representation. Finally, this optimized time-dependent feature representation is fed into a regularization layer for feature scaling and noise suppression. The output is a standardized temporal feature vector, which is then fed into a prediction unit to generate predicted values for ship arrival intervals and cargo turnover cycles. The prediction error for time-dependent modeling is then calculated compared with the true labels. A backpropagation algorithm is then used to jointly optimize the parameters of the bidirectional gated recurrent unit network, the temporal attention mechanism module, and the prediction unit until the prediction error reaches convergence, generating the final time-dependent modeling results.
[0063] Step S103: construct a graph convolutional network as a spatial feature extractor to process the sample shipping and warehousing operation data set to extract spatial correlation features of the cargo transshipment path based on the processed warehousing area topology map.
[0064] Taking the storage areas of Port AA as an example, based on the storage area coordinates and transshipment path connectivity in the sample shipping and warehousing operations dataset, a storage area topology map can be constructed, with storage nodes as vertices and cargo transshipment paths as edges. This topology map consists of a node attribute matrix and an adjacency tensor. Each node in the node attribute matrix represents a storage area, with attributes such as the area, storage capacity, and equipment type. For example, a large open-air storage area may be large in size but store a relatively simple type of cargo, primarily bulk cargo, and its equipment primarily consists of large cranes. Dynamic feature expansion of the node attribute matrix is performed based on the infrastructure capacity and real-time cargo throughput of the storage nodes, generating a fused node feature vector that combines static attributes and dynamic states. If a storage area's cargo throughput has recently increased, this dynamic information is incorporated into the fused node feature vector.
[0065] Edge weight coefficients are calculated for each transshipment route to generate a weighted adjacency matrix. These edge weight coefficients are determined based on the route's frequency of use and transit time in historical cargo transshipment records. For example, a transshipment route connecting a port and a nearby storage area will have a higher edge weight coefficient due to its frequent use and short transit time. A multi-layer graph convolutional network is constructed. The fused node feature vectors and the weighted adjacency matrix are input into the first graph convolutional layer. A primary spatial embedding representation is generated by aggregating neighborhood node features. This primary spatial embedding representation is then input into the second graph convolutional layer, where weighted feature propagation is performed in conjunction with the edge weight coefficients to generate a higher-order spatial feature matrix. Spatial clusters are divided based on the physical layout of the storage areas. Graph pooling is performed on the higher-order spatial feature matrix to extract feature summary vectors for each spatial cluster. For example, storage areas storing the same type of cargo or serving the same shipping routes are grouped together based on their functional characteristics. The adjacency matrix is dynamically updated based on the temporal changes in the cargo transshipment routes, generating a time-aware dynamic graph structure. For example, as the seasons change, the shipping routes of certain goods may change, and this information is reflected in the dynamic graph structure. The dynamic graph structure and feature summary vector are input into the temporal graph attention layer, and the self-attention mechanism is used to capture spatial dependencies across time slices. For example, the cargo flow dependencies between storage areas may vary in different seasons, and the temporal graph attention layer can capture such changes. The attention-weighted spatial features are fused at multiple scales to generate a spatial correlation feature map with a hierarchical structure. Finally, the spatial correlation feature map is cross-modally aligned with the temporal dependency modeling results, and a joint spatiotemporal feature tensor is output for processing by the fully connected prediction layer.
[0066] Step S104: After tensor splicing, the outputs of the temporal feature extractor and the spatial feature extractor are input into a fully connected prediction layer to generate a preliminary demand forecast value.
[0067] Taking the storage demand forecast for Port AA as an example, the concatenated tensor features include temporal characteristics such as ship arrival intervals and cargo turnover cycles, as well as spatial correlation characteristics of cargo transshipment routes. The fully connected prediction layer performs complex calculations based on these comprehensive features to predict preliminary demand for each storage zone. For example, for the textile storage zone, based on the input features, the fully connected prediction layer predicts preliminary demand values such as the expected cargo accumulation volume and required storage space over a period of time.
[0068] Step S105, using an adaptive moment estimation algorithm to jointly optimize the parameters of the temporal feature extractor, the spatial feature extractor and the fully connected prediction layer until the prediction error converges, thereby generating the basic shipping and warehousing demand prediction model, wherein the basic shipping and warehousing demand prediction model includes the temporal feature extractor, the spatial feature extractor and the fully connected prediction layer.
[0069] In this embodiment, during the optimization process, the error between the predicted value and the actual value is continuously calculated. This actual value is obtained based on the accurate storage operation data of Port AA in the past. As the number of iterations increases, the prediction error gradually converges. For example, the error in predicting the cargo accumulation volume of the textile storage partition may be large at the beginning, but as the algorithm continuously adjusts the parameters of the time feature extractor, spatial feature extractor and fully connected prediction layer, the prediction error gradually decreases. When the prediction error converges to an acceptable range, a basic shipping storage demand prediction model is generated. This model contains an optimized time feature extractor, spatial feature extractor and fully connected prediction layer, which can be used for subsequent storage demand forecasting work.
[0070] In a possible implementation, step S102 includes: Step S1021 , performing time alignment processing on the ship arrival and departure records and storage equipment operation status time series in the sample shipping and storage operation data set to generate multi-dimensional time series data with a unified timestamp.
[0071] In this embodiment, the shipping and warehousing operations at Port AA are taken as an example. For example, the "Ocean Star" arrives at the port at 10 a.m. on March 1, 2023, and leaves at 3 p.m. on March 3; the "Voyage" arrives at the port at 8 a.m. on March 5, 2023, and leaves at 11 a.m. on March 7, etc. The storage equipment operating status time series records information such as the operating time of the crane and the load changes of the shelves, and the recording time intervals of these data may be different. In order to enable unified analysis, time alignment processing is required. The data from different sources are divided according to the same time interval, for example, one hour as a time unit, thereby generating multidimensional time series data with a unified timestamp. In this way, at the same timestamp, the arrival and departure status of the ship and the operating status of the storage equipment can be obtained at the same time, forming a time series data matrix containing multiple aspects of information.
[0072] Step S1022: input the multidimensional time series data into the forward propagation layer and the backward propagation layer of the bidirectional gated recurrent unit network, extract the forward time-dependent features and the backward time-dependent features respectively, and output the forward hidden state sequence and the backward hidden state sequence.
[0073] Taking the forward propagation layer as an example, it starts from the starting point of the time series and processes the data in chronological order. When processing the interval between ship arrivals, for each ship arrival event, it analyzes the time interval with the previous ship arrival event and combines it with the changes in the operating status of the storage equipment. For example, if the storage equipment is operating at high load when the previous ship arrives, and the interval between the arrivals of the next ship is shorter, the forward propagation layer will capture this time dependency that may affect storage demand, thereby extracting the forward time dependency features and outputting the forward hidden state sequence. The backward propagation layer starts from the end of the time series and processes the data in reverse. It can discover some relationships that are not easy to detect in the forward propagation. For example, during a certain period of time, the maintenance plan of the storage equipment may affect the arrangement of subsequent ship arrivals. The backward propagation layer can capture this reverse time dependency and output the backward hidden state sequence.
[0074] Step S1023 , performing stride-length concatenation on the forward hidden state sequence and the backward hidden state sequence to generate a fused hidden state matrix containing bidirectional temporal correlation.
[0075] Assuming the forward hidden state sequence is [state 1, state 2, state 3] and the backward hidden state sequence is [state 4, state 5, state 6], concatenating them according to a specific stride rule may result in a fused hidden state matrix with bidirectional temporal dependencies, such as [state 1, state 4, state 2, state 5, state 3, state 6]. Each element in this fused hidden state matrix incorporates temporal dependency information from both the forward and backward propagation layers.
[0076] Step S1024: Based on the eigenvector of each time step in the fused hidden state matrix, a time-dependent feature code of the ship arrival interval is constructed, and the time-dependent feature code is multi-scale aggregated through a sliding time window to generate a periodic pattern feature vector of the ship scheduling time series.
[0077] For each time step, a specific code is generated based on historical data on ship arrival intervals and related information such as the status of storage equipment. For example, when ship arrival intervals are short and storage equipment is operating normally, the code might be represented as a specific vector [value 1, value 2, value 3]. This time-dependent feature code is then aggregated at multiple scales using a sliding time window. The sliding time window can be set to different sizes, such as 3 hours or 6 hours. Taking a 3-hour sliding time window as an example, the feature codes for ship arrival intervals within the 3-hour window are aggregated, taking into account the changes in ship arrivals and storage equipment status within these 3 hours, to generate a periodic pattern feature vector for the ship scheduling time series. This vector reflects the periodicity of ship arrival intervals at different time scales.
[0078] Step S1025 , extracting a time slice sequence of the cargo type distribution matrix from the multidimensional time series data, and concatenating it with the periodic pattern feature vector time step by time to form a joint time feature input.
[0079] In this embodiment, the cargo type distribution matrix records the changes in the quantity of different cargo types. For example, on a given day, there are 100 TEUs (equivalent units) of electronic products and 50 TEUs of textiles. Time slices of this cargo type distribution matrix are extracted in chronological order to form a time slice sequence. This time slice sequence is then concatenated with the periodic pattern feature vectors of the ship scheduling time series on a time-step basis to form a joint time feature input. For example, if at a certain time step, the periodic pattern feature vectors of the ship scheduling time series indicate a high frequency of ship arrivals, while the time slices of the cargo type distribution matrix indicate an increase in the import volume of electronic products, then this joint time feature input incorporates both aspects of information and can more comprehensively reflect the status of shipping and warehousing operations.
[0080] In step S1026, the joint time feature is input into the deep stacking layer of the gated recurrent unit network, and the long-term and short-term dependencies of the goods turnover cycle are captured step by step through a multi-layer gating mechanism. A multi-level time feature tensor is output, and the multi-level time feature tensor is compressed in the time dimension. The maximum time response feature and the average time trend feature are extracted using the adaptive pooling layer, and the two are spliced into the initial result of time dependency modeling.
[0081] In this embodiment, in this deep stacking layer, the long-term and short-term dependencies of the cargo turnover cycle are captured step by step through a multi-layer gating mechanism. Taking the cargo turnover cycle of electronic products as an example, in the short term, it may be affected by the immediate logistics operation efficiency in the port, such as loading and unloading speed, congestion of the transshipment path, etc.; in the long term, it may be affected by changes in supply and demand in the entire electronic product market, such as the release cycle of new products, seasonal changes in consumer demand, etc. The gating mechanism at each layer will analyze and extract these long-term and short-term dependencies, and finally output a multi-level time feature tensor. This tensor contains the time feature information of the cargo turnover cycle extracted from the gating mechanisms at different levels.
[0082] While the multi-level temporal feature tensor contains rich temporal information, subsequent processing may require a more compact representation. An adaptive pooling layer is used to extract the maximum temporal response feature and the average temporal trend feature. The maximum temporal response feature may reflect key changes in the product turnover cycle at a specific point in time, such as the maximum turnover rate of electronic products during a promotional season. The average temporal trend feature reflects the average trend of product turnover over a longer period. These two features are concatenated to form the initial results of time-dependent modeling.
[0083] Step S1027, construct a time attention mechanism module, calculate the contribution weights of different time step features in the initial results to the warehouse demand prediction, dynamically adjust the initial results according to the contribution weights, and generate an optimized time-dependent feature representation.
[0084] For example, if changes in the cargo turnover cycle within a certain time period may have a significant impact on warehousing demand, the time step features corresponding to this time period will have a higher contribution weight in the warehousing demand forecast. Based on this contribution weight, the initial results are dynamically weighted and adjusted to generate an optimized time-dependent feature representation. This can highlight the time features that are more critical to warehousing demand forecasting and improve forecast accuracy.
[0085] In step S1028, the optimized time-dependent feature representation is input into the regularization layer for feature scaling and noise suppression, and a standardized time feature vector is output. The standardized time feature vector is input into the prediction unit to generate predicted values of the ship arrival interval and the cargo turnover cycle, and the prediction error of the time-dependent modeling is calculated with the true label.
[0086] In step S1029, the back propagation algorithm is used to jointly optimize the parameters of the bidirectional gated recurrent unit network, the temporal attention mechanism module, and the prediction unit until the prediction error reaches the convergence condition, thereby generating the final time-dependent modeling result.
[0087] Actual shipping and warehousing operations data may contain some fluctuations or noise, such as abnormal values in cargo turnover cycles due to measurement errors or temporary special circumstances. The regularization layer appropriately scales the eigenvalues in the feature representation to within an appropriate range, while suppressing the impact of this noise and outputting a standardized time feature vector.
[0088] Finally, the prediction unit calculates predicted values for ship arrival intervals and cargo turnover cycles based on the input standardized time feature vector and pre-trained model parameters. These predicted values are then compared with the true labels (actual ship arrival intervals and cargo turnover cycles) to calculate the prediction error for time-dependent modeling. A backpropagation algorithm is used to jointly optimize the parameters of the bidirectional gated recurrent unit network, the temporal attention mechanism module, and the prediction unit. During the optimization process, the parameters of each component are adjusted based on the magnitude of the prediction error. For example, if the predicted ship arrival interval differs significantly from the true value, the backpropagation algorithm adjusts the parameters related to the ship arrival interval in the bidirectional gated recurrent unit network and the parameters related to the weighting of the time-step features of the ship arrival interval in the temporal attention mechanism module. This process is iterated until the prediction error reaches convergence, generating the final time-dependent modeling result. This final result accurately reflects the time-dependent relationship between ship arrival intervals and cargo turnover cycles, providing important temporal feature information for shipping and warehousing demand forecasting.
[0089] For example, in one possible implementation, step S103 includes: Step S1031: Based on the storage area coordinates and transfer path connection relationships in the sample shipping and storage operation data set, a storage area topology map is generated with storage nodes as vertices and cargo transfer paths as edges. The topology map includes a node attribute matrix and an adjacency relationship tensor.
[0090] Taking Port AA as an example, the storage area coordinates define the geographic location of each storage area within the port. For example, Storage Area A is located in the northeast of the port with coordinates (x1, y1); Storage Area B is located in the southwest with coordinates (x2, y2), and so on. The transfer path connection relationship describes the channels for cargo transfer between storage areas. For example, there is a direct transfer path from Storage Area A to Storage Area B, while Storage Area A to Storage Area C requires passing through Storage Area B, and so on. This storage area topology graph consists of a node attribute matrix and an adjacency tensor. Each row in the node attribute matrix corresponds to a storage node and contains attribute information such as the storage area's area and storage capacity. For example, Storage Area A has an area of 1,000 square meters and a storage capacity of 500 TEUs; Storage Area B has an area of 800 square meters and a storage capacity of 400 TEUs, and so on. The adjacency tensor represents the connection relationship between storage nodes. For example, if storage area A and storage area B are directly connected by a transfer path, the corresponding positions in the adjacency tensor will have corresponding labels.
[0091] Step S1032: Dynamically expand the node attribute matrix according to the infrastructure capacity and real-time cargo throughput of the storage node to generate a fused node feature vector including static attributes and dynamic states.
[0092] Suppose that the infrastructure capacity of warehouse A is 500 TEUs of racking capacity, and that the real-time cargo throughput at a given moment is 300 TEUs. By integrating this dynamic information into the node attribute matrix, the original attribute vector might be expanded from [area, storage capacity] to [area, storage capacity, infrastructure capacity, real-time cargo throughput], generating a fused node feature vector that combines static attributes with dynamic states. This fused node feature vector can more comprehensively reflect the actual state of the warehouse node.
[0093] Step S1033 , based on the path usage frequency and transportation time in the historical cargo transshipment records, the edge weight coefficient of each transshipment path is calculated to generate a weighted adjacency matrix.
[0094] For example, consider a transshipment route from storage area A to storage area B that was used 10 times in the past month, with an average transport time of 2 hours. Based on specific calculation rules (e.g., higher edge weights indicate higher frequency of use and shorter transport times), the edge weight coefficient for this transshipment route is calculated. This calculation is repeated for all transshipment routes, generating a weighted adjacency matrix. The weights in this adjacency matrix reflect the importance of the transshipment route in the cargo transshipment process.
[0095] Step S1034: construct a multi-layer graph convolutional network, input the fused node feature vector and the weighted adjacency matrix into the first graph convolutional layer, and generate a primary spatial embedding representation by aggregating neighborhood node features.
[0096] In the first graph convolutional layer, a primary spatial embedding is generated by aggregating features from neighboring nodes. For each storage node, the feature information of its neighboring nodes (nodes connected to it by the transit path) is aggregated. For example, the primary spatial embedding of storage area A would include its own fused node feature vector as well as partial feature information from its connected storage areas B and C. This information is fused together using a specific aggregation algorithm (e.g., graph convolution).
[0097] In step S1035, the primary spatial embedding representation is input into the second graph convolution layer, and weighted feature propagation is performed in combination with the edge weight coefficient to generate a high-order spatial feature matrix.
[0098] In the second graph convolution layer, the edge weight coefficient affects the strength of feature propagation. If a transfer route has a higher edge weight coefficient, the feature information propagated along this route will be given greater importance. This weighted feature propagation generates a high-order spatial feature matrix. This high-order spatial feature matrix incorporates higher-level spatial feature information processed by the two graph convolution layers, and can more deeply reflect the spatial relationships between storage areas.
[0099] Step S1036 , dividing the spatial clusters based on the physical layout of the storage area, performing a graph pooling operation on the high-order spatial feature matrix, and extracting feature summary vectors of different spatial clusters.
[0100] For example, based on factors such as the storage area's function, cargo type, or geographic location, a storage area storing electronics could be divided into one spatial cluster, while a storage area storing textiles could be divided into another. Graph pooling is performed on the high-order spatial feature matrix to extract feature summary vectors for each spatial cluster. Graph pooling compresses and summarizes the high-order spatial features within each cluster, yielding a feature summary vector that represents the overall characteristics of the cluster.
[0101] Step S1037: dynamically update the adjacency matrix according to the temporal variation of the cargo transfer path to generate a time-aware dynamic graph structure.
[0102] For example, cargo transshipment routes may change with different seasons or market demand. If, in a certain season, due to an increase in the import volume of electronic products, a new transshipment route is opened from the port directly to the electronic product storage area, then this new connection relationship needs to be added to the adjacency matrix to generate a dynamic graph structure that can reflect this temporal change.
[0103] Step S1038: Input the dynamic graph structure and feature summary vector into the time-series graph attention layer, and capture the spatial dependency across time slices through the self-attention mechanism.
[0104] For example, the cargo transfer dependencies between spatial clusters may change over time. During promotional seasons, cargo transfers between electronic product storage areas and sales channel storage areas may be more frequent. The time-series graph attention layer can capture the changes in spatial dependencies across time slices.
[0105] Step S1039: Perform multi-scale fusion on the attention-weighted spatial features to generate a spatial correlation feature map with a hierarchical structure, cross-modally align the spatial correlation feature map with the time dependency modeling result, and output a joint spatiotemporal feature tensor for processing by the fully connected prediction layer.
[0106] In this embodiment, the spatial features at different levels in the spatial correlation feature map reflect the spatial correlation relationships between storage areas from local to global perspectives. For example, at a lower level, it may reflect the cargo transfer relationship between adjacent storage areas, while at a higher level, it may reflect the cargo transfer relationship between different functional areas.
[0107] Cross-modal alignment enables the effective integration and analysis of temporal and spatial features within the same framework. The joint spatiotemporal feature tensor, which incorporates temporal features such as ship arrival intervals and cargo turnover cycles, as well as spatial correlation features of cargo transshipment routes, provides comprehensive input to the fully connected prediction layer for forecasting shipping and warehousing demand.
[0108] In a possible implementation, step S140 may include: Step S141: Calculate demand impact factors of different storage nodes based on the local sensitive feature domain of the multi-dimensional spatiotemporal coding matrix and the storage cycle probability curve. The local sensitive feature domain is a feature subspace in the spatiotemporal coding matrix that reflects the risk of cargo detention.
[0109] In this embodiment, taking the storage area of AA Port as an example, the multi-dimensional spatiotemporal coding matrix covers a lot of information related to shipping and warehousing. The local sensitive feature domain is a feature subspace that reflects the risk of cargo detention. For each storage node, its corresponding feature slice is extracted from this local sensitive feature domain. For example, in the A storage area of AA Port, its feature slice may contain information such as the recent changes in cargo flow in the area, the distribution of cargo types, and the operating efficiency of related storage equipment. Calculate the local sensitivity index of this feature slice, which reflects the contribution of the feature slice to the prediction of cargo accumulation. Assuming that the recent cargo flow in the A storage area has fluctuated greatly and the equipment operating efficiency has declined, then the contribution of this feature slice to the prediction of cargo accumulation may be higher, and the corresponding local sensitivity index will also be larger.
[0110] At the same time, a cargo detention risk score is calculated for each storage node based on the storage cycle probability curve. The storage cycle probability curve describes the probability of cargo remaining at a storage node for different lengths of time. For storage area A, if the storage cycle probability curve indicates a high probability of cargo being detained for an extended period—for example, a 30% probability of being stored for more than three months—the cargo detention risk score will be higher, as prolonged detention can lead to risks such as cargo deterioration and excessive storage space usage. The local sensitivity index and detention risk score are then normalized and weighted to generate a comprehensive demand impact factor matrix. For example, if the normalized local sensitivity index of storage area A is 0.6 and the normalized detention risk score is 0.8, the comprehensive demand impact factor calculated using a specific weighting rule (e.g., weighting coefficients determined based on historical data and experience) is 0.7. This comprehensive demand impact factor matrix comprehensively considers the impact of different factors at each storage node on demand, providing an important basis for subsequent adjustments.
[0111] Step S142: Select a target extractor with significant explanatory power from multiple feature extractors of the basic shipping warehousing demand forecasting model, dynamically weight and fuse the output features of the target extractor in combination with the demand influencing factors, and generate feature traceability data that characterizes the driving factors of warehousing demand.
[0112] The basic shipping and warehousing demand forecasting model contains multiple feature extractors, such as the temporal feature extractor and the spatial feature extractor. The explanatory power index of each feature extractor is identified. This explanatory power index is calculated by backpropagating the saliency map. For example, in the temporal feature extractor, different components contribute differently to the final warehousing demand forecast when modeling the time-dependent relationship between ship arrival intervals and cargo turnover cycles. The explanatory power index of each component is calculated by backpropagating the saliency map. If the explanatory power index of a component of the temporal feature extractor exceeds a preset threshold, it indicates that this component has significant explanatory power in the warehousing demand forecast.
[0113] Feature extractors whose explanatory power exceeds a preset threshold are selected as target extractors. Assuming that the explanatory power of the temporal feature extractor related to the analysis of short- and long-term dependencies of cargo turnover cycles and the spatial feature extractor related to the extraction of spatial correlation features of cargo transfer paths between storage areas have high explanatory power, the feature extractors corresponding to these two parts are selected as target extractors. The intermediate feature representations of the target extractors in the multi-layer network of the basic shipping and storage demand forecasting model are extracted to form a multi-granularity feature set. For example, the temporal feature extractor may extract cargo turnover features at different time scales at different layers, ranging from short-term daily turnover features to long-term seasonal turnover features. Similarly, the spatial feature extractor may extract spatial correlation features of storage areas at different granularities at different layers. Aggregating these different layer features forms a multi-granularity feature set.
[0114] Hierarchical attention weighting is applied to the multi-granularity feature set based on the demand influencing factors to generate a feature traceability vector with spatiotemporal explanatory power. Different features in the multi-granularity feature set are given different weights based on the demand influencing factors. For example, the cargo turnover cycle feature, which is highly correlated with the risk of cargo detention, is given a larger weight based on the demand influencing factors due to its importance in warehousing demand forecasting. In this way, the demand influencing factors are integrated into the multi-granularity feature set to generate a feature traceability vector that can characterize the driving factors of warehousing demand. This vector can explain the reasons for changes in warehousing demand from both temporal and spatial dimensions.
[0115] Step S143: construct a spatiotemporal attention distribution map reflecting the weight of the cargo flow pattern based on the feature traceability data, perform feature enhancement fusion on the spatiotemporal attention distribution map and the shipping logistics dynamic data set to generate an optimized input matrix.
[0116] This initial attention weight matrix reflects the degree of attention paid to the flow of goods in different temporal and spatial dimensions. For example, within a certain time period or storage area, the flow of goods may be more frequent or have a greater impact on storage demand, so the corresponding position in the initial attention weight matrix will have a higher weight value. The initial attention weight matrix is decomposed into the spatiotemporal dimensions to obtain the temporal attention submatrix and the spatial attention submatrix. The temporal attention submatrix focuses on the temporal changes in the flow of goods, such as the differences in cargo flow between different seasons or different working days; the spatial attention submatrix focuses on the relationship between the flow of goods between storage areas, such as which storage areas have more frequent cargo transfers.
[0117] A gating mechanism is used to fuse the temporal and spatial attention sub-matrices to generate a joint spatiotemporal attention distribution. This gating mechanism appropriately adjusts the attention weights in the temporal and spatial dimensions based on the actual flow of goods. For example, if during a promotional season, the flow of goods between specific storage areas is not only more concentrated in time but also has a specific spatial direction, the gating mechanism will adjust the weights accordingly, ensuring that the joint spatiotemporal attention distribution accurately reflects this flow pattern. The joint spatiotemporal attention distribution is then thinned, retaining the top K attention connections with weights above a dynamic threshold to construct a spatiotemporal attention distribution map that reflects the weights of the goods flow pattern. This map can highlight key temporal and spatial relationships in the flow of goods. For example, during a certain time period, the flow of goods from storage area A to storage area B is a particularly noteworthy flow pattern.
[0118] The spatiotemporal attention map is fused with the shipping logistics dynamics dataset for feature enhancement to generate an optimized input matrix. First, the spatiotemporal attention map is converted into a feature enhancement mask matrix. The element values of this feature enhancement mask matrix correspond to the weights in the spatiotemporal attention map. This matrix is used to enhance the features of the shipping logistics dynamics dataset. The original features in the shipping logistics dynamics dataset are normalized to obtain a normalized feature tensor. For example, cargo throughput data is normalized using a specific method (such as mean-standard deviation normalization) to keep its values within an appropriate range. The normalized feature tensor is then subjected to a Hadamard product operation with the feature enhancement mask matrix to obtain primary enhanced features. The Hadamard product operation enhances or suppresses features in the normalized feature tensor based on the weights in the feature enhancement mask matrix. For example, if a feature has a high weight in the spatiotemporal attention map, its value in the primary enhanced features will be relatively large after the Hadamard product operation.
[0119] The primary enhanced features are added to the original features via residual connections to generate the final optimized input matrix. Residual connections preserve the useful information in the original features while incorporating the enhanced information from the primary enhanced features. For example, after residual connections, the original cargo type distribution features not only retain their basic information but also incorporate enhanced information related to cargo flow patterns from the spatiotemporal attention distribution map. This allows the final optimized input matrix to more comprehensively and accurately reflect the actual shipping and warehousing situation.
[0120] Step S144: modifying the preliminary storage demand distribution data based on the optimized input matrix to generate a target storage demand forecast result.
[0121] The expected cargo accumulation and storage cycle probability curves for each storage zone in the preliminary storage demand distribution data, using the textile storage zone at Port AA as an example, are revised based on the information in the optimization input matrix. If the cargo flow pattern in the optimization input matrix indicates a recent cancellation of a batch of new textile orders, the expected cargo accumulation will be reduced accordingly. If the storage cycle probability curves show an acceleration in textile sales due to intensified market competition, the storage cycle probability curves will be adjusted toward shorter cycles. In this way, the comprehensive information in the optimization input matrix is used to comprehensively and meticulously revise the preliminary storage demand distribution data, resulting in a more realistic and accurate target storage demand forecast.
[0122] In a possible implementation, step S141 includes: Step S1411: extract the feature slices corresponding to each storage node from the local sensitive feature domain of the multi-dimensional spatiotemporal coding matrix, and calculate the local sensitivity index of each feature slice. The local sensitivity index reflects the contribution of the feature slice to the prediction of the cargo accumulation amount.
[0123] Step S1412: Calculate the cargo detention risk score of each storage node based on the storage cycle probability curve, wherein the cargo detention risk score is nonlinearly positively correlated with the storage cycle.
[0124] Step S1413 , performing normalized weighting on the local sensitivity index and the detention risk score to generate a comprehensive demand impact factor matrix.
[0125] Step S1414: Dynamically smooth the demand impact factor matrix through a sliding time window to eliminate short-term fluctuation noise.
[0126] In this embodiment, taking the shipping and warehousing of AA Port as an example, the multi-dimensional spatiotemporal coding matrix contains rich shipping and warehousing related information, and the local sensitive feature domain is crucial for analyzing the demand influencing factors of each warehousing node.
[0127] First, feature slices corresponding to each storage node are extracted from the local sensitive feature domain of the multidimensional spatiotemporal encoding matrix. Taking storage nodes A, B, and C at Port AA as an example, the feature slices for storage node A encompass a wide range of information. For example, from a temporal perspective, this includes information related to the frequency of ship arrivals and the cargo handling volume at that storage node within a specific time period. From a spatial perspective, this includes information such as the cargo transfer efficiency between that storage node and surrounding nodes, and the impact of the spatial layout of storage equipment on cargo flow. When calculating the local sensitivity index for each feature slice, the contribution of these factors to the prediction of cargo accumulation needs to be considered. Suppose that the frequency of ship arrivals at storage node A has recently increased, but cargo handling efficiency has not improved accordingly, resulting in cargo accumulation near the dock. In this case, feature slices related to ship arrival frequency and cargo handling efficiency will contribute more to the prediction of cargo accumulation, and their local sensitivity index will be correspondingly higher.
[0128] The cargo detention risk score for each storage node is calculated based on the storage cycle probability curve. The storage cycle probability curve reflects the probability distribution of cargo staying at a storage node for different lengths of time. For storage node A, if the storage cycle probability curve shows a high probability of cargo being detained for more than three months, the cargo detention risk score for this storage node will be higher, as prolonged cargo detention consumes storage space, increases storage costs, and may lead to risks such as cargo damage. This detention risk score is nonlinearly positively correlated with the storage cycle, meaning that as the storage cycle increases, the detention risk score may increase gradually, reflecting the greater risk associated with prolonged detention.
[0129] The local sensitivity index and detention risk score are normalized and weighted to generate a comprehensive demand impact factor matrix. Assume that the local sensitivity index of storage node A is normalized to 0.6, and the cargo detention risk score is normalized to 0.8. During the weighted calculation, according to a predetermined weighting rule (which may be based on historical data analysis and expert experience), for example, a weight of 0.4 is assigned to the local sensitivity index and a weight of 0.6 to the detention risk score, resulting in a comprehensive demand impact factor of 0.4 * 0.6 + 0.6 * 0.8 = 0.72. The same calculation is performed for storage nodes B and C, etc., to generate a comprehensive demand impact factor matrix. This comprehensive demand impact factor matrix comprehensively considers the local sensitivity characteristics and cargo detention risks of each storage node, providing a more comprehensive basis for subsequent analysis.
[0130] Dynamically smooth the demand impact factor matrix using a sliding time window to eliminate short-term fluctuation noise. In actual shipping and warehousing operations, demand impact factors may experience short-term fluctuations due to temporary factors (such as short-term weather changes affecting ship arrival times, small-scale equipment failures, etc.). Taking storage node A as an example, suppose that due to a brief period of heavy fog, the number of ships arriving at the port on a certain day is significantly reduced, causing abnormal fluctuations in the demand impact factor calculated for that day. Dynamic smoothing is performed using a sliding time window. For example, setting the sliding time window to 7 days, the demand impact factors within these 7 days are weighted averaged (with higher weights for times closer to the current time and lower weights for times farther away). This eliminates this short-term fluctuation noise, allowing the demand impact factor to more stably and accurately reflect the demand situation at the storage node.
[0131] In a possible implementation, step S142 includes: Step S1421, identifying the explanatory index of each feature extractor in the basic shipping and warehousing demand prediction model, wherein the explanatory index is obtained by calculating the back-propagation significance map.
[0132] Step S1422: Select the feature extractor whose explanatory power index exceeds a preset threshold as the target extractor.
[0133] Step S1423 , extracting the intermediate feature representation of the target extractor in the multi-layer network of the basic shipping and warehousing demand forecasting model to form a multi-granularity feature set.
[0134] Step S1424 , performing hierarchical attention weighting on the multi-granularity feature set according to the demand influencing factor, and generating a feature traceability vector with spatiotemporal interpretability.
[0135] In the shipping and warehousing demand prediction model of AA Port, there are multiple feature extractors, such as time feature extractor and spatial feature extractor, and each feature extractor plays a different role in the processing of shipping and warehousing data.
[0136] First, we identify the explanatory power metrics for each feature extractor in the basic shipping and warehousing demand forecasting model. This explanatory power metric is calculated using a backpropagation saliency map. Taking the temporal feature extractor as an example, when modeling the time-dependent relationship between ship arrival intervals and cargo turnover cycles, different network layers and parameters contribute differently to the final warehousing demand forecast. Using the backpropagation saliency map, we can analyze in detail the contribution of each component to the forecast and calculate its explanatory power metric. For example, within the temporal feature extractor, the component related to analyzing peak ship arrival times is likely to have a high explanatory power metric, as peak arrival times often have a significant impact on warehousing demand.
[0137] Feature extractors whose explanatory power exceeds a preset threshold are selected as target extractors. Assuming the preset threshold is 0.5, if the explanatory power of the temporal feature extractor related to analyzing the long-term and short-term dependencies of cargo turnover cycles is 0.6, and the explanatory power of the spatial feature extractor related to extracting spatial correlation features of cargo transfer paths between storage areas is 0.7, then the feature extractors corresponding to these two components are selected as target extractors. This means that these two feature extractors have more significant explanatory power in warehouse demand forecasting, and their output features are more critical for accurately predicting warehouse demand.
[0138] The target extractor's intermediate feature representations within the multi-layer network of the basic shipping and warehousing demand forecasting model are extracted to form a multi-granularity feature set. For the selected temporal feature extractor, different layers within its multi-layer network may extract cargo turnover features at different time scales. For example, shallower layers may extract daily cargo turnover changes, while deeper layers may extract seasonal cargo turnover patterns. These different layer features together constitute the multi-granularity features of the temporal feature extractor. Similarly, for the spatial feature extractor, different layers will also extract spatial correlation features of storage areas at different granularities, such as cargo transfer relationships between local storage areas and the impact of the overall storage area layout on cargo flow. Aggregating these features from different target extractors and different network layers forms a multi-granularity feature set.
[0139] Hierarchical attention weighting is applied to multi-granular feature sets based on demand influencing factors to generate a feature traceability vector with spatiotemporal explanatory power. Each feature in the multi-granular feature set is assigned a different weight based on the demand influencing factors. For example, if the comprehensive demand influencing factor for storage node A is high, it indicates that the situation at this node has a significant impact on overall storage demand. Consequently, the weights of features related to storage node A, such as the cargo turnover cycle and the spatial correlation characteristics of storage areas, in the multi-granular feature set will be increased accordingly. For example, features related to the long-term and short-term dependencies between cargo turnover cycles at storage node A might be assigned a weight of 0.8, depending on the magnitude of the demand influencing factor, while features with weaker relationships with other storage nodes might be assigned a weight of only 0.2. By incorporating demand influencing factors into the multi-granular feature set through this hierarchical attention weighting approach, the resulting feature traceability vector can explain the drivers of storage demand from both temporal and spatial perspectives, providing valuable information for further analysis.
[0140] In a possible implementation, step S143 includes: Step S1431: Input the feature tracing vector of the feature tracing data into the multi-head self-attention module to generate an initial attention weight matrix.
[0141] Step S1432: Decompose the initial attention weight matrix into time and space dimensions to obtain a time attention sub-matrix and a space attention sub-matrix.
[0142] Step S1433: Use a gating mechanism to fuse the temporal attention sub-matrix and the spatial attention sub-matrix to generate a spatiotemporal joint attention distribution.
[0143] Step S1434, performing a sparse processing on the spatiotemporal joint attention distribution, retaining the top K attention connections with weight values higher than a dynamic threshold, to construct a spatiotemporal attention distribution map reflecting the weight of the cargo flow pattern.
[0144] Step S1435, converting the spatiotemporal attention distribution map into a feature enhancement mask matrix.
[0145] Step S1436: normalize the original features in the shipping logistics dynamic dataset to obtain a normalized feature tensor.
[0146] Step S1437: Perform a Hadamard product operation on the normalized feature tensor and the feature enhancement mask matrix to obtain primary enhanced features.
[0147] Step S1438: Add the primary enhanced features to the original features through residual connection to generate a final optimized input matrix.
[0148] Based on the shipping and warehousing scenario at Port AA, the feature traceability vectors of the feature traceability data are input into a multi-head self-attention module to generate an initial attention weight matrix. The multi-head self-attention module learns the information relationships within the feature traceability vectors from multiple representation subspaces. For example, the multi-head self-attention module analyzes the cargo turnover cycle characteristics and storage area spatial correlation characteristics within the feature traceability vectors from different "heads" (representation subspaces). Assuming there are three heads, the first head may focus on the short-term changes in the cargo turnover cycle characteristics and the local transshipment relationship within the storage area spatial correlation characteristics; the second head may focus on the long-term trends in the cargo turnover cycle characteristics and the overall layout relationship within the storage area spatial correlation characteristics; and the third head may comprehensively consider other complex interactions. In this way, an initial attention weight matrix is generated that reflects the complex relationships between different features. Each element in this initial attention weight matrix represents the importance of the corresponding feature in analyzing cargo flow patterns.
[0149] The initial attention weight matrix is decomposed into time and space dimensions to obtain a temporal attention submatrix and a spatial attention submatrix. The temporal attention submatrix focuses on the temporal variations in cargo flow. For example, the volume and direction of cargo flow at Port AA vary across seasons. During peak season, there may be more cargo flowing in and out, with shorter intervals between flows; the opposite is true during off-season. The temporal attention submatrix captures these temporal variations, highlighting the importance of different time points to cargo flow patterns. The spatial attention submatrix focuses on the cargo flow relationships between storage areas. For example, storage areas A and B may frequently transfer cargo due to their geographical proximity and convenient transportation facilities. Therefore, the connection weight corresponding to these two storage areas in the spatial attention submatrix will be higher to reflect this spatial cargo flow relationship.
[0150] A gating mechanism is used to fuse the temporal and spatial attention sub-matrices to generate a joint spatiotemporal attention distribution. The gating mechanism can appropriately adjust the attention weights in the temporal and spatial dimensions based on the actual flow of goods. For example, during special periods, such as holidays, shifts in consumer demand can alter not only the temporal pattern of goods flow (e.g., concentrated inflows before holidays and outflows after holidays) but also the spatial pattern of goods flow (e.g., increased flow to certain storage areas dedicated to holiday-related goods). The gating mechanism adjusts the weights in the temporal and spatial attention sub-matrices accordingly, ensuring that the fused joint spatiotemporal attention distribution accurately reflects the flow patterns of goods during these special periods.
[0151] The spatiotemporal joint attention distribution is thinned, retaining the top K attention connections with weights above a dynamic threshold to construct a spatiotemporal attention map reflecting the weights of cargo flow patterns. In actual shipping and warehousing operations, cargo flow patterns are influenced by numerous factors, but a few key cargo flow connections play a dominant role in the overall cargo flow pattern. By setting a dynamic threshold (which may be dynamically adjusted based on historical data and current operational conditions), only the top K attention connections with high weights are retained. For example, at Port AA, if the cargo transfer relationships between certain storage areas are found to have a significant impact on the overall cargo flow pattern during a specific period, the connection weights between these storage areas will be above the dynamic threshold and will be retained in the spatiotemporal attention map. This spatiotemporal attention map clearly demonstrates the key weight relationships in the cargo flow pattern, providing an important basis for subsequent feature enhancement and fusion.
[0152] Continuing with the example of the shipping and warehousing operations data for Port AA, we first convert the spatiotemporal attention map into a feature enhancement mask matrix. The weights in the spatiotemporal attention map reflect the key relationships in the cargo flow pattern, and these weights are converted into element values in the feature enhancement mask matrix. For example, if the spatiotemporal attention map indicates a high weight for the cargo flow connection from storage area A to storage area B, then the feature enhancement mask matrix will have a high value for the location corresponding to the cargo flow feature from storage area A to storage area B. This value will be used to enhance the original features in the shipping logistics dynamics dataset.
[0153] The raw features in the shipping logistics dynamics dataset are normalized to obtain a normalized feature tensor. The dataset contains various raw features, such as cargo throughput, ship arrival time, and storage equipment status. Taking cargo throughput as an example, the range of cargo throughput values can vary significantly depending on cargo type and time period. To ensure comparability in subsequent calculations, these features require normalization. This can be done using the mean-standard deviation normalization method. This involves first calculating the mean and standard deviation of the cargo throughput, then subtracting the mean from each cargo throughput value and dividing it by the standard deviation to obtain the normalized cargo throughput value. The same process is performed on the other raw features in the shipping logistics dynamics dataset to obtain a normalized feature tensor.
[0154] The normalized feature tensor is subjected to a Hadamard product operation with the feature enhancement mask matrix to obtain primary enhanced features. The Hadamard product operation is an element-wise multiplication operation. In this process, the element values in the feature enhancement mask matrix will enhance or suppress the features in the normalized feature tensor. For example, if the position value related to the cargo throughput of storage area A in the feature enhancement mask matrix is high, then after the Hadamard product operation, the eigenvalue corresponding to the cargo throughput of storage area A in the normalized feature tensor will be enhanced. This means that in subsequent analysis, the feature of cargo throughput of storage area A will be given higher importance because it plays a key role in the cargo flow pattern.
[0155] The primary enhanced features are added to the original features via residual connections to generate the final optimized input matrix. The purpose of residual connections is to retain the useful information in the original features while incorporating the enhanced information from the primary enhanced features. For example, for the original feature of cargo throughput, after normalization and Hadamard product calculations to generate the primary enhanced features, these features are then added to the original cargo throughput features via residual connections. This results in the cargo throughput features in the final optimized input matrix that incorporates both the essential information from the original data and the enhanced information related to cargo flow patterns as reflected by the spatiotemporal attention distribution map. The same operation is performed for the other original features in the shipping logistics dynamics dataset to generate the final optimized input matrix. This optimized input matrix more comprehensively and accurately reflects the actual shipping warehousing situation, providing higher-quality input data for further refinement of warehousing demand forecasts.
[0156] In one possible implementation, the method further includes: Step S150 , quantifying the uncertainty of the target storage demand forecast result, and generating a demand confidence interval for each storage partition.
[0157] In this example, using shipping warehousing at Port AA as an example, the target storage demand forecast includes key information such as the expected cargo volume and storage period for each storage zone. Uncertainty quantification aims to measure the reliability of these forecasts. This is achieved through the use of statistical analysis methods, such as Bayesian reasoning or Monte Carlo simulation. For example, for a storage zone storing electronic products, the calculation of the demand confidence interval takes into account numerous factors influencing electronic product storage demand, such as market demand fluctuations, supply chain stability, and uncertainty in ship arrival times. Based on historical data and current market dynamics, a probabilistic model is constructed using Bayesian reasoning. This model comprehensively considers the probability distributions of various factors, such as the different probability distributions of electronic product market demand during peak and off-season periods and the probability of ships arriving on time. This model calculates the demand confidence interval at a certain confidence level (e.g., 95%). Assuming that the average expected cargo volume of electronic products in a certain time period is predicted to be 1,000 standard containers (TEUs), the confidence interval obtained by uncertainty quantification may be [800 TEU, 1200 TEU], which means that there is a 95% probability that the actual cargo volume will fall within this interval.
[0158] Step S160 , detecting an abnormal prediction node where the demand confidence interval exceeds a preset fluctuation threshold, and triggering a manual review mechanism.
[0159] Taking Port AA as an example, the preset fluctuation threshold is a reasonable range determined based on historical data and operational experience. If the confidence interval for demand in a storage zone exceeds this preset fluctuation threshold, it is considered an abnormal prediction node. For example, for the textile storage zone, the preset fluctuation threshold is set at a 30% fluctuation within the expected cargo volume. If the confidence interval obtained through uncertainty quantification is [500 TEU, 1500 TEU], while the expected cargo volume for this zone is normally 1000 TEU, with a 30% fluctuation range of [700 TEU, 1300 TEU], then this confidence interval exceeds the preset fluctuation threshold. This triggers a manual review mechanism. During this manual review, professional warehouse management personnel carefully review various data related to the storage zone, including recent ship arrival schedules, textile market demand trends, and the operating status of storage equipment. They check for any special circumstances not accounted for by the forecast model, such as the sudden increase or cancellation of new large textile orders or impending maintenance of storage equipment that affects storage capacity.
[0160] Step S170 , comparing the verified and confirmed prediction results with historical data to generate a warehouse layout optimization proposal.
[0161] At Port AA, after manual review, a confirmed forecast result is obtained. This result is then compared with historical data covering shipping and warehousing operations over the past several years, including storage demand and cargo turnover under different seasons and market conditions. For example, for a specific storage area storing chemical products, if the confirmed forecast indicates a significant increase in the future volume of chemical product cargo, and a comparison with historical data reveals that the storage capacity of this storage area was insufficient to handle such a large volume under similar circumstances, a warehouse layout optimization proposal will be generated. This proposal may include replanning the storage space, such as increasing the number of shelves or adjusting the shelf layout to improve storage efficiency; adjusting the cargo storage strategy, such as relocating the storage location of certain perishable chemicals to better control environmental conditions; and optimizing the cargo transfer process, such as adding transfer equipment or adjusting transfer routes to increase cargo turnover. Through this comparison and analysis, the generated warehouse layout optimization proposal can better adapt to future storage needs and improve the efficiency and effectiveness of the entire shipping and warehousing operation.
[0162] Figure 2 The hardware structure of the machine learning-based shipping and warehousing demand forecasting system 100 for implementing the above-mentioned machine learning-based shipping and warehousing demand forecasting method provided in an embodiment of the present invention is shown as follows: Figure 2As shown, the shipping storage demand forecasting system 100 based on machine learning may include a processor 110 , a machine-readable storage medium 120 , a bus 130 , and a communication unit 140 .
[0163] The machine-readable storage medium 120 may store data and / or instructions. In some embodiments, the machine-readable storage medium 120 may store data obtained from an external terminal. In some embodiments, the machine-readable storage medium 120 may store data and / or instructions that the machine learning-based shipping and storage demand forecasting system 100 uses to execute or implement the exemplary methods described herein.
[0164] During the specific implementation process, one or more processors 110 execute computer executable instructions stored in the machine-readable storage medium 120, so that the processor 110 can execute the shipping storage demand prediction method based on machine learning in the above method embodiment. The processor 110, the machine-readable storage medium 120 and the communication unit 140 are connected through the bus 130, and the processor 110 can be used to control the sending and receiving actions of the communication unit 140.
[0165] The specific implementation process of the processor 110 can be found in the various method embodiments executed by the above-mentioned machine learning-based shipping and warehousing demand forecasting system 100. The implementation principles and technical effects are similar and will not be repeated here in this embodiment.
[0166] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer-executable instructions are preset. When a processor executes the computer-executable instructions, the above-mentioned shipping warehousing demand prediction method based on machine learning is implemented.
[0167] It should be noted that in order to simplify the description of the present invention and thus help understand one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, multiple features are sometimes combined into one embodiment, figure or description thereof.
Claims
1. A method for predicting shipping warehousing demand based on machine learning, characterized in that: The method comprises: Collect the dynamic data set of shipping logistics of the target port, perform multimodal feature analysis on the dynamic data set of shipping logistics, and generate a composite feature vector including ship scheduling time series, cargo turnover cycle and storage capacity fluctuation; the multimodal feature analysis includes joint feature extraction of port throughput time series, container transportation map and storage equipment status log; Performing spatiotemporal coding processing on the composite feature vector to generate a multi-dimensional spatiotemporal coding matrix; the spatiotemporal coding processing includes extracting the time dependency features of the ship arrival time by using a recurrent convolutional network, and capturing the correlation of cargo flow across storage areas in combination with a graph attention mechanism; Input the multi-dimensional spatiotemporal coding matrix into a pre-trained basic shipping storage demand prediction model to output preliminary storage demand distribution data; the preliminary storage demand distribution data includes the expected cargo accumulation volume and storage cycle probability curve of each storage partition; The preliminary storage demand distribution data is modified to generate a target storage demand forecast result.
2. The method for predicting shipping warehousing demand based on machine learning according to claim 1, characterized in that: The step of correcting the preliminary storage demand distribution data to generate a target storage demand forecast result includes: Based on the local sensitive feature domain of the multidimensional spatiotemporal coding matrix and the storage cycle probability curve, the demand influencing factors of different storage nodes are calculated; the local sensitive feature domain is a feature subspace in the spatiotemporal coding matrix that reflects the risk of cargo detention; Selecting a target extractor with significant explanatory power from multiple feature extractors of the basic shipping storage demand forecasting model, dynamically weighting and fusing the output features of the target extractor in combination with the demand influencing factors, and generating feature traceability data representing the driving factors of storage demand; A spatiotemporal attention distribution map reflecting the weight of the cargo flow pattern is constructed based on the feature traceability data, and the spatiotemporal attention distribution map is fused with the shipping logistics dynamic data set for feature enhancement to generate an optimized input matrix; The preliminary storage demand distribution data is modified based on the optimized input matrix to generate a target storage demand forecast result.
3. The method for predicting shipping warehousing demand based on machine learning according to claim 1, characterized in that: The pre-trained basic shipping storage demand prediction model is constructed by the following steps: Acquire a sample shipping and warehousing operation data set, wherein the sample shipping and warehousing operation data set includes ship arrival and departure records, a cargo type distribution matrix, and a warehousing equipment operation status time series; Constructing a bidirectional gated recurrent unit network as a time feature extractor to process the sample shipping warehousing operation data set to perform time-dependent modeling on the ship arrival interval and the cargo turnover cycle, and generating a time-dependent modeling result; Constructing a graph convolutional network as a spatial feature extractor to process the sample shipping warehousing operation data set, so as to extract spatial correlation features of the cargo transshipment path based on the processed warehousing area topology map; After tensor splicing, the outputs of the temporal feature extractor and the spatial feature extractor are input into a fully connected prediction layer to generate a preliminary demand forecast value; An adaptive moment estimation algorithm is used to jointly optimize the parameters of the temporal feature extractor, the spatial feature extractor and the fully connected prediction layer until the prediction error converges, thereby generating the basic shipping warehousing demand prediction model, wherein the basic shipping warehousing demand prediction model includes the temporal feature extractor, the spatial feature extractor and the fully connected prediction layer.
4. The method for predicting shipping warehousing demand based on machine learning according to claim 3 is characterized in that: The step of constructing a bidirectional gated recurrent unit network as a time feature extractor to process the sample shipping warehousing operation data set to perform time-dependent modeling on the ship arrival interval and the cargo turnover cycle, and generating a time-dependent modeling result includes: Performing time alignment processing on the ship arrival and departure records and storage equipment operation status time series in the sample shipping and storage operation data set to generate multidimensional time series data with a unified timestamp; Inputting the multidimensional time series data into the forward propagation layer and the backward propagation layer of the bidirectional gated recurrent unit network, extracting the forward time-dependent features and the backward time-dependent features respectively, and outputting the forward hidden state sequence and the backward hidden state sequence; Perform stride-length concatenation on the forward hidden state sequence and the backward hidden state sequence to generate a fused hidden state matrix containing bidirectional temporal correlation; Based on the feature vector of each time step in the fused hidden state matrix, a time-dependent feature code of the ship arrival interval is constructed, and the time-dependent feature code is multi-scale aggregated through a sliding time window to generate a periodic pattern feature vector of the ship scheduling time series; Extracting a time slice sequence of a cargo type distribution matrix from the multidimensional time series data, and splicing it with the periodic pattern feature vector time step by time to form a joint time feature input; The joint time feature is input into the deep stacking layer of the gated recurrent unit network, and the long-term and short-term dependencies of the goods turnover cycle are captured step by step through the multi-layer gating mechanism, and a multi-level time feature tensor is output; Compressing the multi-level time feature tensor in time dimension, extracting the maximum time response feature and the average time trend feature by using an adaptive pooling layer, and concatenating the two as the initial result of time-dependent modeling; Constructing a time attention mechanism module, calculating the contribution weights of different time step features in the initial results to the storage demand prediction, dynamically weighting and adjusting the initial results according to the contribution weights, and generating an optimized time-dependent feature representation; Inputting the optimized time-dependent feature representation into a regularization layer for feature scaling and noise suppression, and outputting a standardized time feature vector; The standardized time feature vector is input into the prediction unit to generate the predicted values of the ship arrival interval and the cargo turnover cycle, and the prediction error of the time-dependent modeling is calculated with the true label; The back-propagation algorithm is used to jointly optimize the parameters of the bidirectional gated recurrent unit network, the temporal attention mechanism module and the prediction unit until the prediction error reaches the convergence condition to generate the final time-dependent modeling result.
5. The method for predicting shipping warehousing demand based on machine learning according to claim 2, characterized in that: The calculation of demand influencing factors of different storage nodes based on the local sensitive feature domain of the multidimensional spatiotemporal coding matrix and the storage cycle probability curve includes: Extracting feature slices corresponding to each storage node from the local sensitive feature domain of the multidimensional spatiotemporal coding matrix, and calculating the local sensitivity index of each feature slice; the local sensitivity index reflects the contribution of the feature slice to the prediction of the cargo accumulation amount; Calculating a cargo detention risk score for each storage node based on the storage cycle probability curve, wherein the detention risk score is nonlinearly positively correlated with the storage cycle; Normalizing and weighting the local sensitivity index and the retention risk score to generate a comprehensive demand impact factor matrix; The demand influencing factor matrix is dynamically smoothed through a sliding time window to eliminate short-term fluctuation noise.
6. The method for predicting shipping warehousing demand based on machine learning according to claim 2, characterized in that: The step of selecting a target extractor with significant explanatory power from multiple feature extractors of the basic shipping storage demand forecasting model, dynamically weighting and fusing the output features of the target extractor in combination with the demand influencing factors, and generating feature traceability data representing the driving factors of storage demand includes: Identifying an explanatory index of each feature extractor in the basic shipping storage demand forecasting model, wherein the explanatory index is obtained by calculating a back-propagation saliency map; Selecting the feature extractor whose explanatory index exceeds a preset threshold as the target extractor; Extracting the intermediate feature representation of the target extractor in the multi-layer network of the basic shipping storage demand prediction model to form a multi-granularity feature set; According to the demand influencing factors, hierarchical attention weighting is performed on the multi-granularity feature set to generate a feature traceability vector with spatiotemporal interpretability.
7. The method for predicting shipping warehousing demand based on machine learning according to claim 6, characterized in that: The step of constructing a spatiotemporal attention distribution map reflecting the weight of the cargo flow pattern according to the characteristic traceability data comprises: Inputting the feature tracing vector of the feature tracing data into a multi-head self-attention module to generate an initial attention weight matrix; Decomposing the initial attention weight matrix in time and space dimensions to obtain a time attention sub-matrix and a space attention sub-matrix; The temporal attention sub-matrix and the spatial attention sub-matrix are fused using a gating mechanism to generate a spatiotemporal joint attention distribution; The spatiotemporal joint attention distribution is thinned, and the top K attention connections with weight values higher than a dynamic threshold are retained to construct a spatiotemporal attention distribution map reflecting the weight of the cargo flow pattern.
8. The method for predicting shipping warehousing demand based on machine learning according to claim 2, characterized in that: The step of performing feature enhancement fusion on the spatiotemporal attention distribution map and the shipping logistics dynamic data set to generate an optimized input matrix includes: Converting the spatiotemporal attention distribution map into a feature enhancement mask matrix; Standardizing the original features in the shipping logistics dynamic data set to obtain a normalized feature tensor; Performing a Hadamard product operation on the normalized feature tensor and the feature enhancement mask matrix to obtain primary enhanced features; The primary enhanced features are added to the original features through residual connections to generate a final optimized input matrix.
9. The method for predicting shipping warehousing demand based on machine learning according to any one of claims 1 to 8, characterized in that: The method further comprises: Quantifying the uncertainty of the target storage demand forecast result to generate a demand confidence interval for each storage partition; Detecting abnormal prediction nodes where the demand confidence interval exceeds a preset fluctuation threshold, triggering a manual review mechanism; Compare the verified and confirmed forecast results with historical data to generate storage layout optimization proposals.
10. A shipping storage demand forecasting system based on machine learning, characterized in that: The shipping storage demand forecasting system based on machine learning includes a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the shipping storage demand forecasting method based on machine learning as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Ship warehouse management method, device and equipment and storage medium
CN114862308A
Ship traffic flow prediction method based on improved space-time diagram attention neural network
CN116612664A
Ship stowage method and device based on deep reinforcement learning
CN118332417A
Navigation center area coordination optimization method and system based on big data
CN119578847A
A lever-type hand disinfection device installed on the door handle so that you cand open the door and disinfect your hands
KR1020220036274A
Cited By
Marine transportation container assembling method based on sequence generation and search
CN120069706A
Data analysis method and system based on artificial intelligence
CN120123700A
An artificial intelligence-based data analysis method and system
CN120123700B
Warehouse logistics system resource planning method and system based on deep learning
CN120952346A
A warehouse logistics system resource planning method and system based on deep learning
CN120952346B