A method and system for identifying petroleum oil types

By processing petroleum fluorescence spectral data and optimizing support vector machines, the problem of low recognition efficiency of petroleum oil species in the prior art is solved, and a fast and efficient recognition effect is achieved.

CN114298205BActive Publication Date: 2025-04-25YANSHAN UNIV +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111599892.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2025-04-25
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

The existing mineral oil detection methods in water have problems such as manual operation errors, slow operation speed and low efficiency, making it difficult to achieve fast and efficient identification of petroleum oil types.

Method used

By obtaining multiple sets of petroleum fluorescence spectral data under different concentration ratios, descattering, interpolation correction, reconstruction and decomposition, the concentration fluorescence spectral matrix is ​​obtained, and after normalization, the data is inputted to the support vector machine optimized by the Firefly algorithm and the Sparrow Search algorithm for identification.

Benefits of technology

It realizes rapid and efficient identification of petroleum oil species, avoids the problem of local optimal solutions during training, and improves classification accuracy and convergence speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114298205B_ABST
    Figure CN114298205B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for identifying petroleum oil species, the method comprising: obtaining multiple groups of petroleum fluorescence spectrum data under different concentration ratios; performing descattering processing and interpolation correction on the multiple groups of petroleum fluorescence spectrum data under different concentration ratios to obtain effective petroleum fluorescence spectrum data; reconstructing and decomposing the effective petroleum fluorescence spectrum data to obtain a concentration fluorescence spectrum matrix; normalizing the concentration fluorescence spectrum matrix to obtain petroleum concentration fluorescence spectrum data; inputting the petroleum concentration fluorescence spectrum data into a training model to obtain an identification result of petroleum oil species; the training model is obtained by optimizing and training a support vector machine using a firefly algorithm and a sparrow search algorithm. The present invention can realize rapid and efficient identification of petroleum oil species.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of petroleum oil classification detection, and in particular to a petroleum oil identification method and system. Background Art

[0002] While the petroleum industry benefits mankind, it also seriously harms the ecological environment. In the process of oil transportation or extraction, oil spills often occur, causing oil spill pollution. Petroleum pollutants contain a variety of harmful substances, including saturated and unsaturated aliphatic hydrocarbons, volatile organic compounds (VOCs), and polycyclic aromatic hydrocarbons (PAHs). Many of these substances are toxic, irritating, and carcinogenic. Therefore, the pollution caused by oil spills has an immeasurable impact and damage on marine life and the ecological environment. Even when they appear in people’s production and life, they will threaten human life and health. Therefore, a fast and efficient method for identifying petroleum oil types is established, and a preliminary exploration is made on whether the dissolved part of the oil spill can be identified. When an actual oil spill occurs, the type of oil spill can be quickly and conveniently identified.

[0003] The existing method for detecting mineral oil in water first prepares a plurality of standard mineral oil samples, obtains fluorescence spectrum data by three-dimensional fluorescence spectroscopy, thereby constructing a three-dimensional fluorescence spectrum database, and then uses fluorescence spectroscopy to detect the mineral oil to be tested, and matches the obtained three-dimensional fluorescence spectrum to be tested with the three-dimensional fluorescence spectrum in the database, thereby determining the type and concentration of the mineral oil to be tested. This method measures the sample to be tested by establishing a sample database, and in this process, there may be erroneous judgments due to manual operation, and there may also be many problems such as slow operation speed and low efficiency. Therefore, the study of a fast and efficient method for identifying petroleum oils has become an urgent problem to be solved. Summary of the invention

[0004] The purpose of the present invention is to provide a petroleum oil type identification method and system to achieve rapid and efficient identification of petroleum oil types.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] A method for identifying petroleum oil types, comprising:

[0007] Obtain multiple sets of petroleum fluorescence spectrum data at different concentration ratios;

[0008] De-scattering processing and interpolation correction are performed on multiple groups of petroleum fluorescence spectrum data at different concentration ratios to obtain effective petroleum fluorescence spectrum data;

[0009] Reconstructing and decomposing the effective petroleum fluorescence spectrum data to obtain a concentration fluorescence spectrum matrix;

[0010] Normalizing the concentration fluorescence spectrum matrix to obtain petroleum concentration fluorescence spectrum data;

[0011] The petroleum concentration fluorescence spectrum data is input into a training model to obtain a petroleum oil type recognition result; the training model is obtained by optimizing and training a support vector machine using a firefly algorithm and a sparrow search algorithm.

[0012] Optionally, the de-scattering processing and interpolation correction are performed on the multiple groups of petroleum fluorescence spectrum data under different concentration ratios to obtain effective petroleum fluorescence spectrum data, specifically including:

[0013] De-scattering the petroleum fluorescence spectrum data using an interpolation correction algorithm to obtain de-scattered petroleum fluorescence spectrum data;

[0014] The descattered petroleum fluorescence spectrum data is eliminated according to the set confidence limit to obtain effective petroleum fluorescence spectrum data.

