Nondestructive sorting method and device for hatching egg fertilization information before incubation
Through spectral data preprocessing and characteristic band selection, combined with the egg classification neural network model and timing features, efficient and automated sorting of pre-hatching eggs is achieved, solving the problems of low detection accuracy and inability to sort, and reducing the cost of false detection and missed detection. .
Patent Information
- Application Number
- PCT/CN2023/132799
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-20
- Filing Date
- 2023-11-21
- Publication Date
- 2024-08-29
AI Technical Summary
The existing technology has low accuracy in detecting fertilization information of hatching eggs before hatching and cannot achieve subsequent sorting, resulting in the waste of unfertilized eggs. In addition, manual identification relies on a large amount of manpower and has a high misjudgment rate, which affects the development of hatching eggs.
Preprocessing and feature band selection based on spectral data are used to build a neural network model for egg classification, and sorting is performed based on time series features to achieve automated detection and sorting processes.
It improves detection accuracy and assembly line efficiency, reduces the cost of false detection and missed detection, realizes efficient and automated sorting of pre-hatching eggs, and reduces labor costs.
Smart Images

Figure CN2023132799_29082024_PF_FP_ABST
Abstract
Description
A method and device for non-destructive sorting of fertilization information of hatching eggs before hatching Technical Field
[0001] The present invention relates to the field of pre-hatching breeding egg sorting, and in particular to a method and device for lossless sorting of fertilization information of pre-hatching breeding eggs. Background Art
[0002] Information non-destructive testing methods and subsequent sorting equipment. For poultry farming companies, egg incubation is the first step in the entire industry. Due to limitations in the production environment and poultry breed, under natural conditions, Peking ducks require two matings to achieve a 90% fertilization rate (Yang Fangxi, Relationship between Peking Duck Mating Behavior and Fertility Rate); the average fertilization rate of Nandan Yao chickens is 92.59% (Zhang Zhen, Experiment on Fertility Rate of Nandan Yao Chicken Eggs at Different Times After Two Days of Continuous Insemination). Therefore, 10% of unfertilized eggs are left during incubation. These eggs not only take up incubation space and waste incubation resources, but may also spoil and become smelly during incubation. Spoiled unfertilized eggs are prone to rupture and harbor bacteria, which in turn affect fertilized eggs, leading to contamination. Furthermore, after incubation, these unfertilized eggs are wasted because they are no longer edible. In recent years, the primary method for removing infertile eggs in my country's poultry industry has been manual candling, which relies on frontline workers to visually remove infertile eggs. However, for large-scale farms, a single batch of hatching eggs can easily reach tens of thousands. Relying on manual identification of infertile eggs requires a significant amount of manpower. Furthermore, manual methods are highly subjective and prone to misjudgment and omission. Furthermore, worker wages are a significant burden for the company. Furthermore, prolonged testing times can affect embryonic development within the eggs.
[0003] To address the aforementioned issues, researchers both domestically and internationally have conducted extensive research and designed methods and devices for identifying infertile hatching eggs, but these methods all present certain challenges. Existing technologies use computer vision and deep learning to detect infertile eggs. However, computer vision technology can only accurately distinguish fertile and infertile eggs after hatching. Because infertile eggs deteriorate rapidly in the incubation environment, even if they are identified after hatching, they cannot be released to the market, resulting in these eggs being wasted. Existing technologies use X-ray devices to detect hatching egg viability, similar to computer vision technology, except that X-rays require a longer embryonic development period before detection. Existing technologies use fiber optic spectroscopy to detect infertile eggs. After collecting spectral data, convolutional neural networks are used to model and determine the fertility of the eggs. While this device and method can detect fertility in hatching duck eggs before hatching, it does not preprocess the spectral data after acquisition and uses only 11 characteristic wavelengths, discarding some data containing fertilization information. While achieving good detection results, the model's accuracy could be further improved. At the same time, the device only has a detection part and no subsequent sorting process, so it cannot be applied to industrial production.
[0004] Summary of the Invention
[0005] In response to the above-mentioned deficiencies in the prior art, the present invention provides a method and device for non-destructive sorting of fertilization information of hatching eggs before incubation, which solves the problems of low accuracy in detecting fertilization information of hatching eggs and inability to subsequently sort fertilized eggs and unfertilized eggs.
[0006] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0007] A method for non-destructive sorting of fertilization information of hatching eggs before incubation, comprising the following steps:
[0008] S1, obtaining a first time series feature of the hatching eggs and collecting spectral data of the hatching eggs according to the first time series feature;
[0009] S2, preprocessing the spectral data in step S1;
[0010] S3, selecting the spectral data preprocessed in step S2 to obtain a characteristic band;
[0011] S4, building a neural network model for egg classification and training it;
[0012] S5, using the egg classification neural network model trained in step S4, classifying the egg information according to the characteristic bands in step S3 to obtain fertilization information;
[0013] S6. Obtain the second time series feature of the breeding eggs, and sort the breeding eggs according to the second time series feature, the first time series feature in step S1, and the fertilization information obtained in step S5.
[0014] Furthermore, step S2 includes the following sub-steps:
[0015] S21, performing standard normal variable transformation on the spectral data;
[0016] S22, processing the spectral data obtained in step S21 after the standard normal variable transformation using a linear filtering algorithm.
[0017] Furthermore, step S21 includes the following sub-steps:
[0018] S211, calculate the average value of the spectral data in step S1, expressed as:
[0019] in: is the average value of a spectrum data, x is a spectrum data, m is the number of wavelength points, k = 1, 2, ..., m;
[0020] S212, performing standard normal variable transformation on the spectral data according to the average value of the spectral data in sub-step S211, expressed as:
[0021] Where: x snv is the data after a spectrum data is transformed by standard normal variable.
[0022] Furthermore, step S22 includes the following sub-steps:
[0023] S221, determining the filter window size using a linear filtering algorithm;
[0024] S222, using the filter window in the smoothing step S221, shifting the spectral data obtained in step S21 after the standard normal variable transformation, fitting the spectral data in the window and outputting the fitted data, expressed as:
[0025] in: is the value after fitting the spectral data, x snv(k+i) is the spectral data after standard normal variable transformation, k is the spectral band position, and 2w+1 is the window size.
[0026] Furthermore, step S3 includes the following sub-steps:
[0027] S31, using bootstrap sampling and weighted bootstrap sampling to extract bands from spectral data to build and save sub-models;
[0028] S32, calculating the prediction error of the sub-model;
[0029] S33, calculating the regression coefficient of the sub-model according to the prediction error;
[0030] S34, assigning weights to the bands in the sub-model according to the regression coefficients to obtain band weights;
[0031] S35, extracting the bands of the sub-model according to the band weights, and constructing and saving the next sub-model;
[0032] S36, judging whether the sub-model in step S35 is a band; if so, proceeding to step S37, otherwise jumping to step S32;
[0033] S37 , cross-validating the root mean square error of the sub-model saved in sub-step S31 and the sub-model saved in sub-step S36 , selecting the sub-model with the smallest root mean square error, and determining the band in the subset as the characteristic band.
[0034] Furthermore, in step S4, the breeding egg classification neural network model includes a position encoding layer, three encoding layers, a linear layer and a logical classification layer. The position encoding layer performs position encoding on the characteristic band according to the band position of the characteristic band in the original spectrum. The three encoding layers are used to first increase the dimension and then reduce the dimension of the input characteristic band with position information, and perform information fusion on the input characteristic band with position information. The linear layer is used to linearly change the characteristic band after information fusion output by the three encoding layers, and output the characteristic band of specified dimension. The logical classification layer is used to classify the characteristic band of specified dimension output by the linear layer.
[0035] Furthermore, step S6 includes the following sub-steps:
[0036] S61, obtaining a second time series feature of the hatching egg;
[0037] S62, according to the second time sequence feature in step S61 and the first time sequence feature in step S1, matching the eggs to be sorted with their self-fertilization information;
[0038] S63. Determine whether the fertilization information of the eggs to be sorted is fertilized; if so, do not perform the egg culling operation; otherwise, perform the egg culling operation.
[0039] A non-destructive sorting device for pre-hatching fertilization information of hatching eggs applied to the above method comprises:
[0040] A sensor module, comprising a first position sensor, an integrator, and a second position sensor. The first position sensor is used to collect a first time series feature of the hatching egg and transmit it to the core processing module. The integrator is used to receive an acquisition instruction from the core processing module to collect spectral information of the hatching egg and transmit it to the detection device module via an optical fiber. The second position sensor is used to collect a second time series feature of the hatching egg and transmit it to the core processing module.
[0041] A motor module, wherein the motor module includes an input conveyor belt motor, a fertilized egg output conveyor belt motor, and a clean egg output conveyor belt motor. The input conveyor belt motor is used to receive a first instruction from the core processing module and send the eggs into the sensor module to collect spectral information of the eggs. The fertilized egg output conveyor belt motor is used to receive a second instruction from the core processing module and send the fertilized eggs to the fertilized egg area. The clean egg output conveyor belt motor is used to receive a third transmission instruction from the core processing module and send the clean egg to the clean egg area.
[0042] A detection device module, comprising a near-infrared spectrometer, a halogen lamp light source, and a display screen. The near-infrared spectrometer is used to receive spectral information transmitted by the sensor module, generate spectral data, and transmit the spectral data to the core processing module. The halogen lamp light source is used to provide a transmitted light source. The display screen is used to display the working status of the entire device.
[0043] a core processing module, the core processing module being configured to receive the first and second timing features collected by the sensor module, generate a first instruction based on the first timing feature and transmit the instruction to the motor module, generate an acquisition instruction based on the first timing feature and transmit the instruction to the integrator in the sensor module and the near-infrared spectrometer in the detection device module, generate a second instruction or a third instruction based on the second timing feature and transmit the instruction to the motor module, receive spectral data generated by the detection device module, obtain fertilization information based on the first and second timing features and the spectral data, and send a fourth instruction to control the egg culling device;
[0044] The egg picking device is used to receive the fourth instruction of the core processing module and send the infertile eggs into the motor module and send the infertile eggs out of the conveyor belt according to the fourth instruction.
[0045] The beneficial effects of the present invention are:
[0046] (1) The present invention adopts a method for collecting spectral data of fertilized eggs based on a linear filtering algorithm, which solves the problems of difficulty in collecting spectral data in industrial environments and the problems of original spectral data signal offset and light scattering;
[0047] (2) The present invention adopts a method for detecting fertilization information of hatching eggs before incubation based on the spectral feature fusion of the hatching egg classification neural network model. By selecting characteristic bands, the amount of spectral data is reduced and the detection speed of the detection model is improved. In addition, the present invention adopts the hatching egg classification neural network model to improve the detection accuracy of the model. By coordinating the wavelength selection algorithm with the hatching egg classification neural network model, the working efficiency of the entire production line is improved and the cost of false detection and missed detection is reduced.
[0048] (3) The present invention combines the timing information of the hatching eggs on the production line and can complete the entire process from detection to sorting of the hatching eggs before hatching, solving the problem of only detection without sorting in the past;
[0049] (4) The present invention adopts a flow-line sorting strategy based on timing control. Through the coordination of the spectral system and the detection algorithm, the entire detection, classification, and selection process can be automated, greatly reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] FIG1 is a flow chart of a method for non-destructive sorting of fertilization information of pre-hatched eggs;
[0051] Figure 2 is a structural diagram of a neural network model for egg classification;
[0052] FIG3 is a control logic diagram of a device for non-destructive sorting of fertilization information of pre-hatched eggs. DETAILED DESCRIPTION
[0053] The specific embodiments of the present invention are described below to facilitate understanding of the present invention by those skilled in the art. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations utilizing the concepts of the present invention are protected.
[0054] As shown in FIG1 , a method for non-destructive sorting of fertilization information of pre-hatched eggs includes steps S1-S6:
[0055] S1. Obtain a first time series feature of a breeding egg and collect spectral data of the breeding egg according to the first time series feature.
[0056] In an optional embodiment of the present invention, a conveyor belt transports the breeding eggs to the area where the first position sensor is located. The first position sensor collects the first time series characteristics of the breeding eggs and transmits them to the core processing module. The core processing module receives the first time series characteristics and generates a first instruction and an acquisition instruction. The conveyor belt receives the first instruction and transports the breeding eggs to the area where the integrator of the sensor module is located. The integrator and the near-infrared spectrometer in the detection device module receive the acquisition instruction and start up. The integrator collects the spectral information of the breeding eggs and transmits it to the detection device module via optical fiber to generate spectral data. The detection device module transmits the collected and generated spectral data to the core processing module.
[0057] Specifically, when the egg moves in front of the integrator, the integrator collects 15 spectral data continuously with an integration time of 0.005 seconds. The first and last five spectral data are saturated, so they are discarded and the middle five spectral data are averaged to obtain the desired spectral information.
[0058] S2. Preprocess the spectral data in step S1.
[0059] In an optional embodiment of the present invention, after acquiring the spectral data, the core processing module uses standard normal variables and smoothing to perform preprocessing to denoise the spectral data to eliminate signal offset and light scattering in the original spectrum.
[0060] Step S2 includes the following sub-steps:
[0061] S21. Perform standard normal variable transformation on the spectral data.
[0062] Step S21 includes the following sub-steps:
[0063] S211, calculate the average value of the spectral data in step S1, expressed as:
[0064] in: is the average value of a spectrum data, x is a spectrum data, m is the number of wavelength points, k = 1, 2, ..., m.
[0065] S212, performing standard normal variable transformation on the spectral data according to the average value of the spectral data in sub-step S211, expressed as:
[0066] Where: x snv is the data after a spectrum data is transformed by standard normal variable.
[0067] S22, processing the spectral data obtained in step S21 after the standard normal variable transformation using a linear filtering algorithm.
[0068] Step S22 includes the following sub-steps:
[0069] S221, determining the filter window size using a linear filtering algorithm;
[0070] S222, using the filter window in the smoothing step S221, shifting the spectral data obtained in step S21 after the standard normal variable transformation, fitting the spectral data in the window and outputting the fitted data, expressed as:
[0071] in: is the value after fitting the spectral data, x snv(k+i) is the spectral data after standard normal variable transformation, k is the spectral band position, and 2w+1 is the window size.
[0072] S3. Select the spectral data preprocessed in step S2 to obtain characteristic bands.
[0073] In an optional embodiment of the present invention, after preprocessing the spectral data of the breeding eggs, the present invention uses a characteristic wavelength selection algorithm to select the preprocessed spectral data to obtain a characteristic band.
[0074] Step S3 includes the following sub-steps:
[0075] S31. Use bootstrap sampling and weighted bootstrap sampling to extract bands from spectral data to build and save sub-models.
[0076] S32. Calculate the prediction error of the sub-model.
[0077] S33. Calculate the regression coefficient of the sub-model based on the prediction error.
[0078] S34. Assign weights to the bands in the sub-model according to the regression coefficients to obtain band weights.
[0079] S35. Extract the bands of the sub-model according to the band weights, and construct and save the next sub-model.
[0080] S36, judging whether the sub-model in sub-step S35 is a band; if so, proceeding to sub-step S37, otherwise jumping to sub-step S32.
[0081] S37 , cross-validating the root mean square error of the sub-model saved in sub-step S31 and the sub-model saved in sub-step S36 , selecting the sub-model with the smallest root mean square error, and determining the band in the subset as the characteristic band.
[0082] S4. Build a neural network model for egg classification and train it.
[0083] As shown in Figure 2, the egg classification neural network model includes a position encoding layer, three encoding layers, a linear layer and a logical classification layer. The position encoding layer performs position encoding on the feature band according to the band position of the feature band in the original spectrum. The three encoding layers are located in the Transformer encoder, which is used to first increase the dimension and then reduce the dimension of the input feature band with position information, and perform information fusion on the input feature band with position information. The linear layer is located in the MLP head layer, which is used to linearly change the feature band after the information fusion output by the three encoding layers, and output the feature band of the specified dimension. The logical classification layer is a Softmax layer, which is used to classify the feature band of the specified dimension output by the linear layer.
[0084] In an optional embodiment of the present invention, since the spectral data is one-dimensional, ordinary convolution needs to convert the one-dimensional data into two-dimensional data through matrix transformation, or use a one-dimensional convolution kernel. However, this will change the structure of the original information, resulting in the position information of the spectrum not being paid attention to, thereby losing some information, and resulting in insufficient detection accuracy.
[0085] The egg classification neural network model adopted by the present invention has already used a characteristic wavelength selection algorithm to perform pre-processing of characteristic band selection, so that the parameter dimension is only 68 dimensions, which is not much, and thus will not cause parameter explosion.
[0086] At the same time, the present invention uses a position encoding layer to emphasize the position information of the spectral data, so that the selected characteristic bands have accurate position information, thereby improving the accuracy and robustness of the neural network model for egg classification. Since the traditional Transformer network uses a set of continuous values to record the positional relationship of the input data, the band position information of the spectral data is lost. In order to characterize the position information between the characteristic spectra, the present invention uses the band position of the characteristic band in the original spectrum as the position encoding of the spectral data. The first position encoding is Class Token, which is used to represent the global information of the spectrum. The position of this code is 0, and its value is 0. It is continuously updated as the network is trained. The update process is a back-propagation process. Starting from the output layer, the error corrects the weights of each layer according to the gradient descent method, and propagates forward in sequence.
[0087] Specifically, in the early stages of the present invention, a large-scale egg data set was required to train the egg classification neural network model. Therefore, the present invention first collected more than 2,000 egg spectral data to construct a data set for training the network. After manual classification, the eggs were divided into unfertilized eggs and fertilized eggs. Finally, based on the error calculated by the cross entropy loss function of the egg classification neural network model, it was back-propagated to update the network parameters. The formula of the loss function is as follows:
[0088] Where: n is the number of training rounds, C is the number of predicted categories, y i,j is the true label of the i-th sample in the j-th category, p i,j is the predicted probability of the i-th sample for the j-th class.
[0089] The dataset is divided into training set, test set and validation set in a 3:1:1 ratio.
[0090] S5. Using the breeding egg classification neural network model trained in step S4, the breeding egg information is classified according to the characteristic bands in step S3 to obtain fertilization information.
[0091] S6. Obtain the second time series feature of the breeding eggs, and sort the breeding eggs according to the second time series feature, the first time series feature in step S1, and the fertilization information obtained in step S5.
[0092] In an optional embodiment of the present invention, when the core processing module acquires the first time series feature of a hatching egg, it obtains the timestamp of the hatching egg passing the first position sensor and simultaneously marks the hatching egg as the Nth egg to pass the first position sensor. The core processing module then calculates the timestamp of the hatching egg's arrival at the second position sensor based on the conveyor belt speed. When the hatching egg passes the second position sensor, the core processing module compares the egg's position with the Nth egg to pass the second position sensor and the current timestamp. These two pieces of information confirm the hatching egg's location and associate the hatching egg's fertilization information with the time series information.
[0093] The core processing module generates a fourth instruction based on the first and second timing characteristics and the fertilization information of the hatching eggs. Based on the fourth instruction, the core processing module controls the egg removal device to move clean eggs onto the clean egg delivery conveyor and fertilized eggs onto the fertilized egg delivery conveyor. Based on the second timing characteristics, the core processing module generates either a second instruction or a third instruction. If the second instruction is generated, the core processing module controls the motor of the fertilized egg delivery conveyor to move the fertilized eggs to the fertilized egg area using the second instruction. If the third instruction is generated, the core processing module controls the motor of the clean egg delivery conveyor to move the clean eggs to the clean egg area using the third instruction.
[0094] Step S6 includes the following sub-steps:
[0095] S61. Obtain a second time series feature of the hatching eggs.
[0096] The conveyor belt conveys the hatching eggs to the area where the second position sensor is located. The second position sensor collects the second time series characteristics of the hatching eggs and transmits them to the core processing module.
[0097] S62. According to the second time sequence feature in step S61 and the first time sequence feature in step S1, the eggs to be sorted are matched with their self-fertilization information.
[0098] S63. Determine whether the fertilization information of the eggs to be sorted is fertilized; if so, do not perform the egg culling operation; otherwise, perform the egg culling operation.
[0099] When the egg reaches the second position sensor, the core processing module transmits a fourth instruction to the egg removal device based on the egg's first and second timing characteristics and fertilization information. If the egg is a clean egg, the removal device is activated, raising the horizontal bar, and the egg flows out of the clean egg conveyor. If the egg is fertile, the removal device is not activated, and the egg flows out of the fertile egg conveyor.
[0100] As shown in FIG3 , a non-destructive sorting device for pre-hatching fertilization information of hatching eggs applied to the above method includes a sensor module, a motor module, a detection device module, a core processing module, and an egg removal device, specifically as follows:
[0101] The sensor module includes a first position sensor, an integrator and a second position sensor. The first position sensor is used to collect the first time series characteristics of the breeding eggs and transmit them to the core processing module. The integrator is used to receive the collection instructions of the core processing module to collect the spectral information of the breeding eggs and transmit it to the detection device module through optical fiber. The second position sensor is used to collect the second time series characteristics of the breeding eggs and transmit them to the core processing module.
[0102] In an optional embodiment of the present invention, when the integrator collects spectral information, the present invention should avoid interference from external light and needs to keep the spectral information collection space in a light-free condition.
[0103] The conveyor belt conveys the hatching eggs to the area where the first position sensor is located. The first position sensor collects the first time series characteristics of the hatching eggs and transmits them to the core processing module.
[0104] The conveyor belt transports the eggs to the integrator area. The integrator collects the spectral information of the eggs and transmits it to the detection device module via optical fiber.
[0105] The conveyor belt conveys the hatching eggs to the area where the second position sensor is located. The second position sensor collects the second time series characteristics of the hatching eggs and transmits them to the core processing module.
[0106] The motor module includes an input conveyor belt motor, a fertilized egg output conveyor belt motor and an unfertilized egg output conveyor belt motor. The input conveyor belt motor is used to receive the first instruction of the core processing module and send the breeding eggs into the sensor module to collect spectral information of the breeding eggs. The fertilized egg output conveyor belt motor is used to receive the second instruction of the core processing module and send the fertilized eggs to the fertilized egg area. The unfertilized egg output conveyor belt motor is used to receive the third transmission instruction of the core processing module and send the unfertilized eggs to the unfertilized egg area.
[0107] In an optional embodiment, the conveyor belt is encased in a light-tight stainless steel casing, with the opening of the casing aligning with the edges of the light source and optical fiber to prevent light leakage. To ensure that no external light leaks into the spectral information collection space while the conveyor belt is in operation, two layers of light-tight rubber curtains are designed in front and behind the conveyor belt to minimize interference with detection results. Furthermore, the conveyor belt is equipped with a stopper to ensure that the eggs are fixed in a fixed position.
[0108] The detection device module includes a near-infrared spectrometer, a halogen lamp light source and a display screen. The near-infrared spectrometer is used to receive the spectral information transmitted by the sensor module, generate spectral data and transmit it to the core processing module. The halogen lamp light source is used to provide a transmitted light source. The display screen is used to display the working status of the entire device.
[0109] In an optional embodiment of the present invention, a near-infrared spectrometer in the detection device module is powered on upon receiving an acquisition instruction transmitted by the core processing module. The near-infrared spectrometer is connected to an integrator in the sensor module via an optical fiber. The integrator transmits the acquired spectral information to the near-infrared spectrometer via the optical fiber to generate spectral data. The near-infrared spectrometer then transmits the spectral data to the core processing module.
[0110] A core processing module is configured to receive the first timing feature and the second timing feature collected by the sensor module, generate a first instruction based on the first timing feature and transmit the instruction to the motor module, generate an acquisition instruction based on the first timing feature and transmit the instruction to the integrator in the sensor module and the near-infrared spectrometer in the detection device module, generate a second instruction or a third instruction based on the second timing feature and transmit the instruction to the motor module, receive spectral data generated by the detection device module, obtain fertilization information based on the first timing feature, the second timing feature and the spectral data, and send a fourth instruction to control the egg picking device.
[0111] The egg picking device is used to receive the fourth instruction of the core processing module and send the infertile eggs into the motor module and send the infertile eggs out of the conveyor belt according to the fourth instruction.
[0112] In an optional embodiment of the present invention, when the egg picking device executes the fourth instruction of the core processing module, if the breeding egg is a fertilized egg, no operation is performed; if it is an unfertilized egg, the egg picking device lifts the horizontal bar and bounces the unfertilized egg into the unfertilized egg out conveyor belt.
[0113] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and it should be understood that the scope of protection of the present invention is not limited to such specific descriptions and embodiments. Those skilled in the art can make various other specific variations and combinations based on the technical teachings disclosed in the present invention without departing from the essence of the present invention, and such variations and combinations are still within the scope of protection of the present invention.
Claims
1. A method for lossless sorting of fertilization information of pre-hatched eggs, characterized in that: The following steps are involved: S1, obtaining a first time series feature of the breeding eggs and collecting spectral data of the breeding eggs according to the first time series feature; S2, preprocessing the spectral data in step S1; S3, selecting the spectral data preprocessed in step S2 to obtain a characteristic band; S4, constructing a neural network model for egg classification and training it; S5, using the egg classification neural network model trained in step S4, classifying the egg information according to the characteristic bands in step S3 to obtain fertilization information; S6. Obtain the second time series feature of the breeding eggs, and sort the breeding eggs according to the second time series feature, the first time series feature in step S1, and the fertilization information obtained in step S5.
2. A method for non-destructive sorting of fertilization information of pre-hatched eggs according to claim 1, characterized in that: Step S2 includes the following sub-steps: S21, performing standard normal variable transformation processing on the spectral data; S22, the spectral data obtained in step S21 after the standard normal variable transformation is processed by using a linear filtering algorithm for processing.
3. A method for non-destructive sorting of fertilization information of pre-hatched eggs according to claim 2, characterized in that: Step S21 includes the following sub-steps: S211, calculating the average value of the spectral data in step S1, expressed as: in: is the average value of a spectrum data, x is a spectrum data, m is the number of wavelength points, k = 1, 2, ..., m; S212, performing standard normal variable transformation processing on the spectral data according to the average value of the spectral data in sub-step S211, expressed as: Where: x snv It is the data after a spectrum data is transformed by standard normal variable.
4. A method for non-destructive sorting of fertilization information of pre-hatched eggs according to claim 2, characterized in that: Step S22 includes the following sub-steps: S221, determining the filter window size using a linear filtering algorithm; S222, using the filtering window in the smoothing step S221, shifting the spectral data after the standard normal variable transformation obtained in step S21, fitting the spectral data in the window and outputting the fitted data, expressed as: in: is the value after fitting the spectral data, x snv (k+i) is the spectral data after being transformed by the standard normal variable, k is the spectral band position, and 2w+1 is the window size.
5. The method for non-destructive sorting of fertilization information of pre-hatched eggs according to claim 1, characterized in that: Step S3 includes the following sub-steps: S31, using bootstrap sampling and weighted bootstrap sampling to extract bands from spectral data to build and save sub-models; S32, calculating the prediction error of the sub-model; S33, calculating the regression coefficient of the sub-model according to the prediction error; S34, weighting the bands in the sub-model according to the regression coefficient to obtain the band weights; S35, extracting the bands of the sub-model according to the band weights, and constructing and saving the next sub-model; S36, judging whether the sub-model in step S35 is a band; if so, proceeding to step S37, Otherwise jump to sub-step S32; S37, cross-validating the root mean square error of the sub-model saved in sub-step S31 and the sub-model saved in sub-step S36, selecting the sub-model with the smallest root mean square error, and determining the band in the subset as the characteristic band.
6. A method for non-destructive sorting of fertilization information of pre-hatched eggs according to claim 1, characterized in that: In step S4, the breeding egg classification neural network model includes a position encoding layer, three encoding layers, a linear layer and a logical classification layer. The position encoding layer performs position encoding on the characteristic bands according to the band positions of the characteristic bands in the original spectrum. The three encoding layers are used to first increase the dimension and then reduce the dimension of the input characteristic bands with position information, and perform information fusion on the input characteristic bands with position information. The linear layer is used to perform linear changes on the characteristic bands after information fusion output by the three encoding layers, and output characteristic bands of specified dimensions. The logical classification layer is used to classify the characteristic bands of specified dimensions output by the linear layer.
7. A method for non-destructive sorting of fertilization information of pre-hatched eggs according to claim 1, characterized in that: Step S6 includes the following sub-steps: S61, obtaining a second time series feature of the breeding eggs; S62, according to the second time sequence feature in step S61 and the first time sequence feature in step S1, matching the eggs to be sorted with their self-fertilization information; S63, judging whether the fertilization information of the eggs to be sorted is fertilized; if so, no egg picking operation is performed, otherwise, an egg picking operation is performed.
8. A device for non-destructive sorting of fertilization information of pre-hatched eggs using the method described in any one of claims 1 to 7, characterized in that: include: The sensor module includes a first position sensor, an integrator and a second position sensor. The first position sensor is used to collect the first time series characteristics of the breeding eggs and transmit them to the core processing module. The integrator is used to receive the collection instruction of the core processing module to collect the spectral information of the breeding eggs and transmit it to the detection device module through the optical fiber, and the second position sensor is used to collect the second time series characteristics of the breeding eggs and transmit it to the core processing module; A motor module, wherein the motor module comprises an input conveyor belt motor, a fertilized egg output conveyor belt motor and an unfertilized egg output conveyor belt motor, wherein the input conveyor belt motor is used to receive a first instruction from a core processing module and to send the breeding eggs into a sensor module to collect spectral information of the breeding eggs, the fertilized egg output conveyor belt motor is used to receive a second instruction from the core processing module and to send the fertilized eggs to a fertilized egg area, and the unfertilized egg output conveyor belt motor is used to receive a third transmission instruction from the core processing module and to send the unfertilized eggs to the unfertilized egg area; A detection device module, the detection device module includes a near-infrared spectrometer, a halogen lamp light source and a display screen, the near-infrared spectrometer is used to receive the spectral information transmitted by the sensor module to generate spectral data and transmit it to the core processing module, the halogen lamp light source is used to provide a transmitted light source, and the display screen is used to display the working status of the entire device; A core processing module, the core processing module is used to receive the first timing feature and the second timing feature collected by the sensor module, generate a first instruction according to the first timing feature and transmit it to the motor module, generate a collection instruction according to the first timing feature and transmit it to the integrator in the sensor module and the near-infrared spectrometer in the detection device module, generate a second instruction or a third instruction according to the second timing feature and transmit it to the motor module, receive the spectrum data generated by the detection device module, use the method described in any one of claims 1 to 7, obtain fertilization information according to the first timing feature, the second timing feature and the spectrum data, and send a fourth instruction to control the egg removal device; The egg picking device is used to receive the fourth instruction of the core processing module and send the infertile eggs into the motor module and send the infertile eggs out of the conveyor belt according to the fourth instruction.
Citation Information
Patent Citations
Intelligent waste metal sorting system and method based on optical fiber laser
CN110548697A
Method and system for monitoring egg laying performance of laying hen zone of cage-rearing laying hens
CN111134047A
Optical fiber spectrum grading detection device and method for fertilized eggs in pre-incubation duck eggs
CN111802281A
Transform neural network-based small sample structure fault diagnosis method
CN115511063A
Method and device for lossless sorting of fertilization information of hatching eggs before hatching
CN115812634A
