Gasoline octane number prediction method based on near infrared spectrum

By employing near-infrared spectral preprocessing and stitching techniques, combined with partial least squares and multilayer perceptron models, the accuracy and speed issues of gasoline octane number prediction were resolved, enabling rapid and accurate prediction of gasoline octane number.

CN121540662APending Publication Date: 2026-02-17CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511696683.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-19
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing technologies struggle to predict gasoline octane number quickly and accurately, especially after multi-component blending and the addition of antiknock agents. Traditional methods suffer from nonlinear interference and large prediction errors, making it difficult to meet the requirements for precise control.

Method used

A near-infrared spectroscopy-based method is adopted. By preprocessing and stitching the near-infrared spectra of gasoline samples, target feature points are extracted, a partial least squares correction model is constructed, and a multilayer perceptron model is combined for prediction to improve prediction accuracy.

Benefits of technology

It enables rapid and accurate prediction of gasoline octane number, reduces prediction error, and meets the needs of precision control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121540662A_ABST
    Figure CN121540662A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of chemical engineering, in particular to a gasoline octane number prediction method based on a near infrared spectrum. According to the near infrared spectrum-based gasoline octane number prediction method provided by the invention, when a partial least square method correction model is constructed, a target spectrum in a gasoline sample is preprocessed for at least one time, the preprocessed spectrums are spliced to obtain a spliced spectrum, then a target feature point is selected from the spliced spectrum, and the octane number of the gasoline sample is predicted according to the target feature point. Then taking the target feature point as a target feature variable, constructing a partial least square correction model according to the spliced spectrum and the octane number in each gasoline sample, finally performing at least one pretreatment on the near infrared spectrum to be detected of the gasoline sample to be detected, and then performing splicing treatment to obtain a spliced spectrum to be detected, and the spliced spectrum to be measured is input into the partial least square method correction model for prediction to generate a predicted octane number, so that the prediction accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of chemical technology, and specifically to a method for predicting the octane number of gasoline based on near-infrared spectroscopy. Background Technology

[0002] Gasoline, as a core profit-generating product for oil refining companies (contributing 60%-70% of profits), has two main production stages: component oil preparation and storage, and finished product blending. Gasoline blending, as the final process, offers significant economic benefits, but traditional octane number detection methods are insufficient to meet the demand for rapid analysis. Near-infrared spectroscopy (NIRS) has attracted considerable attention due to its advantages of rapid and non-destructive analysis. NIRS determination of gasoline octane number is the most widely and deeply studied test in the petrochemical field. Octane number has a strong correlation with the molecular structure of gasoline; for example, an increase in the number of methyl, olefinic, and aromatic hydrocarbon CH groups leads to a higher octane number, while an increase in the number of methylene CH groups leads to a lower octane number. Therefore, for the same type of gasoline (with a narrow octane number range), there is a good linear relationship between near-infrared spectral absorbance and octane number. A highly practical analytical model can be established using multivariate correction methods.

[0003] In actual blending processes, the mixing of multiple components (reformed oil / cracked oil / alkylated oil) and the addition of antiknock agents significantly widen the octane number fluctuation range, leading to enhanced nonlinear characteristics in both the spectrum and octane number. Existing solutions have significant drawbacks: while interval-based modeling mitigates nonlinear interference through pattern recognition and sub-model adaptation, maintaining multiple models is complex and real-time prediction efficiency is low; while full-range linear models improve robustness, their prediction errors (standard deviation ≥ 0.3) are insufficient to meet the requirements for precise control. Therefore, there is an urgent need to construct a wide-domain hybrid model that integrates nonlinear feature analysis to overcome the dual limitations of accuracy and applicability of existing technologies and achieve rapid and accurate prediction of gasoline octane number. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method for predicting the octane number of gasoline based on near-infrared spectroscopy, which solves the problem that it is difficult to predict the octane number of gasoline quickly and accurately in the prior art.