[0015] Optionally, the interpolation correction algorithm is specifically a cubic Hermite interpolation method.

[0016] Optionally, the reconstructing and decomposing the effective petroleum fluorescence spectrum data to obtain a concentration fluorescence spectrum matrix specifically includes:

[0017] Reconstructing the effective petroleum fluorescence spectrum data to obtain a plurality of single oil fluorescence spectrum data;

[0018] The parallel factor algorithm is used to decompose the fluorescence spectrum data of the plurality of single oils respectively to obtain a plurality of concentration fluorescence spectrum matrices.

[0019] Optionally, the normalizing the concentration fluorescence spectrum matrix to obtain petroleum concentration fluorescence spectrum data specifically includes:

[0020] Reorganizing the concentration fluorescence spectrum matrix row by row to obtain a reorganized concentration fluorescence spectrum matrix;

[0021] The recombined concentration fluorescence spectrum matrix is ​​normalized to obtain petroleum concentration fluorescence spectrum data.

[0022] Optionally, the optimization and training process of the training model specifically includes:

[0023] According to the single petroleum concentration fluorescence spectrum data, the sparrow search algorithm is used to optimize and the firefly algorithm is used to perturb, and the penalty parameters and kernel function parameters of the support vector machine are obtained;

[0024] Inputting the penalty parameter and the kernel function parameter into the support vector machine and training the support vector machine using the petroleum concentration fluorescence spectrum data of the training set to obtain a training model;

[0025] The training model is predicted using the petroleum concentration fluorescence spectrum data of the test set.

[0026] Optionally, the single petroleum concentration fluorescence spectrum data is optimized using a sparrow search algorithm and disturbed using a firefly algorithm to obtain a penalty parameter and a kernel function parameter of a support vector machine, specifically including:

[0027] According to the single petroleum concentration fluorescence spectrum data, a sparrow search algorithm is used to update the position to obtain the sparrow at the optimal position;

[0028] Use the firefly algorithm to disturb all sparrows and get the disturbed sparrows;

[0029] Comparing the sparrows at the optimal position with the sparrows after the disturbance to determine the optimal position;

[0030] The penalty parameter and kernel function parameter of the support vector machine are determined according to the optimal position.

[0031] A petroleum oil type identification system, comprising:

[0032] An acquisition module is used to acquire multiple sets of petroleum fluorescence spectrum data at different concentration ratios;

[0033] A descattering processing and interpolation correction module is used to perform descattering processing and interpolation correction on multiple groups of petroleum fluorescence spectrum data under different concentration ratios to obtain effective petroleum fluorescence spectrum data;

[0034] A reconstruction and decomposition module, used for reconstructing and decomposing the effective petroleum fluorescence spectrum data to obtain a concentration fluorescence spectrum matrix;

[0035] A normalization processing module, used for normalizing the concentration fluorescence spectrum matrix to obtain petroleum concentration fluorescence spectrum data;

[0036] The recognition result determination module is used to input the petroleum concentration fluorescence spectrum data into the training model to obtain the recognition result of the petroleum type; the training model is obtained by optimizing and training the support vector machine using the firefly algorithm and the sparrow search algorithm.

[0037] Optionally, the descattering processing and interpolation correction module specifically includes:

[0038] A descattering processing unit, used for performing descattering processing on the petroleum fluorescence spectrum data by using an interpolation correction algorithm to obtain descattered petroleum fluorescence spectrum data;

[0039] The elimination unit is used to eliminate the descattered petroleum fluorescence spectrum data according to a set confidence limit to obtain effective petroleum fluorescence spectrum data.

[0040] Optionally, the optimization and training process of the training model specifically includes:

[0041] According to the single petroleum concentration fluorescence spectrum data, the sparrow search algorithm is used to optimize and the firefly algorithm is used to perturb, and the penalty parameters and kernel function parameters of the support vector machine are obtained;

[0042] Inputting the penalty parameter and the kernel function parameter into the support vector machine and training the support vector machine using the petroleum concentration fluorescence spectrum data of the training set to obtain a training model;

[0043] The training model is predicted using the petroleum concentration fluorescence spectrum data of the test set.

[0044] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0045] The present invention provides a method and system for identifying petroleum oil types. The method and system perform descattering processing and interpolation correction on multiple groups of petroleum fluorescence spectrum data under different concentration ratios to obtain effective petroleum fluorescence spectrum data; reconstruct and decompose the effective petroleum fluorescence spectrum data to obtain a concentration fluorescence spectrum matrix; normalize the concentration fluorescence spectrum matrix to obtain petroleum concentration fluorescence spectrum data; input the petroleum concentration fluorescence spectrum data into a training model to obtain the identification result of petroleum oil types; the training model is obtained by optimizing and training a support vector machine using a firefly algorithm and a sparrow search algorithm. Optimizing and training a support vector machine using a firefly algorithm and a sparrow search algorithm can provide convergence speed and accuracy, while also avoiding the problem of local optimal solutions in the training process, thereby achieving rapid and efficient identification of petroleum oil types. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0047] Figure 1A flow chart of the petroleum oil type identification method provided by the present invention;

