A diesel alcohol doping recognition method and system based on a neural network

By processing the second derivatives and converting the images of near-infrared and Raman spectral data in diesel adulteration detection methods, and combining them with a neural network model, the problems of complexity and high cost of existing detection methods are solved, and rapid and accurate identification of diesel alcohol adulteration is achieved.

CN122259505APending Publication Date: 2026-06-23CHINESE PEOPLES ARMED POLICE FORCE NON-COMMISSIONED OFFICER SCHOOL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINESE PEOPLES ARMED POLICE FORCE NON-COMMISSIONED OFFICER SCHOOL
Filing Date
2026-05-26
Publication Date
2026-06-23

Smart Images

  • Figure CN122259505A_ABST
    Figure CN122259505A_ABST
Patent Text Reader

Abstract

This application provides a neural network-based method and system for identifying alcohol adulteration in diesel fuel, relating to the field of data processing. The method includes the following steps: acquiring near-infrared spectral dataset RI and Raman spectral dataset RS based on the oil sample to be tested; acquiring first-derivative near-infrared spectral dataset RI' and second-derivative near-infrared spectral dataset RI", and first-derivative Raman spectral dataset RS' and second-derivative Raman spectral dataset RS"; acquiring a three-channel near-infrared image PRI based on RI, RI', and RI", and acquiring a three-channel Raman image PRS based on RS, RS', and RS"; inputting PRI and PRS into a target recognition model to obtain the recognition result output by the target recognition model. This application achieves deep feature extraction from the original one-dimensional data, thereby improving the accuracy of the final output result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and in particular to a method and system for identifying diesel alcohol adulteration based on neural networks. Background Technology

[0002] Currently, commonly used methods for detecting adulteration in diesel fuel mainly include gas chromatography, liquid chromatography, and mass spectrometry. These methods can identify adulterants by detecting the chemical components in the sample, offering high detection accuracy. However, these methods typically require complex sample pretreatment processes, expensive equipment, long testing times, and demand a high level of expertise from the personnel. Therefore, these methods are more commonly used in laboratory testing but have limitations in rapid and on-site detection. Summary of the Invention

[0003] To address the aforementioned technical problem, the technical solution adopted in this application is as follows: A method for identifying alcohol doping in diesel fuel based on a neural network, the method comprising the following steps: S100, Based on the oil sample to be tested, obtain the near-infrared spectral dataset RI=(RI1,RI2,…,RIi,…,RIn) and the Raman spectral dataset RS=(RS1,RS2,…,RSi,…,RSn); where RIi is the near-infrared spectral intensity of the i-th wavelength acquisition point, RSi is the Raman spectral intensity of the i-th wavelength acquisition point, i takes the value from 1 to n, and n is the number of wavelength acquisition points; diesel oil accounts for the largest proportion of the oil sample to be tested. S200, obtain the first derivative near-infrared spectrum dataset RI' and the second derivative near-infrared spectrum dataset RI" based on RI, and obtain the first derivative Raman spectrum dataset RS' and the second derivative Raman spectrum dataset RS" based on RS; S300, based on RI, RI', and RI", obtain the Markov transfer field image MRI corresponding to RI, the Markov transfer field image MRI' corresponding to RI', and the Markov transfer field image MRI" corresponding to RI"; based on RS, RS', and RS", obtain the Markov transfer field image MRS corresponding to RS, the Markov transfer field image MRS' corresponding to RS', and the Markov transfer field image MRS" corresponding to RS"; MRI, MRI', and MRI" have the same size, and MRS, MRS', and MRS" have the same size. S400, acquire near-infrared three-channel image PRI based on MRI, MRI', and MRI"; acquire Raman three-channel image PRS based on MRS, MRS', and MRS"; S500, input PRI and PRS into the target recognition model to obtain the recognition result output by the target recognition model; the recognition result is used to indicate the type of alcohol doped in the oil sample to be tested.

[0004] In another aspect of this application, a diesel alcohol doping identification system based on a neural network is also provided. The system includes a near-infrared-Laman combined spectrometer and a processor. The near-infrared-Laman combined spectrometer and the processor are connected. The processor stores executable code, which, when executed, is used to implement the above-described method.

