A method and device for non-invasive detection of six sex hormones based on near-infrared spectroscopy

CN123015398APending Publication Date: 2026-10-30吾征智能技术(北京)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611070045.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]在通过近红外光谱对性激素六项进行无创检测的过程中,由于采集的近红外成像数据的噪声较大,以及血液中各种元素的光谱对于性激素六项光谱的影响,导致性激素六项的含量检测精度不高,影响诊断的精确度

Benefits of technology

1、通过模态分解与小波阈值联合去噪算法对灰度值序列波形去噪,有效过滤无效干扰信号,获取纯净的灰度值时域数据;同时通过光谱预处理、主成分分析和性激素光谱提取,分离血液中复杂成分的光谱叠加干扰,精准提取性激素六项近红外光谱图,为后续含量检测提供高质量数据基础,大幅降低因信号干扰导致的检测误差;最后将性激素六项近红外光谱图输入性激素六项含量检测模型进行含量检测,实现性激素六项的高精度无创检测。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015398A_ABST
    Figure CN123015398A_ABST
Patent Text Reader

Abstract

The application provides a sex hormone six-item noninvasive detection method and device based on near-infrared spectroscopy, relates to the technical field of detection, and comprises the following steps: collecting a face video through a near-infrared imaging device, pre-processing the face video and extracting a gray value to obtain a gray value sequence waveform; performing denoising on the gray value sequence waveform through a modal decomposition and wavelet threshold joint denoising algorithm to obtain gray value time domain data; calculating the absorbance value of a blood component at each wavelength point according to the gray value time domain data through a Lambert-Beer law formula, and constructing a blood component spectrum diagram according to the absorbance value; performing spectral preprocessing, principal component analysis and sex hormone spectrum extraction on the blood component spectrum diagram to obtain a sex hormone six-item near-infrared spectrum diagram; and constructing a sex hormone six-item content detection model, inputting the sex hormone six-item near-infrared spectrum diagram into the sex hormone six-item content detection model to perform content detection, and obtaining a sex hormone six-item content detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of detection technology, and in particular to a non-invasive detection method and device for six sex hormones based on near-infrared spectroscopy. Background Technology

[0002] In recent years, near-infrared spectroscopy, a non-invasive detection technology, has been increasingly applied to blood component analysis. However, this technology still faces the following technical bottlenecks in the detection of six sex hormones.

[0003] In the process of non-invasive detection of six sex hormones using near-infrared spectroscopy, the detection accuracy of the six sex hormones is not high due to the large noise in the acquired near-infrared imaging data and the influence of the spectra of various elements in the blood on the spectrum of the six sex hormones, which affects the accuracy of diagnosis.

[0004] On the one hand, the raw signals obtained by near-infrared imaging are easily interfered with by factors such as ambient light fluctuations, slight facial movements of the subject, and noise of the detection equipment itself. The traditional filters used in existing technologies cannot effectively filter out the above interferences, resulting in significant noise in the raw signals and making it difficult to obtain clean and effective data.

[0005] On the other hand, blood has a complex composition, containing not only sex hormones but also hemoglobin, water, proteins, and other substances. The near-infrared spectral signals of different components overlap, and existing technologies cannot effectively separate the interfering spectra, making it difficult to accurately extract the characteristic spectra of the six sex hormones, which directly affects the reliability of the test data. Summary of the Invention

[0006] To address the aforementioned problems, this invention provides a non-invasive method for detecting six sex hormones based on near-infrared spectroscopy, comprising: Face videos are acquired using near-infrared imaging equipment, and the face videos are preprocessed and grayscale values ​​are extracted to obtain a grayscale value sequence waveform. The grayscale value sequence waveform is denoised by a joint denoising algorithm of mode decomposition and wavelet thresholding to obtain grayscale value time domain data. Based on the grayscale time-domain data, the absorbance values ​​of blood components at each wavelength point are calculated using the Lambert-Beer law formula, and a blood component spectrum is constructed based on the absorbance values. Spectral preprocessing, principal component analysis, and sex hormone spectral extraction were performed on blood component spectra to obtain near-infrared spectra of six sex hormones. A model for detecting the levels of six sex hormones was constructed. The near-infrared spectra of the six sex hormones were input into the model for content detection, and the results of the sex hormone content detection were obtained.

[0007] Optionally, the preprocessing and grayscale extraction of the face video to obtain a grayscale value sequence waveform includes: The face video is divided into multiple face images frame by frame. The Dlib model is used to detect the face target region within the face image and generate a face detection box. The cheeks and forehead in the face detection bounding box are used as the core area, and grayscale conversion is performed on the core area to obtain the region of interest image; The region of interest (ROI) image is separated into RGB three channels to obtain the R-channel matrix, G-channel matrix, and B-channel matrix. The average gray value of the ROI image is then calculated based on the R-channel matrix, G-channel matrix, and B-channel matrix. The average gray values ​​of the regions of interest in each frame are arranged in chronological order to obtain a gray value sequence waveform.

