A method and system for detecting adulterated edible oil based on terahertz wireless sensing

By using terahertz wireless sensing technology and pre-trained models, the problem of detecting adulterated cooking oil in daily life has been solved, enabling rapid and convenient identification of cooking oil type and adulteration ratio, which is applicable to daily life.

CN119555625BActive Publication Date: 2026-05-05BEIJING UNIV OF POSTS & TELECOMM
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING UNIV OF POSTS & TELECOMM
Filing Date
2024-09-05
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies are insufficient for quickly and easily detecting adulterated cooking oils in everyday environments, and existing wireless signal detection technologies cannot carry enough information for effective identification.

Method used

Terahertz wireless sensing technology is used to transmit signals and record reflected signals through terahertz devices. A pre-trained model for detecting adulterated edible oils is used, combined with an edible oil category feature extractor and a proportion quantizer, to identify the type of edible oil and the adulteration ratio.

Benefits of technology

It enables rapid and convenient detection of edible oil type and adulteration ratio in daily life, with high sensitivity and universality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119555625B_ABST
    Figure CN119555625B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for detecting adulterated edible oil based on terahertz wireless sensing, comprising: acquiring the edible oil to be detected; transmitting a terahertz signal to the edible oil using a terahertz device and recording the reflected signal; inputting the reflected signal of the edible oil to be detected into a pre-trained adulterated edible oil detection model; firstly, the edible oil category feature extractor in the category identification module extracts the global features of the reflected signal, and the category detector analyzes the global features to obtain the edible oil type; then, the proportion feature selector in the proportion quantization module extracts the proportion features of the reflected signal, and the proportion quantizer analyzes the proportion features to obtain the adulteration ratio of the edible oil. This invention can achieve highly sensitive identification and proportion quantization of adulterated edible oil types and has high universality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This 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 Technology

[0002] Edible oil, as an important source of fat intake for the human body, is crucial for maintaining nutritional balance and preventing non-communicable diseases such as obesity and malnutrition. Adulterated edible oil not only deceives consumers but may also pose long-term health risks; for example, consuming certain amounts of trans fatty acids increases the risk of coronary heart disease. Therefore, the detection of adulterated edible oil is of significant practical importance and necessity in daily life.

[0003] Because the main components of edible oils are relatively similar, it is difficult to directly identify adulterated edible oils through sensory methods such as color, odor, and consistency. Therefore, reliable techniques for detecting adulterated edible oils rely on analyzing their physical molecular properties. Existing detection techniques include: 1. High-performance liquid chromatography (HPLC) and gas chromatography (GC), which utilize the differential interactions between compounds and the stationary and mobile phases to separate and identify molecular types in edible oil samples; 2. Near-infrared (NIR) spectroscopy, which analyzes the characteristic absorption patterns of different molecular groups and chemical bonds across different spectral ranges to infer the molecular type; 3. Mass spectrometry, which uses subtle differences in molecular mass to distinguish molecular types; and 4. Nuclear magnetic resonance (NMR) instruments, electronic tongues, and fluorescent labels to differentiate edible oil types and assess the presence of adulteration. However, these existing techniques typically require specialized equipment and the expertise of highly trained professionals, making them unsuitable for everyday use in ordinary environments.

[0004] In recent years, driven by advantages such as speed, non-invasiveness, and non-destructiveness, wireless signal sensing technologies, such as Radio Frequency Identification (RFID), WiFi, Ultra Wide Band (UWB), and millimeter wave (mmWave), have developed rapidly. Consequently, various non-contact sensing technologies utilizing wireless signals have emerged. For example, attempts have been made 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 sufficient information to distinguish different oil types, making them unsuitable for detecting adulterated edible oils. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method and system for detecting adulterated edible oil based on terahertz wireless sensing, so as 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 the edible oil to be tested, use a terahertz device to emit a terahertz signal to the edible oil to be tested, and record the reflected signal of the edible oil to be tested;

