Egg crack detection method based on sound wave signals

By collecting sound waves and mechanical vibration signals on the surface of the egg, and using Fourier transform and logistic regression models to identify and filter out noise interference, the problem of noise interference in sound wave detection is solved, and the precise detection of egg cracks is achieved.

CN120294174AActive Publication Date: 2025-07-11XIAN GERUN HUSBANDRY CO LTD

Patent Information

Application Number
CN202510781637.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-07-11
Estimated Expiration
2045-06-12

AI Technical Summary

Technical Problem

The existing acoustic wave detection technology is disturbed by multi-channel noise in egg crack detection, resulting in a decrease in signal-to-noise ratio. Traditional filtering methods are prone to accidentally filtering effective signals when removing noise, reducing detection accuracy.

Method used

By obtaining the acoustic wave signals and environmental mechanical vibration signals at multiple preset positions on the egg surface, the main frequency is extracted using Fourier transform, the influencing factors of frequency and amplitude difference is calculated, and the mechanical vibration noise interference is filtered out in combination with the logistic regression model, and crack detection is used using the remaining signals.

Benefits of technology

Accurate identification and filtering of mechanical vibration noise is achieved, ensuring the accuracy and completeness of crack detection on egg surfaces and avoiding misjudgment problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120294174A_ABST
    Figure CN120294174A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to an egg crack detection method based on a sound wave signal, and the method comprises the following steps: obtaining a sound wave signal on the surface of an egg and a mechanical vibration signal of a surrounding environment, and obtaining a sound wave signal on the surface of the egg based on the frequency difference and amplitude difference between each frequency and a main frequency in a frequency domain signal of the mechanical vibration signal; determining a first index of each frequency, calculating an average difference between every two amplitude values of all the sound wave signals at the same frequency to obtain a second index of each frequency, and based on the first index and the second index, classifying whether the sound wave signals at each frequency are interfered by mechanical vibration noise by using a logistic regression model. And sound wave signals which are interfered by mechanical vibration noise in a classification result are removed, and whether cracks exist on the surface of the egg or not is judged by utilizing the residual sound wave signals through a pre-trained crack detection model. According to the invention, accurate detection of cracks on the surface of the egg can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing. More specifically, the present invention relates to a method for detecting egg cracks based on acoustic wave signals. Background Art

[0002] Egg cracks are usually caused by the following factors: external forces, temperature changes, improper storage, and the natural fragility of the eggshell itself. To improve the detection efficiency, acoustic wave detection technology is widely used. This technology utilizes the reflection and propagation characteristics of acoustic waves to accurately identify tiny cracks on the eggshell. Compared with traditional manual inspection methods, acoustic wave detection technology greatly improves the detection efficiency and ensures the quality and safety of eggs.

[0003] However, when acoustic waves encounter cracks, reflection and scattering occur, resulting in changes in the acoustic wave signals. Acoustic wave signals on the eggshell surface are collected through multiple acoustic wave probes (sensors). When analyzing the acoustic wave signals on the eggshell surface collected by multiple acoustic wave probes (sensors), due to various noise sources in the egg processing environment, such as mechanical vibrations and equipment operation sounds. The noise will reduce the signal-to-noise ratio (SNR) of the collected acoustic wave signals. A decrease in the signal-to-noise ratio will cause the characteristics of the signal (such as reflections and scattering caused by cracks) to be submerged in the noise and be difficult to identify.

[0004] In related technologies, when dealing with noise in acoustic wave signals, traditional methods usually choose to use filtering techniques. However, since multiple channels are used for collecting acoustic wave signals, and filtering techniques are more suitable for single-channel signal processing, in the case of multiple channels, the effect of filtering techniques is limited. In addition, when the frequency bands of noise and crack signals overlap, traditional filtering methods may filter out both noise and valid signals at the same time, resulting in the inability to completely remove noise. This will not only remove some useful acoustic wave signals but also retain some unwanted noise signals, thereby reducing the accuracy of crack detection. Summary of the Invention