[0008] Optionally, the step of denoising the grayscale value sequence waveform using a joint denoising algorithm of mode decomposition and wavelet thresholding to obtain grayscale value time-domain data includes: S11: Gaussian white noise is added to the gray value sequence waveform according to the standard deviation of the gray value sequence waveform to obtain a noisy gray value sequence waveform. The mean of the IMF component of the noisy gray value sequence waveform is extracted by the empirical mode decomposition algorithm. S12: Repeat step S11 until the preset number of times, calculate the Pearson correlation coefficient between the mean of each IMF component and the gray value sequence waveform, and take the mean of the IMF component with the Pearson correlation coefficient greater than the preset threshold as the effective mean of the IMF component. S13: Perform wavelet decomposition on the mean of effective IMF components using the db4 wavelet basis to obtain high-frequency detail coefficients and low-frequency approximation coefficients. Perform soft thresholding on the high-frequency detail coefficients using the Birge-Massart strategy to obtain the processed high-frequency detail coefficients. Perform inverse wavelet transform on the processed high-frequency detail coefficients and low-frequency approximation coefficients to obtain the denoised mean of effective IMF components. S14: Average all the denoised effective IMF components and reconstruct the grayscale time domain data in time sequence.

[0009] Optionally, the step of calculating the absorbance values ​​of blood components based on grayscale time-domain data using the Lambert-Beer law formula, and constructing a blood component spectrum based on the absorbance values ​​of the blood components, includes: Based on the grayscale time-domain data, the baseline value of incident light intensity under near-infrared light irradiation and the real-time value of transmitted light intensity after being transmitted through human tissue are obtained from the database. Substituting the incident light intensity reference value and the transmitted light intensity real-time value into the Lambert-Beer law formula, the absorbance value of each blood component at each wavelength point is calculated. A blood component spectrum was constructed with near-infrared wavelength as the abscissa and the absorbance value of each blood component at each wavelength as the ordinate.

[0010] Optionally, the step of performing spectral preprocessing, principal component analysis, and sex hormone spectral extraction on the blood component spectra to obtain six near-infrared spectra of sex hormones includes: Discrete invalid spectrum removal, wavelet transform denoising, baseline correction and normalization are performed on the blood component spectrum to obtain preprocessed spectral data; The preprocessed spectral data includes the absorbance values ​​of each blood component at each wavelength, and the correlation coefficient matrix of the absorbance values ​​is obtained. Based on the correlation coefficient matrix, the characteristic values ​​of each blood component are calculated by the Jacobian method. The characteristic values ​​are sorted in descending order, and the blood components with the highest number of sorted blood components are taken as principal components. The reference infrared spectrum is obtained based on the characteristic values ​​of the principal components. The characteristic absorption spectra differences of the six sex hormones were obtained. The six sex hormones include luteinizing hormone (LH), follicle-stimulating hormone (FSH), estradiol (E2), prolactin (PRL), testosterone (T), and progesterone (P). Based on the differences in the characteristic absorption spectra of the six sex hormones, near-infrared spectra of the six sex hormones were extracted from the baseline infrared spectrum.

[0011] Optionally, the sex hormone six-item content detection model includes a preprocessing layer, a sex hormone feature mapping layer, and a PLSR regression prediction layer.

[0012] Optionally, the step of inputting the near-infrared spectra of the six sex hormones into the sex hormone content detection model for content detection, and obtaining the sex hormone content detection results, includes: The near-infrared spectra of the six sex hormones were input into the preprocessing layer for data extraction to obtain the absorbance values ​​of the six sex hormones at each wavelength. The absorbance values ​​of the six sex hormones at each wavelength are input into the sex hormone feature mapping layer for feature extraction, thereby obtaining the feature matrix of the six sex hormones. The feature matrix of the six sex hormones is input into the PLSR regression prediction layer for regression prediction to obtain the detection results of the six sex hormone levels.

[0013] This invention also provides a non-invasive detection device for six sex hormones based on near-infrared spectroscopy, used to implement the aforementioned non-invasive detection method for six sex hormones based on near-infrared spectroscopy, the device comprising: The grayscale value sequence waveform acquisition module is used to acquire face videos through a near-infrared imaging device, preprocess the face videos and extract grayscale values ​​to obtain grayscale value sequence waveforms; The grayscale value time-domain data acquisition module is used to denoise the grayscale value sequence waveform through a joint denoising algorithm of mode decomposition and wavelet thresholding to obtain grayscale value time-domain data; The blood component spectrum acquisition module is used to calculate the absorbance values ​​of blood components at each wavelength point based on grayscale time-domain data using the Lambert-Beer law formula, and to construct blood component spectra based on the absorbance values. The near-infrared spectrum acquisition module for six sex hormones is used to perform spectral preprocessing, principal component analysis, and sex hormone spectrum extraction on blood component spectra to obtain near-infrared spectra of six sex hormones. The module for obtaining the results of the six sex hormone content detection is used to construct a model for detecting the six sex hormone content. The near-infrared spectra of the six sex hormones are input into the model for content detection to obtain the results of the six sex hormone content detection.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the aforementioned non-invasive detection method for six sex hormones based on near-infrared spectroscopy.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the aforementioned non-invasive detection method for six sex hormones based on near-infrared spectroscopy.