[0008] The reflected signal of the edible oil to be detected is input into the pre-trained edible oil adulteration detection model to obtain the type and adulteration ratio of the edible oil to be detected.

[0009] The pre-training method for the adulterated edible oil detection model includes the following steps: emitting terahertz signals to an edible oil sample using a terahertz device and recording the sample reflection signals; the edible oil samples include pure edible oil samples and adulterated edible oil samples; labeling the sample reflection signals, including the type of edible oil and the adulteration ratio, and constructing a training set; obtaining an initial detection model, the initial detection model including a type identification module and a ratio quantization module, the type identification module including an edible oil category feature extractor and a category detector, and the ratio quantization module including a ratio feature selector and a ratio quantizer; inputting the sample reflection signals into the initial detection module, in the type identification module, the edible oil category feature extractor extracts global features of the sample reflection signals, and the category detector analyzes the global features to obtain the edible oil type; in the ratio quantization module, the ratio feature selector extracts the ratio features of the sample reflection signals, and the ratio quantizer analyzes the ratio features to obtain the edible oil adulteration ratio; training the initial detection model using the training set until a preset performance requirement is met, thus obtaining the adulterated edible oil detection model.

[0010] In some embodiments of the present invention, after emitting a terahertz signal to the edible oil to be detected using a terahertz device and recording the reflected signal of the edible oil to be detected, the method further includes:

[0011] The reflected signal of the edible oil 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 global features of the sample reflection signal, and the category detector analyzes the global features 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 features are input into the category detector, and the edible oil type is input from the fully connected layer in the category detector.

[0015] In some embodiments of the present invention, during the training of the adulterated edible oil detection model, the edible oil category feature extractor extracts global features of the sample reflection signal, and further includes:

[0016] The reflected 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 each pure edible oil feature.

[0017] The reflected 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. Based on the pre-labeled information, the midpoint of the line connecting the feature of each adulterated edible oil sample to the feature anchor point of the pure edible oil it contains is used for feature similarity to obtain the relationship between the adulterated edible oil sample and the pure edible oil it contains.

[0018] In some embodiments of the present invention, the edible oil category feature extractor is further trained using a dual-teacher network, enabling it to simultaneously extract features of pure edible oil and features of adulterated edible oil.

[0019] The reflection signal of the pure edible oil sample is input into the initial category feature extractor to train and obtain 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 and obtain the adulterated edible oil category feature extractor.

[0020] The pure edible oil category feature extractor and the adulterated edible oil category feature extractor are used as two teacher networks;

[0021] The reflection signals of the pure edible oil samples are input into the pure edible oil category feature extractor and the edible oil category feature extractor of the pure edible oil teacher network, respectively. Through category feature similarity, the edible oil category feature extractor can extract the pure edible oil features. The reflection signals of the adulterated edible oil samples are input into the adulterated edible oil category feature extractor and the edible oil category feature extractor of the adulterated edible oil teacher network, respectively. Through category feature similarity, the initial edible oil category feature extractor can extract the adulterated edible oil features.

[0022] In some embodiments of the present invention, during the training of the adulterated edible oil detection model, the proportional feature selector extracts the proportional features of the sample reflection signal, and further includes:

[0023] Edible oils are pre-classified into expensive and inexpensive varieties based on market value.

[0024] The reflection signals of adulterated edible oil samples containing the same expensive edible oil are input into the proportional feature selector to be trained. After feature encoding, the selector is used to select the common features of different adulteration ratios of the same expensive edible oil.

[0025] In some embodiments of the present invention, the use of a selector to select common characteristics of different adulteration ratios of the same expensive edible oil further includes:

[0026] The selector acquires deep and shallow features based on learning and principal component analysis to select proportional features.

[0027] In some embodiments of the present invention, the proportional feature selector employs a multi-source domain adaptation method.

[0028] On the other hand, the present invention also provides a terahertz wireless sensing-based system for detecting adulterated edible oil, wherein when executed, the system implements the steps of the terahertz wireless sensing-based method for detecting adulterated edible oil as described in any of the above-submitted claims, and the system includes:

[0029] The data processing module is used to transmit terahertz signals to the edible oil to be tested using a terahertz device and record the reflected signals of the edible oil to be tested.

[0030] The detection module is used to input the reflected signal of the edible oil to be detected into a 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 / instructions stored thereon, which, when executed by a processor, implement the steps of any of the methods mentioned above.

[0032] This invention provides a method and system for detecting adulterated edible oil based on terahertz wireless sensing. The method includes: acquiring the edible oil to be detected; transmitting a terahertz signal to the edible oil using a terahertz device and recording the reflected signal; inputting the reflected signal of the edible oil to a pre-trained adulterated edible oil detection model; firstly, the edible oil category feature extractor in the category identification module extracts the global features of the reflected signal, and the category detector analyzes the global features to obtain the edible oil type; then, the proportion feature selector in the proportion quantization module extracts the proportion features of the reflected signal, and the proportion quantizer analyzes the proportion features to obtain the adulteration ratio of the edible oil. This invention achieves adulterated edible oil detection based on a trained adulterated edible oil detection model. By combining the changes in the absorption spectrum in the edible oil's reflected signal with the relationship between adulterated and pure edible oil, and extracting the edible oil component features and adulteration ratio through signal processing and algorithms, it identifies the type and adulteration ratio of edible oil, thereby achieving highly sensitive detection of adulterated edible oil. It is applicable to a wide range of scenarios, including daily life, and has high versatility.

[0033] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.

[0034] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description

[0035] The accompanying drawings, which are provided to further illustrate the invention and form part of this application, are not intended to limit the scope of the invention.

[0036] Figure 1 This is a schematic diagram illustrating 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 This 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 This is a schematic diagram illustrating the principle of a detection model for adulterated edible oil in one embodiment of the present invention.

[0039] Figure 4 This is a schematic diagram of the principle of the category recognition module in one embodiment of the present invention.

[0040] Figure 5This is a schematic diagram illustrating the similarity of characteristics between 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 This is a schematic diagram illustrating 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 illustrating the principle of an edible oil category feature extractor based on a dual-teacher network in one embodiment of the present invention.

[0044] Figure 9 This is a schematic diagram of the principle of a proportional feature selector in one embodiment of the present invention. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.

[0046] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.

[0047] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, 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" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.

[0049] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.

[0050] To address the problems of existing edible oil adulteration detection technologies requiring specialized equipment and personnel, which are complex and impractical for everyday use, and the unsuitability of existing wireless signal-based detection technologies due to inherent wavelength limitations that reflective signals may not carry sufficient information about different oil types, this invention provides a terahertz wireless sensing-based method for detecting adulterated edible oils. Figure 1 and Figure 2As shown, the method includes the following steps S101 to S102:

[0051] Step S101: Obtain the edible oil to be tested, use a terahertz device to emit a terahertz signal to the edible oil to be tested, and record the 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 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 emit a terahertz signal to the edible oil sample and recording the sample reflection signal; the edible oil sample includes pure edible oil samples and adulterated edible oil samples; labeling the sample reflection signals, 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 identification module and a proportion quantization module. The type identification module further includes an edible oil category feature extractor and a category detector, while the proportion quantization module includes a proportion feature selector and a proportion quantizer. The sample reflection signal is input into the initial detection module. In the type identification module, the edible oil category feature extractor extracts the global features of the sample reflection signal, and the category detector analyzes the global features to obtain the edible oil type. In the proportion quantization module, the proportion feature selector extracts the proportion features of the sample reflection signal, and the proportion quantizer analyzes the proportion features to obtain the adulteration ratio of the edible oil. The initial detection model is trained using a training set until it reaches the preset performance requirements, thus obtaining the adulterated edible oil detection model.

[0053] In step S101, a terahertz device is used to emit a terahertz signal to the edible oil to be detected, and the reflected signal of the edible oil to be detected is obtained.