[0005] To overcome the influence of noise interference on the accuracy of detecting egg surface cracks based on acoustic wave signals, the present invention provides a method for detecting egg cracks based on acoustic wave signals. The method includes: Obtaining acoustic wave signals at multiple preset positions on the egg surface and mechanical vibration signals of the surrounding environment; Performing a Fourier transform on the mechanical vibration signals, extracting the main frequency of the obtained frequency-domain signals, and calculating the influence factor of each frequency based on the frequency difference and amplitude difference between each frequency and the main frequency in the frequency-domain signals. The influence factor is negatively correlated with both the frequency difference and amplitude difference between the corresponding frequency and the main frequency; Take the influence factors of each frequency as the first indicators of each frequency, calculate the average difference between the amplitude values of all acoustic signals at the same frequency in pairs, obtain the second indicators of each frequency, and input the first indicators and second indicators of each frequency into a pre-trained logistic regression model to output the classification results of whether the acoustic signals of each frequency are interfered by mechanical vibration noise; Remove the acoustic signals whose classification results are interfered by mechanical vibration noise, and use the remaining acoustic signals to pass through a pre-trained crack detection model to determine whether there are cracks on the egg surface.

[0006] The present invention measures the interference of acoustic signals by noise from the perspective of frequency band overlap by collecting the frequency domain characteristics of environmental mechanical vibration signals and calculating the first indicators of each frequency; at the same time, combined with the amplitude difference characteristics of acoustic signals at multiple preset positions, calculate the second indicators of each frequency, and measure the influence of acoustic signals by mechanical vibration from the perspective of signal similarity. Based on the first indicator and the second indicator, a logistic regression model can accurately identify and filter out the mechanical vibration noise interference frequency, so that based on the remaining acoustic signals, accurate detection of cracks on the egg surface can be realized.

[0007] Preferably, the method for obtaining the main frequency in the frequency domain signal includes: Construct a spectrogram of the frequency domain signal and obtain all the peaks in the spectrogram. If the ratio of any peak to the sum of all peaks is greater than or equal to a preset value, then use the ratio as the probability that the frequency corresponding to the any peak is the main frequency; If it is less than the preset value, obtain the maximum value among the remaining peaks, and judge whether the difference between the any peak and the maximum value is greater than zero. If it is greater than zero, then use the ratio of the difference between the any peak and the maximum value to the sum of all peaks as the probability that the frequency corresponding to the any peak is the main frequency; otherwise, set the probability that the frequency corresponding to the any peak is the main frequency to zero, and use the frequency with the largest corresponding probability as the main frequency of the frequency domain signal.

[0008] The method for determining the main frequency provided by the present invention is more flexible and can adapt to different signal characteristics, ensuring the accuracy of the determined main frequency.

[0009] Preferably, the frequency difference is a relative difference. The method for obtaining the relative frequency difference between each frequency and the main frequency in the frequency domain signal includes: Calculate the absolute value of the difference between any frequency and the main frequency in the frequency domain signal, and divide it by the main frequency to obtain the relative frequency difference between the any frequency and the main frequency.

[0010] Preferably, the amplitude difference is a relative difference. The method for obtaining the relative amplitude difference between each frequency and the main frequency in the frequency domain signal includes: Calculate the ratio of the absolute value of the difference between the magnitude values of any frequency and the main frequency in the frequency-domain signal to the magnitude value of the main frequency, to obtain the relative magnitude difference between the any frequency and the main frequency.

[0011] Preferably, the influence factor of any frequency in the frequency-domain signal satisfies the following relational expression: ; In the formula, is the influence factor of the frequency in the frequency-domain signal of the mechanical vibration signal; is the relative difference between the frequency in this frequency signal and the main frequency; is the relative magnitude difference between the frequency in this frequency signal and the main frequency; is the natural exponential function.

[0012] Preferably, the logistic function of the pre-trained logistic regression model satisfies the following relational expression: ; In the formula, is the probability that the acoustic wave signal of the frequency is interfered by mechanical vibration noise; , and are all model parameters; is the influence factor of the frequency in the frequency-domain signal of the mechanical vibration signal, defined as the first index of the frequency ; is the second index of the frequency ; is the natural constant; Among them, the model parameters are determined by fitting training based on a pre-collected training sample set, and the training sample set is an acoustic wave signal containing mechanical vibration noise labels.

