Port ship shore power load prediction method, device, medium and product

CN122225413BActive Publication Date: 2026-09-08CHINA COMM CONSTR FIRST HARBOR CONSULTANTS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610652394.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-13
Publication Date
2026-09-08
Estimated Expiration
2046-05-13

AI Technical Summary

Technical Problem

[0004]本申请的目的是提供一种港口船舶岸电负荷预测方法、设备、介质及产品,以解决背景技术所描述的船舶岸电负荷预测精度低的问题

Benefits of technology

本申请实施例提供的港口船舶岸电负荷预测方法,基于目标船舶的静态属性向量确定目标船舶的初始负荷特征先验向量;再获取目标船舶在预测周期内的在港作业计划和预测周期内的港口环境数据;再将该初始负荷特征先验向量、作业计划和环境数据发送给自适应傅里叶-神经网络混合预测模型,以基于混合预测模型确定出目标船舶的最终岸电负荷功率预测值;该方法能够确定出目标船舶的个性化用电行为,提高岸电负荷预测精度尤其对于首次到港的“冷启动”船舶能够预测其岸电负荷,提高岸电负荷预测精度,从而也能提高港口电能分配精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122225413B_ABST
    Figure CN122225413B_ABST
Patent Text Reader

Abstract

The application discloses a port ship shore power load prediction method and device, medium and product, relates to the technical field of port ship power prediction, and the method comprises the following steps: obtaining the static attribute vector of a target ship, the port operation plan in a prediction period and the port environment data in the prediction period, the target ship being a ship to be subjected to load prediction; determining the initial load characteristic prior vector of the target ship in the prediction period based on the static attribute vector; initializing the adaptive Fourier-neural network hybrid prediction model through the initial load characteristic prior vector, the port operation plan in the prediction period and the port environment data in the prediction period, so that the hybrid prediction model outputs the fundamental wave prediction component and the fluctuation prediction component of the target ship; determining the sum of the fundamental wave prediction component and the fluctuation prediction component, and obtaining the final shore power load power prediction value of the target ship in the predetermined period. The application improves the ship shore power load prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of port ship power forecasting technology, and in particular to a method, equipment, medium and product for forecasting port ship shore power load. Background Technology

[0002] As global ports transition towards "zero-carbon and green" operations, shore power systems have become a key technology for reducing carbon emissions from ships berthing at ports. Accurate forecasting of ship shore power loads is a core prerequisite for achieving intelligent allocation, economic scheduling, and energy efficiency optimization of port shore power systems. Only by knowing in advance "how much electricity ships will use" can "how much electricity the port needs" be efficiently allocated, thereby avoiding uneven power distribution, maximizing the absorption of fluctuating renewable energy sources (such as solar and wind power), and ultimately reducing the electricity cost per ship and the total operating cost of the port.

[0003] Currently, port shore power load forecasting mainly relies on forecasts based on historical averages: the average of the historical load curves of similar vessels is taken as the shore power forecast for newly arriving vessels. However, this method cannot reflect the individualized power consumption behavior of specific vessels, resulting in low forecast accuracy, and it is completely ineffective, especially for "cold start" vessels arriving for the first time. Summary of the Invention

[0004] The purpose of this application is to provide a method, equipment, medium, and product for predicting shore power load of ships in ports, in order to solve the problem of low accuracy in predicting shore power load of ships as described in the background art.

[0005] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a method for predicting shore power load on ships in ports, including: The static attribute vector of the target vessel, the port operation plan within the prediction period, and the port environment data within the prediction period are obtained. The target vessel is the vessel for which load prediction is to be performed. The initial load characteristic prior vector of the target vessel within the prediction period is determined based on the static attribute vector. The adaptive Fourier-neural network hybrid prediction model is initialized using the initial load feature prior vector, the port operation plan within the prediction period, and the port environment data within the prediction period, so that the hybrid prediction model outputs the fundamental wave prediction component and the wave prediction component of the target ship. The sum of the fundamental wave prediction component and the fluctuation prediction component is determined to obtain the final shore power load prediction value of the target ship within a predetermined period.

[0006] Optionally, determining the initial load characteristic prior vector of the target vessel within the prediction period based on the static attribute vector includes: Based on the static attribute vector of the target vessel, K source domain vessels with the highest comprehensive similarity to the target vessel are selected from the preset load feature knowledge base and denoted as source domain selected vessels. The load feature knowledge base stores the correspondence between the static attribute vector and the load feature vector of each vessel that has berthed in port. Obtain the load feature vectors of K selected ships from the source domain from the preset load feature knowledge base; The load feature vectors of K selected ships in the source domain are fused to obtain the fused load feature vector, which is denoted as the initial load feature prior vector of the target ship in the prediction period.

[0007] Optionally, the construction process of the load feature knowledge base includes: Obtain the static attribute vector and load feature vector of each vessel historically served by the port; For each vessel, the static attribute vector is associated with and stored with the load feature vector to form the load feature knowledge base.

[0008] Optionally, the step of selecting K source domain vessels with the highest comprehensive similarity to the target vessel from a preset load feature knowledge base based on the static attribute vector of the target vessel, denoted as the selected source domain vessels, includes: Determine the comprehensive similarity between the static attribute vector of each source domain vessel included in the load feature knowledge base and the static attribute vector of the target vessel; The K ships with the highest comprehensive similarity are selected from the load feature knowledge base to obtain the K source domain selected ships.

