Egg crack detection method based on acoustic wave signals

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

CN120294174BActive Publication Date: 2025-08-15XIAN GERUN HUSBANDRY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing acoustic wave detection technology is disturbed by mechanical vibration noise in egg crack detection, resulting in a decrease in signal-to-noise ratio, making it difficult to accurately identify crack signals.

Method used

By obtaining the acoustic wave signals and environmental mechanical vibration signals at multiple preset positions on the egg surface, the main frequency of the frequency domain signal is extracted using Fourier transform, the frequency and amplitude difference is calculated, and the mechanical vibration noise interference is identified in combination with the logistic regression model, and the interference signal is removed and crack detection is performed.

Benefits of technology

Accurate detection of cracks on the surface of eggs is achieved, misjudgment caused by noise interference in traditional methods is avoided, and key acoustic signals of crack characteristics are retained.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120294174B_ABST
    Figure CN120294174B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and more specifically, to an egg crack detection method based on acoustic wave signals. The method comprises: obtaining an acoustic wave signal on the egg surface and a mechanical vibration signal from the surrounding environment; determining a first index for each frequency based on the frequency and amplitude differences between each frequency and the main frequency in the frequency domain signal of the mechanical vibration signal; calculating the average difference between the amplitude values of all acoustic wave signals at the same frequency to obtain a second index for each frequency; and, based on the first and second indices, using a logistic regression model to classify whether the acoustic wave signal at each frequency is interfered with by mechanical vibration noise. Acoustic wave signals that are interfered with by mechanical vibration noise are removed from the classification results, and the remaining acoustic wave signals are used to determine whether cracks are present on the egg surface using a pre-trained crack detection model. The present invention can achieve accurate detection of cracks on the egg surface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and more particularly to an egg crack detection method based on acoustic wave signals. Background Art

[0002] Egg cracks are typically caused by external forces, temperature fluctuations, improper storage, and the natural fragility of the eggshell. To improve detection efficiency, acoustic wave inspection technology is widely used. This technology utilizes the reflection and propagation properties of sound waves to accurately identify even tiny cracks in the eggshell. Compared to traditional manual inspection methods, acoustic wave inspection significantly improves detection efficiency and ensures egg quality and safety.

[0003] However, when sound waves encounter cracks, they reflect and scatter, altering the acoustic signal. Multiple acoustic probes (sensors) are used to collect acoustic signals from the eggshell surface. When analyzing these signals, the egg processing environment often contains various noise sources, such as mechanical vibration and equipment operation noise. This noise reduces the signal-to-noise ratio (SNR) of the collected acoustic signals. This reduced SNR causes signal characteristics (such as reflection and scattering caused by cracks) to be submerged in the noise, making them difficult to discern.

[0004] Traditionally, filtering techniques have been used to process noise in acoustic signals. However, because acoustic signals are collected using multiple channels, and filtering techniques are more suited to processing single-channel signals, their effectiveness in multi-channel scenarios is limited. Furthermore, when the frequency bands of noise and crack signals overlap, traditional filtering methods may filter out both the noise and the valid signal, resulting in incomplete noise removal. This not only removes some of the useful acoustic signal but also retains some unwanted noise, reducing crack detection accuracy. Summary of the Invention

[0005] In order to overcome the influence of noise interference on the accuracy of detecting egg surface cracks based on acoustic wave signals, the present invention provides an egg crack detection method based on acoustic wave signals. The method comprises:

[0006] Acquire acoustic wave signals at multiple preset locations on the egg surface and mechanical vibration signals from the surrounding environment;

[0007] Perform Fourier transform on the mechanical vibration signal and extract the dominant frequency of the obtained frequency domain signal. Based on the frequency difference and amplitude difference between each frequency and the dominant frequency in the frequency domain signal, calculate the impact factor of each frequency. The impact factor is negatively correlated with the frequency difference and amplitude difference between the corresponding frequency and the dominant frequency.

[0008] The influencing factor of each frequency is used as the first indicator of each frequency, and the average difference between the amplitude values of all sound wave signals at the same frequency is calculated to obtain the second indicator of each frequency. The first and second indicators of each frequency are input into the pre-trained logistic regression model, and the output is the classification result of whether the sound wave signal of each frequency is interfered by mechanical vibration noise;