[0013] The logistic function constructed by the present invention can achieve accurate classification of whether the acoustic wave noise of each frequency is interfered by mechanical vibration noise.

[0014] Preferably, in the pre-trained logistic regression model, when the probability that any frequency acoustic wave signal is interfered by mechanical vibration noise is greater than the preset classification threshold, the pre-trained logistic regression model classifies the any frequency acoustic wave signal into the category interfered by mechanical vibration noise; otherwise, the any frequency acoustic wave signal is classified into another category.

[0015] Preferably, when calculating the second index of any frequency, the difference between the magnitude values of the frequency-domain signals of any two acoustic wave signals at the any frequency is the absolute value of the difference between the magnitude values of the frequency-domain signals of the corresponding two acoustic wave signals at the any frequency.

[0016] Preferably, after obtaining the acoustic wave signals at multiple preset positions on the surface and the mechanical vibration signals of the surrounding environment, it further includes: Performing normalization processing on each acoustic wave signal and mechanical vibration signal.

[0017] The present invention can unify the dimensions of different signal amplitudes, thereby avoiding numerical deviations in subsequent analysis processes.

[0018] Preferably, the preset positions include the middle position on the surface of the egg and the two end positions on the surface of the egg.

[0019] The preset positions selected by the present invention can comprehensively cover each surface position of the egg, ensuring that no possible crack signals are missed, and providing a comprehensive data basis for crack detection on the egg surface.

[0020] The present invention has the following effects: By analyzing the frequency-domain characteristics of the environmental mechanical vibration signals and combining the amplitude difference characteristics of the acoustic wave signals at multiple preset positions, the present invention can identify and quantify the degree of influence of the acoustic wave signals of each frequency by noise from two different perspectives, enabling the accurate identification and effective filtering of the mechanical vibration noise interference frequencies based on different quantization values (the first index and the second index) using a logistic regression model. This not only avoids the misjudgment problem caused by environmental noise interference in traditional methods but also fully retains the key acoustic wave signals of the crack characteristics. Thus, based on the crack detection results of the remaining acoustic wave signals, accurate detection of cracks on the egg surface can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] By referring to the following detailed description with reference to the accompanying drawings, the above and other objects, features, and advantages of the exemplary embodiments of the present invention will become readily understood. In the drawings, several embodiments of the present invention are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts, where: Figure 1 is a schematic flowchart of the steps of the method for detecting egg cracks based on acoustic wave signals according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0023] The following will describe the specific embodiments of the present invention in detail with reference to the accompanying drawings.

[0024] Reference Figure 1 , a method for detecting egg cracks based on acoustic signals, includes steps S1 - S5, specifically as follows: S1: Obtain acoustic signals at multiple preset positions on the egg surface and mechanical vibration signals in the surrounding environment.

[0025] In an exemplary embodiment of the present invention, the preset positions include the middle position on the egg surface and the two end positions on the egg surface.

[0026] It should be noted that by collecting acoustic signals on the egg surface at the three key positions of the middle position and the left and right ends on the egg surface, all parts of the egg surface can be comprehensively covered, ensuring that no possible position is missed, providing a data basis for the comprehensive detection of egg surface cracks.

[0027] Specifically, three highly sensitive microphones can be used to collect acoustic signals at the middle position and the two end positions on the egg surface respectively at a fixed sampling frequency, and denoted as , , , , where represents the sampling moment. There is no special limitation on the sampling frequency in this embodiment.

[0028] A vibration sensor can be used to collect mechanical vibration signals in the surrounding environment of the egg and denoted as . It should be noted that , , and are all time-domain signals.

[0029] In an exemplary embodiment of the present invention, after obtaining acoustic signals at multiple preset positions on the egg surface and mechanical vibration signals in the surrounding environment, the following steps are further included: Perform standardization processing on each acoustic signal and mechanical vibration signal.

