A low-field nuclear magnetic resonance-based method for non-destructive identification of the gender of poultry eggs

By combining low-field nuclear magnetic resonance technology and machine learning models with multidimensional spectroscopic features and environmental compensation, the low sensitivity and industrialization problems of poultry egg sex detection have been solved, achieving high-accuracy non-destructive and non-contact sex identification.

CN120651900BActive Publication Date: 2026-01-09SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511173516.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-21
Publication Date
2026-01-09
Estimated Expiration
2045-08-21

AI Technical Summary

Technical Problem

Existing technologies for sex detection in poultry eggs suffer from low sensitivity, are greatly affected by eggshell thickness, and are difficult to apply industrially, especially in achieving non-destructive sex identification in the early stages of incubation.

Method used

Low-field nuclear magnetic resonance (NMR) technology was used to collect echo signals from poultry eggs. Spectral inversion was performed using a non-negative least squares optimization model and a Tikhonov regularization term to extract multidimensional spectroscopic features. An integrated classification model was used for sex identification, and an environmental disturbance compensation mechanism was introduced.

Benefits of technology

It achieves high-accuracy non-contact sex identification, enabling assembly-line-level sex identification of poultry eggs in the early stages of incubation. It possesses deep physiological mechanism identification capabilities, strong stability, and adaptability to various environmental interferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120651900B_ABST
    Figure CN120651900B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on low-field nuclear magnetic resonance's poultry egg gender nondestructive identification method, belong to poultry egg detection technical field, comprising: S1, using low-field nuclear magnetic resonance equipment to carry out echo signal acquisition to poultry egg in turning chick period;S2, using non-negative least square optimization model to combine Tikhonov regular term to the echo signal of collection carries out spectrum inversion, reconstructs the T2 relaxation time spectrum related to poultry egg internal moisture and tissue structure distribution;S3, from T2 relaxation time spectrum, extract the multi-dimensional spectroscopy feature associated with poultry egg gender information, form the high-dimensional feature vector of representing embryo tissue microstructure difference;S4, high-dimensional feature vector is input into integrated classification model, and the output poultry egg gender identification result.The method of the application can be integrated on the automatic conveying line of hatching factory, realize multiple egg position parallel detection, fast non-contact identification and classification output, with high adaptability and engineering practicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of poultry egg detection technology, specifically relating to a non-destructive method for sex identification of poultry eggs based on low-field nuclear magnetic resonance. Background Technology

[0002] In the duck industry, the value of male and female individuals differs significantly, especially in breeding ducks and egg-laying duck farming. Accurately identifying the sex of the embryo inside the egg early in the incubation period can greatly improve resource allocation efficiency, reduce feeding costs, and increase hatch yield. However, traditional sex determination methods such as DNA testing, hormone labeling, and visual observation suffer from problems such as shell breakage, low efficiency, or inability to be industrialized. In recent years, to achieve non-destructive sex detection in poultry eggs, researchers have attempted to use various advanced detection technologies, such as near-infrared spectroscopy and laser scattering to analyze transmitted light signals from the eggshell; ultrasonic imaging and reflectance analysis to assess differences in embryonic tissue structure or sound velocity; and multimodal sensing technologies such as hyperspectral imaging and microwave imaging to obtain internal optical or electromagnetic characteristics through the eggshell. Although these methods have made progress to some extent, they still generally suffer from limitations such as limited sensitivity, significant noise interference, significant influence from eggshell thickness or location, and large equipment size, making it difficult to achieve stable and large-scale non-contact identification in industrial incubation environments. Summary of the Invention

[0003] To address the aforementioned shortcomings in existing technologies, the present invention provides a non-destructive sex identification method for poultry eggs based on low-field nuclear magnetic resonance. This method solves the problems of low sensitivity, significant influence from shell thickness, and difficulty in industrialization of existing non-destructive testing methods such as optical and ultrasonic methods. It provides a non-destructive sex identification method for poultry eggs that can achieve high accuracy, non-contact, and assembly-line-level processing in the early stages of incubation.

[0004] To achieve the aforementioned objectives, the present invention employs the following technical solution: a non-destructive method for sex determination of poultry eggs based on low-field nuclear magnetic resonance, comprising the following steps:

[0005] S1. Low-field nuclear magnetic resonance equipment was used to collect echo signals from transitional poultry eggs.