[0048] Figure 2 A schematic diagram of a petroleum oil type identification method provided by the present invention in a specific application;

[0049] Figure 3 A schematic diagram of a specific embodiment of actually identifying and analyzing the petroleum fluorescence spectrum data collected by a fluorescence spectrometer;

[0050] Figure 4 This is a schematic diagram of the petroleum oil type identification system provided by the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] The purpose of the present invention is to provide a petroleum oil type identification method and system to achieve rapid and efficient identification of petroleum oil types.

[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] like Figure 1 As shown, the present invention provides a method for identifying petroleum oil types, comprising:

[0055] Step 101: Acquire multiple sets of petroleum fluorescence spectrum data at different concentration ratios. Use a fluorescence spectrometer to collect multiple sets of two-dimensional petroleum fluorescence spectrum data at different concentration ratios.

[0056] Step 102: Descattering and interpolation correction are performed on multiple groups of petroleum fluorescence spectrum data at different concentration ratios to obtain effective petroleum fluorescence spectrum data. Specifically, descattering and interpolation correction are performed on multiple groups of petroleum fluorescence spectrum data at different concentration ratios to obtain effective petroleum fluorescence spectrum data, which includes: descattering the petroleum fluorescence spectrum data using an interpolation correction algorithm to obtain descattered petroleum fluorescence spectrum data; and removing the descattered petroleum fluorescence spectrum data according to a set confidence limit to obtain effective petroleum fluorescence spectrum data. The interpolation correction algorithm is specifically a cubic Hermite interpolation method.

[0057] De-scattering processing is performed on multiple sets of two-dimensional petroleum fluorescence spectrum data, and abnormal data are eliminated to obtain relatively complete and effective two-dimensional petroleum fluorescence spectrum data. Rayleigh scattering in two-dimensional petroleum fluorescence spectrum data is eliminated using an interpolation correction algorithm. The region range where Rayleigh scattering exists is set, and then the value of the region range is set to empty. The value of the region is interpolated and filled using normal fluorescence spectrum data near the scattering to obtain the corrected petroleum fluorescence spectrum data, and then the confidence limit is determined. Any error exceeding this limit is considered to be an abnormal value, and thus it is eliminated to obtain more effective two-dimensional petroleum fluorescence spectrum data.

[0058] Step 103: reconstruct and decompose the effective petroleum fluorescence spectrum data to obtain a concentration fluorescence spectrum matrix. The step of reconstructing and decomposing the effective petroleum fluorescence spectrum data to obtain a concentration fluorescence spectrum matrix specifically includes: reconstructing the effective petroleum fluorescence spectrum data to obtain a plurality of single oil fluorescence spectrum data; and decomposing the plurality of single oil fluorescence spectrum data using a parallel factor algorithm to obtain a plurality of concentration fluorescence spectrum matrices.

[0059] The effective petroleum fluorescence spectrum data obtained in step 102 is reconstructed and decomposed using a second-order correction algorithm to obtain a two-dimensional concentration fluorescence spectrum matrix. The effective petroleum fluorescence spectrum data obtained in step 102 is reconstructed, multiple groups of petroleum fluorescence spectrum data are combined into a three-dimensional petroleum fluorescence spectrum data, and the three-dimensional petroleum fluorescence spectrum data is decomposed using a second-order correction algorithm to obtain a two-dimensional concentration fluorescence spectrum matrix.

[0060] Step 104: normalize the concentration fluorescence spectrum matrix to obtain petroleum concentration fluorescence spectrum data. The normalizing the concentration fluorescence spectrum matrix to obtain petroleum concentration fluorescence spectrum data specifically includes: reorganizing the concentration fluorescence spectrum matrix by row to obtain a reorganized concentration fluorescence spectrum matrix; normalizing the reorganized concentration fluorescence spectrum matrix to obtain petroleum concentration fluorescence spectrum data.

[0061] The two-dimensional concentration fluorescence spectrum matrix obtained in step 103 is normalized and divided into a training set and a test set. The two-dimensional concentration fluorescence spectrum matrix obtained in step 103 is normalized, and each element value in the two-dimensional concentration fluorescence spectrum matrix is ​​mapped to the interval range of 0 to 1 to obtain normalized petroleum concentration fluorescence spectrum data, which is then divided into a training set and a test set.

[0062] Step 105: Input the petroleum concentration fluorescence spectrum data into a training model to obtain a petroleum oil type recognition result; the training model is obtained by optimizing and training a support vector machine using a firefly algorithm and a sparrow search algorithm.

[0063] The optimization and training process of the training model specifically includes:

[0064] According to the single petroleum concentration fluorescence spectrum data, the sparrow search algorithm is used for optimization and the firefly algorithm is used for perturbation to obtain the penalty parameters and kernel function parameters of the support vector machine. According to the single petroleum concentration fluorescence spectrum data, the sparrow search algorithm is used for optimization and the firefly algorithm is used for perturbation to obtain the penalty parameters and kernel function parameters of the support vector machine, which specifically includes: according to the single petroleum concentration fluorescence spectrum data, the sparrow search algorithm is used for position update to obtain the sparrow at the optimal position; the firefly algorithm is used to perturb all sparrows to obtain the perturbed sparrow; the sparrow at the optimal position is compared with the perturbed sparrow to determine the optimal position; the penalty parameters and kernel function parameters of the support vector machine are determined according to the optimal position.

[0065] The penalty parameter and the kernel function parameter are input into the support vector machine and the support vector machine is trained using the petroleum concentration fluorescence spectrum data of the training set to obtain a training model.

[0066] The training model is predicted using the petroleum concentration fluorescence spectrum data of the test set.

[0067] The training set and test set of petroleum concentration fluorescence spectrum data were trained and analyzed, and the firefly and sparrow search fusion algorithm was used to optimize the support vector machine to realize the identification and classification of petroleum types. The firefly and sparrow search fusion algorithm is used to optimize the penalty parameters and kernel function parameters in the support vector machine. In the process of training the concentration fluorescence spectrum data of petroleum, it is difficult for the support vector machine to independently select the optimal penalty parameters and kernel function parameters, so the firefly and sparrow search fusion algorithm is used to implement it. The algorithm is initialized as a set of random solutions. In each iteration, the sparrows in the sparrow search algorithm will find the individual local optimum and the global optimum of the population through searching, foraging and observation behaviors to update their positions. Then all sparrows and the optimal sparrow are disturbed by fireflies, and the sparrows after disturbance are compared with the sparrows before disturbance. If it is better, the sparrow position is updated to achieve another update of the position. After multiple iterations, the best position is obtained. Finally, the two parameters of the best position are set as the penalty parameters and kernel function parameters of the support vector machine respectively. The obtained optimal parameters are input into the support vector machine, the training set is trained, and the test set is verified and analyzed to achieve the classification and identification of petroleum oil types.

[0068] The method provided by the present invention uses a fluorescence spectrometer to collect multiple groups of petroleum fluorescence spectrum data under different concentration ratios, and then uses an interpolation correction algorithm to eliminate Rayleigh scattering, and determines the confidence limit to eliminate abnormal data in the petroleum fluorescence spectrum data, so as to obtain multiple groups of complete and effective two-dimensional petroleum fluorescence spectrum data; the obtained multiple groups of two-dimensional petroleum fluorescence spectrum data are reconstructed to obtain three-dimensional petroleum fluorescence spectrum data, and the three-dimensional petroleum fluorescence spectrum data are decomposed by a second-order correction algorithm to obtain petroleum concentration fluorescence spectrum data, and normalized, and divided into a training set and a test set; finally, the firefly and sparrow search fusion algorithm are used to optimize the support vector machine to train the training set of petroleum concentration fluorescence spectrum data, and the test set is verified and analyzed, so as to realize the classification and identification of petroleum oils. Compared with the traditional optimization algorithm, the search capability provided by the present invention is stronger, the problem of local optimality is avoided, and the classification accuracy and convergence speed are better.

[0069] like Figure 2 As shown, the present invention also provides a specific process of a petroleum oil type identification method in practical application:

[0070] Step 1: Use a fluorescence spectrometer to collect N groups of single oil fluorescence spectrum data at different concentration ratios.

[0071] Fluorescence spectrometer was used to collect N 1 Group Diesel, N 2 Group Industrial White Oil, N 3 Group aviation kerosene, N 4 Group Lubricants and N 5 There are N groups of single oil fluorescence spectrum data for gasoline. During the acquisition process, the excitation and emission wavelength ranges are set according to the spectral characteristics of the object to be measured. According to Stokes' law, the emission scan start wavelength is set to lag behind the excitation scan start wavelength. According to the fluorescence intensity of the object to be measured, the excitation and emission end slit widths are set. The set step size should be less than 3 times the slit width to obtain N groups of single oil fluorescence spectrum data.

[0072] Step 2: De-scattering processing is performed on all single oil fluorescence spectrum data obtained in step 1, and abnormal data are eliminated to obtain M groups of complete and effective single oil fluorescence spectrum data.

[0073] The N groups of single oil fluorescence spectrum data obtained in step 1 are descattered by using the cubic Hermite interpolation method, and the scattering area range is set. The value of the scattering area in the fluorescence spectrum data is set to NAN, and then the NAN value is interpolated and corrected by the cubic Hermite interpolation method to obtain a relatively complete single oil fluorescence spectrum data. The abnormal data of the N groups of single oil fluorescence spectrum data are eliminated, and then the confidence limit Leverage value is determined. Any error exceeding this limit is considered to be an abnormal value and is eliminated to obtain each M 1 、M 2 、M 3 、M 4 and M 5 A total of M groups of more effective single oil fluorescence spectral data are collected for diesel, industrial white oil, aviation kerosene, lubricating oil and gasoline.

