Near infrared spectrum detection device and method for fresh glucose degree
By combining hardware and software modules, and utilizing a surrounding LED light source and a deep learning model, the problems of large errors and poor universality in fresh sugar content detection devices have been solved, achieving high-precision and highly universal sugar content detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANCHANG CAMPUS OF EAST CHINA UNIV OF TECH
- Filing Date
- 2026-01-28
- Publication Date
- 2026-05-08
AI Technical Summary
Existing fresh glucose concentration detection devices suffer from large errors, poor universality, insufficient accuracy, low level of intelligence, and weak model generalization ability, making it difficult to meet the needs of large-scale on-site testing.
It employs a combination of hardware and software modules, including a spectral acquisition module, a controller module, a storage module, and a cloud platform module. By surrounding the LED light source, signal conditioning unit, and electrical signal processing, and combining with a deep learning model, it achieves spectral data calibration and model generalization.
It improves the accuracy and universality of sugar content detection, enhances the robustness of the model and the reliability of on-site testing, and enables non-destructive testing of different types of fresh grapes.
Smart Images

Figure CN121994748A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent detection technology, and in particular to a near-infrared spectroscopy detection device and method for fresh glucose concentration. Background Technology
[0002] Fresh grapes are rich in various sugars, organic acids, vitamins, and other nutrients. With their bright color, unique flavor, and abundant nutritional value, they are highly favored by consumers. As living standards continue to improve, the demands for the quality of fresh grapes are also rising. Sugar content is one of the key indicators for measuring their quality, directly affecting their taste and flavor.
[0003] Traditional methods for detecting the glucose content of fresh glucose mainly rely on manual identification, which has the problems of high subjectivity and low discrimination rate. Currently, most methods rely on laboratory chemical methods and saccharimeters, which not only cause varying degrees of damage to the samples, but also have high costs and cannot meet the needs of large-scale on-site testing.
[0004] In current technologies, non-destructive on-site sugar content detection of fruits typically employs near-infrared spectroscopy. This involves collecting diffuse reflected light from the fruit using a spectrometer and then combining this with a deep learning model to predict sugar content. However, existing detection devices using near-infrared spectroscopy suffer from significant errors, poor universality, low accuracy, a lack of specific settings for thin-skinned and thick-skinned fruits, and insufficient intelligence. Furthermore, existing deep learning models based on near-infrared spectroscopy exhibit systematic differences in the spectra of fresh grapes from different varieties, origins, and growing environments, resulting in weak model generalization ability and large detection errors. The limited amount of spectral data further restricts the improvement of model performance. Summary of the Invention
[0005] To address the shortcomings of existing technologies, the present invention aims to provide a near-infrared spectral detection device for fresh grape sugar content. This invention, through hardware and software modules, enables the calibration of fresh grape sample spectra using reference values, targeted light source settings, and interconnection with a cloud platform to facilitate the updating and iteration of a general sugar content detection model. This invention aims to solve the technical problems of existing fruit sugar content detection devices, such as large detection errors, poor universality, insufficient accuracy, low level of intelligence, weak model generalization ability, and limited spectral data volume.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solution: A near-infrared spectral detection device for fresh glucose concentration includes a spectral acquisition module, a controller module, a storage module, and a cloud platform module. The spectral acquisition module is connected to the controller module, and the controller module is connected to the storage module and the cloud platform module. The spectral acquisition module includes an LED array, a signal conditioning unit, a miniature spectrometer, and an electrical signal processing unit. The LED array emits light with a wavelength of 650nm~1050nm to illuminate a white board and fresh grapes. The miniature spectrometer receives the reflected light from the white board and the fresh grapes and converts it into a first reference electrical signal and a first detection electrical signal. The signal conditioning unit is connected to the miniature spectrometer to adjust the temperature drift of the miniature spectrometer and converts the first reference electrical signal and the first detection electrical signal into a second reference electrical signal and a second detection electrical signal. The electrical signal processing unit is connected to the signal conditioning unit to convert the second reference electrical signal into a reference digital signal and the second detection electrical signal into a detection digital signal, and outputs sample spectral data based on the reference digital signal and the detection digital signal. The controller module includes an MCU, which is connected to the electrical signal processing unit, the storage module, and the cloud platform module. The storage module is used to store several sample spectral data and the current general model for sugar content detection; The cloud platform module is used to acquire spectral data of several varieties, generate a generalized spectral dataset based on the spectral data of several varieties, and generate a general training set based on the spectral data of several varieties and the generalized spectral dataset, so as to construct the latest general model for sugar content detection based on the general training set.
[0007] Furthermore, the spectral acquisition module also includes a sample tray for supporting the fresh grapes, and the LED array includes several square LED light sources arranged around the sample tray, which emit light through PWM dimming.
[0008] Furthermore, the signal conditioning unit includes a voltage follower, a conditioning power supply, a conditioning capacitor, and a conditioning resistor. The voltage follower is connected to the conditioning power supply and the conditioning capacitor, and the conditioning resistor is connected between the voltage follower and the electrical signal processing unit.
[0009] Furthermore, the step of outputting sample spectral data based on the reference digital signal and the detection digital signal includes: The total internal reflection intensity is obtained based on the analysis of the reference digital signal, and the sample intensity is obtained based on the analysis of the detection digital signal. Obtain the intensity of dark current light; The sample absorbance is obtained based on the sample light intensity, the total internal reflection light intensity, and the dark current light intensity, and the sample spectral data is obtained based on the sample absorbance analysis.
[0010] Furthermore, the MCU is also connected to a communication module, which includes a serial communication unit and a Bluetooth communication unit. The serial communication unit is used to connect the MCU and the host computer, and the Bluetooth communication unit is used for wireless transmission. The communication module is connected to the cloud platform module.
[0011] Furthermore, the step of generating a generalized spectral dataset based on the spectral data of several varieties includes: Set a generalization translation distance, and translate the spectral data of the variety along the wavelength axis according to the generalization translation distance to obtain translated spectral data; Set the generalized signal-to-noise ratio and obtain the generalized Gaussian noise. Add the generalized Gaussian noise to the variety spectral data to obtain noise spectral data. A generalized spectral dataset is formed by combining several of the translated spectral data and several of the noise spectral data.
[0012] Furthermore, the step of generating a general training set based on several spectral data of the aforementioned varieties and the generalized spectral dataset, and constructing a new general model for sugar content detection based on the general training set, includes: A master spectral matrix is obtained based on the spectral data of several varieties, and a slave spectral matrix is obtained based on the generalized spectral dataset; Based on the inverse matrix of the secondary spectral matrix and the primary spectral matrix, a global linear transformation is performed to obtain a global correction matrix; An initial training set is formed by combining several spectral data of the aforementioned varieties and the generalized spectral dataset. The initial training set is then multiplied by the global correction matrix to generate a general training set. Based on the aforementioned general training set, a new general model for sugar content detection was trained using the PLSR algorithm and the 1D-CNN algorithm.
[0013] Furthermore, the controller module is connected to the power supply module, which is used to supply power.
[0014] Furthermore, the MCU is connected to a display module, which includes a serial port screen and a touch screen unit. The serial port screen is used to display data and sample spectra, and the touch screen unit is used to send touch screen operation commands to the MCU.
[0015] A method for detecting the concentration of fresh glucose using near-infrared spectroscopy, employing the near-infrared spectroscopy detection device for fresh glucose concentration as described in the above technical solution, the method comprising the following steps: The white board is illuminated by light with a wavelength of 650nm~1050nm emitted by the LED array. The micro spectrometer receives the reflected light from the white board and converts it into a first reference electrical signal. The first reference electrical signal is converted into a second reference electrical signal by the signal conditioning unit and transmitted to the electrical signal processing unit to obtain a reference digital signal. The LED array emits light with a wavelength of 650nm~1050nm to irradiate fresh grapes. The micro spectrometer receives the reflected light from the fresh grapes and converts it into a first detection electrical signal. The first detection electrical signal is converted into a second detection electrical signal by the signal conditioning unit and transmitted to the electrical signal processing unit to obtain a detection digital signal. Based on the reference digital signal and the detection digital signal, the sample spectral data is output. The MCU in the controller module receives the sample spectral data and transmits the sample spectral data to the storage module and the cloud platform module. Determine whether the storage module stores the current sugar content detection general model. If the storage module stores the current sugar content detection general model, then input the sample spectral data into the current sugar content detection general model to output the sugar content detection result of the fresh grapes. If the storage module does not store the current general model for sugar content detection, then the cloud platform module acquires spectral data of several varieties, generates a generalized spectral dataset based on the spectral data of several varieties, generates a generalized training set based on the spectral data of several varieties and the generalized spectral dataset, constructs the latest general model for sugar content detection based on the generalized training set, determines the latest general model for sugar content detection as the current general model for sugar content detection, and transmits it to the storage module. The sample spectral data is then input into the current general model for sugar content detection to output the sugar content detection result of the fresh grapes.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: By setting the surrounding square LED light source, when the skin of thin-skinned fruits varies and has significant undulations due to the fruit's shape, the invention avoids the situation where the light source's illumination effect on thin-skinned fresh grapes is poor, leading to errors in the collected data; by collecting the reflectance spectrum of the white board and combining it with the analysis of the reference digital signal, more accurate sample spectral data can be obtained, directly improving the accuracy of the prediction model input value and significantly enhancing the accuracy of sugar content detection; by adjusting the temperature drift of the spectrometer through the signal conditioning unit, the detection accuracy of the device is further improved; and by using the communication module... The system employs multiple methods to connect the host computer and the cloud platform module, enabling cloud storage and user cloud-based operation. When the storage module does not store the current general sugar content detection model, or when the current general sugar content detection model needs updating and iteration, the training data from different varieties of fresh grapes are amplified, generalized, and globally unified in the cloud platform module. This helps eliminate system spectral differences caused by different varieties, origins, and environments, significantly improving the universality and robustness of the current general sugar content detection model, thereby further enhancing the reliability and accuracy of on-site non-destructive testing of different types of fresh grape samples. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the near-infrared spectroscopy detection device for fresh glucose concentration in the first embodiment of the present invention; Figure 2 This is a schematic diagram of the signal conditioning unit in the near-infrared spectroscopy detection device for fresh glucose concentration in the first embodiment of the present invention; Figure 3 This is a flowchart of the near-infrared spectroscopy detection method for fresh glucose concentration in the second embodiment of the present invention; Explanation of key component symbols: 100, Voltage Follower; 101, First Port; 102, Second Port; 110, Conditioning Power Supply; 120, Conditioning Capacitor; 130, Conditioning Resistor.
[0018] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation
[0019] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
[0020] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0022] Please see Figure 1 and Figure 2 The near-infrared spectral detection device for fresh grape concentration in the first embodiment of the present invention includes a spectral acquisition module, a controller module, a storage module, and a cloud platform module. The spectral acquisition module is connected to the controller module, and the controller module is connected to the storage module and the cloud platform module. The spectral acquisition module includes an LED array, a signal conditioning unit, a miniature spectrometer, and an electrical signal processing unit. The LED array emits light with a wavelength of 650nm~1050nm to illuminate a white board and fresh grapes. The miniature spectrometer receives the reflected light from the white board and fresh grapes and converts it into a first reference electrical signal and a first detection electrical signal. The signal conditioning unit is connected to the miniature spectrometer to adjust the temperature drift of the miniature spectrometer and converts the first reference electrical signal and the first detection electrical signal into a second reference electrical signal and a second detection electrical signal. The electrical signal processing unit is connected to the signal conditioning unit to convert the second reference electrical signal into a reference digital signal and the second detection electrical signal into a detection digital signal, and outputs sample spectral data based on the reference digital signal and the detection digital signal.
[0023] Preferably, the miniature spectrometer is model C11708MA, the electrical signal processing unit includes an AD converter, the AD converter is a SAR type high-speed precision AD conversion chip, and the AD loop chip is model ADS8326, which is used to convert analog signals into 16-bit digital signals, and the near-infrared light with a wavelength of 650nm~1050nm covers the characteristic absorption band of the fresh grapes.
[0024] The step of outputting sample spectral data based on the reference digital signal and the detection digital signal includes: The total internal reflection intensity is obtained based on the analysis of the reference digital signal, and the sample intensity is obtained based on the analysis of the detection digital signal. Obtain the intensity of dark current light; The sample absorbance is obtained based on the sample light intensity, the total internal reflection light intensity, and the dark current light intensity, and the sample spectral data is obtained based on the sample absorbance analysis.
[0025] Preferably, the sample absorbance can be calculated by dividing the sample light intensity by the difference between the total internal reflection light intensity and the dark current light intensity.
[0026] Furthermore, the electrical signal processing unit also includes a level conversion circuit to achieve reliable signal transmission and correct identification between devices with different voltages, and to ensure electrical compatibility between the units.
[0027] Understandably, after the temperature drift is improved by the electrical signal processing unit, the first reference electrical signal and the first detection electrical signal are converted into a second reference electrical signal and a second detection electrical signal, which helps to improve the accuracy of the detection data. By collecting the reflectance spectrum of the white board and combining it with the analysis of the reference digital signal, more accurate sample spectral data can be obtained, which directly improves the accuracy of the subsequent data used to predict sugar content and helps to significantly improve the accuracy of sugar content detection.
[0028] The signal conditioning unit includes a voltage follower 100, a conditioning power supply 110, a conditioning capacitor 120, and a conditioning resistor 130. The voltage follower 100 is connected to the conditioning power supply 110 and the conditioning capacitor 120, and the conditioning resistor 130 is connected between the voltage follower 100 and the electrical signal processing unit.
[0029] Preferably, the conditioning power supply 110 has a supply voltage of 5V, the conditioning capacitor 120 has a capacitance of 0.1μF, the conditioning resistor 130 has a resistance of 10Ω, and the voltage follower 100 is an operational amplifier. Understandably, adjusting the temperature drift of the spectrometer through the signal conditioning unit further improves the detection accuracy of the device.
[0030] The spectral acquisition module also includes a sample tray for supporting the fresh grapes, and the LED array includes several square LED light sources arranged around the sample tray, which emit light through PWM dimming.
[0031] Preferably, the sample tray is driven by a constant current driver chip TX6410B via PWM to provide the near-infrared light required for detection while ensuring the stability of the light source. The sample tray is shaped to fit the fresh grapes. Existing fruit sugar content analyzers typically include a fruit cup for holding the fruit. In this embodiment, the spectral acquisition module includes a cup body with the sample tray inside. A light-shielding ring is provided at the mouth of the cup body to reduce the influence of the external environment. The sample tray is further adapted to the shape of the fresh grapes based on the fruit cup. By using a surrounding light source, the large error in diffuse reflection data acquisition caused by poor illumination of the thin-skinned fresh grapes due to the significant undulations and variations in the skin of the fruit is avoided. This is beneficial to improving the stability and accuracy of the detection quality of the fresh grape sugar content.
[0032] The controller module includes an MCU, which is connected to the electrical signal processing unit, the storage module, and the cloud platform module. The MCU is also connected to a communication module, which includes a serial communication unit and a Bluetooth communication unit. The serial communication unit is used to connect the MCU and the host computer, and the Bluetooth communication unit is used for wireless transmission. The communication module is connected to the cloud platform module.
[0033] Preferably, the MCU is a low-power MCU to drive and control each module and communicate with the host computer. Specifically, the wired communication between the MCU and the host computer uses a serial port chip, model CH340, and the Bluetooth communication unit uses an HC-06 data transmission module to achieve wireless transmission.
[0034] The MCU is connected to the display module, which includes a serial port screen and a touch screen unit. The serial port screen is used to display data and sample spectra, and the touch screen unit is used to send touch screen operation commands to the MCU.
[0035] Preferably, the serial port screen is combined with the touch screen unit, which can be used to display data results and send instructions to the MCU through the USART serial port according to the touch screen operation. After executing the relevant actions of the instructions, the MCU returns data and results and displays them, providing a good human-computer interaction function and making the detection device more convenient and intelligent.
[0036] The storage module is used to store the spectral data of several samples and the current general model for sugar content detection. Preferably, the storage module includes a memory card, specifically a MicroSD card, which communicates with the MCU via an SDIO interface and can store large amounts of data at high speed.
[0037] The cloud platform module is used to acquire spectral data of several varieties, generate a generalized spectral dataset based on the spectral data of several varieties, and generate a general training set based on the spectral data of several varieties and the generalized spectral dataset, so as to construct the latest general model for sugar content detection based on the general training set.
[0038] Preferably, the cloud platform module includes a data layer, a user layer, an application layer, and a service layer; the data layer is used to store several sample spectral data, user data, device data, and the current general sugar content detection model; the user layer is used for users to access and query the sample spectral data, device data, and user data; the application layer is used to connect to the communication module; the service layer is used to determine whether the latest general sugar content detection model needs to be trained based on the data from the storage module or the data layer. If the latest general sugar content detection model needs to be trained, several spectral data of different varieties of fresh grapes are obtained, a generalized spectral dataset is generated based on the several spectral data of the varieties, and a general training set is generated based on the several spectral data of the varieties and the generalized spectral dataset, so as to train the latest general sugar content detection model according to the general training set.
[0039] Furthermore, the data layer is mainly used to store data and information. Specifically, it uses MySQL to build a cloud database, and the data stored therein is stored in CSV format to support fast querying and analysis. The service layer assists the application layer in processing interactive information through algorithms and code. Specifically, it receives data through the HTTP protocol to perform spectral characteristic and response relationship analysis. The application layer connects to the communication module through pySerial / pybluez to realize the data and command sending and receiving process, data visualization, cloud interaction, and other functions. The user layer allows users to access the system from multiple terminals to query detection data and device status in real time. If the storage module does not have an existing usable detection model, that is, if the current general sugar content detection model is not stored, a new sugar content detection model needs to be trained. If the model version backed up in the storage module or the data layer is too old, or if the grape varieties covered during training need to be increased, the detection model needs to be updated and iterated, that is, a new sugar content detection model needs to be trained. Therefore, the latest general sugar content detection model is trained through the cloud platform module.
[0040] The step of generating a generalized spectral dataset based on the spectral data of several varieties includes: Set a generalization translation distance, and translate the spectral data of the variety along the wavelength axis according to the generalization translation distance to obtain translated spectral data; Set the generalized signal-to-noise ratio and obtain the generalized Gaussian noise. Add the generalized Gaussian noise to the variety spectral data to obtain noise spectral data. A generalized spectral dataset is formed by combining several of the translated spectral data and several of the noise spectral data.
[0041] The step of generating a general training set based on the spectral data of several varieties and the generalized spectral dataset, and constructing a new general model for sugar content detection based on the general training set, includes: A master spectral matrix is obtained based on the spectral data of several varieties, and a slave spectral matrix is obtained based on the generalized spectral dataset; Based on the inverse matrix of the secondary spectral matrix and the primary spectral matrix, a global linear transformation is performed to obtain a global correction matrix; An initial training set is formed by combining several spectral data of the aforementioned varieties and the generalized spectral dataset. The initial training set is then multiplied by the global correction matrix to generate a general training set. Based on the aforementioned general training set, a new general model for sugar content detection was trained using the PLSR algorithm and the 1D-CNN algorithm.
[0042] Preferably, the generalization shift distance is a multiple of the wavelength, the generalization signal-to-noise ratio is 20, and the signal-to-noise ratio of the generalized Gaussian noise is equal to the generalization signal-to-noise ratio. In addition to the training set, a validation set can also be established. The training dataset and validation dataset are divided from the spectral data of several varieties, with a data volume ratio of 7:3 between the training dataset and the validation dataset. After training the model, the performance of the latest general sugar content detection model is evaluated using the validation dataset and corresponding labels. It is understandable that existing sugar content detection models based on near-infrared spectroscopy, when faced with fresh grapes of different varieties, origins, and growing environments, suffer from limitations due to their spectral characteristics. The existence of systematic differences leads to weak generalization ability and large detection errors in the detection model. The results of non-destructive sugar content testing in the field are easily affected by factors such as grape variety and origin, resulting in insufficient accuracy. However, by amplifying and generalizing the training data, and correcting and unifying the training data with global linear transformation, the latest general sugar content detection model has better robustness. It helps to eliminate systematic spectral differences caused by different varieties, origins and environments, greatly improves the universality of the current general sugar content detection model, and significantly improves the reliability and accuracy of non-destructive testing of different types of fresh grape samples in the field.
[0043] The controller module is connected to the power supply module, which provides power. Preferably, the power supply module includes a lithium battery, a charging interface, and a chip. The lithium battery powers the detection device, the charging interface is a USB charging interface that allows power to be drawn from the outside and supplied to the detection device, and the chip manages the charging process of the lithium battery and simultaneously distributes external power to the power consumption module of the detection device to ensure that the detection device can operate continuously during the lithium battery charging process.
[0044] Please see Figure 3 The second embodiment of the present invention provides a method for detecting the concentration of fresh glucose using near-infrared spectroscopy, employing the near-infrared spectroscopy detection device for fresh glucose concentration as described in the first embodiment. The method includes the following steps: Step S10: The white board is illuminated by light with a wavelength of 650nm~1050nm emitted by the LED array. The micro spectrometer receives the reflected light from the white board and converts it into a first reference electrical signal. The first reference electrical signal is converted into a second reference electrical signal by the signal conditioning unit and transmitted to the electrical signal processing unit to obtain a reference digital signal. Step S20: The fresh grapes are irradiated with light of wavelength 650nm~1050nm emitted by the LED array. The micro spectrometer receives the reflected light from the fresh grapes and converts it into a first detection electrical signal. The first detection electrical signal is converted into a second detection electrical signal by the signal conditioning unit and transmitted to the electrical signal processing unit to obtain a detection digital signal. Based on the reference digital signal and the detection digital signal, the sample spectral data is output. Step S30: Receive the sample spectral data through the MCU in the controller module, and transmit the sample spectral data to the storage module and the cloud platform module; Step S40: Determine whether the storage module stores the current sugar content detection general model. If the storage module stores the current sugar content detection general model, input the sample spectral data into the current sugar content detection general model to output the sugar content detection result of the fresh grapes. Step S50: If the storage module does not store the current sugar content detection general model, then the cloud platform module acquires spectral data of several varieties, generates a generalized spectral dataset based on the spectral data of several varieties, generates a generalized training set based on the spectral data of several varieties and the generalized spectral dataset, constructs the latest sugar content detection general model based on the generalized training set, determines the latest sugar content detection general model as the current sugar content detection general model, and transmits it to the storage module, inputs the sample spectral data into the current sugar content detection general model, and outputs the sugar content detection result of the fresh grapes.
[0045] Preferably, the spectral acquisition module is controlled to light up by the MCU. After receiving the light signal, the micro spectrometer converts it into an analog electrical signal output. After being conditioned by the signal conditioning unit, the signal enters the electrical signal processing unit, which converts the analog signal into a digital signal. After processing the sample spectral data, it is transmitted to the MCU. The storage module and the cloud platform module can receive the sample spectral data for storage and backup.
[0046] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0047] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A near-infrared spectroscopy detection device for fresh glucose concentration, characterized in that, It includes a spectrum acquisition module, a controller module, a storage module, and a cloud platform module. The spectrum acquisition module is connected to the controller module, and the controller module is connected to the storage module and the cloud platform module. The spectral acquisition module includes an LED array, a signal conditioning unit, a miniature spectrometer, and an electrical signal processing unit. The LED array emits light with a wavelength of 650nm~1050nm to illuminate a white board and fresh grapes. The miniature spectrometer receives the reflected light from the white board and the fresh grapes and converts it into a first reference electrical signal and a first detection electrical signal. The signal conditioning unit is connected to the miniature spectrometer to adjust the temperature drift of the miniature spectrometer and converts the first reference electrical signal and the first detection electrical signal into a second reference electrical signal and a second detection electrical signal. The electrical signal processing unit is connected to the signal conditioning unit to convert the second reference electrical signal into a reference digital signal and the second detection electrical signal into a detection digital signal, and outputs sample spectral data based on the reference digital signal and the detection digital signal. The controller module includes an MCU, which is connected to the electrical signal processing unit, the storage module, and the cloud platform module. The storage module is used to store several sample spectral data and the current general model for sugar content detection; The cloud platform module is used to acquire spectral data of several varieties, generate a generalized spectral dataset based on the spectral data of several varieties, and generate a general training set based on the spectral data of several varieties and the generalized spectral dataset, so as to construct the latest general model for sugar content detection based on the general training set.
2. The near-infrared spectroscopy detection device for fresh glucose concentration according to claim 1, characterized in that, The spectral acquisition module also includes a sample tray for supporting the fresh grapes, and the LED array includes several square LED light sources arranged around the sample tray, which emit light through PWM dimming.
3. The near-infrared spectroscopy detection device for fresh glucose concentration according to claim 1, characterized in that, The signal conditioning unit includes a voltage follower, a conditioning power supply, a conditioning capacitor, and a conditioning resistor. The voltage follower is connected to the conditioning power supply and the conditioning capacitor, and the conditioning resistor is connected between the voltage follower and the electrical signal processing unit.
4. The near-infrared spectroscopy detection device for fresh glucose concentration according to claim 1, characterized in that, The step of outputting sample spectral data based on the reference digital signal and the detection digital signal includes: The total internal reflection intensity is obtained based on the analysis of the reference digital signal, and the sample intensity is obtained based on the analysis of the detection digital signal. Obtain the intensity of dark current light; The sample absorbance is obtained based on the sample light intensity, the total internal reflection light intensity, and the dark current light intensity, and the sample spectral data is obtained based on the sample absorbance analysis.
5. The near-infrared spectroscopy detection device for fresh glucose concentration according to claim 1, characterized in that, The MCU is also connected to a communication module, which includes a serial communication unit and a Bluetooth communication unit. The serial communication unit is used to connect the MCU and the host computer, and the Bluetooth communication unit is used for wireless transmission. The communication module is connected to the cloud platform module.
6. The near-infrared spectroscopy detection device for fresh glucose concentration according to claim 1, characterized in that, The step of generating a generalized spectral dataset based on the spectral data of several varieties includes: Set a generalization translation distance, and translate the spectral data of the variety along the wavelength axis according to the generalization translation distance to obtain translated spectral data; Set the generalized signal-to-noise ratio and obtain the generalized Gaussian noise. Add the generalized Gaussian noise to the variety spectral data to obtain noise spectral data. A generalized spectral dataset is formed by combining several of the translated spectral data and several of the noise spectral data.
7. The near-infrared spectroscopy detection device for fresh glucose concentration according to claim 1, characterized in that, The step of generating a general training set based on the spectral data of several varieties and the generalized spectral dataset, and constructing a new general model for sugar content detection based on the general training set, includes: A master spectral matrix is obtained based on the spectral data of several varieties, and a slave spectral matrix is obtained based on the generalized spectral dataset; Based on the inverse matrix of the secondary spectral matrix and the primary spectral matrix, a global linear transformation is performed to obtain a global correction matrix; An initial training set is formed by combining several spectral data of the aforementioned varieties and the generalized spectral dataset. The initial training set is then multiplied by the global correction matrix to generate a general training set. Based on the aforementioned general training set, a new general model for sugar content detection was trained using the PLSR algorithm and the 1D-CNN algorithm.
8. The near-infrared spectroscopy detection device for fresh glucose concentration according to claim 1, characterized in that, The controller module is connected to the power supply module, which is used to supply power.
9. The near-infrared spectroscopy detection device for fresh glucose concentration according to claim 1, wherein the MCU is connected to a display module, the display module includes a serial port screen and a touch screen unit, the serial port screen is used to display data and sample spectra, and the touch screen unit is used to send touch screen operation commands to the MCU.
10. A method for detecting the concentration of fresh glucose using near-infrared spectroscopy, employing the near-infrared spectroscopy detection device for fresh glucose concentration as described in any one of claims 1 to 9, characterized in that, The method includes the following steps: The white board is illuminated by light with a wavelength of 650nm~1050nm emitted by the LED array. The micro spectrometer receives the reflected light from the white board and converts it into a first reference electrical signal. The first reference electrical signal is converted into a second reference electrical signal by the signal conditioning unit and transmitted to the electrical signal processing unit to obtain a reference digital signal. The LED array emits light with a wavelength of 650nm~1050nm to irradiate fresh grapes. The micro spectrometer receives the reflected light from the fresh grapes and converts it into a first detection electrical signal. The first detection electrical signal is converted into a second detection electrical signal by the signal conditioning unit and transmitted to the electrical signal processing unit to obtain a detection digital signal. Based on the reference digital signal and the detection digital signal, the sample spectral data is output. The MCU in the controller module receives the sample spectral data and transmits the sample spectral data to the storage module and the cloud platform module. Determine whether the storage module stores the current sugar content detection general model. If the storage module stores the current sugar content detection general model, then input the sample spectral data into the current sugar content detection general model to output the sugar content detection result of the fresh grapes. If the storage module does not store the current general model for sugar content detection, then the cloud platform module acquires spectral data of several varieties, generates a generalized spectral dataset based on the spectral data of several varieties, generates a generalized training set based on the spectral data of several varieties and the generalized spectral dataset, constructs the latest general model for sugar content detection based on the generalized training set, determines the latest general model for sugar content detection as the current general model for sugar content detection, and transmits it to the storage module. The sample spectral data is then input into the current general model for sugar content detection to output the sugar content detection result of the fresh grapes.