Wavelet transform-based ship oil consumption abnormal message data detection method and system
Patent Information
- Application Number
- CN202610965348.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-10-13
AI Technical Summary
[0006]为解决现有技术中存在的船舶油耗报文数据精确度低,数据一致性差、错误率较高以及异常数据筛选主观性强等问题,本发明提供了一种基于小波变换的船舶油耗异常报文数据检测方法,该方法适用于复杂航行环境、数据量庞大的应用场景,具有鲁棒性强、检测准确性高、算法运行开销小等特点,能够在各种航行条件下准确筛选出船舶油耗报文的异常数据,为船舶能效管理和成本控制提供可靠的数据基础
[0039]本发明提供的一种基于小波变换的船舶油耗异常报文数据检测方法,先获取船舶按时间顺序排序的原始油耗报文数据,并执行时间对齐、重复数据剔除及缺失值线性插值处理,生成连续且严格等时间间隔的原始油耗时间序列,通过将非均匀采样、存在断点及冗余的原始MRV报表油耗数据转化为标准化的离散时间序列,消除了因人工填报频率不一致或通信丢失导致的数据时序混乱。时间对齐确保了后续小波变换与滤波算法所需的等间隔采样约束得到满足,避免了因采样率波动引发的频谱混叠误差;缺失值的线性插值填补了数据空洞,保证了时间序列的数学连续性,防止信号处理算法在断点处产生虚假的高频震荡(吉布斯现象);重复数据的剔除则消除了统计权重的偏差。为后续所有基于时频域分析的检测环节提供了高质量、结构统一的输入基础,从根本上保障了整个检测系统的数值稳定性与计算收敛性。
Smart Images