[0005] As a first aspect of the present invention, the present invention provides 1. a method for predicting the octane number of gasoline based on near-infrared spectroscopy, characterized in that it includes: Obtain the near-infrared spectrum of each gasoline sample and the octane number of each gasoline sample; An initial spectrum within the target spectral region is extracted from the near-infrared spectrum of each gasoline sample. The initial spectrum is subjected to at least one preprocessing step to obtain multiple preprocessed spectra. The multiple preprocessed spectra are then spliced ​​together to generate a spliced ​​spectrum. Target feature points are determined based on multiple feature points in the spliced ​​spectrum; The target feature points are used as target feature variables, and a partial least squares correction model is constructed based on the spliced ​​spectrum and octane number of each gasoline sample. The near-infrared spectrum of the gasoline sample to be tested is obtained, and the initial spectrum to be tested in the target spectral region of the near-infrared spectrum to be tested is extracted. The initial spectrum to be tested is subjected to at least one preprocessing to obtain multiple processed spectra to be tested. The multiple processed spectra to be tested are spliced ​​together to generate the spliced ​​spectrum to be tested. The spliced ​​spectrum to be tested is input into the partial least squares correction model for prediction, so as to obtain the predicted octane number of the gasoline sample to be tested.

[0006] In one embodiment of the present invention, determining the target feature point based on multiple feature points in the spliced ​​spectrum includes: Multiple feature points are selected from the spliced ​​spectrum; Calculate the variance of each feature point and construct a variance sequence according to the magnitude of the variance, with the variances in the variance sequence arranged in descending order; The top 100 feature points in the variance sequence are identified as target feature points.

[0007] In one embodiment of the present invention, the step of inputting the spliced ​​spectrum to be tested into the partial least squares correction model for prediction to obtain the predicted octane number of the gasoline sample to be tested includes: The target feature points are used as feature variables. The feature variables and the spliced ​​spectrum to be tested are input into the partial least squares correction model for prediction, so as to obtain the predicted octane number of the gasoline sample to be tested.

[0008] In one embodiment of the present invention, the at least one preprocessing includes: second-order differentiation, vector normalization, and standard normal variable transformation; The preprocessed spectra obtained include: a first processed spectrum obtained after the second-order differential preprocessing, a second processed spectrum obtained after the vector normalization preprocessing, and a third processed spectrum obtained after the standard normal variable transformation preprocessing.

[0009] In one embodiment of the present invention, the step of splicing together the multiple processed spectra to generate a spliced ​​spectrum includes: Calculate the first variance of multiple first feature points in the first processed spectrum corresponding to multiple target wavelengths, the second variance of multiple second feature points in the second processed spectrum, and the third variance of multiple third feature points in the third processed spectrum. Construct a first variance sequence, a second variance sequence, and a third variance sequence according to the magnitude of the variance; The first 100 first feature points in the first variance sequence, the second variance sequence, and the third variance sequence are respectively determined as the first splicing feature point, the second splicing feature point, and the third splicing feature point; The first processed spectrum, the second processed spectrum, and the third processed spectrum are spliced ​​together based on multiple first splicing feature points, multiple second splicing feature points, and multiple third splicing feature points to obtain a spliced ​​spectrum.

[0010] In one embodiment of the present invention, the step of splicing the first processed spectrum, the second processed spectrum, and the third processed spectrum according to a plurality of first splicing feature points, a plurality of second splicing feature points, and a plurality of third splicing feature points to obtain a spliced ​​spectrum includes: The target spectral intensity corresponding to the target wavelength is calculated based on the first spectral intensity and first weight of the first splicing feature point corresponding to the target wavelength, the second spectral intensity and second weight of the second splicing feature point, and the third spectral intensity and third weight of the third splicing feature point. The spectral intensity corresponding to the target wavelength in the target processed spectrum is replaced with the spectral intensity corresponding to the target wavelength to obtain a spliced ​​spectrum, wherein the target processed spectrum is one of the first processed spectrum, the second processed spectrum, and the third processed spectrum.

[0011] In one embodiment of the present invention, the prediction method further includes: The target splicing feature point is determined based on the first variance of the first splicing feature point, the second variance of the second splicing feature point, and the third variance of the third splicing feature point. The first weight of the first splicing feature point, the second weight of the second splicing feature point, and the third weight of the third splicing feature point are determined based on the variance of the target splicing feature points. The processing spectrum corresponding to the target feature point is determined as the target processing spectrum.