[0030] Optionally, the maximum-minimum scaling method can be used to scale , , and to the range of 0 - 1; or the robust standardization method can be used to perform standardization processing on each signal, so as to unify the range of each signal amplitude and avoid numerical deviation in the subsequent analysis process. There is no special limitation on the selected standardization method in this embodiment.

[0031] It should be noted that in the subsequent steps involving the description of relevant signals, they are all standardized signals.

[0032] S2: Perform a Fourier transform on the mechanical vibration signal and extract the main frequency of the obtained frequency-domain signal.

[0033] It should be noted that during the signal acquisition process, the mechanical vibration of the environment will affect the received signal of the microphone, making it possible for irrelevant components, such as noise, to be mixed into the acoustic wave signal collected on the surface of the egg. This kind of interference often manifests as some periodic components with specific frequencies, usually forming specific frequency peaks in the frequency spectrum.

[0034] By performing a Fourier transform on the mechanical vibration acoustic wave signal, the main frequency components, that is, the main frequency, can be extracted. This main frequency represents the periodic change characteristics of the mechanical vibration. If the acoustic wave signal of the egg also contains these frequency components, it indicates that there may be interference from mechanical vibration to the signal, thus providing a data basis for the determination of the acoustic wave signal affected by mechanical vibration noise in the subsequent process.

[0035] In an exemplary embodiment of the present invention, the determination of the main frequency of the frequency-domain signal of the mechanical vibration signal can be achieved through the following steps: Step 1: Construct a frequency spectrum diagram of the frequency-domain signal and obtain all the peaks in the frequency spectrum diagram; It should be noted that by performing a Fourier transform on the mechanical vibration signal, the mechanical vibration signal can be converted from a time-domain signal to a frequency-domain signal, and thus, based on the frequency-domain signal, its frequency spectrum diagram can be constructed.

[0036] Specifically, each frequency of the frequency-domain signal and the corresponding amplitude value can be obtained, and then, with the frequency as the abscissa and the corresponding amplitude value of each frequency as the ordinate, the frequency spectrum diagram of the frequency-domain signal can be constructed.

[0037] Furthermore, all the local maxima in the frequency spectrum diagram can be obtained to get all the peaks in the frequency spectrum diagram. Among them, if the amplitude value of any frequency is greater than the amplitude value of its adjacent frequency, the amplitude value of this any frequency is taken as the local maximum.

[0038] Step 2: If the ratio of any peak to the sum of all peaks is greater than or equal to a preset value, then take the ratio as the probability that the frequency corresponding to this any peak is the main frequency; Specifically, if the ratio of the th peak in the frequency spectrum diagram to the sum of all peaks is greater than or equal to the preset value (such as 0.5), then the probability that the frequency corresponding to the th peak is the main frequency satisfies the following relational expression: ; In the formula, is the probability that the frequency in the frequency-domain signal of the mechanical vibration signal is the main frequency; is the frequency signal of this frequency The amplitude value; is the frequency in the frequency-domain signal The amplitude value; is the number of frequencies in the frequency-domain signal; is the absolute value symbol; is the summation symbol.

[0039] Optionally, when the proportion of any peak among all peaks is relatively large, it indicates that the energy of the frequency corresponding to this peak dominates in the signal, and further indicates that the frequency corresponding to this peak is more likely to be the main frequency of the signal, and the probability that the frequency corresponding to this peak is the main frequency is relatively large.

[0040] Step 3: If it is less than the preset value, obtain the maximum value among the remaining peaks, and determine whether the difference between any peak and the maximum value is greater than zero. If it is greater than zero, then use the ratio of the difference between any peak and the maximum value to the sum of all peaks as the probability that the frequency corresponding to any peak is the main frequency; otherwise, set the probability that the frequency corresponding to any peak is the main frequency to zero.

