Biosensor-based frozen cattle semen activity real-time detection method
By combining biosensors with impedance and fluorescence intensity signals for synergistic analysis, the weights of the detection model are identified and adjusted, solving the problems of accuracy and real-time performance in frozen semen activity detection and achieving efficient detection of bovine frozen semen activity.
Patent Information
- Application Number
- CN202511039475.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-11
AI Technical Summary
Existing methods for detecting frozen sperm activity rely on a single signal type, which is easily affected by environmental factors, resulting in inaccurate test results and difficulty in reflecting the dynamic changes in frozen sperm activity in real time. Traditional methods are also poorly adaptable to complex samples.
By simultaneously acquiring impedance and fluorescence intensity signals using biosensors, analyzing the response time difference, amplitude distribution, and synergy factor of the two signals, identifying interference periods, and adjusting the weight coefficients of the detection model, real-time detection can be achieved.
It improves the accuracy and stability of frozen sperm activity detection, can reflect the dynamic changes of frozen sperm activity in real time, reduces the influence of human factors, and adapts to complex detection environments.
Smart Images

Figure CN120927636A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of animal husbandry biotechnology, specifically to a method for real-time detection of the activity of frozen semen in breeding cattle based on biosensors. Background Technology
[0002] The detection of semen motility in breeding cattle plays a crucial role in livestock breeding, as its results directly affect breeding efficiency and offspring quality. Currently, commonly used detection methods rely heavily on traditional optical microscopy, manually counting the proportion of motile sperm to determine motility. This method is not only time-consuming and labor-intensive but also easily influenced by the subjective experience of the testing personnel, leading to inconsistent results due to differing judgment standards among individuals.
[0003] With technological advancements, automated testing equipment has emerged. This equipment typically relies on image recognition technology, capturing and analyzing images of sperm motility to determine viability. However, impurities and ice crystals present in frozen sperm samples can interfere with image quality, reducing the accuracy of image recognition. Furthermore, such equipment struggles to capture real-time dynamic changes in sperm motility during testing, often providing only static results at a specific moment, failing to reflect the real-time fluctuations in sperm motility during processing and preservation.
[0004] The emergence of biosensor technology has provided a new approach to the detection of frozen sperm motility, enabling the detection of biological signals to reflect the physiological state of sperm. However, most existing biosensor-based detection methods rely on only a single signal type, such as impedance or fluorescence signals, making it difficult to comprehensively characterize frozen sperm motility. Single signals are susceptible to environmental factors; for example, temperature changes and fluctuations in sample concentration can lead to signal distortion, thus affecting the reliability of the detection results. Furthermore, existing methods do not fully consider the synergistic relationships between signals and the impact of interference factors on the detection results during signal processing, making it difficult to meet the accuracy and stability requirements of real-time detection for practical applications.
[0005] In real-world testing scenarios, the complexity of frozen semen samples often results in signals exhibiting nonlinear characteristics. Traditional linear analysis methods cannot effectively handle these signals, leading to poor adaptability of the detection model. When multiple interfering factors are present in the sample, existing methods struggle to accurately identify and address the interference periods, further reducing the real-time performance and accuracy of the detection. Summary of the Invention
[0006] The purpose of this invention is to provide a method for real-time detection of the activity of frozen bovine semen based on biosensors, so as to solve the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides a method for real-time detection of bovine frozen semen activity based on biosensors, the method comprising: Acquire impedance and fluorescence intensity signals from frozen bovine semen samples collected by a biosensor; The response time difference between the impedance signal and the fluorescence intensity signal is determined based on the changing trends of the two signals within a continuous sampling period. Based on the amplitude distribution of the impedance signal in the segmented time window and the amplitude distribution of the fluorescence intensity signal after the response time difference in the corresponding segmented time window, the signal coordination factor of each segmented time window is determined. Based on the waveform differences, peak differences, and signal cooperation factors of the two signals contained in all segmented time windows, the characteristic interference level of each segmented time window is determined. The interference period is obtained based on the characteristic interference level of all segmented time windows; The signal nonlinear deviation rate is obtained based on the distribution characteristics of all interference periods; By adjusting the weighting coefficients in the activity detection model based on the signal nonlinear deviation rate, real-time detection of the activity of frozen bovine semen can be achieved.
[0008] Preferably, determining the response time difference between the impedance signal and the fluorescence intensity signal includes: The initial range and calculation step size for the response time difference between the two signals are preset; A dynamic correlation function is constructed using the signal values of two signals at different sampling times and the time difference of response between the two signals. The result of the dynamic correlation function is calculated after each calculation during the response time difference traversal process. The response time difference corresponding to the maximum value among all the function results is taken as the response time difference between the impedance signal and the fluorescence intensity signal.
[0009] Preferably, determining the signal coordination factor for each segmented time window includes: Obtain several segmented time windows for the two signals; The matching degree between the amplitude distributions of impedance signal and fluorescence intensity signal within the same segmented time window is calculated and used as the signal coordination factor for that segmented time window.
[0010] Preferably, the method for obtaining the segmented time window is as follows: adaptive framing processing is performed on the impedance signal and the fluorescence intensity signal respectively to obtain several segmented time windows for each of the two signals.
[0011] Preferably, determining the degree of feature interference in each segmented time window includes: For any piecewise time window, the window obtained by adding the response time difference to the piecewise time window of the impedance signal is used as the reference window. Sampling points that overlap with the baseline window within all segmented time windows of the fluorescence intensity signal are counted, and the segmented time windows of the fluorescence intensity signal containing all the overlapping sampling points are merged into a comparison window; The signal consistency coefficient of the segmented time window is determined based on the waveform parameters and peak parameters at the same time points within the reference window and the comparison window. The ratio of the signal coordination factor to the signal consistency coefficient of the segmented time window is denoted as the comprehensive parameter ratio. The average value of the difference between the reference constant and the normalized result of the comprehensive parameter ratio accumulated over all sampling points is taken as the characteristic interference degree of the segmented time window.
[0012] Preferably, determining the signal consistency coefficient for the segmented time window includes: The waveform similarity at the same time point within the baseline window and the comparison window is calculated separately and used as the waveform consistency parameter. The peak deviation at the same time point within the baseline window and the comparison window is calculated separately and used as the peak consistency parameter. The signal consistency coefficient of this segmented time window consists of two parts: waveform consistency parameter and peak consistency parameter. The signal consistency coefficient is positively correlated with the waveform consistency parameter and negatively correlated with the peak consistency parameter.
[0013] Preferably, obtaining the interference period based on the characteristic interference levels of all segmented time windows specifically includes: The characteristic interference level of each segmented time window is calculated separately, and the segmented time window whose characteristic interference level exceeds a set threshold is taken as the interference period.
[0014] Preferably, obtaining the signal nonlinear deviation rate based on the distribution characteristics of all interference periods specifically includes: Obtain the duration of each interference period; Obtain the standard deviation of the duration of all disturbance periods, and use the standard deviation as the characteristic fluctuation value; The ratio of the duration of each disturbance period to the characteristic fluctuation value is taken as the nonlinear deviation component of that disturbance period. Based on the nonlinear deviation components of all interference periods, all the nonlinear deviation components are standardized, and the standardized result of each nonlinear deviation component is used as the signal nonlinear deviation rate.
[0015] Preferably, the step of adjusting the weighting coefficients in the activity detection model according to the signal nonlinear deviation rate to complete the real-time detection of bovine frozen semen activity includes: The product of the difference between the signal nonlinear deviation rate and the correction coefficient and the weight coefficient of the active detection model at the historical detection time is used as the temporary weight coefficient at the current detection time. The median of all temporary weight coefficients is used as the actual weight coefficient of the activity detection model at the current detection time. Based on the actual weight coefficient, the activity detection model is used to calculate the activity detection value, and the activity detection value is used to complete the real-time detection of the activity of frozen bovine semen.
[0016] Preferably, the adaptive framing process includes: Calculate the rate of change of the amplitude of the impedance signal and the fluorescence intensity signal at each sampling point; Sampling points whose amplitude change rate exceeds a preset change threshold are marked as frame boundaries; The signal is divided into several time-continuous segmented time windows based on all frame boundaries, and the length of each segmented time window does not exceed the set maximum window duration.
[0017] Compared with the prior art, the beneficial effects of the present invention are: By simultaneously acquiring impedance and fluorescence intensity signals from biosensors, physiological information about frozen bovine semen can be captured from multiple dimensions. The combination of these two signals, compared to single-signal detection, provides a more comprehensive reflection of the semen's bioactivity characteristics and reduces misjudgments caused by distortion from a single signal.
[0018] In signal processing, analyzing the changing trends of two signals within a continuous sampling period to determine the response time difference helps clarify the temporal correlation between different signals, laying the foundation for subsequent synergistic analysis. Based on the response time difference, dividing the signal into multiple segmented time windows and calculating the signal synergy factor for each window allows for a deeper exploration of the synergistic effect of the two signals at different time periods, thereby more accurately extracting feature information related to frozen sperm activity.
[0019] By considering the waveform differences, peak differences, and signal cooperability factors of the two signals in the time domain, the characteristic interference level of each segmented time window can be determined, which can effectively identify the interference periods in the detection process. Analyzing the distribution characteristics of the interference periods yields the signal nonlinearity deviation rate. Based on this deviation rate, the weight coefficients in the activity detection model are adjusted so that the detection model can adapt to the nonlinear changes of the signal.
[0020] This dynamic adjustment mechanism allows the detection model to maintain good performance even when faced with complex frozen semen samples and changing detection environments. Simultaneously, real-time detection enables timely reflection of dynamic changes in frozen semen activity, facilitating timely adjustments and interventions during frozen semen processing, preservation, and use.
[0021] This method eliminates the need for manual operation and subjective judgment, automating the entire detection process and reducing the impact of human factors. Through multi-signal collaborative analysis and interference processing, the consistency and reliability of the detection results are improved, better meeting the practical needs of livestock breeding for detecting the activity of frozen semen in breeding cattle. Attached Figure Description
[0022] Figure 1 This is a schematic diagram illustrating the working principle of the real-time detection method for bovine frozen semen activity based on biosensors described in this invention. Figure 2 A flowchart for determining the response time difference; Figure 3 A flowchart for adaptive framing processing; Figure 4 A flowchart for determining the degree of feature interference; Figure 5 A flowchart for determining the nonlinear deviation rate of a signal. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] Please see Figure 1 This invention provides a method for real-time detection of bovine frozen semen activity based on biosensors, the method comprising: The biosensor acquires impedance and fluorescence intensity signals from frozen bovine semen samples. It simultaneously collects impedance and fluorescence intensity signals from the sample in the detection environment. These two signals are converted into calculable electrical data by the sensor's signal processing module. The sampling frequency is set according to the detection requirements to ensure the continuity and integrity of the signals over time.
[0025] Based on the changing trends of the two signals within a continuous sampling period, the response time difference between the impedance signal and the fluorescence intensity signal is determined. By analyzing the waveform characteristics of the two signals over time, the sequential relationship of signal fluctuations is captured, and the time difference between the two is calculated based on this. This time difference reflects the delay relationship between the two signals in response to changes in the activity of frozen bovine semen.
[0026] Based on the amplitude distribution of the impedance signal within a segmented time window and the amplitude distribution of the fluorescence intensity signal after the response time difference within the corresponding segmented time window, the signal coordination factor for each segmented time window is determined. The continuous signal sequence is divided into multiple segmented time windows, and the amplitude distribution characteristics of the two signals within each window are statistically analyzed. The signal coordination factor is obtained by calculating the correlation between the distributions. This factor characterizes the coordinated change characteristics of the two signals within the same time window.
[0027] Based on the waveform differences, peak differences, and signal cooperability factors of the two signals contained in all segmented time windows, the characteristic interference level of each segmented time window is determined. For each segmented time window, the waveform and peak parameters of the impedance signal and the fluorescence intensity signal are extracted, the degree of difference between them is calculated, and combined with the signal cooperability factor, the degree of interference to the signal within that window is comprehensively evaluated.
[0028] The interference periods are determined based on the characteristic interference levels of all segmented time windows. The characteristic interference levels of each segmented time window are assessed, and windows with interference levels exceeding a set range are selected. The time intervals corresponding to these windows are marked as interference periods to distinguish between the valid and interfered parts of the signal.
[0029] The signal nonlinear deviation rate is obtained based on the distribution characteristics of all interference periods. The duration and frequency of interference periods are analyzed, and these characteristics are converted into a quantified nonlinear deviation rate through statistical calculations. This deviation rate reflects the degree of nonlinear interference to the signal in the overall time series.
[0030] By adjusting the weighting coefficients in the semen activity detection model based on the signal nonlinearity deviation rate, real-time detection of bovine semen activity can be achieved. The signal nonlinearity deviation rate is used as the adjustment criterion to dynamically correct the weighting coefficients involved in the activity detection model, enabling the model to counteract the effects of nonlinear interference when calculating bovine semen activity, ultimately outputting accurate real-time detection results.
[0031] Example 1: See Figure 2 When determining the response time difference between the impedance signal and the fluorescence intensity signal, it is necessary to preset the initial range of the response time difference between the two signals and the calculation step size. The initial range setting needs to comprehensively consider the signal transmission characteristics of the biosensor, the physiological activity cycle of the bovine frozen semen sample, and interference factors in the detection environment to ensure that all possible time delays of the two signals are covered. The calculation step size needs to be determined in conjunction with the signal sampling frequency. A step size that is too small will increase the computational load, while a step size that is too large may cause the optimal response time difference to be missed. Therefore, a balance must be struck between computational efficiency and accuracy to ensure that the traversal process covers the key time points within the initial range.
[0032] A dynamic correlation function is constructed using the signal values of two signals at different sampling times and the response time difference between the two signals. The construction of the dynamic correlation function must be based on the time series characteristics of the two signals, using the signal values at different sampling times as variables, and reflecting the degree of correlation between the two signals under different response time differences through mathematical transformation. The form of the function must be able to reflect the coordinated change relationship between the signal values; when the two signals show a strong synchronous change trend under a certain response time difference, the function value increases accordingly, and vice versa.
[0033] The dynamic correlation function is calculated after each calculation during the response time difference traversal process. The response time difference corresponding to the maximum value among all function results is taken as the response time difference between the impedance signal and the fluorescence intensity signal. The traversal process sequentially changes the response time difference value according to a set calculation step size, starting from the minimum value in the initial range and gradually increasing to the maximum value. Each adjustment of the response time difference is substituted into the dynamic correlation function for calculation, yielding the corresponding function result. After the traversal is complete, all function results are compared, and the result with the largest value is selected. The response time difference corresponding to this result is the final determined response time difference between the two signals. This time difference best reflects the correlation between the two signals in their changing trends.
[0034] To determine the signal co-factor for each segmented time window, several segmented time windows for both signals must first be obtained. These segmented time windows are obtained by dividing the continuous impedance signal and fluorescence intensity signal into time segments, with each window containing signal data within a continuous time period. The segmentation must consider the natural variation period of the signal to ensure relative stability of the signal characteristics within each window. The number and duration of the windows must be determined based on the signal sampling frequency and detection duration to ensure comprehensive coverage of the entire signal sequence, while avoiding excessively large windows that lead to mixed signal characteristics or excessively small windows that increase computational complexity.
[0035] The matching degree between the amplitude distributions of impedance and fluorescence intensity signals within the same segmented time window is used as the signal coherence factor for that segmented time window. To calculate the matching degree, the amplitude distributions of both signals within the same window need to be statistically analyzed, including amplitude range, frequency of occurrence, and central tendency. The matching degree is obtained by comparing the similarity of these characteristics. The calculation method should be able to quantify the degree of overlap between the distributions. When the amplitude distributions of the two signals are relatively close within the same window, the matching degree is larger, indicating stronger coherence; conversely, a smaller matching degree indicates weaker coherence. The obtained matching degree is the signal coherence factor for that segmented time window, used to characterize the consistency of the amplitude distributions of the two signals within the same time window.
[0036] Example 2: See Figure 3The method for obtaining the segmented time windows involves adaptively framing the impedance signal and the fluorescence intensity signal separately to obtain several segmented time windows for each signal. The core of adaptive framing processing lies in determining the boundaries of the frames based on the signal's own variation characteristics, so that the signal within each segmented time window has relatively stable characteristics, thereby more accurately reflecting the changes in the activity of frozen semen from bovine breeders.
[0037] In the adaptive framing process, the amplitude change rate of the impedance signal and fluorescence intensity signal at each sampling point is first calculated. The calculation of the amplitude change rate requires continuous sampling point data; specifically, it is obtained by dividing the difference between the amplitude of the current sampling point and the amplitude of the previous sampling point by the time interval between the two sampling points (i.e., the sampling period). This value directly reflects the rate of change of the signal at that sampling point; the larger the rate of change, the more drastic the amplitude fluctuation of the signal at that moment; the smaller the rate of change, the relatively stable the amplitude of the signal at that moment. By traversing all sampling points, the amplitude change rate corresponding to each sampling point can be obtained, forming a rate of change sequence with the same length as the original signal.
[0038] Sampling points where the amplitude change rate exceeds a preset threshold are marked as frame boundaries. The preset threshold is set based on the normal fluctuation range of the signal, which can be obtained by analyzing signal data from a large number of historical frozen bovine semen samples, ensuring the ability to distinguish between normal fluctuations and significant changes in the signal. When the amplitude change rate of a sampling point exceeds this threshold, it indicates a significant turning point or abrupt change in the signal at that point, and it is marked as a frame boundary, signifying that the signal has entered a new characteristic phase from that point. Sampling points where the amplitude change rate does not exceed the threshold are not marked as frame boundaries, indicating that they are still within the previous characteristic phase. In this way, all positions with significant changes in the signal sequence can be marked as key nodes for framing.
[0039] The signal is divided into several time-continuous segmented windows based on all frame boundaries, with the length of each segmented window not exceeding a set maximum window duration. During segmentation, the signal between two adjacent frame boundaries is divided into a segmented time window, using the boundary between the two adjacent frames as the start and end points. If the time interval between two adjacent frame boundaries is short and does not exceed the maximum window duration, a single window is formed. If the time interval between adjacent frame boundaries is long and exceeds the maximum window duration, a new frame boundary needs to be added between the two existing boundaries. The location of the added boundary can be determined by uniform division or by re-detecting the local amplitude change rate. The duration of each newly segmented window does not exceed the maximum window duration. This processing method avoids the problem of excessively complex signal features and difficulty in extracting stable features due to excessively long windows, while ensuring strong consistency of signal features within each window.
[0040] Example 3: See Figure 4 When determining the characteristic interference level of each segmented time window, for any given segmented time window, the window containing the impedance signal's segmented time window plus the response time difference is used as the reference window. The purpose of this operation is to align the impedance signal and the fluorescence intensity signal in the time dimension, enabling subsequent signal comparisons to be performed under the same time reference. The start time of the reference window is determined by adding the response time difference to the start time of the original impedance signal's segmented time window, and its end time is correspondingly delayed, with the window duration remaining consistent with the original impedance signal's segmented time window.
[0041] The process involves identifying overlapping sampling points within all time segments of the fluorescence intensity signal compared to the baseline window. These time segments, containing all overlapping points, are then merged into a single comparison window. Specifically, each time segment of the fluorescence intensity signal is compared to the baseline window to determine if any overlap exists. If overlap is found, the sampling points within the overlapping range are recorded. All time segments containing these overlapping points are then merged into a continuous comparison window. This ensures the comparison window completely covers all signal portions overlapping with the baseline window, providing a comprehensive data foundation for detailed comparisons of the two signals.
[0042] The signal consistency coefficient for a segmented time window is determined based on the waveform and peak parameters at the same time point within the baseline and comparison windows. Waveform parameters include indicators reflecting signal morphology characteristics such as rise slope, fall slope, and waveform width; peak parameters include indicators related to signal strength such as peak amplitude and peak occurrence time. By comparing and analyzing these parameters, the degree of consistency between the two signals at the same time point can be quantified.
[0043] The waveform similarity at the same time point within the baseline window and the comparison window is calculated separately as a waveform consistency parameter. When calculating waveform similarity, the waveform parameters of the two signals at the same time point need to be compared one by one, and the similarity is obtained by analyzing the degree of difference between the parameters. The value range of the waveform consistency parameter is usually between 0 and 1. The closer the value is to 1, the more similar the waveform shapes of the two signals are; the closer the value is to 0, the greater the difference in waveform shapes.
[0044] The peak deviation at the same time point within the reference window and the comparison window is calculated separately as the peak consistency parameter. The peak deviation is obtained by calculating the ratio of the difference in peak amplitude of the two signals at the same time point to the peak amplitude of the reference window. The smaller the ratio, the smaller the peak difference, and the closer the peak consistency parameter value is to 0; the larger the ratio, the larger the peak difference, and the closer the peak consistency parameter value is to 1.
[0045] The signal consistency coefficient for this segmented time window consists of two parts: waveform consistency parameter and peak consistency parameter. The formula for calculating the signal consistency coefficient is:
[0046] in, Represents the signal consistency coefficient. Indicates waveform consistency parameters. Indicates the peak consistency parameter. The weighting coefficient, ranging from 0 to 1, is used to adjust the proportions of waveform consistency parameter and peak consistency parameter in the signal consistency coefficient. As shown in the formula, the signal consistency coefficient is positively correlated with the waveform consistency parameter and negatively correlated with the peak consistency parameter. That is, the more similar the waveforms and the smaller the peak differences, the larger the signal consistency coefficient, indicating a higher degree of consistency between the two signals within that time segment.
[0047] The ratio of the signal coherence factor to the signal consistency coefficient within the segmented time window is denoted as the composite parameter ratio. The composite parameter ratio reflects the relative relationship between the signal coherence factor and the signal consistency coefficient. The composite parameter ratio is normalized to map its value to the range of 0 to 1. Normalization can be achieved by dividing the composite parameter ratio by the maximum value of the composite parameter ratios for all segmented time windows, ensuring that the processed results can be compared on a uniform scale.
[0048] The average of the difference between the reference constant and the normalized result of the composite parameter ratio across all sampling points is used as the characteristic interference level of the segmented time window. The reference constant is usually set to 1. Subtracting the normalized result of the composite parameter ratio from 1 yields the interference component corresponding to each sampling point. The larger the value of this component, the higher the interference level at that sampling point. The interference components of all sampling points are summed and then divided by the total number of sampling points. The resulting average value is the characteristic interference level of the segmented time window, used to quantify the overall level of signal interference within that window.
[0049] Example 4: See Figure 5 When determining the interference period based on the characteristic interference levels of all segmented time windows, the characteristic interference level for each segmented time window needs to be calculated. The characteristic interference level is a quantitative index obtained by comprehensively analyzing the coordination, waveform consistency, and peak consistency of the impedance signal and fluorescence intensity signal within the corresponding window. Its value directly reflects the degree of interference to the signal within that window. During the calculation process, based on the determined signal coordination factor and signal consistency coefficient, a pre-defined algorithm flow is followed for derivation, ensuring accurate quantification of the characteristic interference level for each window.
[0050] Segmented time windows where the level of characteristic interference exceeds a set threshold are designated as interference periods. The threshold is determined by considering the interference level of the signal under normal conditions. This is achieved by analyzing a large amount of signal data under interference-free or low-interference conditions, statistically analyzing the distribution range of characteristic interference levels, and using the value at the upper limit of the distribution as the threshold. When the calculated characteristic interference level of a segmented time window exceeds this threshold, it indicates that the signal within that window has been significantly interfered with and has exceeded the normal fluctuation range; this window is then marked as an interference period. Window windows where the characteristic interference level does not exceed the threshold are considered normal periods and do not require marking. In this way, all interference periods can be screened from the entire signal sequence.
[0051] When obtaining the signal nonlinear deviation rate based on the distribution characteristics of all interference periods, the duration of each interference period must first be obtained. Duration refers to the time interval from the start time to the end time of each interference period. Calculation requires accurately extracting the start and end times of each interference period based on the signal's sampling timestamps; the difference between these two timestamps is the duration of that interference period. The unit of duration must match the signal's sampling frequency to ensure the accuracy of the time calculation.
[0052] Obtain the standard deviation of the duration of all interfering periods, and use this standard deviation as the characteristic fluctuation value. Standard deviation is a statistic reflecting the dispersion of a set of data. To calculate it, first find the average duration of all interfering periods, then calculate the square of the difference between each duration and the average, average these squares, and finally take the square root. The result is the standard deviation. The magnitude of the characteristic fluctuation value reflects the overall fluctuation of the duration of all interfering periods. A larger value indicates a more significant difference in the duration of each interfering period; a smaller value indicates that the durations are more similar and the fluctuation is more gradual.
[0053] The ratio of the duration of each disturbance period to the characteristic fluctuation value is used as the nonlinear deviation component of that disturbance period. In the calculation, the duration of a single disturbance period is directly divided by the characteristic fluctuation value; the resulting ratio reflects the degree of deviation of the duration of that disturbance period relative to the overall fluctuation level. When the duration of a disturbance period is much greater than the average, its ratio to the characteristic fluctuation value is large, indicating that the duration of that period deviates significantly from the overall trend; conversely, a smaller ratio indicates a lower degree of deviation.
[0054] Based on the nonlinear deviation components across all interference periods, all nonlinear deviation components are standardized, and the standardized result for each component is used as the signal nonlinear deviation rate. The purpose of standardization is to convert nonlinear deviation components of different magnitudes to a uniform numerical range, facilitating comprehensive analysis of the overall nonlinear deviation level. During the standardization process, the average of all components can be subtracted from each nonlinear deviation component, and then divided by the standard deviation of all components, resulting in a distribution with a mean of 0 and a standard deviation of 1. After standardization, the nonlinear deviation component corresponding to each interference period is converted into a signal nonlinear deviation rate, which more intuitively reflects the impact of each interference period on the overall signal nonlinear characteristics.
[0055] Through the above steps, from identifying the interference period to calculating the duration, and then to calculating the characteristic fluctuation value and nonlinear deviation component, the standardized signal nonlinear deviation rate is finally obtained, which fully presents the distribution characteristics and impact of nonlinear interference in the signal.
[0056] Example 5: To complete the real-time detection of bovine frozen semen activity, the weighting coefficients in the activity detection model are adjusted according to the signal nonlinear deviation rate. The specific value of the signal nonlinear deviation rate must first be determined. The signal nonlinear deviation rate is a standardized index obtained by analyzing the distribution characteristics of all interference periods. It reflects the degree of nonlinear interference on the signal in the overall time series. Its value is related to the severity of the interference; the higher the deviation rate, the more significant the nonlinear interference on the signal.
[0057] The temporary weight coefficient for the current detection time is obtained by multiplying the difference between the signal nonlinearity deviation rate and the correction coefficient by the weight coefficients of the active detection model at historical detection times. The correction coefficient is a preset fixed value, and its setting must consider the model's sensitivity to interference. When the model needs to respond strongly to interference, the correction coefficient is smaller; when it is necessary to weaken the impact of interference to maintain model stability, the correction coefficient is larger. The weight coefficients at historical detection times refer to the weight parameters used by the model under the same or similar detection conditions before the current detection time. These parameters record the model's adjustment experience in historical detections and can provide a reference benchmark for current adjustments. When calculating the temporary weight coefficient, the difference between the signal nonlinearity deviation rate and the correction coefficient is first calculated, and then this difference is multiplied by the historical weight coefficients. The result is the temporary weight coefficient for the current detection time, which initially reflects the adjustment range of the model weights based on the current interference situation.
[0058] The median of all temporary weight coefficients is used as the actual weight coefficient of the activity detection model at the current detection time. Temporary weight coefficients may have multiple different values because the weight coefficients at historical detection times may vary slightly due to subtle differences in detection conditions. The median is the value in the middle after sorting a set of data by size. Choosing the median as the actual weight coefficient avoids the influence of individual extreme temporary weight coefficients on the final result, ensuring the stability of weight adjustment. When calculating the median, all temporary weight coefficients should be arranged in ascending order. If the number of temporary weight coefficients is odd, the middle value is the median; if the number is even, the average of the two middle values is taken as the median.
[0059] Based on actual weighting coefficients, an activity detection model is used to calculate activity detection values, enabling real-time monitoring of bovine frozen semen activity. The activity detection model is a pre-defined algorithm that takes pre-processed impedance and fluorescence intensity signals as input and outputs a detection value reflecting the activity of bovine frozen semen. During calculation, the model weights different features of the two signals according to actual weighting coefficients. The magnitude of the weighting coefficients determines the importance of the corresponding feature in activity assessment. When the actual weighting coefficients are adjusted due to nonlinear interference, the model's weighting method for signal features also changes accordingly, thus offsetting the impact of nonlinear interference on the detection results. The final activity detection value reflects the activity status of bovine frozen semen in real time, allowing testing personnel to determine the activity level and achieve real-time monitoring of bovine frozen semen activity.
[0060] Through the above process, the activity detection model can dynamically adjust the weight coefficients according to the nonlinear interference in the signal, so that the model can always maintain the ability to accurately detect the activity of frozen bovine semen and output reliable detection results regardless of whether the signal is interfered with.
[0061] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0062] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for real-time detection of bovine frozen semen activity based on biosensors, characterized in that, The method includes the following steps: Acquire impedance and fluorescence intensity signals from frozen bovine semen samples collected by a biosensor; The response time difference between the impedance signal and the fluorescence intensity signal is determined based on the changing trends of the two signals within a continuous sampling period. Based on the amplitude distribution of the impedance signal in the segmented time window and the amplitude distribution of the fluorescence intensity signal after the response time difference in the corresponding segmented time window, the signal coordination factor of each segmented time window is determined. Based on the waveform differences, peak differences, and signal cooperation factors of the two signals contained in all segmented time windows, the characteristic interference level of each segmented time window is determined. The interference period is obtained based on the characteristic interference level of all segmented time windows; The signal nonlinear deviation rate is obtained based on the distribution characteristics of all interference periods; By adjusting the weighting coefficients in the activity detection model based on the signal nonlinear deviation rate, real-time detection of the activity of frozen bovine semen can be achieved.
2. The method for real-time detection of bovine frozen semen activity based on biosensors as described in claim 1, characterized in that, The determination of the response time difference between the impedance signal and the fluorescence intensity signal includes: The initial range and calculation step size for the response time difference between the two signals are preset; A dynamic correlation function is constructed using the signal values of two signals at different sampling times and the time difference of response between the two signals. The result of the dynamic correlation function is calculated after each calculation during the response time difference traversal process. The response time difference corresponding to the maximum value among all the function results is taken as the response time difference between the impedance signal and the fluorescence intensity signal.
3. The method for real-time detection of bovine frozen semen activity based on biosensors as described in claim 1, characterized in that, The determination of the signal coordination factor for each segmented time window includes: Obtain several segmented time windows for the two signals; The matching degree between the amplitude distributions of impedance signal and fluorescence intensity signal within the same segmented time window is calculated and used as the signal coordination factor for that segmented time window.
4. The method for real-time detection of bovine frozen semen activity based on biosensors as described in claim 3, characterized in that, The method for obtaining the segmented time window is as follows: adaptive framing processing is performed on the impedance signal and the fluorescence intensity signal respectively to obtain several segmented time windows for each of the two signals.
5. The method for real-time detection of bovine frozen semen activity based on biosensors as described in claim 1, characterized in that, The determination of the characteristic interference level of each segmented time window includes: For any piecewise time window, the window obtained by adding the response time difference to the piecewise time window of the impedance signal is used as the reference window. Sampling points that overlap with the baseline window within all segmented time windows of the fluorescence intensity signal are counted, and the segmented time windows of the fluorescence intensity signal containing all the overlapping sampling points are merged into a comparison window; The signal consistency coefficient of the segmented time window is determined based on the waveform parameters and peak parameters at the same time points within the reference window and the comparison window. The ratio of the signal coordination factor to the signal consistency coefficient of the segmented time window is denoted as the comprehensive parameter ratio. The average value of the difference between the reference constant and the normalized result of the comprehensive parameter ratio accumulated over all sampling points is taken as the characteristic interference degree of the segmented time window.
6. The method for real-time detection of bovine frozen semen activity based on biosensors as described in claim 5, characterized in that, Determining the signal consistency coefficient for the segmented time window includes: The waveform similarity at the same time point within the baseline window and the comparison window is calculated separately and used as the waveform consistency parameter. The peak deviation at the same time point within the baseline window and the comparison window is calculated separately and used as the peak consistency parameter. The signal consistency coefficient of this segmented time window consists of two parts: waveform consistency parameter and peak consistency parameter. The signal consistency coefficient is positively correlated with the waveform consistency parameter and negatively correlated with the peak consistency parameter.
7. The method for real-time detection of bovine frozen semen activity based on biosensors as described in claim 1, characterized in that, The process of obtaining the interference period based on the characteristic interference levels of all segmented time windows specifically includes: The characteristic interference level of each segmented time window is calculated separately, and the segmented time window whose characteristic interference level exceeds a set threshold is taken as the interference period.
8. The method for real-time detection of bovine frozen semen activity based on biosensors as described in claim 1, characterized in that, The method of obtaining the signal nonlinear deviation rate based on the distribution characteristics of all interference periods specifically includes: Obtain the duration of each interference period; Obtain the standard deviation of the duration of all disturbance periods, and use the standard deviation as the characteristic fluctuation value; The ratio of the duration of each disturbance period to the characteristic fluctuation value is taken as the nonlinear deviation component of that disturbance period. Based on the nonlinear deviation components of all interference periods, all the nonlinear deviation components are standardized, and the standardized result of each nonlinear deviation component is used as the signal nonlinear deviation rate.
9. The method for real-time detection of bovine frozen semen activity based on biosensors as described in claim 1, characterized in that, The step of adjusting the weight coefficients in the activity detection model based on the signal nonlinear deviation rate to complete the real-time detection of bovine frozen semen activity includes: The product of the difference between the signal nonlinear deviation rate and the correction coefficient and the weight coefficient of the active detection model at the historical detection time is used as the temporary weight coefficient at the current detection time. The median of all temporary weight coefficients is used as the actual weight coefficient of the activity detection model at the current detection time. Based on the actual weight coefficient, the activity detection model is used to calculate the activity detection value, and the activity detection value is used to complete the real-time detection of the activity of frozen bovine semen.
10. The method for real-time detection of bovine frozen semen activity based on biosensors as described in claim 4, characterized in that, The adaptive framing process includes: Calculate the rate of change of the amplitude of the impedance signal and the fluorescence intensity signal at each sampling point; Sampling points whose amplitude change rate exceeds a preset change threshold are marked as frame boundaries; The signal is divided into several time-continuous segmented time windows based on all frame boundaries, and the length of each segmented time window does not exceed the set maximum window duration.