[0012] In one embodiment of the present invention, after inputting the spliced ​​spectrum to be tested into the partial least squares correction model for prediction to obtain the octane number of the gasoline sample to be tested, the prediction method further includes: The near-infrared spectrum of each gasoline sample is input into the partial least squares correction model for prediction, so as to obtain the partial least squares octane number of each gasoline sample. Construct a spectral matrix based on multiple feature points in the initial spectrum within the target spectral region; Using the spectral matrix as the input signal of the multilayer perceptron, and the partial least squares octane number fitting residual matrix as the target signal of the multilayer perceptron, a residual multilayer perceptron correction model is constructed. The test spectral matrix is ​​constructed based on multiple feature points in the initial spectrum of the target spectral region, and the test spectral matrix is ​​input into the residual multilayer perceptron correction model for prediction to obtain the predicted octane number MLP correction value of the gasoline sample to be tested. The predicted octane number of the gasoline sample to be tested is corrected according to the predicted octane number MLP correction value, wherein the corrected octane number is equal to the sum of the predicted octane number MLP correction value and the predicted octane number.

[0013] In one embodiment of the present invention, the spectral matrix is ​​used as the input signal of the multilayer perceptron, comprising: The first n principal factors of the spectral matrix are used as the input signals of the multilayer perceptron, where n = 10~30.

[0014] In one embodiment of the present invention, the predicted octane value of the gasoline sample to be tested is the prediction result when the partial least squares correction model takes the first f principal factors; or The target spectral region is the 1100-1700nm spectral region.

[0015] This invention provides a method for predicting the octane number of gasoline based on near-infrared spectroscopy. When constructing the partial least squares (PLS) correction model, the target spectrum in the gasoline sample is preprocessed at least once, and the preprocessed spectra are stitched together to obtain a stitched spectrum. Target feature points are then selected from the stitched spectrum and used as target feature variables. A PLS correction model is constructed based on the stitched spectrum and the octane number in each gasoline sample. Finally, the near-infrared spectrum of the gasoline sample to be tested is preprocessed at least once and then stitched together to obtain the stitched spectrum to be tested. This stitched spectrum is then input into the PLS correction model for prediction to generate the predicted octane number, thus improving the accuracy of the prediction. Attached Figure Description

[0016] Figure 1 The diagram shown is a flowchart of a method for predicting the octane number of gasoline based on near-infrared spectroscopy, provided by an embodiment of the present invention.

[0017] Figure 2 The diagram shown is a flowchart of a gasoline octane number prediction method based on near-infrared spectroscopy provided in another embodiment of the present invention.

[0018] Figure 3 The diagram shown is a flowchart of a gasoline octane number prediction method based on near-infrared spectroscopy provided in another embodiment of the present invention.

[0019] Figure 4 The diagram shown is a flowchart of a gasoline octane number prediction method based on near-infrared spectroscopy provided in another embodiment of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] This invention provides a method for predicting the octane number of gasoline based on near-infrared spectroscopy. Figure 1 The diagram shown is a flowchart illustrating a method for predicting the octane number of gasoline based on near-infrared spectroscopy according to an embodiment of the present invention. Figure 1 As shown, a method for predicting the octane number of gasoline based on near-infrared spectroscopy includes the following steps: S1: Obtain the near-infrared spectrum of each gasoline sample and the octane number of each gasoline sample; Specifically, the octane number and near-infrared spectrum of the gasoline sample are known, and the octane number corresponds to the near-infrared spectrum. The near-infrared spectrum is obtained through detection, and the octane number in the gasoline sample is measured according to national standard methods (e.g., GB / T5487).

[0022] The number of gasoline samples is greater than 200.

[0023] S2: Extract the initial spectrum within the target spectral region from the near-infrared spectrum of each gasoline sample, perform at least one preprocessing on the initial spectrum to obtain multiple preprocessed spectra, and stitch the multiple processed spectra together to generate a stitched spectrum. Specifically, the target spectral region is the wavelength range of 1100-1700 nm.

[0024] Specifically, the preprocessing can be any one of second-order differentiation, vector normalization, or standard normal transformation. At least one preprocessing can be two or three of the following: second-order differentiation, vector normalization, and standard normal transformation. For example, at least one preprocessing can be: second-order differentiation and vector normalization; or: vector normalization and standard normal transformation; or: second-order differentiation and standard normal transformation; or second-order differentiation, vector normalization, and standard normal transformation.

[0025] The initial spectrum after at least one preprocessing is used to obtain the corresponding processed spectrum, and multiple spectra are spliced ​​together to generate a spliced ​​spectrum.