[0009] Optionally, the hybrid prediction model outputs the fundamental wave prediction component and wave prediction component of the target ship using the following method: The Fourier fundamental branch receives the initial load feature prior vector, determines the fundamental prediction component based on the initial load feature prior vector, and outputs it. The neural network fluctuation branch receives the port operation plan and port environment data within the prediction period, and calculates and outputs the fluctuation prediction component based on the port operation plan and the port environment data.

[0010] Optionally, static attribute vectors At least include the target vessel type Total tonnage of the target vessel Rated capacity of the target vessel and the year of construction of the target ship .

[0011] Optionally, the load characteristic vector includes: a typical load curve, average daily electricity consumption, load fluctuation rate, and characteristic daily periodic components.

[0012] In a second aspect, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in any one of the first aspects above.

[0013] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the first aspects above.

[0014] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any one of the first aspects above.

[0015] According to the specific embodiments provided in this application, the following technical effects are disclosed: The port vessel shore power load prediction method provided in this application determines the initial load characteristic prior vector of the target vessel based on the static attribute vector of the target vessel; then, it obtains the target vessel's port operation plan and port environmental data within the prediction period; and then sends the initial load characteristic prior vector, operation plan, and environmental data to an adaptive Fourier-neural network hybrid prediction model to determine the final shore power load prediction value of the target vessel based on the hybrid prediction model. This method can determine the individual electricity consumption behavior of the target vessel, improve the accuracy of shore power load prediction, especially for "cold start" vessels arriving at the port for the first time, and improve the accuracy of shore power load prediction, thereby also improving the accuracy of port power distribution. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a diagram illustrating the application environment of the port vessel shore power load prediction method in one embodiment of this application. Figure 2 A flowchart illustrating a method for predicting shore power load for ships in a port, provided as an embodiment of this application; Figure 3 A flowchart illustrating a method for determining an initial load characteristic prior vector according to an embodiment of this application; Figure 4This application provides a schematic flowchart of a method for constructing a load feature knowledge base according to another embodiment of the present application. Figure 5 A flowchart illustrating a method for determining a selected ship from a source domain, provided in an embodiment of this application; Figure 6 A flowchart illustrating a method for outputting the fundamental wave prediction component and wave prediction component of a target ship, provided in an embodiment of this application; Figure 7 A flowchart illustrating the initialization process of an adaptive Fourier-neural network hybrid prediction model provided in an embodiment of this application; Figure 8 This is a schematic diagram illustrating a prediction process using an adaptive Fourier-neural network hybrid prediction model, provided as an embodiment of this application. Figure 9 A timing diagram of an online rolling update mechanism for an adaptive Fourier-neural network hybrid prediction model provided in an embodiment of this application.

[0018] Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the contents of this application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] This application provides an environment in which the port ship shore power load forecasting method can be applied. See [link to relevant documentation]. Figure 1 The application environment includes terminals and servers.

[0022] The data storage system stores the data that the server needs to process. This system can be set up independently, integrated into the server, or located in the cloud or on other servers. Furthermore, the data storage system stores relevant data required for executing the port vessel shore power load forecasting method. This includes, for example, a load characteristic knowledge base and relevant data about the target vessels. Of course, the data storage system also stores intermediate data generated during the execution of the port vessel shore power load forecasting method, so that it can be retrieved promptly when needed.

[0023] The terminal communicates with the server via a network. The terminal can send relevant data about the target vessel to be predicted to the server. Upon receiving this data, the server can either store it and retrieve it from storage later, or perform processing tasks while storing the data. The server can then provide feedback on the prediction results to the terminal.

[0024] In addition, in some embodiments, the shore power load prediction method for port vessels can also be implemented by a server or a terminal. For example, the terminal can directly perform shore power load prediction processing for the target vessel, or the server can perform shore power load prediction for the target vessel.

[0025] The terminals can be, but are not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Servers can be implemented using independent servers, server clusters composed of multiple servers, or cloud servers.

[0026] In one exemplary embodiment, see Figure 2 As shown, a method for predicting shore power load for ships in ports is provided. This method is executed by computer equipment, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is applied to... Figure 1 Taking the server in the example, the following steps 101 to 104 are used as an example: Step 101: Obtain the static attribute vector of the target vessel, the port operation plan within the prediction period, and the port environment data within the prediction period. The target vessel is the vessel for which load prediction is to be performed. Since the operational plans and port environment of a vessel are dynamic, if the operational plans and port environment change, the vessel's load needs to be re-predicted. Therefore, the load prediction method of this application is applicable regardless of whether the vessel has a history of operating in this port. That is, the target vessel can be a vessel that has operated in this port before or a vessel that is operating in this port for the first time.

[0027] Among them, the static attribute vector of the target ship At least include the target vessel type (For example, container ships, bulk carriers, tankers, etc., use standard codes), target vessel gross tonnage Rated capacity of the target vessel (e.g., TEU, DWT) and the year of construction of the target vessel .

[0028] Furthermore, the process of obtaining the static attribute vector of the target vessel is as follows: obtain the static attribute data of the target vessel from the port scheduling system or the vessel declaration system, and construct the static attribute vector of the target vessel using the obtained static attribute data. .

[0029] The target vessel's port operation plan includes its planned berthing time. Planned departure time And major operational events (such as loading and unloading operations, ballast water treatment, etc.).

[0030] Furthermore, the precise port operation plan of the target vessel is obtained from the port scheduling system.