[0074] Step 3: Reconstruct the petroleum fluorescence spectrum data obtained in step 2 and decompose it using a parallel factor algorithm to obtain a concentration fluorescence spectrum matrix A.

[0075] For the M obtained in step 2 1 、M 2 、M 3 、M 4 and M 5 Diesel, industrial white oil, aviation kerosene, lubricating oil and gasoline are reconstructed into five three-dimensional single oil fluorescence spectrum data, which contain three dimensions of xyz, where the x dimension represents the emission wavelength range, the y dimension represents the excitation wavelength range, and the z dimension is the corresponding fluorescence intensity. The parallel factor analysis (PARAFAC) algorithm is then used to decompose the five single oils to obtain five two-dimensional concentration fluorescence spectrum matrices A.

[0076] Step 4: reorganize the five two-dimensional concentration fluorescence spectrum data A obtained in step 3, complete data normalization processing, and divide them into training set and test set.

[0077] The five two-dimensional concentration fluorescence spectrum matrices A obtained in step three are reorganized row by row to become a two-dimensional concentration fluorescence spectrum matrix, and then normalized to map each element value in the two-dimensional concentration fluorescence spectrum matrix to the range of 0 to 1 to obtain the normalized petroleum concentration fluorescence spectrum data, which is then divided into training set and test set, and the training set label and test set label are obtained.

[0078] Step 5. Perform training analysis on the training set and test set of the single oil concentration fluorescence spectrum data obtained in step 4, use the firefly and sparrow search fusion algorithm to optimize the support vector machine to realize the identification and classification of petroleum oil types, and compare and analyze the petroleum oil type identification achieved by the particle swarm optimization support vector machine and the genetic algorithm optimized support vector machine.

[0079] For the classification and recognition of fluorescence spectrum data of single oil concentration, it is difficult for the support vector machine (SVM) to independently select the optimal penalty parameter c and kernel function parameter g, so the Firefly and Sparrow Search Algorithm (FA-SSA) is used to implement it. The algorithm is initialized as a set of random solutions. In each iteration, the sparrow search algorithm (SSA) will find the individual local optimum and the global optimum of the population through searching, foraging and observation behaviors to update the position. Among them, the task of the discoverer is to search for food for the population and provide foraging directions for other sparrows, so the search range is wide, X ik is the position information of the i-th sparrow in the k-th dimension, and the position update algorithm for each iteration is: iter max is the maximum number of iterations, α∈(0,1] is any number between 0 and 1, Q is a random number that follows a normal distribution, L is a 1×d matrix of all 1s, R 2 is the warning value, ST is the safety value. When the warning value is less than the safety value, there is no predator in the foraging environment, so the discoverer can conduct a wide search. When the warning value is greater than the safety value, there is a predator in the foraging environment, so the discoverer will issue a warning to make all sparrows fly to a safe area for foraging. During the foraging process, the joiner will always observe the behavior of the discoverer and compete with the discoverer for food. Once successful, the position is updated as described above. If it fails, the position update algorithm is: X p is the current local optimal value, X worse is the current global worst value, A + is a pseudo-inverse matrix and satisfies A + =A T (AA T ) -1 , and the 1×d matrix with elements of 1 or -1, when i>n / 2, it means that the i-th joiner with low fitness will fly away because of lack of food; in the sparrow population, there are also scouts, whose main task is to scout the danger level around the population, and their position update algorithm is: β is the step size control parameter, K is a random number between -1 and 1, ε is a constant, and X bestis the current global optimal value, f i is the current individual fitness value of the sparrow, f g is the global optimal fitness value, f w is the global worst fitness value, when f i >f g When the sparrows are at the edge of the population, they are very vulnerable to predators. i =f g When , the sparrows in the middle of the population are also in danger and should move closer to other sparrows to reduce the risk of being caught; in order to improve its search performance and avoid the local optimal problem, the Firefly Algorithm (FA) is used to perturb SSA, and the position update should be: is the attractiveness of fireflies, λ 0 is the maximum attraction, γ is the light intensity absorption coefficient, r ij is the spatial distance between fireflies i and j, f j is the fitness value of the current firefly. All sparrows and the optimal sparrow are disturbed by fireflies. The sparrows after disturbance are compared with the sparrows before disturbance. If it is better, the position of the sparrow is updated to achieve another update of the position. After multiple iterations, the best position Best_pos is obtained. Finally, the first parameter of the best position Best_pos is set as the penalty parameter c of SVM, and the second parameter is set as the kernel function parameter g. The obtained optimal parameters c and g are input into the support vector machine, and then the training set and the training set label are simultaneously input into the support vector machine for training to obtain the training model. The training model is used to predict and analyze the test set and the test set label. Similarly, the particle swarm optimization (PSO) and genetic algorithm (GA) are used to optimize the two parameters of SVM to obtain the optimal parameters, which are input into the SVM to train the petroleum concentration fluorescence spectrum data, thereby realizing the classification, prediction and recognition of petroleum oils, and the three algorithms are compared and analyzed.

[0080] The method of the present invention is further described by applying the method of the present invention to a specific example of classifying a petroleum oil data set:

[0081] Fluorescence spectrometer is used to collect petroleum fluorescence spectrum data. First, according to the fluorescence characteristics of a certain type of diesel, industrial white oil, aviation kerosene, lubricating oil and gasoline purchased and used in the present invention and Stokes' law, the emission scan start wavelength is set to lag the excitation scan start wavelength by 20nm, wherein the excitation wavelength range is EX: 260nm~400nm, the step length is 10nm, and the emission wavelength is EM: 280nm~450nm, the step length is 2nm, and 17 groups of diesel samples, 15 groups of industrial white oil samples, 16 groups of aviation kerosene samples, 16 groups of lubricating oil samples and 15 groups of gasoline samples with a concentration range of 200ug / ml~3000ug / ml are measured respectively, and a total of 79 groups of single oil fluorescence spectrum data are obtained.

[0082] The cubic Hermite interpolation method is used to perform scattering correction on the obtained single oil fluorescence spectrum. The scattering region range in the single oil fluorescence spectrum data is set to |EX-EM|≤10nm, and the value in this region is set to NAN. The cubic Hermite interpolation method is combined with normal fluorescence spectrum data to achieve interpolation correction of NAN, and a relatively complete set of 79 sets of single oil fluorescence spectrum data is obtained. Figure 3 (a) is the contour map of diesel fluorescence spectrum. Figure 3 (b) is the contour map of the fluorescence spectrum of industrial white oil. Figure 3 (c) is the contour map of the fluorescence spectrum of aviation kerosene. Figure 3 (d) is the contour map of the fluorescence spectrum of lubricating oil. Figure 3 (e) is the contour map of gasoline fluorescence spectrum.

[0083] Confidence limits are specified to eliminate abnormal data, confidence levels are specified, and the confidence limit Leverage value is determined to be 0.3. Any error exceeding this limit is considered an abnormal value and is eliminated. Taking diesel as an example, Figure 3 As shown in (f), sample 17 is an abnormal sample and is eliminated. The abnormal samples are eliminated in sequence by this method. Among them, samples 1 and 2 in the 15 groups of industrial white oil samples are abnormal samples and are eliminated, samples 1 and 2 in the 16 groups of aviation kerosene samples are abnormal samples and are eliminated, sample 16 in the 16 groups of lubricating oil samples is an abnormal sample and is eliminated, and sample 1 in the 15 groups of gasoline samples is an abnormal sample and is eliminated. Therefore, the valid fluorescence spectrum data obtained are 16 groups of diesel samples, 13 groups of industrial white oil samples, 14 groups of aviation kerosene samples, 15 groups of lubricating oil samples and 14 groups of gasoline samples, a total of 72 groups of valid single oil fluorescence spectrum data.

[0084] 72 sets of valid single oil fluorescence spectrum data were reconstructed respectively, and 16×86×15 diesel three-dimensional fluorescence spectrum data, 13×86×15 industrial white oil three-dimensional fluorescence spectrum data, 14×86×15 aviation kerosene three-dimensional fluorescence spectrum data, 15×86×15 lubricating oil three-dimensional fluorescence spectrum data and 14×86×15 gasoline three-dimensional fluorescence spectrum data were obtained. PARAFAC was used to decompose the five three-dimensional fluorescence spectrum data to obtain concentration fluorescence spectrum matrices A of 16×3, 13×3, 14×3, 15×3 and 14×3 respectively. Taking diesel as an example, Figure 3 (g) is a schematic diagram of the concentration fluorescence spectrum matrix A of diesel.

[0085] The five concentration fluorescence spectrum matrices A are combined row by row to obtain a 72×3 spectrum matrix, which is normalized. When each element value in the spectrum matrix is ​​mapped to the interval range of 0 to 1, the normalized single oil concentration fluorescence spectrum data is obtained, and then the training set and test set are divided. The data set label is a 72×1 matrix with a total of 5 categories. Diesel is set to category 1, industrial white oil is set to category 2, aviation kerosene is set to category 3, lubricating oil is set to category 4, and gasoline is set to category 5. It is randomly divided, and finally the training set is a 48×3 matrix, the test set is a 24×3 matrix, and the training set label is a 48×1 matrix and the test set label is a 24×1 matrix.