[0026] S3: Determine target feature points based on multiple feature points in the spliced ​​spectrum; S4: The target feature points are used as target feature variables, and a partial least squares correction model is constructed based on the spliced ​​spectrum and octane number of the gasoline sample. Specifically, when constructing the partial least squares correction model, an initial model is first built, then trained and tested to obtain the partial least squares correction model. The details are as follows: First, a partial least squares linear correction model is established, and then appropriate principal factors and octane numbers are selected to fit the residuals. or Then, a multilayer perceptron is used to perform nonlinear correction, and a residual multilayer perceptron correction model is established. Finally, the residual multilayer perceptron correction model and the partial least squares linear correction model are combined to obtain the final correction model.

[0027] The gasoline samples are divided into a training set and a test set. The training set contains 2 / 3 to 3 / 4 of the total samples, while the test set contains 1 / 3 to 1 / 4 of the total samples. Optionally, the distribution patterns of the training set and the test set are the same.

[0028] Optionally, this invention first employs partial least squares (PLS) to correlate the absorbance of the gasoline samples in the characteristic spectral region of the calibration set with the octane number measured by the standard method, establishing a linear calibration model. Specifically: (1) Spectral matrix and concentration matrix (This invention refers to the octane number) The following decomposition is performed. In this algorithm, n is the number of samples and m is the number of absorbance wavelength points in the characteristic spectral region, that is, the number of absorbance sampling points in the characteristic spectral region.

[0029]

[0030]

[0031] in: Absorbance matrix X The k The scores of each principal factor; Absorbance matrix X The k The loadings of each principal factor; Concentration matrix Y The k The scores of each principal factor; Concentration matrix Y The k The loadings of each principal factor; f The number of principal factors. That is: T and UThey are respectively X and Y The score matrix of the matrix, P and Q They are respectively X and Y The load matrix of the matrix, E X and E Y They are respectively X and Y The PLS fitting residual matrix.

[0032] (2) T and U Perform linear regression: U = TB

[0033] In making predictions, firstly based on P Find the spectral matrix of the unknown sample X 未知 Score T 未知 Then, the concentration prediction value is obtained from the following formula: Y 未知 = T 未知 BQ .

[0034] In the actual PLS algorithm, PLS combines matrix decomposition and regression into one step, that is... X and Y The matrix decomposition is performed simultaneously, and will Y Information introduced X During matrix factorization, before calculating each new principal component, the matrix is... X Score T and Y Score U Perform an exchange to obtain X Principal components directly with Y Related.

[0035] The PLS calculation was performed using the Nonlinear Iterative Partial Least Squares (NIPALS) algorithm proposed by H. Wold. The specific algorithm is as follows: For the correction process, the residual matrix is ​​ignored. E When the number of principal factors is 1, we have: right X = tp T Left multiplication t T have to: p T = tT X / t T t Right multiplication p have to: t = XP / p T p .

[0036] right Y = uq T Left multiplication u T have to: q T = u T Y / u T u Dividing both sides gives q T have to: u = Y / q T .

[0037] (1) Find the absorbance matrix X weight vector w Take the concentration matrix Y One column (only one column in this invention) is used as u The initial iteration value, with u replace t ,calculate w The equation is: X = uw T The solution is: w T = u T X / u T u (2) For the weight vector w Normalization

[0038] (3) Find the absorbance matrix X Factor scores t After normalization w calculate t The equation is: X = twT The solution is: t = Xw / w T (4) Find the concentration matrix Y load q Value, in t replace u calculate q The equation is: Y = tq T The solution is: q T = t T Y / t T t (5) For the load q Normalization

[0039] (6) Find the concentration matrix Y Factor scores u ,Depend on q T calculate u The equation is: Y = uq T The solution is: u = Yq / q T q (7) Again, using this u replace t Return to step (1) calculation w T ,Depend on w T calculate t 新 This process is repeated iteratively, if t Convergence If the operation proceeds to step (8), otherwise return to step (1).

[0040] (8) From the converged t Find the absorbance matrix X load vector p The equation is: X = tp T The solution is: p T= t T Y / t T t (9) For the load p Normalization

[0041] (10) Standardization X Factor scores t

[0042] (11) Standardized weight vector w