[0031] Furthermore, the work events in the work plan are digitally encoded to generate a work event identifier vector corresponding to the predicted time series. For example, each work event is represented by a one-hot encoded vector, such as [0, 0, 1, 0] representing "loading and unloading operation", [0, 1, 0, 0] representing "ballast operation", and [1, 0, 0, 0] representing "no operation (standby)". The prediction period is discretized into time points with predetermined step intervals, such as 15 minutes. Each work event within the prediction period corresponds to a time point, and at this time, the work event corresponding to each time point can be represented by a one-hot encoded vector.

[0032] Furthermore, when the port operation plan of the target vessel is subsequently input into the fluctuation branch of the neural network, the operation event identifier vector will be input in discrete form as part of the port operation plan.

[0033] The environmental data includes ambient temperature and humidity. Furthermore, environmental data can be obtained from port meteorological stations or authorized third-party meteorological service interfaces, providing time-series forecasts of environmental data for the entire forecast period. Additionally, the ambient temperature data is a time-series forecast. Ambient humidity is a time series of ambient humidity. ;right and Perform time resolution alignment to ensure consistency with the time step (e.g., 15 minutes) of the hybrid prediction model mentioned later; if the original data resolution is different, interpolation or resampling is required to achieve time alignment.

[0034] To ensure data scale consistency and prevent certain features from dominating model training due to different units of measurement, environmental data needs to be normalized. Furthermore, the aligned environmental data can be normalized based on long-term historical meteorological statistics of the port to obtain normalized environmental temperature. and normalized ambient humidity .

[0035] A normalization strategy such as Min-Max is adopted. The normalization parameters (maximum and minimum values) should be based on long-term historical statistics from the port's weather station, rather than the values ​​from the current forecast sequence. The normalization formula is as follows: in, , , , This represents the extreme values ​​of long-term historical statistical data for the port. For example, suppose the port's storage device stores historical environmental data records for a predetermined period, such as 30 days, including temperature and humidity at multiple times each day.

[0036] : Represents the maximum value of all temperature values ​​extracted from historical environmental data records over a predetermined period of time; : Represents the minimum value of all temperature values ​​extracted from historical environmental data records over a predetermined period of time; : Represents the maximum value of all humidity values ​​extracted from historical environmental data records over a predetermined period of time; : Represents the minimum humidity value extracted from historical environmental data records for a predetermined duration; According to the normalization formula, and Forecast time within the forecast period The original forecast values ​​for ambient temperature and humidity. Normalized temperature. and humidity The value range is [0,1].

[0037] Step 102: Determine the initial load characteristic prior vector of the target vessel within the prediction period based on the static attribute vector; Step 103: Initialize the adaptive Fourier-neural network hybrid prediction model with the initial load feature prior vector, the port operation plan within the prediction period and the port environment data within the prediction period, so that the hybrid prediction model outputs the fundamental wave prediction component and the wave prediction component of the target ship. The fundamental wave prediction component is used to characterize the periodicity of the target ship's load, while the fluctuation prediction component is used to characterize the non-periodicity of the target ship's load.

[0038] The adaptive Fourier-neural network hybrid prediction model includes a Fourier fundamental branch and a neural network wave branch. Furthermore, the parameters of the Fourier fundamental branch are derived from typical load curves in prior knowledge. The parameters are obtained by Fourier fitting, while the parameters of the neural network fluctuation branch are obtained through pre-training initialization.

[0039] Step 104: Determine the sum of the fundamental wave prediction component and the fluctuation prediction component to obtain the final shore power load prediction value of the target ship within a predetermined period.

[0040] This embodiment provides a method for predicting shore power load of port vessels. It determines the initial load characteristic prior vector of the target vessel based on its static attribute vector; then, it acquires the target vessel's port operation plan and port environmental data within the prediction period; finally, it sends the initial load characteristic prior vector, operation plan, and environmental data to a pre-trained adaptive Fourier-neural network hybrid prediction model to determine the final shore power load prediction value of the target vessel based on the hybrid prediction model. This method can determine the individualized electricity consumption behavior of the target vessel, improving the accuracy of shore power load prediction. It is particularly effective for predicting the shore power load of "cold start" vessels arriving at port for the first time, thus improving the accuracy of shore power load prediction and consequently, the accuracy of port power allocation.

[0041] In addition, this application determines the stable periodic pattern (fundamental wave) in the ship load by using the Fourier fundamental wave branch in the hybrid prediction model, and determines the non-periodic fluctuation (fluctuation) driven by events / environment by using the neural network fluctuation branch in the hybrid prediction model. Thus, the fundamental wave prediction component and the fluctuation prediction component in the target ship are characterized by the most suitable model, which solves the problem of load characteristic decoupling and improves the overall prediction accuracy.

[0042] Optionally, see Figure 3 In another exemplary embodiment of this application, step 102 includes steps 201 to 203: Step 201: Based on the static attribute vector of the target vessel, select K source domain vessels with the highest comprehensive similarity to the target vessel from the preset load feature knowledge base, and denot them as source domain selected vessels. The load feature knowledge base stores the correspondence between the static attribute vector and the load feature vector of each vessel that has berthed in port. Among them, the source domain vessel is any vessel included in the load characteristic knowledge base.

[0043] Among them, the use of source area vessels In other words, further, the set Represented as: } in, An element of the source domain vessel set represents any single vessel within the source domain vessel set. The index number has a value of .

[0044] Furthermore, when the set Once a vessel is selected and becomes a source domain selected vessel, the selected vessel is renumbered. The source domain selected vessels utilize a set... In other words, further, the set Represented as: } in, An element of the source domain vessel set represents any single vessel within the source domain vessel set. The index number has a value of .