[0086] The firefly and sparrow search fusion algorithm is used to optimize the support vector machine (FA-SSA-SVM) to realize the recognition and classification of petroleum oil species. The training process is mainly as follows: first, the parameters in the experiment are set as follows: population pop = 20, maximum number of iterations Max_Iteration = 100, the proportion of discoverer PDNumber and scout SDNumber both account for 20% of the total population, the safety value ST is 0.6, and the objective function is determined as ObjValue = 1-max(accuracy[predict(test)]); then, the sparrow search algorithm is used to update the position, and then all sparrows and the optimal sparrow are disturbed by fireflies, and the sparrows after disturbance are compared with the sparrows before disturbance. , if it is better, update the sparrow position, and update the position again. After multiple iterations, get the best position Best_pos; finally, set the first parameter of the best position Best_pos to the penalty parameter c of the support vector machine, and set the second parameter to the kernel function parameter g. Input the obtained best parameters c and g into the support vector machine, and then input the 48×3 training set and the 48×1 training set labels into the support vector machine for training at the same time to get the training model. Use the training model to predict and analyze the 24×3 test set and the 24×1 test set labels, and use the particle swarm optimization support vector machine (PSO-SVM) and genetic algorithm optimization support vector machine (PSO-SVM) to perform the same training analysis. It can be obtained as follows Figure 3 (h) is the fitness curve obtained by FA-SSA. When iterated to the third generation, the fitness value has reached the optimal value of 0.04167. The fitness curve obtained by PSO and GA is as follows: Figure 3 (i) with Figure 3 As shown in (j), the two algorithms reach their maximum values ​​at the 8th and 14th generations, respectively, and then oscillate smoothly between the maximum values ​​in the following iterations; finally, the classification accuracy of the three algorithms is obtained, as shown in Figure 3 (k) shows the classification prediction results obtained by the FA-SSA-SVM algorithm. Only one group of lubricant samples was misclassified as aviation kerosene samples, with an accuracy of 95.83%. Figure 3 (l) with Figure 3 (m) are the classification prediction results obtained by PSO-SVM and GA-SVM algorithms, with an accuracy of 87.50%. It can be seen that in terms of convergence speed, the FA-SSA-SVM algorithm has a faster convergence speed, and in terms of classification prediction accuracy, the FA-SSA-SVM performs better. Therefore, FA-SSA-SVM achieves fast and efficient identification of petroleum oils.

[0087] like Figure 4 As shown, the present invention provides a petroleum oil type identification system, comprising:

[0088] The acquisition module 401 is used to acquire multiple groups of petroleum fluorescence spectrum data at different concentration ratios.

[0089] The descattering processing and interpolation correction module 402 is used to perform descattering processing and interpolation correction on multiple groups of the petroleum fluorescence spectrum data under different concentration ratios to obtain effective petroleum fluorescence spectrum data. The descattering processing and interpolation correction module 402 specifically includes: a descattering processing unit, which is used to perform descattering processing on the petroleum fluorescence spectrum data using an interpolation correction algorithm to obtain descattered petroleum fluorescence spectrum data; and a elimination unit, which is used to eliminate the descattered petroleum fluorescence spectrum data according to a set confidence limit to obtain effective petroleum fluorescence spectrum data.

[0090] The reconstruction and decomposition module 403 is used to reconstruct and decompose the effective petroleum fluorescence spectrum data to obtain a concentration fluorescence spectrum matrix.

[0091] The normalization processing module 404 is used to perform normalization processing on the concentration fluorescence spectrum matrix to obtain petroleum concentration fluorescence spectrum data.

[0092] The recognition result determination module 405 is used to input the petroleum concentration fluorescence spectrum data into the training model to obtain the recognition result of the petroleum type; the training model is obtained by optimizing and training the support vector machine using the firefly algorithm and the sparrow search algorithm.

[0093] The optimization and training process of the training model specifically includes:

[0094] According to the fluorescence spectrum data of single petroleum concentration, the sparrow search algorithm is used to optimize and the firefly algorithm is used to perturb the data, and the penalty parameters and kernel function parameters of the support vector machine are obtained.

[0095] The penalty parameter and the kernel function parameter are input into the support vector machine and the support vector machine is trained using the petroleum concentration fluorescence spectrum data of the training set to obtain a training model.

[0096] The training model is predicted using the petroleum concentration fluorescence spectrum data of the test set.

[0097] The method and system provided by the present invention: first, a fluorescence spectrometer is used to collect multiple groups of petroleum fluorescence spectrum data under different concentration ratios; then, an interpolation correction algorithm is used to eliminate the interference of Rayleigh scattering in the petroleum fluorescence spectrum data, and abnormal data is eliminated by determining the confidence limit to obtain multiple groups of complete and effective two-dimensional petroleum fluorescence spectrum data; then, the obtained multiple groups of two-dimensional petroleum fluorescence spectrum data are reconstructed to obtain relatively complete three-dimensional fluorescence spectrum data, and then a second-order correction algorithm is used to decompose the three-dimensional fluorescence spectrum data to obtain two-dimensional petroleum concentration fluorescence spectrum data; then, normalization is performed on it, and a training set and a test set are divided at the same time; finally, a firefly and sparrow search fusion algorithm is used to optimize the support vector machine to train the training set of petroleum concentration fluorescence spectrum data, and the test set is verified and analyzed, thereby realizing the classification and identification of petroleum oil types. Compared with the method of pre-establishing a database and matching the sample to be tested with the database, the method and system proposed by the present invention are more intelligent and efficient. Compared with traditional particle swarm optimization support vector machine and genetic algorithm optimization support vector machine, this method has improved and enhanced the convergence speed and accuracy. At the same time, the use of firefly and sparrow search fusion algorithm can also avoid the problem of local optimal solution in the training process.