[0041] Specifically, if the ratio of the th peak in the spectrogram to the sum of all peaks is less than the preset value (such as 0.5), then the probability that the frequency corresponding to the th peak is the main frequency satisfies the following relationship: ; ; In the formula, is the probability that the frequency in the frequency-domain signal of the mechanical vibration signal is the main frequency; is the amplitude value of the frequency in this frequency signal; is the amplitude value of the frequency in the frequency-domain signal; is the number of frequencies in the frequency-domain signal; is the absolute value symbol; is the summation symbol; is a function with the return value of the maximum value.

[0042] It should be noted that in some special cases, even if the ratio of the th peak in the spectrogram to the sum of all peaks is lower than the preset value, the frequency corresponding to the th peak may still be relatively obvious in the spectrogram. At this time, it is necessary to consider the difference between the th peak and the maximum value among the remaining peaks. If the th peak is significantly higher than this maximum value, it indicates that the corresponding frequency may still be the main frequency of the frequency-domain signal of the mechanical vibration signal.

[0043] Step 4: Take the frequency with the highest corresponding probability as the main frequency of the frequency-domain signal.

[0044] It should be noted that by evaluating the probabilities of each frequency being the main frequency in different ways, the determination of the main frequency can be adapted to different signal characteristics, thereby improving the flexibility and accuracy of the determination of the main frequency of the frequency-domain signal.

[0045] Optionally, the main frequency of the frequency-domain signal of the mechanical vibration signal can also be determined by using the method for determining the main frequency of the frequency-domain signal in the prior art. This embodiment does not elaborate on the method for determining the main frequency of the frequency-domain signal in the prior art here.

[0046] S3: Calculate the influence factor of each frequency based on the frequency difference and amplitude difference between each frequency and the main frequency in the frequency-domain signal. The influence factor is negatively correlated with both the frequency difference and amplitude difference between the corresponding frequency and the main frequency.

[0047] Among them, the influence factor refers to a quantitative value that measures the magnitude of the influence of each frequency on the mechanical vibration signal.

[0048] In an exemplary embodiment of the present invention, the frequency difference between each frequency and the main frequency in the frequency-domain signal of the mechanical vibration signal is a relative difference. The determination of the relative frequency difference between each frequency and the main frequency can be achieved through the following steps: Calculate the ratio of the absolute value of the difference between any frequency and the main frequency in the frequency-domain signal to the main frequency, to obtain the relative frequency difference between the any frequency and the main frequency.

[0049] Specifically, for the frequency in the frequency-domain signal of the mechanical vibration signal, the relative difference with the main frequency satisfies the relational expression: ; in the formula, is the relative frequency difference between the frequency and the main frequency in the frequency-domain signal of the mechanical vibration signal; is the absolute value symbol; is the main frequency in the frequency-domain signal of the mechanical vibration signal.

[0050] In an exemplary embodiment of the present invention, the amplitude difference between each frequency and the main frequency in the frequency-domain signal of the mechanical vibration signal is a relative difference. The determination of the relative amplitude difference between each frequency and the main frequency can be achieved through the following steps: Calculate the ratio of the absolute value of the difference between the modulus lengths of the amplitude values of any frequency and the main frequency in the frequency-domain signal to the modulus length of the amplitude value corresponding to the main frequency, to obtain the relative amplitude difference between the any frequency and the main frequency.

[0051] Specifically, for the frequency in the frequency-domain signal of the mechanical vibration signal, the relative amplitude difference with the main frequency satisfies the relational expression: ; in the formula, is the relative difference in amplitude between the frequency in the frequency-domain signal of the mechanical vibration signal and the main frequency ; is the amplitude value of the frequency in this frequency signal; is the amplitude value of the main frequency in this frequency signal; is the absolute value symbol.

[0052] Furthermore, based on the relative frequency difference between the frequency and the main frequency in the frequency-domain signal of the mechanical vibration signal , and the relative amplitude difference , the influence factor of the frequency in this frequency-domain signal can be calculated. Specifically, the influence factors of each frequency in the frequency-domain signal of the mechanical vibration signal satisfy the following relational expression: ; In the formula, is the influence factor of the frequency in the frequency-domain signal of the mechanical vibration signal; is the relative frequency difference between the frequency and the main frequency in this frequency signal; is the relative amplitude difference between the frequency and the main frequency in this frequency signal; is the natural exponential function, where the natural exponential function refers to the exponential function with the natural constant as the base.