[0005] This application has at least the following beneficial effects: This application provides a neural network-based method for identifying diesel alcohol doping. By calculating the second derivative of the original data, the characteristics of spectral variation trends are enhanced, and the characteristics of spectral peaks are enhanced. At the same time, by converting three types of one-dimensional spectral data into two-dimensional image data and then stitching them into three-channel two-dimensional image data, deep feature extraction of the original one-dimensional data is achieved, thereby improving the accuracy of the final output results. Attached Figure Description

[0006] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0007] Figure 1 A flowchart of a diesel fuel alcohol doping identification method based on a neural network is provided for embodiments of this application; Figure 2 Near-infrared spectra of pure diesel and blended oil samples provided in the embodiments of this application; Figure 3 Raman spectra of pure diesel and adulterated oil samples provided in the embodiments of this application. Detailed Implementation

[0008] The technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0009] It is worth noting that in the following description, specific details such as particular system structures and techniques are set forth for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary details.

[0010] It should be understood that in this application specification and the appended claims, the use of the terms "comprising," "including," "including but not limited to," "including but not limited to," "mainly composed of," or "mainly made of" indicates the presence of the described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof.

[0011] It should be understood that in this application specification and the appended claims, the use of the terms "consisting of" or "component of" indicates the presence of the described feature, integral, step, operation, element and / or component, but excludes the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0012] It should be understood that, in this specification and the appended claims, the term "and" indicates a combination in which multiple of the associated listed items exist simultaneously. For example, "A, B, C, and D" means a combination in which "A and B and C and D exist simultaneously".

[0013] It should be understood that in this application specification and the appended claims, the use of the term "or" indicates a combination in which one of the associated listed items exists alone. For example, "A, B, C or D" refers to the four combinations of "A alone", "B alone", "C alone", and "D alone".

[0014] It should be understood that, in this application specification and the appended claims, the term "and / or" indicates any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations. For example, "A and / or B" refers to the three combinations of "A alone," "B alone," or "A and B simultaneously." For example, "A, B, and / or C" refers to the seven combinations of "A alone," "B alone," "C alone," "A and B simultaneously," "A and C simultaneously," "B and C simultaneously," and "A, B, and C simultaneously."

[0015] It should be understood that, in this specification and the appended claims, the term "if" is used to indicate, depending on the context, "in the case of," "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."

[0016] It should be understood that in this application specification and the appended claims, the terms "greater than", "less than", "exceeding", etc. are understood to exclude the number itself; and the terms "above", "below", "within", etc. are understood to include the number itself.

[0017] It should be understood that in this application specification and the appended claims, the terms "the," "the," "the," "the," "the," "the described," "the mentioned," etc., may be understood, depending on the context, to refer to the content mentioned above.

[0018] It should be understood that in this application specification and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance, nor are they used to describe a specific order or sequence.

[0019] It should be understood that in this application specification and appended claims, the designations such as "S100," "S200," and "S300" are used only for distinguishing descriptions and should not be construed as indicating or implying a specific order or sequence of execution of steps or processes. For example, "S100, acquire data A; S200, acquire data B; S300, acquire C based on A and B;" is merely an example providing a feasible execution order, not a necessary one. Those skilled in the art can determine the actual and feasible execution order based on the function and internal logic of each step. For example, "step S100 is executed before step S200, then step S300 is executed," "step S200 is executed before step S100, then step S300 is executed," or "steps S100 and S200 are executed in parallel, then step S300 is executed."

[0020] It should be understood that in this application specification and appended claims, if numbering or quantity in the form of “f(i); i=1, 2, ..., n;” is used, the specific value corresponding to the term “f(i)” should be understood as a value that changes with the value of i, and not as a fixed value. For example, in different practical scenarios, “f(1)” and “f(2)”, “f(1)” may be equal to “f(2)” or may not be equal to “f(2)”, and unless otherwise specified, there is no necessary size relationship between “f(1)” and “f(2)”.