[0006] S2. Using a non-negative least squares optimization model combined with Tikhonov regularization, the collected echo signals were spectral inversion was performed to reconstruct the T2 relaxation time spectrum related to the distribution of water content and tissue structure in poultry eggs.

[0007] S3. Extract multidimensional spectroscopic features associated with the sex information of poultry eggs from the T2 relaxation time spectrum to form a high-dimensional feature vector characterizing the differences in the microstructure of embryonic tissues.

[0008] S4. Input the high-dimensional feature vector into the ensemble classification model and output the sex identification results of the poultry eggs.

[0009] Furthermore, in step S1, the signal-to-noise ratio and sampling time of the echo signal are evaluated in real time based on the quality of the sampled echo signal, and the optimal echo interval τ and echo number N in the echo signal acquisition process are determined by optimizing the objective function.

[0010] The optimization objective function J(τ,N) is:

[0011] J(τ,N)=α·SNR(τ,N)-β·(τ·N)

[0012] In the formula, α and β represent the weights for measuring echo signal quality and sampling efficiency, respectively, and SNR represents the ratio of the peak value of the echo signal to the standard deviation of the background noise.

[0013] Furthermore, in step S2, the objective function for spectral inversion of the acquired echo signal using a non-negative least squares optimization model combined with a Tikhonov regularization term is:

[0014]

[0015] In the formula, S represents the acquired echo signal vector, K represents the system response kernel, A represents the T2 relaxation time spectral coefficients, and λ represents the parameter used to control the smoothness of the spectrum. This represents the first-order gradient operator.

[0016] Furthermore, in step S3, the multidimensional spectroscopic features associated with the sex information of poultry eggs are extracted from the T2 relaxation time spectrum, including the main peak position, spectral width, energy density ratio, spectral change rate, spectral skewness, spectral entropy, and peak sharpness.

[0017] The main peak position is the relaxation time corresponding to the point of maximum relaxation spectrum amplitude in the T2 relaxation time spectrum; the main peak position of male embryos shifts to the left compared to female embryos, while the main peak position of female embryos remains in the short relaxation region.

[0018] The spectral width is the range of the relaxation time distribution in the T2 relaxation time spectrum; the spectral width of male embryos is greater than that of female embryos.

[0019] The energy density ratio is the ratio of the intensity of the fast relaxation segment to the intensity of the slow relaxation segment; the energy density ratio of male embryos is greater than that of female embryos;

[0020] The rate of spectral change is the absolute value of the slope of the T2 relaxation time spectrum on logarithmic coordinates; the rate of spectral change is greater in male embryos than in female embryos.

[0021] The spectral skewness is the normalized value of the third-order central moment, describing the left-right asymmetry of the T2 relaxation time spectrum; the spectral skewness of male embryos drifts in the negative direction, while the spectral skewness of female embryos is close to zero or slightly positive.

[0022] The spectral entropy is a measure of the uniformity of the energy distribution in the T2 relaxation time spectrum; the spectral entropy of male embryos is less than that of female embryos.

[0023] The peak sharpness describes the sharpness and abrasion of the main peak in the T2 relaxation time spectrum; the peak sharpness of male embryos is less than that of female embryos.

[0024] Furthermore, the formula for calculating the position of the main peak is as follows:

[0025] T 2p =argmax i A i

[0026] In the formula, argmax i A i Indicates that the spectral intensity A i The spectral index of the maximum value, T 2p This represents the T2 relaxation time corresponding to the maximum spectral intensity, i.e., the position of the main peak;

[0027] The formula for calculating the spectral width is:

[0028] W = max(T2) - min(T2)

[0029] In the formula, W represents the spectral width, and max(T2) and min(T2) represent the maximum and minimum relaxation times in the T2 relaxation time spectrum, respectively.

[0030] The formula for calculating the energy density ratio is:

[0031]

[0032] In the formula, E represents the ratio of the intensity of the fast relaxation segment to that of the slow relaxation segment. Indicates the fast / slow relaxation segmentation threshold. This indicates the lipid-bound water energy in the fast relaxation segment. T represents the free water energy in the slow relaxation phase. 2,i and T 2,j A represents the T2 relaxation time values ​​corresponding to the i-th and j-th spectral points in the spectrum, respectively. i and A j These represent the spectral energies of the i-th and j-th spectral points, respectively.

[0033] The formula for calculating the spectral change rate is:

[0034] ΔR i =(A i+1 -A i ) / (logT 2,i+1 -logT 2,i )

[0035] In the formula, ΔRi A represents the rate of change of the spectral value at the i-th spectral point in the T2 relaxation time spectrum. i and A i+1 T represents the spectral energy of the i-th and (i+1)-th spectral points, respectively. 2,i and T 2,i+1 These represent the T2 relaxation time values ​​corresponding to the i-th and (i+1)-th spectral points in the spectrum, respectively.

[0036] The formula for calculating the spectral skewness is:

[0037]

[0038] In the formula, Sk represents the spectral skewness, and n represents the total number of spectral points. σ and A represent the mean and standard deviation of the spectral energy, respectively. i This represents the spectral energy of the i-th spectral point;

[0039] The formula for calculating the spectral entropy is:

[0040]

[0041] In the formula, H represents spectral entropy, p i A represents normalized energy. i Let A represent the spectral energy at the i-th spectral point. k This represents the total energy of all spectral points;

[0042] The formula for calculating the peak sharpness is:

[0043]

[0044] In the formula, Kurt represents peak sharpness, n represents the total number of spectral points, and σ represents the standard deviation of spectral energy. A represents the average energy of the spectrum. i This represents the spectral energy of the i-th spectral point.

[0045] Furthermore, step S4 includes the following sub-steps:

[0046] S41. Input the high-dimensional feature vector characterizing the differences in embryonic tissue microstructure into the ensemble classification model, and output the corresponding probability distribution P. m (y|x); where y∈{male, female, uncertain} represents the gender label, and x represents the high-dimensional feature vector;

[0047] The ensemble classification model includes a support vector machine model, a random forest model, and a shallow neural network.

[0048] S42. A weighted voting fusion strategy is used to summarize the probability distributions of the outputs of the support vector machine model, random forest model, and shallow neural network to obtain the final comprehensive predicted gender label y.* ;

[0049] S43, Comprehensive prediction of gender label y * A confidence level assessment is conducted, and the comprehensive predicted sex labels that pass the confidence level assessment are output as the sex identification results of poultry eggs, serving as a reference for automated sex sorting control of poultry eggs.

[0050] Furthermore, step S3 also includes:

[0051] A disturbance compensation mechanism based on multi-sensor environmental detection is introduced to compensate for the drift of the extracted multidimensional spectroscopic features;

[0052] The formula for calculating compensation is as follows:

[0053] θ'=θ-(γ T ·ΔT+γ H ·ΔH+γ E ·ΔE)

[0054] In the formula, θ′ represents the corrected stable multidimensional spectroscopic feature, θ represents the feature before correction, and γ T γ H and γ E The coefficients represent the empirically calibrated sensitivity coefficients for temperature disturbance, humidity disturbance, and electromagnetic disturbance, respectively. ΔT, ΔH, and ΔE represent the temperature drift, humidity drift, and electromagnetic disturbance drift values, respectively.

[0055] Compared with existing non-crystallization sex detection methods such as spectroscopy and ultrasound, this invention has the following significant technical advantages and effects:

[0056] (1) Discrimination ability derived from internal tissue components: Most existing methods are based on surface transmitted light, reflected sound or imaging features, while this invention directly responds to the relaxation characteristics of proton structures such as water, lipids and proteins inside the embryo through low field nuclear magnetic resonance technology, reflecting sex differences from the microstructure and metabolic level, and has a "deep physiological mechanism level recognition ability" that is difficult to achieve by other methods.

[0057] (2) Higher recognition accuracy: By utilizing the T2 feature of transverse relaxation spectrum of nuclear magnetic resonance, it is possible to reflect the water and lipid status and tissue differences inside the embryo in depth;

[0058] (3) Enhanced stability and environmental adaptability: An environmental disturbance compensation mechanism is introduced to ensure that the system can maintain its discrimination accuracy under different incubation scenarios such as temperature, humidity and electromagnetic interference, and avoid the sensitivity of existing spectroscopic methods to eggshell thickness, light source interference and other issues.

[0059] (4) Non-destructive and non-contact testing: The entire testing process does not require breaking the shell or attaching external sensors, preserving the integrity of the embryo and effectively improving the hatching rate. Attached Figure Description

[0060] Figure 1 The flowchart of the non-destructive identification method for the sex of poultry eggs based on low-field nuclear magnetic resonance provided by the present invention is shown. Detailed Implementation