[0043] (12) Calculate t and u The inherent relationship between them b b = u T t / t T t (13) Calculate the residual matrix E E X = X - tp T E Y = Y - btq T (14) with E X replace X , E Y replace Y Return to step (1), and so on, to find the answer. X , Y The principal factors w , t , p , u , q , b The optimal number of principal factors was determined using cross-validation. f ,save w f , pf , q f .

[0044] This invention employs multilayer perceptron fitting correction, wherein the principal factor of the spectrum serves as the input signal of the multilayer perceptron (ELM), and its octane number fitting residual serves as the target signal for training the multilayer perceptron.

[0045] S5: Obtain the near-infrared spectrum of the gasoline sample to be tested, extract the initial spectrum to be tested in the target spectral region of the near-infrared spectrum to be tested, and perform at least one preprocessing on the initial spectrum to be tested to obtain multiple processed spectra to be tested. Then, splice the multiple processed spectra to be tested to generate the spliced ​​spectrum to be tested. When preprocessing the target spectrum of the gasoline sample to be tested, the same processing method is used as that used in S2 for preprocessing the near-infrared spectrum of the gasoline sample.

[0046] For example, the preprocessing methods for the target spectrum of the gasoline sample in S2 include: second-order differentiation, vector normalization, and standard normal variable transformation. Similarly, the preprocessing methods for the target spectrum of the gasoline sample to be tested in S5 also include: second-order differentiation, vector normalization, and standard normal variable transformation.

[0047] S6: Input the spliced ​​spectrum to be tested into the partial least squares correction model for prediction to obtain the predicted octane number of the gasoline sample to be tested.

[0048] The target feature points are used as feature variables. The feature variables and the spliced ​​spectrum to be tested are input into the partial least squares correction model for prediction, so as to obtain the predicted octane number of the gasoline sample to be tested.

[0049] The predicted octane value of the gasoline sample to be tested is the prediction result when the partial least squares correction model takes the first f principal factors.

[0050] This invention provides a method for predicting the octane number of gasoline based on near-infrared spectroscopy. When constructing the partial least squares (PLS) correction model, the target spectrum in the gasoline sample is preprocessed at least once, and the preprocessed spectra are stitched together to obtain a stitched spectrum. Target feature points are then selected from the stitched spectrum and used as target feature variables. A PLS correction model is constructed based on the stitched spectrum and the octane number in each gasoline sample. Finally, the near-infrared spectrum of the gasoline sample to be tested is preprocessed at least once and then stitched together to obtain the stitched spectrum to be tested. This stitched spectrum is then input into the PLS correction model for prediction to generate the predicted octane number, thus improving the accuracy of the prediction.

[0051] In one embodiment of the present invention, such as Figure 2As shown, S3 (determining target feature points based on multiple feature points in the spliced ​​spectrum) specifically includes the following steps: S31: Take multiple feature points in the spliced ​​spectrum; S32: Calculate the variance of each feature point and construct a variance sequence according to the size of the variance, with the variances in the variance sequence arranged in descending order; S33: Determine the top 100 feature points in the variance sequence as target feature points.

[0052] In other words, when selecting target feature points, the top 100 feature points with the highest variance are chosen as target feature points. Using these top 100 feature points as feature variables to train the partial least squares correction model can further improve its prediction accuracy.

[0053] In one embodiment of the present invention, such as Figure 3 As shown, at least one preprocessing step includes: second-order differentiation, vector normalization, and standard normal transformation; wherein, the multiple processed spectra obtained after preprocessing include: a first processed spectrum obtained after second-order differentiation preprocessing, a second processed spectrum obtained after vector normalization preprocessing, and a third processed spectrum obtained after standard normal transformation preprocessing. In this case, the specific method for splicing the three processed spectra, namely S5 (sponging multiple processed spectra to generate a spliced ​​spectrum), specifically includes the following steps: S51: Calculate the first variance of multiple first feature points in the first processed spectrum corresponding to multiple target wavelengths, the second variance of multiple second feature points in the second processed spectrum, and the third variance of multiple third feature points in the third processed spectrum, respectively. In other words, at the same target wavelength, the first, second, and third feature points corresponding to the first, second, and third processed spectra are the same. That is, the wavelengths corresponding to the first, second, and third feature points are the same.