[0009] The acoustic wave signals that are classified as being interfered by mechanical vibration noise are removed, and the remaining acoustic wave signals are used to determine whether there are cracks on the egg surface through a pre-trained crack detection model.

[0010] The present invention collects frequency-domain characteristics of environmental mechanical vibration signals and calculates a first index for each frequency, measuring the noise interference of the acoustic signal from the perspective of frequency band overlap. Simultaneously, combining the amplitude differences of the acoustic signal at multiple preset locations, a second index is calculated for each frequency, measuring the impact of mechanical vibration on the acoustic signal from the perspective of signal similarity. Based on these first and second indices, a logistic regression model can accurately identify and filter out mechanical vibration noise interference frequencies, thereby enabling precise detection of cracks on the egg surface based on the remaining acoustic signal.

[0011] Preferably, the method for obtaining the main frequency in the frequency domain signal includes:

[0012] Construct a spectrum of the frequency domain signal and obtain all peaks in the spectrum. If the ratio of any peak to the sum of all peaks is greater than or equal to a preset value, use the ratio as the probability that the frequency corresponding to the peak is the dominant frequency.

[0013] If it is less than the preset value, the maximum value among the remaining peaks is obtained, and it is determined whether the difference between any peak and the maximum value is greater than zero. If it is greater than zero, the ratio of the difference between any peak and the maximum value to the sum of all peaks is used as the probability that the frequency corresponding to any peak is the main frequency; otherwise, the probability that the frequency corresponding to any peak is the main frequency is set to zero, so that the frequency with the largest corresponding probability is used as the main frequency of the frequency domain signal.

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

[0015] Preferably, the frequency difference is a relative difference, and a method for obtaining the relative frequency difference between each frequency in the frequency domain signal and the main frequency includes:

[0016] The absolute value of the difference between any frequency in the frequency domain signal and the main frequency is calculated, and the ratio of the difference to the main frequency is calculated to obtain the relative frequency difference between the any frequency and the main frequency.

[0017] Preferably, the amplitude difference is a relative difference, and a method for obtaining the relative amplitude difference between each frequency and the main frequency in the frequency domain signal includes:

[0018] The absolute value of the difference between the amplitude modulus length of any frequency and the main frequency in the frequency domain signal is calculated, and the ratio of the difference to the amplitude modulus length corresponding to the main frequency is used to obtain the relative difference in amplitude between the any frequency and the main frequency.

[0019] Preferably, the influence factor of any frequency in the frequency domain signal satisfies the following relationship:

[0020] ;

[0021] Where, is the frequency in the frequency domain of the mechanical vibration signal Impact factor; is the frequency of the frequency signal relative difference from the main frequency; is the frequency of the frequency signal The relative difference in amplitude from the main frequency; is the natural exponential function.

[0022] Preferably, the logistic function of the pre-trained logistic regression model satisfies the following relationship:

[0023] ;

[0024] Where, Frequency The probability that the acoustic wave signal is interfered by mechanical vibration noise; 、 as well as are all model parameters; is the frequency in the frequency domain of the mechanical vibration signal The impact factor is defined as the frequency The first indicator of Frequency The second indicator; is a natural constant;

[0025] The model parameters are determined through fitting training based on a pre-collected training sample set, and the training sample set is a sound wave signal containing a mechanical vibration noise label.

[0026] The logic function constructed by the present invention can accurately classify whether the acoustic noise of each frequency is interfered by mechanical vibration noise.

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

[0028] Preferably, when calculating the second indicator of any frequency, the difference between the amplitude values of the frequency domain signals of any two sound wave signals at that frequency is the absolute value of the difference between the amplitude values of the frequency domain signals of the corresponding two sound wave signals at that frequency.

[0029] Preferably, after acquiring the acoustic wave signals at a plurality of preset positions on the surface and the mechanical vibration signals of the surrounding environment, the method further includes:

[0030] Each acoustic wave signal and mechanical vibration signal is standardized.

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

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

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

[0034] The present invention has the following effects:

[0035] The present invention analyzes the frequency domain characteristics of the environmental mechanical vibration signal and combines the amplitude difference characteristics of the sound wave signal at multiple preset positions to identify and quantify the degree to which the sound wave signal of each frequency is affected by noise from two different perspectives. Based on different quantization values (first indicator and second indicator), a logistic regression model is used to accurately identify and effectively filter out the interference frequency of mechanical vibration noise. This avoids the misjudgment problem caused by environmental noise interference in traditional methods and fully retains the key sound wave signals of crack characteristics. Therefore, based on the crack detection results of the remaining sound wave signals, accurate detection of cracks on the egg surface can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an illustrative and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0037] Figure 1 The figure is a schematic flow chart of the steps of the egg crack detection method based on acoustic wave signals according to an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0039] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0040] Reference Figure 1 The egg crack detection method based on acoustic wave signals includes steps S1 to S5, which are specifically as follows:

[0041] S1: Acquire acoustic wave signals at multiple preset locations on the egg surface and mechanical vibration signals from the surrounding environment.

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

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

[0044] Specifically, three highly sensitive microphones can be used to collect the sound wave signals at the middle and two ends of the egg surface at a fixed sampling frequency, and recorded as 、 、 , Indicates the sampling time. This embodiment does not impose any special limitation on the sampling frequency.

[0045] A vibration sensor can be used to collect the mechanical vibration signal in the environment around the egg and record it as It should be noted that 、 、 as well as All are time domain signals.

[0046] In an exemplary embodiment of the present invention, after obtaining the acoustic wave signals at multiple preset locations on the egg surface and the mechanical vibration signals of the surrounding environment, the following steps are further included:

[0047] Each acoustic wave signal and mechanical vibration signal is standardized.

[0048] Optionally, you can use the maximum and minimum scaling method to 、 、 as well as Scaling to 0-1; robust normalization can also be used to normalize each signal, thereby unifying the range of each signal amplitude and avoiding numerical deviation in the subsequent analysis process. This embodiment does not specifically limit the selected normalization method.

[0049] It should be noted that the descriptions of related signals in subsequent steps are all standardized signals.

[0050] S2: Perform Fourier transform on the mechanical vibration signal and extract the dominant frequency of the obtained frequency domain signal.

[0051] It should be noted that during the signal acquisition process, the mechanical vibration of the environment will affect the microphone's receiving signal, causing the collected sound wave signal on the egg surface to be mixed with irrelevant components, such as noise. This interference often manifests itself as some periodic components with specific frequencies, usually forming specific frequency peaks in the spectrum.

[0052] By performing a Fourier transform on the mechanical vibration sound wave signal, the main frequency component, that is, the dominant frequency, can be extracted. This dominant frequency represents the periodic change characteristics of the mechanical vibration. If the egg sound wave signal also contains these frequency components, it means that there may be interference from mechanical vibration on the signal, thus providing a data basis for the subsequent judgment of the sound wave signal interfered with by mechanical vibration noise.

[0053] In an exemplary embodiment of the present invention, the main frequency of the frequency domain signal of the mechanical vibration signal can be determined by the following steps:

[0054] Step 1: Construct a spectrum of the frequency domain signal and obtain all peaks in the spectrum;

[0055] It should be noted that, by performing Fourier transform on the mechanical vibration signal, the mechanical vibration signal can be converted from a time domain signal to a frequency domain signal, so that its spectrum diagram can be constructed based on the frequency domain signal.

[0056] Specifically, each frequency of the frequency domain signal and the amplitude value corresponding to each frequency can be obtained, and then a spectrum diagram of the frequency domain signal can be constructed with the frequency as the horizontal axis and the amplitude value corresponding to each frequency as the vertical axis.

[0057] Furthermore, all local maxima in the spectrum graph can be obtained to obtain all peaks in the spectrum graph. If the amplitude value of any frequency is greater than the amplitude value of its adjacent frequency, the amplitude value of any frequency is regarded as a local maximum.

[0058] Step 2: If the ratio of any peak value to the sum of all peak values is greater than or equal to a preset value, the ratio is used as the probability that the frequency corresponding to the peak value is the dominant frequency;

[0059] Specifically, if the first If the ratio of the first peak value to the sum of all peak values is greater than or equal to the preset value (such as 0.5), then the The probability that the frequency corresponding to the peak is the main frequency satisfies the following relationship:

[0060] ;

[0061] Where, is the frequency in the frequency domain of the mechanical vibration signal The probability of being the main frequency; is the frequency of the frequency signal The amplitude value of is the frequency in the frequency domain signal The amplitude value of is the number of frequencies in the frequency domain signal; is the absolute value symbol; is the summation symbol.