[0054] In some embodiments, since the reflected signal of the edible oil to be detected is a time-domain signal, in order to facilitate subsequent processing such as feature extraction of the reflected signal, the reflected 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 preprocessed reflection signal of the edible oil to be detected is input into the pre-trained edible oil adulteration detection model, such as... Figure 3As shown, the adulterated edible oil detection model includes a type identification module and a proportion quantization module. The reflected signal is first input into the type identification module, and the global features of the reflected signal are extracted by the edible oil type feature extractor. The global features are analyzed by the type detector to obtain the type of edible oil to be detected. Then, the reflected signal is input into the proportion quantization module, and the proportion features of the reflected signal are extracted by the proportion feature selector. The proportion features are analyzed by the proportion quantizer to obtain the adulteration ratio of the edible oil. Finally, the type of edible oil to be detected and the adulteration ratio are obtained.

[0056] In some embodiments, the pre-training method for the edible oil adulteration detection model includes the following steps S2011 to S2013:

[0057] Step S2011: Emits terahertz signals to the edible oil samples using a terahertz device and records the reflected signals. The edible oil samples include pure edible oil samples and adulterated edible oil samples, such as pure edible oil samples like extra virgin olive oil, sesame oil, and soybean oil, as well as adulterated edible oil samples with different adulteration ratios. For subsequent model training, the sample reflected signals are labeled, including the type of edible oil and the adulteration ratio, and a training set is constructed based on the labeled sample reflected signals.

[0058] Step S2012: Obtain the initial detection model, such as Figure 3 As shown, the initial detection model includes a type identification module and a proportion quantization module. The type identification module includes an edible oil category feature extractor and a category detector, and the proportion quantization module includes a proportion feature selector and a proportion quantizer. Thus, 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, such as Figure 4 The diagram illustrates the principle of the category recognition module. A pre-defined neural network is used to convolve the preprocessed reflected signal to obtain a neuralized terahertz frequency domain signal, which is then used as input to the edible oil category feature extractor. The edible oil category feature extractor extracts global features from the terahertz frequency domain signal using a self-attention mechanism and inputs these global features into the category detector. The fully connected layer of the category detector then identifies the type of edible oil.

[0060] Experiments show that although 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 spectral analysis, the absorption spectrum of olive oil adulterated with soybean oil cannot be simply regarded as a linear superposition of the absorption spectra of soybean oil and olive oil. Furthermore, there is no obvious relationship in their characteristic distributions. Figure 5As shown, this invention, by comparing the characteristics of adulterated edible oil and pure edible oil from the features of terahertz reflection signals, derives the relationship between them, which is used to distinguish the type of pure edible oil contained in adulterated edible oil. For example... 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 explanation, there is an inclusion relationship between adulterated edible oils and the pure edible oils they contain. Therefore, this invention uses an edible oil category feature extractor to extract global features from the reflected signal. This reflected signal contains information about the absorption of terahertz signals by different molecules in the edible oil, which can extract the relationship features between adulterated and pure edible oils. Then, a category detector is used to analyze the extracted global features to determine the type of edible oil in the adulterated edible oil.

[0061] Specifically, such as Figure 7 As shown, during the training of the edible oil adulteration detection model, the edible oil category feature extractor extracts global features of the sample reflection signal based on contrastive learning, including:

[0062] The reflection signal of a pure edible oil sample is input into an 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. This cluster center is used as the anchor point of each pure edible oil feature. This can eliminate the influence of strange features and also well characterize the feature distribution characteristics of pure oil.

[0063] The reflected 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. Based on the pre-labeled information, the midpoint of the line connecting the feature of each adulterated edible oil sample to the feature anchor point of the pure edible oil it contains is used for feature similarity, 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. In this way, the feature is closer to these pure oil features, and the relationship between adulterated edible oil and pure edible oil can be obtained based on the proximity of the features.

[0064] In some embodiments, such as Figure 8 As shown, a feature extractor for edible oil categories is obtained by training a dual-teacher network, enabling it to extract features of both pure and adulterated edible oils simultaneously.