[0053] Among them, when is small, and is small, it indicates that the frequency in the frequency-domain signal of the mechanical vibration signal is relatively close to both the frequency and the amplitude value of the main frequency. Furthermore, it indicates that the frequency in this frequency-domain signal is greatly affected by the mechanical vibration signal, and the influence factor of the corresponding frequency is large.

[0054] It should be noted that the influence factor corresponding to each frequency reflects the degree of interference of mechanical vibration on the signal at each frequency. If the influence factor of a certain frequency is particularly large, then the signal at that frequency may be severely contaminated by mechanical vibration noise, making it difficult to extract the crack signal on the egg surface. Therefore, the influence of mechanical vibration noise on the acoustic wave signals at each frequency can be evaluated based on the influence factors of each frequency.

[0055] S4: Use the influence factors of each frequency as the first indicators of each frequency, calculate the average difference between the amplitude values of all acoustic signals at the same frequency in pairs, obtain the second indicators of each frequency, and input the first indicators and second indicators of each frequency into a pre-trained logistic regression model to output the classification results of whether the acoustic signals of each frequency are interfered by mechanical vibration noise.

[0056] Among them, the first indicator and the second indicator refer to the basis for judging whether the acoustic signal of the corresponding frequency is interfered by mechanical vibration noise. When both the first indicator and the second indicator of any frequency are large, the greater the possibility that the any frequency is interfered by mechanical vibration noise.

[0057] In an exemplary embodiment of the present invention, when calculating the second indicator of any frequency, the difference between the amplitude values of the frequency domain signals of any two acoustic signals at the any frequency is the absolute value of the difference between the amplitude values of the frequency domain signals of the corresponding two acoustic signals at the any frequency.

[0058] Specifically, the acoustic signals at the middle position and both ends of the egg surface can be respectively subjected to Fourier transform to obtain frequency domain signals 、 、 , and their amplitude spectra are respectively 、 、 . For any frequency , calculate the pairwise absolute differences of the three-channel amplitude spectra: , , , then the average difference between the amplitude values of all frequency domain signals at frequency satisfies the relationship: .

[0059] Furthermore, after determining the first indicators and second indicators of each frequency, based on the first indicators and second indicators of each frequency, a logistic regression model can be used to classify whether each frequency is interfered by mechanical vibration noise, so as to perform subsequent operations based on the classification results.

[0060] It should be noted that Logistic Regression is a generalized linear regression analysis model. Its derivation process and calculation method are similar to the process of regression, but in fact it is mainly used to solve binary classification problems. Its core is the logistic function, also known as the Sigmoid function, and its data expression is: ; the value range of this function is between 0 and 1. As increases, the function value gradually approaches 1. As decreases, the function value gradually approaches 0. Usually, this function value is used to represent probability.

[0061] In logistic regression, the probability of class 1 can be represented by the Sigmoid function, i.e.: ; where is the feature variable; is the model parameter.

[0062] In an exemplary embodiment of the present invention, the logistic function of the pre-trained logistic regression model satisfies the following relationship: ; In the formula, is the frequency of the probability that the acoustic signal is interfered by mechanical vibration noise; , and are all model parameters; is the influence factor of the frequency in the frequency domain signal of the mechanical vibration signal, defined as the first index of the frequency ; is the second index of the frequency ; is the base of the natural exponential function; where the model parameters are determined by fitting training based on a pre-collected training sample set, and the training sample set is an acoustic signal containing a label of mechanical vibration noise.

[0063] Next, the determination of the model parameters in the logistic regression model will be described in detail: First, collect the acoustic signals at the middle position and both ends of the egg surface, and for each frequency component of each acoustic signal, extract the frequency corresponding and indicators; set the label of the frequency component affected by mechanical vibration noise to 1, and set the label of the frequency component not affected by mechanical vibration noise to 0 to construct a labeled training sample set; then, use the maximum likelihood estimation to fit the constructed training sample set to optimize the model parameters to obtain , and are all model parameters. It should be noted that the process of optimizing the model parameters by maximum likelihood estimation is a prior art, and this embodiment will not be described in detail here.