[0054] Therefore, by taking multiple target wavelengths, multiple sets of first feature points, second feature points, and third feature points are obtained.

[0055] S52: Construct the first variance sequence, the second variance sequence, and the third variance sequence according to the size of the variance; The first variances of multiple first feature points are arranged from largest to smallest to construct a first variance sequence; Similarly, the second variances of multiple second feature points are arranged from largest to smallest to construct a second variance sequence; Similarly, the third differences of multiple third feature points are arranged from largest to smallest to construct a third difference sequence; S53: Determine the first 100 first feature points in the first variance sequence, the second variance sequence, and the third variance sequence respectively as the first splicing feature point, the second splicing feature point, and the third splicing feature point; S54: The first processed spectrum, the second processed spectrum, and the third processed spectrum are spliced ​​together based on multiple first splicing feature points, multiple second splicing feature points, and multiple third splicing feature points to obtain a spliced ​​spectrum.

[0056] In other words, when performing spectral splicing, the top 100 splicing feature points with the largest variance are selected for splicing to further improve the accuracy of the spliced ​​spectrum.

[0057] Optionally, S54 (splicing the first processed spectrum, the second processed spectrum, and the third processed spectrum based on multiple first splicing feature points, multiple second splicing feature points, and multiple third splicing feature points to obtain a spliced ​​spectrum) specifically includes the following steps: S541: Calculate the target spectral intensity corresponding to the target wavelength based on the first spectral intensity and first weight of the first splicing feature point corresponding to the target wavelength, the second spectral intensity and second weight of the second splicing feature point, and the third spectral intensity and third weight of the third splicing feature point; Specifically, the first weight, the second weight, and the third weight can be predetermined. The specific determination methods include: (1) determining the target splicing feature point based on the first variance of the first splicing feature point, the second variance of the second splicing feature point, and the third variance of the third splicing feature point. (2) Determine the first weight of the first splicing feature point, the second weight of the second splicing feature point, and the third weight of the third splicing feature point based on the variance of the target splicing feature points; (3) The processing spectrum corresponding to the target feature point is determined as the target processing spectrum.

[0058] Specifically, the target processing spectrum can be one of the first, second, and third processing spectra, and is determined based on the target feature points. For example, if the target feature point is the first stitched feature point, then the corresponding target processing spectrum is the first processing spectrum. Similarly, if the target feature point is the third stitched feature point, then the corresponding target processing spectrum is the third processing spectrum.

[0059] S542: Replace the spectral intensity corresponding to the target wavelength in the target processed spectrum with the spectral intensity corresponding to the target wavelength to obtain the spliced ​​spectrum.

[0060] Once the target processing spectrum is determined, the spectral intensity corresponding to the target wavelength in the target processing spectrum can be replaced with the spectral intensity corresponding to the target wavelength to obtain the spliced ​​spectrum.

[0061] In one embodiment of the present invention, such as Figure 4 As shown, after S6 (inputting the spliced ​​spectrum to be tested into the partial least squares correction model for prediction to obtain the octane number of the gasoline sample to be tested), the prediction method also includes the following steps: S7: Input the near-infrared spectrum of each gasoline sample into the partial least squares correction model for prediction to obtain the partial least squares octane number of each gasoline sample; S8: Construct a spectral matrix based on multiple feature points in the initial spectrum within the target spectral region; S9: Using the spectral matrix as the input signal of the multilayer perceptron, and the partial least squares octane number fitting residual matrix as the target signal of the multilayer perceptron, a residual multilayer perceptron correction model is constructed. Specifically, using the spectral matrix as the input signal for the multilayer perceptron includes using the first n principal factors of the spectral matrix as the input signal for the multilayer perceptron, where n = 10~30.

[0062] S10: Construct the test spectral matrix based on multiple feature points in the initial spectrum of the target spectral region, and input the test spectral matrix into the residual multilayer perceptron correction model for prediction to obtain the predicted octane number MLP correction value of the gasoline sample to be tested. S11: Correct the predicted octane number of the gasoline sample to be tested according to the predicted octane number MLP correction value, wherein the corrected octane number is equal to the sum of the predicted octane number MLP correction value and the predicted octane number.

[0063] Computer equipment

[0064] Based on the above embodiments, this embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the above embodiments.