[0065] The reflection signal of a pure edible oil sample is input into the initial category feature extractor to train a pure edible oil category feature extractor; the reflection signal of an adulterated edible oil sample is input into the initial category feature extractor to train an 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 input into the pure edible oil category feature extractor and the edible oil category feature extractor of the pure edible oil teacher network, respectively. Through category feature similarity, the edible oil category feature extractor can extract the pure edible oil features. The reflection signals of adulterated edible oil samples are input into the adulterated edible oil category feature extractor and the edible oil category feature extractor of the adulterated edible oil teacher network, respectively. Through category feature similarity, the initial edible oil category feature extractor can extract the adulterated edible oil features.

[0068] For adulterated edible oils, certain oil components are present in high concentrations, such as those from more expensive oils, which are key indicators for assessing oil quality. However, in reality, adulterated edible oils are complex and varied, involving the mixing of different low-cost oils. This diversity significantly impacts the characteristics of terahertz signals. It increases the difficulty of directly extracting and identifying the proportions of expensive edible oils from terahertz reflection signals. Therefore, a key challenge in quantifying the proportions of adulterated edible oils is understanding the variations in the proportions of different adulterants.

[0069] This invention employs a multi-source domain adaptive method, specifically selecting common proportional features to quantify the proportion of expensive edible oils in adulterated edible oils. Experiments have shown that although the terahertz signal of adulterated edible oils is affected by inferior oils from different sources, it still contains information about the proportion of high-quality oils. Therefore, by combining unsupervised and learning-based methods, this invention selects common features of expensive edible oils in adulterated edible oils to quantify the proportion of high-quality oils.

[0070] In this invention, a proportion feature selector for expensive edible oils is designed to select common proportion features, and then a proportion quantifier is used to analyze the proportion features to obtain the adulteration ratio of edible oils.

[0071] In some embodiments, such as Figure 9 As shown, during the training of the adulterated edible oil detection model, the proportional feature selector extracts the proportional features of the sample reflection signal, including:

[0072] Edible oils are pre-classified into expensive and inexpensive varieties based on their market value.

[0073] The reflection signals of adulterated edible oil samples containing the same expensive edible oil are input into the proportional feature selector to be trained. After feature encoding, the selector is used to select the common features of different adulteration ratios of the same expensive edible oil.

[0074] In some embodiments, the selector acquires deep features and shallow features respectively based on learning and principal component analysis to achieve the selection of proportional features.

[0075] In some embodiments, the scaling feature selector may employ a multi-source domain adaptation method.

[0076] Step S2023: Train the initial detection model using the training set until the preset performance requirements are met, and obtain the adulterated edible oil detection model.

[0077] In some embodiments, the initial detection model is optimized and trained by constructing functions such as contrastive loss.

[0078] On the other hand, the present invention also provides a terahertz wireless sensing-based system for detecting adulterated edible oils. When executed, this system implements the steps of the terahertz wireless sensing-based method for detecting adulterated edible oils described above. The system includes:

[0079] The data processing module is used to emit terahertz signals to the edible oil to be tested using a terahertz device and record its reflected signals.

[0080] The detection module is used to input the reflected signal of the edible oil to be detected into the pre-trained adulterated edible oil detection model to obtain the type of 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 including a processor and a memory, the memory storing computer instructions, the processor executing the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the electronic device performs the steps of the method as described above.

[0082] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.

[0083] Those skilled in the art will understand 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 both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.

[0084] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are 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. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.

[0085] In this 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 or in place of features of other embodiments.