Figure CN122908933A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ship operation management technology, specifically to a method and system for detecting abnormal ship fuel consumption messages based on wavelet transform. Background Technology
[0002] Detection of abnormal ship fuel consumption reports is fundamental to green, low-carbon shipping and cost control for shipping companies. The shipping industry plays a vital role in the global economy, accounting for approximately 80% of international trade. It not only connects national markets but also drives globalization, promoting economic growth and employment. Furthermore, shipping is a crucial route for transporting bulk commodities such as oil, coal, and food.
[0003] However, the shipping industry also faces environmental challenges, particularly greenhouse gas emissions and pollution. According to the International Maritime Organization (IMO), the shipping industry accounts for approximately 2-3% of global greenhouse gas emissions. To promote energy conservation and emission reduction in the shipping sector, the IMO, the European Union, and national maritime authorities have successively introduced a series of policies, imposing higher requirements on the monitoring and management of ship fuel consumption. Transparency and data-driven approaches to ship energy efficiency management are reflected in the MRV (Monitoring, Reporting, Verification) system, which requires accurate and reliable data recording to monitor ship fuel consumption and emissions. However, ship fuel consumption reports are manually entered and collected, inevitably leading to potential problems such as poor data consistency, high error rates, and strong subjectivity. This poses challenges to the accuracy and reliability of MRV data, particularly in detecting abnormal ship fuel consumption reports.
[0004] Currently, the processing of such data mainly relies on traditional data cleaning methods. However, these methods are often ineffective when dealing with artificially processed time series data with potential biases. For example, the Z-score method typically assumes a static distribution of data, which may misinterpret normal trend changes as anomalies; the IQR (interquartile range) method is sensitive to extreme outliers, but struggles to detect small anomalies and is unsuitable for real-time data; mean / mode / median padding not only significantly impacts data accuracy but also disrupts the continuity and trend of the time series. To address these technical challenges, advanced signal processing methods such as wavelet transform have emerged in the data processing field in recent years. Wavelet transform, with its multi-resolution analysis capabilities in the time and frequency domains, is particularly suitable for capturing potentially hidden anomalies and noteworthy patterns in MRV data. This provides a new approach to improving the data quality of MRV messages.
[0005] Therefore, there is an urgent need to provide a method for detecting and cleaning MRV message fuel consumption data using wavelet transform. By applying wavelet transform, outliers and potential errors in the data can be identified, thereby improving the accuracy and usability of the data. Summary of the Invention
[0006] To address the problems of low accuracy, poor data consistency, high error rate, and strong subjectivity in anomaly detection in existing ship fuel consumption reports, this invention provides a wavelet transform-based method for detecting anomaly ship fuel consumption reports. This method is applicable to complex navigation environments and applications with large data volumes, and features strong robustness, high detection accuracy, and low algorithm overhead. It can accurately filter out anomaly data in ship fuel consumption reports under various navigation conditions, providing a reliable data foundation for ship energy efficiency management and cost control. This invention also relates to a wavelet transform-based system for detecting anomaly ship fuel consumption reports.
[0007] The technical solution of the present invention is as follows:
[0008] A method for detecting abnormal ship fuel consumption messages based on wavelet transform, characterized by the following steps:
[0009] Data acquisition and preprocessing steps: Obtain raw fuel consumption data of ships sorted in chronological order, and perform time alignment, duplicate data removal and missing value interpolation on the raw fuel consumption data to generate a continuous and equally timed raw fuel consumption time series.
[0010] Single-point mutation anomaly detection steps: Using the Daubechies 4 wavelet as the mother wavelet, the original fuel consumption time series is decomposed into five layers of wavelet decomposition to obtain a set of fifth-layer approximation coefficients, as well as first-layer detail coefficients, second-layer detail coefficients, third-layer detail coefficients, fourth-layer detail coefficients, and fifth-layer detail coefficients; then, the first-layer detail coefficients, second-layer detail coefficients, third-layer detail coefficients, and fourth-layer detail coefficients are set to zero, while the fifth-layer approximation coefficients and fifth-layer detail coefficients are retained. An inverse wavelet transform is performed on the retained fifth-layer approximation coefficients and fifth-layer detail coefficients to reconstruct a smoothed fuel consumption time series with the same length as the original fuel consumption time series; the difference between each data point in the original fuel consumption time series and the smoothed fuel consumption time series is calculated point by point to generate a residual sequence; the standard deviation of the residual sequence is calculated, and a first anomaly threshold is set based on the standard deviation. Data points in the residual sequence whose absolute value is greater than the first anomaly threshold and whose absolute value of the difference between the residual sequence and the mean of the original fuel consumption time series is greater than the standard deviation are marked as single-point mutation anomaly points.
[0011] The time-series symmetric expansion step is as follows: the original fuel consumption time series is subjected to mirror symmetric expansion processing to generate an expanded fuel consumption time series;
[0012] The continuous wavelet multi-scale concentrated anomaly detection steps are as follows: Using the Mexican Hat wavelet as the mother wavelet, a continuous wavelet transform is performed on the extended fuel consumption time series to obtain a multi-scale wavelet coefficient matrix; from the multi-scale wavelet coefficient matrix, a time period corresponding to the original fuel consumption time series is extracted, and the maximum absolute value of the wavelet coefficients at all scales is calculated for each time point within that time period to obtain the maximum coefficient sequence; the percentile statistic of the maximum coefficient sequence is calculated, and a second anomaly threshold is set based on the percentile statistic; data points in the maximum coefficient sequence whose values are greater than the second anomaly threshold are marked as multi-scale concentrated anomaly points;
[0013] High-pass filtering high-frequency fluctuation anomaly detection steps: A high-pass filter is constructed based on a first-order Butterworth filter, and a zero-phase filtering method is used to perform bidirectional filtering on the extended fuel consumption time series to extract the high-frequency component sequence; the mean and standard deviation of the high-frequency component sequence are calculated, and the Z-score value of each data point is calculated based on the high-frequency component sequence and its mean and standard deviation to generate a Z-score sequence; data points in the Z-score sequence whose absolute value is greater than a preset third anomaly threshold are marked as high-frequency fluctuation anomaly points;
[0014] Abnormal data integration and output steps: The single-point mutation anomalies, multi-scale concentrated anomalies, and high-frequency fluctuation anomalies are integrated and processed in chronological order to generate and output the final ship fuel consumption anomaly report data detection results.
[0015] Preferably, in the single-point mutation anomaly detection step, after performing inverse wavelet transform, a slice alignment operation is also performed: the first N data points of the smoothed fuel consumption time series are extracted as the final smoothed fuel consumption time series, where N is the total number of data points of the original fuel consumption time series, to ensure that the final smoothed fuel consumption time series corresponds one-to-one with the original fuel consumption time series on the time axis.
[0016] Preferably, in the time-series symmetric expansion step, the original fuel consumption time series is subjected to mirror symmetric expansion processing to generate an expanded fuel consumption time series, as shown in the following formula:
[0017]
[0018] in, To extend the fuel consumption time series, This is the original fuel consumption time series, representing the data at time points. Fuel consumption value at the location; The first data segment is obtained by mirroring the original fuel consumption time series forward with the starting time point as the axis of symmetry. The second data segment is obtained by mirroring the original fuel consumption time series backward with the end time point as the axis of symmetry. (·) is the concatenation function.
[0019] Preferably, in the high-pass filtering high-frequency fluctuation anomaly detection step, the Z-score value of each data point is calculated based on the high-frequency component sequence and its mean and standard deviation, according to the following formula:
[0020] ,
[0021] in, It is a high-frequency component sequence. This represents the mean of the high-frequency component sequence. denoted as the standard deviation of the high-frequency component sequence.
[0022] Preferably, in the data acquisition and preprocessing step, the missing value interpolation process uses linear interpolation or forward filling to ensure the continuity of the original fuel consumption time series.
[0023] A system for detecting abnormal ship fuel consumption messages based on wavelet transform is characterized by comprising a data acquisition and preprocessing module, a single-point abrupt change anomaly detection module, a temporal symmetry extension module, a continuous wavelet multi-scale centralized anomaly detection module, a high-pass filter high-frequency fluctuation anomaly detection module, and an anomaly data integration and output module. The data acquisition and preprocessing module is connected to the single-point abrupt change anomaly detection module and the temporal symmetry extension module, respectively. The temporal symmetry extension module is connected to the continuous wavelet multi-scale centralized anomaly detection module and the high-pass filter high-frequency fluctuation anomaly detection module, respectively. The single-point abrupt change anomaly detection module, the continuous wavelet multi-scale centralized anomaly detection module, and the high-pass filter high-frequency fluctuation anomaly detection module are all connected to the anomaly data integration and output module.
[0024] The data acquisition and preprocessing module acquires the raw fuel consumption report data of the ship in chronological order, and performs time alignment, duplicate data removal and missing value interpolation on the raw fuel consumption report data to generate a continuous and equally timed raw fuel consumption time series.
[0025] The single-point mutation anomaly detection module uses the Daubechies 4 wavelet as the mother wavelet to perform a five-level wavelet decomposition on the original fuel consumption time series, obtaining a set of fifth-level approximation coefficients, as well as first-level detail coefficients, second-level detail coefficients, third-level detail coefficients, fourth-level detail coefficients, and fifth-level detail coefficients. Then, the first-level detail coefficients, second-level detail coefficients, third-level detail coefficients, and fourth-level detail coefficients are set to zero, while the fifth-level approximation coefficients and fifth-level detail coefficients are retained. An inverse wavelet transform is performed on the retained fifth-level approximation coefficients and fifth-level detail coefficients to reconstruct a smoothed fuel consumption time series with the same length as the original fuel consumption time series. The difference between each data point in the original fuel consumption time series and the smoothed fuel consumption time series is calculated point by point to generate a residual sequence. The standard deviation of the residual sequence is calculated, and a first anomaly threshold is set based on the standard deviation. Data points in the residual sequence whose absolute value is greater than the first anomaly threshold and whose absolute value of the difference between the residual sequence and the mean of the original fuel consumption time series is greater than the standard deviation are marked as single-point mutation anomaly points.
[0026] The time-series symmetric expansion module performs mirror symmetric expansion processing on the original fuel consumption time series to generate an expanded fuel consumption time series.
[0027] The continuous wavelet multi-scale concentrated anomaly detection module uses the Mexican Hat wavelet as the mother wavelet to perform continuous wavelet transform on the extended fuel consumption time series to obtain a multi-scale wavelet coefficient matrix. From the multi-scale wavelet coefficient matrix, a time period corresponding to the original fuel consumption time series is extracted, and the maximum absolute value of the wavelet coefficients at all scales is calculated for each time point within that time period to obtain the maximum coefficient sequence. The percentile statistic of the maximum coefficient sequence is calculated, and a second anomaly threshold is set based on the percentile statistic. Data points in the maximum coefficient sequence with values greater than the second anomaly threshold are marked as multi-scale concentrated anomalies.
[0028] The high-pass filter high-frequency fluctuation anomaly detection module constructs a high-pass filter based on a first-order Butterworth filter and employs a zero-phase filtering method to perform bidirectional filtering on the extended fuel consumption time series, extracting the high-frequency component sequence; it calculates the mean and standard deviation of the high-frequency component sequence, and calculates the Z-score value of each data point based on the high-frequency component sequence and its mean and standard deviation, generating a Z-score sequence; data points in the Z-score sequence whose absolute value is greater than a preset third anomaly threshold are marked as high-frequency fluctuation anomaly points;
[0029] The abnormal data integration and output module integrates the single-point mutation anomalies, multi-scale concentrated anomalies, and high-frequency fluctuation anomalies in chronological order to generate and output the final ship fuel consumption anomaly report data detection results.
[0030] Preferably, in the single-point mutation anomaly detection module, after performing inverse wavelet transform, a slice alignment operation is also performed: the first N data points of the smoothed fuel consumption time series are extracted as the final smoothed fuel consumption time series, where N is the total number of data points of the original fuel consumption time series, to ensure that the final smoothed fuel consumption time series corresponds one-to-one with the original fuel consumption time series on the time axis.
[0031] Preferably, in the time-series symmetric expansion module, the original fuel consumption time series is subjected to mirror symmetric expansion processing to generate an expanded fuel consumption time series, as shown in the following formula:
[0032]
[0033] in, To extend the fuel consumption time series, This is the original fuel consumption time series, representing the data at time points. Fuel consumption value at the location; The first data segment is obtained by mirroring the original fuel consumption time series forward with the starting time point as the axis of symmetry. The second data segment is obtained by mirroring the original fuel consumption time series backward with the end time point as the axis of symmetry. (·) is the concatenation function.
[0034] Preferably, in the high-pass filter high-frequency fluctuation anomaly detection module, the Z-score value of each data point is calculated based on the high-frequency component sequence and its mean and standard deviation, according to the following formula:
[0035] ,
[0036] in, It is a high-frequency component sequence. This represents the mean of the high-frequency component sequence. denoted as the standard deviation of the high-frequency component sequence.
[0037] Preferably, in the data acquisition and preprocessing module, the missing value interpolation process adopts linear interpolation or forward filling method to ensure the continuity of the original fuel consumption time series.
[0038] The beneficial effects of this invention are as follows:
[0039] This invention provides a method for detecting abnormal ship fuel consumption reports based on wavelet transform. First, it acquires the original fuel consumption report data ordered chronologically by the ship. Then, it performs time alignment, duplicate data removal, and linear interpolation of missing values to generate a continuous and strictly equal-interval original fuel consumption time series. By transforming the non-uniformly sampled, discontinuous, and redundant original MRV report fuel consumption data into a standardized discrete time series, it eliminates data timing disorder caused by inconsistent manual reporting frequencies or communication loss. Time alignment ensures that the equal-interval sampling constraints required by subsequent wavelet transform and filtering algorithms are met, avoiding spectral aliasing errors caused by sampling rate fluctuations. Linear interpolation of missing values fills data gaps, ensuring the mathematical continuity of the time series and preventing false high-frequency oscillations (Gibbs phenomenon) generated by signal processing algorithms at discontinuities. Duplicate data removal eliminates statistical weight bias. This provides a high-quality, structurally unified input foundation for all subsequent detection steps based on time-frequency domain analysis, fundamentally guaranteeing the numerical stability and computational convergence of the entire detection system.
[0040] Then, using the Daubechies 4 wavelet as the mother wavelet, the original fuel consumption time series was decomposed into five levels of wavelet coefficients. An innovative strategy was employed: "zeroing the first to fourth level detail coefficients and retaining only the fifth level approximation coefficients and the fifth level detail coefficients" for inverse wavelet transform reconstruction. The Daubechies 4 wavelet transform algorithm can accurately filter out single-point anomalous abrupt changes that differ significantly from the overall smooth trend, solving the problem of traditional methods being insensitive to isolated outliers. Through this specific frequency band filtering mechanism, high-frequency noise (the first four levels of detail) caused by measurement errors and random jitter is effectively filtered out, while avoiding the "over-smoothing" problem caused by discarding all high-frequency information in traditional full-band denoising methods. Retaining the fifth level detail coefficients can fully capture the short-term fluctuation characteristics and trend edges under normal ship operating conditions, preventing normal speed adjustments or sea state changes from being misjudged as anomalies. The reconstructed smoothed fuel consumption time series, while removing noise interference, retains the physical authenticity of the data to the greatest extent, enabling subsequent residual-based anomaly detection to accurately distinguish between "normal fluctuations" and "real anomalies," significantly reducing the false alarm rate caused by signal distortion. At the same time, it ensures strict alignment between the smoothed signal and the original signal on the time axis, laying an accurate foundation for point-by-point residual calculation.
[0041] The residuals of the original and smoothed sequences are then calculated, and a dual judgment logic is introduced: "the absolute value of the residual is greater than the dynamic threshold" and "the difference between the original value and the mean is greater than the standard deviation" to mark single-point abrupt changes. By constructing a dynamic threshold (the first anomaly threshold) using residuals and standard deviations, the detection method can adapt to changes in data fluctuation amplitude under different ships and navigation conditions, overcoming the poor generalization ability of fixed thresholds. More importantly, the introduction of "the difference between the original value and the mean" as a secondary confirmation condition effectively eliminates "false anomalies" that, although the local residuals are large (possibly due to smoothing lag), the overall values are still within the normal statistical distribution range. This dual verification mechanism significantly improves the detection precision for isolated abrupt changes (such as manual reporting errors or sudden spikes), solving the technical problem that traditional single-threshold methods are easily affected by normal trend changes, resulting in a large number of false alarms.
[0042] Furthermore, the data undergoes mirror-symmetric expansion processing, and continuous wavelet transform (CWT) is performed using Mexican Hat wavelets. The maximum absolute value of wavelet coefficients at all scales is extracted for each time point, and a threshold is set based on percentile statistics. Mirror-symmetric expansion effectively suppresses the boundary effect (Gibbs phenomenon) generated by wavelet transform at the signal start and end points, eliminating false alarms from the beginning and end of the data. The extremely high sensitivity of Mexican Hat wavelets to signal peaks, troughs, and continuous changes allows them to prioritize the identification of concentrated abnormal data and anomalous data with large abrupt changes, accurately capturing continuous high / low or gradual anomalies in ship fuel consumption over multiple days, thus compensating for the insufficient ability of single-point detection methods to identify continuous anomalies. By extracting the maximum absolute value of coefficients across all scales, multi-scale feature fusion is achieved, ensuring that the maximum energy response is obtained at the optimal scale regardless of whether the anomaly manifests as a wide or narrow pulse, thereby avoiding missed detections. Combined with percentile statistics to automatically lock extreme data, this method can adapt to different data distributions without manual intervention, achieving full coverage and high robustness in detecting continuous anomaly patterns.
[0043] Furthermore, a high-pass filter was constructed based on a first-order Butterworth filter, and zero-phase bidirectional filtering technology was used to extract high-frequency components. Z-score sequences were then calculated for anomaly detection. The first-order Butterworth filter has the flattest passband response, enabling smooth and accurate separation of high-frequency random noise components in the signal and identification of high-frequency fluctuation anomalies. It is specifically designed to capture high-frequency jitter anomalies that the first two methods might miss. The zero-phase bidirectional filtering technology completely eliminates the phase delay introduced by traditional causal filtering, ensuring that the extracted high-frequency anomaly points correspond strictly to the original data in terms of timestamps. This achieves millisecond-level precise location of the anomaly, facilitating subsequent source tracing.
[0044] Finally, the union of the detection results from the three categories targeting different anomaly patterns is combined in chronological order to output the final detection result. This union strategy achieves complementary advantages and comprehensive coverage of the three detection mechanisms: the Daubechies 4 wavelet transform algorithm can easily detect single-point anomalous changes, while the Mexican Hat wavelet transform algorithm prioritizes judging concentrated anomalous data and anomalous data with large anomalous amplitudes. The two complement each other, supplemented by a high-pass filter, to accurately and comprehensively capture anomalous data. This multi-perspective fusion architecture overcomes the limitations of a single algorithm in simultaneously handling complex and varied anomaly patterns, constructing a comprehensive anomaly detection and defense system. It minimizes the false negatives (High Recall) of various potential anomalies while maintaining a high overall accuracy, significantly improving the cleaning quality and reliability of MRV message data, and providing solid and reliable data support for shipping companies' cost control and regulatory compliance verification.
[0045] The core of this invention lies in constructing a three-dimensional detection system that integrates multi-scale frequency domain decomposition, time-domain statistical verification, and complementary fusion of multiple detection mechanisms. This system completely overcomes the limitations of traditional statistical methods (such as Z-score and IQR) in processing non-stationary, nonlinear, and human-biased ship MRV data. Specifically, it includes the following aspects:
[0046] 1) This invention utilizes the synergistic combination of three data processing methods—the Mexican Hat wavelet transform algorithm, the Daubechies 4 wavelet transform algorithm, and a high-pass filter—to form a complementary anomaly detection mechanism. The Daubechies 4 wavelet transform algorithm can accurately identify single-point abrupt changes that differ significantly from the overall trend, solving the problem of traditional methods being insensitive to isolated anomalies. The Mexican Hat wavelet transform algorithm can effectively capture concentrated anomalous data segments and anomalous events with large abrupt changes, compensating for the shortcomings of single-point detection methods in identifying continuous anomalies. The high-pass filter can identify high-frequency fluctuation anomalies in the signal, further supplementing the detection capabilities of the two wavelet methods for sudden and rapid changes. Therefore, this invention can specifically identify: single-point instantaneous abrupt changes, multi-scale concentrated anomalies, and high-frequency small-amplitude fluctuation anomalies. These three anomaly detection mechanisms complement and verify each other, constructing a three-dimensional detection system from single-point abrupt changes to continuous anomalies, and from amplitude anomalies to frequency anomalies. This ensures that all types of anomalous data can be accurately captured without omission, significantly improving the comprehensiveness and accuracy of ship fuel consumption report data detection.
[0047] 2) This invention utilizes the multi-resolution analysis characteristics of wavelet transform to decompose and reconstruct fuel consumption signals at different scales. The scale parameter 'a' of the Mexican Hat wavelet transform varies continuously from 1 to 9, covering multi-scale information from subtle fluctuations to macroscopic trends. The five-level decomposition structure of the Daubechies 4 wavelet belongs to multi-scale frequency domain decomposition, achieving signal smoothing through the separation of high and low frequency coefficients, and can separate signal components of different frequency bands. This multi-scale analysis capability enables this invention to simultaneously consider local details and overall trends when processing fuel consumption signals with complex structures and multi-scale characteristics, avoiding the shortcomings of single-scale analysis methods that are prone to missing abnormal information or making misjudgments.
[0048] 3) The Mexican Hat wavelet and Daubechies 4 wavelet selected in this invention both have excellent time-frequency localization characteristics, enabling precise signal localization in both the time and frequency domains. For typical non-stationary signals such as fuel consumption reports, this invention can keenly capture instantaneous changes in the signal, accurately identify abrupt changes, spikes, and transient noise interference, and precisely locate the moment of anomaly occurrence on the time axis, providing a reliable time reference for subsequent anomaly tracing and analysis.
[0049] 4) This invention does not rely on static testing or sensor data. It can detect abnormal fuel consumption by analyzing historical ship data alone. The algorithm is robust, has lower cost, and is easier to operate.
[0050] In summary, this invention logically integrates the three detection mechanisms targeting different forms of isolated spikes, continuous trends, and high-frequency jitter, forming a complementary defense loop. This multi-perspective collaborative architecture not only significantly reduces the inherent false positive and false negative rates of individual algorithms but also possesses strong adaptability, adapting to the data distribution characteristics of different ships and navigation conditions without requiring manual setting of fixed thresholds. This invention can output a high-confidence, comprehensive list of abnormal data, greatly improving the accuracy and reliability of MRV message data. It provides a solid and reliable data foundation for shipping companies' refined cost control, energy efficiency optimization decisions, and compliance with the stringent regulations of the International Maritime Organization (IMO) and the European Union, demonstrating significant engineering application value and social benefits.
[0051] This invention also relates to a system for detecting abnormal ship fuel consumption messages based on wavelet transform. This system corresponds to the aforementioned method for detecting abnormal ship fuel consumption messages based on wavelet transform. It can be understood as a system that implements the aforementioned method for detecting abnormal ship fuel consumption messages based on wavelet transform. The system includes a data acquisition and preprocessing module, a single-point mutation anomaly detection module, a time-series symmetric extension module, a continuous wavelet multi-scale centralized anomaly detection module, a high-pass filter high-frequency fluctuation anomaly detection module, and an anomaly data integration and output module. These modules work collaboratively, forming a complementary anomaly detection mechanism through the synergistic cooperation of the Mexican Hat wavelet transform algorithm, the Daubechies 4 wavelet transform algorithm, and a high-pass filter: 1) The Daubechies 4 wavelet transform algorithm performs five-level wavelet decomposition and reconstruction on the original fuel consumption time series to generate a smooth fuel consumption time series. Then, it calculates the residuals and sets a threshold based on the "3σ principle," accurately identifying single-point mutation anomalies that differ greatly from the overall trend, solving the problem of traditional methods being insensitive to isolated anomalies; 2) The Mexican Hat wavelet transform algorithm... The Hat wavelet transform algorithm performs continuous wavelet transform on the extended fuel consumption time series, extracts the maximum wavelet coefficients at all scales for each time point, and sets a threshold based on the 99th percentile. This effectively captures concentrated abnormal data segments and anomalous events with large abrupt changes, compensating for the shortcomings of single-point detection methods in identifying continuous anomalies. 3) The high-pass filter performs zero-phase bidirectional filtering on the extended fuel consumption time series, extracts high-frequency components, and calculates the Z-score, enabling the identification of high-frequency fluctuation anomalies in the signal. This further supplements the detection capabilities of the two wavelet methods for sudden and rapid changes in anomalies. These three methods complement and validate each other, constructing a comprehensive detection system from single-point abrupt changes to continuous anomalies, and from amplitude anomalies to frequency anomalies. This ensures that all types of anomalous data can be accurately captured without omission, significantly improving the comprehensiveness and accuracy of ship fuel consumption report data detection. Attached Figure Description
[0052] Figure 1 This is a flowchart of the method for detecting abnormal ship fuel consumption messages based on wavelet transform according to the present invention.
[0053] Figure 2 This is a schematic diagram of single-point mutation anomaly detection based on Daubechies 4 wavelet transform in an embodiment of the present invention.
[0054] Figure 3 This is a schematic diagram of multi-scale centralized anomaly detection based on Mexican Hat wavelet transform in an embodiment of the present invention.
[0055] Figure 4This is a schematic diagram of the overall detection results of all abnormal points in the ship fuel consumption report after the fusion of multiple algorithms in an embodiment of the present invention.
[0056] Figure 5 This is a structural block diagram of the ship fuel consumption anomaly message data detection system based on wavelet transform according to the present invention. Detailed Implementation
[0057] The present invention will now be described with reference to the accompanying drawings.
[0058] This invention relates to a method for detecting abnormal ship fuel consumption data based on wavelet transform. Since fuel consumption data should fluctuate slowly and slightly under normal conditions, this invention analyzes and processes a large amount of historical MRV fuel consumption data using the Daubechies 4 wavelet transform algorithm, the Mexican Hat wavelet transform algorithm, and a high-pass filter method to obtain abnormal ship fuel consumption data. This method can effectively identify and locate abrupt changes in ship MRV fuel consumption data. The flowchart of this method is shown below. Figure 1 As shown, the steps are as follows:
[0059] I. Data Acquisition and Preprocessing Steps: Acquire raw fuel consumption data of ships sorted in chronological order, and perform time alignment, duplicate data removal and missing value interpolation on the raw fuel consumption data to generate a continuous and equally timed raw fuel consumption time series.
[0060] This step aims to transform the raw, disorganized MRV report data into a standardized, continuous time series, laying the foundation for subsequent algorithmic analysis. Specifically, it first obtains the raw fuel consumption report data of ships sorted chronologically from the ShipView database or other enterprise resource planning systems (i.e., the fuel consumption per 100 nautical miles reported by MRV, such as selecting 53 ships from December 31, 2021 to July 1, 2024). Historical fuel consumption data was used as the analysis sample, along with basic data such as the vessel's MMSI number, vessel type, voyage distance, sailing time, and stop time. , For a given list of ships , Indicates the first The data consisted of several ships. Preprocessing steps, including time alignment, duplicate data removal, and missing value interpolation, were performed on the raw fuel consumption data to generate continuous and equally timed raw fuel consumption time series. , ,in, Indicates a point in time. Report fuel consumption for the MRV of the i-th ship at time t. The specific preprocessing operations include:
[0061] 1) Time alignment: Since MRV data is often not equidistant (reported by flight), the data is converted into a time series with fixed time intervals (such as one data point per day) by resampling to ensure that the time intervals of the data points are consistent and that the time axis can be aligned.
[0062] 2) Duplicate data removal: Traverse the data, and if multiple identical records are found under the same timestamp, keep only one record and remove redundant data.
[0063] 3) Missing value interpolation: Check if there are any breaks (missing dates) in the time series. If so, use linear interpolation (or spline interpolation, forward fill method) to fill them to ensure that the data column has the correct data type and to guarantee the continuity and equal time interval characteristics of the data.
[0064] II. Single-point mutation anomaly detection steps: Using the Daubechies 4 wavelet as the mother wavelet, the original fuel consumption time series is decomposed into five levels of wavelet decomposition to obtain a set of fifth-level approximation coefficients, as well as first-level detail coefficients, second-level detail coefficients, third-level detail coefficients, fourth-level detail coefficients, and fifth-level detail coefficients. Then, the first-level detail coefficients, second-level detail coefficients, third-level detail coefficients, and fourth-level detail coefficients are set to zero, while the fifth-level approximation coefficients and fifth-level detail coefficients are retained. An inverse wavelet transform is performed on the retained fifth-level approximation coefficients and fifth-level detail coefficients to reconstruct a smoothed fuel consumption time series of the same length as the original fuel consumption time series. The difference between each data point in the original fuel consumption time series and the smoothed fuel consumption time series is calculated point by point to generate a residual sequence. The standard deviation of the residual sequence is calculated, and a first anomaly threshold is set based on the standard deviation. Data points in the residual sequence whose absolute value is greater than the first anomaly threshold and whose absolute value of the difference between the residual sequence and the mean of the original fuel consumption time series is greater than the standard deviation are marked as single-point mutation anomalies. This single-point mutation outlier can be understood as a type I outlier.
[0065] This step corresponds to Figure 1 The db4 wavelet data shown is smoothed, subtracted, and a threshold is set to detect outliers.
[0066] 1) DB4 wavelet data smoothing
[0067] The Daubechies 4 (db4) wavelet, due to its vanishing moments and compact support characteristics, can effectively smooth data while having low boundary effects. This step aims to utilize the excellent compact support characteristics of the Daubechies 4 wavelet algorithm to accurately capture isolated, sudden single-point spike anomalies. First, the Daubechies 4 wavelet is used as the mother wavelet to process the original fuel consumption time series (also known as the original signal). Perform a five-level (or five-stage) wavelet decomposition to obtain a set of fifth-level approximation coefficients. and the first layer of detail coefficient Second layer detail coefficient Third layer detail coefficient Fourth layer detail coefficient and the fifth level of detail coefficient This is done by setting high-frequency coefficients to zero, thus smoothing the data. As shown in the following formula:
[0068]
[0069] in, These are the fifth-level approximation coefficients, representing the low-frequency trend components of the signal; to These are the detail coefficients for layers one through five, representing high-frequency detail components at different scales; For approximation of the mother wavelet function, For details, the mother wavelet function is used.
[0070] Furthermore, normal fuel consumption should fluctuate slightly and gradually; therefore, the low-level detail coefficients representing the highest frequency noise are set to zero, while the high-level coefficients reflecting the main trends are retained. Specifically: the high-level fifth-level detail coefficients are retained. and lower level detail coefficients Set to zero, and finally use the retained fifth-level approximation coefficients. and the fifth level of detail coefficient Perform an inverse wavelet transform to reconstruct and generate a smoothed fuel consumption time series that is identical to the original. Smoothed fuel consumption time series of equal length (also known as smoothed signals) As shown in the following formula:
[0071]
[0072] Because wavelet transform may cause a slight difference in the length of the reconstructed smoothed signal compared to the original signal (boundary effect), it is necessary to slice the reconstructed smoothed signal, that is, to extract the first N data points of the smoothed signal (smoothed fuel consumption time series) as the final smoothed fuel consumption time series, where N is the total number of data points in the original fuel consumption time series, to ensure that the final smoothed fuel consumption time series generated by reconstruction is accurate. Compared with the original fuel consumption time series The lengths are consistent (corresponding one-to-one on the timeline).
[0073] 2) Calculate the difference and set a threshold to detect outliers.
[0074] By comparing the differences between the original signal and the smoothed signal, single-point abrupt changes that deviate significantly from the overall trend are identified. Specifically, the original fuel consumption time series is first calculated point by point. With the smoothed fuel consumption time series The differences between the various data points (also known as residuals, i.e., the differences between the original signal and the smoothed signal) are used to generate a residual sequence. This difference (residual sequence) significantly reflects the high-frequency fluctuation components in the original signal after removing the main trend, as shown in the following equation:
[0075]
[0076] The residual sequence is calculated after filtering the data. Standard deviation Calculate according to the following formula:
[0077]
[0078] in, The standard deviation of the residual sequence; The th in the residual sequence The value of each data point, i.e. ; The mean of the residual sequence; The total number of data points in the residual sequence (equal to the length of the original fuel consumption time series).
[0079] And based on this standard deviation Setting a first anomaly threshold, that is, constructing a dynamic threshold—the first anomaly threshold—using residuals and standard deviation, based on " "Principles", preferably setting anomaly detection threshold (first anomaly threshold) () is three standard deviations, i.e. Then, data points that simultaneously meet the following two conditions are identified as Category I outliers:
[0080] Condition 1: Identify residuals in the residual sequence whose absolute value is greater than the first outlier threshold. Data points, i.e. As shown in the following formula:
[0081]
[0082] Condition 2: Filter out the original fuel consumption time series In and its mean The absolute value of the difference is greater than the standard deviation. Data points, i.e. ,in, Original fuel consumption time series The mean. To ensure they are significant not only in the residuals but also in the original data (original fuel consumption time series). There is a significant deviation.
[0083] Condition 2 is introduced to exclude points that deviate from the smooth curve but are still within the normal fluctuation range, and the final output is a single-point mutation anomaly point to improve the accuracy of detection.
[0084] Combination Figure 2 The detection process and results of this single-point mutation anomaly detection procedure are explained below:
[0085] Figure 2 It contains three vertically arranged sub-graphs, namely... Figure 2 In subgraphs a, 2b, and 2c, the horizontal axis is labeled with "Date," representing the time when the ship fuel consumption data was collected. Figure 2 The vertical axis for 'a' and '2c' is labeled Standardized FuelAcc MRV, representing the standardized cumulative fuel consumption value. Figure 2 The vertical axis of b is labeled Difference, representing the difference between the original timing series and the smoothed timing series.
[0086] Figure 2 Figure 'a' is a comparative diagram of the standardized original cumulative fuel consumption time series curve and the smoothed fuel consumption time series curve obtained after Daubechies 4 wavelet smoothing. The blue curve in the figure corresponds to the Original Fuel Acc MRV, which is the original cumulative fuel consumption time series. The green curve corresponds to the Denoised Fuel Acc MRV, which is the smoothed fuel consumption time series obtained after wavelet denoising and reconstruction. This allows for a direct comparison of the fluctuation characteristics and overall trend of the original fuel consumption time series.
[0087] Figure 2 b represents the difference between the original fuel consumption time series and the smoothed fuel consumption time series, i.e., the residual sequence change curve. The red curve in the figure corresponds to Difference (Original−Denoised), which is the calculated residual sequence. The purple dots correspond to AnomaliesDetected by Difference, which are abnormal data points identified according to condition 1. These data points have not yet been verified by condition 2 and are still considered abnormal data points to be verified.
[0088] Figure 2c is a schematic diagram showing the distribution of the single-point mutation anomalies finally determined after dual-condition filtering on the original fuel consumption time series. The blue curve is still the Original Fuel Acc MRV, i.e., the original cumulative fuel consumption time series, and the purple dots correspond to Anomalies by Difference (Filtered), which are the single-point mutation anomalies finally determined after filtering by dual constraints of condition 1 and condition 2.
[0089] pass Figure 2 It can be intuitively verified that this single-point mutation anomaly detection step can accurately identify isolated, sudden single-point fuel consumption anomaly message data in the time series.
[0090] III. Time-Series Symmetric Extension Step: Perform mirror symmetric extension processing on the original fuel consumption time series to generate an extended fuel consumption time series.
[0091] Specifically, firstly, the original fuel consumption time series... Mirror-symmetric expansion processing is performed to generate an extended fuel consumption time series (also known as an extended signal). This reduces the edge effects at signal edges caused by the use of Mexican Hat wavelet transform and filters in subsequent steps. As shown in the following equation:
[0092]
[0093] in, To extend the fuel consumption time series, This is the original fuel consumption time series, representing the data at time points. Fuel consumption value at the location; The first data segment is obtained by mirroring the original fuel consumption time series forward with the starting time point as the axis of symmetry. The second data segment is obtained by mirroring the original fuel consumption time series backward with the end time point as the axis of symmetry. (·) is the concatenation function. That is, using the original fuel consumption time series... (Time index) The starting time point of the sequence (=0,1,2,...,N-1, where N is the sequence length) is the axis of symmetry (i.e., with... =0 corresponds to the starting time point of the symmetry axis), and a first data segment of the same length as the original fuel consumption time series is obtained by forward mirror copying. ,in, =-N+1,-N+2,...,-1,0; with the end time point of the original fuel consumption time series as the axis of symmetry (i.e., with... =N-1 corresponds to the end time point of the symmetry axis), and a second data segment of the same length as the original fuel consumption time series is obtained by mirroring and copying it backward. ; the first data segment Original fuel consumption time series Second data segment The extended fuel consumption time series is generated by concatenating the data in chronological order. The advantage of this extension method is that it maintains the continuity of the signal through symmetry, reduces the problem of inconsistent wavelet responses at the edges, and thus improves the overall quality of the transform.
[0094] IV. Continuous Wavelet Multi-Scale Centralized Anomaly Detection Steps: Using the Mexican Hat wavelet as the mother wavelet, perform a continuous wavelet transform on the extended fuel consumption time series to obtain a multi-scale wavelet coefficient matrix; extract the time period corresponding to the original fuel consumption time series from the multi-scale wavelet coefficient matrix, and calculate the maximum absolute value of the wavelet coefficients at all scales for each time point within that time period to obtain the maximum coefficient sequence; calculate the percentile statistic of the maximum coefficient sequence, set a second anomaly threshold based on the percentile statistic, and mark data points in the maximum coefficient sequence whose values are greater than the second anomaly threshold as multi-scale centralized anomalies. These multi-scale centralized anomalies can be understood as second-type anomalies.
[0095] This step corresponds to Figure 1 The Mexican Hat wavelet decomposition and extraction of potential anomalies are shown, and a threshold is set to detect anomaly points.
[0096] 1) Mexican Hat wavelet decomposition
[0097] This step aims to leverage the sensitivity of the Mexican Hat wavelet to waveform changes to capture consecutive, large-amplitude anomalous segments. Specifically, the Mexican Hat wavelet is first selected as the mother wavelet because it is extremely sensitive to sharp changes in the signal, making it particularly suitable for detecting anomalous abrupt changes. The scaling parameters of the wavelet transform are then... The range is set from 1 to 9 to cover analytical needs ranging from subtle fluctuations to large-scale changes. Then, Mexican Hat wavelets are used to analyze the expanded fuel consumption time series (also known as the expanded signal). Performing a continuous wavelet transform (also known as continuous wavelet decomposition) yields a two-dimensional multi-scale wavelet coefficient matrix (scale × time). As shown in the following formula:
[0098]
[0099] in, For Mexican Hat wavelet functions; The scale parameter determines the width of the wavelet; The time shift parameter determines the position of the wavelet on the time axis; Indicates a point in time.
[0100] The rows of this wavelet coefficient matrix correspond to different scales, and the columns correspond to different time points. Each element value reflects the local feature intensity of the signal at a specific scale and time point.
[0101] 2) Extract potential anomalies and set thresholds to detect anomalies.
[0102] Due to the above analysis of the original fuel consumption time series (original signal) The wavelet coefficient matrix has been expanded to include the transformed results of the original signal and its mirror image. To focus on the original signal itself, the multi-scale wavelet coefficient matrix... Extracting the corresponding time series of fuel consumption from the original data. A portion of the time period. And for each extracted time point. Calculate it at all scales The maximum absolute value of the wavelet coefficients is obtained by finding the maximum coefficient sequence. As shown in the following formula:
[0103]
[0104] This value reflects the most significant response at all scales at each time point, indicating the degree of anomaly in the signal at that point. Larger values (such as...) This value typically corresponds to potential outliers in the signal (i.e., the larger the value, the more likely the point is to be an outlier), because the Mexican Hat wavelet is very sensitive to sharp changes.
[0105] Subsequently, the maximum coefficient sequence is calculated. The percentile statistic (i.e., the 99th percentile) is based on the statistical concept of " "Principles", setting it as the second abnormal threshold The threshold for The 99th percentile is shown in the following formula:
[0106]
[0107] The choice of the 99th percentile means that only the most extreme 1% of points will be judged as anomalies, ensuring the accuracy of the detection. Finally, the maximum coefficient sequence is... The median value is greater than the second abnormal threshold. The data points are marked as multi-scale concentrated outliers.
[0108] Combination Figure 3 The detection process and results of this multi-scale centralized anomaly detection step are explained:
[0109] Figure 3 It contains two vertically arranged sub-graphs, namely... Figure 3 In subgraphs a and 3b, the horizontal axis is labeled "Date," representing the time when the ship fuel consumption data was collected. Figure 3 The vertical axis of 'a' is labeled Fuel Acc MRV, representing the cumulative fuel consumption value. Figure 3 The vertical axis of b is labeled Max Wavelet Coefficients, which represents the maximum wavelet coefficients at each time point.
[0110] Figure 3 Figure 'a' shows the original fuel consumption time series and the distribution of multi-scale concentrated anomalies detected by the continuous wavelet multi-scale concentrated anomaly detection step. The blue curve in the figure corresponds to the Original Fuel Acc MRV, which is the original cumulative fuel consumption time series. The red dots correspond to Detected Anomalies, which are the multi-scale concentrated anomalies detected by this step.
[0111] Figure 3 b represents the variation curves formed by the maximum wavelet coefficients at all scales at each time point; the green curve corresponds to Max Wavelet Coefficients, which are the maximum wavelet coefficients at each time point calculated by the Mexican Hat continuous wavelet transform. These maximum values at each time point constitute the maximum coefficient sequence. The red dashed line corresponds to Threshold, which is the anomaly judgment threshold (second anomaly threshold) set based on percentiles. When the maximum wavelet coefficient exceeds this threshold, the fuel consumption data at that time point will be judged as a multi-scale concentrated anomaly.
[0112] pass Figure 3 It can be intuitively verified that this multi-scale centralized anomaly detection step can accurately identify batch anomaly message data that appears in the time series of ship fuel consumption, and effectively capture local fuel consumption anomalies that deviate continuously from the normal trend by relying on multi-scale frequency domain features.
[0113] V. High-Pass Filtering High-Frequency Fluctuation Anomaly Detection Steps: A high-pass filter is constructed based on a first-order Butterworth filter, and a zero-phase filtering method is used to perform bidirectional filtering on the extended fuel consumption time series to extract the high-frequency component sequence; the mean and standard deviation of the high-frequency component sequence are calculated, and the Z-score value of each data point is calculated based on the high-frequency component sequence and its mean and standard deviation to generate a Z-score sequence; data points in the Z-score sequence whose absolute value is greater than a preset third anomaly threshold are marked as high-frequency fluctuation anomaly points. This high-frequency fluctuation anomaly point can be understood as a third type of anomaly point.
[0114] This step aims to extract high-frequency noise or anomalies in rapid fluctuations in the signal, compensating for specific frequency band anomalies that wavelet transform might miss. Specifically, a first-order Butterworth high-pass filter is first designed, with a transfer function... In the case of Qualcomm, it can be represented as follows:
[0115]
[0116] in, The imaginary unit ( ); For frequency variables; The filter coefficients are designed using the normalized cutoff frequency. and .
[0117] The extended fuel consumption time series (extended signal) is processed using a zero-phase filtering (filtfilt) method and a first-order Butterworth high-pass filter. Perform bidirectional filtering to extract the extended signal. High-frequency component sequences To ensure signal time alignment and eliminate phase delay, as shown in the following equation:
[0118]
[0119] This process removes low-frequency trends and noise from the signal, retaining high-frequency fluctuations, which typically contain information about abnormal fluctuations or sudden events. Finally, the high-frequency component sequence is calculated. mean and standard deviation The Z-score value for each data point is calculated based on the mean and standard deviation. Generate the Z-score sequence as shown in the following formula:
[0120]
[0121] Finally, data points in the Z-score sequence whose absolute values are greater than a pre-set third outlier threshold (e.g., the third outlier threshold is set to 3) are marked as third-type outliers, that is, data points in the Z-score sequence whose absolute values are greater than a pre-set third outlier threshold are marked as third-type outliers. Data points with an absolute value greater than 3 are marked as high-frequency fluctuation anomalies.
[0122] VI. Abnormal Data Integration and Output Steps: The single-point mutation anomalies, multi-scale concentrated anomalies, and high-frequency fluctuation anomalies are integrated and processed in chronological order to generate and output the final ship fuel consumption anomaly report data detection results.
[0123] This step corresponds to Figure 1 The integrated abnormal state visualization shown can be understood as integrating the abnormal points detected in the three steps into a single sequence, outputting and visualizing it.
[0124] Figure 4 This is a schematic diagram of the overall detection results after fusing multiple types of anomalies. The horizontal axis is labeled Date, representing the collection time of the ship fuel consumption report data; the vertical axis is labeled Fuel Acc MRV, representing the cumulative fuel consumption value. Figure 4 The blue curve corresponds to the Original Fuel Acc MRV, which is the original cumulative fuel consumption time series; the red dots correspond to the Detected Anomalies in the legend, which are all fuel consumption anomaly data points obtained by integrating and summarizing the single-point mutation anomalies, multi-scale concentrated anomalies, and high-frequency fluctuation anomalies detected in the previous three steps according to the time dimension.
[0125] pass Figure 4 It can be intuitively verified that this invention, through a multi-mechanism complementary multi-type anomaly detection scheme, can comprehensively identify different types of abnormal data in ship fuel consumption reports, integrate them, and output complete anomaly detection results, providing comprehensive and reliable data support for ship energy efficiency management and operating cost control.
[0126] This invention also relates to a system for detecting abnormal ship fuel consumption messages based on wavelet transform. This system corresponds to the aforementioned method for detecting abnormal ship fuel consumption messages based on wavelet transform, and can be understood as a system that implements the above method. The structure of this system is as follows: Figure 5 As shown, the system includes a data acquisition and preprocessing module, a single-point mutation anomaly detection module, a time-series symmetric extension module, a continuous wavelet multi-scale concentrated anomaly detection module, a high-pass filter high-frequency fluctuation anomaly detection module, and an anomaly data integration and output module. Specifically, the data acquisition and preprocessing module is connected to both the single-point mutation anomaly detection module and the time-series symmetric extension module; the time-series symmetric extension module is connected to both the continuous wavelet multi-scale concentrated anomaly detection module and the high-pass filter high-frequency fluctuation anomaly detection module; and the single-point mutation anomaly detection module, the continuous wavelet multi-scale concentrated anomaly detection module, and the high-pass filter high-frequency fluctuation anomaly detection module are all connected to the anomaly data integration and output module.
[0127] The data acquisition and preprocessing module acquires the raw fuel consumption report data of the ship in chronological order, and performs time alignment, duplicate data removal and missing value interpolation on the raw fuel consumption report data to generate a continuous and equally timed raw fuel consumption time series.
[0128] The single-point mutation anomaly detection module uses the Daubechies 4 wavelet as the mother wavelet to perform a five-level wavelet decomposition on the original fuel consumption time series, obtaining a set of fifth-level approximation coefficients, as well as first-level detail coefficients, second-level detail coefficients, third-level detail coefficients, fourth-level detail coefficients, and fifth-level detail coefficients. Then, the first-level detail coefficients, second-level detail coefficients, third-level detail coefficients, and fourth-level detail coefficients are set to zero, while the fifth-level approximation coefficients and fifth-level detail coefficients are retained. An inverse wavelet transform is performed on the retained fifth-level approximation coefficients and fifth-level detail coefficients to reconstruct a smoothed fuel consumption time series with the same length as the original fuel consumption time series. The difference between each data point in the original fuel consumption time series and the smoothed fuel consumption time series is calculated point by point to generate a residual sequence. The standard deviation of the residual sequence is calculated, and a first anomaly threshold is set based on the standard deviation. Data points in the residual sequence whose absolute value is greater than the first anomaly threshold and whose absolute value of the difference between the residual sequence and the mean of the original fuel consumption time series is greater than the standard deviation are marked as single-point mutation anomaly points.
[0129] The time-series symmetric expansion module performs mirror symmetric expansion processing on the original fuel consumption time series to generate an expanded fuel consumption time series.
[0130] The continuous wavelet multi-scale concentrated anomaly detection module uses the Mexican Hat wavelet as the mother wavelet to perform continuous wavelet transform on the extended fuel consumption time series to obtain a multi-scale wavelet coefficient matrix. From the multi-scale wavelet coefficient matrix, a time period corresponding to the original fuel consumption time series is extracted, and the maximum absolute value of the wavelet coefficients at all scales is calculated for each time point within that time period to obtain the maximum coefficient sequence. The percentile statistic of the maximum coefficient sequence is calculated, and a second anomaly threshold is set based on the percentile statistic. Data points in the maximum coefficient sequence with values greater than the second anomaly threshold are marked as multi-scale concentrated anomalies.
[0131] The high-pass filter high-frequency fluctuation anomaly detection module constructs a high-pass filter based on a first-order Butterworth filter and employs a zero-phase filtering method to perform bidirectional filtering on the extended fuel consumption time series, extracting the high-frequency component sequence; it calculates the mean and standard deviation of the high-frequency component sequence, and calculates the Z-score value of each data point based on the high-frequency component sequence and its mean and standard deviation, generating a Z-score sequence; data points in the Z-score sequence whose absolute value is greater than a preset third anomaly threshold are marked as high-frequency fluctuation anomaly points;
[0132] The abnormal data integration and output module integrates the single-point mutation anomalies, multi-scale concentrated anomalies, and high-frequency fluctuation anomalies in chronological order to generate and output the final ship fuel consumption anomaly report data detection results.
[0133] Preferably, in the single-point mutation anomaly detection module, after performing inverse wavelet transform, a slice alignment operation is also performed: the first N data points of the smoothed fuel consumption time series are extracted as the final smoothed fuel consumption time series, where N is the total number of data points of the original fuel consumption time series, to ensure that the final smoothed fuel consumption time series corresponds one-to-one with the original fuel consumption time series on the time axis.
[0134] Preferably, in the time-series symmetric expansion module, the original fuel consumption time series is subjected to mirror symmetric expansion processing to generate an expanded fuel consumption time series, as shown in the following formula:
[0135]
[0136] in, To extend the fuel consumption time series, This is the original fuel consumption time series, representing the data at time points. Fuel consumption value at the location; The first data segment is obtained by mirroring the original fuel consumption time series forward with the starting time point as the axis of symmetry. The second data segment is obtained by mirroring the original fuel consumption time series backward with the end time point as the axis of symmetry. (·) is the concatenation function.
[0137] Preferably, in the high-pass filter high-frequency fluctuation anomaly detection module, the Z-score value of each data point is calculated based on the high-frequency component sequence and its mean and standard deviation, according to the following formula:
[0138] ,
[0139] in, It is a high-frequency component sequence. This represents the mean of the high-frequency component sequence. denoted as the standard deviation of the high-frequency component sequence.
[0140] Preferably, in the data acquisition and preprocessing module, the missing value interpolation process adopts linear interpolation or forward filling method to ensure the continuity of the original fuel consumption time series.
[0141] This invention provides an objective and scientific method and system for detecting abnormal ship fuel consumption data based on wavelet transform. Through a three-dimensional detection architecture that integrates multi-scale frequency domain decomposition, multi-type time-domain statistical verification, and multiple anomaly detection mechanisms, it achieves automated identification of multi-dimensional anomaly data in ship fuel consumption time-series messages, overcoming the shortcomings of traditional manual screening methods, which are characterized by high subjectivity and high false negative rates. In data scenarios involving massive ship navigation messages and complex navigation conditions, this invention effectively improves the accuracy and efficiency of identifying abnormal fuel consumption data, providing reliable data support for ship navigation energy efficiency management and refined management of shipping operating costs. It offers a practical, robust, and low-cost automated anomaly detection solution for fuel consumption supervision in the shipping industry.
[0142] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail with reference to the accompanying drawings and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention. In short, all technical solutions and improvements that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention patent.
Claims
1. A method for detecting abnormal ship fuel consumption messages based on wavelet transform, characterized in that, Includes the following steps: Data acquisition and preprocessing steps: Obtain raw fuel consumption data of ships sorted in chronological order, and perform time alignment, duplicate data removal and missing value interpolation on the raw fuel consumption data to generate a continuous and equally timed raw fuel consumption time series. Single-point mutation anomaly detection steps: Using the Daubechies 4 wavelet as the mother wavelet, the original fuel consumption time series is decomposed into five layers of wavelet decomposition to obtain a set of fifth-layer approximation coefficients, as well as first-layer detail coefficients, second-layer detail coefficients, third-layer detail coefficients, fourth-layer detail coefficients, and fifth-layer detail coefficients; then, the first-layer detail coefficients, second-layer detail coefficients, third-layer detail coefficients, and fourth-layer detail coefficients are set to zero, while the fifth-layer approximation coefficients and fifth-layer detail coefficients are retained. An inverse wavelet transform is performed on the retained fifth-layer approximation coefficients and fifth-layer detail coefficients to reconstruct a smoothed fuel consumption time series with the same length as the original fuel consumption time series; the difference between each data point in the original fuel consumption time series and the smoothed fuel consumption time series is calculated point by point to generate a residual sequence; the standard deviation of the residual sequence is calculated, and a first anomaly threshold is set based on the standard deviation. Data points in the residual sequence whose absolute value is greater than the first anomaly threshold and whose absolute value of the difference between the residual sequence and the mean of the original fuel consumption time series is greater than the standard deviation are marked as single-point mutation anomaly points. The time-series symmetric expansion step is as follows: the original fuel consumption time series is subjected to mirror symmetric expansion processing to generate an expanded fuel consumption time series; The continuous wavelet multi-scale concentrated anomaly detection steps are as follows: Using the Mexican Hat wavelet as the mother wavelet, a continuous wavelet transform is performed on the extended fuel consumption time series to obtain a multi-scale wavelet coefficient matrix; from the multi-scale wavelet coefficient matrix, a time period corresponding to the original fuel consumption time series is extracted, and the maximum absolute value of the wavelet coefficients at all scales is calculated for each time point within that time period to obtain the maximum coefficient sequence; the percentile statistic of the maximum coefficient sequence is calculated, and a second anomaly threshold is set based on the percentile statistic; data points in the maximum coefficient sequence whose values are greater than the second anomaly threshold are marked as multi-scale concentrated anomaly points; High-pass filtering high-frequency fluctuation anomaly detection steps: A high-pass filter is constructed based on a first-order Butterworth filter, and a zero-phase filtering method is used to perform bidirectional filtering on the extended fuel consumption time series to extract the high-frequency component sequence; the mean and standard deviation of the high-frequency component sequence are calculated, and the Z-score value of each data point is calculated based on the high-frequency component sequence and its mean and standard deviation to generate a Z-score sequence; data points in the Z-score sequence whose absolute value is greater than a preset third anomaly threshold are marked as high-frequency fluctuation anomaly points; Abnormal data integration and output steps: The single-point mutation anomalies, multi-scale concentrated anomalies, and high-frequency fluctuation anomalies are integrated and processed in chronological order to generate and output the final ship fuel consumption anomaly report data detection results.
2. The method for detecting abnormal ship fuel consumption messages based on wavelet transform according to claim 1, characterized in that, In the single-point mutation anomaly detection step, after performing inverse wavelet transform, a slice alignment operation is also performed: the first N data points of the smoothed fuel consumption time series are extracted as the final smoothed fuel consumption time series, where N is the total number of data points of the original fuel consumption time series, to ensure that the final smoothed fuel consumption time series corresponds one-to-one with the original fuel consumption time series on the time axis.
3. The method for detecting abnormal ship fuel consumption messages based on wavelet transform according to claim 1 or 2, characterized in that, In the time-series symmetric expansion step, the original fuel consumption time series is subjected to mirror symmetric expansion processing to generate an expanded fuel consumption time series, as shown in the following formula: , in, To extend the fuel consumption time series, This is the original fuel consumption time series, representing the data at time points. Fuel consumption value at the location; The first data segment is obtained by mirroring the original fuel consumption time series forward with the starting time point as the axis of symmetry. The second data segment is obtained by mirroring the original fuel consumption time series backward with the end time point as the axis of symmetry. (·) is the concatenation function.
4. The method for detecting abnormal ship fuel consumption messages based on wavelet transform according to claim 1 or 2, characterized in that, In the high-pass filtering high-frequency fluctuation anomaly detection step, the Z-score value of each data point is calculated based on the high-frequency component sequence and its mean and standard deviation, according to the following formula: , in, It is a high-frequency component sequence. This represents the mean of the high-frequency component sequence. denoted as the standard deviation of the high-frequency component sequence.
5. The method for detecting abnormal ship fuel consumption messages based on wavelet transform according to claim 1 or 2, characterized in that, In the data acquisition and preprocessing steps, the missing value interpolation process uses linear interpolation or forward filling to ensure the continuity of the original fuel consumption time series.
6. A system for detecting abnormal ship fuel consumption messages based on wavelet transform, characterized in that, The system includes a data acquisition and preprocessing module, a single-point mutation anomaly detection module, a time-series symmetric extension module, a continuous wavelet multi-scale concentrated anomaly detection module, a high-pass filter high-frequency fluctuation anomaly detection module, and an anomaly data integration and output module. The data acquisition and preprocessing module is connected to the single-point mutation anomaly detection module and the time-series symmetric extension module, respectively. The time-series symmetric extension module is connected to the continuous wavelet multi-scale concentrated anomaly detection module and the high-pass filter high-frequency fluctuation anomaly detection module, respectively. The single-point mutation anomaly detection module, the continuous wavelet multi-scale concentrated anomaly detection module, and the high-pass filter high-frequency fluctuation anomaly detection module are all connected to the anomaly data integration and output module. The data acquisition and preprocessing module acquires the raw fuel consumption report data of the ship in chronological order, and performs time alignment, duplicate data removal and missing value interpolation on the raw fuel consumption report data to generate a continuous and equally timed raw fuel consumption time series. The single-point mutation anomaly detection module uses the Daubechies 4 wavelet as the mother wavelet to perform a five-level wavelet decomposition on the original fuel consumption time series, obtaining a set of fifth-level approximation coefficients, as well as first-level detail coefficients, second-level detail coefficients, third-level detail coefficients, fourth-level detail coefficients, and fifth-level detail coefficients. Then, the first-level detail coefficients, second-level detail coefficients, third-level detail coefficients, and fourth-level detail coefficients are set to zero, while the fifth-level approximation coefficients and fifth-level detail coefficients are retained. An inverse wavelet transform is performed on the retained fifth-level approximation coefficients and fifth-level detail coefficients to reconstruct a smoothed fuel consumption time series with the same length as the original fuel consumption time series. The difference between each data point in the original fuel consumption time series and the smoothed fuel consumption time series is calculated point by point to generate a residual sequence. The standard deviation of the residual sequence is calculated, and a first anomaly threshold is set based on the standard deviation. Data points in the residual sequence whose absolute value is greater than the first anomaly threshold and whose absolute value of the difference between the residual sequence and the mean of the original fuel consumption time series is greater than the standard deviation are marked as single-point mutation anomaly points. The time-series symmetric expansion module performs mirror symmetric expansion processing on the original fuel consumption time series to generate an expanded fuel consumption time series. The continuous wavelet multi-scale concentrated anomaly detection module uses the Mexican Hat wavelet as the mother wavelet to perform continuous wavelet transform on the extended fuel consumption time series to obtain a multi-scale wavelet coefficient matrix. From the multi-scale wavelet coefficient matrix, a time period corresponding to the original fuel consumption time series is extracted, and the maximum absolute value of the wavelet coefficients at all scales is calculated for each time point within that time period to obtain the maximum coefficient sequence. The percentile statistic of the maximum coefficient sequence is calculated, and a second anomaly threshold is set based on the percentile statistic. Data points in the maximum coefficient sequence with values greater than the second anomaly threshold are marked as multi-scale concentrated anomalies. The high-pass filter high-frequency fluctuation anomaly detection module constructs a high-pass filter based on a first-order Butterworth filter and employs a zero-phase filtering method to perform bidirectional filtering on the extended fuel consumption time series, extracting the high-frequency component sequence; it calculates the mean and standard deviation of the high-frequency component sequence, and calculates the Z-score value of each data point based on the high-frequency component sequence and its mean and standard deviation, generating a Z-score sequence; data points in the Z-score sequence whose absolute value is greater than a preset third anomaly threshold are marked as high-frequency fluctuation anomaly points; The abnormal data integration and output module integrates the single-point mutation anomalies, multi-scale concentrated anomalies, and high-frequency fluctuation anomalies in chronological order to generate and output the final ship fuel consumption anomaly report data detection results.
7. The ship fuel consumption anomaly message data detection system based on wavelet transform according to claim 6, characterized in that, In the single-point mutation anomaly detection module, after performing inverse wavelet transform, a slice alignment operation is also performed: the first N data points of the smoothed fuel consumption time series are extracted as the final smoothed fuel consumption time series, where N is the total number of data points of the original fuel consumption time series, to ensure that the final smoothed fuel consumption time series corresponds one-to-one with the original fuel consumption time series on the time axis.
8. The system for detecting abnormal ship fuel consumption messages based on wavelet transform according to claim 6 or 7, characterized in that, In the time-series symmetric expansion module, the original fuel consumption time series is subjected to mirror symmetric expansion processing to generate an expanded fuel consumption time series, as shown in the following formula: , in, To extend the fuel consumption time series, This is the original fuel consumption time series, representing the data at time points. Fuel consumption value at the location; The first data segment is obtained by mirroring the original fuel consumption time series forward with the starting time point as the axis of symmetry. The second data segment is obtained by mirroring the original fuel consumption time series backward with the end time point as the axis of symmetry. (·) is the concatenation function.
9. The system for detecting abnormal ship fuel consumption messages based on wavelet transform according to claim 6 or 7, characterized in that, In the high-pass filter high-frequency fluctuation anomaly detection module, the Z-score value of each data point is calculated based on the high-frequency component sequence and its mean and standard deviation, according to the following formula: , in, It is a high-frequency component sequence. This represents the mean of the high-frequency component sequence. denoted as the standard deviation of the high-frequency component sequence.
10. The ship fuel consumption anomaly message data detection system based on wavelet transform according to claim 6, characterized in that, In the data acquisition and preprocessing module, the missing value interpolation process uses linear interpolation or forward filling to ensure the continuity of the original fuel consumption time series.