[0021] It should be understood that in this application specification and appended claims, if numbers or symbols in the form of superscript are used, and the context or other corresponding locations provide a specific interpretation of them, they should be understood according to their corresponding explanatory description, and cannot be directly and simply understood as concepts such as "exponent" in mathematics or "atomic number" in chemistry. Similarly, if numbers or symbols in the form of subscript are used, they should be understood in the same way, without further explanation.

[0022] It should be understood that in the description of this application and the appended claims, if terms such as "A=(...)" are used, unless otherwise specifically interpreted, they should be understood as "A includes...", and not as "A is composed of...". Furthermore, unless otherwise specifically interpreted, the parentheses "(" and ")" are only used in conjunction with "=" to indicate what items or data A includes, and do not refer to any specific data structure, nor do they limit the type of its elements, whether the number of elements is fixed, whether the elements are ordered, whether the elements are repeatable, what query method is required to query its elements, or what access order is required to access its elements.

[0023] It should be understood that in the description of this application and the appended claims, if common processing functions such as "max(...)", "min(...)", and "avg(...)" are used, the context or other corresponding locations should provide a specific interpretation of these terms. If no specific interpretation exists, those skilled in the art should use relevant technical terms from computer science and technology for connection. For example, "max(...)" refers to a function for determining the maximum value, "min(...)" refers to a function for determining the minimum value, and "avg(...)" refers to a function for determining the average value.

[0024] Please refer to Figure 1 As shown in an exemplary embodiment of this application, a method for identifying diesel alcohol doping based on a neural network is provided, the method comprising the following steps: S100, based on the oil sample to be tested, obtain the near-infrared spectral dataset RI=(RI1,RI2,…,RIi,…,RIn) and the Raman spectral dataset RS=(RS1,RS2,…,RSi,…,RSn); where RIi is the near-infrared spectral intensity of the i-th wavelength acquisition point, RSi is the Raman spectral intensity of the i-th wavelength acquisition point, i takes values ​​from 1 to n, and n is the number of wavelength acquisition points; diesel fuel accounts for the largest proportion of the oil sample to be tested. Specifically, the near-infrared and Raman spectra correspond to different bands. In this implementation, the number of wavelength acquisition points set in each spectrum is the same, but the actual wavelengths corresponding to different wavelength acquisition points can be different. For example, the wavelengths corresponding to the acquisition points of RI1 and RS1 are different. Of course, since there is overlap in the bands, some acquisition points can also be the same, but the order in the dataset can be different. It is sufficient to ensure that the corresponding wavelengths in the same dataset are in ascending order. "The largest proportion" can be understood as diesel fuel being the main component, with the largest volume or mass proportion, or greater than 70%.

[0025] S200, obtain the first derivative near-infrared spectrum dataset RI' and the second derivative near-infrared spectrum dataset RI" of RI based on RI, and obtain the first derivative Raman spectrum dataset RS' and the second derivative Raman spectrum dataset RS" of RS based on RS.

[0026] Among them, RI, RI', RI", RI, RI', and RI" are all data that have undergone preprocessing steps such as filtering, standardization, and normalization on the original data. Specifically, the preprocessing steps include median filtering, Savitzky-Golay filtering, spectral derivative calculation, and robust normalization.

[0027] It is understandable that median filtering and Savitzky-Golay filtering are performed before step S100, and spectral derivative calculation and robust normalization can be understood as the specific implementation of step S200.

[0028] Specifically, robust normalization uses a percentile-based normalization method, specifically the 2% and 98% percentiles.

[0029] S300, based on RI, RI', and RI", obtain the Markov transfer field image MRI corresponding to RI, the Markov transfer field image MRI' corresponding to RI', and the Markov transfer field image MRI" corresponding to RI"; based on RS, RS', and RS", obtain the Markov transfer field image MRS corresponding to RS, the Markov transfer field image MRS' corresponding to RS', and the Markov transfer field image MRS" corresponding to RS"; MRI, MRI', and MRI" have the same size, and MRS, MRS', and MRS" have the same size.