[0086] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within 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 includes the following steps: Acquire the edible oil to be tested, use a terahertz device to emit a terahertz signal to the edible oil to be tested, and record the reflected signal of the edible oil to be tested; The reflected signal of the edible oil to be detected is input into the pre-trained edible oil adulteration detection model to obtain the type and adulteration ratio of the edible oil to be detected. The pre-training method for the adulterated edible oil detection model includes the following steps: A terahertz device is used to emit terahertz signals to edible oil samples and record the reflected signals from the samples; the edible oil samples include pure edible oil samples and adulterated edible oil samples; the reflected signals of the samples are labeled, including the type of edible oil and the adulteration ratio, to construct a training set; An initial detection model is obtained, which includes a type identification module and a ratio quantization module. The type identification module includes an edible oil category feature extractor and a category detector. The ratio quantization module includes a ratio feature selector and a ratio quantizer. The pre-training of the type recognition module includes: inputting the reflection signal of a 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 each pure edible oil feature; inputting the reflection signal of an adulterated edible oil sample into the edible oil category feature extractor to extract the features of each adulterated edible oil sample; and, based on pre-labeled information, performing feature similarity analysis on the midpoint of the line connecting each adulterated edible oil sample feature to the anchor point of the pure edible oil feature it contains, to obtain the adulterated edible oil sample... The relationship between a product and the pure edible oil it contains is investigated. A dual-teacher network is used to train the edible oil category feature extractor through knowledge distillation. The first teacher network is a pure edible oil category feature extractor pre-trained using pure edible oil samples, and the second teacher network is an adulterated edible oil category feature extractor pre-trained using adulterated edible oil samples. The reflection signals of pure edible oil and adulterated edible oil samples are input into the dual-teacher network and the edible oil category feature extractor, respectively, and category feature similarity is performed to enable the edible oil category feature extractor to extract features of pure edible oil and adulterated edible oil. The pre-training of the ratio quantization module includes: classifying edible oils into expensive and low-priced edible oils according to market value; inputting the reflection signal of adulterated edible oil samples containing the same expensive edible oil into the ratio feature selector to be trained; and selecting common ratio features that are not affected by the type of low-priced edible oil and are only related to the adulteration ratio of the same expensive edible oil through a multi-source domain adaptive method. The initial detection model is trained using the training set until the preset performance requirements are met, thus 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 emitting a terahertz signal to the edible oil to be tested using a terahertz device and recording the reflected signal of the edible oil to be tested, the method further includes: The reflected signal of the edible oil 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 global features from the sample reflection signal, and the category detector analyzes these global features 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 features are input into the category detector, and the edible oil type is input from 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, The edible oil category feature extractor is trained using a dual-teacher network through knowledge distillation, including: The reflection signal of the pure edible oil sample is input into the initial category feature extractor to train and obtain 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 and obtain the adulterated edible oil category feature extractor. The pure edible oil category feature extractor and the adulterated edible oil category feature extractor are used as two teacher networks; The reflection signals of the pure edible oil samples are input into the pure edible oil category feature extractor and the edible oil category feature extractor of the pure edible oil teacher network, respectively. Through category feature similarity, the edible oil category feature extractor can extract the pure edible oil features. The reflection signals of the adulterated edible oil samples are input into the adulterated edible oil category feature extractor and the edible oil category feature extractor of the adulterated edible oil teacher network, respectively. Through category feature similarity, the initial edible oil category feature extractor can extract the adulterated edible oil features.

5. The method for detecting adulterated edible oil based on terahertz wireless sensing according to claim 1, characterized in that, The selector is used to identify common characteristics of different adulteration ratios of the same expensive edible oil, including: The selector acquires deep and shallow features based on learning and principal component analysis to select proportional features.

6. A terahertz wireless sensing-based system for detecting adulterated edible oil, characterized in that, When the system is executed, it implements the steps of the terahertz wireless sensing-based method for detecting adulterated edible oil as described in any one of claims 1 to 5, wherein the system comprises: The data processing module is used to transmit terahertz signals to the edible oil to be tested using a terahertz device and record the reflected signals of the edible oil to be tested. The detection module is used to input the reflected signal of the edible oil to be detected into a pre-trained adulterated edible oil detection model to obtain the type and adulteration ratio of the edible oil to be detected.

7. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Digital taste bud sensing method and system based on terahertz

    CN118194237A