Doped edible oil detection method and system based on terahertz wireless sensing
By using pre-trained detection models in terahertz wireless perception technology to analyze terahertz reflected signals, the problem of difficulty in detecting adulterated edible oils in daily environments in the prior art is solved, and a high sensitivity and universal detection effect is achieved.
Patent Information
- Application Number
- CN202411243536.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-09-05
AI Technical Summary
The prior art is difficult to effectively detect adulterated edible oils in daily environments, and wireless signal-based detection technology cannot carry enough identification information due to wavelength limitations.
Using a doped edible oil detection method based on terahertz wireless perception, a terahertz signal is emitted to the edible oil to be detected through a terahertz device, a reflected signal is recorded, and a pre-trained doped edible oil detection model is used for analysis to identify the edible oil type and adulteration ratio.
It realizes high-sensitivity doped edible oil detection, which is suitable for daily life and other scenarios, and is highly universal, avoiding dependence on professional equipment and professional personnel.
Smart Images

Figure CN119555625A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless sensing technology, and in particular to a method and system for detecting adulterated edible oil based on terahertz wireless sensing. Background Art
[0002] As an important source of human fat intake, edible oil is essential for maintaining nutritional balance and avoiding non-communicable diseases such as obesity and malnutrition. Due to the imbalance between supply and demand, some unscrupulous vendors tend to add low-priced edible oils to expensive edible oils to obtain high returns, such as adding soybean oil to virgin olive oil and peanut oil to sesame oil. This phenomenon is common worldwide. It is reported that the Spanish and Italian police confiscated more than 260,000 liters of olive oil that was not suitable for consumption. The North American Olive Oil Association (NAOOA) pointed out that adulterated olive oil increased in 2023, and sesame oil adulteration incidents in China were frequent. Adulterated edible oil not only deceives consumers, but also may endanger human health in the long term. For example, the intake of certain trans fatty acids increases the risk of coronary heart disease. Therefore, the detection of adulterated edible oil is of great practical significance and necessity for daily life.
[0003] Since the main components of edible oils are relatively similar, it is difficult to directly identify adulterated edible oils through sensory methods such as color, smell, and consistency. Therefore, the reliable technology for detecting adulterated edible oils is to detect the physical molecular properties of edible oils. The existing detection technology solutions include: 1. High Performance Liquid Chromatography (HPLC) and Gas Chromatography (GC) use the differential interactions between compounds and the stationary phase and the mobile phase to separate and identify the molecular species in edible oil samples; 2. Near Infrared (NIR) spectroscopy analyzes the characteristic absorption patterns of different molecular groups and chemical bonds in different spectral ranges to infer the type of molecules; 3. Mass spectrometry uses subtle differences in molecular mass to distinguish molecular species; 4. Nuclear Magnetic Resonance Imaging (NMR) instruments, electronic tongues, and fluorescent markers are used to distinguish the type of edible oil and assess whether there is adulteration. However, the above existing technology solutions usually require specialized equipment and the expertise of well-trained professionals to operate, which makes them impossible for daily use in daily environments.
[0004] In recent years, driven by the advantages of speed, non-invasiveness, and non-destructiveness, wireless signal sensing technologies, such as Radio Frequency Identification (RFID), WiFi, Ultra Wide Band (UWB), millimeter wave (mmWave), etc., have developed rapidly. As a result, various non-contact sensing technologies using wireless signals have emerged. For example, people have tried to use signals from ultra-wideband and millimeter waves to classify edible oils. However, due to the inherent limitations of their wavelengths, these signals may not carry a sufficient amount of identification information about different oil types, and are therefore not very suitable for the detection of adulterated edible oils. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and system for detecting adulterated edible oil based on terahertz wireless sensing to eliminate or improve one or more defects existing in the prior art.
[0006] One aspect of the present invention provides a method for detecting adulterated edible oil based on terahertz wireless sensing, the method comprising the following steps:
[0007] Acquire edible oil to be tested, use a terahertz device to transmit a terahertz signal to the edible oil to be tested, and record a reflected signal of the edible oil to be tested;
[0008] Inputting the reflection signal of the edible oil to be detected into the pre-trained adulterated edible oil detection model to obtain the type and adulteration ratio of the edible oil to be detected;
[0009] The pre-training method of the adulterated edible oil detection model comprises the following steps: using a terahertz device to emit a terahertz signal to an edible oil sample and recording the sample reflection signal; the edible oil sample comprises a pure edible oil sample and an adulterated edible oil sample; marking the sample reflection signal, including the type of edible oil and the adulteration ratio, to construct a training set; obtaining an initial detection model, the initial detection model comprising a type recognition module and a ratio quantization module, the type recognition module comprising an edible oil category feature extractor and a category detector, the ratio quantization module comprising a ratio feature selector and a ratio quantizer; inputting the sample reflection signal into the initial detection module, in the type recognition module, the edible oil category feature extractor extracts the global feature of the sample reflection signal, the category detector analyzes the global feature to obtain the edible oil type; in the ratio quantization module, the ratio feature selector extracts the ratio feature of the sample reflection signal, the ratio quantizer analyzes the ratio feature to obtain the edible oil adulteration ratio; using the training set to train the initial detection model until the preset performance requirements are met, thereby obtaining the adulterated edible oil detection model.
[0010] In some embodiments of the present invention, after using a terahertz device to transmit a terahertz signal to the edible oil to be detected and recording the reflected signal of the edible oil to be detected, the method further includes:
[0011] The edible oil reflection signal to be detected is subjected to Fourier transform processing to convert it from a time domain signal to a frequency domain signal.
[0012] In some embodiments of the present invention, the edible oil category feature extractor extracts the global feature of the sample reflection signal, and the category detector analyzes the global feature to obtain the edible oil type, including:
[0013] The edible oil category feature extractor extracts global features of the sample reflection signal based on a self-attention mechanism;
[0014] The global feature is input into the category detector, and the edible oil type is input into the fully connected layer in the category detector.
[0015] In some embodiments of the present invention, when the adulterated edible oil detection model is trained, the edible oil category feature extractor extracts the global features of the sample reflection signal, further comprising:
[0016] Inputting the reflection signal of the pure edible oil sample into the edible oil category feature extractor to extract the features of each pure edible oil sample, clustering all the features of the pure edible oil samples to obtain the cluster center of each pure edible oil feature, and using it as the anchor point of various pure edible oil features;
[0017] The reflection signal of the adulterated edible oil sample is input into the edible oil category feature extractor to extract the features of each adulterated edible oil sample. According to the pre-labeled information, the midpoint of the line connecting the feature of each adulterated edible oil sample and the feature anchor point of the pure edible oil contained therein is subjected to feature similarity to obtain the relationship between the adulterated edible oil sample and the pure edible oil contained therein.
[0018] In some embodiments of the present invention, the edible oil category feature extractor is obtained by using a dual teacher network training, so that it can simultaneously extract pure edible oil features and adulterated edible oil features:
[0019] Inputting the reflection signal of the pure edible oil sample into the initial category feature extractor to obtain the pure edible oil category feature extractor through training; inputting the reflection signal of the adulterated edible oil sample into the initial category feature extractor to obtain the adulterated edible oil category feature extractor through training;
[0020] Using the pure edible oil category feature extractor and the adulterated edible oil category feature extractor as two teacher networks;
[0021] The reflection signals of the pure edible oil samples are respectively input into the pure edible oil category feature extractor and the edible oil category feature extractor of the pure edible oil teacher network, and the edible oil category feature extractor is enabled to extract the pure edible oil features through category feature similarity; the reflection signals of the adulterated edible oil samples are respectively input into the adulterated edible oil category feature extractor and the edible oil category feature extractor of the adulterated edible oil teacher network, and the initial edible oil category feature extractor is enabled to extract the adulterated edible oil features through category feature similarity.
[0022] In some embodiments of the present invention, when the adulterated edible oil detection model is trained, the ratio feature selector extracts the ratio feature of the sample reflection signal, further comprising:
[0023] Pre-classify edible oils into expensive edible oils and low-priced edible oils based on market value;
[0024] The reflection signals of adulterated edible oil samples containing the same expensive edible oil are input into the ratio feature selector to be trained. After feature encoding, the selector is used to select the common features of the same expensive edible oil with different adulteration ratios.
[0025] In some embodiments of the present invention, the common features of the same expensive edible oil with different adulteration ratios are selected using a selector, further comprising:
[0026] The selector obtains deep features and shallow features respectively based on learning and principal component analysis to achieve the selection of proportional features.
[0027] In some embodiments of the present invention, the proportional feature selector adopts a multi-source domain adaptation method.
[0028] On the other hand, the present invention also provides a system for detecting adulterated edible oil based on terahertz wireless sensing, which, when executed, implements the steps of the method for detecting adulterated edible oil based on terahertz wireless sensing as described in any one of the above-mentioned items, and the system comprises:
[0029] A data processing module, used for transmitting a terahertz signal to the edible oil to be detected using a terahertz device, and recording a reflected signal of the edible oil to be detected;
[0030] The detection module is used to input the reflection signal of the edible oil to be detected into the pre-trained adulterated edible oil detection model to obtain the type and adulteration ratio of the edible oil to be detected.
[0031] On the other hand, the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of any of the methods mentioned above when executed by a processor.
[0032] The present invention provides a method and system for detecting adulterated edible oil based on terahertz wireless sensing, comprising: obtaining edible oil to be detected, using a terahertz device to transmit a terahertz signal to the edible oil to be detected, and recording a reflected signal; inputting the reflected signal of the edible oil to be detected into a pre-trained adulterated edible oil detection model, firstly extracting the global features of the reflected signal by an edible oil category feature extractor in a category recognition module, analyzing the global features by a category detector, and obtaining the edible oil type; then extracting the proportion features of the reflected signal by a proportion feature selector in a proportion quantization module, analyzing the proportion features by a proportion quantizer, and obtaining the edible oil adulteration ratio. The present invention realizes adulterated edible oil detection based on the trained adulterated edible oil detection model, combines the change of the absorption spectrum in the edible oil reflection signal and the relationship between the adulterated edible oil and the pure edible oil, extracts the edible oil component features and the adulteration ratio by signal processing and an algorithm, identifies the type and the adulteration ratio of the edible oil, and then realizes highly sensitive adulterated edible oil detection, which is suitable for other wide scenarios such as daily life and has high universality.
[0033] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0034] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention.
[0036] Figure 1 The figure is a schematic diagram of the principle of a method for detecting adulterated edible oil based on terahertz wireless sensing in one embodiment of the present invention.
[0037] Figure 2 The figure is a schematic diagram of the steps of a method for detecting adulterated edible oil based on terahertz wireless sensing in one embodiment of the present invention.
[0038] Figure 3 Schematic diagram of the principle of a detection model for adulterated edible oil in one embodiment of the present invention.
[0039] Figure 4 Schematic diagram of the principle of a category identification module in one embodiment of the present invention.
[0040] Figure 5Schematic diagram of the similarity relationship between the characteristics of adulterated edible oil and pure edible oil in one embodiment of the present invention.
[0041] Figure 6 This is an absorption characteristic diagram of different pure edible oils in the terahertz band in one embodiment of the present invention.
[0042] Figure 7 Schematic diagram of the principle of an edible oil category feature extractor based on contrastive learning in one embodiment of the present invention.
[0043] Figure 8 This is a schematic diagram of the principle of an edible oil category feature extractor based on a dual-teacher network in one embodiment of the present invention.
[0044] Fig. 9 Schematic diagram of the principle of a proportional feature selector in one embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0046] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0047] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0048] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection with an intermediate.
[0049] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0050] In order to solve the problems that the existing detection technology solutions for adulterated edible oils require professional equipment and professionals to perform detection, are complicated to operate and cannot be implemented in daily life, and the existing detection technology solutions based on wireless signals may not be suitable for adulterated edible oil detection due to the inherent limitation of wavelength, and the reflected signal may not carry a sufficient amount of identification information about different oil types, thereby solving the problem that the detection technology solutions based on wireless signals are not suitable for adulterated edible oil detection. The present invention provides an adulterated edible oil detection method based on terahertz wireless sensing, such as Figure 1 and Figure 2As shown, the method includes the following steps S101-S102:
[0051] Step S101: obtaining edible oil to be tested, using a terahertz device to transmit a terahertz signal to the edible oil to be tested, and recording a reflected signal of the edible oil to be tested.
[0052] Step S102: Input the reflection signal of the edible oil to be detected into the pre-trained adulterated edible oil detection model to obtain the type of the edible oil to be detected and the adulteration ratio. The pre-training method of the adulterated edible oil detection model includes the following steps: using a terahertz device to transmit a terahertz signal to an edible oil sample and recording the sample reflection signal, the edible oil sample includes a pure edible oil sample and an adulterated edible oil sample, marking the sample reflection signal, including the type of edible oil and the adulteration ratio, and constructing a training set. An initial detection model is obtained, which includes a type recognition module and a ratio quantization module, the type recognition module further includes an edible oil category feature extractor and a category detector, and the ratio quantization module further includes a ratio feature selector and a ratio quantizer; a sample reflection signal is input into the initial detection module, in the type recognition module, the edible oil category feature extractor extracts the global feature of the sample reflection signal, and the category detector analyzes the global feature to obtain the edible oil type; in the ratio quantization module, the ratio feature selector extracts the ratio feature of the sample reflection signal, and the ratio quantizer analyzes the ratio feature to obtain the edible oil adulteration ratio; the initial detection model is trained using a training set until the preset performance requirements are met, and a detection model for adulterated edible oil is obtained.
[0053] In step S101, a terahertz device is used to transmit a terahertz signal to the edible oil to be detected, so as to obtain a reflection signal of the edible oil to be detected.
[0054] In some embodiments, since the reflection signal of the edible oil to be detected is a time domain signal, in order to facilitate subsequent feature extraction and other processing of the reflection signal, the reflection signal is processed by Fast Fourier Transform (FTT) to convert it from a time domain signal to a frequency domain signal.
[0055] In step S102, the pre-processed edible oil reflection signal to be detected is input into the pre-trained adulterated edible oil detection model, such as Figure 3As shown, the adulterated edible oil detection model includes a type recognition module and a ratio quantization module. The reflection signal is first input into the category recognition module, and the global features of the reflection signal are extracted by the edible oil category feature extractor. The global features are analyzed by the category detector to obtain the type of edible oil to be detected. The reflection signal is then input into the ratio quantization module, and the ratio features of the reflection signal are extracted by the ratio feature selector. The ratio features are analyzed by the ratio quantizer to obtain the adulteration ratio of the edible oil, and finally the type of edible oil to be detected and the adulteration ratio are obtained.
[0056] In some embodiments, the pre-training method of the adulterated edible oil detection model includes the following steps S2011-S2013:
[0057] Step S2011: Use a terahertz device to transmit a terahertz signal to an edible oil sample and record the sample reflection signal. The edible oil sample includes pure edible oil samples and adulterated edible oil samples, such as pure edible oil samples such as extra virgin olive oil, sesame oil, soybean oil, and adulterated edible oil samples with different adulteration ratios. In order to train the subsequent model, the sample reflection signal is annotated, including the type of edible oil and the adulteration ratio, and a training set is constructed based on the annotated sample reflection signal.
[0058] Step S2012: Obtain an initial detection model, such as Figure 3 As shown, the initial detection model includes a type recognition module and a proportion quantization module. The type recognition module includes an edible oil category feature extractor and a category detector. The proportion quantization module includes a proportion feature selector and a proportion quantizer. It can be seen that the detection method of the present invention is also divided into two parts. One is to identify the type of edible oil, and the other is to determine the proportion of adulterated edible oil.
[0059] In some embodiments, Figure 4 The figure shows the principle diagram of the category recognition module. Based on the preset neural network, the preprocessed reflection signal is convolved to obtain a neuralized terahertz frequency domain signal, which is used as the input of the edible oil category feature extractor. The edible oil category feature extractor extracts the global features of the above terahertz frequency domain signal based on the self-attention mechanism, and inputs the extracted global features into the category detector, and the category detector recognizes the type of edible oil.
[0060] According to the experiment, although the adulterated edible oil samples are composed of different pure edible oils, the intrinsic relationship between them is not directly reflected in the terahertz spectrum. For example, in terahertz spectroscopy analysis, the absorption spectrum of olive oil adulterated with soybean oil cannot be simply regarded as the linear superposition of the absorption spectra of soybean oil and olive oil. In addition, there is no obvious relationship in their characteristic distribution. Figure 5As shown, the present invention obtains the relationship between adulterated edible oil and pure edible oil by comparing the similarity of their characteristics from the characteristics of the terahertz reflection signal, and is used to distinguish the type of pure edible oil contained in the adulterated edible oil. Figure 6 As shown, different pure edible oils have different molecular types and concentrations, resulting in significant differences in their absorption characteristics in the terahertz band. Based on the above description, there is an inclusion relationship between adulterated edible oil and the pure edible oil it contains. Therefore, the present invention uses an edible oil category feature extractor to extract global features from the reflection signal, which contains information about the absorption of terahertz signals by different molecules in the edible oil. The relationship features between adulterated edible oil and pure edible oil can be extracted, and the extracted global features are analyzed by a category detector to determine the type of edible oil in the adulterated edible oil.
[0061] Specifically, Figure 7 As shown in FIG. 1 , when training the adulterated edible oil detection model, the edible oil category feature extractor extracts the global features of the sample reflection signal based on contrastive learning, including:
[0062] The reflection signal of the pure edible oil sample is input into the edible oil category feature extractor to extract the features of each pure edible oil sample. All the features of the pure edible oil samples are clustered to obtain the cluster center of each pure edible oil feature, which is used as the anchor point of various pure edible oil features. This can not only eliminate the influence of singular features, but also well characterize the characteristic distribution characteristics of pure oil.
[0063] The reflection signal of the adulterated edible oil sample is input into the edible oil category feature extractor to extract the features of each adulterated edible oil sample. According to the pre-labeled information, the midpoint of the line connecting the features of each adulterated edible oil sample and the anchor points of the pure edible oil features it contains is similarized, so that the feature distribution extracted by the adulterated edible oil feature extractor is located in the middle of the pure oil features it contains, so that the feature is close to these pure oil features. Therefore, the relationship between adulterated edible oil and pure edible oil can be concluded based on the distance of the features.
[0064] In some embodiments, Figure 8 As shown in the figure, the edible oil category feature extractor is obtained by using the dual teacher network training, so that it can simultaneously extract the features of pure edible oil and adulterated edible oil:
[0065] The reflection signal of the pure edible oil sample is input into the initial category feature extractor to train the pure edible oil category feature extractor; the reflection signal of the adulterated edible oil sample is input into the initial category feature extractor to train the adulterated edible oil category feature extractor.
[0066] The pure edible oil category feature extractor and the adulterated edible oil category feature extractor are used as two teacher networks.
[0067] The reflection signals of pure edible oil samples are respectively input into the pure edible oil category feature extractor and the edible oil category feature extractor of the pure edible oil teacher network, and the category feature similarity is used to enable the edible oil category feature extractor to extract the pure edible oil features; the reflection signals of adulterated edible oil samples are respectively input into the adulterated edible oil category feature extractor and the edible oil category feature extractor of the adulterated edible oil teacher network, and the category feature similarity is used to enable the initial edible oil category feature extractor to extract the adulterated edible oil features.
[0068] For adulterated edible oils, certain oil components are present in high levels, such as in more expensive edible oils, which is the main indicator for evaluating oil quality. However, in real life, adulterated edible oils are complex and varied, involving a mix of different low-cost oils. This diversity has a significant impact on the THz signal characteristics. It increases the difficulty of extracting and identifying the proportion changes of expensive edible oils directly from the THz reflection signal. Therefore, the key challenge in quantifying the proportion of adulterated edible oils is the variation in the proportion characteristics of different adulterated oils.
[0069] The present invention adopts a multi-source domain adaptive method, that is, selecting common proportion features to quantify the proportion of expensive edible oil in adulterated edible oil. Experiments have found that although the terahertz signal of adulterated edible oil will be affected by inferior oil from different sources, it contains information about the proportion of high-quality oil. Therefore, by combining unsupervised methods and learning-based methods, the present invention selects common features of expensive edible oil in adulterated edible oil for quantifying the proportion of high-quality oil.
[0070] In the present invention, a ratio feature selector of expensive edible oil is designed to select common ratio features, and then a ratio quantizer is used to analyze the ratio features to obtain the adulteration ratio of edible oil.
[0071] In some embodiments, Fig. 9 As shown in the figure, when training the adulterated edible oil detection model, the ratio feature selector extracts the ratio features of the sample reflection signal, including:
[0072] Edible oils are classified in advance into expensive edible oils and low-priced edible oils according to their market values.
[0073] The reflection signals of adulterated edible oil samples containing the same expensive edible oil are input into the ratio feature selector to be trained. After feature encoding, the selector is used to select the common features of the same expensive edible oil with different adulteration ratios.
[0074] In some embodiments, the selector obtains deep features and shallow features based on learning and principal component analysis respectively to achieve the selection of proportional features.
[0075] In some embodiments, the proportional feature selector may employ a multi-source domain adaptation approach.
[0076] Step S2023: Use the training set to train the initial detection model until it meets the preset performance requirements, thereby obtaining an adulterated edible oil detection model.
[0077] In some embodiments, the initial detection model is optimized and trained by constructing functions such as contrast loss.
[0078] On the other hand, the present invention also provides a terahertz wireless sensing-based adulterated edible oil detection system, which, when executed, implements the steps of the terahertz wireless sensing-based adulterated edible oil detection method described above, and the system comprises:
[0079] The data processing module is used to use a terahertz device to transmit a terahertz signal to the edible oil to be tested and record its reflected signal.
[0080] The detection module is used to input the reflection signal of the edible oil to be detected into the pre-trained adulterated edible oil detection model to obtain the type of the edible oil to be detected and the adulteration ratio.
[0081] Corresponding to the above method, the present invention also provides an electronic device, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the electronic device implements the steps of the method described above.
[0082] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0083] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0084] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0085] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0086] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting adulterated edible oil based on terahertz wireless sensing, characterized in that: The method comprises the following steps: Acquire edible oil to be tested, use a terahertz device to transmit a terahertz signal to the edible oil to be tested, and record a reflected signal of the edible oil to be tested; Inputting the reflection signal of the edible oil to be detected into the pre-trained adulterated edible oil detection model to obtain the type and adulteration ratio of the edible oil to be detected; The pre-training method of the adulterated edible oil detection model comprises the following steps: using a terahertz device to emit a terahertz signal to an edible oil sample and recording the sample reflection signal; the edible oil sample comprises a pure edible oil sample and an adulterated edible oil sample; marking the sample reflection signal, including the type of edible oil and the adulteration ratio, to construct a training set; obtaining an initial detection model, the initial detection model comprising a type recognition module and a ratio quantization module, the type recognition module comprising an edible oil category feature extractor and a category detector, the ratio quantization module comprising a ratio feature selector and a ratio quantizer; inputting the sample reflection signal into the initial detection module, in the type recognition module, the edible oil category feature extractor extracts the global feature of the sample reflection signal, the category detector analyzes the global feature to obtain the edible oil type; in the ratio quantization module, the ratio feature selector extracts the ratio feature of the sample reflection signal, the ratio quantizer analyzes the ratio feature to obtain the edible oil adulteration ratio; using the training set to train the initial detection model until the preset performance requirements are met, thereby obtaining the adulterated edible oil detection model.
2. The method for detecting adulterated edible oil based on terahertz wireless sensing according to claim 1, characterized in that: After using a terahertz device to transmit a terahertz signal to the edible oil to be detected and recording the reflected signal of the edible oil to be detected, the method further includes: The edible oil reflection signal to be detected is subjected to Fourier transform processing to convert it from a time domain signal to a frequency domain signal.
3. The method for detecting adulterated edible oil based on terahertz wireless sensing according to claim 1, characterized in that: The edible oil category feature extractor extracts the global feature of the sample reflection signal, and the category detector analyzes the global feature to obtain the edible oil type, including: The edible oil category feature extractor extracts global features of the sample reflection signal based on a self-attention mechanism; The global feature is input into the category detector, and the edible oil type is input into the fully connected layer in the category detector.
4. The method for detecting adulterated edible oil based on terahertz wireless sensing according to claim 1, characterized in that: When the adulterated edible oil detection model is trained, the edible oil category feature extractor extracts the global features of the sample reflection signal, and further includes: Inputting the reflection signal of the pure edible oil sample into the edible oil category feature extractor to extract the features of each pure edible oil sample, clustering all the features of the pure edible oil samples to obtain the cluster center of each pure edible oil feature, and using it as the anchor point of various pure edible oil features; The reflection signal of the adulterated edible oil sample is input into the edible oil category feature extractor to extract the features of each adulterated edible oil sample. According to the pre-labeled information, the midpoint of the line connecting the feature of each adulterated edible oil sample and the feature anchor point of the pure edible oil contained therein is subjected to feature similarity to obtain the relationship between the adulterated edible oil sample and the pure edible oil contained therein.
5. The method for detecting adulterated edible oil based on terahertz wireless sensing according to claim 4 is characterized in that: It also includes using a dual teacher network to train the edible oil category feature extractor, so that it can simultaneously extract pure edible oil features and adulterated edible oil features: Inputting the reflection signal of the pure edible oil sample into the initial category feature extractor to obtain the pure edible oil category feature extractor through training; inputting the reflection signal of the adulterated edible oil sample into the initial category feature extractor to obtain the adulterated edible oil category feature extractor through training; Using the pure edible oil category feature extractor and the adulterated edible oil category feature extractor as two teacher networks; The reflection signals of the pure edible oil samples are respectively input into the pure edible oil category feature extractor and the edible oil category feature extractor of the pure edible oil teacher network, and the edible oil category feature extractor is enabled to extract the pure edible oil features through category feature similarity; the reflection signals of the adulterated edible oil samples are respectively input into the adulterated edible oil category feature extractor and the edible oil category feature extractor of the adulterated edible oil teacher network, and the initial edible oil category feature extractor is enabled to extract the adulterated edible oil features through category feature similarity.
6. The method for detecting adulterated edible oil based on terahertz wireless sensing according to claim 1, characterized in that: When the adulterated edible oil detection model is trained, the proportion feature selector extracts the proportion feature of the sample reflection signal, and further includes: Pre-classify edible oils into expensive edible oils and low-priced edible oils based on market value; The reflection signals of adulterated edible oil samples containing the same expensive edible oil are input into the ratio feature selector to be trained. After feature encoding, the selector is used to select the common features of the same expensive edible oil with different adulteration ratios.
7. The method for detecting adulterated edible oil based on terahertz wireless sensing according to claim 6, characterized in that: Use the selector to identify common features of different adulteration rates of the same expensive edible oil, including: The selector obtains deep features and shallow features respectively based on learning and principal component analysis to achieve the selection of proportional features.
8. The method for detecting adulterated edible oil based on terahertz wireless sensing according to claim 1, characterized in that: The scale feature selector adopts a multi-source domain adaptation method.
9. A terahertz wireless sensing-based adulterated edible oil detection system, characterized in that: When the system is executed, the steps of the method for detecting adulterated edible oil based on terahertz wireless sensing as described in any one of claims 1 to 8 are implemented, and the system comprises: A data processing module, used for transmitting a terahertz signal to the edible oil to be detected using a terahertz device, and recording a reflected signal of the edible oil to be detected; The detection module is used to input the reflection signal of the edible oil to be detected into the pre-trained adulterated edible oil detection model to obtain the type and adulteration ratio of the edible oil to be detected.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method and apparatus for rapid detection for vegetable oil purity using terahertz time-domain spectroscopy
CN101210873A
Accurate measurement method for for optical parameter of edible oil by terahertz time-domain spectrum
CN101419157A
Analysis method for ingredients and mixing ratio of oil product and mixed oil by using terahertz spectroscopy
CN103091265A
Test system and test method for jointly identifying oil types through terahertz waves and lasers
CN109444092A
Non-contact substance terahertz characteristic spectrum detection and identification system and method
CN113092402A