[0030] Specifically, RI' = (RI1', RI2', ..., RIi', ..., RIn'); where RIi' is the first derivative of RIi; RI"=(RI1",RI2",…,RIi",…,RIn";where RIi" is the second derivative of RIi; RS'=(RS1',RS2',…,RSi',…,RSn'); where RSi' is the first derivative of RSi; RS"=(RS1",RS2",…,RSi",…,RSn"); where RSi" is the second derivative of RSi.

[0031] Both the near-infrared spectral intensity and the Raman spectral intensity are normalized values, and their values ​​range from 0 to 1. MRI, MRI', MRI", MRS, MRS', and MRS" are obtained through the following steps: S001, obtain the target dataset Y=(Y1,Y2,…,Yi,…,Yn); where Yi is the i-th target data in Y, and Yi is RIi, RIi', RIi", RSi, RSi' or RIi". S002, perform quantile binning based on Y to obtain q numerical intervals; each numerical interval has its unique corresponding state identifier. S003, determine the state identifier corresponding to the numerical interval where Yi is located as the target state identifier Zi corresponding to Yi, so as to obtain the target state identifier Z=(Z1,Z2,…,Zi,…,Zn); S003, Based on Z, determine the target state transition matrix MZ, where MZ is a q-row, q-column matrix, and the value in the p1-th row and p2-th column of MZ represents the transition probability from the state corresponding to the p1-th state identifier to the state corresponding to the p2-th state identifier; S004, Generate a Markov transfer field image MZP based on MZ; MZP is MRI, MRI', MRI", MRS, MRS', or MRS".

[0032] It is understandable that MRI, MRI', MRI", MRS, MRS', and MRS" are obtained in the same way, the difference lies in the input data, hence the above examples are used for illustration.

[0033] S400 acquires near-infrared three-channel images PRI based on MRI, MRI', and MRI"; and acquires Raman three-channel images PRS based on MRS, MRS', and MRS".

[0034] Specifically, the values ​​corresponding to pixels at the same position in MRI, MRI', and MRI" are concatenated to obtain PRI; the values ​​corresponding to pixels at the same position in MRS, MRS', and MRS" are concatenated to obtain PRS. From the above, it can be seen that the values ​​corresponding to pixels at the same position in MRI, MRI', and MRI" can be understood as using the values ​​of the three images as R / G / B values ​​to generate a three-channel image.

[0035] S500, input PRI and PRS into the target recognition model to obtain the recognition result output by the target recognition model; the recognition result is used to indicate the type of alcohol doped in the oil sample to be tested.

[0036] Specifically, the target recognition model includes a first feature extraction network, a second feature extraction network, a concatenation layer, and a classification layer; The first feature extraction network is used to receive PRI and output the near-infrared feature vector TRI corresponding to PRI; The second feature extraction network is used to receive the PRS and output the Raman feature vector TRS corresponding to the PRS; The splicing layer is used to splice TRI and TRS to obtain a joint spectral feature vector TL; The classification layer is used to receive the classification result (TL) and output the classification result corresponding to the TL.

[0037] Both the first feature extraction network and the second feature extraction network are residual convolutional neural networks. Specifically, in this embodiment, a ResNet convolutional neural network is used.

[0038] The splicing layer can be spliced ​​directly or by weighted splicing, and this embodiment does not impose any restrictions.

[0039] The classification layer can be based on linear regression.

[0040] It can be understood that the relevant parameters involved in the original first feature extraction network, second feature extraction network, splicing layer, and classification layer in the embodiments of this application can all be initialized with random values ​​and trained using pre-labeled training samples through training methods such as backpropagation or gradient descent. The training samples can be obtained by adding different impurity oils to different batches of pure diesel oil, performing spectral analysis to obtain relevant spectral data, and obtaining corresponding three-channel images using the above method. The labels corresponding to the impurity oils are then used as sample labels to form training samples. It should be noted that the training samples should include three-channel images obtained from the spectral data of different batches of pure diesel oil, and correspondingly, the sample labels should also include the label "no impurity". Therefore, the final classification result should also include the result "no impurity". Other sample labels and classification results can be "methanol impurity", "ethanol impurity", etc.