[0045] Optionally, see Figure 4 In another exemplary embodiment of this application, the construction process of the load feature knowledge base includes the following steps 2011 and 2012: Step 2011: Obtain the static attribute vector and load feature vector of each vessel historically served by the port; Step 2012: For each ship, the static attribute vector is associated with and stored with the load feature vector to form the load feature knowledge base.

[0046] The implementation process of step 2011 is as follows: Collect static attribute data and dynamic load data of various types of ships that have served the port in the past; the static attribute data includes at least the ship type, gross tonnage, rated capacity and year of construction; the dynamic load data is the time series active power data of the ship during its berthing period.

[0047] Furthermore, the static attribute data of each historical vessel is obtained from the port scheduling system or the vessel declaration system. The obtained static attribute data of the historical vessels is used to construct a static attribute vector S. Accordingly, the static attribute vector S includes at least the vessel type. Gross tonnage Rated capacity and the year of construction .

[0048] The process of collecting dynamic load data from the ship is as follows: for each berthing event, the ship's active power data is collected from the smart meter of the shore power station. This active power data is collected at fixed time intervals. Ship active power data recorded (e.g., every 1 minute or 15 minutes) are used to form a discrete time series: } in, This represents the total number of active power sampling points during this berthing. For the first The active power values ​​(unit: kW) at each sampling point, of which For the sampling point index ( The corresponding timestamp is , This is the timestamp of the first sampling (the initial timestamp when billing begins upon berthing).

[0049] Furthermore, for the collected historical ship berthing time-series active power data... Regarding the above Data cleaning operations, including outlier handling and missing value imputation, are performed to obtain regularized dynamic load data. The regularized dynamic load data is then normalized to obtain normalized dynamic load data. Based on the above Extract the load feature vector for each ship at each berthing, which includes at least: 1) Typical load curve This typical load curve This can be achieved through alignment and averaging operations; 2) Average daily electricity consumption The average daily electricity consumption It can be obtained through integration; 3) Load fluctuation rate The load volatility It can be obtained by calculating the standard deviation; 4) Characteristic daily periodic components It is composed of the daily and semi-daily periodic component amplitudes extracted by fast Fourier transform.

[0050] The process of obtaining the load feature vector can also be found in relevant existing technologies, which will not be described in detail here.

[0051] Outlier handling can be achieved by: identifying and removing outliers using box plots or based on physical constraints (power should not exceed the rated capacity of shore power piles); and filling missing values ​​using linear interpolation or the average of previous and subsequent time points.

[0052] The normalization process can be achieved by normalizing all dynamic load data to the interval [0, 1] to eliminate the influence of dimensions. The normalization formula is as follows: in , ( ,in and These are the maximum and minimum active power values ​​recorded during this berthing of the vessel. The total number of sampling points. For the first The active power values ​​(unit: kW) at each sampling point, of which For the sampling point index ( ).

[0053] Furthermore, the dimensions included in the load feature vector are explained as follows: 1) Typical load curve ( The load curves from multiple berthings are aligned using a dynamic time warping algorithm or based on key operational events (such as the start / end of loading / unloading operations), and then averaged to generate a 24-hour baseline curve representing the ship's typical power consumption pattern. ; 2) Average daily electricity consumption ( ): Through calculation The area under the curve, after inverse normalization, yields the actual daily average electricity consumption, expressed in kWh. The calculation formula is: in The sampling interval is... The summation is the sum of the active power at all sampling points during this berthing period, representing the number of berthing days. 3) Load fluctuation rate ( ):calculate The standard deviation is used to characterize the degree of fluctuation in the ship's load.

[0054] in for The mean, This represents the total number of sampling points during this berthing trip.

[0055] 4) Characteristic daily periodic components ( ):right Perform a Fast Fourier Transform to extract the amplitude of its most important daily periodic (24-hour) component. (That is, the amplitude of the fundamental periodic component over a 24-hour period) ) and half-day period (12-hour) component amplitude (That is, the amplitude of the second harmonic component over 12 hours) ), constituting the characteristic daily periodic component vector This is used to quantify the periodic intensity of its load.

[0056] Among them, the associated storage can be carried out using a relational database or a time-series database.