[0062] Optionally, when any peak accounts for a large proportion of all peaks, it means that the energy of the frequency corresponding to the peak dominates the signal, which further indicates that the frequency corresponding to the peak is more likely to be the main frequency of the signal, and the corresponding probability that the frequency corresponding to the peak is the main frequency is higher.

[0063] 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, take 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.

[0064] Specifically, if the first If the ratio of the first peak value to the sum of all peak values is less than the preset value (such as 0.5), then the Peak frequency The probability of being the main frequency satisfies the following relationship:

[0065] ;

[0066] Where, is the frequency in the frequency domain of the mechanical vibration signal The probability of being the main frequency; is the frequency of the frequency signal The amplitude value of is the frequency in the frequency domain signal The amplitude value of is the number of frequencies in the frequency domain signal; is the absolute value symbol; For the sum symbol; A function that returns the maximum value.

[0067] It should be noted that in some special cases, even if the The ratio of the peak value to the sum of all peak values is lower than the preset value. The frequency corresponding to the first peak may also be more obvious in the spectrum diagram. In this case, it is necessary to consider the The difference between the first peak and the maximum value among the remaining peaks, if the If a peak value is significantly higher than the maximum value, it means that the corresponding frequency may still be the main frequency of the frequency domain signal of the mechanical vibration signal.

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

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

[0070] Optionally, the main frequency of the frequency domain signal of the mechanical vibration signal can also be determined by using the method of determining the main frequency of the frequency domain signal in the prior art. This embodiment does not describe in detail the method of determining the main frequency of the frequency domain signal in the prior art.

[0071] S3: Based on the frequency difference and amplitude difference between each frequency and the main frequency in the frequency domain signal, the impact factor of each frequency is calculated. The impact factor is negatively correlated with the frequency difference and amplitude difference between the corresponding frequency and the main frequency.

[0072] Among them, the impact factor refers to the quantitative value that measures the extent to which each frequency is affected by the mechanical vibration signal.

[0073] In an exemplary embodiment of the present invention, the frequency difference between each frequency in the frequency domain signal of the mechanical vibration signal and the main frequency is a relative difference. The relative frequency difference between each frequency and the main frequency can be determined by the following steps:

[0074] The absolute value of the difference between any frequency in the frequency domain signal and the main frequency is calculated, and the ratio of the difference to the main frequency is calculated to obtain the relative frequency difference between the any frequency and the main frequency.

[0075] Specifically, the frequency in the frequency domain signal of the mechanical vibration signal The relative difference from the main frequency satisfies the relationship: Where, is the frequency in the frequency domain of the mechanical vibration signal relative difference from the main frequency; is the absolute value symbol; is the dominant frequency in the frequency domain signal of the mechanical vibration signal.

[0076] 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 relative amplitude difference between each frequency and the main frequency can be determined by the following steps:

[0077] The absolute value of the difference between the amplitude modulus length of any frequency and the main frequency in the frequency domain signal is calculated, and the ratio of the difference to the amplitude modulus length corresponding to the main frequency is used to obtain the relative difference in amplitude between the any frequency and the main frequency.

[0078] Specifically, the frequency in the frequency domain signal of the mechanical vibration signal The relative difference from the amplitude of the main frequency satisfies the relationship: Where, is the frequency in the frequency domain of the mechanical vibration signal and main frequency The relative difference in amplitude; is the frequency of the frequency signal The amplitude value of is the amplitude value of the main frequency in the frequency signal; is the absolute value symbol.

[0079] Furthermore, the frequency domain signal of the mechanical vibration signal can be used to Relative frequency difference from the main frequency , and the relative difference in amplitude , calculate the frequency in the frequency domain signal Specifically, the influence factor of each frequency in the frequency domain signal of the mechanical vibration signal satisfies the following relationship:

[0080] ;

[0081] Where, is the frequency in the frequency domain of the mechanical vibration signal Impact factor; is the frequency of the frequency signal relative difference from the main frequency; is the frequency of the frequency signal The relative difference in amplitude from the main frequency; is a natural exponential function, where the natural exponential function refers to a function with a natural constant An exponential function with base .

[0082] Among them, when Smaller and When it is small, it indicates that the frequency in the frequency domain signal of the mechanical vibration signal is The frequency and amplitude values are close to the main frequency, which shows that the frequency in the frequency domain signal is Affected by the mechanical vibration signal, the corresponding frequency The impact factor is larger.

