A near infrared spectrometer and near infrared online detection method
By designing a near-infrared spectrometer, combining spectral data processing and machine learning models, the problems of low detection efficiency and limited functions of FT-NIR spectrometer are solved, and online fast and high-precision multi-component detection is achieved.
Patent Information
- Application Number
- CN202111325017.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-10
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2041-11-10
AI Technical Summary
The existing FT-NIR spectrometers have low detection efficiency, cannot meet the online rapid detection requirements, and cannot realize multi-component synchronous analysis.
A near-infrared spectrometer is designed, including a light source module, a spectral collection module and a spectral analysis module. Through the smoothing processing of spectral data, the combination of information entropy decision tree and multi-classification support vector machine model, the fast and high accuracy of the samples to be tested is achieved. Test.
It realizes fast and accurate detection of samples to be tested, reduces detection costs, improves detection efficiency, and supports multi-component simultaneous detection.
Smart Images

Figure CN114112985B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of optics, and in particular to a near-infrared spectrometer and a near-infrared online detection method. Background Art
[0002] Near-infrared spectroscopy technology has been widely used in rapid material analysis due to its advantages such as rapidity, non-destructiveness and greenness.
[0003] Currently, near-infrared spectrometers used for production testing on the market generally use FT-NIR technology. This technology adjusts the beam interference by adjusting the relative delay of the light beams and collects the near-infrared spectral data of the desired material through Fourier transform. Because FT-NIR technology requires mechanical movement during measurement, completing a spectral scan typically takes more than a minute, resulting in low detection efficiency and inability to meet online requirements. Compared to FT-NIR technology, which can simultaneously detect multiple components, currently available spectrometers capable of rapid online testing can only detect a single characteristic peak at a time, making it impossible to perform simultaneous analysis of multiple components.
[0004] The aforementioned FT-NIR spectrometers have low detection efficiency and are limited in their functionality for detecting single characteristic peaks. Currently, no online near-infrared spectrometers with fast detection speed, high accuracy, good signal-to-noise ratio, and the ability to simultaneously detect multiple components have been reported. Summary of the Invention
[0005] The embodiment of the present invention provides a near-infrared spectrometer and a near-infrared online detection method to achieve online rapid detection of a sample to be tested and use the detection equipment quickly and accurately without destroying the original structure and composition of the sample to be tested.
[0006] In a first aspect, an embodiment of the present invention provides a near-infrared spectrometer, comprising a light source module, a spectrum collection module, and a spectrum analysis module;
[0007] The light source module is used to emit near-infrared light, and the near-infrared light is irradiated to the sample to be tested on the assembly line;
[0008] The spectrum collection module includes a light beam transmission unit and an infrared detection unit, wherein the light beam transmission unit is used to transmit the near-infrared light reflected by the sample to be tested to the infrared detection unit;
[0009] The spectrum analysis module is connected to the infrared detection unit, and is used to analyze and process the near-infrared spectrum obtained by the infrared detection unit to complete the detection of the type or component of the sample to be tested.
[0010] Optionally, the analysis and processing of the near-infrared spectrum by the spectrum analysis module includes:
[0011] Smoothing the spectral data of the near-infrared spectrum, extracting the amplitude of each wavelength, the difference between adjacent wavelengths, and the first-order derivative of the spectrum, to form multiple attributes of the spectral data;
[0012] A decision tree with information entropy as the criterion and a model established by a multi-classification support vector machine are comprehensively adopted for analysis, and the results obtained from each of the attributes are weighted and summarized to complete the detection of the category or component of the sample to be tested.
[0013] Optionally, the light beam transmission unit includes a lens, a slit and a beam splitter grating, and the infrared detection unit includes a linear array infrared detector;
[0014] The light diffusely reflected by the sample to be tested is converged to the slit after passing through the lens, and the light transmitted through the slit is received by the linear array infrared detector after being split by the spectroscopic grating.
[0015] Optionally, the spectroscopic grating includes a concave grating.
[0016] Optionally, the linear array infrared detector includes an InGaAs detector.
[0017] Optionally, the InGaAs detector has a built-in semiconductor refrigeration unit, and the semiconductor refrigeration unit is used to generate a stable temperature difference between the working area and the shell of the InGaAs detector;
[0018] The near-infrared spectrometer further includes a heat dissipation module, which is used to maintain the housing of the InGaAs detector at room temperature, ensure a stable low temperature in the working area of the InGaAs detector, and maintain high-precision detection of the InGaAs detector.
[0019] Optionally, the light source module includes a light source array formed by a plurality of tungsten halogen lamps.
[0020] Optionally, the near-infrared spectrometer further includes a shell, and the light source module, the spectrum collection module and the heat dissipation module are located in the shell.
[0021] In a second aspect, an embodiment of the present invention further provides a near-infrared online detection method, which is performed using the above-mentioned near-infrared spectrometer, and the near-infrared online detection method includes:
[0022] The light source module emits near-infrared light, which irradiates the sample to be tested on the assembly line;
[0023] The light beam transmission unit transmits the near-infrared light reflected by the sample to be tested to the infrared detection unit;
[0024] The spectrum analysis module analyzes and processes the near-infrared spectrum obtained by the infrared detection unit to complete the detection of the type or component of the sample to be tested.
[0025] Optionally, the spectrum analysis module analyzes and processes the near-infrared spectrum obtained by the infrared detection unit to complete the detection of the type or component of the sample to be tested, including:
[0026] Smoothing the spectral data of the near-infrared spectrum, extracting the amplitude of each wavelength, the difference between adjacent wavelengths, and the first-order derivative of the spectrum, to form multiple attributes of the spectral data;
[0027] A decision tree with information entropy as the criterion and a model established by a multi-classification support vector machine are comprehensively adopted for analysis, and the results obtained from each of the attributes are weighted and summarized to complete the detection of the category or component of the sample to be tested.
[0028] The near-infrared spectrometer provided by an embodiment of the present invention includes a light source module, a spectrum collection module and a spectrum analysis module. The light source module emits near-infrared light that can irradiate the sample to be tested on the assembly line. The spectrum collection module collects the spectral information on the sample to be tested and then transmits it to the spectrum analysis module. The spectrum analysis module performs corresponding analysis and processing to finally determine the category and composition of the sample to be tested. Among them, the spectrum collection module also includes a light beam transmission unit and an infrared detection unit, which respectively play the role of transmission and detection, facilitating the subsequent analysis and processing of the spectrum analysis module. The near-infrared spectrometer provided by this embodiment completes the irradiation, collection, analysis and processing of the sample to be tested through the light source module, the spectrum collection module and the spectrum analysis module. On the basis of not damaging the original structure and composition of the sample to be tested, the operation process of the near-infrared spectrometer for detecting the sample to be tested is simplified, the detection cost is effectively reduced, the test time is shortened, and the test efficiency is further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic structural diagram of a near-infrared spectrometer provided in an embodiment of the present invention;
[0030] Figure 2 A schematic structural diagram of another near-infrared spectrometer provided in an embodiment of the present invention;
[0031] Figure 3 A schematic structural diagram of a spectroscopic grating in a near-infrared spectrometer provided by an embodiment of the present invention;
[0032] Figure 4 A schematic diagram of the structure of a linear array infrared detector in an infrared detection unit of a near-infrared spectrometer provided by an embodiment of the present invention;
[0033] Figure 5A schematic diagram of a near-infrared online detection method provided by an embodiment of the present invention;
[0034] Figure 6 Schematic diagram of near-infrared spectra and first-order derivative spectra of tobacco samples to be tested with different humidity levels provided in an embodiment of the present invention;
[0035] Figure 7 Schematic diagram of near-infrared spectra and first-order derivative spectra of tobacco samples to be tested from different origins provided in an embodiment of the present invention;
[0036] Figure 8 A schematic flow chart of another near-infrared online detection method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.
[0038] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. It should be noted that the directional words such as "upper", "lower", "left", and "right" described in the embodiments of the present invention are described based on the angles shown in the accompanying drawings and should not be understood as limitations on the embodiments of the present invention. In addition, in the context, it is also necessary to understand that when it is mentioned that an element is formed "on" or "under" another element, it can not only be formed directly "on" or "under" another element, but can also be formed indirectly "on" or "under" another element through an intermediate element. The terms "first", "second", etc. are only used for descriptive purposes and do not indicate any order, quantity or importance, but are only used to distinguish different components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0039] Example 1
[0040] Figure 1 FIG2 is a schematic diagram of the structure of a near-infrared spectrometer provided by an embodiment of the present invention. Figure 1The near-infrared spectrometer of the embodiment of the present invention includes a light source module 10, a spectrum collection module 20 and a spectrum analysis module 30; the light source module 10 is used to emit near-infrared light, and the near-infrared light is irradiated to the sample to be tested 12 on the assembly line 11; the spectrum collection module 20 includes a light beam transmission unit 21 and an infrared detection unit 22, and the light beam transmission unit is used to transmit the near-infrared light reflected by the sample to be tested 12 to the infrared detection unit 22; the spectrum analysis module 30 is connected to the infrared detection unit 22, and the spectrum analysis module 30 is used to analyze and process the near-infrared spectrum obtained by the infrared detection unit 22 to complete the detection of the category or component of the sample to be tested 12.
[0041] Among them, the light source module 10 can emit light and irradiate the emitted near-infrared light to the sample to be tested 12 on the assembly line 11, so that the sample to be tested 12 on the assembly line 11 can fully receive the near-infrared light emitted by the light source module 10. The spectrum collection module 20 can collect the near-infrared light at the sample to be tested 12. Furthermore, the spectrum collection module 20 also includes a light beam transmission unit 21 and an infrared detection unit 22. The light beam transmission unit 21 can further transmit the collected near-infrared light, and change the propagation direction of the light beam during the transmission process so that the near-infrared light is finally transmitted to the infrared detection unit 22. The infrared detection unit 22 converts the near-infrared light into a near-infrared spectrum. The spectrum analysis module 30 is connected to the infrared detection unit 22 in the spectrum collection module 20, analyzes and processes the near-infrared spectrum, and completes the detection of the category and composition of the sample to be tested 12.
[0042] Optionally, the spectral analysis module 30 analyzes and processes the near-infrared spectrum, including: smoothing the spectral data of the near-infrared spectrum, extracting the amplitude of each wavelength, the difference between adjacent wavelengths and the first-order derivative of the spectrum, and forming multiple attributes of the spectral data; comprehensively adopting a decision tree with information entropy as the criterion and a model established by a multi-classification support vector machine for analysis, weighting and summarizing the results obtained for each attribute, and completing the detection of the category or component of the sample 12 to be tested.
[0043] Among them, the near-infrared spectrum data obtained by the spectrum analysis module 30 from the infrared detection unit in the spectrum collection module 20 is the original spectrum data. Generally, the original spectrum data needs to be processed before the spectrum data is analyzed. The processed data can reduce the interference of irrelevant external factors, ensure that the spectrum data is more accurate, and reduce the errors caused by external factors. The original spectrum data contains a variety of characteristic attributes, and the characteristic attributes can be the wavelength of the near-infrared light, the wavelength range, the difference between different wavelengths, etc. The types and quantities of the characteristic attributes are not limited here. The processing method for the original spectrum data can be smoothing or normalization, and the specific processing method is not limited here. The characteristic attributes of the processed spectrum data are convenient for analysis. Exemplarily, the spectrum data of the near-infrared spectrum can be smoothed, and after processing, the amplitude of each wavelength and the specific difference between adjacent wavelengths are extracted, and the spectrum is first-order derived. Finally, an analysis model is established based on the formed spectrum data to complete the detection of the sample 12 to be tested.
[0044] Furthermore, multiple attributes in spectral data can be realized by establishing a machine learning model, and machine learning includes decision trees, information entropy and support vector machines. Among them, the decision tree thinking in the decision tree is to screen and judge the research object layer by layer, so as to achieve the ultimate goal. The type of logical structure in the decision tree thinking is similar to a forked tree structure. Information entropy is a mathematical abstract concept, and it can also reflect the probability of information occurrence. For a system, the more ordered the system is, the lower the information entropy is, and the more chaotic the system is, the higher the information entropy is. Information entropy is also a measure of the degree of orderliness of the system. In an embodiment of the present invention, information entropy is used to calculate multiple attributes in spectral data, and this result is used as the analysis basis of decision trees and multi-classification support vector machines. After weighted aggregation of each attribute involved, the category or component of the sample to be tested is obtained.
[0045] Figure 2 FIG2 is a schematic diagram of the structure of another near-infrared spectrometer provided by an embodiment of the present invention. Figure 2 Optionally, the beam transmission unit 21 includes a lens 211, a slit 212 and a spectroscopic grating 213, and the infrared detection unit 22 includes a linear array infrared detector 221; the light diffusely reflected by the sample 12 to be tested is converged to the slit 212 after passing through the lens 211, and the light transmitted through the slit 212 is split by the spectroscopic grating 213 and received by the linear array infrared detector 221.
[0046] As can be understood, the light diffusely reflected by the sample 12 is converged by the lens. The converged light can then pass through the slit 212 to the spectroscopic grating 213, where it changes its direction of transmission. The redirected light is then received by the linear array infrared detector 221 in the infrared detection unit 22, obtaining the near-infrared spectrum of the sample 12. The spectrum is collected in the range of 900-2600nm. The spectroscopic grating 213 includes a concave grating, which effectively reduces light absorption and light loss due to reflection, without the advantage of chromatic aberration. Figure 3 FIG2 is a schematic structural diagram of a spectroscopic grating in a near-infrared spectrometer provided by an embodiment of the present invention.
[0047] For example, Figure 4 FIG2 is a schematic diagram showing the structure of a linear array infrared detector in an infrared detection unit of a near infrared spectrometer provided by an embodiment of the present invention, with reference to FIG2. Figure 4 The linear array infrared detector 221 includes an InGaAs detector 2211, a working area 2212, and a custom circuit 2213. The linear array infrared detector includes an InGaAs detector. The size of the InGaAs detector is controllable and the detector has the characteristics of high speed and high precision. Furthermore, the InGaAs detector has a built-in semiconductor refrigeration unit, which is used to generate a stable temperature difference between the working area and the housing of the InGaAs detector.
[0048] Continue to refer Figure 2 Optionally, the light source module 10 in the near-infrared spectrometer further includes a light source array formed by a plurality of halogen tungsten lamps 13, which is beneficial to increase the intensity of the detection light.
[0049] Continue to refer Figure 2 Optionally, the near-infrared spectrometer further includes a heat dissipation module 40, which is used to maintain the housing of the InGaAs detector at room temperature, ensure that the working area of the InGaAs detector is kept at a stable low temperature, and maintain high-precision detection of the InGaAs detector.
[0050] Continue to refer Figure 2 Optionally, the near-infrared spectrometer also includes a shell 50, and the light source module 10, the spectrum collection module 20 and the heat dissipation module 40 are located in the shell 50. The shell 50 can protect the light source module 10, the spectrum collection module 20 and the heat dissipation module 40 from being damaged by external forces.
[0051] The technical solution of the embodiment of the present invention is to illuminate the sample to be tested on the assembly line through the light source formed by the halogen tungsten lamp, and use the lens, slit, and spectroscopic grating in the spectrum collection module to collect, transmit and change the transmission direction of the diffuse reflected light of the sample to be tested in turn, and then the infrared detection unit detects the near-infrared spectrum of the sample to be tested. The spectrum analysis module can further analyze and process the infrared detection unit. First, through smoothing, the amplitude of each wavelength, the difference between adjacent wavelengths and the first-order derivative of the near-infrared spectrum are extracted, so that the near-infrared spectrum data has multiple specific attributes; secondly, the decision tree and multi-classification support vector machine established by the machine learning model are used to analyze the information entropy containing multiple specific attributes, and the specific category and composition of the sample to be tested are obtained after weighted aggregation. Finally, the detection of the sample to be tested is completed. The embodiment of the present invention simplifies the operation process of the near-infrared spectrometer for detecting the sample to be tested without damaging the original structure and composition of the sample to be tested, effectively reduces the detection cost, shortens the test time, and further improves the test efficiency.
[0052] Example 2
[0053] Figure 5 A schematic flow chart of a near-infrared online detection method provided by an embodiment of the present invention, wherein the online detection method is implemented by any of the near-infrared spectrometers provided in the above embodiments, Figure 5 , the near-infrared online detection method comprises:
[0054] S110 , the light source module emits near-infrared light, and the near-infrared light is irradiated onto the sample to be tested on the assembly line.
[0055] The light source module may be a light source array formed by a plurality of halogen tungsten lamps, which is used to emit near-infrared light for detection. The light source array can increase the intensity of the detection light.
[0056] S120 , the light beam transmission unit transmits the near-infrared light reflected by the sample to be tested to the infrared detection unit.
[0057] The light beam transmission unit may include a lens, a slit and a beam splitter grating, and the light path may be designed according to actual conditions during implementation.
[0058] S130 , the spectrum analysis module analyzes and processes the near-infrared spectrum obtained by the infrared detection unit to complete the detection of the type or composition of the sample to be tested.
[0059] Illustratively, in one embodiment of the present invention, the sample to be tested is tobacco, and any one of the near-infrared spectrometers provided in the above embodiments is used to detect the near-infrared spectral data of the sample to be tested in different humidity environments. First, tobacco samples with the same batch purchase time and purchase address are selected. The purchase time and purchase address are not limited here. Furthermore, the embodiment of the present invention is purchased in January 2021 from Yunnan Province, marked as Group A, and evenly divided into two parts, and the two parts are distinguished by A11 and A12. Among them, A11 is placed in an environment with a relative humidity of 40% and a room temperature of 25°C, and A12 is placed in an environment with a relative humidity of 60% and a room temperature of 25°C for three days. After three days, they are placed in the same external environment and tested using any one of the near-infrared spectrometers provided in the embodiment of the present invention. Figure 6 Schematic diagram of the near-infrared spectra and the first-order derivative spectra of the near-infrared spectra of the tobacco samples to be tested with different humidity levels provided in the embodiments of the present invention. The near-infrared spectrometer can detect the characteristic absorption peaks of water molecules in the sample to be tested. The absorption intensity of water molecules is very high, the absorption bands of the harmonics and the sum of the frequencies are separated from each other, and the resolution of the spectrum is high. The water molecules in the tobacco sample include water in a free state and water in a free state. The characteristic absorption peak of water is OH stretching vibration, with a first harmonic frequency of about 1400nm and a second harmonic frequency of about 1920nm. The first-order derivative spectra of the near-infrared spectrum represent the characteristic absorption peaks of water molecules. The A12 tobacco sample in an environment with a relative humidity of 60% and a room temperature of 25°C shows more obvious absorption signals at the first harmonic frequency of 1400nm and the second harmonic frequency of 1920nm in the first-order derivative spectra of the near-infrared spectrum, indicating that the water content of the A12 tobacco sample is higher.
[0060] Any of the near-infrared spectrometers provided in the above embodiments is used to detect the near-infrared spectral data of the samples to be tested from different origins. First, tobacco samples with different purchasing times and different purchasing addresses are selected. The purchasing time and purchasing address are not limited here. Furthermore, in the embodiment of the present invention, the purchase time is January 2021, purchased from Yunnan Province, marked as Group A, and the purchase time is March 2021, purchased from Shandong Province, marked as Group B. Two groups A13 and B11 of equal mass and size are selected from Group A and Group B respectively and placed in the same relative humidity and room temperature, wherein the relative humidity is 40% and the room temperature is 25°C for three days respectively. After three days, they are placed in the same external environment and tested using any of the near-infrared spectrometers provided in the embodiments of the present invention. Figure 7Schematic diagram of the near-infrared spectra and the first-order derivative patterns of the near-infrared spectra of the tobacco samples to be tested with different origins provided in the embodiment of the present invention. The absorbance of the secondary harmonic frequency of the characteristic absorption peak of water molecules in the samples to be tested in the A13 group and the B11 group is significantly different. Near 1920nm, the absorbance of the sample to be tested in the B11 group is significantly higher than that in the A13 group, indicating that the moisture content in the B11 group is higher. The absorbance of the characteristic absorption peak of nitrogenous compounds in the samples to be tested in the A13 group and the B11 group is also significantly different. At 2050nm, the absorbance of the sample to be tested in the A13 group is significantly higher than that in the B11 group, indicating that the nitrogenous compound content in the A13 group is higher. The two groups of data in the above example, i.e., the near-infrared spectral data of the samples to be tested in different humidity environments and the near-infrared spectral data of the samples to be tested from different origins, are divided into a data training group and a data detection group. The selection of the data training group and the data detection group is not specifically limited. First, the sample training model is used for machine learning. Then, the decision tree and multi-classification support vector machine models are obtained using the data training group for analysis, and the results obtained from multiple attributes in the data training group are weighted and summarized. Finally, the algorithm simulation is performed using the test group data to detect the accuracy of the standard and further determine the category or composition of the sample to be tested.
[0061] The purchasing time, purchasing address, storage days, humidity level, and ambient temperature of the tobacco are not specifically limited, and the above embodiment is merely an example.
[0062] The technical solution of the embodiment of the present invention is to illuminate the sample to be tested on the production line through the near-infrared light emitted by the light source module. The spectrum information of the sample to be tested is collected by the spectrum collection module and transmitted to the spectrum analysis module. The spectrum analysis module performs corresponding analysis and processing to ultimately determine the category and composition of the sample to be tested. The spectrum collection module also includes a light beam transmission unit and an infrared detection unit. The spectrum analysis module can further analyze and process the near-infrared spectrum obtained by the infrared detection unit. The spectrum analysis module further extracts the amplitude of each wavelength, the difference between adjacent wavelengths, and the first-order derivative of the near-infrared spectrum through smoothing, so that the near-infrared spectrum data has multiple specific attributes. Secondly, the decision tree and multi-classification support vector machine established by the machine learning model are used to analyze the information entropy containing multiple specific attributes. After weighted aggregation, the specific category and composition of the sample to be tested are obtained. Finally, the near-infrared online detection method provided by this embodiment completes the illumination, collection, analysis, and processing of the sample to be tested through the light source module, spectrum collection module, and spectrum analysis module. Without damaging the original structure and composition of the sample to be tested, the efficiency of online testing is improved.
[0063] Example 3
[0064] Figure 8A flow chart of another near-infrared online detection method provided in an embodiment of the present invention. The online detection method is implemented by any one of the near-infrared spectrometers provided in the above embodiments. This embodiment is refined on the basis of the above embodiments. In this embodiment, the near-infrared spectrum obtained by the near-infrared detection unit of the spectral analysis module is specifically processed to complete the specific development of the detection steps of the category or component of the sample to be tested.
[0065] S210 , the light source module emits near-infrared light, and the near-infrared light is irradiated onto the sample to be tested on the assembly line.
[0066] S220 , the light beam transmission unit transmits the near-infrared light reflected by the sample to be tested to the infrared detection unit.
[0067] S230 , performing smoothing processing on the spectral data of the near-infrared spectrum, extracting the amplitude of each wavelength, the difference between adjacent wavelengths, and the first-order derivative of the spectrum, and forming multiple attributes of the spectral data.
[0068] S240. A decision tree based on information entropy and a model established by a multi-classification support vector machine are comprehensively used for analysis, and the results obtained from each attribute are weighted and summarized to complete the detection of the category or component of the sample to be tested.
[0069] The technical solutions of the embodiments of the present invention are refined and expanded on the basis of the above embodiments. The same technical features and beneficial effects as those of the above embodiments will not be described in detail here.
[0070] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A near infrared spectrometer, characterized in that: It includes a light source module, a spectrum collection module and a spectrum analysis module; The light source module is used to emit near-infrared light, and the near-infrared light is irradiated to the sample to be tested on the assembly line; The spectrum collection module includes a light beam transmission unit and an infrared detection unit, wherein the light beam transmission unit is used to transmit the near-infrared light reflected by the sample to be tested to the infrared detection unit; The spectrum analysis module is connected to the infrared detection unit, and is used to analyze and process the near infrared spectrum obtained by the infrared detection unit to complete the detection of the type or component of the sample to be tested; The analysis and processing of the near infrared spectrum by the spectrum analysis module includes: Smoothing the spectral data of the near-infrared spectrum, extracting the amplitude of each wavelength, the difference between adjacent wavelengths and the first-order derivative of the spectrum, and forming multiple attributes of the spectral data; A decision tree with information entropy as the criterion and a model established by a multi-classification support vector machine are comprehensively adopted for analysis, and the results obtained from each attribute are weighted and summarized to complete the detection of the category or component of the sample to be tested; The multiple attributes are realized by establishing a machine learning model, and the machine learning includes decision tree, information entropy and support vector machine.
2. The near infrared spectrometer according to claim 1, characterized in that: The light beam transmission unit includes a lens, a slit and a beam splitter grating, and the infrared detection unit includes a linear array infrared detector; The light diffusely reflected by the sample to be tested is converged to the slit after passing through the lens, and the light transmitted through the slit is received by the linear array infrared detector after being split by the beam splitter grating.
3. The near infrared spectrometer according to claim 2, characterized in that: The beam splitter grating comprises a concave grating.
4. The near infrared spectrometer according to claim 2, characterized in that: The linear array infrared detector includes an InGaAs detector.
5. The near infrared spectrometer according to claim 4, characterized in that: The InGaAs detector has a built-in semiconductor refrigeration unit, and the semiconductor refrigeration unit is used to generate a stable temperature difference between the working area and the shell of the InGaAs detector; The near-infrared spectrometer further comprises a heat dissipation module, which is used to maintain the housing of the InGaAs detector at room temperature, ensure a stable low temperature in the working area of the InGaAs detector, and maintain high-precision detection of the InGaAs detector.
6. The near infrared spectrometer according to claim 1, characterized in that: The light source module includes a light source array formed by a plurality of tungsten halogen lamps.
7. The near infrared spectrometer according to claim 5, characterized in that: It also includes a shell, and the light source module, the spectrum collection module and the heat dissipation module are located in the shell.
8. A near infrared online detection method, characterized in that: The near infrared online detection method is performed by using the near infrared spectrometer according to any one of claims 1 to 7, and comprises: The light source module emits near-infrared light, and the near-infrared light is irradiated to the sample to be tested on the assembly line; The light beam transmission unit transmits the near-infrared light reflected by the sample to be tested to the infrared detection unit; The spectrum analysis module analyzes and processes the near infrared spectrum obtained by the infrared detection unit to complete the detection of the type or component of the sample to be tested.
9. The near infrared online detection method according to claim 8, characterized in that: The spectrum analysis module analyzes and processes the near infrared spectrum obtained by the infrared detection unit to complete the detection of the type or component of the sample to be tested, including: Smoothing the spectral data of the near-infrared spectrum, extracting the amplitude of each wavelength, the difference between adjacent wavelengths and the first-order derivative of the spectrum, and forming multiple attributes of the spectral data; A decision tree with information entropy as the criterion and a model established by a multi-classification support vector machine are comprehensively adopted for analysis, and the results obtained from each attribute are weighted and summarized to complete the detection of the category or component of the sample to be tested.