[0041] Please refer to Figure 2 and Figure 3 As shown, due to the doping of alcohols (all at a concentration of 10%), their curves are highly similar to those of blast furnace diesel, and their values ​​at specific peaks and troughs almost overlap. Therefore, processing only one-dimensional data results in low accuracy. In this embodiment, the characteristics of spectral variation trends are enhanced by calculating the second derivative of the original data, and the characteristics of spectral peaks are enhanced by calculating the second derivative of the original data. At the same time, by converting the three types of one-dimensional spectral data into two-dimensional image data and then stitching them together into three-channel two-dimensional image data, a deeper feature extraction of the original one-dimensional data is achieved, thereby improving the accuracy of the final output results.

[0042] In another exemplary embodiment of this application, the target recognition model further includes a weight determination module; The weight determination module is used to receive the original joint dataset RI-RS=(RI1,RI2,…,RIi,…,RIn,RS1,RS2,…,RSi,…,RSn) and output the weight set W=(W1,W2) corresponding to RI-RS; where W1 is the weight corresponding to TRI and W2 is the weight corresponding to TRS. The joint spectral feature vector TL = (W1×TRI1,W1×TRI2,…,W1×TRIj,…,W1×TRIm,W2×TRS1,W2×TRS2,…,W2×TRSj,…,W2×TRSm); where TRIj is the j-th feature value in TRI, TRSj is the j-th feature value in TRS, j takes values ​​from 1 to m, and m is the number of feature values ​​in TRI and TRS.

[0043] The weight determination module is constructed using a linear regression model.

[0044] Because the spectral data exhibits different characteristics in near-infrared and Raman spectra under different doping types and ratios, the difference between near-infrared and pure diesel fuel is sometimes greater than that in Raman spectra. Therefore, in this embodiment, the features of the original data are extracted based on the weight determination module, forming two weights, W1 and W2. By allocating these weights, the final classification layer can focus on different feature vectors obtained from different spectral data under different conditions, thereby improving the accuracy of the final classification result.

[0045] It is worth noting that if a weight determination module is used, the weight determination module can be trained together with other layers and neural networks as a complete model, only the processing method of the input data needs to be distinguished.

[0046] In one exemplary embodiment of this application, a diesel alcohol doping identification system based on a neural network is also provided. The system includes a near-infrared-Laman combined spectrometer and a processor. The near-infrared-Laman combined spectrometer and the processor are connected. The processor stores executable code, which, when executed, is used to implement the above-described method.

[0047] In this application embodiment, a non-transitory computer-readable storage medium is also provided. This non-transitory computer-readable storage medium can be disposed in an electronic device to store at least one instruction or at least one program related to implementing the method provided in any embodiment of this application. The at least one instruction or the at least one program is loaded and executed by a processor to implement the method provided in any embodiment of this application, and can achieve the same technical effect. To avoid repetition, further details are omitted here.

[0048] Examples of non-transitory computer-readable storage media include: computer read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), compact disc read-only memory (CD-ROM), flash memory, magnetic disk, optical disk, portable computer disk, hard disk and / or solid-state drive, etc.

[0049] In this application embodiment, an electronic device is also provided, the electronic device including a processor and the non-transitory computer-readable storage medium. The processor loads and executes at least one instruction or at least one program stored in the non-transitory computer-readable storage medium related to implementing the method provided in any embodiment of this application, so as to implement the method provided in the embodiment of this application.

[0050] For example, the electronic device may be a mobile electronic device or a non-mobile electronic device that also includes other functions such as a personal digital assistant and / or music player. Further, the mobile electronic device may be any one of a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA); the non-mobile electronic device includes any one of a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine. No specific limitations are made in the embodiments of this application.

[0051] For example, the processor can be a processor in any electronic device.