[0057] Furthermore, the core of the database table structure design is as follows: Ship Static Attribute Table: ( Load characteristic table: ( ); thereby through Link two tables.

[0058] It is a vessel identification code, used to uniquely identify a vessel. It is a record identifier, used to uniquely identify a record. It indicates the duration of berthing, for example, the time difference between departure time and berthing time.

[0059] The above methods are used to construct a structured port vessel load feature knowledge base, which supports fast querying and comprehensive similarity matching based on static attribute vectors.

[0060] Step 202: Obtain the load feature vectors of K selected source domain vessels from the preset load feature knowledge base; Step 203: Fuse the load feature vectors of K selected ships from the source domain to obtain the fused load feature vector, which is denoted as the initial load feature prior vector of the target ship in the prediction period.

[0061] Here, fusion can be weighted fusion. Furthermore, the weighting is related to the overall similarity between the selected ships and the target ships in each source domain. Proportional.

[0062] For any one of the selected ships in the source domain, let this ship be denoted as the first one. The first vessel selected from the source area The load characteristic vector of the selected ship in the source domain is denoted as... , It should contain at least the following load characteristic vectors: typical load curves Average daily electricity consumption Load fluctuation rate and characteristic daily periodic components ; with the first The overall similarity between the selected vessel in the source domain and the target vessel. Using the weights, a weighted average is performed on each load feature vector to generate the initial load feature prior vector of the target vessel. .

[0063] Specifically, the initial load characteristic prior vector Each load feature vector included is obtained by fusing them using the following formula: in, This indicates the first selected ship in the source domain set. For each ship in the formula The value of is from 1 to k. These are the initial load characteristic prior data for a typical load curve; The initial load characteristics prior data for average daily electricity consumption; The initial load characteristic prior data for load volatility; The initial load characteristic prior data are for the characteristic daily periodic components.

[0064] The initial load characteristic prior data of each initial load feature are used to construct the initial load characteristic prior vector of the target ship. : ; Furthermore, it should be noted that existing predictive models use single time-series prediction models, such as ARIMA or single neural networks. These models are trained and predicted using only the ship's own historical load data. Therefore, when a newly arrived ship faces the same "cold start" problem, their ability to capture sudden changes in load caused by discrete operational events (such as loading and unloading) and continuous fluctuations caused by ambient temperature (air conditioning load) is limited, resulting in slow model convergence and large errors in the initial prediction stage. To address this, this application initializes a hybrid prediction model based on transfer learning in step 103. This step is the core innovation of this application in achieving accurate "cold start" prediction. Its purpose is to first identify similar ships when the target ship lacks historical shore power data, and then use the electricity consumption behavior of similar ships as "experience" to quickly build a high-precision initial prediction model for them.

[0065] Optionally, see Figure 5 In another exemplary embodiment of this application, step 201 includes steps 301 and 302: Step 301: Determine the comprehensive similarity between the static attribute vector of each source domain vessel included in the load feature knowledge base and the static attribute vector of the target vessel; Step 302: Select the K ships with the highest comprehensive similarity from the load feature knowledge base to obtain the K source domain selected ships.

[0066] Furthermore, static attributes contain different types of data, such as continuous and discrete data. Additionally, the source domain ship set is... Therefore, step 301 can be: calculate the similarity of the target vessel and each source vessel in the load feature knowledge base on continuous attributes. Similarity on discrete attributes ; will the and The overall similarity is obtained by weighting and summing the results according to preset weights. .

[0067] Furthermore, the static attribute vector of the target ship With the knowledge base Static attribute vector of a source domain vessel The similarity is calculated as follows: 1) Continuous attribute similarity (e.g.) After normalizing each continuous attribute, similarity is calculated using inverse Euclidean distance or a Gaussian kernel function. For example, for total tonnage, similarity is calculated using the following formula: in, This is the scale parameter.

[0068] in, : Represents the static attribute vector of the target ship The Gross Tonnage (GT) attribute value is a real number (e.g., 50,000 tons). For the target vessel to be subjected to load forecasting, as mentioned above, obtaining its static attribute data and known port operation plans includes: obtaining the static attribute vector of the target vessel. Its data dimensions are consistent with the static attribute vector S in the knowledge base, and include at least the ship type. Gross tonnage Rated capacity and the year of construction .

[0069] : indicates the first in the knowledge base Static attribute vector of a source domain vessel The total tonnage attribute value in the data.

[0070] : This represents the algebraic difference (difference) between the two gross tonnage values ​​mentioned above, and can be positive, negative, or zero. For example, if the gross tonnage of the target vessel is 50,000 tons and the gross tonnage of the source vessel is 45,000 tons, then the difference is 5,000 tons.

[0071] The norm represents the absolute value (in the one-dimensional case, the norm is the absolute value). It is the absolute difference (non-negative value).

[0072] This formula calculates a Gaussian kernel function, which outputs a similarity score between 0 and 1 based on the absolute difference in total tonnage. The smaller the absolute difference, the higher the similarity score. The closer to 1, the larger the absolute difference. The closer to 0, the better. (Scale parameter) controls the rate at which similarity decays with the difference. The formula is used to measure the similarity between two ships on the continuous numerical attribute of gross tonnage.

[0073] Furthermore, Euclidean distance or cosine similarity can be used to calculate the similarity between static attribute vectors.

[0074] 2) Discrete attribute similarity (e.g.) ): Use exact matching or similarity based on the ship type hierarchy (e.g., container ships are not similar to bulk carriers, but container ships are similar to refrigerated container ships).

[0075] That is, if ,but ;if ,but A similarity value greater than 0 but less than 1 is used, such as 0.2. The specific value can be set by domain experts based on experience or learned through data-driven methods; otherwise... .

[0076] For ship type, in discrete attribute similarity In the calculation, there exists a situation of "similar but different types." This is to handle the hierarchical structure or fuzzy matching in ship type classification, and is not a simple "perfect match = 1, otherwise = 0." This is because ship types are not completely independent; some types share functional or structural similarities. For example, "container ships" and "refrigerated container ships": both use containers to load cargo, the main difference being that the latter is equipped with refrigeration equipment. For load forecasting, the power consumption patterns of these two types of ships (such as loading and unloading equipment, and domestic power consumption) may be highly similar, and therefore should not be considered completely unrelated. However, "bulk carriers" and "ore carriers": both are bulk cargo transport ships, and their load patterns are also quite similar. On the other hand, "container ships" and "tankers" differ greatly in structure, loading and unloading methods, and power consumption requirements, and should be considered dissimilar.