[0016] The present invention has the following beneficial effects: 1. A combined modal decomposition and wavelet thresholding denoising algorithm is used to denoise the grayscale value sequence waveform, effectively filtering out invalid interference signals and obtaining pure grayscale value time-domain data. Simultaneously, through spectral preprocessing, principal component analysis, and sex hormone spectral extraction, the spectral superposition interference of complex components in the blood is separated, and the near-infrared spectra of six sex hormones are accurately extracted, providing a high-quality data foundation for subsequent content detection and significantly reducing detection errors caused by signal interference. Finally, the near-infrared spectra of the six sex hormones are input into the sex hormone content detection model for content detection, achieving high-precision non-invasive detection of the six sex hormones.

[0017] 2. By adding Gaussian white noise according to the standard deviation of the gray value sequence, using empirical mode decomposition and Pearson correlation coefficient to screen the effective IMF component mean, the local extreme value distribution of the original signal is broken, and the mode mixing that is prone to occur in traditional single signal decomposition is suppressed. This ensures that the retained IMF component mean only contains effective signals related to changes in blood components. Then, the effective IMF component mean is decomposed using the db4 wavelet basis, and the high-frequency detail coefficients are soft-thresholded using the Birge-Massart strategy. This not only accurately filters high-frequency noise such as ambient light and facial micro-movements, but also avoids signal abrupt changes and completely preserves the signal details corresponding to the subtle changes in blood components.

[0018] 3. The correlation coefficient matrix of absorbance values ​​is used to accurately quantify the correlation between the spectra of various blood components, and the Jacobi method is used to calculate the characteristic values. The principal components are screened by the characteristic values ​​to effectively remove redundant and interfering components. The reference infrared spectrum is obtained based on the characteristic values ​​of the principal components, and the near-infrared spectra of the six sex hormones are extracted from the reference infrared spectrum according to the characteristic absorption spectrum differences of the six sex hormones. This avoids the interference of spectral superposition of blood components and improves the extraction accuracy of sex hormone spectra. Attached Figure Description

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

[0020] Figure 1 This is a flowchart of a method according to an embodiment of the present invention; Figure 2 This is a structural diagram of the device according to an embodiment of the present invention. Detailed Implementation

[0021] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0022] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.

[0023] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0024] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0025] Reference Figure 1 This invention provides a non-invasive method for detecting six sex hormones based on near-infrared spectroscopy, comprising: Face videos are acquired using near-infrared imaging equipment, and the face videos are preprocessed and grayscale values ​​are extracted to obtain a grayscale value sequence waveform. In some embodiments, the preprocessing and grayscale extraction of the face video to obtain a grayscale value sequence waveform includes: The face video is divided into multiple face images frame by frame. The Dlib model is used to detect the face target region within the face image and generate a face detection box. In some embodiments, the face video is loaded using the cv2.VideoCapture function to obtain the frame rate, total number of frames, and resolution of the original video, ensuring that the frame extraction rhythm is consistent with the original video and avoiding information loss. Then, face images are extracted frame by frame. The face region in a single frame image is detected using the shape_predictor function of the Dlib model. Subsequently, the detection box boundary is determined based on the coordinate range of 68 feature points. Finally, the detection box coordinates are bound to the corresponding frame image and the coordinates of the 68 feature points to generate a JSON-formatted frame-detection box-feature point association table for subsequent core region localization.

[0026] The cheeks and forehead in the face detection bounding box are used as the core area, and grayscale conversion is performed on the core area to obtain the region of interest image; In some embodiments, the core area is located based on 68 feature points, numbered from 0 to 67. For the forehead region, feature points 17 (left eyebrow start point), 21 (left eyebrow end point), 22 (right eyebrow start point), 26 (right eyebrow end point), and 30 (nose tip) extend upwards to the upper boundary of the detection box and downwards to the average y-coordinate of feature points 17-26 along the lower edge of the eyebrow. For the left cheek, feature points 2 (outer left corner of eye), 3 (inner left corner of eye), 4 (above left pupil), 14 (left corner of mouth), 15 (outer left corner of mouth), and 28 (left side of nose tip) form a closed polygon in sequence. For the right cheek, feature points 13 (outer right corner of mouth), 12 (right corner of mouth), 3 (above right pupil), 5 (inner right corner of eye), 6 (outer right corner of eye), and 28 (right side of nose tip) also form a closed polygon in sequence. The `cv2.fillPoly` function marks the core area as the valid region, while pixels in the non-core area are set to black (0), retaining only the core area pixels. Then, the internationally accepted weighted average method was used to convert the RGB image of the core area into a single-channel grayscale image. The conversion formula is as follows:

[0027] Gray value Y = 0.299 × R + 0.587 × G + 0.114 × B R, G, and B are the red, green, and blue channel values ​​of the pixels in the core area, respectively. The conversion is achieved directly through the cv2.cvtColor function to generate the region of interest image.