[0061] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0062] This invention provides a non-destructive method for sex identification of poultry eggs based on low-field nuclear magnetic resonance. The method obtains the relaxation response of the internal tissue of poultry eggs under a magnetic field through low-field nuclear magnetic resonance technology, constructs a sex-sensitive model by applying parameter changes in the transverse relaxation spectrum, and finally achieves sex prediction output with the help of a machine learning model.

[0063] The non-destructive method for sex determination of poultry eggs in this embodiment of the invention, such as... Figure 1 As shown, it includes the following steps:

[0064] S1. Low-field nuclear magnetic resonance equipment was used to collect echo signals from transitional poultry eggs.

[0065] S2. Using a non-negative least squares optimization model combined with Tikhonov regularization, the collected echo signals were spectral inversion was performed to reconstruct the T2 relaxation time spectrum related to the distribution of water content and tissue structure in poultry eggs.

[0066] S3. Extract multidimensional spectroscopic features associated with the sex information of poultry eggs from the T2 relaxation time spectrum to form a high-dimensional feature vector characterizing the differences in the microstructure of embryonic tissues.

[0067] S4. Input the high-dimensional feature vector into the ensemble classification model and output the sex identification results of the poultry eggs.

[0068] In step S1 of this embodiment of the invention, a low-field nuclear magnetic resonance device is used to collect echo signals from eggs in the transition period. An adaptively adjusted CPMG pulse sequence is used to dynamically set the echo interval and the number of echoes in order to improve the signal-to-noise ratio and detection efficiency.

[0069] In this embodiment, the signal-to-noise ratio and sampling time of the echo signal are evaluated in real time based on the quality of the sampled echo signal, and the optimal echo interval τ and echo number N in the echo signal acquisition process are determined by optimizing the objective function.

[0070] The objective function J(τ,N) is:

[0071] J(τ,N)=α·SNR(τ,N)-β·(τ·N)

[0072] In the formula, α and β represent the weights for measuring echo signal quality and sampling efficiency, respectively, and SNR represents the ratio of the peak value of the echo signal to the standard deviation of the background noise.

[0073] Specifically, in this embodiment, the eggs to be tested are placed in the detection area of ​​a low-field total resonance device (0.2–1T main magnetic field), maintaining a consistent sample posture. After starting the CPMG pulse sequence, echo signal S(t) is acquired, reflecting the lateral magnetization decay trajectory of the water content inside the egg in the magnetic field over time. To ensure sufficient discriminative power, the echo interval τ and echo number N are determined through the aforementioned optimized objective function. After parameter optimization, the system finally locks the sampling scheme and completes signal acquisition. This echo sequence serves as the basic raw input for subsequent spectral inversion and sex determination, and its quality directly determines the final discrimination accuracy.

[0074] In step S2 of this embodiment of the invention, the acquired echo signal is merely the raw physical quantity. To make this data interpretable, spectral inversion needs to be performed immediately to restore the time-domain information to a T2 spectral distribution that reflects differences in tissue structure, i.e., the intensity spectrum of magnetic response components at different relaxation time periods. The spectrum reflects various internal structural information such as the water binding state, viscosity, and homogeneity of the tissue.

[0075] In this embodiment, the objective function for spectral inversion of the acquired echo signal using a non-negative least squares optimization model combined with a Tikhonov regularization term is:

[0076]

[0077] In the formula, S represents the acquired echo signal vector, K represents the system response kernel, A represents the T2 relaxation time spectral coefficients, and λ represents the parameter used to control the smoothness of the spectrum. This represents the first-order gradient operator.

[0078] In step S3 of this embodiment, after obtaining the complete T2 relaxation time spectrum through the above method, it still needs to be further abstracted into numerical features before being input into the subsequent integrated classification model for learning. In the T2 relaxation time spectrum obtained by low-field nuclear magnetic resonance, any subtle changes in the dynamic balance of "water-lipid-protein" in the embryo will leave quantifiable spectral traces. Through experimental comparison of eggs from the same batch, this invention proposes seven spectral features that can stably and complementaryly map the physiological differences between males and females.

[0079] In this embodiment, multidimensional spectroscopic features associated with the sex information of poultry eggs are extracted from the T2 relaxation time spectrum, including the main peak position, spectral width, energy density ratio, spectral change rate, spectral skewness, spectral entropy, and peak sharpness.