[0064] In an exemplary embodiment of the present invention, in the pre-trained logistic regression model, when the probability that any frequency acoustic signal is interfered by mechanical vibration noise is greater than a preset classification threshold, the pre-trained logistic regression model classifies the acoustic signal of any frequency into the category interfered by mechanical vibration noise; otherwise, the acoustic signal of any frequency is classified into another category.

[0065] Optionally, the preset classification threshold can be set to 0.6, so that based on the classification threshold, the classification result of whether the acoustic signal of each frequency is interfered by mechanical vibration noise can be determined. It should be noted that, under the condition of a known training sample set and a logical function, the training process of the logistic regression model is a prior art, and this embodiment will not be described in detail herein.

[0066] S5: Remove the acoustic signals whose classification results are interfered by mechanical vibration noise, and use the remaining acoustic signals to judge whether there are cracks on the egg surface through a pre-trained crack detection model.

[0067] Optionally, a deep learning-based detection algorithm, such as 1D-CNN, LSTM-Attention, etc., can be used as the crack anomaly detection algorithm of the crack detection model, or traditional machine learning methods, such as support vector machines, random forests, etc., can be used as the crack anomaly detection algorithm of the crack detection model. The present invention does not make special limitations on the selected anomaly detection algorithm.

[0068] Furthermore, after determining the anomaly detection algorithm, a crack detection model can be constructed and trained. After the training is completed, the remaining acoustic signals can be input into the trained crack detection model to output the anomaly detection result of whether there are cracks on the egg surface, so as to realize the accurate detection of cracks on the egg surface. It should be noted that the training process of the model is a prior art, and this embodiment will not be described in detail herein.

[0069] In the description of this specification, "a plurality of" and "several" mean at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0070] Although this specification has shown and described multiple embodiments of the present invention, it is obvious to those skilled in the art that such embodiments are provided only by way of example. Those skilled in the art will think of many changes, alterations and alternative ways without departing from the spirit and scope of the present invention. It should be understood that various alternative solutions to the embodiments of the present invention described herein can be adopted in the process of practicing the present invention.

Claims

1. An egg crack detection method based on acoustic signals, characterized in that, Including: Obtaining acoustic wave signals at multiple preset positions on the egg surface and mechanical vibration signals of the surrounding environment; Performing Fourier transform on the mechanical vibration signals, extracting the main frequency of the obtained frequency-domain signals, and calculating the influence factor of each frequency based on the frequency difference and amplitude difference between each frequency and the main frequency in the frequency-domain signals. The influence factor is negatively correlated with both the frequency difference and amplitude difference between the corresponding frequency and the main frequency; Taking the influence factor of each frequency as the first index of each frequency, calculating the average difference between the amplitude values of all acoustic wave signals at the same frequency in pairs, obtaining the second index of each frequency, and inputting the first index and the second index of each frequency into a pre-trained logistic regression model to output the classification result of whether the acoustic wave signals at each frequency are interfered by mechanical vibration noise; Removing the acoustic wave signals with the classification result of being interfered by mechanical vibration noise, and using the remaining acoustic wave signals to pass through a pre-trained crack detection model to determine whether there are cracks on the egg surface.

2. The method for detecting egg cracks based on acoustic signals according to claim 1, characterized in that, The method for obtaining the main frequency in the frequency-domain signal includes: Constructing a spectrogram of the frequency-domain signal and obtaining all the peaks in the spectrogram. If the ratio of any peak to the sum of all peaks is greater than or equal to a preset value, then taking the ratio as the probability that the frequency corresponding to the any peak is the main frequency; If it is less than the preset value, obtaining the maximum value among the remaining peaks, and judging whether the difference between the any peak and the maximum value is greater than zero. If it is greater than zero, then taking the ratio of the difference between the any peak and the maximum value to the sum of all peaks as the probability that the frequency corresponding to the any peak is the main frequency; otherwise, setting the probability that the frequency corresponding to the any peak is the main frequency to zero, so as to take the frequency with the maximum corresponding probability as the main frequency of the frequency-domain signal.