[0083] It's important to note that the impact factor corresponding to each frequency reflects the degree of interference from mechanical vibration on the signal at that frequency. If the impact factor for a frequency is particularly large, the signal at that frequency may be severely contaminated by the mechanical vibration noise, making it difficult to extract the crack signal on the egg surface. Therefore, the impact factor of each frequency can be used to assess the impact of mechanical vibration noise on the acoustic signal at each frequency.

[0084] S4: Use the influencing factor of each frequency as the first indicator of each frequency, and calculate the average difference between the amplitude values of all sound wave signals at the same frequency to obtain the second indicator of each frequency. Input the first indicator and the second indicator of each frequency into the pre-trained logistic regression model, and output the classification result of whether the sound wave signal of each frequency is interfered by mechanical vibration noise.

[0085] The first index and the second index are used to determine whether the sound wave signal of the corresponding frequency is interfered with by mechanical vibration noise. When the first index and the second index of any frequency are both larger, the possibility of the frequency being interfered with by mechanical vibration noise is greater.

[0086] 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 sound wave signals at that frequency is the absolute value of the difference between the amplitude values of the frequency domain signals of the corresponding two sound wave signals at that frequency.

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

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

[0089] It should be noted that logistic regression is a generalized linear regression analysis model. Its derivation and calculation methods are similar to those of regression, but it is actually 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 the value of the function gradually approaches 1, As decreases, the function value gradually approaches 0, and this function value is usually used to represent probability.

[0090] In logistic regression, suppose the probability of class 1 is It can be represented by the Sigmoid function, that is: ;in, is a characteristic variable; are model parameters.

[0091] In an exemplary embodiment of the present invention, the logistic function of the pre-trained logistic regression model satisfies the following relationship:

[0092] ;

[0093] Where, Frequency The probability that the acoustic wave signal is interfered by mechanical vibration noise; 、 as well as are all model parameters; is the frequency in the frequency domain of the mechanical vibration signal The impact factor is defined as the frequency The first indicator of Frequency The second indicator; is the base of the natural exponential function; 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 a mechanical vibration noise label.

[0094] Next, the determination of the model parameters in the logistic regression model is explained in detail: First, the acoustic wave signals at the middle and both ends of the egg surface are collected, and the frequency components of each acoustic wave signal are extracted. Corresponding and Indicator; the frequency component label affected by mechanical vibration noise is set to 1, and the frequency component label not affected by mechanical vibration noise is set to 0 to construct a labeled training sample set; then, the constructed training sample set is fitted using maximum likelihood estimation to optimize the model parameters and obtain 、 as well as It should be noted that the process of optimizing model parameters by maximum likelihood estimation is a prior art and will not be described in detail in this embodiment.

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

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

[0097] S5: Remove the acoustic wave signals that are classified as being interfered with by mechanical vibration noise, and use the remaining acoustic wave signals through the pre-trained crack detection model to determine whether there are cracks on the egg surface.

[0098] Alternatively, a deep learning-based detection algorithm, such as 1D-CNN or LSTM-Attention, can be used as the crack anomaly detection algorithm for the crack detection model. Alternatively, a traditional machine learning method, such as a support vector machine or random forest, can be used as the crack anomaly detection algorithm for the crack detection model. The present invention does not impose any particular limitation on the anomaly detection algorithm selected.

[0099] Furthermore, after determining the anomaly detection algorithm, a crack detection model can be constructed and trained. Once training is complete, the remaining acoustic wave signal can be input into the trained crack detection model to output an anomaly detection result indicating whether cracks are present on the egg surface. This allows for accurate detection of cracks on the egg surface. It should be noted that the model training process is conventional and will not be described in detail in this embodiment.

[0100] In the description of this specification, "multiple" and "several" mean at least two, such as two, three or more, unless otherwise clearly defined.

[0101] While several embodiments of the present invention have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, variations, and alternatives will occur to those skilled in the art without departing from the concept and spirit of the present invention. It should be understood that various alternatives to the embodiments of the present invention described herein may be employed in practicing the present invention.

Claims