[0077] "If the types are similar but not identical" can be understood as follows: when two ships do not belong to the same major category (such as container ships and refrigerated container ships), but belong to a major category with similar functions or structures, a similarity value greater than 0 but less than 1 is taken, such as 0.2. The specific value can be set by domain experts based on experience, or learned through data-driven methods.

[0078] 3) Overall similarity The weighted sum of the similarity scores for each discrete attribute and the similarity scores for the continuous attributes: in, to The weights, pre-defined based on domain knowledge or data-driven methods, can be empirical values, and .

[0079] Further, step 302 includes: setting a similarity threshold, and only when the similarity between the source domain vessel and the target vessel is higher than the threshold, the vessel is included in the candidate set; selecting the top K vessels with the highest similarity from the candidate set as the selected vessels in the source domain.

[0080] Specifically: First, set a similarity threshold. (e.g., 0.7) and maximum number of neighbors (e.g., 10), Set an upper limit for the number of ships selected in the source domain; then, filter out the overall similarity. Greater than The source region vessels are denoted as source region screening vessels, and the number of source region screening vessels is denoted as [missing information]. From the ships screened in the source domain, select the top K ships with the highest comprehensive similarity to form the set of ships selected in the source domain.

[0081] Among them, the maximum number of nearest neighbors It is a pre-defined positive integer used to limit the upper limit of the number of ships selected from the final source domain. In a typical implementation, The value is set to 10. This value can be adjusted based on the size of the knowledge base or through cross-validation, aiming to strike a balance between computational efficiency and model accuracy. Its purpose is to limit the number of source domain ships ultimately used for transfer learning, avoiding two potential problems: 1) Excessive computational burden: Too many ships participating in weighted fusion increase computational load, and ships with low similarity may introduce noise. 2) Over-averaging: If too many ships are selected, the weighted average of their load feature vectors may become "mediocre," failing to reflect the electricity consumption patterns most similar to the target ships.

[0082] In fact, its calculation logic is K taking , that is, take The smaller value in the range.

[0083] Optionally, see Figure 6 In another exemplary embodiment of this application, the adaptive Fourier-neural network hybrid prediction model includes a Fourier fundamental branch and a neural network wave branch; the hybrid prediction model in step 103 outputs the fundamental wave prediction component and wave prediction component of the target ship through the following steps 401-402: Step 401: The Fourier fundamental branch receives the initial load characteristic prior vector, determines the fundamental prediction component based on the initial load characteristic prior vector, and outputs it. Step 402: The neural network fluctuation branch receives the port operation plan and port environment data within the prediction period, and calculates and outputs the fluctuation prediction component based on the port operation plan and the port environment data.

[0084] Optionally, see Figure 7 The adaptive Fourier-neural network hybrid prediction model needs to be trained before use. The training process is as follows: First, select the top K source domain vessels with the highest comprehensive similarity to the target vessel from the source domain vessel set, and denote them as source domain selected vessels; determine prior knowledge, such as the initial load feature prior vector, through the source domain selected vessels; Then, the typical load curves in the prior knowledge Fourier series fitting is performed to solve for the parameters of the Fourier fundamental branch. These parameters are denoted as Fourier prior coefficients. The typical load curve in this application can be a typical daily load curve. The Fourier fundamental branch is then initialized using the Fourier prior coefficients. This Fourier fundamental branch is denoted as the basic Fourier fundamental branch, and is expressed by the following formula: in, Fourier prior coefficients This is the output of the Fourier fundamental branch at this time, which is also the fundamental prediction component.

[0085] Furthermore, initialize the parameters of the neural network fluctuation branch: use the historical load data, operation plan and environmental data of the selected ship in the source domain to pre-train the neural network fluctuation branch, and use the pre-trained network weights as the initial weights of the branch; use the initial weights to initialize the neural network fluctuation branch.

[0086] The neural network fluctuation branch during training is used to calculate the fluctuation prediction component. .

[0087] Secondly, the initial load feature prior vector determined during training, the work plan within the prediction period, and the humidity data will be used. Humidity data The initialized model parameters are sent to the initialized hybrid prediction model to run the hybrid prediction model; the output of the hybrid prediction model after running is... and .

[0088] Finally, I ask and The sum of, to obtain , This represents the predicted load power of the target vessel during the prediction period in the training process.

[0089] Furthermore, the wave branch of the neural network can adopt a feedforward neural network or a long short-term memory network structure.