[0080] Main peak location T 2p The relaxation time corresponding to the point of maximum relaxation amplitude in the T2 relaxation time spectrum can be regarded as the average correlation time of free water molecules, reflecting the degree of freedom of water. In male embryos, the expression levels of fatty acid synthase and acetyl-CoA carboxylase increase, and free water is relatively "liberated" in the lipid interstitial space, resulting in a prolonged rotational correlation time. Based on this, the main peak position in male embryos shifts to the left compared to female embryos, while the main peak position in female embryos remains in the short relaxation region.

[0081] The position of the main peak becomes a "peak position type" indicator to distinguish between male and female peaks. The formula for calculating the position of the main peak is:

[0082] T 2p =argmax i A i

[0083] In the formula, argmax i A i Indicates that the spectral intensity A i The spectral index of the maximum value, T 2p This represents the T2 relaxation time corresponding to the maximum spectral intensity, i.e., the position of the main peak;

[0084] The spectral width W is the range of the relaxation time distribution in the T2 relaxation time spectrum. It measures the dispersion of the relaxation components within the tissue and reflects the complexity of the components. In male embryos, the increase in lipid vacuoles and water-lipid interfaces exacerbates microscopic heterogeneity, thus widening the spectral width. In female embryos, water is bound to proteins in an orderly manner, resulting in a convergent component distribution and a narrower spectral width. Therefore, the spectral width of male embryos is greater than that of female embryos.

[0085] The spectral width, together with the main peak, characterizes the coordinated change of "position-scale". The formula for calculating the spectral width W is:

[0086] W = max(T2) - min(T2)

[0087] In the formula, W represents the spectral width, and max(T2) and min(T2) represent the maximum and minimum relaxation times in the T2 relaxation time spectrum, respectively.

[0088] The energy density ratio E is the ratio of the intensity of the fast relaxation segment to the slow relaxation segment. Specifically, the energy density ratio E divides the T2 relaxation time spectrum into a "fast region" and a "slow region" at T2 = 8 ms (after local extremum correction after acquisition). The energy ratio of the two regions is calculated. The signal in the fast region mainly comes from lipid-bound water. Therefore, fat deposition in male embryos leads to a stable increase in the energy density ratio E, while female embryos maintain a lower level. Thus, the energy density ratio of male embryos is greater than that of female embryos.

[0089] The energy density ratio E directly reflects the lipid content and is the core criterion for "energy-type" lipids. Its calculation formula is as follows:

[0090]

[0091] In the formula, E represents the ratio of the intensity of the fast relaxation segment to that of the slow relaxation segment. Indicates the fast / slow relaxation segmentation threshold. This indicates the lipid-bound water energy in the fast relaxation segment. T represents the free water energy in the slow relaxation phase. 2,i and T 2,j A represents the T2 relaxation time values ​​corresponding to the i-th and j-th spectral points in the spectrum, respectively. i and A j These represent the spectral energies of the i-th and j-th spectral points, respectively.

[0092] The spectral change rate ΔR is the absolute value of the slope of the T2 relaxation time spectrum on logarithmic coordinates, and it is extremely sensitive to the water-lipid transition point. When the male fat peak rises rapidly, the slope in this region becomes steeper, and ΔR rises; while in females, the peak is flat and the slope remains smaller. Therefore, the spectral change rate of male embryos is greater than that of female embryos.

[0093] The spectral rate of change ΔR provides "gradient-type" detail compensation, measuring the rate of change of local signals. The formula for calculating the spectral rate of change ΔR is:

[0094] ΔR i =(A i+1 -A i ) / (logT 2,i+1 -logT 2,i )

[0095] In the formula, ΔR i A represents the rate of change of the spectral value at the i-th spectral point in the T2 relaxation time spectrum. i and A i+1 T represents the spectral energy of the i-th and (i+1)-th spectral points, respectively. 2,i and T 2,i+1 These represent the T2 relaxation time values ​​corresponding to the i-th and (i+1)-th spectral points in the spectrum, respectively.

[0096] The spectral skewness Sk is the normalized value of the third-order central moment, describing the left-right asymmetry of the T2 relaxation time spectrum. The elongated tail of male free water causes Sk to drift in the negative direction; while the short and symmetrical tail of females results in Sk being close to zero or slightly positive. Therefore, the spectral skewness of male embryos drifts in the negative direction, while the spectral skewness of female embryos is close to zero or slightly positive.