[0028] The region of interest (ROI) image is separated into RGB three channels to obtain the R-channel matrix, G-channel matrix, and B-channel matrix. The average gray value of the ROI image is then calculated based on the R-channel matrix, G-channel matrix, and B-channel matrix. In some embodiments, the region of interest image is first separated into three single-channel matrices (R, G, and B) using the `cv2.split` function. Each matrix has the same dimensions as the core region image, and the pixel values ​​range from 0 to 255. Next, outlier filtering is performed on each channel, removing extreme values ​​(pixel values ​​< 5 or > 250) and replacing them with the average pixel value of that channel to avoid interfering with the calculation results. Then, the average pixel values ​​of the filtered R, G, and B channels are calculated, denoted as `mean_R`, `mean_G`, and `mean_B`, respectively, and the results are rounded to two decimal places. Finally, the grayscale conversion formula is used to calculate the average grayscale value of the core region per frame.

[0029] Average grayscale value per frame = 0.299 × mean_R + 0.587 × mean_G + 0.114 × mean_B An Excel table is generated based on the correspondence between frame timestamps and average grayscale values ​​of a single frame, which facilitates subsequent time-series sorting. The average gray values ​​of the regions of interest in each frame are arranged in chronological order to obtain a gray value sequence waveform.

[0030] The grayscale value sequence waveform is denoised by a joint denoising algorithm of mode decomposition and wavelet thresholding to obtain grayscale value time domain data. In some embodiments, the step of denoising the grayscale value sequence waveform using a joint denoising algorithm of mode decomposition and wavelet thresholding to obtain grayscale value time-domain data includes: S11: Gaussian white noise is added to the gray value sequence waveform according to the standard deviation of the gray value sequence waveform to obtain a noisy gray value sequence waveform. The mean of the IMF component of the noisy gray value sequence waveform is extracted by the empirical mode decomposition algorithm. In some embodiments, the grayscale value sequence waveform is represented as follows: The sequence mean is expressed as The standard deviation is expressed as Noise amplitude coefficient For the j-th calculation, Gaussian white noise is generated: The waveform of a noisy grayscale value sequence is represented as follows: ; Empirical Mode Decomposition (EMD) is performed on a noisy grayscale waveform sequence to obtain the mean of the IMF component in the j-th round. , This represents the m-th IMF component; S12: Repeat step S11 until the preset number of times, calculate the Pearson correlation coefficient between the mean of each IMF component and the gray value sequence waveform, and take the mean of the IMF component with the Pearson correlation coefficient greater than the preset threshold as the effective mean of the IMF component. In some embodiments, the formula for calculating the Pearson correlation coefficient is as follows: in, The average of the mean values ​​of all valid IMF components; S13: Perform wavelet decomposition on the mean of effective IMF components using the db4 wavelet basis to obtain high-frequency detail coefficients and low-frequency approximation coefficients. Perform soft thresholding on the high-frequency detail coefficients using the Birge-Massart strategy to obtain the processed high-frequency detail coefficients. Perform inverse wavelet transform on the processed high-frequency detail coefficients and low-frequency approximation coefficients to obtain the denoised mean of effective IMF components. In some embodiments, the mean of each effective IMF component is decomposed into multiple layers by wavelet decomposition, the third... High-frequency detail coefficients after layer processing The expression is: in, For the first High-frequency detail coefficients of the layer, For the first The soft threshold of the layer; Depend on Approximation coefficient with low frequency Reconstructed mean of effective IMF components after denoising The expression is: in, Indicates inverse wavelet transform; S14: Average all the denoised effective IMF components and reconstruct the grayscale time domain data in time sequence; In some embodiments, grayscale value time domain data The expression is: in, This represents the residual quantity from the empirical mode decomposition. This represents the set of valid IMF components.

[0031] Based on the grayscale time-domain data, the absorbance values ​​of blood components at each wavelength point are calculated using the Lambert-Beer law formula, and a blood component spectrum is constructed based on the absorbance values. In some embodiments, the step of calculating the absorbance values ​​of blood components based on grayscale time-domain data using the Lambert-Beer law formula, and constructing a blood component spectrum based on the absorbance values ​​of the blood components, includes: Based on the grayscale time-domain data, the baseline value of incident light intensity under near-infrared light irradiation and the real-time value of transmitted light intensity after being transmitted through human tissue are obtained from the database. In some embodiments, two types of key data are first stored in a MySQL database: one is a near-infrared light intensity reference table, which records the incident light intensity reference value I0 corresponding to each wavelength in the range of 700-2500nm; the other is a gray value-transmitted light intensity mapping table, which stores the fitting relationship between gray value and transmitted light intensity I=a×G+b according to the same wavelength point, where a and b are calibration coefficients for each wavelength, I is the real-time value of transmitted light intensity, and G is the gray value.

[0032] When retrieving data, Python connects to the database and extracts the corresponding incident light intensity reference value from the reference table based on the wavelength set corresponding to the grayscale time-domain data. Then, for each grayscale value G in the grayscale time-domain data, the corresponding wavelengths a and b are matched and substituted into I=a×G+b to calculate the real-time value of transmitted light intensity.

[0033] Substituting the incident light intensity reference value and the transmitted light intensity real-time value into the Lambert-Beer law formula, the absorbance value of each blood component at each wavelength point is calculated. In some embodiments, the Lambert-Beer law formula A = -log 10 (I / I0) calculates the absorbance, where A is the absorbance, I is the real-time value of the transmitted light intensity, and I0 is the reference value of the incident light intensity.