[0052] Exemplary embodiments of this application also provide a feasible structure for an electronic device. For example, the electronic device may include a processor, an external memory interface, internal memory, a universal serial bus (USB) interface (hereinafter referred to as a USB interface), a charging management module, a power management module, a battery, a first antenna, a second antenna, a mobile communication module, a wireless communication module, an audio module, a speaker, a receiver, a microphone, a headphone jack, a sensor module, buttons, a motor, an indicator, a camera, a display screen, and a subscriber identification module (SIM) card interface (hereinafter referred to as a SIM card interface), etc. The sensor module may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, and / or bone conduction sensors, etc.

[0053] It should be understood that the exemplary structures of the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than the structure described herein, or combine some components, or split some components, or have different component arrangements. The components may be implemented in hardware, software, or a combination of software and hardware.

[0054] For example, the processor may include one or more processing units, wherein the processing units include: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.

[0055] For example, the processor may further include a memory for storing instructions and data. In some embodiments of this application, the memory in the processor is a cache memory. The memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instructions or data again, it can directly retrieve them from the memory.

[0056] For example, the processor may also include one or more interfaces. These interfaces include: an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc.

[0057] The integrated circuit interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (SCL).

[0058] Integrated circuits with built-in audio interfaces can be used for audio communication. In some embodiments of this application, the processor may include multiple sets of integrated circuit-based audio interfaces. The processor can couple with an audio module through the integrated circuit-based audio interface to achieve communication between the processor and the audio module.

[0059] The pulse code modulation interface can also be used for audio communication, specifically for sampling, quantizing, and encoding analog signals. In some embodiments of this application, the audio module and the wireless communication module can be coupled through the pulse code modulation interface.

[0060] A Universal Asynchronous Receiver / Transmitter (UART) is a universal serial data bus interface used for asynchronous communication. This bus can be a bidirectional communication bus interface. It converts the data to be transmitted between serial and parallel communication. In some embodiments of this application, the processor and the wireless communication module can be connected via the UART.

[0061] Mobile industry processor interfaces can be used to connect processors to peripheral devices such as displays and cameras.

[0062] General purpose input / output interfaces can be configured via software.

[0063] Furthermore, the general-purpose input / output interface can be configured as a control signal or a data signal. In some embodiments of this application, the general-purpose input / output interface can be used to connect the processor to a camera, display screen, wireless communication module, audio module, sensor module, etc.

[0064] A USB interface is an interface that conforms to the USB standard specification, specifically including Mini USB, Micro USB, and USB Type-C interfaces. USB interfaces can be used to connect chargers to charge electronic devices, and also for transferring data between electronic devices and peripheral devices.

[0065] It should be understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or a combination of multiple interface connection methods as described in the embodiments.

[0066] The charging management module receives charging input from a charger, which can be either a wireless or wired charger. In some wired charging embodiments, the charging management module receives charging input from the wired charger via a USB interface. In some wireless charging embodiments, the charging management module receives wireless charging input via the wireless charging coil of the electronic device. While charging the battery, the charging management module can also supply power to various parts of the electronic device via the power management module.

[0067] The power management module is used to connect the battery, the charging management module, and the processor.

[0068] Wireless communication functionality in electronic devices can be achieved through a first antenna, a second antenna, a mobile communication module, a wireless communication module, a modem processor, and a baseband processor.

[0069] Mobile communication modules can enable wireless communication solutions, including 2G / 3G / 4G / 5G, for use in electronic devices.

[0070] A modem processor may include a modulator and a demodulator. The modulator modulates a low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to a baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to an application processor. The application processor outputs sound signals through audio devices (not limited to speakers, receivers, etc.) or displays images or videos on a display screen. In some embodiments of this application, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor and housed within the same device as the mobile communication module or other functional modules.

[0071] Wireless communication modules can enable solutions for wireless communication applications in electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and near infrared (IR) technologies.

[0072] In some embodiments of this application, the first antenna of the electronic device is coupled to the mobile communication module, and the second antenna is coupled to the wireless communication module, enabling the electronic device to communicate with networks and other devices via wireless communication technology.

[0073] Electronic devices utilize GPUs, displays, and application processors to achieve their display functions. A GPU is a microprocessor for image processing, connecting the display and the application processor. GPUs perform mathematical and geometric calculations and are used for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.