[0065] In some embodiments of this example, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that, when executed by a processor, the computer program implements the steps of the gasoline octane number prediction method based on near-infrared spectroscopy described in the above embodiment.

[0066] In some embodiments of this example, a computer program product is provided, including a computer program / instructions, characterized in that, when the computer program is executed by a processor, it implements the steps of the gasoline octane number prediction method based on near-infrared spectroscopy described in the above embodiment.

[0067] The processor may include, but is not limited to, one or more processors or microprocessors. Each processor may be implemented as an Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), controller, microcontroller, microprocessor, or other electronic components, for executing the virtual human control method based on a multimodal large model in the above embodiments.

[0068] Computer-readable storage media can be implemented by any type of volatile or non-volatile storage device or a combination thereof. Computer-readable storage media may include, but are not limited to, random access memory (RAM), read-only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, and computer storage media (e.g., hard disks, floppy disks, solid-state drives, removable disks, CD-ROMs, DVD-ROMs, Blu-ray discs, etc.).

[0069] The computer-readable storage medium may also store at least one computer-executable program / instruction, such as computer-readable instructions. The computer-readable storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Computer-readable storage media may include, for example, read-only memory (ROM), hard disk, flash memory, etc. For example, a non-transitory computer-readable storage medium can be connected to a computing device such as a computer, and then, when the computing device executes the computer-readable instructions stored on the computer-readable storage medium, a gasoline octane number prediction method based on near-infrared spectroscopy as described above can be performed.

[0070] In addition, the computer device may include (but is not limited to) a data bus, an input / output (I / O) bus, a display, and input / output devices (e.g., keyboard, mouse, speakers, etc.).

[0071] The processor can communicate with external devices via the I / O bus through wired or wireless networks.

[0072] In one embodiment, the at least one computer-executable instruction may also be compiled into or comprise a software product / computer program product, wherein one or more computer-executable instructions are executed by a processor to perform the steps of the various functions and / or methods in the embodiments described herein.

[0073] In the embodiments provided in this disclosure, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0074] It should be noted that, in this disclosure, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element limited by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0075] While the embodiments disclosed herein are as described above, the foregoing content is merely for the purpose of facilitating understanding of this disclosure and is not intended to limit this disclosure. Any person skilled in the art to which this disclosure pertains may make any modifications and changes in form and detail of the implementation without departing from the spirit and scope of this disclosure; however, the scope of patent protection of this disclosure shall still be determined by the scope defined in the appended claims.

Claims

1. A method for predicting octane number of gasoline based on near infrared spectroscopy, characterized by, The method comprises the following steps: obtaining near-infrared spectra of each gasoline sample and octane values in each gasoline sample; extracting initial spectra in a target spectral region in the near-infrared spectra of each gasoline sample, performing at least one pretreatment on the initial spectra to obtain a plurality of processed spectra, and splicing the plurality of processed spectra to generate a spliced spectrum; determining target feature points based on a plurality of feature points in the spliced spectrum; taking the target feature points as target feature variables and constructing a partial least squares correction model according to the spliced spectrum and the octane value of each gasoline sample; obtaining a to-be-tested near-infrared spectrum of a to-be-tested gasoline sample, extracting a to-be-tested initial spectrum in the target spectral region in the to-be-tested near-infrared spectrum, and performing at least one pretreatment on the to-be-tested initial spectrum to obtain a plurality of to-be-tested processed spectra, splicing the plurality of to-be-tested processed spectra to generate a to-be-tested spliced spectrum; inputting the to-be-tested spliced spectrum into the partial least squares correction model for prediction to obtain a predicted octane value of the to-be-tested gasoline sample.

2. The prediction method of claim 1, wherein, The method comprises the following steps: taking a plurality of feature points in the spliced spectrum; calculating the variance of each feature point and constructing a variance sequence according to the size of the variance, wherein the variance sequence is arranged in descending order of variance; determining the first 100 feature points in the variance sequence as target feature points.

3. The prediction method of claim 2, wherein, The method comprises the following steps: taking the target feature points as feature variables, inputting the feature variables and the to-be-tested spliced spectrum into the partial least squares correction model for prediction to obtain a predicted octane value of the to-be-tested gasoline sample.

