Ship fuel oil detection method, device and equipment and storage medium
Through the iterative detection model of mid-infrared spectral equipment and layered peeling, efficient and low-cost detection of ship fuel is achieved, and the problems of low detection efficiency and high cost in the existing technology are solved, ensuring the rapidity and accuracy of detection.
Patent Information
- Application Number
- CN202510320624.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-29
AI Technical Summary
The existing ship fuel detection methods are inefficient and costly, making it difficult to quickly identify harmful substances, affecting navigation safety and environmental compliance.
Mid-infrared spectral equipment is used to collect spectral data of fuel samples, and multi-stage identification is carried out through an iterative detection model of layered peeling, including data preprocessing and layer-by-layer analysis of multiple detection sub-models to identify harmful substances in ship fuel.
It improves the efficiency of ship fuel testing, reduces inspection costs, ensures the accuracy and speed of inspection results, and reduces safety hazards caused by detection delays.
Smart Images

Figure CN120385644A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil product detection, and particularly to a method, device, equipment and storage medium for detecting marine fuel oil. Background Technique
[0002] In recent years, with the increasing complexity of the formulation and supply chain of marine fuel oil (i.e., ship fuel oil), traditional high-sulfur heavy fuel oil has gradually been replaced by low-sulfur or ultra-low-sulfur fuel oil, as well as alternative fuels such as biofuels, LNG, methanol, and ammonia. At the same time, the market scale of marine fuel oil remains huge. Under the condition of coexistence of supply and demand, the importance of fuel quality control is further highlighted: if the fuel has quality defects, it will not only cause engine wear, abnormal combustion and excessive emissions, but also pose serious hidden dangers to navigation safety and environmental protection compliance.
[0003] The existing means for detecting marine fuel oil mainly refer to GC-MS (gas chromatography-mass spectrometry). However, some harmful substances have strong polarity and high boiling points, and are not suitable for detection by GC-MS. At the same time, GC-MS requires pretreatment and complex data processing, consuming human and time costs. The detection of marine fuel oil sometimes requires rapid detection. If the speed is too slow, the ship may leave with inferior oil when the report is issued, posing serious hidden dangers to navigation safety and environmental protection compliance.
[0004] Therefore, there is an urgent need for a method for detecting marine fuel oil that can effectively improve the detection efficiency of marine fuel oil and reduce the detection cost. Summary of the Invention
[0005] The main object of the present invention is to provide a method, device, equipment and storage medium for detecting marine fuel oil, aiming to solve the technical problems of low detection efficiency and high detection cost of marine fuel oil in the prior art.
[0006] To achieve the above object, the present invention provides a method for detecting marine fuel oil, the method comprising the following steps:
[0007] Collect spectral data of a marine fuel oil sample through a mid-infrared spectroscopy device;
[0008] Perform data preprocessing on the spectral data to obtain preprocessed spectral data;
[0009] Use a hierarchical peeling iterative detection model to perform multi-stage identification on the preprocessed spectral data to obtain a marine fuel oil detection result. The hierarchical peeling iterative detection model includes multiple detection sub-models, and each detection sub-model selects different bands of the preprocessed spectral data for analysis. Optionally, the step of using the hierarchical peeling iterative detection model to perform multi-stage identification on the preprocessed spectral data to obtain a marine fuel oil detection result includes:
[0010] The dimensionality reduction process is performed on the preprocessed spectral data through the principal component analysis method to obtain characteristic data;
[0011] Clustering is performed based on the characteristic data to obtain a clustering result;
[0012] Based on the clustering result, multiple detection sub-models in the iterative detection model of hierarchical stripping are sequentially applied for layer-by-layer detection to obtain the ship fuel detection result.
[0013] Optionally, the step of based on the clustering result, sequentially applying multiple detection sub-models in the iterative detection model of hierarchical stripping for layer-by-layer detection to obtain the ship fuel detection result includes:
[0014] Based on the clustering result, multiple detection sub-models in the iterative detection model of hierarchical stripping are sequentially applied for layer-by-layer detection, and each layer corresponds to a detection sub-model;
[0015] After each layer is identified, the identified harmful substance characteristics are removed from the clustering result based on the detection result of each layer to obtain the remaining characteristic data;
[0016] The remaining characteristic data is sequentially subjected to dimensionality reduction processing and clustering to obtain the remaining characteristic data to be detected;
[0017] The remaining characteristic data to be detected is input into the detection sub-model of the next layer in the iterative detection model of hierarchical stripping until all harmful substances in the ship fuel sample are detected, and the ship fuel detection result is output.
[0018] Optionally, before the step of collecting the spectral data of the ship fuel sample by the mid-infrared spectroscopy device, it further includes:
[0019] Collect a fuel sample data set, and use the laboratory method to determine the harmful substance information in each sample in the fuel sample data set;
[0020] Use the mid-infrared spectroscopy device to perform spectral analysis on the fuel sample data set to obtain the spectral information of each sample in the fuel sample data set;
[0021] Based on the number of harmful substances, establish an initial iterative detection model of hierarchical stripping;
[0022] According to the fuel sample data set, the harmful substance information in each sample in the fuel sample data set, and the spectral information of each sample in the fuel sample data set, establish a training data set;
[0023] Based on the training data set, train the initial iterative detection model of hierarchical stripping to obtain the iterative detection model of hierarchical stripping.
[0024] Optionally, after the step of using the iterative detection model with hierarchical peeling to perform multi-stage identification on the preprocessed spectral data to obtain the ship fuel detection result, the following steps are further included:
[0025] Collect new fuel sample data as a test set;
[0026] Use the iterative detection model with hierarchical peeling to detect the spectral information corresponding to the test set to obtain a first detection result;
[0027] Use the laboratory method to detect harmful substances in the test set to obtain a second detection result;
[0028] Compare the first detection result with the second detection result and determine whether the comparison result exceeds a preset threshold;
[0029] If the comparison result exceeds the preset threshold, optimize the iterative detection model with hierarchical peeling based on the comparison result to obtain an optimized iterative detection model with hierarchical peeling.
[0030] Optionally, the step of performing data preprocessing on the spectral data to obtain preprocessed spectral data includes:
[0031] Perform smoothing and noise reduction processing on the spectral data using average window movement and wavelet transform to obtain noise-reduced spectral data;
[0032] Perform normalization processing on the noise-reduced spectral data based on the data scale of the noise-reduced spectral data to obtain normalized spectral data;
[0033] Perform centering processing on the normalized spectral data to obtain preprocessed spectral data.
[0034] Optionally, the step of clustering based on the feature data to obtain a clustering result includes:
[0035] Cluster the feature data through a preset clustering algorithm to obtain a clustering result, and display the clustering result through a visual scatter plot.
[0036] In addition, to achieve the above object, the present invention also proposes a ship fuel detection device, and the device includes:
[0037] A data acquisition module for collecting spectral data of a ship fuel sample through a mid-infrared spectroscopy device;
[0038] A data preprocessing module for performing data preprocessing on the spectral data to obtain preprocessed spectral data;
[0039] A fuel detection module is used to perform multi-stage identification on the preprocessed spectral data by using a hierarchical peeling iterative detection model to obtain a ship fuel detection result. The hierarchical peeling iterative detection model includes multiple detection sub-models, and each detection sub-model selects different bands of the preprocessed spectral data for analysis.
[0040] In addition, to achieve the above object, the present invention also provides a ship fuel detection device, which includes: a memory, a processor, and a ship fuel detection program stored on the memory and executable on the processor. The ship fuel detection program is configured to implement the steps of the ship fuel detection method as described above.
[0041] In addition, to achieve the above object, the present invention also provides a storage medium on which a ship fuel detection program is stored. When the ship fuel detection program is executed by a processor, it implements the steps of the ship fuel detection method as described above.
[0042] The present invention discloses collecting spectral data of a ship fuel sample through a mid-infrared spectral device; performing data preprocessing on the spectral data to obtain preprocessed spectral data; using a hierarchical peeling iterative detection model to perform multi-stage identification on the preprocessed spectral data to obtain a ship fuel detection result. The hierarchical peeling iterative detection model includes multiple detection sub-models, and each detection sub-model selects different bands of the preprocessed spectral data for analysis. Since the present invention uses a hierarchical peeling iterative detection model to perform multi-stage identification on the preprocessed spectral data to obtain a ship fuel detection result, compared with the prior art, the present invention effectively improves the detection efficiency of ship fuel and reduces the detection cost. Description of the Drawings
[0043] Figure 1 It is a schematic flowchart of the first embodiment of the ship fuel detection method of the present invention;
[0044] Figure 2 It is a schematic diagram of the specific working process of the ship fuel detection of the present invention;
[0045] Figure 3 It is a schematic flowchart of the second embodiment of the ship fuel detection method of the present invention;
[0046] Figure 4 It is a schematic flowchart of the third embodiment of the ship fuel detection method of the present invention;
[0047] Figure 5 It is a structural block diagram of the first embodiment of the ship fuel detection device of the present invention;
[0048] Figure 6It is a schematic structural diagram of a ship fuel detection device in the hardware operating environment involved in the embodiment of the present invention.
[0049] The realization, functional characteristics and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Specific embodiments
[0050] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0051] The embodiment of the present invention provides a ship fuel detection method, referring to Figure 1 , Figure 1 It is a schematic flowchart of the first embodiment of the ship fuel detection method of the present invention.
[0052] In this embodiment, the ship fuel detection method includes steps S10 to S30:
[0053] Step S10: Collect spectral data of a ship fuel sample through a mid-infrared spectroscopy device.
[0054] It should be noted that the execution subject of this embodiment can be a computer server device with data processing, network communication and program running functions applied to the oil product detection scenario, such as a server, a tablet computer, a personal computer, etc., or an electronic device, a ship fuel detection, etc. that can realize the above functions. Hereinafter, taking ship fuel detection as an example, this embodiment and the following embodiments will be illustrated.
[0055] It should be understood that the above mid-infrared spectroscopy device can be equipped with an ATR module and is a scientific instrument for directly collecting spectral data of a ship fuel sample. The ATR (Attenuated Total Reflectance) module is a commonly used accessory. The ATR module makes the infrared light incident on the interface between the sample and the ATR crystal at an angle greater than the critical angle, so that the infrared light is reflected and attenuated multiple times inside the sample, thereby collecting the infrared spectral information of the sample.
[0056] It should be explained that the harmful substances in ship fuel include at least one of alkyl guaiacol in Estonian shale oil, cashew nut liquid (CNSL), long-chain alcohols (undecanol, dodecanol, pentadecanol, hexadecanol), fatty acids and their monoglycerides (such as palmitic acid, oleic acid, stearic acid and monopalmitin, monoolein, monostearin), naphthenic acid, phenolic compounds (phenol), mildly reactive hydrocarbons (hydrocarbons with double bonds, such as styrene, indene, dicyclopentadiene and dihydrodicyclopentadiene), chlorinated organic compounds (1,2-dichloroethane, chlorobenzene, tetrachloroethylene) and used cooking oil.
[0057] Step S20: Perform data preprocessing on the spectral data to obtain preprocessed spectral data.
[0058] It should be noted that data preprocessing of spectral data may include smoothing, noise reduction, normalization, and centering, etc. By performing data preprocessing on spectral data, the detection efficiency and detection accuracy can be improved.
[0059] In a specific implementation, the spectral data can be smoothed and denoised by using average window moving and wavelet transform to obtain denoised spectral data; the denoised spectral data is normalized based on the data scale of the denoised spectral data to obtain normalized spectral data; the normalized spectral data is centered to obtain preprocessed spectral data.
[0060] It should be explained that the normalization process can be to scale the data of the spectral data to the range of [-1, 1] (divide by the absolute value of the maximum / minimum value), and the centering process can be to set the average value of the spectral data to zero (subtract the average value from all values).
[0061] Step S30: Use a hierarchical peeling iterative detection model to perform multi-stage identification on the preprocessed spectral data to obtain a ship fuel detection result. The hierarchical peeling iterative detection model includes multiple detection sub-models, and each detection sub-model selects different bands of the preprocessed spectral data for analysis.
[0062] It should be noted that each detection sub-model in the hierarchical peeling iterative detection model can at least identify one harmful substance in ship fuel, that is, if there are N harmful substances in ship fuel, at most N - 1 detection sub-models will be required.
[0063] For example, refer to Figure 2 , Figure 2 is a schematic diagram of the specific work flow for ship fuel detection. After the original data is preprocessed by a preprocessing algorithm, the preprocessed spectral data is input into a hierarchical peeling iterative detection model to obtain a ship fuel detection result. The hierarchical peeling iterative detection model includes multiple detection sub-models (such as Figure 2 Model A, Model B, and Model C in
[0064] It should be explained that since there may be many types of harmful substances in ship fuel (i.e., there are many types of compounds to be detected), it is too difficult to identify all of them using a single model. Therefore, model A will be used first to identify at least one of the harmful substances. If no substance is identified, then model B, model C... will be put into use. The reason for this order is that the range of substances detected by model B does not include the types that model A can detect, and the range of substances detected by model C does not include the ranges covered by model A and model B... This modeling method of the hierarchical peeling iterative detection model is a bit like an iteration. After screening out the recognizable substances through a dimensionality reduction algorithm, they are removed from the dataset; then the remaining types of substances are subjected to dimensionality reduction clustering again. After removing the identified components, the dimensionality reduction clustering is repeated until all substances in the ship fuel can be identified or no more substances can be identified. The advantage of this modeling method is that it can avoid completely interpreting complex spectral data at once (which is almost impossible), and iteratively identify all substances through this "peeling" method layer by layer. In this process, each detection sub-model needs to select different bands of spectral data for analysis, and the methods used are also different, which can include PCA, partial least squares method, CNN, etc. When gradually reducing the types included in the dataset to be detected, the difficulty of modeling will be significantly reduced.
[0065] In the specific implementation, step S30 includes steps S301 to S303:
[0066] Step S301: Perform dimensionality reduction processing on the preprocessed spectral data through the principal component analysis method to obtain feature data.
[0067] Step S302: Perform clustering based on the feature data to obtain a clustering result.
[0068] It should be noted that in order to improve data understanding and user experience, in the specific implementation, it also includes clustering the feature data through a preset clustering algorithm to obtain a clustering result, and displaying the clustering result through a visual scatter plot.
[0069] After the clustering result is visualized, it is a scatter plot, where each "point" is a sample. Taking a two-dimensional scatter plot as an example, the "points" of ship fuel samples containing similar components will gather together, and classification operations can be performed through SVM (Support Vector Machine) to achieve automatic classification. The specific output content is the names of various compounds to be detected. Simply put: Different ship fuel samples can be reduced in dimension and become "points" distributed in the coordinate system, and the "points" of ship fuel samples containing the same components will be very close, and algorithms such as SVM can be used to achieve the classification and label output of "points".
[0070] Step S303: Based on the clustering result, successively apply multiple detection sub-models in the hierarchical peeling iterative detection model for layer-by-layer detection to obtain the ship fuel detection result.
[0071] It should be noted that the spectral bands corresponding to the detection sub-models of each layer in the hierarchical peeling iterative detection model are different, and the data to be detected by the detection sub-models of each layer only includes the substance categories not recognized by the previous detection sub-models.
[0072] In a specific implementation, based on the clustering result, multiple detection sub-models in the hierarchical peeling iterative detection model can be successively applied for layer-by-layer detection, with each layer corresponding to a detection sub-model; after each layer is identified, the identified harmful substance features are removed from the clustering result based on the detection result of each layer to obtain the remaining feature data; the remaining feature data is successively subjected to dimensionality reduction processing and clustering to obtain the remaining data to be detected features; the remaining data to be detected features are input into the detection sub-model of the next layer of the hierarchical peeling iterative detection model until all harmful substances in the ship fuel sample are detected, and the ship fuel detection result is output.
[0073] It can be understood that the ship fuel detection result may include the types of harmful substances present in the ship fuel sample and their determination information (the determination information may be information on whether the ship fuel sample is qualified).
[0074] This embodiment discloses collecting spectral data of a ship fuel sample through a mid-infrared spectroscopy device; performing data preprocessing on the spectral data to obtain preprocessed spectral data; using a hierarchical peeling iterative detection model to perform multi-stage identification on the preprocessed spectral data to obtain a ship fuel detection result, where the hierarchical peeling iterative detection model includes multiple detection sub-models, and each detection sub-model selects different bands of the preprocessed spectral data for analysis. Since this embodiment uses a hierarchical peeling iterative detection model to perform multi-stage identification on the preprocessed spectral data to obtain a ship fuel detection result, compared with the prior art, this embodiment effectively improves the detection efficiency of ship fuel and reduces the detection cost.
[0075] Reference Figure 3 , Figure 3 is a schematic flowchart of the second embodiment of the ship fuel detection method of the present invention.
[0076] Based on the above first embodiment, in this embodiment, before the step S10, steps S01 to S05 are further included:
[0077] Step S01: Collect a fuel sample data set and determine the harmful substance information in each sample in the fuel sample data set by using the laboratory method.
[0078] Step S02: Use a mid-infrared spectroscopy device to perform spectral analysis on the fuel sample dataset to obtain the spectral information of each sample in the fuel sample dataset.
[0079] Step S03: Establish an iterative detection model of initial hierarchical stripping based on the quantity of harmful substances.
[0080] Step S04: Establish a training dataset according to the fuel sample dataset, the harmful substance information of each sample in the fuel sample dataset, and the spectral information of each sample in the fuel sample dataset.
[0081] Step S05: Train the iterative detection model of initial hierarchical stripping based on the training dataset to obtain an iterative detection model of hierarchical stripping.
[0082] It should be understood that the laboratory method, as a scientific research method, is mainly carried out in a set laboratory, usually with the aid of various instruments and equipment, and under strictly controlled conditions, accurate data is obtained through repeated experiments.
[0083] It should be noted that the laboratory in this embodiment can be gas chromatography, gas mass spectrometry, liquid chromatography, liquid mass spectrometry, etc., and this embodiment does not limit this.
[0084] It should be explained that the iterative detection model of initial hierarchical stripping can be established based on the quantity of harmful substances. The iterative detection model of initial hierarchical stripping contains multiple detection sub-modules, and each detection sub-model can identify at least one harmful substance, that is, if there are N harmful substances, at most N - 1 detection sub-models are required.
[0085] In specific implementation, the iterative detection model of initial hierarchical stripping can be trained based on the training dataset to obtain a training result; the model parameters of the iterative detection model of initial hierarchical stripping can be adjusted based on the training result to obtain an iterative detection model of hierarchical stripping.
[0086] This embodiment discloses collecting a fuel sample dataset and determining harmful substance information in each sample in the fuel sample dataset by the laboratory method; performing spectral analysis on the fuel sample dataset using a mid-infrared spectroscopy device to obtain spectral information of each sample in the fuel sample dataset; establishing an iterative detection model of initial hierarchical peeling based on the quantity of harmful substances; establishing a training dataset according to the fuel sample dataset, the harmful substance information in each sample in the fuel sample dataset, and the spectral information of each sample in the fuel sample dataset; and training the iterative detection model of initial hierarchical peeling based on the training dataset to obtain an iterative detection model of hierarchical peeling. Since this embodiment determines the harmful substance information in each sample in the fuel sample dataset by the laboratory method, uses a mid-infrared spectroscopy device to obtain the spectral information of each sample in the fuel sample dataset, establishes an iterative detection model of initial hierarchical peeling based on the quantity of harmful substances, establishes a training dataset, and trains the iterative detection model of initial hierarchical peeling based on the training dataset to obtain an iterative detection model of hierarchical peeling, compared with the prior art, this embodiment improves the detection accuracy of the iterative detection model of hierarchical peeling.
[0087] Reference Figure 4 , Figure 4 is a schematic flowchart of the third embodiment of the ship fuel detection method of the present invention.
[0088] Based on the above embodiments, in this embodiment, after step S30, steps S40 to S80 are further included:
[0089] Step S40: Collect new fuel sample data as a test set.
[0090] Step S50: Use the iterative detection model of hierarchical peeling to detect the spectral information corresponding to the test set to obtain a first detection result.
[0091] Step S60: Use the laboratory method to detect harmful substances in the test set to obtain a second detection result.
[0092] Step S70: Compare the first detection result with the second detection result and determine whether the comparison result exceeds a preset threshold.
[0093] Step S80: If the comparison result exceeds the preset threshold, optimize the iterative detection model of hierarchical peeling based on the comparison result to obtain an optimized iterative detection model of hierarchical peeling.
[0094] It should be noted that in order to ensure the reliability of the experimental results and the effectiveness of the iterative detection model for hierarchical stripping, new fuel sample data can be collected as the test set, and the spectral information of the test set can be detected using the iterative detection model for hierarchical stripping. The types of harmful substances can be identified based on the detection results and compared with the results of the laboratory method. If the results are good, it indicates that the iterative detection model for hierarchical stripping is qualified; if the results are not satisfactory, the iterative detection model for hierarchical stripping is optimized until it is qualified, and the optimized iterative detection model for hierarchical stripping is obtained.
[0095] It can be understood that the comparison result between the first detection result and the second detection result can be the difference in the harmful substances detected in the first detection result and the second detection result. If the comparison result (i.e., the difference in the harmful substances detected in the first detection result and the second detection result) exceeds the preset threshold, the model of the iterative detection model for hierarchical stripping is optimized based on the comparison result; if the comparison result does not exceed the preset threshold, it indicates that the iterative detection model for hierarchical stripping is qualified and there is no need to optimize the iterative detection model for hierarchical stripping.
[0096] This embodiment discloses collecting new fuel sample data as the test set; detecting the spectral information corresponding to the test set using the iterative detection model for hierarchical stripping to obtain a first detection result; detecting the harmful substances in the test set using the laboratory method to obtain a second detection result; comparing the first detection result with the second detection result and determining whether the comparison result exceeds the preset threshold; if the comparison result exceeds the preset threshold, the model of the iterative detection model for hierarchical stripping is optimized based on the comparison result to obtain an optimized iterative detection model for hierarchical stripping. Since this embodiment compares the detection result of the iterative detection model for hierarchical stripping with the detection result of the laboratory method and optimizes the iterative detection model for hierarchical stripping according to the comparison result, compared with the prior art, this embodiment ensures the reliability of the experimental results and the effectiveness of the iterative detection model for hierarchical stripping.
[0097] In addition, an embodiment of the present invention also proposes a storage medium, on which a ship fuel detection program is stored. When the ship fuel detection program is executed by a processor, the steps of the ship fuel detection method described above are implemented.
[0098] Refer to Figure 5 , Figure 5 which is the structural block diagram of the first embodiment of the ship fuel detection device of the present invention.
[0099] As Figure 5 shown, the ship fuel detection device proposed in the embodiment of the present invention includes: a data acquisition module 501, a data preprocessing module 502, and a fuel detection module 503.
[0100] The data acquisition module 501 is configured to acquire spectral data of a ship fuel sample through a mid-infrared spectroscopy device.
[0101] The data preprocessing module 502 is configured to perform data preprocessing on the spectral data to obtain preprocessed spectral data.
[0102] The fuel detection module 503 is configured to perform multi-stage identification on the preprocessed spectral data by using an iterative detection model of hierarchical peeling to obtain a ship fuel detection result. The iterative detection model of hierarchical peeling includes a plurality of detection sub-models, and each detection sub-model selects different bands of the preprocessed spectral data for analysis.
[0103] The fuel detection module 503 is further configured to perform dimensionality reduction processing on the preprocessed spectral data through principal component analysis to obtain feature data; perform clustering based on the feature data to obtain a clustering result; and based on the clustering result, sequentially apply a plurality of detection sub-models in the iterative detection model of hierarchical peeling for layer-by-layer detection to obtain a ship fuel detection result.
[0104] The fuel detection module 503 is further configured to, based on the clustering result, sequentially apply a plurality of detection sub-models in the iterative detection model of hierarchical peeling for layer-by-layer detection, with each layer corresponding to a detection sub-model; after each layer is identified, based on the detection result of each layer, eliminate the identified harmful substance features from the clustering result to obtain remaining feature data; perform dimensionality reduction processing and clustering on the remaining feature data in sequence to obtain remaining feature data to be detected; and input the remaining feature data to the detection sub-model of the next layer in the iterative detection model of hierarchical peeling until all harmful substances in the ship fuel sample are detected, and output a ship fuel detection result.
[0105] The data preprocessing module 502 is further configured to perform smoothing and noise reduction processing on the spectral data by using average window movement and wavelet transform to obtain noise-reduced spectral data; perform normalization processing on the noise-reduced spectral data based on the data scale of the noise-reduced spectral data to obtain normalized spectral data; and perform centering processing on the normalized spectral data to obtain preprocessed spectral data.
[0106] The fuel detection module 503 is further configured to perform clustering on the feature data through a preset clustering algorithm to obtain a clustering result, and display the clustering result through a visual scatter plot.
[0107] An embodiment of the present device discloses collecting spectral data of a ship fuel sample through a mid-infrared spectroscopy device; performing data preprocessing on the spectral data to obtain preprocessed spectral data; using an iterative detection model with hierarchical peeling to perform multi-stage identification on the preprocessed spectral data to obtain a ship fuel detection result, where the iterative detection model with hierarchical peeling includes multiple detection sub-models, and each detection sub-model selects different bands of the preprocessed spectral data for analysis. Since the embodiment of the present device uses an iterative detection model with hierarchical peeling to perform multi-stage identification on the preprocessed spectral data to obtain a ship fuel detection result, compared with the prior art, the embodiment of the present device effectively improves the detection efficiency of ship fuel and reduces the detection cost.
[0108] Based on the first embodiment of the ship fuel detection device of the present invention, a second embodiment of the ship fuel detection device of the present invention is proposed.
[0109] In this embodiment, the data acquisition module 501 is further configured to collect a fuel sample data set, and use the laboratory method to determine the harmful substance information in each sample in the fuel sample data set; perform spectral analysis on the fuel sample data set using a mid-infrared spectroscopy device to obtain the spectral information of each sample in the fuel sample data set; establish an initial iterative detection model with hierarchical peeling based on the quantity of harmful substances; establish a training data set according to the fuel sample data set, the harmful substance information in each sample in the fuel sample data set, and the spectral information of each sample in the fuel sample data set; and train the initial iterative detection model with hierarchical peeling based on the training data set to obtain an iterative detection model with hierarchical peeling.
[0110] Other embodiments or specific implementation manners of the ship fuel detection device of the present invention may refer to the above method embodiments, and will not be elaborated here.
[0111] The present application provides a ship fuel detection device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the ship fuel detection method in the first embodiment above.
[0112] Next, refer to Figure 6, which shows a schematic structural diagram of a ship fuel detection device suitable for implementing the embodiments of the present application. The ship fuel detection device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The shown ship fuel detection device is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0113] As Figure 6 shown, the ship fuel detection device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1002 or the program loaded from the storage device 1003 into the random access memory 1004. In the random access memory 1004, various programs and data required for the operation of the ship fuel detection device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. The input / output interface 1006 is also connected to the bus. Generally, the following systems may be connected to the input / output interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the ship fuel detection device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a ship fuel detection device with various systems, it should be understood that it is not required to implement or have all the shown systems. More or fewer systems may be implemented or had alternatively.
[0114] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium. The computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a read-only memory 1002. When the computer program is executed by a processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.
[0115] The ship fuel detection device provided by the present application adopts the ship fuel detection method in the above embodiment, and can solve the technical problems of low detection efficiency and high detection cost of ship fuel in the prior art. Compared with the prior art, the beneficial effects of the ship fuel detection device provided by the present application are the same as those of the ship fuel detection method provided by the above embodiment, and other technical features in the ship fuel detection device are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.
[0116] It should be understood that each part disclosed in the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0117] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present application, and all of them should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0118] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such a process, method, article or system. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or system including the element.
[0119] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0120] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory / random access memory, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0121] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for detecting ship fuel, characterized in that, The method includes: Collecting spectral data of ship fuel samples through a mid-infrared spectroscopy device; Performing data preprocessing on the spectral data to obtain preprocessed spectral data; Using a hierarchical peeling iterative detection model to perform multi-stage identification on the preprocessed spectral data to obtain a ship fuel detection result, where the hierarchical peeling iterative detection model includes multiple detection sub-models, and each detection sub-model selects different bands of the preprocessed spectral data for analysis.
2. The method for detecting ship fuel as claimed in claim 1, wherein, The step of using the hierarchical peeling iterative detection model to perform multi-stage identification on the preprocessed spectral data to obtain a ship fuel detection result includes: Performing dimensionality reduction processing on the preprocessed spectral data through principal component analysis to obtain feature data; Performing clustering based on the feature data to obtain a clustering result; Based on the clustering result, successively applying multiple detection sub-models in the hierarchical peeling iterative detection model for layer-by-layer detection to obtain a ship fuel detection result.
3. The ship fuel detection method according to claim 2, wherein The step of, based on the clustering result, successively applying multiple detection sub-models in the hierarchical peeling iterative detection model for layer-by-layer detection to obtain a ship fuel detection result includes: Based on the clustering result, successively applying multiple detection sub-models in the hierarchical peeling iterative detection model for layer-by-layer detection, with each layer corresponding to a detection sub-model; After each layer is identified, based on the detection result of each layer, removing the identified harmful substance features from the clustering result to obtain remaining feature data; Performing dimensionality reduction processing and clustering on the remaining feature data successively to obtain remaining feature data to be detected; Inputting the remaining feature data to be detected into the detection sub-model of the next layer of the hierarchical peeling iterative detection model until the detection of all harmful substances in the ship fuel sample is completed, and outputting a ship fuel detection result.
4. The method for detecting ship fuel as claimed in claim 1, wherein Before the step of collecting spectral data of ship fuel samples through a mid-infrared spectroscopy device, it further includes: Collecting a fuel sample data set and measuring the harmful substance information in each sample in the fuel sample data set by the laboratory method; Performing spectral analysis on the fuel sample data set using a mid-infrared spectroscopy device to obtain the spectral information of each sample in the fuel sample data set; Establishing an initial hierarchical peeling iterative detection model based on the number of harmful substances; Establishing a training data set according to the fuel sample data set, the harmful substance information in each sample in the fuel sample data set, and the spectral information of each sample in the fuel sample data set; Training the initial hierarchical peeling iterative detection model based on the training data set to obtain a hierarchical peeling iterative detection model.
5. The method for detecting ship fuel as claimed in claim 1, wherein, After the step of using the hierarchical peeling iterative detection model to perform multi-stage identification on the preprocessed spectral data to obtain a ship fuel detection result, it further includes: Collecting new fuel sample data as a test set; Using the hierarchical peeling iterative detection model to detect the spectral information corresponding to the test set to obtain a first detection result; Using the laboratory method to detect the harmful substances in the test set to obtain a second detection result; Compare the first detection result with the second detection result, and determine whether the comparison result exceeds a preset threshold; If the comparison result exceeds the preset threshold, optimize the iterative detection model for hierarchical peeling based on the comparison result to obtain an optimized iterative detection model for hierarchical peeling.
6. The ship fuel detection method according to claim 1, characterized in that The step of performing data preprocessing on the spectral data to obtain preprocessed spectral data includes: Perform smoothing and noise reduction processing on the spectral data using average window movement and wavelet transform to obtain noise-reduced spectral data; Perform normalization processing on the noise-reduced spectral data based on the data scale of the noise-reduced spectral data to obtain normalized spectral data; Perform centering processing on the normalized spectral data to obtain preprocessed spectral data.
7. The method for detecting ship fuel as claimed in claim 2, wherein, The step of performing clustering on the feature data to obtain a clustering result includes: Perform clustering on the feature data through a preset clustering algorithm to obtain a clustering result, and display the clustering result through a visualization scatter plot.
8. A ship fuel detection device, characterized in that, The device includes: A data acquisition module for acquiring spectral data of a ship fuel sample through a mid-infrared spectroscopy device; A data preprocessing module for performing data preprocessing on the spectral data to obtain preprocessed spectral data; A fuel detection module for performing multi-stage identification on the preprocessed spectral data using an iterative detection model for hierarchical peeling to obtain a ship fuel detection result. The iterative detection model for hierarchical peeling includes multiple detection sub-models, and each detection sub-model selects different bands of the preprocessed spectral data for analysis.
9. A ship fuel detection device, characterized in that, The device includes: a memory, a processor, and a ship fuel detection program stored on the memory and executable on the processor. The ship fuel detection program is configured to implement the steps of the ship fuel detection method according to any one of claims 1 to 7.
10. A storage medium, characterized in that, A ship fuel detection program is stored on the storage medium. When the ship fuel detection program is executed by a processor, it implements the steps of the ship fuel detection method according to any one of claims 1 to 7.