[0034] First, identify the blood components to be tested and screen for wavelengths where each component has significant absorption. Then, according to the component-wavelength correspondence, substitute I and I0 to calculate the absorbance value of each blood component at each wavelength point. Finally, remove outliers with A<0 or A>2 and replace them with the average absorbance of adjacent time series to ensure the validity of the data.

[0035] A blood component spectrum was constructed with near-infrared wavelength as the abscissa and the absorbance value of each blood component at each wavelength as the ordinate. In some embodiments, a spectrum is plotted using Python with near-infrared wavelengths of 700-2500 nm as the abscissa and absorbance of 0-2 as the ordinate. First, the components are grouped by wavelength, and the average absorbance value at each wavelength is calculated. Then, different colors and line types are assigned to each component to plot the wavelength-average absorbance curve, and the coordinate axes and legends are labeled to obtain the blood component spectrum.

[0036] Spectral preprocessing, principal component analysis, and sex hormone spectral extraction were performed on blood component spectra to obtain near-infrared spectra of six sex hormones. In some embodiments, the step of performing spectral preprocessing, principal component analysis, and sex hormone spectral extraction on the blood component spectra to obtain six near-infrared spectra of sex hormones includes: Discrete invalid spectrum removal, wavelet transform denoising, baseline correction and normalization are performed on the blood component spectrum to obtain preprocessed spectral data; In some embodiments, the effective absorbance range is set to 0-2, and the coefficient of variation threshold is set to 0.3. All wavelength points are traversed, and spectra of wavelengths with absorbance exceeding the range or coefficient of variation exceeding the threshold are removed. Next, a 3-layer decomposition denoising process is performed using the db4 wavelet basis. High-frequency detail coefficients are processed with Birge-Massart soft thresholding, followed by inverse transform to obtain the denoised absorbance sequence. Then, the airPLS algorithm is used for baseline correction, and the denoised absorbance is subtracted from the fitted baseline to eliminate drift. Finally, SNV normalization is used to eliminate amplitude differences between different component spectra caused by concentration differences and minor fluctuations in detection conditions. This process is repeated for all components to obtain the preprocessed spectral data.

[0037] The preprocessed spectral data includes the absorbance values ​​of each blood component at each wavelength, and the correlation coefficient matrix of the absorbance values ​​is obtained. In some embodiments, the pairwise Pearson correlation coefficients are calculated with blood components as rows and wavelengths as columns, and a correlation coefficient matrix R is constructed, the expression of which is: in, It is the first The vector of absorbance values ​​of each component Let it be its mean.

[0038] Based on the correlation coefficient matrix, the characteristic values ​​of each blood component are calculated by the Jacobian method. The characteristic values ​​are sorted in descending order, and the blood components with the highest number of sorted blood components are taken as principal components. The reference infrared spectrum is obtained based on the characteristic values ​​of the principal components. In some embodiments, the Jacobi method is used to find the off-diagonal elements with the largest correlation coefficient matrix R. Apply iterative Givens rotations until... , Pick The eigenvalues ​​are obtained in descending order. and the corresponding feature vectors ; Sort the feature values ​​in descending order, and then sort them according to a preset number. Determine the principal component set Preprocess the spectrum Projecting onto the principal component subspace, remember to divide the matrix. Then the eigenvalue weights for: The baseline infrared spectrum is obtained by weighted summation of the scores of each principal component: in, for The corresponding absorbance values ​​are combined to form a reference infrared spectrum.

[0039] The characteristic absorption spectra differences of the six sex hormones were obtained. The six sex hormones include luteinizing hormone (LH), follicle-stimulating hormone (FSH), estradiol (E2), prolactin (PRL), testosterone (T), and progesterone (P). In some embodiments, the six hormones, including luteinizing hormone (LH), follicle-stimulating hormone (FSH), estradiol (E2), prolactin (PRL), testosterone (T), and progesterone (P), are core indicators for assessing human reproductive endocrine function and diagnosing endocrine-related diseases such as polycystic ovary syndrome, hypogonadism, and infertility. Their test results have important reference value in clinical diagnosis and treatment, health monitoring, and other fields.

[0040] Based on the differences in the characteristic absorption spectra of the six sex hormones, near-infrared spectra of the six sex hormones were extracted from the baseline infrared spectrum.

[0041] In some embodiments, the characteristic absorption wavelengths of luteinizing hormone (LH), follicle-stimulating hormone (FSH), estradiol (E2), prolactin (PRL), testosterone (T), and progesterone (P) are first identified. The characteristic absorption wavelengths for LH are 1500 nm and 1700 nm, for FSH 1450 nm and 1650 nm, for E2 1600 nm and 1800 nm, for PRL 1550 nm and 1750 nm, for testosterone (T) 1400 nm and 1600 nm, and for progesterone (P) 1500 nm and 1700 nm. Differences in characteristic absorption spectra are extracted by comparing the absorbance data of the six hormones after preprocessing. At 1500 nm, the absorbance peak of LH (0.9-1.1) is higher than that of progesterone (P) (0.7-0.8); at 1600 nm, the absorbance peak of E2 (1.0-1.2) is higher than that of testosterone (T) (0.6-0.7); at 1750 nm, PRL has a unique absorbance peak (0.8-0.9), while the absorbance of other hormones at this wavelength is <0.5; the absorbance of FSH at 1450 nm (0.7-0.8) is significantly higher than that of other hormones (<0.5). The characteristic absorption wavelength, absorbance peak range, and peak shape differences of each of the six hormones were recorded to form a characteristic difference table.

