Intelligent port container entering and lifting quantity prediction method and system based on digital twinning
By constructing an intelligent prediction system for the number of containers entering and leaving ports based on digital twins, the problems of insufficient prediction adaptability and unstable accuracy in existing technologies have been solved. It has achieved dynamic adaptation to real-time port scenarios and accurate capture of multi-scale data features, improving the adaptability and accuracy of predictions and supporting the efficient allocation of port operation resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies lack dynamic correlation with real-time port scene parameters in predicting the number of containers entering and leaving ports, resulting in limited predictive adaptability. They also fail to distinguish and model multi-scale data features, limiting prediction accuracy due to data complexity. Furthermore, the lack of an adaptive optimization mechanism for model parameters makes it difficult to maintain stable prediction accuracy.
A digital twin-based intelligent prediction method is adopted. A 1:1 digital twin model of the port is constructed through BIM+GIS fusion technology. Multi-source data is collected in real time and dynamically mapped. The multi-scale Transformer framework is used for time-series modeling. Combined with the twin scene state attention layer and historical prediction error feedback mechanism, the model parameters are adaptively adjusted to output time-segmented prediction values and confidence intervals.
It improves the adaptability of the prediction model to the actual port operation scenario, enhances the prediction accuracy for short-term sudden fluctuations and long-term trends, ensures the long-term stability of prediction accuracy, and supports efficient decision-making in port operation resource allocation.
Smart Images