[0074] The display screen is used to display images, videos, etc. The display screen includes a display panel. The display panel can be a liquid crystal display (LCD), or a display panel made of materials selected from organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), minimized, microLEDs, micro-OLEDs, or quantum dot light-emitting diodes (QLEDs). In some embodiments of this application, the electronic device may include one or more display screens. In some embodiments of this application, the display screen may also integrate touch functionality and may also be referred to as a touch screen.

[0075] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.

[0076] External storage interfaces can be used to connect external memory cards, such as Micro SD cards, to expand the storage capacity of electronic devices.

[0077] Internal memory can be used to store executable program code for a computer, which includes instructions. The processor executes the instructions stored in internal memory to perform various functional applications and data processing of electronic devices.

[0078] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors. Examples include music playback and recording.

[0079] The audio module converts digital audio information into analog audio signals for output, and also converts analog audio input into digital audio signals. The speaker, also called a "horn," converts audio electrical signals into sound signals. The receiver, also called a "handset," converts audio electrical signals into sound signals. The microphone, also called a "microphone" or "voice transducer," converts sound signals into electrical signals. The headphone jack is used to connect wired headphones.

[0080] Pressure sensors are used to sense pressure signals and convert them into electrical signals. In some embodiments of this application, the pressure sensor can be located on the display screen. A gyroscope sensor can be used to determine the motion posture of the electronic device. A barometric pressure sensor is used to measure air pressure. In some embodiments of this application, the electronic device calculates altitude using the air pressure value measured by the barometric pressure sensor, assisting in positioning and navigation. An accelerometer can detect the magnitude of acceleration of the electronic device in various directions (generally three axes). A distance sensor is used to measure distance. A fingerprint sensor is used to collect fingerprints. A touch sensor, also known as a "touch panel," can be located on the display screen, forming a touchscreen, also known as a "touch screen." A bone conduction sensor can acquire vibration signals. In some embodiments of this application, a bone conduction sensor can acquire vibration signals from vibrating bone fragments in the human vocal cords. A bone conduction sensor can also contact the human pulse to receive blood pressure signals.

[0081] The buttons include a power button and volume buttons. A motor can generate vibration alerts. Indicators can be indicator lights, used to show charging status, battery level changes, messages, missed calls, notifications, etc. A SIM card slot is used to connect a SIM card.

[0082] Embodiments of this application also provide a computer program product including program code that, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described in this specification according to various exemplary embodiments of this application.

[0083] This application also provides a chip, which includes a processor and a communication interface. The communication interface is used to receive signals and transmit the signals to the processor. The processor processes the signals so that the methods described in the various exemplary embodiments of this application are executed.

[0084] While specific embodiments of this application have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this application. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of this application. The scope of this application is defined by the appended claims.

Claims

1. A method for identifying diesel alcohol doping based on neural networks, characterized in that, The method includes the following steps: S100, Based on the oil sample to be tested, obtain the near-infrared spectral dataset RI=(RI1,RI2,…,RIi,…,RIn) and the Raman spectral dataset RS=(RS1,RS2,…,RSi,…,RSn); where RIi is the near-infrared spectral intensity of the i-th wavelength acquisition point, RSi is the Raman spectral intensity of the i-th wavelength acquisition point, i takes the value from 1 to n, and n is the number of wavelength acquisition points; diesel oil accounts for the largest proportion of the oil sample to be tested. S200, obtain the first derivative near-infrared spectrum dataset RI' and the second derivative near-infrared spectrum dataset RI" based on RI, and obtain the first derivative Raman spectrum dataset RS' and the second derivative Raman spectrum dataset RS" based on RS; S300, based on RI, RI', and RI", obtain the Markov transfer field image MRI corresponding to RI, the Markov transfer field image MRI' corresponding to RI', and the Markov transfer field image MRI" corresponding to RI"; based on RS, RS', and RS", obtain the Markov transfer field image MRS corresponding to RS, the Markov transfer field image MRS' corresponding to RS', and the Markov transfer field image MRS" corresponding to RS"; MRI, MRI', and MRI" have the same size, and MRS, MRS', and MRS" have the same size. S400, acquire near-infrared three-channel image PRI based on MRI, MRI', and MRI"; acquire Raman three-channel image PRS based on MRS, MRS', and MRS"; S500, input PRI and PRS into the target recognition model to obtain the recognition result output by the target recognition model; the recognition result is used to indicate the type of alcohol doped in the oil sample to be tested.