[0042] Based on the baseline infrared spectrum and the characteristic difference table of six sex hormones, spectral extraction was performed. First, the characteristic absorption wavelengths of the six hormones were located in the baseline spectrum, and the comprehensive absorbance value and peak shape of these wavelength points were observed. For LH, spectral segments with absorbance values ​​of 0.9-1.1 and 0.8-1.0 at wavelengths of 1500nm and 1700nm, respectively, and with double-peaked peaks, were selected and extracted as the LH near-infrared spectrum. For FSH, spectral segments with absorbance values ​​of 0.7-0.8 and 0.6-0.7 at 1450nm and 1650nm, respectively, and with the 1450nm peak being higher than the 1650nm peak, were selected and used as the FSH spectrum. Following the same logic, based on the characteristic differences of E2, PRL, testosterone (T), and progesterone (P), the corresponding spectral segments were matched in the baseline spectrum, and their respective near-infrared spectra were extracted. After extraction, the six spectra are compared with the pre-processed original absorbance spectra of the six hormones. If the peak position and peak shape deviation is less than 5%, the extraction is considered effective, and the final output is the near-infrared spectra of the six sex hormones.

[0043] A model for detecting the levels of six sex hormones was constructed. The near-infrared spectra of the six sex hormones were input into the model for content detection, and the results of the sex hormone content detection were obtained.

[0044] In some embodiments, the sex hormone six-item content detection model includes a preprocessing layer, a sex hormone feature mapping layer, and a PLSR regression prediction layer.

[0045] In some embodiments, the preprocessing layer includes a wavelength alignment unit and an outlier removal unit. The wavelength alignment unit reads the original spectral data through the NumPy library and matches the wavelength points of the spectral curves of the six hormones to the effective wavelength sequence preset by the model. The outlier removal unit follows the effective range standard of absorbance 0-2, traverses the absorbance value of each wavelength point of each hormone spectrum, and if it exceeds the effective range, it replaces the outlier with the average absorbance of the six hormones at that wavelength point, balancing the rationality and completeness of the data.

[0046] The sex hormone feature mapping layer includes a wavelet packet decomposition unit, an energy value calculation unit, and a feature selection submodule. The wavelet packet decomposition unit uses the PyWavelets library and selects the db4 wavelet basis to perform two-level wavelet packet decomposition on the absorbance sequence of each hormone, resulting in four wavelet packet sub-band coefficients. The energy value calculation unit calculates the energy feature for each sub-band coefficient, initially generating four energy features for each hormone, resulting in a total of 24 initial features for the six hormones. The feature selection submodule uses the actual levels of six sex hormones obtained by clinical standard testing methods as labels. It calculates the Pearson correlation coefficient between each initial feature and the corresponding actual hormone level using the NumPy library, and selects features with an absolute correlation coefficient > 0.4.

[0047] The PLSR regression prediction layer includes a cross-validation unit and a model fitting unit. The cross-validation unit determines the optimal number of principal components through 5-fold cross-validation, sets the number of principal components to a range of 1-10, calculates the root mean square error of cross-validation for the model under different numbers of principal components, and selects the principal components with the smallest RMSE as the optimal number of principal components. The model fitting unit uses the training set data and the optimal number of principal components to fit the PLSR model and obtain the regression function of the key feature - hormone content.

[0048] In some embodiments, the step of inputting the near-infrared spectra of the six sex hormones into the sex hormone content detection model for content detection, and obtaining the sex hormone content detection results, includes: The near-infrared spectra of the six sex hormones were input into the preprocessing layer for data extraction to obtain the absorbance values ​​of the six sex hormones at each wavelength. In some embodiments, the near-infrared spectra of the six sex hormones to be detected are input into the pre-constructed preprocessing layer, and the wavelength alignment logic within the layer is invoked to match the wavelength points of the spectra to the effective wavelength points preset by the model; the absorbance value corresponding to each wavelength point is read, and outliers exceeding the range of 0-2 are removed; the absorbance values ​​are arranged in the order of six hormones × each wavelength point to form the absorbance matrix of the sample to be detected. The absorbance values ​​of the six sex hormones at each wavelength are input into the sex hormone feature mapping layer for feature extraction, thereby obtaining the feature matrix of the six sex hormones. In some embodiments, the absorbance matrix to be detected output by the preprocessing layer is input into the feature mapping layer, and the wavelet packet decomposition-feature selection logic that has been solidified in the layer is called: a 2-layer db4 wavelet packet decomposition is performed on the absorbance sequence of each hormone, the sub-band energy features are calculated, and key features are selected according to the correlation coefficient threshold > 0.4 determined during model training; the key features of the six hormones are arranged in the order during training to form the feature matrix of the sample to be detected. The feature matrix of the six sex hormones is input into the PLSR regression prediction layer for regression prediction to obtain the detection results of the six sex hormone levels. In some embodiments, the feature matrix of the sample to be detected is input into a trained PLSR regression prediction layer. The model calls a fitted regression function to calculate the predicted levels of six hormones. The expression is: in, This is the feature matrix of the six sex hormones. This is a predicted level of six sex hormones. and This represents the mean and standard deviation of the feature matrix of the training set, calculated column-wise. The regression coefficient matrix represents the relationship between the features and the six concentrations. and This represents the mean and standard deviation of the concentrations of six hormones in the training set. This indicates element-wise multiplication.