[0097] The spectral skewness Sk provides "morphological" global information and can complement ΔR to suppress noise. The formula for calculating the spectral skewness Sk is:

[0098]

[0099] In the formula, Sk represents the spectral skewness, and n represents the total number of spectral points. σ and A represent the mean and standard deviation of the spectral energy, respectively. i It represents the spectral energy of the i-th spectral point, reflecting the symmetry of the spectral distribution.

[0100] The spectral entropy H measures the uniformity of energy distribution in the T2 relaxation time spectrum. In male embryos, H is significantly smaller due to the concentrated energy of the fat peak, while in female embryos, the distribution is more uniform. Therefore, the spectral entropy of male embryos is smaller than that of female embryos.

[0101] Introducing spectral entropy H improves the model's robustness to outliers; its calculation formula is as follows:

[0102]

[0103] In the formula, H represents spectral entropy, p i A represents normalized energy. i Let A represent the spectral energy at the i-th spectral point. k This represents the total energy of all spectral points.

[0104] Kurt peak sharpness describes the sharpness and abrasion of the main peak in the T2 relaxation time spectrum. The free water peak in female embryos is sharper due to protein network constraints, and Kurt peaks are higher than those in male embryos. Male peaks are blunted due to lipid filling. Therefore, the peak sharpness of male embryos is less than that of female embryos.

[0105] With peak sharpness Kurt as an additional "morphological detail" dimension, the formula for calculating false negative rate and peak sharpness is as follows:

[0106]

[0107] In the formula, Kurt represents peak sharpness, n represents the total number of spectral points, and σ represents the standard deviation of spectral energy. A represents the average energy of the spectrum. i This represents the spectral energy of the i-th spectral point.

[0108] In this embodiment, the aforementioned multidimensional relaxation spectrum features associated with the sex of poultry eggs are used to characterize the changes in the "water-lipid-protein" balance within the embryo from the perspectives of peak position, scale, energy ratio, local gradient, overall morphology, and information entropy. This forms a closed and reproducible "feature-mechanism-sex" correspondence chain, which can be effectively used as input data for sex classification models.

[0109] Step S4 in this embodiment of the invention includes the following sub-steps:

[0110] S41. Input the high-dimensional feature vector characterizing the differences in embryonic tissue microstructure into the ensemble classification model, and output the corresponding probability distribution P. m (y|x); where y∈{male, female, uncertain} represents the gender label, and x represents the high-dimensional feature vector;

[0111] The ensemble classification model includes a support vector machine (SVM) model, a random forest (RFR) model, and a shallow neural network (SNN). S42. A weighted voting fusion strategy is used to summarize the probability distributions of the outputs from the SVM model, the RFR model, and the shallow neural network to obtain the final comprehensive predicted gender label y. * ;

[0112] Among them, the comprehensive prediction of gender label y * for:

[0113]

[0114] In the formula, M=3 represents the number of models, w m The fusion weights for each model (either pre-defined or determined using a validation set), ∑w m =1;

[0115] Specifically, during the classification phase, the system outputs the gender label y based on the above calculations. * The label is either "male" or "female", indicating that the integrated classification model has made a clear sex determination based on spectral features. This determination result will serve as the input basis for subsequent confidence mechanisms and sorting control.

[0116] S43, Comprehensive prediction of gender label y * A confidence level assessment is conducted, and the comprehensive predicted sex labels that pass the confidence level assessment are output as the sex identification results of poultry eggs, which serve as a reference for automated sex sorting control of poultry eggs.

[0117] The formula for confidence level evaluation is as follows:

[0118]

[0119] In the formula, p iH(p) represents the probability value of the i-th category in the output, and H(p) represents the information entropy. If the confidence level is lower than a preset threshold, the sample is determined to be "uncertain," and the system marks the sample for manual review and does not perform automatic sorting. This confidence evaluation formula evaluates the probability value p. i Confidence assessment is performed to measure the accuracy of the model's predictions for a particular category.

[0120] In step S3 of this embodiment of the invention, in order to enhance the system's adaptability to the influence of non-ideal factors such as temperature, humidity, and electromagnetic disturbances in different production environments, step S3 of the invention further includes:

[0121] A disturbance compensation mechanism based on multi-sensor environmental detection is introduced to compensate for the drift of the extracted multidimensional spectroscopic features;