[0098] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0099] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for identifying petroleum oil species, characterized in that: include: Obtain multiple sets of petroleum fluorescence spectrum data at different concentration ratios; De-scattering processing and interpolation correction are performed on multiple groups of petroleum fluorescence spectrum data at different concentration ratios to obtain effective petroleum fluorescence spectrum data; Reconstructing and decomposing the effective petroleum fluorescence spectrum data to obtain a concentration fluorescence spectrum matrix; Normalizing the concentration fluorescence spectrum matrix to obtain petroleum concentration fluorescence spectrum data; Input the petroleum concentration fluorescence spectrum data into a training model to obtain the identification result of the petroleum type; the training model is obtained by optimizing and training the support vector machine using the firefly algorithm and the sparrow search algorithm; The training model is obtained by optimizing and training the support vector machine using the firefly algorithm and the sparrow search algorithm, and specifically includes: According to the single petroleum concentration fluorescence spectrum data, the sparrow search algorithm is used to optimize and the firefly algorithm is used to perturb, and the penalty parameters and kernel function parameters of the support vector machine are obtained; Inputting the penalty parameter and the kernel function parameter into the support vector machine and training the support vector machine using the petroleum concentration fluorescence spectrum data of the training set to obtain a training model; Using the petroleum concentration fluorescence spectrum data of the test set to predict the training model; The method of optimizing the single petroleum concentration fluorescence spectrum data using the sparrow search algorithm and perturbing it using the firefly algorithm to obtain the penalty parameters and kernel function parameters of the support vector machine specifically includes: According to the single petroleum concentration fluorescence spectrum data, a sparrow search algorithm is used to update the position to obtain the sparrow at the optimal position; Use the firefly algorithm to disturb all sparrows and get the disturbed sparrows; Comparing the sparrows at the optimal position with the sparrows after the disturbance to determine the optimal position; The penalty parameter and kernel function parameter of the support vector machine are determined according to the optimal position.

2. The petroleum oil type identification method according to claim 1, characterized in that: The de-scattering processing and interpolation correction are performed on the multiple groups of petroleum fluorescence spectrum data under different concentration ratios to obtain effective petroleum fluorescence spectrum data, specifically including: De-scattering the petroleum fluorescence spectrum data using an interpolation correction algorithm to obtain de-scattered petroleum fluorescence spectrum data; The descattered petroleum fluorescence spectrum data is eliminated according to the set confidence limit to obtain effective petroleum fluorescence spectrum data.

3. The petroleum oil type identification method according to claim 2, characterized in that: The interpolation correction algorithm is specifically a cubic Hermite interpolation method.

4. The petroleum oil type identification method according to claim 1, characterized in that: The reconstructing and decomposing the effective petroleum fluorescence spectrum data to obtain a concentration fluorescence spectrum matrix specifically includes: Reconstructing the effective petroleum fluorescence spectrum data to obtain a plurality of single oil fluorescence spectrum data; The parallel factor algorithm is used to decompose the fluorescence spectrum data of the plurality of single oils respectively to obtain a plurality of concentration fluorescence spectrum matrices.

5. The petroleum oil type identification method according to claim 1, characterized in that: The normalization process of the concentration fluorescence spectrum matrix to obtain the petroleum concentration fluorescence spectrum data specifically includes: Reorganizing the concentration fluorescence spectrum matrix row by row to obtain a reorganized concentration fluorescence spectrum matrix; The recombined concentration fluorescence spectrum matrix is ​​normalized to obtain petroleum concentration fluorescence spectrum data.

6. A petroleum oil type identification system, characterized in that: The petroleum oil type identification system is applied to the petroleum oil type identification method according to any one of claims 1 to 5, and the petroleum oil type identification system comprises: An acquisition module is used to acquire multiple sets of petroleum fluorescence spectrum data at different concentration ratios; A descattering processing and interpolation correction module is used to perform descattering processing and interpolation correction on multiple groups of petroleum fluorescence spectrum data under different concentration ratios to obtain effective petroleum fluorescence spectrum data; A reconstruction and decomposition module, used for reconstructing and decomposing the effective petroleum fluorescence spectrum data to obtain a concentration fluorescence spectrum matrix; A normalization processing module, used for normalizing the concentration fluorescence spectrum matrix to obtain petroleum concentration fluorescence spectrum data; The recognition result determination module is used to input the petroleum concentration fluorescence spectrum data into the training model to obtain the recognition result of the petroleum type; the training model is obtained by optimizing and training the support vector machine using the firefly algorithm and the sparrow search algorithm.

7. The petroleum oil type identification system according to claim 6, characterized in that: The descattering processing and interpolation correction module specifically includes: A descattering processing unit, used for performing descattering processing on the petroleum fluorescence spectrum data by using an interpolation correction algorithm to obtain descattered petroleum fluorescence spectrum data; The elimination unit is used to eliminate the descattered petroleum fluorescence spectrum data according to a set confidence limit to obtain effective petroleum fluorescence spectrum data.