[0049] Reference Figure 2 This invention provides a non-invasive detection device 20 for six sex hormones based on near-infrared spectroscopy, used to implement the aforementioned non-invasive detection method for six sex hormones based on near-infrared spectroscopy. The device includes: The grayscale value sequence waveform acquisition module 21 is used to acquire face videos through a near-infrared imaging device, preprocess the face videos and extract grayscale values ​​to obtain grayscale value sequence waveforms; The grayscale value time domain data acquisition module 22 is used to denoise the grayscale value sequence waveform through a joint denoising algorithm of mode decomposition and wavelet thresholding to obtain grayscale value time domain data; The blood component spectrum acquisition module 23 is used to calculate the absorbance value of blood components at each wavelength point based on grayscale time-domain data and the Lambert-Beer law formula, and to construct a blood component spectrum based on the absorbance value. The near-infrared spectrum acquisition module 24 for six sex hormones is used to perform spectral preprocessing, principal component analysis and sex hormone spectrum extraction on blood component spectra to obtain near-infrared spectra of six sex hormones. The sex hormone six-item content detection result acquisition module 25 is used to construct a sex hormone six-item content detection model. The near-infrared spectrum of the sex hormone six-item content is input into the sex hormone six-item content detection model for content detection, and the sex hormone six-item content detection result is obtained.

[0050] This application provides an electronic device, including a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements any of the above-described schemes of a non-invasive detection method for six sex hormones based on near-infrared spectroscopy.

[0051] Specifically, the processor may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor may also include onboard memory for caching purposes. The processor may be a single processing unit or multiple processing units for performing different actions of the method flow according to embodiments of this application.

[0052] Memory can be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, memory can include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, instruments, or propagation media. Specific examples of memory include: magnetic storage devices such as magnetic tape or hard disk drives (HDDs); optical storage devices such as optical discs (CD-ROMs); and also random access memory (RAM) or flash memory; and / or wired / wireless communication links.

[0053] This application also provides a computer-readable medium storing a computer program that, when executed by a processor, implements the non-invasive detection method for six sex hormones based on near-infrared spectroscopy, as described above. This computer-readable medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into that device / apparatus / system. The aforementioned computer-readable medium carries one or more programs, which, when executed, implement the method as described in the embodiments of this application.

[0054] According to embodiments of this application, a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, optical fiber, radio frequency signals, etc., or any suitable combination thereof.

[0055] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application. Therefore, the scope of this application should not be limited to the above embodiments, but should be defined not only by the appended claims, but also by their equivalents. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A non-invasive method for detecting six sex hormones based on near-infrared spectroscopy, characterized in that, include: Face videos are acquired using near-infrared imaging equipment, and the face videos are preprocessed and grayscale values ​​are extracted to obtain a grayscale value sequence waveform. The grayscale value sequence waveform is denoised by a joint denoising algorithm of mode decomposition and wavelet thresholding to obtain grayscale value time domain data. Based on the grayscale time-domain data, the absorbance values ​​of blood components at each wavelength point are calculated using the Lambert-Beer law formula, and a blood component spectrum is constructed based on the absorbance values. Spectral preprocessing, principal component analysis, and sex hormone spectral extraction were performed on blood component spectra to obtain near-infrared spectra of six sex hormones. A model for detecting the levels of six sex hormones was constructed. The near-infrared spectra of the six sex hormones were input into the model for content detection, and the results of the sex hormone content detection were obtained.

2. The non-invasive detection method for six sex hormones based on near-infrared spectroscopy according to claim 1, characterized in that, The preprocessing and grayscale extraction of the face video to obtain a grayscale value sequence waveform includes: The face video is divided into multiple face images frame by frame. The Dlib model is used to detect the face target region within the face image and generate a face detection box. The cheeks and forehead in the face detection bounding box are used as the core area, and grayscale conversion is performed on the core area to obtain the region of interest image; The region of interest (ROI) image is separated into RGB three channels to obtain the R-channel matrix, G-channel matrix, and B-channel matrix. The average gray value of the ROI image is then calculated based on the R-channel matrix, G-channel matrix, and B-channel matrix. The average gray values ​​of the regions of interest in each frame are arranged in chronological order to obtain a gray value sequence waveform.