4. The prediction method of claim 1, wherein, The at least one pretreatment comprises second-order differentiation, vector normalization, and standard normal variable transformation. The plurality of processed spectra obtained by pretreatment comprises a first processed spectrum obtained by second-order differentiation pretreatment, a second processed spectrum obtained by vector normalization pretreatment, and a third processed spectrum obtained by standard normal variable transformation pretreatment.

5. The prediction method of claim 4, wherein, The method comprises the following steps: calculating the first variance of a plurality of first feature points in the first processed spectrum, the second variance of a plurality of second feature points in the second processed spectrum, and the third variance of a plurality of third feature points in the third processed spectrum corresponding to a plurality of target wavelengths; constructing a first variance sequence, a second variance sequence, and a third variance sequence according to the size of the variance; determining the first 100 first feature points in the first variance sequence, the second variance sequence, and the third variance sequence as first splicing feature points, second splicing feature points, and third splicing feature points, respectively; splicing the first processed spectrum, the second processed spectrum, and the third processed spectrum according to the plurality of first splicing feature points, the plurality of second splicing feature points, and the plurality of third splicing feature points to obtain a spliced spectrum.

6. The prediction method of claim 5, wherein, The first processing spectrum, the second processing spectrum and the third processing spectrum are spliced according to the plurality of first splicing feature points, the plurality of second splicing feature points and the plurality of third splicing feature points to obtain a spliced spectrum, and the method comprises the following steps: The target spectrum intensity corresponding to the target wavelength is calculated according to the first spectrum intensity of the first splicing feature point corresponding to the target wavelength and the first weight, the second spectrum intensity of the second splicing feature point and the second weight, and the third spectrum intensity of the third splicing feature point and the third weight; The spectrum intensity corresponding to the target wavelength in the target processing spectrum is replaced by the target spectrum intensity corresponding to the target wavelength to obtain the spliced spectrum, wherein the target processing spectrum is one of the first processing spectrum, the second processing spectrum and the third processing spectrum.

7. The prediction method of claim 6, wherein, Further comprising: The target splicing feature point is determined according to the first variance of the first splicing feature point, the second variance of the second splicing feature point and the third variance of the third splicing feature point; The first weight of the first splicing feature point, the second weight of the second splicing feature point and the third weight of the third splicing feature point are determined according to the variance of the target splicing feature point; The processing spectrum corresponding to the target feature point is determined as the target processing spectrum.

8. The prediction method of claim 1, wherein, After the to-be-measured spliced spectrum is input into the partial least squares correction model for prediction to obtain the octane number of the to-be-measured gasoline sample, the prediction method further comprises: The near-infrared spectrum of each gasoline sample is input into the partial least squares correction model for prediction to obtain the partial least squares octane number of each gasoline sample; A spectrum matrix is constructed according to a plurality of feature points in the initial spectrum in the target spectral region; The spectrum matrix is used as the input signal of the multilayer perceptron, and the residual error matrix fitted according to the partial least squares octane number is used as the target signal of the multilayer perceptron to construct a residual error multilayer perceptron correction model; A to-be-measured spectrum matrix is constructed according to a plurality of feature points in the to-be-measured initial spectrum in the target spectral region, and the to-be-measured spectrum matrix is input into the residual error multilayer perceptron correction model for prediction to obtain the predicted octane number MLP correction value of the to-be-measured gasoline sample; The predicted octane number of the to-be-measured gasoline sample is corrected according to the predicted octane number MLP correction value, wherein the corrected octane number is equal to the sum of the predicted octane number MLP correction value and the predicted octane number.

9. The prediction method of claim 8, wherein, The spectrum matrix is used as the input signal of the multilayer perceptron, comprising: The first n principal components of the spectrum matrix are used as the input signal of the multilayer perceptron, wherein n=10-30.

10. The prediction method of claim 1, wherein, The predicted octane number of the to-be-measured gasoline sample is the prediction result when the partial least squares correction model takes the first f principal components; or The target spectral region is a 1100-1700nm spectral region.

Citation Information

Patent Citations

  • Construction method of model for reducing octane number loss

    CN112687349A

  • Spectrogram chemometrics analysis method based on segmented intelligent optimization

    CN113793652A

  • Method for predicting octane number of gasoline

    CN115436317A

  • Near-infrared rapid detection method for moisture content of HMX explosive

    CN117723503A

  • Method and system for determining content of crude fat in mutton

    CN117871459A