Method for detecting synthetic hydrocarbon content in oil, and detection device, equipment and medium
Through the combination of near-infrared spectral data and stoichiometric methods, the regression equation is constructed using sample weighting and cumulative contribution method, which solves the problem of poor detection accuracy and low efficiency of synthetic hydrocarbon content in oil, and achieves rapid and accurate blending ratio measurement, which is suitable for on-site detection.
Patent Information
- Application Number
- CN202411987270.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
AI Technical Summary
The existing detection methods have problems of poor accuracy, low efficiency and poor adaptability in the detection of synthetic hydrocarbon content in oils, especially when the blending ratio is low, which affects fuel quality and safety.
The near-infrared spectral data combined with stoichiometric method was used to construct a regression equation to determine the blend ratio of synthetic hydrocarbon components and traditional jet fuel in real time through sample weighting and cumulative contribution method in data preprocessing.
The rapid and accurate measurement of the blending ratio of synthetic hydrocarbons and jet fuel is achieved, the detection accuracy is controlled within three thousandths, and the single detection time is controlled within a few seconds, which greatly improves the detection efficiency and is suitable for on-site rapid detection.
Smart Images

Figure CN119780026A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of detection and analysis technology, and specifically to a method and a detection device, equipment, and a medium for detecting the content of synthetic hydrocarbons in oil, and especially to a method and a detection device, equipment, and a medium for detecting the content of synthetic hydrocarbons in bio-jet fuel. Background Art
[0002] Sustainable aviation fuel (SAF) is a blend of synthetic hydrocarbon components and conventional jet fuel to create SAF with varying concentrations. The use of SAF has become an important approach to meeting fuel performance and environmental standards in the aviation industry. However, this process presents the following technical challenges:
[0003] 1. Difficulty in Accurately Determining the Blending Ratio: The primary goal of blending is to precisely control the blending ratio of synthetic hydrocarbons to traditional jet fuel to create a sustainable aviation fuel that meets specific requirements. Due to differences in chemical composition and physical properties between synthetic hydrocarbons and traditional jet fuel, accurately determining the blending ratio is critical to ensuring that the fuel meets performance and airworthiness standards.
[0004] 2. Limitations of existing detection methods: Existing detection technologies, such as gas chromatography and mass spectrometry, although they can provide high accuracy, are complex to operate, take a long time to detect, require expensive equipment, and are usually dependent on laboratory environments, which cannot meet the needs of rapid, real-time on-site detection.
[0005] 3. Difficulty in detecting low-proportion blends: When the blend ratio of synthetic hydrocarbons to traditional jet fuel is low, traditional detection methods are unable to effectively distinguish the compositional differences between the two fuels, which may lead to errors and thus affect fuel quality and safety.
[0006] 4. The need for real-time monitoring during the blending process: During the fuel blending process, the blending ratio needs to be monitored in real time and dynamically adjusted to ensure stable and consistent fuel quality. Existing methods are unable to achieve this real-time monitoring and automated adjustment, resulting in low fuel blending efficiency and an inability to meet rapidly changing needs.
[0007] In summary, the existing detection of synthetic hydrocarbon content in oil still has problems such as poor detection accuracy, low detection efficiency, and poor detection adaptability. Summary of the Invention
[0008] In view of the problems existing in the prior art, the purpose of the present invention is to provide a method and detection device, equipment, and medium for detecting the content of synthetic hydrocarbons in oil, so as to solve the problems of poor detection accuracy, low detection efficiency, and poor detection adaptability of the existing detection methods.
[0009] To achieve this object, the present invention adopts the following technical solutions:
[0010] In a first aspect, the present invention provides a method for detecting the content of synthetic hydrocarbons in oil, the detection method comprising:
[0011] S1. collecting near-infrared spectra of oil, synthetic hydrocarbons, and at least four oils containing synthetic hydrocarbons at different blending ratios to obtain corresponding spectral data;
[0012] S2, constructing a spectral data matrix X based on the spectral data, and sequentially correcting, standardizing, and weighting the spectral data matrix X to obtain a weighted spectral data matrix X weighted , then construct the weighted spectral data matrix X weighted The covariance matrix C of
[0013] S3. Perform eigenvalue decomposition on the covariance matrix C to obtain the eigenvalue matrix Λ and the eigenvector matrix V. Select the first k eigenvectors V in the eigenvector matrix V whose cumulative contribution rate is ≥ 95%. k , construct the target matrix T = X weighted ×V k ;
[0014] S4. constructing a target matrix T and a regression equation of a blending ratio target vector y corresponding to the target matrix T;
[0015] S5. Detecting near infrared spectrum data of the synthetic hydrocarbon oil sample to be tested, inputting the data into the regression equation, and obtaining the content of synthetic hydrocarbons in the synthetic hydrocarbon oil sample.
[0016] The detection method provided by the present invention introduces sample weighting processing in the data preprocessing process and uses the cumulative contribution rate method. It selects the most representative principal component based on the correlation analysis between the blending ratio and the principal component to realize the construction of the detection regression equation, and then can determine the blending ratio of synthetic hydrocarbon components and traditional jet fuel in real time. It has the advantages of being fast, accurate and low-cost.
[0017] As a preferred technical solution of the present invention, the spectral data matrix X includes: X∈R n×p , n is the number of samples, and p is the spectral variable of each sample.
[0018] As a preferred technical solution of the present invention, the correction includes: calculating the correlation coefficient r between the band in the spectral data matrix X and the synthetic hydrocarbon blending ratio j , select the correlation coefficient |r j The band j with |>0.8 and the corresponding synthetic hydrocarbon blending ratio are used as the preliminary screening matrix, and then the preliminary regression model is constructed using partial least squares regression to extract the regression weight b j The absolute value of the band is sorted and the band with the largest contribution is selected. The band with the largest contribution is filtered, denoised and principal component analyzed to obtain the modified spectral data matrix X'∈Rn×p '.
[0019] Preferably, the correlation coefficient r j The calculation formula is as follows:
[0020]
[0021] Where, X j represents the spectral value of band j, and y is the blending ratio of synthetic hydrocarbons.
[0022] Preferably, the calculation formula of the preliminary regression model is as follows:
[0023] y=X C b+ε
[0024] Where, X C is the preliminary screening matrix, y is the blending ratio of synthetic hydrocarbons, b∈R k , is the regression coefficient vector, ε∈R n , is the residual vector.
[0025] Preferably, the filtering and noise reduction method includes Savitzky-Golay filtering.
[0026] Preferably, the principal component analysis includes: performing principal component analysis on the data matrix X' obtained by filtering and denoising, retaining the principal components with cumulative contribution rate ≥ 95% as the modified spectral data matrix X' = X' × V k' , V k' are the first k principal component vectors whose cumulative contribution rate is ≥ 95%.
[0027] Preferably, the modified spectral data matrix X'∈R n×p 'Medium p' satisfies p-p'≥500.
[0028] Preferably, the standardization includes: using the mean vector X' mean and standard deviation vector X' std Standardize the corrected spectral data matrix X' to obtain the annotated spectral data matrix X scaled , the calculation formula is as follows:
[0029]
[0030] Preferably, the weighted processing includes: using a weighting matrix W to weight the annotated spectral data matrix X scaled Perform weighted processing to obtain the weighted spectral data matrix X weighted , the calculation formula is as follows:
[0031] X weighted =W×X scaled .
[0032] Preferably, the weighting matrix W comprises:
[0033] W=diag(w1,w i ,……,w n ), i≤n
[0034] Where, y i is the target value of sample i, is the mean of the target value, and ∈ is a small constant.
[0035] As a preferred technical solution of the present invention, the covariance matrix C includes:
[0036] C∈R p’×p’
[0037]
[0038] As a preferred technical solution of the present invention, the process of constructing the regression equation is as follows: establish a regression relationship between the target matrix T and its corresponding blending ratio target vector y:
[0039] y=Tb+∈
[0040] Where b∈R k , is the regression coefficient vector, ε∈R n , is the residual vector, y is the target vector of the mixing ratio, y∈R n , n is the number of samples;
[0041] After calculation, the regression equation is obtained:
[0042]
[0043] Where, is the predicted blending ratio value, b is the regression coefficient vector, is the mean of the target vector of the mixing ratio, b i is the regression coefficient of the i-th principal component in the target matrix T, is the mean of the i-th principal component score in the target matrix T.
[0044] As a preferred technical solution of the present invention, if a sample matrix X is added to the spectral data matrix X new , then dynamic adaptation is performed to obtain a new sample covariance matrix C new :
[0045]
[0046] Then the updated covariance matrix C updated :
[0047] C updated =αC+(1-α)C new , where α is the smoothing factor,
[0048] Then, S3 and S4 are performed in sequence to obtain the updated regression equation.
[0049] In a second aspect, the present invention provides a device for detecting the content of synthetic hydrocarbons in oil, the device comprising:
[0050] A spectral data acquisition module is used to collect near-infrared spectra of oil, synthetic hydrocarbons, at least four oils containing synthetic hydrocarbons at different blending ratios, and the oil containing synthetic hydrocarbons to be tested, to obtain corresponding spectral data;
[0051] The regression equation construction module is used to construct a spectral data matrix X based on the spectral data, and to perform correction, standardization and weighting on the spectral data matrix X in turn to obtain a weighted spectral data matrix X. weighted , then construct the weighted covariance matrix C; perform eigenvalue decomposition on the covariance matrix C to obtain the eigenvalue matrix Λ and the eigenvector matrix V, and select the first k eigenvectors V in the eigenvector matrix V whose cumulative contribution rate is ≥ 95% k , construct the target matrix T = X weighted ×V k ; Construct a target matrix T and a regression equation of the blending ratio target vector y corresponding to the target matrix T;
[0052] The detection module is used to detect the near infrared spectrum data of the synthetic hydrocarbon oil sample to be tested, input the regression equation, and obtain the content of synthetic hydrocarbon in the synthetic hydrocarbon oil sample.
[0053] As a preferred technical solution of the present invention, the detection device further includes:
[0054] An optimization module is used to add a sample matrix X to the spectral data matrix X new When , dynamic adaptation is performed to obtain a new sample covariance matrix Then the updated covariance matrix C updated =αC+(1-α)C new , where α is the smoothing factor, and then S3 and S4 are performed in sequence to obtain the updated regression equation.
[0055] In a third aspect, the present invention provides an electronic device, comprising:
[0056] at least one processor; and a memory communicatively coupled to the at least one processor;
[0057] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for detecting the content of synthetic hydrocarbons in oil as described in the first aspect.
[0058] In a fourth aspect, the present invention provides a computer storage medium storing computer executable instructions, which, when executed by a processor, implement the method for detecting the content of synthetic hydrocarbons in oil as described in the first aspect.
[0059] Compared with the existing technical solutions, the present invention has the following beneficial effects:
[0060] (1) The detection method provided by the present invention combines near-infrared spectral data with chemometric methods to achieve rapid and accurate determination of the blending ratio of synthetic hydrocarbons to jet fuel, ensuring that the resulting sustainable aviation fuel meets relevant performance and safety standards. The detection accuracy is controlled within 0.03%, and the single detection time is controlled within seconds, greatly improving detection efficiency and meeting the needs of rapid blending and on-site detection.
[0061] (2) The detection method provided by the present invention uses low-cost equipment and simplified operating procedures, which can significantly reduce the detection cost and ensure the popularization and application of the method in grassroots environments; furthermore, the detection can be carried out on-site in complex scenarios such as airport oil depots and gas stations, reducing dependence on laboratory environments and simplifying operating procedures. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 This is a flow chart of a method for detecting the content of synthetic hydrocarbons in oil provided by an embodiment of the present invention;
[0063] Figure 2 Schematic diagram of a device for detecting the content of synthetic hydrocarbons in oil provided by an embodiment of the present invention;
[0064] Figure 3 is a schematic diagram of an electronic device provided by an embodiment of the present invention;
[0065] Figure 4 is an infrared spectrum of the synthetic hydrocarbon used in Example 1 of the present invention;
[0066] Figure 5 is an infrared spectrum of the aviation kerosene used in Example 1 of the present invention;
[0067] Figure 6 This is an infrared spectrum of a synthetic hydrocarbon oil material with a synthetic hydrocarbon content of 1% by mass used in Example 1 of the present invention;
[0068] Figure 7This is an infrared spectrum of a synthetic hydrocarbon oil material with a synthetic hydrocarbon content of 5% by mass used in Example 1 of the present invention;
[0069] Figure 8 This is an infrared spectrum of a synthetic hydrocarbon oil material with a synthetic hydrocarbon content of 10% by mass used in Example 1 of the present invention;
[0070] Figure 9 This is an infrared spectrum of the synthetic hydrocarbon oil material with a synthetic hydrocarbon mass percentage of 50% used in Example 1 of the present invention.
[0071] In the figure: 100-spectral data acquisition module, 200-regression equation construction module, 300-detection module, 400-optimization module;
[0072] 10-Electronic device, 11-Processor, 12-ROM, 13-RAM, 14-Bus, 15-I / O interface, 16-Input unit, 17-Output unit, 18-Storage unit, 19-Communication unit.
[0073] The present invention is further described in detail below. However, the following examples are merely simplified examples of the present invention and do not represent or limit the scope of protection of the present invention. The scope of protection of the present invention shall be subject to the claims. DETAILED DESCRIPTION
[0074] To better illustrate the present invention and facilitate understanding of the technical solutions of the present invention, typical but non-limiting embodiments of the present invention are as follows:
[0075] This embodiment provides a method for detecting the content of synthetic hydrocarbons in oil, the process is as follows: Figure 1 As shown, the detection method includes:
[0076] S1. collecting near-infrared spectra of oil, synthetic hydrocarbons, and at least four oils containing synthetic hydrocarbons at different blending ratios to obtain corresponding spectral data;
[0077] S2, constructing a spectral data matrix X based on the spectral data, and sequentially correcting, standardizing, and weighting the spectral data matrix X to obtain a weighted spectral data matrix X weighted , then construct the weighted spectral data matrix X weighted The covariance matrix C of
[0078] S3. Perform eigenvalue decomposition on the covariance matrix C to obtain the eigenvalue matrix Λ and the eigenvector matrix V. Select the first k eigenvectors V in the eigenvector matrix V whose cumulative contribution rate is ≥ 95%. k , construct the target matrix T = X weighted ×V k ;
[0079] S4. constructing a target matrix T and a regression equation of a blending ratio target vector y corresponding to the target matrix T;
[0080] S5. Detecting near infrared spectrum data of the synthetic hydrocarbon oil sample to be tested, inputting the data into the regression equation, and obtaining the content of synthetic hydrocarbons in the synthetic hydrocarbon oil sample.
[0081] In the present invention, at least four synthetic hydrocarbon-containing oils with different blending ratios refer to multiple synthetic hydrocarbon-containing oils, and the contents of synthetic hydrocarbons in the synthetic hydrocarbon-containing oils are different.
[0082] In the present invention, the synthetic hydrocarbon-containing oil refers to a fuel containing synthetic hydrocarbons, such as aviation fuel containing synthetic hydrocarbons, wherein the synthetic hydrocarbons in the synthetic hydrocarbon-containing fuel can be the synthetic hydrocarbons contained in the fuel itself or the synthetic hydrocarbons added externally later.
[0083] Among them, aviation fuel refers to aviation kerosene extracted from mineral resources, or it can be aviation kerosene synthesized from biomass.
[0084] Wherein, the spectral data matrix X includes: X∈R n×p , n is the number of samples, and p is the spectral variable of each sample.
[0085] For example, the spectral data matrix X is shown in Table 1 below.
[0086] Table 1
[0087]
[0088]
[0089] The correction includes: calculating the correlation coefficient r between the wavelength bands in the spectral data matrix X and the blending ratio of synthetic hydrocarbons j , select the correlation coefficient |r j The band j with |>0.8 and the corresponding synthetic hydrocarbon blending ratio are used as the preliminary screening matrix, and then the preliminary regression model is constructed using partial least squares regression to extract the regression weight b j The absolute value of the band is sorted and the band with the largest contribution is selected. The band with the largest contribution is filtered, denoised and principal component analyzed to obtain the modified spectral data matrix X'∈R n ×p '.
[0090] Among them, the correlation coefficient r j The calculation formula is as follows:
[0091]
[0092] Where, X j represents the spectral value of band j, and y is the blending ratio of synthetic hydrocarbons.
[0093] The calculation formula of the preliminary regression model is as follows:
[0094] y=X C b+ε
[0095] Where, X C is the preliminary screening matrix, y is the blending ratio of synthetic hydrocarbons, b∈R k , is the regression coefficient vector, ε∈R n , is the residual vector.
[0096] The filtering and noise reduction method includes Savitzky-Golay filtering.
[0097] The principal component analysis includes: performing principal component analysis on the data matrix X' obtained by filtering and denoising, retaining the principal components with cumulative contribution rate ≥ 95% as the modified spectral data matrix X' = X' × V k' , V k' are the first k principal component vectors whose cumulative contribution rate is ≥ 95%.
[0098] Wherein, the modified spectral data matrix X'∈R n×p 'Medium p' satisfies p-p'≥500.
[0099] The standardization includes: using the mean vector X' mean and standard deviation vector X' std Standardize the corrected spectral data matrix X' to obtain the annotated spectral data matrix X scaled , the calculation formula is as follows:
[0100]
[0101] The weighted processing includes: using a weighted matrix W to weight the annotated spectral data matrix X scaled Perform weighted processing to obtain the weighted spectral data matrix X weighted , the calculation formula is as follows:
[0102] X weighted =W×X scaled .
[0103] Wherein, the weighting matrix W includes:
[0104] W=diag(w1,w i ,……,w n ), i≤n
[0105] Where, y i is the target value of sample i, is the mean of the target value, and ∈ is a small constant.
[0106] In this paper, sample weighting is introduced during data preprocessing to ensure that low-admixture samples are adequately weighted in principal component analysis. This weighting prevents low-admixture samples from being masked by signals from high-admixture samples, ensuring that all sample data are appropriately represented in the model.
[0107] Wherein, the covariance matrix C includes:
[0108] C∈R p’×p’
[0109]
[0110] Wherein, the mixing ratio target vector y includes: y∈R n , n is the sample size.
[0111] In this paper, the cumulative contribution rate method is used to construct the regression equation. Correlation analysis between the blending ratio and the principal components is also introduced to select the most representative principal components. This method can better capture the principal components most closely related to the target variable (harmonic ratio), thereby improving the detection accuracy of the regression model.
[0112] The process of constructing the regression equation is as follows: establish a regression relationship between the target matrix T and its corresponding blending ratio target vector y:
[0113] y=Tb+∈, where b∈R k , is the regression coefficient vector, ε∈R n , is the residual vector, and after calculation, the regression equation is obtained:
[0114]
[0115] Where, is the predicted blending ratio value, b is the regression coefficient vector, is the mean of the target vector of the mixing ratio, b i is the regression coefficient of the i-th principal component in the target matrix T, is the mean of the i-th principal component score in the target matrix T.
[0116] If a new sample matrix X is added to the spectral data matrix X new , then dynamic adaptation is performed to obtain a new sample covariance matrix C new :
[0117]
[0118] Then the updated covariance matrix Cupdated :
[0119] C updated =αC+(1-α)C new , where α is the smoothing factor,
[0120] Then, S3 and S4 are performed in sequence to obtain the updated regression equation.
[0121] In the present invention, dynamic adaptation is introduced and the principal component matrix is updated in real time, so that the data of new samples can immediately affect the regression model, thereby achieving dynamic optimization and adjustment of the regression model.
[0122] Furthermore, this embodiment provides a device for detecting the content of synthetic hydrocarbons in oil, such as Figure 2 As shown, the detection device includes:
[0123] The spectrum data acquisition module 100 is used to collect near-infrared spectra of oil, synthetic hydrocarbons, at least four oils containing synthetic hydrocarbons at different blending ratios, and the oil containing synthetic hydrocarbons to be tested, and obtain corresponding spectrum data;
[0124] The regression equation construction module 200 is used to construct a spectral data matrix X based on the spectral data, and to perform correction, standardization and weighting on the spectral data matrix X in sequence to obtain a weighted spectral data matrix X. weighted , then construct the weighted covariance matrix C; perform eigenvalue decomposition on the covariance matrix C to obtain the eigenvalue matrix Λ and the eigenvector matrix V, and select the first k eigenvectors V in the eigenvector matrix V whose cumulative contribution rate is ≥ 95% k , construct the target matrix T = X weighted ×V k ; Construct a target matrix T and a regression equation of the blending ratio target vector y corresponding to the target matrix T;
[0125] The detection module 300 is used to detect the near infrared spectrum data of the synthetic hydrocarbon oil sample to be tested, input the regression equation, and obtain the content of synthetic hydrocarbons in the synthetic hydrocarbon oil sample.
[0126] The detection device further includes an optimization module 400 for adding a sample matrix X to the spectral data matrix X. new , then dynamic adaptation is performed to obtain a new sample covariance matrix Then the updated covariance matrix C updated =αC+(1-α)C new , where α is the smoothing factor, and then S3 and S4 are performed in sequence to obtain the updated regression equation.
[0127] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0128] The device provided by this invention, through its real-time data feedback mechanism, can be linked with fuel blending equipment to provide real-time feedback on the blending ratio during the blending process, allowing for dynamic adjustment. This ensures fuel blending accuracy and prevents quality issues caused by poor real-time performance.
[0129] Further, the present invention provides an electronic device, which is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the invention described and / or claimed herein.
[0130] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 and a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An I / O interface 15 is also connected to the bus 14.
[0131] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0132] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as the aforementioned method for detecting the content of synthetic hydrocarbons in oil.
[0133] In some embodiments, the aforementioned method for detecting the content of synthetic hydrocarbons in oil can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the aforementioned method for detecting the content of synthetic hydrocarbons in oil described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the aforementioned method for detecting the content of synthetic hydrocarbons in oil by any other appropriate means (e.g., by means of firmware).
[0134] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0135] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0136] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0137] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0138] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0139] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0140] The server provided in this embodiment includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the aforementioned method for detecting the content of synthetic hydrocarbons in oil is implemented.
[0141] Unless otherwise specifically stated, terms such as process, calculate, compute, determine, display, and the like may refer to the actions and / or processes of one or more processing or computing systems, or similar devices, that manipulate and convert data represented as physical (e.g., electronic) quantities within registers or memories of a processing system into other data similarly represented as physical quantities within the memories, registers, or other such information storage, transmission, or display devices of the processing system. Information and signals may be represented using any of a variety of different techniques and methods. For example, data, instructions, commands, information, signals, bits, symbols, and chips referred to throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, light fields or particles, or any combination thereof.
[0142] Those skilled in the art will also appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments of the present invention may be implemented as electronic hardware, computer software, or a combination thereof. In order to clearly illustrate the interchangeability between hardware and software, the various illustrative components, blocks, modules, circuits, and steps described above are generally described with respect to their functions. Whether such functions are implemented as hardware or software depends on the specific application and the design constraints imposed on the entire system. A skilled person may implement the described functions in a flexible manner for each specific application, but such implementation decisions should not be interpreted as departing from the scope of protection of the present invention.
[0143] The steps of the methods or algorithms described in conjunction with the embodiments herein may be directly embodied as hardware, software modules executed by a processor, or a combination thereof. The software module may be located in a RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, register, hard disk, removable disk, CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium may also be an integral part of the processor. The processor and storage medium may be located in an ASIC. The ASIC may be located in a user terminal. Of course, the processor and storage medium may also be present in a user terminal as discrete components.
[0144] For software implementation, the techniques described herein can be implemented using modules (e.g., procedures, functions, etc.) that perform the functions described herein. These software codes can be stored in a memory unit and executed by a processor. The memory unit can be implemented within the processor or external to the processor. In the latter case, it is communicatively coupled to the processor via various means, which are well known in the art.
[0145] Furthermore, in order to illustrate the method for detecting the content of synthetic hydrocarbons in oil provided by the present invention, a practical example is used for illustration, as follows:
[0146] Example 1
[0147] This embodiment provides a method for detecting the content of synthetic hydrocarbons in oil, which is as follows:
[0148] S1. Near infrared spectra of oil (aviation kerosene), synthetic hydrocarbons and four oils containing synthetic hydrocarbons at different blending ratios (synthetic hydrocarbon mass percentage blending ratios of 1%, 5%, 10% and 50%) were collected to obtain the corresponding spectral data. Figure 4 、 Figure 5 、 Figure 6 、 Figure 7 、 Figure 8 and Figure 9 ;
[0149] S2. Construct a spectral data matrix X based on the obtained spectral data. Some of the exemplified data are shown in Table 2 below.
[0150] Table 2
[0151] <![CDATA[Sample number / Wavenumber (cm -1 )]]> 3899.36 3903.22 3907.07 3910.93 3914.79 Sample 1 0.548299 0.54848 0.548755 0.548299 0.54848 Sample 2 0.55279 0.5527 0.552685 0.55279 0.5527 Sample 3 0.551555 0.551174 0.55084 0.551555 0.551174
[0152] The obtained spectral data matrix X is corrected, standardized and weighted in turn to obtain the weighted spectral data matrix X weighted , then construct the obtained weighted spectral data matrix X weightedThe covariance matrix C of
[0153] S3. Perform eigenvalue decomposition on the covariance matrix C to obtain the eigenvalue matrix Λ and the eigenvector matrix V. Select the first k eigenvectors V in the eigenvector matrix V whose cumulative contribution rate is ≥ 95%. k , construct the target matrix T = X weighted ×V k ;
[0154] S4. constructing a target matrix T and a regression equation of a blending ratio target vector y corresponding to the target matrix T;
[0155] S5. Detecting near infrared spectrum data of the synthetic hydrocarbon-containing oil sample to be tested, inputting the obtained regression equation, and obtaining the content of synthetic hydrocarbons in the synthetic hydrocarbon-containing oil sample.
[0156] Wherein, the spectral data matrix X includes: X∈R n×p , n is the number of samples, and p is the spectral variable of each sample.
[0157] The correction includes: calculating the correlation coefficient r between the wavelength bands in the spectral data matrix X and the blending ratio of synthetic hydrocarbons j , select the correlation coefficient |r j The band j with |>0.8 and the corresponding synthetic hydrocarbon blending ratio are used as the preliminary screening matrix, and then the preliminary regression model is constructed using partial least squares regression to extract the regression weight b j The absolute value of the band is sorted and the band with the largest contribution is selected. The band with the largest contribution is filtered, denoised and principal component analyzed to obtain the modified spectral data matrix X'∈R n ×p ';Correlation coefficient r j The calculation formula is as follows:
[0158]
[0159] Where, X j represents the spectral value of band j, and y is the blending ratio of synthetic hydrocarbons.
[0160] The calculation formula of the preliminary regression model is as follows:
[0161] y=X C b+ε
[0162] Where, X C is the preliminary screening matrix, y is the blending ratio of synthetic hydrocarbons, b∈R k , is the regression coefficient vector, ε∈R n , is the residual vector;
[0163] The filtering and denoising method includes Savitzky-Golay filtering; the principal component analysis includes: performing principal component analysis on the data matrix X' obtained by filtering and denoising, retaining the principal components with a cumulative contribution rate ≥ 95% as the modified spectral data matrix X' = X' × V k' , V k' is the first k principal component vectors with cumulative contribution rate ≥ 95%; the modified spectral data matrix X'∈R n×p 'Medium p' satisfies p-p'=530;
[0164] The standardization includes: using the mean vector X' mean and standard deviation vector X' std Standardize the corrected spectral data matrix X' to obtain the annotated spectral data matrix X scaled , the calculation formula is as follows:
[0165]
[0166] The weighted processing includes: using the weighting matrix W to obtain the annotated spectral data matrix X scaled Perform weighted processing to obtain the weighted spectral data matrix X weighted , the calculation formula is as follows:
[0167] X weighted =W×X scaled .
[0168] Wherein, the weighting matrix W includes:
[0169] W=diag(w1,w i ,……,w n ), i≤n
[0170] Where, y i is the target value of sample i, is the mean of the target value, and ∈ is a small constant.
[0171] In this paper, sample weighting is introduced during data preprocessing to ensure that low-admixture samples are adequately weighted in principal component analysis. This weighting prevents low-admixture samples from being masked by signals from high-admixture samples, ensuring that all sample data are appropriately represented in the model.
[0172] Wherein, the covariance matrix C includes:
[0173] C∈R p’×p’
[0174]
[0175] Wherein, the mixing ratio target vector y includes: y∈R n , n is the sample size.
[0176] The process of constructing the regression equation is as follows: establish a regression relationship between the target matrix T and its corresponding blending ratio target vector y:
[0177] y=Tb+∈
[0178] Where b∈R k , is the regression coefficient vector, ε∈R n , is the residual vector;
[0179] After expansion operation, the regression equation is obtained:
[0180]
[0181] Where, is the predicted blending ratio value, b is the regression coefficient vector, is the mean of the target vector of the mixing ratio, b i is the regression coefficient of the i-th principal component in the target matrix T, is the mean of the i-th principal component score in the target matrix T.
[0182] The actual income is as follows:
[0183] y=126.5884-2.2620×PC1-34.4414×PC2+11.2299×PC3-49.0298×PC4-77.5067×PC5
[0184] Where y is the predicted value, PC i The principal component scores are calculated from the weighted spectral data matrix and the principal component matrix.
[0185] The specific detection results are shown in Table 3.
[0186] Table 3
[0187]
[0188] Furthermore, comparative cases are designed to illustrate the advantages of the detection method provided by the present invention. The specific comparative cases are as follows:
[0189] Comparative Case 1
[0190] The only difference from the first embodiment of the present invention is that no correction is performed.
[0191] Comparative Case 2
[0192] The only difference from the first embodiment of the present invention is that no weighting processing is performed.
[0193] Based on the regression equation obtained for the aforementioned scheme, standard sample A (a pure FT-SPK sample that complies with GB6537-2018 No. 3 jet fuel) and standard sample B (a synthetic hydrocarbon-containing oil with a synthetic hydrocarbon mass percentage of 30% obtained by mixing according to Q / ZHY 13-2024 Synthetic Hydrocarbon Components and Civil Aviation Jet Fuel Containing Synthetic Hydrocarbons) were tested. The test results are shown in Table 4 below.
[0194] Table 4
[0195]
[0196] Furthermore, five tests and analyses were performed on unknown sample 1 and unknown sample 2 to conduct precision testing, and the results are shown in Table 5 below.
[0197] Table 5
[0198]
[0199] Furthermore, a new sample matrix X is added to the aforementioned spectral data matrix X new , then dynamic adaptation is performed to obtain a new sample covariance matrix C new :
[0200]
[0201] Then the updated covariance matrix C updated :
[0202] C updated =αC+(1-α)C new , where α is the smoothing factor,
[0203] Then, S3 and S4 were performed in sequence to obtain an updated regression equation. Furthermore, based on the updated regression equation, standard sample A and standard sample B were tested. The test results are shown in Table 6 below.
[0204] Table 6
[0205]
[0206] Furthermore, five tests and analyses were performed on unknown sample 1 and unknown sample 2 to conduct precision testing, and the results are shown in Table 7 below.
[0207] Table 7
[0208]
[0209] As shown in Tables 4 to 7, in the solution provided by the present invention, it can be seen from the detection results of standard samples and unknown samples that the method proposed by the present invention has higher accuracy and is fast and convenient.
[0210] The preferred embodiments of the present invention are described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various simple modifications can be made to the technical solution of the present invention, and these simple modifications all fall within the scope of protection of the present invention.
[0211] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations.
[0212] In addition, the various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the present invention, they should also be regarded as the contents disclosed by the present invention.
Claims
1. A method for detecting the content of synthetic hydrocarbons in oil, characterized in that: The detection method comprises: S1. Collect near infrared spectra of oil, synthetic hydrocarbons and at least 4 oils containing synthetic hydrocarbons at different blending ratios to obtain corresponding spectral data; S2, constructing a spectral data matrix X according to the spectral data, and sequentially correcting, standardizing and weighting the spectral data matrix X to obtain a weighted spectral data matrix X weighted , then construct the weighted spectral data matrix X weighted The covariance matrix C of S3. Perform eigenvalue decomposition on the covariance matrix C to obtain the eigenvalue matrix Λ and the eigenvector matrix V, and select the first k eigenvectors V whose cumulative contribution rate is ≥ 95% in the eigenvector matrix V. k , construct the target matrix T = X weighted ×V k ; S4, constructing a target matrix T and a regression equation of a blending ratio target vector y corresponding to the target matrix T; S5. Detect near infrared spectrum data of the synthetic hydrocarbon oil sample to be tested, input the data into the regression equation, and obtain the content of synthetic hydrocarbon in the synthetic hydrocarbon oil sample.
2. The detection method according to claim 1, characterized in that The spectral data matrix X includes: X∈R n×p , n is the number of samples, and p is the spectral variable of each sample.
3. The detection method according to claim 1 or 2, characterized in that: The correction includes: calculating the correlation coefficient r between the band in the spectral data matrix X and the blending ratio of synthetic hydrocarbons j , select the correlation coefficient |r j The band j with |>0.8 and the corresponding synthetic hydrocarbon blending ratio are used as the preliminary screening matrix, and then the preliminary regression model is constructed using partial least squares regression to extract the regression weight b j The absolute values of the bands are sorted and the band with the largest contribution is selected. The band with the largest contribution is filtered, denoised and analyzed by principal component analysis to obtain the modified spectral data matrix X'∈R n×p '; Preferably, the correlation coefficient r j The calculation formula is as follows: Where, X j represents the spectral value of band j, and y is the blending ratio of synthetic hydrocarbons. Preferably, the calculation formula of the preliminary regression model is as follows: y=X C b+ε Where, X C is the preliminary screening matrix, y is the blending ratio of synthetic hydrocarbons, b∈R k , is the regression coefficient vector, ε∈R n , is the residual vector; Preferably, the filtering and noise reduction method includes Savitzky-Golay filtering; Preferably, the principal component analysis includes: performing principal component analysis on the data matrix X' obtained by filtering and denoising, retaining the principal components with cumulative contribution rate ≥ 95% as the modified spectral data matrix X'=X'×V k' , V k' It is the first k principal component vectors with cumulative contribution rate ≥ 95%; Preferably, the modified spectral data matrix X'∈R n×p 'Medium p' satisfies p-p'≥500; Preferably, the standardization includes: using the mean vector X' mean and standard deviation vector X' std Standardize the corrected spectral data matrix X' to obtain the annotated spectral data matrix X scaled , the calculation formula is as follows: Preferably, the weighted processing includes: using a weighting matrix W to annotate the annotated spectral data matrix X scaled Perform weighted processing to obtain the weighted spectral data matrix X weighted , the calculation formula is as follows: X weighted =W×X scaled ; Preferably, the weighting matrix W comprises: In=diag(w1,w i ,……,In n ),i≤n In the formula, y i is the target value of sample i, is the mean of the target values, which is a small constant.
4. The detection method according to claim 1, characterized in that The covariance matrix C includes: C∈R p′×p′ 5. The detection method according to claim 1, characterized in that The process of constructing the regression equation is as follows: Establish a regression relationship between the target matrix T and its corresponding blending ratio target vector y: y=Tb+ε Where b∈R k , is the regression coefficient vector, ε∈R n , is the residual vector, y is the mixing ratio target vector, y∈R n , n is the number of samples; After calculation, the regression equation is obtained: In the formula, is to predict the blending ratio value, b is the regression coefficient vector, is the mean of the target vector of the mixing ratio, b i is the regression coefficient of the i-th principal component in the target matrix T, is the mean of the i-th principal component score in the target matrix T.
6. The detection method according to any one of claims 1 to 5, characterized in that: If a sample matrix X is added to the spectral data matrix X new , then dynamically adapt to obtain a new sample covariance matrix C new : Then the updated covariance matrix C updated : C updated =αC+(1-α)C new In the formula, α is the smoothing factor; Then, S3 and S4 are performed in sequence to obtain the updated regression equation.
7. A device for detecting the content of synthetic hydrocarbons in oil, characterized in that: The detection device comprises: A spectral data acquisition module is used to collect near-infrared spectra of oil, synthetic hydrocarbons, at least four oils containing synthetic hydrocarbons at different blending ratios, and the oil containing synthetic hydrocarbons to be tested, to obtain corresponding spectral data; A regression equation construction module is used to construct a spectral data matrix X based on the spectral data, and to perform correction, standardization and weighting processing on the spectral data matrix X in turn to obtain a weighted spectral data matrix X weighted , then construct the weighted covariance matrix C; perform eigenvalue decomposition on the covariance matrix C to obtain the eigenvalue matrix Λ and the eigenvector matrix V, and select the first k eigenvectors V in the eigenvector matrix V whose cumulative contribution rate ≥ 95% k , construct the target matrix T = X weighted ×V k ; Construct a target matrix T and a regression equation of a blending ratio target vector y corresponding to the target matrix T; The detection module is used to detect the near infrared spectrum data of the synthetic hydrocarbon oil sample to be tested, input the regression equation, and obtain the content of synthetic hydrocarbon in the synthetic hydrocarbon oil sample.
8. The detection device according to claim 7, characterized in that: The detection device also includes: An optimization module is used to add a sample matrix X to the spectral data matrix X new When , dynamic adaptation is performed to obtain a new sample covariance matrix Then the updated covariance matrix C updated =αC+(1-α)C new , where α is the smoothing factor, and then S3 and S4 are performed in sequence to obtain the updated regression equation.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; Wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for detecting the content of synthetic hydrocarbons in oil according to any one of claims 1-7.
10. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, and when the computer executable instructions are executed by a processor, the method for detecting the content of synthetic hydrocarbons in oil according to any one of claims 1 to 7 is implemented.