[0122] The formula for calculating compensation is as follows:

[0123] θ'=θ-(γ T ·ΔT+γ H ·ΔH+γ E ·ΔE)

[0124] In the formula, θ′ represents the corrected stable multidimensional spectroscopic feature, θ represents the feature before correction, and γ T γ H and γ E The coefficients represent the empirically calibrated sensitivity coefficients for temperature disturbance, humidity disturbance, and electromagnetic disturbance, respectively. ΔT, ΔH, and ΔE represent the temperature drift, humidity drift, and electromagnetic disturbance drift values, respectively.

[0125] The disturbance compensation mechanism provided in this embodiment significantly improves the stability and generalization performance of the model under conditions of multiple factories, multiple time periods, and multiple devices.

[0126] The poultry egg sex identification method provided in this invention is a recommended technical approach. Its key lies in converting nuclear magnetic resonance relaxation information into a structural feature input model to achieve intelligent sex determination. Any approach that adopts the "low-field nuclear magnetic resonance + spectral feature construction + model recognition" route, or any adjustments made to the method of this invention such as algorithm replacement, parameter combination, or output mechanism optimization, should be considered equivalent technical solutions within the scope of protection of this invention.

[0127] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

[0128] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.

Claims

1. A non-destructive method for sex determination of poultry eggs based on low-field nuclear magnetic resonance, characterized in that, Includes the following steps: S1. Low-field nuclear magnetic resonance equipment was used to collect echo signals from transitional poultry eggs. S2. Using a non-negative least squares optimization model combined with Tikhonov regularization, the collected echo signals were spectral inversion was performed to reconstruct the T2 relaxation time spectrum related to the distribution of water content and tissue structure in poultry eggs. S3. Extract multidimensional spectroscopic features associated with the sex information of poultry eggs from the T2 relaxation time spectrum to form a high-dimensional feature vector characterizing the differences in the microstructure of embryonic tissues. S4. Input the high-dimensional feature vector into the ensemble classification model and output the sex identification result of the poultry egg; In step S3, multidimensional spectroscopic features associated with the sex information of poultry eggs are extracted from the T2 relaxation time spectrum, including the main peak position, spectral width, energy density ratio, spectral change rate, spectral skewness, spectral entropy, and peak sharpness. The main peak position is the relaxation time corresponding to the point where the relaxation spectrum amplitude is the largest in the T2 relaxation time spectrum. The position of the main peak in male embryos shifts to the left compared to female embryos, while the position of the main peak in female embryos remains in the short relaxation region. The spectral width is the range of the relaxation time distribution in the T2 relaxation time spectrum; the spectral width of male embryos is greater than that of female embryos. The energy density ratio is the ratio of the intensity of the fast relaxation segment to the intensity of the slow relaxation segment; the energy density ratio of male embryos is greater than that of female embryos; The rate of spectral change is the absolute value of the slope of the T2 relaxation time spectrum on logarithmic coordinates; the rate of spectral change is greater in male embryos than in female embryos. The spectral skewness is the normalized value of the third-order central moment, describing the left-right asymmetry of the T2 relaxation time spectrum; the spectral skewness of male embryos drifts in the negative direction, while the spectral skewness of female embryos is close to zero or slightly positive. The spectral entropy is a measure of the uniformity of the energy distribution in the T2 relaxation time spectrum; the spectral entropy of male embryos is less than that of female embryos. The peak sharpness describes the sharpness and abrasion of the main peak in the T2 relaxation time spectrum; the peak sharpness of male embryos is less than that of female embryos. Step S4 includes the following sub-steps: S41. Input the high-dimensional feature vector characterizing the differences in embryonic tissue microstructure into the ensemble classification model, and output the corresponding probability distribution P. m (y|x); where y∈{male, female, uncertain} represents the gender label, and x represents the high-dimensional feature vector; The ensemble classification model includes a support vector machine model, a random forest model, and a shallow neural network. S42. A weighted voting fusion strategy is used to summarize the probability distributions of the outputs of the support vector machine model, random forest model, and shallow neural network to obtain the final comprehensive predicted gender label y. * ; S43, Comprehensive prediction of gender label y * A confidence level assessment is conducted, and the comprehensive predicted sex labels that pass the confidence level assessment are output as the sex identification results of poultry eggs, serving as a reference for automated sex sorting control of poultry eggs.