3. The non-invasive detection method for six sex hormones based on near-infrared spectroscopy according to claim 1, characterized in that, The step of denoising the grayscale value sequence waveform using a joint denoising algorithm of mode decomposition and wavelet thresholding to obtain grayscale value time-domain data includes: S11: Gaussian white noise is added to the gray value sequence waveform according to the standard deviation of the gray value sequence waveform to obtain a noisy gray value sequence waveform. The mean of the IMF component of the noisy gray value sequence waveform is extracted by the empirical mode decomposition algorithm. S12: Repeat step S11 until the preset number of times, calculate the Pearson correlation coefficient between the mean of each IMF component and the gray value sequence waveform, and take the mean of the IMF component with the Pearson correlation coefficient greater than the preset threshold as the effective mean of the IMF component. S13: Perform wavelet decomposition on the mean of effective IMF components using the db4 wavelet basis to obtain high-frequency detail coefficients and low-frequency approximation coefficients. Perform soft thresholding on the high-frequency detail coefficients using the Birge-Massart strategy to obtain the processed high-frequency detail coefficients. Perform inverse wavelet transform on the processed high-frequency detail coefficients and low-frequency approximation coefficients to obtain the denoised mean of effective IMF components. S14: Average all the denoised effective IMF components and reconstruct the grayscale time domain data in time sequence.

4. The non-invasive detection method for six sex hormones based on near-infrared spectroscopy according to claim 1, characterized in that, The process of calculating the absorbance values ​​of blood components based on grayscale time-domain data using the Lambert-Beer law formula, and constructing a blood component spectrum based on these absorbance values, includes: Based on the grayscale time-domain data, the baseline value of incident light intensity under near-infrared light irradiation and the real-time value of transmitted light intensity after being transmitted through human tissue are obtained from the database. Substituting the incident light intensity reference value and the transmitted light intensity real-time value into the Lambert-Beer law formula, the absorbance value of each blood component at each wavelength point is calculated. A blood component spectrum was constructed with near-infrared wavelength as the abscissa and the absorbance value of each blood component at each wavelength as the ordinate.

5. The non-invasive detection method for six sex hormones based on near-infrared spectroscopy according to claim 1, characterized in that, The process involves spectral preprocessing, principal component analysis, and sex hormone spectral extraction of blood component spectra to obtain six near-infrared spectra of sex hormones, including: Discrete invalid spectrum removal, wavelet transform denoising, baseline correction and normalization are performed on the blood component spectrum to obtain preprocessed spectral data; The preprocessed spectral data includes the absorbance values ​​of each blood component at each wavelength, and the correlation coefficient matrix of the absorbance values ​​is obtained. Based on the correlation coefficient matrix, the characteristic values ​​of each blood component are calculated by the Jacobian method. The characteristic values ​​are sorted in descending order, and the blood components with the highest number of sorted blood components are taken as principal components. The reference infrared spectrum is obtained based on the characteristic values ​​of the principal components. The characteristic absorption spectra differences of the six sex hormones were obtained. The six sex hormones include luteinizing hormone (LH), follicle-stimulating hormone (FSH), estradiol (E2), prolactin (PRL), testosterone (T), and progesterone (P). Based on the differences in the characteristic absorption spectra of the six sex hormones, near-infrared spectra of the six sex hormones were extracted from the baseline infrared spectrum.

6. The non-invasive detection method for six sex hormones based on near-infrared spectroscopy according to claim 1, characterized in that, The model for detecting the levels of six sex hormones includes a preprocessing layer, a sex hormone feature mapping layer, and a PLSR regression prediction layer.

7. The non-invasive detection method for six sex hormones based on near-infrared spectroscopy according to claim 6, characterized in that, The process of inputting the near-infrared spectra of the six sex hormones into the sex hormone content detection model for content detection, and obtaining the sex hormone content detection results, includes: The near-infrared spectra of the six sex hormones were input into the preprocessing layer for data extraction, and the absorbance values ​​of the six sex hormones at each wavelength were obtained. The absorbance values ​​of the six sex hormones at each wavelength are input into the sex hormone feature mapping layer for feature extraction, thereby obtaining the feature matrix of the six sex hormones. The feature matrix of the six sex hormones is input into the PLSR regression prediction layer for regression prediction to obtain the detection results of the six sex hormone levels.

8. A non-invasive detection device for six sex hormones based on near-infrared spectroscopy, used to implement the non-invasive detection method for six sex hormones based on near-infrared spectroscopy as described in any one of claims 1 to 7, characterized in that, The device includes: The grayscale value sequence waveform acquisition module is used to acquire face videos through a near-infrared imaging device, preprocess the face videos and extract grayscale values ​​to obtain grayscale value sequence waveforms; The grayscale value time-domain data acquisition module is used to denoise the grayscale value sequence waveform through a joint denoising algorithm of mode decomposition and wavelet thresholding to obtain grayscale value time-domain data; The blood component spectrum acquisition module is used to calculate the absorbance values ​​of blood components at each wavelength point based on grayscale time-domain data using the Lambert-Beer law formula, and to construct blood component spectra based on the absorbance values. The near-infrared spectrum acquisition module for six sex hormones is used to perform spectral preprocessing, principal component analysis, and sex hormone spectrum extraction on blood component spectra to obtain near-infrared spectra of six sex hormones. The module for obtaining the results of the six sex hormone content detection is used to construct a model for detecting the six sex hormone content. The near-infrared spectra of the six sex hormones are input into the model for content detection to obtain the results of the six sex hormone content detection.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the non-invasive detection method for six sex hormones based on near-infrared spectroscopy as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the non-invasive detection method for six sex hormones based on near-infrared spectroscopy as described in any one of claims 1 to 7.