3. The method for detecting egg cracks based on acoustic signals according to claim 2, wherein The frequency difference is a relative difference. The method for obtaining the relative frequency difference between each frequency and the main frequency in the frequency-domain signal includes: Calculating the ratio of the absolute value of the difference between any frequency and the main frequency in the frequency-domain signal to the main frequency, to obtain the relative frequency difference between the any frequency and the main frequency.

4. The method for detecting egg cracks based on acoustic signals according to claim 2, wherein The amplitude difference is a relative difference. The method for obtaining the relative amplitude difference between each frequency and the main frequency in the frequency-domain signal includes: Calculating the ratio of the absolute value of the difference between the modulus lengths of the amplitude values of any frequency and the main frequency in the frequency-domain signal to the modulus length of the amplitude value corresponding to the main frequency, to obtain the relative amplitude difference between the any frequency and the main frequency.

5. The method for detecting egg cracks based on acoustic signals according to claim 3 or 4, characterized in that, The influence factor of any frequency in the frequency-domain signal satisfies the following relational expression: ; In the formula, is the influence factor of the frequency in the frequency-domain signal of the mechanical vibration signal; is the relative difference between the frequency and the main frequency in the frequency signal; is the relative difference in amplitude between the frequency and the main frequency in the frequency signal; is the natural exponential function.

6. The method for detecting egg cracks based on acoustic signals according to claim 1, wherein The logistic function of the pre-trained logistic regression model satisfies the following relational expression: ; In the formula, is the probability that the acoustic wave signal with frequency is interfered by mechanical vibration noise; , and are all model parameters; is the influence factor of frequency in the frequency domain signal of the mechanical vibration signal, defined as the first index of frequency ; is the second index of frequency ; is the natural constant; Wherein, the model parameters are determined by fitting training based on a pre-collected training sample set, and the training sample set is an acoustic wave signal containing mechanical vibration noise labels.

7. The method for detecting egg cracks based on acoustic signals according to claim 6, wherein, In the pre-trained logistic regression model, when the probability that any frequency acoustic wave signal is interfered by mechanical vibration noise is greater than a preset classification threshold, the pre-trained logistic regression model classifies the acoustic wave signal of the any frequency into the category of being interfered by mechanical vibration noise; otherwise, classifying the acoustic wave signal of the any frequency into another category.

8. The method for detecting egg cracks based on acoustic signals according to claim 6, characterized in that When calculating the second index at any frequency, the difference between the amplitude values of the frequency-domain signals of any two acoustic wave signals at the any frequency is the absolute value of the difference between the amplitude values of the frequency-domain signals of the corresponding two acoustic wave signals at the any frequency.

9. The method for detecting egg cracks based on acoustic signals according to claim 1, wherein After obtaining the acoustic wave signals at multiple preset positions on the surface and the mechanical vibration signals of the surrounding environment, it further includes: Performing normalization processing on each of the acoustic wave signals and the mechanical vibration signals.

10. The method for detecting egg cracks based on acoustic signals according to claim 1, wherein The preset positions include the middle position on the surface of the egg and the two end positions on the surface of the egg.

Citation Information

Patent Citations

  • Method for detecting creak of eggs of poultry

    CN101358950A

  • Poultry eggshell crack detection method and device

    CN104833724A

  • Egg crack automatic detection and classification system and method capable of accurately sorting

    CN116148357A

  • Electromechanical equipment noise reduction method based on machine learning

    CN119939123A

  • Pollution source detection method and system for water environment treatment

    CN120101876A

Cited By

  • Rapid detection method for external wall hollowing hidden danger

    CN120741629A

  • Welding pool fusion monitoring method and system

    CN120801511A

  • A method and system for monitoring the fusion of weld pools

    CN120801511B