[0090] Furthermore, the weight parameters of the wave branch of this neural network cannot be directly obtained from prior knowledge, requiring an indirect initialization strategy: using a parameter most similar to the target ship (i.e., ... Historical load data of the highest-ranking vessel from a single source domain, along with its corresponding operational plans and port environment data, are used to pre-train the fluctuation branch of the neural network. The pre-trained network weights are then used as the initial weights for this fluctuation branch. If the data for the most similar vessel is insufficient or the pre-training effect is below a preset threshold, the selected vessel from the source domain for the training process is determined. And use the data from all ships in the set for pre-training.

[0091] Furthermore, in this application, the Fourier prior coefficients of the fundamental Fourier branch can be updated. Updating the Fourier prior coefficients is achieved by solving the least-squares solution of the fundamental Fourier branch, resulting in the initial Fourier fundamental branch. in, for The fundamental wave prediction component at time t represents the stable, repeatable periodic portion of the target ship load. For the Fourier coefficients initialized through transfer learning and adjustable via online updates, The fundamental angular frequency corresponds to the dominant period expected to exist in ship load changes. This refers to the harmonic order preset in the Fourier formula. Furthermore, in the scenario of port shore power load forecasting, the electricity consumption behavior of ships typically exhibits a significant regularity with a 24-hour (calendar day) cycle, stemming from the daily cycle of port operations, crew rest, and ambient temperature. Based on the relationship between angular frequency and period: formula and In Indicates the first The angular frequency of the subharmonic.

[0092] in, It is preset, a constant based on a fixed period, and is not an adjustable parameter. The dominant cycle is determined by the ship load. In the context of port shore power, this dominant cycle is 24 hours (one calendar day). This cycle can be expressed mathematically. (24 hours) converted to angular frequency The unit is radians per hour.

[0093] Optionally, see Figure 8 This illustrates the prediction process of the adaptive Fourier-neural network hybrid prediction model.

[0094] During use, the input to the Fourier fundamental branch is the time series of the initial load feature prior vector. The output is .

[0095] Furthermore, in this application, for the neural network fluctuation branch: input vector Includes: berthing time, departure time, and pre-processed job event identifier vectors. Normalized ambient temperature and normalized ambient humidity These inputs together constitute the input vector of this branch. Processing: This branch uses the initialized neural network weights to process the input vector. Perform forward propagation calculations; output wave prediction components. This represents the fluctuation component that deviates from the fundamental frequency, caused by discrete operational events and continuous environmental changes.

[0096] Furthermore, the predicted value is synthesized by adding the outputs of the two branches to obtain the target ship's value at time [time value missing]. Final normalized load power forecast: Subsequently, an inverse normalization operation is performed to obtain a prediction of the actual load power value: in, and It is based on prior knowledge The estimated maximum and minimum power of the vessel during this berthing.

[0097] Furthermore, the online operation and updating of the adaptive Fourier-neural network hybrid prediction model are explained as follows: This step is the execution and self-improvement stage of the entire prediction method, reflecting the "adaptive" characteristic of the model. This step describes how the initialized hybrid prediction model makes predictions and uses real-time data for online learning and adjustment to continuously improve prediction accuracy. The joint online parameter update method unifies the traditional time series model (Fourier) and the modern neural network model at the parameter update level, which is key to achieving rapid adaptation and learning.

[0098] This application enables the predictive model to learn and adjust itself quickly online using real-time data during actual ship power consumption, adapting to the ship's unique and potentially slowly changing power consumption habits, thus solving the problem of model adaptation.

[0099] Further, see Figure 9 After the target vessel connects to shore power, the system enters the online update phase: After the target vessel connects to shore power, its actual load data is collected in real time, compared with the predicted value, and the prediction error is obtained. Based on the prediction error, the parameters of the hybrid prediction model are updated online using a recursive least squares algorithm. Further, specifically, this is implemented by: adjusting the coefficients of the Fourier fundamental branch... Together with the connection weights of the fluctuating branches of the neural network, they form the parameter vector to be updated. The error between the real-time collected actual load data and the model predictions is used as the driving force to calculate the parameter vector through a recursive least squares algorithm. Increment and perform the update: .

[0100] Data acquisition and error calculation: at each sampling time The actual active power of the ship is collected in real time from the shore power smart meter. Calculate the prediction error at this moment: in, For the actual load power value at Predicting the timing.

[0101] Parameter vector construction: Constructing all adjustable parameters of the Fourier fundamental branch ( The adjustable weights of the neural network's fluctuation branch are concatenated to form a unified parameter vector. ; Recursive Least Squares Update: A recursive least squares algorithm with a forgetting factor is used to update the parameter vector. Perform online updates. Specifically: 1) Construct the corresponding time Definition of regression vector It contains the basis functions of the Fourier fundamental branch ( )exist The value at time, and the fluctuation branch of the neural network at The activation output at time step (i.e., the neural network activation gradient, with respect to the input) (gradient) 2) Use a forgetting factor The update steps of the Recursive Least Squares (RLS) algorithm are as follows: Calculate the gain matrix: Update parameter vector: Update the covariance matrix: in, It is the forgetting factor, and its value range can be... It is usually advisable This is used to assign higher weights to new data, enabling the model to track slow changes in load characteristics. It is the error covariance matrix, initially set to a large diagonal matrix.

[0102] Through this online update mechanism, the model can adaptively learn the unique electrical behavior of the target ship, and can quickly converge to a high-precision state even if the initial prediction is biased.

[0103] Furthermore, the core value of this application lies in providing a method for predicting port ship shore power load. This method, based on transfer learning and multi-source data fusion, is an innovative technical system combining a knowledge base, transfer learning, a hybrid prediction model, and online updates. It successfully addresses several pain points in port shore power load prediction, laying a solid technical foundation for the intelligent, refined, and green operation of port shore power systems. It possesses outstanding substantive features and significant technological advancements, offering the following advantages and beneficial effects: (i) It fundamentally solves the problem of "cold start" prediction: Through transfer learning, the system is able to provide high-precision initial load prediction for ships arriving at port for the first time or those with scarce data, which greatly expands the applicable boundaries of the intelligent prediction system and achieves a breakthrough from "nothing" to "something" and "accurate".

[0104] (II) Significantly improved overall accuracy of load forecasting: 1) Integration of mechanism and data-driven approaches: The Fourier fundamental branch captures periodic fundamental waves from a physical mechanism perspective, while the neural network wave branch learns from event and environmental fluctuations from a data-driven perspective. The two complement each other, resulting in a more reasonable model structure. 2) Multi-source information fusion: Innovatively, multi-source information such as ship static attributes, operational plans, and environmental data are integrated into the forecasting model, providing a more comprehensive characterization of factors. 3) Practice has proven that compared to a single model, this hybrid forecasting model can reduce forecasting errors (such as root mean square error RMSE) by 20% to 35%.