2. The method according to claim 1, characterized in that, The target recognition model includes a first feature extraction network, a second feature extraction network, a splicing layer, and a classification layer; The first feature extraction network is used to receive PRI and output the near-infrared feature vector TRI corresponding to PRI; The second feature extraction network is used to receive the PRS and output the Raman feature vector TRS corresponding to the PRS; The splicing layer is used to splice TRI and TRS to obtain a joint spectral feature vector TL; The classification layer is used to receive the classification result (TL) and output the classification result corresponding to the TL.

3. The method according to claim 2, characterized in that, The target recognition model also includes a weight determination module; The weight determination module is used to receive the original joint dataset RI-RS=(RI1,RI2,…,RIi,…,RIn, RS1,RS2,…,RSi,…,RSn) and output the weight set W=(W1,W2) corresponding to RI-RS; where W1 is the weight corresponding to TRI and W2 is the weight corresponding to TRS. The joint spectral feature vector TL = (W1×TRI1,W1×TRI2,…,W1×TRIj,…,W1×TRIm,W2×TRS1,W2×TRS2,…,W2×TRSj,…,W2×TRSm); where TRIj is the j-th feature value in TRI, TRSj is the j-th feature value in TRS, j takes values ​​from 1 to m, and m is the number of feature values ​​in TRI and TRS.

4. The method according to claim 2, characterized in that, Both the first feature extraction network and the second feature extraction network are residual convolutional neural networks.

5. The method according to claim 3, characterized in that, The weight determination module is constructed using a linear regression model.

6. The method according to claim 1, characterized in that, RI'=(RI1',RI2',…,RIi',…,RIn'); where RIi' is the first derivative of RIi; RI"=(RI1",RI2",…,RIi",…,RIn";where RIi" is the second derivative of RIi; RS'=(RS1',RS2',…,RSi',…,RSn'); where RSi' is the first derivative of RSi; RS"=(RS1",RS2",…,RSi",…,RSn"); where RSi" is the second derivative of RSi.

7. The method according to claim 6, characterized in that, Both the near-infrared spectral intensity and the Raman spectral intensity are normalized values, and their values ​​range from 0 to 1. MRI, MRI', MRI", MRS, MRS', and MRS" are obtained through the following steps: S001, obtain the target dataset Y=(Y1,Y2,…,Yi,…,Yn); where Yi is the i-th target data in Y, and Yi is RIi, RIi', RIi", RSi, RSi' or RIi". S002, perform quantile binning based on Y to obtain q numerical intervals; each numerical interval has its unique corresponding state identifier. S003, determine the state identifier corresponding to the numerical interval where Yi is located as the target state identifier Zi corresponding to Yi, so as to obtain the target state identifier Z=(Z1,Z2,…,Zi,…,Zn); S003, Based on Z, determine the target state transition matrix MZ, where MZ is a q-row, q-column matrix, and the value in the p1-th row and p2-th column of MZ represents the transition probability from the state corresponding to the p1-th state identifier to the state corresponding to the p2-th state identifier; S004, Generate a Markov transfer field image MZP based on MZ; MZP is MRI, MRI', MRI", MRS, MRS', or MRS".

8. The method according to claim 7, characterized in that, To obtain PRI, concatenate the values ​​of pixels at the same position in MRI, MRI', and MRI"; to obtain PRS, concatenate the values ​​of pixels at the same position in MRS, MRS', and MRS".

9. A diesel fuel alcohol adulteration identification system based on neural networks, characterized in that, The system includes a near-infrared-La Mann combined spectrometer and a processor, the near-infrared-La Mann combined spectrometer and the processor being connected, the processor storing executable code, which, when executed, is used to implement the method according to any one of claims 1-8.