1. An egg crack detection method based on acoustic wave signals, characterized in that: include: Acquire acoustic wave signals at multiple preset locations on the egg surface and mechanical vibration signals from the surrounding environment; Performing a Fourier transform on the mechanical vibration signal and extracting the dominant frequency of the obtained frequency domain signal, calculating an influence factor of each frequency based on the frequency difference and amplitude difference between each frequency in the frequency domain signal and the dominant frequency, wherein the influence factor is negatively correlated with the frequency difference and amplitude difference between the corresponding frequency and the dominant frequency; the influence factor of any frequency in the frequency domain signal satisfies the following relationship: ; Where, is the frequency in the frequency domain of the mechanical vibration signal Impact factor; is the frequency of the frequency signal relative difference from the main frequency; is the frequency of the frequency signal The relative difference in amplitude from the main frequency; is the natural exponential function; The influencing factor of each frequency is used as the first indicator of each frequency, and the average difference between the amplitude values of all sound wave signals at the same frequency is calculated to obtain the second indicator of each frequency. The first indicator and the second indicator of each frequency are input into a pre-trained logistic regression model, and the classification result of whether the sound wave signal of each frequency is interfered with by mechanical vibration noise is output; the logic function of the pre-trained logistic regression model satisfies the following relationship: ; Where, Frequency The probability that the acoustic wave signal is interfered by mechanical vibration noise; 、 as well as are all model parameters; is the frequency in the frequency domain of the mechanical vibration signal The impact factor is defined as the frequency The first indicator of Frequency The second indicator; is a natural constant; The model parameters are determined by fitting training based on a pre-collected training sample set, wherein the training sample set is a sound wave signal containing a mechanical vibration noise label; The acoustic wave signals that are classified as being interfered by mechanical vibration noise are removed, and the remaining acoustic wave signals are used to determine whether there are cracks on the egg surface through a pre-trained crack detection model.

2. The egg crack detection method based on acoustic wave 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 peaks in the spectrogram, and if the ratio of any peak to the sum of all peaks is greater than or equal to a preset value, using the ratio as the probability that the frequency corresponding to the peak is the dominant frequency; If it is less than the preset value, the maximum value among the remaining peaks is obtained, and it is determined whether the difference between any peak and the maximum value is greater than zero. If it is greater than zero, the ratio of the difference between any peak and the maximum value to the sum of all peaks is used as the probability that the frequency corresponding to any peak is the main frequency; otherwise, the probability that the frequency corresponding to any peak is the main frequency is set to zero, so that the frequency with the largest corresponding probability is used as the main frequency of the frequency domain signal.

3. The egg crack detection method based on acoustic wave signals according to claim 2, characterized in that: The frequency difference is a relative difference, and a method for obtaining the relative frequency difference between each frequency in the frequency domain signal and the main frequency includes: The absolute value of the difference between any frequency in the frequency domain signal and the main frequency is calculated, and the ratio of the difference to the main frequency is calculated to obtain the relative frequency difference between the any frequency and the main frequency.

4. The egg crack detection method based on acoustic wave signals according to claim 2, characterized in that: The amplitude difference is a relative difference, and a method for obtaining the relative amplitude difference between each frequency in the frequency domain signal and the main frequency includes: The absolute value of the difference between the amplitude value modulus length of any frequency in the frequency domain signal and the main frequency is calculated, and the ratio of the difference to the amplitude value modulus length corresponding to the main frequency is calculated to obtain the relative difference in amplitude between the any frequency and the main frequency.

5. The egg crack detection method based on acoustic wave signals according to claim 1, characterized in that: In the pre-trained logistic regression model, when the probability that the sound wave signal of any frequency is interfered with by mechanical vibration noise is greater than a preset classification threshold, the pre-trained logistic regression model classifies the sound wave signal of any frequency into a category interfered with by mechanical vibration noise; otherwise, the sound wave signal of any frequency is classified into another category.

6. The egg crack detection method based on acoustic wave signals according to claim 1, 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 sound 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 sound wave signals at the any frequency.

7. The egg crack detection method based on acoustic wave signals according to claim 1, characterized in that: After acquiring the acoustic wave signals at a plurality of preset positions on the surface and the mechanical vibration signals of the surrounding environment, the method further includes: The sound wave signals and the mechanical vibration signals are standardized.

8. The egg crack detection method based on acoustic wave signals according to claim 1, characterized in that: The preset positions include the middle position of the egg surface and the two end positions of the egg surface.

Citation Information

Patent Citations

  • Method for detecting creak of eggs of poultry

    CN101358950A

  • Poultry eggshell crack detection method and device

    CN104833724A