Figure CN121765631A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of port operation and management technology, and more specifically, to a method and system for intelligent prediction of the number of container arrivals and departures at ports based on digital twins. Background Technology
[0002] Accurate forecasting of container arrivals and departures at ports is a core aspect of port operations management. It directly determines the rationality of yard capacity planning, gate scheduling efficiency, and equipment operation scheduling, playing a crucial role in reducing port operating costs, alleviating port access road congestion, and enhancing core competitiveness. With the continuous growth of port business volume, container arrival and departure data exhibits characteristics of drastic short-term fluctuations, complex long-term trends, and strong scenario dynamism. Traditional forecasting methods relying on single algorithms or static data are no longer adequate to meet the coupling needs of port physical scenarios and business data, necessitating intelligent forecasting technology solutions that are more closely aligned with actual operational scenarios.
[0003] In existing technologies, there are relevant studies on the prediction of port container throughput and truck arrivals. For example, "Research on the Predictability Measurement of Port Container Throughput Based on Sample Entropy", published in China Navigation, Vol. 47, No. 1, 2024, uses sample entropy to characterize the complexity of the time series of port container throughput and combines it with the Autoregressive Integrated Moving Average (ARIMA) model to carry out throughput prediction, verifying the model's predictive adaptability to ports or large ports in the "growth" stage of their life cycle. Another example is "Combined Prediction of Truck Arrivals in Container Port Areas", published in Transportation Technology, Vol. 12, No. 6, 2023. This paper uses shipping schedules and terminal storage rates as influencing factors to construct an ARIMA-BP neural network combined prediction model to carry out short-term prediction of truck arrivals in container port areas, and uses Shanghai Waigaoqiao No. 2 Terminal as a case to verify the effectiveness of the model.
[0004] Despite the design advantages of the aforementioned technical solutions, they also suffer from the following technical shortcomings: First, they lack dynamic correlation with real-time port scenario parameters, limiting predictive adaptability. The study "Research on Predictability Measurement of Port Container Throughput Based on Sample Entropy" relies solely on historical time-series data of port container throughput, failing to incorporate real-time status information of the port's physical scenario (such as yard occupancy and equipment operating load). This results in the ARIMA model being well-suited only to large ports in the "growth" stage, with significantly reduced prediction accuracy for mature ports or scenarios experiencing fluctuations. While "Combined Prediction of Truck Arrival Volume in Container Port Areas" incorporates influencing factors such as shipping schedules and terminal storage rates, it still fails to correlate with real-time port operation scenario parameters (such as gate throughput and real-time equipment efficiency). Faced with dynamic scenarios such as concentrated ship berthing and sudden equipment failures, it struggles to adjust the prediction logic in real time, resulting in insufficient adaptability. Secondly, the lack of differentiation and targeted modeling of multi-scale data characteristics limits the prediction accuracy due to data complexity. The study "Research on the Predictability Measurement of Port Container Throughput Based on Sample Entropy" uses a single ARIMA model to fit the overall throughput time series, failing to separate the different characteristics of short-term fluctuations (such as hourly data changes) from long-term trends (such as daily data patterns). When dealing with ports with high data complexity, the prediction error fluctuates significantly. Similarly, the ARIMA-BP combined model in "Combined Prediction of Truck Arrival Volume in Container Port Areas" also fails to differentiate the multi-scale characteristics of truck arrival volume, relying solely on a single combined logic to fit the overall data. This fails to capture the changing patterns at different time scales, resulting in insufficient prediction accuracy for short-term sudden fluctuations or long-term trend reversals. Third, the lack of an adaptive optimization mechanism for model parameters makes it difficult to maintain stable prediction accuracy. Both of the aforementioned schemes use fixed model parameters. The ARIMA model parameters in "Research on the Predictability Measurement of Port Container Throughput Based on Sample Entropy" are not adjusted once determined, and the combined model weights in "Combined Prediction of Truck Arrival Volume in Container Port Areas" are calculated once using the inverse error method. Neither establishes a feedback parameter adjustment mechanism based on actual prediction errors. When port operation patterns change (such as adding new shipping routes or adjusting storage policies), the models cannot iteratively optimize autonomously, leading to a decline in long-term prediction accuracy. Therefore, we propose an intelligent prediction method and system for the number of containers entering and leaving ports based on digital twins. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for intelligent prediction of the number of containers entering and leaving ports based on digital twins, in order to solve the problems mentioned in the background art, such as lack of dynamic correlation of real-time port scene parameters, limited prediction adaptability, failure to distinguish multi-scale data features and targeted modeling, prediction accuracy being limited by data complexity, and lack of adaptive optimization mechanism for model parameters, making it difficult to maintain stable prediction accuracy.
[0006] To address the aforementioned technical problems, one objective of this invention is to provide an intelligent prediction system for the number of containers entering and leaving a port based on digital twins, comprising: The twin modeling and data mapping unit uses BIM+GIS fusion technology to construct a 1:1 digital twin model of the port's physical entity. It collects data in real time through multi-source IoT devices and system interfaces and dynamically maps it to the digital twin model to maintain consistency between the virtual and real states, forming a twin data foundation. The data acquisition and feature processing unit collects multi-source heterogeneous data from port operation equipment, business systems, and digital twin models. After preprocessing, it extracts key spatiotemporal features and generates structured prediction feature vectors. The twin-driven intelligent prediction unit employs an improved multi-timescale spatiotemporal interactive fusion prediction algorithm. It divides the real-time state output by the digital twin model into short-term fluctuation features and long-term trend features according to time scale. A multi-scale Transformer framework is used to perform parallel temporal modeling of the short-term fluctuation features and long-term trend features. A twin scene state attention layer is embedded in each scale encoder to dynamically extract the influence weights of real-time scene parameters on the corresponding time-scale features. A cross-scale attention fusion layer is introduced in the decoding stage to capture the coupling effects of different time scales. Simultaneously, combined with a historical prediction error feedback mechanism, the mean absolute error (MAE) is calculated using actual box entry and exit data at a preset period. The hidden layer parameters of the model are adaptively adjusted to output the predicted value and confidence interval of the number of boxes entering and exiting in the future preset time period. The prediction verification and linkage output unit inputs the prediction results back into the digital twin model for scenario simulation verification, and outputs them through a visualization terminal to provide technical decision support for port operation resource allocation.
[0007] As a further improvement to this technical solution, the twin modeling and data mapping unit includes a digital twin model construction module and a data acquisition and mapping module, wherein: The digital twin model building module uses BIM technology to collect the geometric structure, equipment layout and attribute parameters of the port's physical entities, and generates a refined three-dimensional model; it uses GIS technology to input the port's geospatial coordinates, regional division and traffic network information, and then uses the WGS-84 coordinate system to fuse and calibrate the three-dimensional model with the geospatial information to build a 1:1 scale digital twin model of the port. The data acquisition and mapping module collects real-time operation data through sensor interfaces, camera interfaces, and RFID reader interfaces, and collects historical and real-time business data through yard management system interfaces and ship scheduling system interfaces. After format conversion and data cleaning, the data is mapped to the corresponding entity nodes of the digital twin model using a combination of timed synchronization and triggered updates. The timed synchronization cycle is ≤5 minutes, and the updates are triggered instantly when key status changes occur. This integrates to form a twin data base covering geometric data, status data, and business data.
[0008] As a further improvement to this technical solution, the data acquisition and feature processing unit includes a multi-source data acquisition module and a feature structuring processing module, wherein: The multi-source data acquisition module collects equipment operation data through the sensor and controller interfaces of the operating equipment, collects business flow data through the yard management system and container loading and unloading management system interfaces of the business system, and collects model output data through the status data interface of the digital twin model. The feature structuring processing module performs deduplication, missing value filling, and normalization preprocessing on the collected multi-source heterogeneous data, extracts spatial location features, time series trend features, and equipment operating status features, and generates a fixed-dimensional structured prediction feature vector.
[0009] As a further improvement to this technical solution, the twin-driven intelligent prediction unit includes a feature scale partitioning module, a multi-scale temporal modeling module, a cross-scale fusion module, and an error feedback adjustment and output module. Each module operates in a logical sequence of "feature partitioning - temporal modeling - cross-scale fusion - parameter adjustment - result output," wherein: The feature scale segmentation module receives real-time status data output by the digital twin model and performs feature segmentation according to the time scale. The multi-scale temporal modeling module adopts the multi-scale Transformer framework to perform temporal modeling on the split features in parallel. The cross-scale fusion module performs coupled fusion of the modeled features through a cross-scale attention fusion layer; The error feedback adjustment and output module adaptively adjusts the model parameters based on historical prediction errors and outputs the predicted value and confidence interval of the number of boxes entering and leaving the container in different time periods.
[0010] As a further improvement to this technical solution, the feature scale segmentation module performs feature splitting on the real-time state data according to the time scale. The segmentation logic specifically includes: The time scale corresponding to short-term fluctuation characteristics is 1 hour to 24 hours, and real-time fluctuation data is extracted from the digital twin model; The time scale corresponding to the long-term trend features is 1 to 30 days. Trend data is extracted from the digital twin model, and the time scales of short-term fluctuation features and long-term trend features do not overlap.
[0011] As a further improvement to this technical solution, the multi-scale temporal modeling module includes a short-term encoder and a long-term encoder. Both the short-term encoder and the long-term encoder are embedded in a twin scene state attention layer. The weight calculation and temporal modeling of the twin scene state attention layer include the following steps: S32.1, Define the input vector: Receive the short-term fluctuation features and long-term trend features output by the feature scale partitioning module, and construct short-term feature vectors respectively. Long-term eigenvectors ;Use the real-time scene parameters output by the digital twin model to construct a unified scene parameter vector. ,set up The dimension is At the same time, the hidden layer dimensions of the short-term encoder and the long-term encoder are initialized to 256-1024 dimensions and the number of attention heads is 4-16. S32.2 Calculate vector similarity: Perform dot product operations on the short-term and long-term feature vectors and the scene parameter vector respectively to solve for the short-term feature similarity. Similarity with long-term features The numerical overflow of high-dimensional vectors is suppressed by the dimension normalization factor; S32.3 Weight Normalization: The Softmax function is used to normalize the short-term feature similarity. Similarity with long-term features Normalized to the [0,1] interval, the short-term feature attention weights are obtained. Attention weights with long-term features This ensures that the sum of the weights after normalization is 1; S32.4, Temporal Modeling and Feature Enhancement: Transforming short-term feature vectors Input a short-term encoder, capture short-term temporal dependencies through the Transformer self-attention mechanism, and simultaneously use... Weighted enhancement is applied to short-term features to output short-term encoded features. ; Long-term eigenvectors The input is a long-term encoder, which captures long-term temporal evolution patterns through the Transformer self-attention mechanism. Weighted enhancement is applied to long-term features to output long-term encoded features. ; S32.5 Parallel Output Encoding Results: Complete the synchronous temporal modeling of short-term and long-term features, and... and The output is collaboratively sent to the cross-scale fusion module.
[0012] As a further improvement to this technical solution, the cross-scale fusion module couples and fuses short-term coding features and long-term coding features, including the following steps: S33.1, Receive Input Features: Obtain the output of the multi-scale temporal modeling module. and Dimension adaptation processing is used to ensure that the vector dimensions of long-term encoded features and short-term encoded features are consistent, and the feature dimensions are set to 256-1024. S33.2 Calculate cross-scale fusion coefficients: based on short-term weights output by the twin scene state attention layer. With long-term weights Construct fusion coefficient The calculation logic quantifies the fusion ratio of short-term and long-term features, among which... ,and When short-term scenarios fluctuate drastically Approaching 1, when the long-term trend dominates. Approaching 0; S33.3, Execution Feature Coupling and Fusion: Using a weighted summation method to perform... and The fusion process fully preserves the time dependency and scene association information of both long-term and short-term encoded features, resulting in the final feature vector after cross-scale fusion. Meanwhile, L2 normalization is used to suppress feature value drift. S33.4 Output fused features: The final feature vector The synchronous output is sent to the error feedback tuning and output module to provide a unified feature input for subsequent prediction calculations and parameter adjustments.
[0013] As a further improvement to this technical solution, the error feedback adjustment and output module adjusts the model parameters and outputs the prediction results through error feedback, including the following steps: S34.1 Generating Initial Predictions: The final feature vector output by the cross-scale fusion module... The decoder of the input multi-scale Transformer framework obtains the initial time-segmented prediction values within a preset time period through a fully connected layer mapping. ,in , This represents the number of subdivisions for the prediction period; S34.2 Calculate the mean absolute error: Collect actual container entry and exit data at the port according to a preset cycle. Number of samples within the statistical period Through mean absolute error Quantify prediction accuracy, This is the mean of the absolute error of a single sample prediction within the period; the smaller the value, the higher the prediction accuracy. S34.3 Adaptive adjustment of model parameters: based on Solving for hidden layer parameters in a multi-scale Transformer framework gradient The parameters are updated using gradient descent. To ensure continuous model optimization, among which For the learning rate, and , For the current parameter, These are the updated parameters; S34.4 Calculate the prediction confidence interval: based on historical preset periods The standard deviation of the error was calculated using statistical methods for the sample. Select the two-sided quantiles of the standard normal distribution To obtain each predicted value confidence interval ; S34.5 Output the final result: This includes the optimized predicted value obtained after parameter adjustment, the corresponding confidence interval, and... The simultaneous output of quantitative indicators provides precise technical decision support for the allocation of port operation resources.
[0014] As a further improvement to this technical solution, the prediction verification and linkage output unit includes a scene simulation verification module and a visualization linkage output module, wherein: The scenario simulation and verification module receives the optimized prediction value and confidence interval output by the twin-driven intelligent prediction unit, and inputs them in reverse into the digital twin model. Based on the port operation rule library built into the digital twin model, it simulates the yard capacity matching degree, gate capacity saturation degree and equipment operation load rate corresponding to the prediction results. The visualization and linkage output module uses a visualization terminal to display time-segmented optimized prediction values in line graphs, confidence intervals in interval graphs, and simulation verification indicators in numerical panels. It also outputs the validity indicators of the prediction results and corresponding resource configuration adaptation suggestions, providing technical decision support for port yard planning, gate scheduling, and equipment scheduling.
[0015] The second objective of this invention is to provide an intelligent prediction method for the number of inbound and outbound containers at ports based on digital twins. Based on the aforementioned intelligent prediction system for the number of inbound and outbound containers at ports based on digital twins, the method includes the following steps: S1. Construct a digital twin model and collect multi-source data: Use BIM technology to collect the geometric structure, material properties, and equipment layout of the port's physical entities to generate a 3D model. Combine this with GIS technology to input geospatial information and fuse and calibrate it using the WGS-84 coordinate system to construct a 1:1 digital twin model of the port. Simultaneously connect with sensors and business systems to collect real-time operation data and historical business data to form a twin data foundation. S2. Process data and extract predictive features: Perform deduplication, missing value filling, and normalization preprocessing on the collected multi-source heterogeneous data, extract spatial location, time series trend, and equipment operating status features, and generate structured predictive feature vectors. S3. Divide the feature scale and model in parallel: Divide the real-time state data output by the digital twin model into short-term fluctuation features of 1 hour to 24 hours and long-term trend features of 1 day to 30 days. By embedding the short-term encoder and long-term encoder of the twin scene state attention layer, the long-term trend features and short-term fluctuation features are modeled in parallel time series to generate short-term coded features and long-term coded features. S4. Cross-scale feature fusion and prediction output: Calculate the fusion coefficient based on the state attention weight of the twin scene, weightedly fuse short-term and long-term encoded features, input the fusion into the decoder to generate the initial prediction value; calculate the MAE by combining actual inbound and outbound box data, adaptively adjust the digital twin model parameters, and output the optimized prediction value and confidence interval. S5. Verify the prediction results: Input the optimized prediction values back into the digital twin model to simulate the yard capacity matching degree, gate capacity saturation, and equipment operating load rate, and output the validity indicator of the prediction results.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention constructs a 1:1 digital twin model of a port using BIM+GIS fusion technology through a twin modeling and data mapping unit. It collects port physical scene status data such as yard occupancy rate, equipment load rate, and gate passage status in real time and dynamically maps them to the model. At the same time, it embeds a twin scene status attention layer in the encoder of the multi-scale time series modeling module and calculates the attention weights of short-term and long-term features using real-time scene parameter vectors. This enables dynamic adaptation to different life cycle stages of the port and dynamic scenarios such as concentrated ship berthing and equipment operation fluctuations, effectively improving the adaptability of the prediction model to the actual port operation scenario. This solves the problem of limited prediction adaptability caused by the lack of dynamic correlation of real-time port scene parameters in existing technologies. 2. This invention uses a feature scale partitioning module to split the real-time status data output by the digital twin model into short-term fluctuation features (1 hour to 24 hours) and long-term trend features (1 day to 30 days) according to time scale. It uses the short-term encoder and long-term encoder of the multi-scale Transformer framework to perform time-series modeling on the two types of features in parallel. Then, through the cross-scale fusion module, the fusion coefficient is calculated based on attention weights, and the short-term and long-term encoded features are coupled and fused and processed by L2 normalization. This can capture the change patterns of the inbound and outbound box data at different time scales, effectively improving the prediction accuracy of short-term sudden fluctuations and long-term trend reversals. This solves the problem that the prediction accuracy is limited by data complexity due to the lack of differentiation of multi-scale data feature modeling in the existing technology. 3. This invention calculates the mean absolute error (MAE) by combining actual container loading and unloading data with the error feedback tuning and output module at a preset cycle. Based on the MAE, it solves the gradient of the hidden layer parameters of the multi-scale Transformer framework and adaptively updates the parameters using the gradient descent method. At the same time, through the prediction verification and linkage output unit, the optimized prediction values are input back into the digital twin model to simulate indicators such as yard capacity matching degree and gate capacity saturation to verify the effectiveness of the results. This ensures that the model parameters can be autonomously iterated and optimized according to the port operation rules, maintaining the long-term stability of prediction accuracy. This solves the problem that the lack of an adaptive optimization mechanism for model parameters in the existing technology leads to a decline in long-term prediction accuracy. 4. This invention, through the visualization and linkage output module of the prediction verification and linkage output unit, displays the time-segmented optimized prediction values in line graphs, the confidence intervals in interval graphs, and the simulation verification indicators in numerical panels. It simultaneously outputs the validity indicators of the prediction results and resource adaptation suggestions for yard zoning, gate configuration, and equipment scheduling. It directly links the prediction results with the actual port operation decisions, enabling the prediction technology to more efficiently support the allocation of port operation resources and further enhancing the practical value of prediction technology in port operation scenarios. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the system framework of the present invention; Figure 2 This is a schematic diagram of the method steps of the present invention; The meanings of the labels in the diagram are as follows: 1. Digital twin modeling and data mapping unit; 11. Digital twin model construction module; 12. Data acquisition and mapping module; 2. Data acquisition and feature processing unit; 21. Multi-source data acquisition module; 22. Feature structuring processing module; 3. Twin-driven intelligent prediction unit; 31. Feature scale partitioning module; 32. Multi-scale temporal modeling module; 33. Cross-scale fusion module; 34. Error feedback modulation and output module; 4. Prediction verification and linkage output unit; 41. Scene simulation verification module; 42. Visualization linkage output module. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0019] like Figure 1 As shown, this embodiment provides a port container arrival and departure quantity intelligent prediction system based on digital twins, including: Twin Modeling and Data Mapping Unit 1: The Twin Modeling and Data Mapping Unit 1 uses BIM+GIS fusion technology to construct a 1:1 digital twin model of the port's physical entity. Data is collected in real time through multi-source IoT devices and system interfaces and dynamically mapped to the digital twin model to maintain consistency between the virtual and real states, forming a twin data foundation. In this embodiment, the twin modeling and data mapping unit 1 includes a digital twin model construction module 11 and a data acquisition and mapping module 12, wherein: The digital twin model construction module 11 uses BIM technology to collect the geometric structure, equipment layout and attribute parameters of the port's physical entities, and generates a refined three-dimensional model; it uses GIS technology to input the port's geospatial coordinates, regional division and traffic network information, and then uses the WGS-84 coordinate system to fuse and calibrate the three-dimensional model with the geospatial information to construct a 1:1 scale digital twin model of the port. Specifically, the construction of the 1:1 scale digital twin model of the port is as follows: BIM 3D Model Generation: Core parameters of the port's physical entities are collected using BIM modeling software (such as Revit and Bentley). Geometric parameters include the length of the wharf shoreline, the dimensions of the yard zones (length × width × height), the number and length of berths, and the width of the gate passage. Equipment layout parameters cover the installation location, spacing, and operational coverage of container cranes, gantry cranes, and truck loading / unloading points. Attribute parameters include the model, rated load, operating power, and operating speed threshold of various equipment, as well as the carrying capacity of the yard positions and the stacking layer limit. Based on the above parameters, a detailed 1:1 scale 3D model is generated. This model contains a unique identifier code for each entity, facilitating subsequent data association.
[0020] GIS geospatial information entry: The core geospatial information of the port is entered through a GIS platform (such as ArcGIS). The geospatial coordinates include the WGS-84 latitude and longitude range of the port boundary and the vertex coordinates of each functional area (yard, berth, gate, office area). The area division clearly defines the boundaries and uses of each functional area (such as container loaded area, empty container area, dangerous goods area). The traffic network information covers the internal truck driving channels of the port, the entrance / exit locations of the external connecting highways, the road direction and the number of traffic lanes, and also marks the speed limit standards and traffic priority of the road network.
[0021] WGS-84 Coordinate System Fusion and Calibration: First, the local coordinate system of the BIM 3D model is converted to the WGS-84 geodetic coordinate system. By selecting three or more fixed reference points within the port (such as wharf corner marker posts and gate fixed columns), the actual WGS-84 coordinates of the reference points and the local coordinates of the BIM model are obtained, and a coordinate transformation matrix is established. Then, the converted BIM 3D model is overlaid with GIS geospatial information, and the model position is adjusted through a coordinate matching algorithm to ensure that the entities such as equipment and storage yards in the BIM model correspond completely with the geospatial locations in the GIS, thereby achieving the construction of a 1:1 scale digital twin model of the port and ensuring the consistency of the model's positioning in geospatial space.
[0022] The data acquisition and mapping module 12 collects real-time operation data through sensor interfaces, camera interfaces, and RFID reader interfaces, and collects historical and real-time business data through yard management system interfaces and ship scheduling system interfaces. After format conversion and data cleaning, it is mapped to the corresponding entity nodes of the digital twin model using a combination of timed synchronization and triggered updates. The timed synchronization cycle is ≤5 minutes, and instant updates are triggered when key status changes, thus integrating to form a twin data base covering geometric data, status data, and business data.
[0023] Specifically, the multi-source data acquisition interface adaptation is as follows: Sensor interfaces: Connect to various sensors on port operation equipment, including crane position sensors (collecting operating radius and height data), weight sensors (collecting the weight of containers being lifted), yard occupancy sensors (collecting the vacancy / occupancy status of the yard), and gate vehicle detection sensors (collecting the number of vehicles entering and exiting and the passage time). All sensor interfaces comply with the Modbus TCP communication protocol to ensure stable data transmission.
[0024] Camera interface: A network camera (supporting the ONVIF protocol) is used and deployed in key operating areas of the yard, gate channels and near berths to collect real-time operation images to help verify the authenticity of sensor data (such as confirming whether the container is accurately placed through the image).
[0025] RFID reader interface: RFID readers are deployed at yard entrances and exits, crane spreaders, gates, and other locations to read core information from container tags, such as container number, dimensions, load, shipping company, and destination. The interface supports the ISO18000-6C protocol to ensure rapid identification of tag information.
[0026] System Interface: It interfaces with the port's existing yard management system and vessel scheduling system via a RESTful API interface. The interface uses JSON format to transmit data and ensures data access security through an authentication mechanism.
[0027] Specifically, the processing of multi-source data includes: Format conversion: Convert JSON data collected by sensors, CSV data exported by the management system, and XML data obtained by RFID readers into Parquet format. This format supports efficient compression and column storage, adapting to subsequent big data processing needs.
[0028] Data cleaning: The cleaning logic driven by the rule base is used to remove abnormal values from sensors (such as weight data that exceeds the rated load of the equipment and location data that exceeds the operating range); delete duplicate records (duplicate data reported by the same sensor under the same timestamp); and handle logically contradictory data (such as if the container has passed through the gate and been picked up, but the yard sensor still shows that the storage space is occupied, and the storage space status is corrected based on the gate passage record).
[0029] Specifically, the data mapping and update mechanism is as follows: Scheduled synchronization: Set the synchronization period to 5 minutes using a distributed scheduled task framework (such as Quartz). Collect real-time data from each interface in batches every 5 minutes. According to the unique identifier of the entity, map the data to the corresponding entity node in the digital twin model (such as updating the real-time location data of a crane to the coordinate attribute of the crane in the model).
[0030] Triggered Updates: A list of key status change events is preset, including cranes completing a lifting operation, yard storage locations changing from idle to occupied (or vice versa), ships berthing / departing, queue length of vehicles passing through gates exceeding a preset threshold, and equipment malfunction alarms. When the sensor or system detects the above events, the data update process is immediately triggered, and the state synchronization of the digital twin model is completed within 10 seconds to ensure a high degree of consistency between the virtual and real states.
[0031] Specifically, the construction of the twin data base is as follows: a hierarchical storage structure of "geometric data + status data + business data" is adopted. Geometric data stores the model files after BIM+GIS fusion (such as glTF format), status data stores the real-time collected equipment operating status, cargo space occupancy, etc. (stored in partitions by timestamp), and business data stores historical container entry and exit records, ship scheduling plans, etc. The data base adopts a distributed storage architecture (such as Hadoop distributed file system + HBase database), supports high-concurrency data read and write, and provides standardized data access interfaces for the data acquisition and feature processing unit 2 to extract data as needed.
[0032] Data acquisition and feature processing unit 2: Data acquisition and feature processing unit 2 acquires multi-source heterogeneous data from port operation equipment, business systems and digital twin models, extracts key spatiotemporal features after preprocessing, and generates structured prediction feature vectors. In this embodiment, the data acquisition and feature processing unit 2 includes a multi-source data acquisition module 21 and a feature structuring processing module 22, wherein: The multi-source data acquisition module 21 acquires equipment operation data through the sensor interface and controller interface of the operating equipment, acquires business flow data through the yard management system interface and container loading and unloading management system interface of the business system, and acquires model output data through the status data interface of the digital twin model. Specifically, the multi-source data acquisition module 21 collects three types of core data by adapting to different interfaces: equipment operation data, which connects to the sensors (following Modbus RTU / TCP protocol) and controllers (following Profinet protocol) of the operating equipment. The collected data includes real-time operating coordinates of cranes, lifting weight, lifting speed, gantry crane travel speed, cargo position alignment accuracy, truck entry and exit time and load status, as well as equipment start and stop signals, fault alarm codes, and operating modes. High-frequency dynamic data (such as crane position) is collected once per minute, and low-frequency status data (such as equipment fault alarm) is collected once every 5 minutes. Business flow data connects to the yard management system and container entry and exit management system through a RESTful API interface (supporting JSON / XML / CSV format, configured with 24-hour validity token permission authentication). It collects the real-time occupancy status of each cargo position, the number of container stacking layers, the duration of stay in port, as well as container entry and exit reservation information, actual completion time, and abnormal handling records. Cargo position status and reservation data are collected once every 5 minutes, and actual container entry and exit completion data is triggered for collection within 1 minute after being entered into the business system. Meanwhile, the output data of the digital twin model is collected through the WebSocket protocol (which supports subscription to specified entities). The content includes yard capacity utilization, gate saturation, equipment operating load rate, and virtual-real mapping consistency verification results. The collection frequency is consistent with the timing synchronization cycle of the twin modeling and data mapping unit 1 (≤5 minutes). Key scenario parameters are collected in real time after the digital twin model is updated.
[0033] The feature structuring processing module 22 performs deduplication, missing value filling, and normalization preprocessing on the collected multi-source heterogeneous data, extracts spatial location features, time series trend features, and equipment operating status features, and generates a fixed-dimensional structured prediction feature vector.
[0034] Specifically, the preprocessing of the collected multi-source heterogeneous data includes: Deduplication: Deduplication identifiers are constructed based on "data source ID + timestamp + core data item". For example, equipment operation data is identified by "crane ID + collection timestamp + lifting weight", and business data is identified by "container number + appointment time + container type". Duplicate records are filtered through distributed deduplication algorithms (such as Bloom filters), retaining only the valid data collected for the first time and eliminating subsequent duplicate reports. Missing value imputation: The appropriate method is selected based on the data type. For time-series data (such as crane hourly operating weight, gate hourly throughput), linear interpolation is used to imput the missing value, fitting the imputed value based on the three valid data points before and after the missing value. For categorical data (such as cargo space occupancy status, equipment operation mode), the mode imputation method is used, selecting the value with the highest frequency of occurrence in the past hour as the imputed value. If key business data (such as container pick-up reservation information) is missing, a supplementary data collection mechanism is triggered (re-calling the business system interface to obtain it). If the supplementary data collection fails, it is marked as "pending verification" and subsequently corrected based on the results of manual confirmation. Normalization: The Min-Max normalization method is used to map all numerical data to the [0,1] interval. The calculation formula is: Normalized value = (Original value - Minimum value of the data item) / (Maximum value of the data item - Minimum value of the data item); where the maximum / minimum value of the data item is determined by statistical analysis of sample data from the past 30 days. The statistical range is automatically updated every morning to ensure that the normalization standard matches the data distribution trend and avoids interference from extreme values in subsequent modeling.
[0035] Specifically, the three types of features extracted include: Spatial location features include the numerical code of the cargo location (e.g., "1-02-05" represents cargo location 5 in section 2 of yard 1, which is converted into an integer vector after encoding), the unique hot code of the gate (e.g., different encoding vectors correspond to gates 1 / 2 / 3), and the straight-line distance between the equipment and the cargo location (normalized and used as a feature value). Time series trend features are extracted based on sliding window analysis. Short-term forecasts use a 1-hour window and long-term forecasts use a 1-day window. Specifically, these features include the mean (e.g., the mean of vehicles passing through a gate within 1 hour), standard deviation (e.g., the standard deviation of crane operating weight within 1 hour), trend slope (calculated by linear regression to show the trend of data change), and periodic features (weekdays = 1, weekends = 0, converted to binary features). Equipment operating status characteristics include equipment load rate (actual load / rated load), operating efficiency (the amount of work completed per unit time, such as the number of containers stacked by a gantry crane per hour), health status (the number of fault alarms in the past 24 hours: healthy=0, warning=0.5, abnormal=1), and idle time (the interval from the last time the equipment completed a task to the present, normalized and used as a feature value).
[0036] Specifically, when generating fixed-dimensional structured prediction feature vectors, the total dimension of the vectors is determined to be 256 dimensions, of which spatial location features account for 32 dimensions, time series trend features account for 128 dimensions, and equipment operating status features account for 96 dimensions. Each feature item corresponds to a unique vector index. The preprocessed feature values are filled into the corresponding indices in the order of "spatial features-time features-equipment features" to form feature vectors in NumPy array format. At the same time, a feature description document is generated (recording the feature name, meaning, and calculation method corresponding to each index). Finally, the data is pushed to the twin-driven intelligent prediction unit 3 in real time through the data interface.
[0037] The twin-driven intelligent prediction unit 3 employs an improved multi-timescale spatiotemporal interaction fusion prediction algorithm. It divides the real-time state output by the digital twin model into short-term fluctuation features and long-term trend features according to time scale. It utilizes a multi-scale Transformer framework to perform parallel temporal modeling of the short-term fluctuation features and long-term trend features. A twin scene state attention layer is embedded in each scale encoder to dynamically extract the influence weights of real-time scene parameters on corresponding time-scale features. A cross-scale attention fusion layer is introduced in the decoding stage to capture the coupling effects of different time scales. Simultaneously, combined with a historical prediction error feedback mechanism, the mean absolute error (MAE) is calculated using actual inbound / outbound box data at a preset period. The hidden layer parameters of the model are adaptively adjusted, and the predicted values and confidence intervals for the number of inbound / outbound boxes in the future preset time period are output. The twin-driven intelligent prediction unit 3 includes a feature scale division module 31, a multi-scale temporal modeling module 32, a cross-scale fusion module 33, and an error feedback adjustment and output module 34. These modules are linked in a logical sequence of "feature division - temporal modeling - cross-scale fusion - parameter adjustment - result output." In this embodiment, the feature scale segmentation module 31 receives the real-time state data output by the digital twin model and performs feature segmentation according to the time scale; the feature scale segmentation module 31 performs feature segmentation on the real-time state data according to the time scale, and the segmentation logic specifically includes: The time scale corresponding to short-term fluctuation characteristics is 1 hour to 24 hours, and real-time fluctuation data is extracted from the digital twin model; The time scale corresponding to the long-term trend features is 1 to 30 days. Trend data is extracted from the digital twin model, and the time scales of short-term fluctuation features and long-term trend features do not overlap.
[0038] Specifically, the data filtering rules for short-term fluctuation characteristics and long-term trend characteristics are as follows: Short-term fluctuation characteristics (1 hour - 24 hours): Extract high-frequency updated dynamic data from the digital twin model, including hourly gate throughput, hourly crane handling of containers, hourly changes in yard occupancy, and real-time weather impact coefficients (such as fluctuations in operational efficiency caused by rain / strong winds). Long-term trend characteristics (1 day - 30 days): Extract low-frequency trend data from the digital twin model, including daily total container volume, daily number of ships calling at port, weekly storage rate adjustments, monthly route increase / decrease information, and historical patterns of container volume changes during the same period.
[0039] Furthermore, the feature dimensions specifically include: Short-term volatility eigenvector The dimensions are fixed at 512 (the claims limit the dimensions to 256-1024, and the middle value that balances computational efficiency and feature representation capability is selected here), covering 16 core fluctuation indicators, each of which corresponds to 32 subdivision features (such as the gate throughput including the hourly throughput of each gate, queue length, average passage time and other subdivisions). Long-term trend eigenvector The dimensions are also 512, covering 16 core trend indicators, with each indicator corresponding to 32 sub-features (such as the daily total number of containers entering and leaving the container, which includes sub-dimensions such as full / empty containers, imports / exports, and reservations / emergencies).
[0040] Traditional forecasting methods fail to differentiate between time scales of container arrival and departure data, mixing short-term fluctuations (1-24 hours) with long-term trends (1-30 days) and fitting all data to a single model. This results in the inability to accurately capture different patterns, such as hourly gate throughput fluctuations and daily vessel berthing changes, leading to increased prediction errors as data complexity rises. In this embodiment, the feature scale segmentation module 31 splits real-time status data according to time scale. Short-term fluctuation features specifically extract high-frequency dynamic data such as hourly gate throughput, hourly crane container handling volume, and hourly yard space occupancy changes. Long-term trend features specifically extract low-frequency trend data such as daily container arrival and departure volume, daily vessel berthing numbers, and monthly route changes. Furthermore, the time scales of the two types of features do not overlap. Simultaneously, both short-term and long-term feature vectors are set to 512 dimensions to ensure the feature dimensions are compatible with subsequent modeling processes. This design allows for targeted focus on changes at different time scales, providing a clear data foundation for subsequent parallel modeling and effectively solving the problem of limited prediction accuracy caused by data aliasing in traditional methods.
[0041] In this embodiment, the multi-scale temporal modeling module 32 adopts the multi-scale Transformer framework to perform temporal modeling on the split features in parallel. The multi-scale temporal modeling module 32 includes a short-term encoder and a long-term encoder. Both the short-term encoder and the long-term encoder are embedded with a twin scene state attention layer. The weight calculation and temporal modeling of the twin scene state attention layer include the following steps: S32.1, Define the input vector: Receive the short-term fluctuation features and long-term trend features output by the feature scale partitioning module 31, and construct short-term feature vectors respectively. Long-term eigenvectors ;Use the real-time scene parameters output by the digital twin model to construct a unified scene parameter vector. ,set up The dimension is At the same time, the hidden layer dimensions of the short-term encoder and the long-term encoder are initialized to 256-1024 dimensions and the number of attention heads is 4-16. In S32.1, an input vector is first constructed based on the short-term fluctuation features and long-term trend features output by the feature scale partitioning module. The short-term feature vector is set as follows: The long-term eigenvector is set as Both are 512-dimensional (within the 256-1024-dimensional range defined by the claims, balancing computational efficiency and feature representation capability). This represents the transpose symbol, used to convert a row vector into a column vector. The first characteristic of short-term fluctuations The dimensional subdivision eigenvalue covers high-frequency dynamic data such as the hourly throughput at the gate, the number of containers handled by cranes, and the change in the occupancy of storage positions in the yard. The dimensional subdivision eigenvalue for the long-term trend feature covers low-frequency trend data such as the total daily container intake and delivery volume, the number of ships docking at the port, and historical data for the same period. All eigenvalues have been preprocessed and normalized to the range [0,1]. At the same time, the real-time scene parameters of the digital twin model are called to construct the scene parameter vector , denoted as the scene parameter vector of the dimensional subdivision eigenvalue, including core scene indicators such as the real-time utilization rate of the yard, the equipment load rate, the gate saturation rate, and the weather impact coefficient. The dimension is consistent with the feature vector to ensure the effectiveness of subsequent similarity calculations. Finally, the hidden layer dimensions of the short-term encoder and the long-term encoder are initialized to 512 dimensions, and the number of attention heads is 8 (within the range of 4 - 16 specified in the claims, capturing feature associations in different scenarios through multi-head attention in parallel).
[0042] It can be understood that the scene parameter vector includes the real-time utilization rate of the yard, the equipment load rate, the gate saturation rate, and the weather impact coefficient. The quantification and weights of each parameter are as follows: Real-time utilization rate of the yard: Quantified as "current number of stacked containers / total yard capacity" (the value range is 0 - 1, which is the conventional calculation method for the utilization rate of port yards in this field; according to the "General Design Code for Seaports" JTS 165 - 2013 and the literature in the 2nd issue of "China Maritime Navigation" in 2018, the total yard capacity is calculated according to this code, and the current number of stacked containers is collected in real-time by the container position management module of the terminal operating system (TOS)). Equipment load rate: Quantified as "actual workload of the equipment / maximum operating capacity of the equipment" (the value range is 0 - 1, which is the conventional calculation method for evaluating the load of port equipment in this field; according to the "Rubber-Tired Gantry Crane" GB / T 14783 - 2009 and the "Safety Technical Code for Lifting Machinery" (TSG 51—2023), the maximum operating capacity (rated operating capacity) of the equipment needs to meet the calibration requirements for the rated capacity of lifting machinery in the "3.2 Rated Lifting Capacity and Working Class" section of this code; the actual workload needs to follow the requirements in the "9.2 Operation Monitoring" part of the code, and the operation data (including the number of lifting times, operation load, etc.) is collected through the programmable logic controller (PLC) system supporting the equipment to calculate the ratio of the actual workload to the rated operating capacity). Gate saturation: quantified as "current container handling capacity / maximum throughput capacity of the gate" (value range 0-1, which is the conventional calculation method for port gate operation assessment in this field; based on the "General Design Code for Seaports" JTS 165-2013 and the literature in the "Journal of Transportation Engineering" 2019, No. 3, the maximum throughput capacity is calculated according to the code, and the current container handling capacity is collected by the intelligent gate system terminal). Weather impact coefficient: quantified according to "sunny day = 1.0, light rain = 0.8, moderate rain = 0.6, heavy rain / rainstorm = 0.4, snowy day = 0.3" (value range 0.-1.0 is based on empirical research conclusions on the impact of meteorological conditions on port operations; based on the statistical analysis in the "Correlation between Meteorological Conditions and Operational Efficiency" chapter of "The Impact of Environmental Factors on Port Logistics Efficiency - Comprehensive Analysis", and empirical data on the attenuation ratio of operational capacity under different weather conditions in "Research on Port Safety Management Strategies under Extreme Weather Conditions"; weather type is obtained through the public meteorological data interface of China Meteorological Administration).
[0043] Meanwhile, a weight vector is set to [0.3, 0.25, 0.2, 0.25], corresponding to the real-time utilization rate of the storage yard, equipment load rate, gate saturation, and weather impact coefficient, respectively. This is then weighted or directly concatenated to form a dimension... Scene parameter vector This ensures that the quantification and construction process is standardized and feasible. The weight vector is determined based on the analytical framework of "hierarchical priority of container terminal operation indicators" in the paper "Hierarchical, Parallel, Heterogeneous and Reconfigurable Computational Model of Container Terminal Operation System" (Journal of Transportation Engineering, 2018). Combined with the "hierarchical computational model of the operation system" proposed in the paper, the real-time utilization rate of the yard (core indicator of the basic layer of operation resources), equipment load rate (key indicator of the operation execution layer), gate saturation (node indicator of the operation flow layer), and weather impact coefficient (constraint indicator of the operation environment layer) are mapped to the hierarchical structure of the operation system in the paper. Based on the quantitative analysis logic of its hierarchical priority, this weight allocation is derived, conforming to the hierarchical setting specifications for the weights of container terminal operation system indicators in the paper.
[0044] S32.2 Calculate vector similarity: Perform dot product operations on the short-term and long-term feature vectors and the scene parameter vector respectively to solve for the short-term feature similarity. Similarity with long-term features The numerical overflow of high-dimensional vectors is suppressed by the dimension normalization factor; In step S32.2, the similarity between the feature vector and the scene parameter vector is calculated using a dot product operation combined with a dimension normalization factor to avoid numerical overflow of high-dimensional vectors. The formula for calculating short-term feature similarity is: ; The formula for calculating long-term feature similarity is: ; in, Scene parameter vector The transpose of the matrix, For the scene parameter vector dimension, As a dimension normalization factor, it can eliminate the influence of dimension on similarity values, ensure that the similarity results of short-term and long-term features are horizontally comparable, and intuitively reflect the correlation strength between features and the current port operation scenario.
[0045] S32.3 Weight Normalization: The Softmax function is used to normalize the short-term feature similarity. Similarity with long-term features Normalized to the [0,1] interval, the short-term feature attention weights are obtained. Attention weights with long-term features This ensures that the sum of the weights after normalization is 1; In S32.3, the similarity values are mapped to the [0,1] interval using the Softmax function to obtain the short-term feature attention weights and long-term feature attention weights. The formula for calculating the short-term feature attention weight is: ; The formula for calculating the attention weights of long-term features is: .
[0046] in, It is a natural exponential function and satisfies The larger the weight value, the higher the correlation between the corresponding feature and the current scene, and the greater the proportion of the feature in subsequent time series modeling, thus realizing the dynamic adaptation of the feature to the scene.
[0047] S32.4, Temporal Modeling and Feature Enhancement: Transforming short-term feature vectors Input a short-term encoder, capture short-term temporal dependencies through the Transformer self-attention mechanism, and simultaneously use... Weighted enhancement is applied to short-term features to output short-term encoded features. ; Long-term eigenvectors The input is a long-term encoder, which captures long-term temporal evolution patterns through the Transformer self-attention mechanism. Weighted enhancement is applied to long-term features to output long-term encoded features. ; In S32.4, the feature dependencies in the time dimension are first captured through the Transformer self-attention mechanism. The self-attention calculation formula is as follows: .
[0048] For short-term encoding, (Under the self-attention mechanism, queries, keys, and values are all short-term feature vectors), used to mine the correlation patterns in hourly data; for long-term encoding, It is used to uncover the trend patterns in daily data. The dimension is vector. Then, attention weights are used to weight and enhance the encoded features. The formula for calculating short-term encoded features is: ; The formula for calculating long-term coding features is: ; in Element-wise multiplication (multiplying weights one by one with each element of the encoded feature) can highlight feature dimensions that are highly relevant to the current scene and improve the relevance of feature representation.
[0049] S32.5 Parallel Output Encoding Results: Complete the synchronous temporal modeling of short-term and long-term features, and... and The collaborative output is sent to the cross-scale fusion module 33.
[0050] Specifically, a multi-threaded synchronous parallel computing architecture is adopted. A thread pool scheduling mechanism ensures that the modeling processes of the short-term encoder and the long-term encoder start and complete simultaneously, avoiding feature matching delays caused by asynchronous computation. After encoding, the short-term encoded features are... With long-term coding features The data is written to the shared memory area in real time. The shared memory uses a read-write lock mechanism to ensure data security and is directly read by the cross-scale fusion module 33, providing synchronous and complete input data for subsequent cross-scale feature coupling.
[0051] Traditional time-series modeling fails to incorporate real-time port scene parameters, resulting in fixed feature weights. When faced with dynamic scenarios such as concentrated ship berthing, changing equipment load rates, and weather-related impacts on operational efficiency, it cannot adjust feature importance according to the scenario, leading to a disconnect between modeling results and actual operational scenarios and insufficient adaptability. This embodiment's multi-scale time-series modeling module 32 employs a multi-scale Transformer framework, embedding a twin scene state attention layer in both the short-term and long-term encoders. It first calls the real-time scene parameters output by the digital twin model to construct a unified scene parameter vector encompassing information such as real-time yard utilization, equipment load rate, gate saturation, and weather impact coefficients. Then, it calculates the similarity between the short-term and long-term feature vectors and the scene parameter vector, converting the similarity into attention weights using the Softmax function. Subsequently, it utilizes the Transformer self-attention mechanism to capture the temporal dependencies of hourly data in the short-term encoder and mine the evolutionary patterns of daily data in the long-term encoder, enhancing the encoded features through attention weights. This design dynamically links the modeling process with the real-time scene, allowing short-term and long-term encoded features to accurately reflect the impact of the scene on features at different scales, significantly improving the adaptability of the modeling results to actual operational scenarios.
[0052] In this embodiment, the cross-scale fusion module 33 performs coupled fusion of the modeled features through a cross-scale attention fusion layer; the cross-scale fusion module 33 performs coupled fusion of short-term encoded features and long-term encoded features, including the following steps: S33.1, Receive Input Features: Obtain the output of the multi-scale temporal modeling module 32. and Dimension adaptation processing is used to ensure that the vector dimensions of long-term encoded features and short-term encoded features are consistent, and the feature dimensions are set to 256-1024. In S33.1, the short-term coding features output by the multi-scale temporal modeling module 32 are first obtained. With long-term coding features The dimensionality consistency of the two types of feature vectors is checked. In this embodiment, and All features are 512-dimensional and require no additional processing. If dimensional differences arise (e.g., long-term encoding features are 256-dimensional while short-term encoding features are 512-dimensional), then dimensional adaptation is performed using a fully connected layer. The adaptation formula is as follows: ,in For long-term encoded features after dimension adaptation, the input dimension of the fully connected layer is the original dimension. Dimensions, output dimensions and Consistent with this, the weights of the fully connected layer are initialized using a uniform Xavier distribution to ensure numerical stability during forward propagation, ultimately unifying the dimensions of the two types of feature vectors to the target dimension within the range of 256-1024 dimensions (512 dimensions in this embodiment).
[0053] S33.2 Calculate cross-scale fusion coefficients: based on short-term weights output by the twin scene state attention layer. With long-term weights Construct fusion coefficient The calculation logic quantifies the fusion ratio of short-term and long-term features, among which... ,and When short-term scenarios fluctuate drastically Approaching 1, when the long-term trend dominates. Approaching 0; In S33.2, short-term weights are based on the output of the twin scene state attention layer. With long-term weights Constructing fusion coefficients The fusion ratio of quantified short-term and long-term features is calculated using the following formula: ,and .
[0054] because Therefore When short-term scenarios fluctuate drastically (such as concentrated ship berthing or sudden equipment failures causing a sharp change in container throughput), Approaching 1, Synchronization approaches 1, and the fused features are dominated by short-term coding features; when long-term trends dominate (such as peak holiday transportation periods, or a steady increase in container volume due to fixed increases in flight routes), Approaching 1, Approaching 0, the fused features are mainly long-term encoded features, and the fusion ratio is dynamically adjusted according to the scenario.
[0055] S33.3, Execution Feature Coupling and Fusion: Using a weighted summation method to perform... and The fusion process fully preserves the time dependency and scene association information of both long-term and short-term encoded features, resulting in the final feature vector after cross-scale fusion. Meanwhile, L2 normalization is used to suppress feature value drift. In S33.3, a weighted summation method is first used to couple and fuse short-term and long-term coding features, retaining the core information of both types of features. The fusion formula is as follows: ; in For element-wise multiplication, Element-wise addition can simultaneously preserve the temporal evolution of long-term coding features and the real-time fluctuation information of short-term coding features.
[0056] Then, L2 normalization is used to suppress feature value drift. The normalization formula is: ; in , for The The L2 norm of the normalized feature vector is 1, which avoids gradient explosion or vanishing problems caused by differences in numerical range during subsequent model training.
[0057] S33.4 Output fused features: The final feature vector The synchronous output is sent to the error feedback adjustment and output module 34 to provide a unified feature input for subsequent prediction calculations and parameter adjustments.
[0058] In S33.4, the normalized final feature vector is... The data is output to the error feedback tuning and output module 34 via a low-latency data interface. The interface uses the TCP / IP protocol to ensure data transmission stability, with latency controlled within 100ms, ensuring the real-time performance of subsequent prediction calculations and parameter adjustments. Simultaneously, the output data includes metadata such as feature dimensions and normalization status, which the error feedback tuning and output module 34 quickly parses, providing a unified and stable feature input for subsequent steps.
[0059] Traditional cross-scale fusion methods often employ fixed-ratio splicing or simple superposition, which cannot dynamically adjust the fusion ratio of short-term and long-term features according to the actual port scenario. Furthermore, the differences in the numerical ranges of the two types of features can lead to numerical drift, affecting subsequent prediction accuracy. In this embodiment, the cross-scale fusion module 33 first adapts the dimensions of the short-term and long-term encoded features output by the multi-scale temporal modeling module 32 to ensure that the two types of feature vectors have consistent dimensions (512 dimensions in this embodiment). Then, based on the short-term and long-term attention weights output by the twin scene state attention layer, a dynamic fusion coefficient is calculated. When short-term scene fluctuations are drastic (e.g., a sudden equipment failure causing a sharp change in container throughput), the fusion coefficient tilts towards short-term features; when long-term trends dominate (e.g., a steady increase in container throughput due to holiday peaks), the fusion coefficient tilts towards long-term features. Subsequently, the two types of encoded features are coupled and fused using a weighted summation method, fully preserving the real-time information of short-term fluctuations and the evolutionary patterns of long-term trends, while L2 normalization is used to suppress feature numerical drift. This design allows the fusion weights to be dynamically adjusted according to the scene, which not only solves the rigidity problem of traditional fusion methods, but also ensures the stability of feature values, providing high-quality unified feature input for subsequent predictions.
[0060] In this embodiment, the error feedback adjustment and output module 34 adaptively adjusts the model parameters based on historical prediction errors and outputs the predicted values and confidence intervals of the number of boxes entering and leaving the container at different time periods. The error feedback adjustment and output module 34 adjusts the model parameters and outputs the prediction results through error feedback, including the following steps: S34.1 Generating initial predicted values: The final feature vector output by the cross-scale fusion module 33 is used to generate the initial predicted values. The decoder of the input multi-scale Transformer framework obtains the initial time-segmented prediction values within a preset time period through a fully connected layer mapping. ,in , This represents the number of subdivisions for the prediction period; In S34.1, the final feature vector output by the cross-scale fusion module is... The decoder of the input multi-scale Transformer framework obtains the initial time-segmented prediction values within a preset time period through a fully connected layer mapping. The calculation formula is as follows: ; in, For the first The initial forecast value for each sub-period (e.g., the forecast of container volume in and out for the next 24 hours) =24, corresponding to 1 prediction value per hour), the fully connected layer has an input dimension of 512 dimensions and an output dimension of... The activation function uses ReLU to ensure that the predicted value is a non-negative real number (which matches the actual number of boxes being picked up and removed, and avoids negative values).
[0061] S34.2 Calculate the mean absolute error: Collect actual container entry and exit data at the port according to a preset cycle. Number of samples within the statistical period Through mean absolute error Quantify prediction accuracy, This is the mean of the absolute error of a single sample prediction within the period; the smaller the value, the higher the prediction accuracy. In S34.2, actual container arrival and departure data at the port are collected according to a preset 24-hour cycle, and the number of samples within the cycle is statistically analyzed. (24-hour cycle) =24, 1 sample per hour), through mean absolute error The formula for quantifying prediction accuracy is as follows: ; in, For the first The actual number of boxes picked up and taken out for each sample For the first The initial predicted value for each sample, This is for absolute value operations; The smaller the value, the smaller the deviation between the prediction result and the actual data, and the higher the accuracy, providing a quantitative basis for subsequent model parameter adjustments.
[0062] S34.3 Adaptive adjustment of model parameters: based on Solving for hidden layer parameters in a multi-scale Transformer framework gradient The parameters are updated using gradient descent. To ensure continuous model optimization, among which For the learning rate, and , For the current parameter, These are the updated parameters; In S34.3, the hidden layer parameters of the multi-scale Transformer framework are first solved based on MAE. The gradient, and the formula for calculating the gradient is: ; in, These are the hidden layer parameters (including the weight matrices and bias terms of the encoder and decoder). For the sign function (when Returns 1 when Returns -1 when the value is equal to 0, and 0 when the value is equal to 0. For predicted values Regarding parameters The partial derivatives of .
[0063] Then, the parameters are updated using gradient descent, with the following update formula: ; in For the current parameter, The updated parameters include the learning rate. (Within the 0.001-0.01 range defined in the claims, balancing the model convergence speed and parameter update stability), ensuring that the model autonomously iterates and optimizes as port operation patterns change.
[0064] S34.4 Calculate the prediction confidence interval: based on historical preset periods The standard deviation of the error was calculated using statistical methods for the sample. Select the two-sided quantiles of the standard normal distribution To obtain each predicted value confidence interval ; In S34.4, based on nearly 30 historical preset cycles sample( =30), first calculate the standard deviation of the error using the following formula: ; in For the first Each cycle , This represents the historical MAE average. Select again Two-tailed quantiles of a standard normal distribution (corresponding to 95% confidence level) The formula is as follows: ; By obtaining the confidence interval for each predicted value, the uncertainty range of the prediction results is quantified, providing a risk reference for port resource allocation.
[0065] S34.5 Output the final result: This includes the optimized predicted value obtained after parameter adjustment, the corresponding confidence interval, and... The simultaneous output of quantitative indicators provides precise technical decision support for the allocation of port operation resources.
[0066] In S34.5, the optimized predicted value obtained after adjusting the parameters is... The corresponding 95% confidence interval and the current cycle ,history mean Error standard deviation Equivalent indicators are output synchronously in a standardized JSON format. The JSON format includes four core fields: "Forecast Period", "Optimized Forecast Value Array", "Confidence Interval Array", and "Accuracy Indicator". This ensures that the error feedback adjustment and output module 34 can be directly parsed, providing accurate and practical technical support for resource allocation decisions such as port yard planning, gate scheduling, and equipment scheduling.
[0067] Traditional forecasting models, once their parameters are set, remain unchanged, failing to adapt to changes in port operations such as new shipping routes and adjustments to storage policies. Their accuracy tends to decline over time, and they lack the ability to quantify the uncertainty of forecast results, making it difficult to provide risk references for port resource allocation. This embodiment addresses this by having the error feedback tuning and output module 34 first input the final feature vector obtained through cross-scale fusion into the decoder of a multi-scale Transformer framework. Initial forecast values for different time periods are generated through a fully connected layer. Then, actual container handling data is collected at the port at a preset 24-hour cycle, and the mean absolute error (MAE) within the cycle is calculated to quantify forecast accuracy. Based on the MAE, the gradient of the model's hidden layer parameters is solved, and the parameters are adaptively updated using gradient descent to ensure continuous optimization as operational patterns change. Simultaneously, based on MAE samples from nearly 30 historical cycles, the standard deviation of the error is calculated, and combined with the two-sided quantiles of the standard normal distribution, a confidence interval for each forecast value is obtained, quantifying the uncertainty of the forecast results. This design enables autonomous iterative optimization of model parameters, effectively maintaining long-term forecast accuracy. The confidence interval provides a risk reference for port yard planning, gate scheduling, and other decisions, making the forecast results more practically valuable.
[0068] Prediction verification and linkage output unit 4 inputs the prediction results back into the digital twin model for scenario simulation verification, and outputs them through a visualization terminal to provide technical decision support for port operation resource allocation.
[0069] In this embodiment, the prediction verification and linkage output unit 4 includes a scene simulation verification module 41 and a visualization linkage output module 42, wherein: The scenario simulation verification module 41 receives the optimized prediction value and confidence interval output by the twin-driven intelligent prediction unit 3, and inputs them in reverse into the digital twin model. Based on the port operation rule library built into the digital twin model, it simulates the yard capacity matching degree, gate capacity saturation degree and equipment operation load rate corresponding to the prediction results. Specifically, the scenario simulation verification module 41 completes the precise spatiotemporal matching of the predicted data and the digital twin model, laying the data foundation for simulation calculations. The scenario simulation verification module 41 receives two types of core technical data output from the twin-driven intelligent prediction unit 3: one is time-segmented optimized predicted values. ( , To subdivide the forecast period into several segments, such as forecasting 24 hours... =24); secondly, the confidence interval for the corresponding time period. ( To predict the lower limit, (Used as an upper limit to quantify the uncertainty of prediction). Meanwhile, to avoid data becoming disconnected from the physical scene, the scene simulation verification module 41 categorizes the above data according to " The relationship between “” is mapped to the “1-hour time slice” node preset in the digital twin model. This node is a time dimension unit set by the model according to the actual operation rhythm of the port (such as one hour as an operation statistical unit). It is completely consistent with the granularity of the prediction and can ensure that the prediction data corresponds one-to-one with the physical entities such as the yard, gate, and equipment in the model in the spatiotemporal dimension.
[0070] Specifically, to extract objective basic parameters for port physical operations and ensure the accuracy of indicator calculations, the scenario simulation verification module 41 calls the "Port Physical Operation Parameter Library" built into the digital twin model. All parameters are derived from actual measurements of the port physical entity or equipment factory calibration values, and are updated in real time through the twin modeling and data mapping unit 1. Specifically, this includes: Total physical available capacity of the storage yard TEU (including 3000 TEU in the loaded container area and 2000 TEU in the empty container area, calculated based on the yard area and the maximum stacking height of the gantry crane), and storage safety factor. (Based on historical storage density and operational efficiency statistics); Physical throughput capacity of each gate ( TEU / hour, TEU / hour, TEU / hour (measured and calibrated based on gate width and container inspection equipment processing speed), gate passage safety factor. (Based on historical traffic flow and congestion probability statistics); Rated operating capacity of various equipment ( Gantry crane: 30 TEU / hour Container truck: 15 TEU / hour (from equipment manufacturer's manual), equipment operation safety factor. (Based on actual load and failure probability measurements) and the actual number of gantry cranes deployed. Actual number of Taiwan-made container trucks deployed Vehicles.
[0071] Specifically, three core technical indicators are calculated based on data and parameters to quantify adaptability. All calculation logic relies on physical formulas and historical statistical patterns, as detailed below: Stockyard capacity matching , measuring the first The formula for matching hourly storage demand with yard safety capacity is: ; ; ; in, For based on The storage requirements are as follows: the incoming container volume needs to take into account the temporary storage buffer for operation scheduling delays, calculated as incoming container volume × 1.2; the outgoing container volume needs to take into account the time matching of truck scheduling, calculated as outgoing container volume × 0.8 (1.2 is the incoming container temporary storage buffer coefficient, covering the time difference of container inspection, yard scheduling, etc.; 0.8 is the outgoing container scheduling buffer coefficient, covering the time difference of appointment confirmation, loading preparation, etc., and the coefficients can be calibrated according to the actual scheduling efficiency of the port). , For based on The storage requirements.
[0072] Meanwhile, to clarify the specific relationship between storage demand and the predicted values of the twin-driven intelligent prediction unit 3, the following definition is now established. With twin-driven intelligent prediction unit 3 predicted values (including box) ,suitcase The subdivisions are as follows: ; in, This is the lower confidence limit for entering the box. The lower confidence limit for taking out the suitcase; This is the upper limit of confidence for entering the bin. The upper limit of confidence for picking up the box ( , The confidence interval of the bin feed quantity output by the twin-driven intelligent prediction unit 3. , (corresponding confidence interval for container volume) The evaluation logic is as follows: 80%~100% (good matching, operation efficiency ≥85%), 60%~80% (basic matching, no significant decrease in efficiency), <60% (insufficient matching, resource redundancy), >100% (capacity overload, prone to congestion).
[0073] Gate capacity saturation Based on the port entry / exit functional zones, the suitability of passage demand and safety capabilities is measured using the following formula: ; ; in, For the demand of the port entrance gate (i.e. (Inlet volume); To meet the demand for port gates (i.e.) (Container capacity). The evaluation logic is as follows: ≤90% (moderate saturation, waiting time ≤5 minutes), 90%~120% (slightly saturated, waiting time 5~10 minutes), >120% (severely saturated, waiting time >10 minutes).
[0074] Specifically, equipment operating load rate This covers gantry cranes and container trucks, and measures the compatibility between the actual load and the safe load of the equipment. The formula is: ; ; in, For gantry crane requirements (equal to) ); For truck demand (equal to) The evaluation logic is as follows: ≤85% (reasonable load, failure probability ≤3%), 85%~110% (slight overload, failure probability 3%~8%), >110% (severe overload, failure probability >8%).
[0075] Finally, the scenario simulation verification module 41 integrates the calculation results into " The structured data is output synchronously to the visualization linkage output module 42 in JSON format.
[0076] The visualization and linkage output module 42 uses a visualization terminal to display time-period optimized prediction values in line graphs, confidence intervals in interval graphs, and simulation verification indicators in numerical panels. It also outputs the validity indicators of the prediction results and corresponding resource configuration adaptation suggestions, providing technical decision support for port yard planning, gate scheduling, and equipment scheduling.
[0077] Specifically, the visualization linkage output module 42 can adopt the standard industrial-grade configuration of a port control room: a 27-inch 4KIPS industrial monitor (supporting 7×24-hour operation and visible under strong light), and a wired industrial keyboard and mouse; it can synchronize the JSON data of the scene simulation verification module 41 every 5 minutes via the WebSocket protocol through the RJ45 Ethernet interface.
[0078] Meanwhile, based on the ECharts visualization framework, the upper left half of the interface displays the optimized forecast values for different time periods using a line chart. The confidence interval is presented by overlaying a light blue interval plot. The right side displays three core indicators: yard capacity matching degree, gate saturation, and equipment load rate on a numerical panel. The numerical colors change dynamically according to the evaluation level (green = good, yellow = basic, red = overload).
[0079] Furthermore, the system outputs a validity indicator of the forecast results (valid / partially valid / needs optimization) and resource allocation suggestions (such as enabling backup storage areas when the yard is overloaded, and opening backup channels when the gate is saturated), and archives the data to the port operations database by "forecast date-time period" for retrospective analysis.
[0080] like Figure 2As shown, this embodiment also provides a method for intelligent prediction of the number of inbound and outbound containers at ports based on digital twins. The aforementioned intelligent prediction system for the number of inbound and outbound containers at ports based on digital twins includes: S1. Construct a digital twin model and collect multi-source data: Use BIM technology to collect the geometric structure, material properties, and equipment layout of the port's physical entities to generate a 3D model. Combine this with GIS technology to input geospatial information and fuse and calibrate it using the WGS-84 coordinate system to construct a 1:1 digital twin model of the port. Simultaneously connect with sensors and business systems to collect real-time operation data and historical business data to form a twin data foundation. S2. Process data and extract predictive features: Perform deduplication, missing value filling, and normalization preprocessing on the collected multi-source heterogeneous data, extract spatial location, time series trend, and equipment operating status features, and generate structured predictive feature vectors. S3. Divide the feature scale and model in parallel: Divide the real-time state data output by the digital twin model into short-term fluctuation features of 1 hour to 24 hours and long-term trend features of 1 day to 30 days. By embedding the short-term encoder and long-term encoder of the twin scene state attention layer, the long-term trend features and short-term fluctuation features are modeled in parallel time series to generate short-term coded features and long-term coded features. S4. Cross-scale feature fusion and prediction output: Calculate the fusion coefficient based on the state attention weight of the twin scene, weightedly fuse short-term and long-term encoded features, input the fusion into the decoder to generate the initial prediction value; calculate the MAE by combining actual inbound and outbound box data, adaptively adjust the digital twin model parameters, and output the optimized prediction value and confidence interval. S5. Verify the prediction results: Input the optimized prediction values back into the digital twin model to simulate the yard capacity matching degree, gate capacity saturation, and equipment operating load rate, and output the validity indicator of the prediction results.
[0081] Those skilled in the art will understand that the process of implementing all or part of the steps of the above embodiments can be carried out by hardware or by a program instructing the relevant hardware.
[0082] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A digital-twin-based intelligent prediction system for the number of containers handled in a port, characterized in that, The application relates to a port operation intelligent prediction system based on digital twin technology. The system comprises a twin modeling and data mapping unit (1) which adopts a BIM+GIS fusion technology to construct a 1:1 digital twin model of a port physical entity, collects data in real time through a multi-source Internet of Things device and a system interface and dynamically maps the data to the digital twin model to keep the virtual and real states consistent and form a twin data base; A data acquisition and feature processing unit (2) collects multi-source heterogeneous data of port operation equipment, a business system and a digital twin model, extracts time and space key features after preprocessing and generates a structured prediction feature vector; A twin-driven intelligent prediction unit (3) adopts an improved multi-time scale space-time interaction fusion prediction algorithm, divides real-time states output by the digital twin model into short-term fluctuation features and long-term trend features according to time scales, uses a multi-scale Transformer framework to model the short-term fluctuation features and the long-term trend features in parallel, embeds a twin scene state attention layer in each scale encoder to dynamically extract the influence weight of real-time scene parameters in the digital twin model on corresponding time scale features, introduces a cross-scale attention fusion layer in the decoding stage to capture the coupling influence of different time scales, and combines a historical prediction error feedback mechanism to calculate the mean absolute error (MAE) through actual container loading and unloading data at a preset period, adaptively adjusts the model hidden layer parameters and outputs the prediction value and confidence interval of the container loading and unloading quantity in the future preset period. A prediction verification and linkage output unit (4) inputs the prediction result into the digital twin model for scene simulation verification and outputs the result through a visual terminal to provide technical decision support for port operation resource allocation. The twin modeling and data mapping unit (1) comprises a digital twin model construction module (11) and a data acquisition mapping module (12), wherein:
2. The digital-twin-based intelligent port container in-out quantity prediction system according to claim 1, characterized in that, The digital twin model construction module (11) collects the geometric structure, equipment layout and attribute parameters of the port physical entity through BIM technology, generates a refined three-dimensional model, inputs the port geographic space coordinates, regional division and traffic network information through GIS technology, calibrates the three-dimensional model and geographic space information through a WGS-84 coordinate system and fuses and calibrates the three-dimensional model and the geographic space information to construct a 1:1 scale port digital twin model; The data acquisition mapping module (12) collects real-time operation data through a sensor interface, a camera interface and an RFID reader interface, collects historical and real-time business data through a yard management system interface and a ship scheduling system interface, converts the data formats and cleans the data, adopts a combination of a timing synchronization and a triggered updating mode to map the data to corresponding entity nodes of the digital twin model, triggers instant updating when a key state changes and integrates to form a twin data base covering geometric data, state data and business data. The data acquisition and feature processing unit (2) comprises a data multi-source acquisition module (21) and a feature structured processing module (22), wherein: 3.The digital-twin-based intelligent port container loading / unloading quantity prediction system according to claim 1, wherein, The data multi-source collection module (21) collects equipment operation data through a sensor interface and a controller interface of the operation equipment, collects business flow data through a yard management system interface and a container loading and unloading management system interface of a business system, and collects model output data through a state data interface of a digital twin model; The feature structured processing module (22) performs de-duplication, missing value filling and normalization preprocessing on the collected multi-source heterogeneous data, extracts spatial position features, time series trend features and equipment operation state features, and generates a fixed-dimension structured prediction feature vector.
4. The digital-twin-based intelligent port container in-out quantity prediction system according to claim 1, wherein The twin-driven intelligent prediction unit (3) includes a feature scale division module (31), a multi-scale time series modeling module (32), a cross-scale fusion module (33) and an error feedback adjustment and output module (34), wherein: The feature scale division module (31) receives real-time state data output by the digital twin model, and performs feature splitting according to time scales; The multi-scale time series modeling module (32) uses a multi-scale Transformer framework to perform time series modeling on the split features in parallel; The cross-scale fusion module (33) couples and fuses the modeled features through a cross-scale attention fusion layer; The error feedback adjustment and output module (34) adaptively adjusts model parameters based on historical prediction errors, and outputs time-periodic container loading and unloading quantity prediction values and confidence intervals.
5. The digital-twin-based intelligent port container in-out quantity prediction system according to claim 4, characterized in that, The feature scale division module (31) performs feature splitting on real-time state data according to time scales, and the division logic specifically includes: The time scale corresponding to the short-term fluctuation feature is 1 hour to 24 hours, and the real-time fluctuation data in the digital twin model is extracted; The time scale corresponding to the long-term trend feature is 1 day to 30 days, the trend data in the digital twin model is extracted, and the time scales of the short-term fluctuation feature and the long-term trend feature do not overlap.
6. The digital-twin-based intelligent port container in-out quantity prediction system according to claim 5, characterized in that, The multi-scale time series modeling module (32) includes a short-term encoder and a long-term encoder, both of which are embedded with a twin scene state attention layer, and the weight calculation and time series modeling of the twin scene state attention layer include the following steps: S32.1, define input vector: receive short-term fluctuation features and long-term trend features output by the feature scale division module (31), and construct a short-term feature vector , a long-term feature vector ; Call the real-time scene parameters output by the digital twin model to construct a unified scene parameter vector , set The dimension of , while initializing the hidden layer dimension of the short-term encoder and the long-term encoder to 256-1024 dimensions, and the number of attention heads to 4-16. S32.2, compute vector similarity: respectively, dot product operation is performed on short-term and long-term feature vectors and scene parameter vector, and short-term feature similarity is solved and long-term feature similarity , high-dimensional vector numerical overflow is inhibited by dimension normalization factor; S32.3, weight normalization processing: using Softmax function to normalize short-term feature similarity and long-term feature similarity to [0, 1] interval respectively, to obtain short-term feature attention weight and long-term feature attention weight , to ensure that the sum of normalized weights is 1; S32.4, timing modeling and feature enhancement: the short-term feature vector is input into the short-term encoder to capture the short-term time dependence through the Transformer self-attention mechanism, and the short-term feature is weighted and enhanced, and the short-term encoding feature is output ; the long-term feature vector is input into the long-term encoder to capture the long-term time evolution law through the Transformer self-attention mechanism, and the long-term feature is weighted and enhanced, and the long-term encoding feature is output ; S32.5, parallel output encoding results: complete the synchronous timing modeling of short-term and long-term features, and output to the cross-scale fusion module (33) in coordination. with coordinated output.
7. The digital-twin-based intelligent port container pick-up quantity prediction system according to claim 6, characterized in that, The cross-scale fusion module (33) couples and fuses the short-term encoding features and the long-term encoding features, including the following steps: S33.1, receiving input features: obtaining the long-term encoded features and the short-term encoded features output by the multi-scale time series modeling module (32) With , the vector dimensions of the long-term encoded features and the short-term encoded features are ensured to be consistent through the dimension adaptation processing, and the feature dimension is set to 256-1024 dimensions; S33.2, compute cross-scale fusion coefficient: based on short-term weight of twin scene state attention layer output and long-term weight , construct the calculation logic of fusion coefficient , quantify the fusion proportion of short-term features and long-term features, wherein , and when the short-term scene fluctuates violently tends to 1, when the long-term trend dominates tends to 0; S33.3, execute feature coupling fusion: adopt weighted summation method to fuse with , fully retain the time-dependent information and scene-related information of long-term and short-term encoding features, and obtain the final feature vector after cross-scale fusion , and suppress feature value drift through L2 normalization processing; S33.4, output fusion features: output the final feature vector Synchronization output to error feedback adjustment and output module (34), to provide unified feature input for subsequent prediction calculation and parameter adjustment.
8. The digital-twin-based intelligent port container in-out quantity prediction system according to claim 7, characterized in that, The error feedback adjustment and output module (34) adjusts model parameters through error feedback and outputs prediction results, including the following steps: S34.1, generating an initial prediction value: mapping the final feature vector output by the cross-scale fusion module (33) through a fully connected layer to obtain a sub-period initial prediction value in a preset time period The decoder of the input multi-scale Transformer framework maps to obtain a sub-period initial prediction value in a preset time period wherein , is the number of sub-periods of the prediction period; S34.2 Calculate the mean absolute error: Collect actual container entry and exit data at the port according to a preset cycle. Number of samples within the statistical period Through mean absolute error Quantify prediction accuracy, This is the mean of the absolute error of a single sample prediction within the period; the smaller the value, the higher the prediction accuracy. S34.3, adaptively adjusting model parameters: based on solving the gradient of the hidden layer parameters of the multi-scale Transformer framework updating the parameters by gradient descent method to obtain , ensuring continuous optimization of the model, wherein is the learning rate, and , is the current parameter, is the updated parameter; S34.4, calculate prediction confidence interval: based on historical preset period of samples, calculate error standard deviation by statistical method , select standard normal distribution two-sided quantile , get the confidence interval of each prediction value ; S34.5, output final results: the optimized prediction value after adjusting the parameters, the corresponding confidence interval, and Quantitative indicators are synchronized and output to provide accurate technical decision support for port operation resource allocation.
9. The digital-twin-based intelligent port container in-out quantity prediction system according to claim 8, characterized in that, The prediction verification and linkage output unit (4) includes a scene simulation verification module (41) and a visual linkage output module (42), wherein: The scene simulation verification module (41) receives the optimized prediction values and confidence intervals output by the twin-driven intelligent prediction unit (3), inputs them into the digital twin model in reverse, simulates the matching degree of the yard capacity, the saturation degree of the lock passage capacity and the equipment operation load rate corresponding to the prediction results based on the built-in port operation rule library of the digital twin model, and The visualization linkage output module (42) outputs the prediction result validity identifier and the corresponding resource configuration adaptation suggestion by a visualization terminal in the form of a broken line graph for time period optimization prediction value, an interval graph for confidence interval, and a numerical panel for simulation verification index, thereby providing technical decision support for port yard planning, gate scheduling, and equipment scheduling.
10. The intelligent prediction method for the number of containers handled at a port based on digital twinning, according to any one of claims 1-9, characterized in that, The method comprises the following steps: S1, constructing a digital twin model and collecting multi-source data: a three-dimensional model is generated by collecting the geometric structure, material properties, and equipment layout of the physical entity of the port using BIM technology, geographic space information is input by combining GIS technology and fused and calibrated by the WGS-84 coordinate system, a 1:1 port digital twin model is constructed, real-time operation data and historical business data are collected by synchronously interfacing sensors and business systems, and a twin data foundation is formed; S2, processing data and extracting prediction features: the collected multi-source heterogeneous data is preprocessed by removing duplicates, filling missing values, and normalizing, spatial position, time series trend, and equipment operation state features are extracted, and a structured prediction feature vector is generated; S3, dividing feature scales and parallel modeling: the real-time state data output by the digital twin model is divided into short-term fluctuation features of 1 hour-24 hours and long-term trend features of 1 day-30 days, the long-term trend features and the short-term fluctuation features are respectively parallel time series modeled by a short-term encoder and a long-term encoder embedded with a twin scene state attention layer, short-term encoding features and long-term encoding features are generated; S4, cross-scale fusion features and output prediction: a fusion coefficient is calculated based on the twin scene state attention weight, the short-term encoding features and the long-term encoding features are weighted and fused, an initial prediction value is generated by inputting the decoder, the MAE is calculated by combining the actual container loading and unloading data, the digital twin model parameters are adaptively adjusted, and an optimized prediction value and a confidence interval are output; S5, verifying the prediction result: the optimized prediction value is input into the digital twin model in reverse, the yard capacity matching degree, the gate traffic capacity saturation, and the equipment operation load rate are simulated, and a prediction result validity identifier is output.