2. The non-destructive method for sex determination of poultry eggs based on low-field nuclear magnetic resonance according to claim 1, characterized in that, In step S1, the signal-to-noise ratio and sampling time of the echo signal are evaluated in real time based on the quality of the sampled echo signal, and the optimal echo interval τ and echo number N in the echo signal acquisition process are determined by optimizing the objective function. The optimization objective function J(τ,N) is: J(τ,N)=α·SNR(τ,N)-β·(τ·N) In the formula, α and β represent the weights for measuring echo signal quality and sampling efficiency, respectively, and SNR represents the ratio of the peak value of the echo signal to the standard deviation of the background noise.

3. The non-destructive method for sex determination of poultry eggs based on low-field nuclear magnetic resonance according to claim 2, characterized in that, In step S2, the objective function for spectral inversion of the acquired echo signal using a non-negative least squares optimization model combined with a Tikhonov regularization term is: In the formula, S represents the acquired echo signal vector, K represents the system response kernel, A represents the T2 relaxation time spectral coefficients, and λ represents the parameter used to control the smoothness of the spectrum. This represents the first-order gradient operator.

4. The non-destructive method for sex determination of poultry eggs based on low-field nuclear magnetic resonance according to claim 1, characterized in that, The formula for calculating the location of the main peak is: T 2p =argmax i A i In the formula, argmax i A i Indicates that the spectral intensity A i The spectral index of the maximum value, T 2p This represents the T2 relaxation time corresponding to the maximum spectral intensity, i.e., the position of the main peak; The formula for calculating the spectral width is: W = max(T2) - min(T2) In the formula, W represents the spectral width, and max(T2) and min(T2) represent the maximum and minimum relaxation times in the T2 relaxation time spectrum, respectively. The formula for calculating the energy density ratio is: In the formula, E represents the ratio of the intensity of the fast relaxation segment to that of the slow relaxation segment. Indicates the fast / slow relaxation segmentation threshold. This indicates the lipid-bound water energy in the fast relaxation segment. T represents the free water energy in the slow relaxation phase. 2,i and T 2,j A represents the T2 relaxation time values ​​corresponding to the i-th and j-th spectral points in the spectrum, respectively. i and A j These represent the spectral energies of the i-th and j-th spectral points, respectively. The formula for calculating the spectral change rate is: ΔR i =(A i+1 -A i ) / (logT 2,i+1 -logT 2,i ) In the formula, ΔR i A represents the rate of change of the spectral value at the i-th spectral point in the T2 relaxation time spectrum. i and A i+1 T represents the spectral energy of the i-th and (i+1)-th spectral points, respectively. 2,i and T 2,i+1 These represent the T2 relaxation time values ​​corresponding to the i-th and (i+1)-th spectral points in the spectrum, respectively. The formula for calculating the spectral skewness is: In the formula, Sk represents the spectral skewness, and n represents the total number of spectral points. σ and A represent the mean and standard deviation of the spectral energy, respectively. i This represents the spectral energy of the i-th spectral point; The formula for calculating the spectral entropy is: In the formula, H represents spectral entropy, p i A represents normalized energy. i Let A represent the spectral energy at the i-th spectral point. k This represents the total energy of all spectral points; The formula for calculating the peak sharpness is: In the formula, Kurt represents peak sharpness, n represents the total number of spectral points, and σ represents the standard deviation of spectral energy. A represents the average energy of the spectrum. i This represents the spectral energy of the i-th spectral point.

5. The non-destructive method for sex determination of poultry eggs based on low-field nuclear magnetic resonance according to claim 1, characterized in that, Step S3 further includes: A disturbance compensation mechanism based on multi-sensor environmental detection is introduced to compensate for the drift of the extracted multidimensional spectroscopic features; The formula for calculating compensation is as follows: θ'=θ-(γ T ·ΔT+γ H ·ΔH+γ E ·D.E) In the formula, θ′ represents the corrected stable multidimensional spectroscopic feature, θ represents the feature before correction, and γ T γ H and γ E The coefficients represent the empirically calibrated sensitivity coefficients for temperature disturbance, humidity disturbance, and electromagnetic disturbance, respectively. ΔT, ΔH, and ΔE represent the temperature drift, humidity drift, and electromagnetic disturbance drift values, respectively.

Citation Information

Patent Citations

  • NMR relaxation time inversion method based on unsupervised neural network

    US20230140265A1