[0105] (III) It has strong online adaptive and learning capabilities: The unified RLS online update mechanism enables the model to quickly "recognize" and "remember" the unique power consumption habits of the current ship after power-on. Even if the initial prediction is biased, it can quickly converge to a high-precision state within a few hours, showing strong robustness and practicality.

[0106] (iv) Provides a high-quality data foundation for downstream systems: The high-precision and forward-looking load forecast data produced by this application is the fundamental guarantee for efficient and economical operation of subsequent optimized scheduling and intelligent management. It enables ports to: 1) Plan ahead: Provide a reliable basis for shore power capacity allocation and energy storage scheduling, smooth grid load, and improve equipment utilization. 2) Reduce costs: Guide ships to charge during periods of abundant green electricity or low electricity prices, effectively reducing the electricity cost per ship and the port's total electricity purchase cost. 3) Contribute to zero carbon: Provide key load-side forecast information for maximizing the local consumption of renewable energy, directly supporting the construction of green ports.

[0107] This application clearly outlines the complete prediction process from knowledge base construction to target data acquisition, model initialization, and model operation and updating, with each step interconnected. Transfer learning is employed for cold-starting the system, and the model is initialized through knowledge base construction, similarity calculation, and weighted fusion, effectively solving the prediction challenge for new ships. The hybrid prediction model clearly distinguishes the responsibilities of the Fourier fundamental branch and the neural network wave branch, demonstrating their collaborative work and online update mechanism.

[0108] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram can be found in [reference needed]. Figure 10 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores relevant data for a port vessel shore power load forecasting method. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, a port vessel shore power load forecasting method can be implemented.

[0109] Those skilled in the art will understand, see Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0110] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0111] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0112] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0113] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data that have been agreed to by the user or have been fully agreed to by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0114] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. In the embodiments provided in this application, any reference to memory, database, or other media can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0115] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units, etc., and are not limited to these.

[0116] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0117] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for predicting shore power load of ships in ports, characterized in that, include: The static attribute vector of the target vessel, the port operation plan within the prediction period, and the port environment data within the prediction period are obtained. The target vessel is the vessel for which load prediction is to be performed. The initial load characteristic prior vector of the target vessel within the prediction period is determined based on the static attribute vector. The adaptive Fourier-neural network hybrid prediction model is initialized using the initial load feature prior vector, the port operation plan within the prediction period, and the port environment data within the prediction period, so that the hybrid prediction model outputs the fundamental wave prediction component and the wave prediction component of the target ship. The sum of the fundamental wave prediction component and the wave prediction component is determined to obtain the final shore power load prediction value of the target ship within a predetermined period; The step of determining the initial load characteristic prior vector of the target vessel within the prediction period based on the static attribute vector includes: Based on the static attribute vector of the target vessel, K source domain vessels with the highest comprehensive similarity to the target vessel are selected from the preset load feature knowledge base and denoted as source domain selected vessels. The load feature knowledge base stores the correspondence between the static attribute vector and the load feature vector of each vessel that has berthed in port. Obtain the load feature vectors of K selected ships from the source domain from the preset load feature knowledge base; The load feature vectors of K selected ships from the source domain are fused to obtain the fused load feature vector, which is denoted as the initial load feature prior vector of the target ship in the prediction period. Specifically, based on the static attribute vector of the target vessel, K source domain vessels with the highest comprehensive similarity to the target vessel are selected from a preset load feature knowledge base, denoted as the selected source domain vessels, including: Determine the comprehensive similarity between the static attribute vector of each source domain vessel included in the load feature knowledge base and the static attribute vector of the target vessel; The K ships with the highest comprehensive similarity are selected from the load feature knowledge base to obtain the K source domain selected ships; The adaptive Fourier-neural network hybrid prediction model includes a Fourier fundamental branch and a neural network wave branch; the hybrid prediction model outputs the fundamental wave prediction component and wave prediction component of the target ship through the following method: The Fourier fundamental branch receives the initial load feature prior vector, determines the fundamental prediction component based on the initial load feature prior vector, and outputs it. The neural network fluctuation branch receives the port operation plan and port environment data within the prediction period, and calculates and outputs the fluctuation prediction component based on the port operation plan and the port environment data.

2. The port ship shore power load forecasting method according to claim 1, characterized in that, The construction process of the load feature knowledge base includes: Obtain the static attribute vector and load feature vector of each vessel historically served by the port; For each vessel, the static attribute vector is associated with and stored with the load feature vector to form the load feature knowledge base.

3. The port ship shore power load forecasting method according to claim 1, characterized in that, The static attribute vector of the target ship At least include the target vessel type Target vessel gross tonnage Rated capacity of the target vessel and the year of construction of the target ship .

4. The port ship shore power load forecasting method according to claim 1, characterized in that, The load characteristic vector includes: typical load curve, average daily electricity consumption, load fluctuation rate, and characteristic daily periodic component.

5. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the port ship shore power load forecasting method according to any one of claims 1-4.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the port ship shore power load prediction method according to any one of claims 1-4.

7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the port ship shore power load prediction method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Electric propulsion ship load prediction method and system based on combined neural network

    CN115860176A

  • Shore power load prediction method and system based on self-attention mechanism

    CN121119503A