Method for analyzing breeding state of giant panda based on collar sensing data
By identifying and correcting the reference displacement segment in the collar sensing data through edge computing, the interference of collar wearing posture drift on the analysis of giant panda reproductive status was resolved, and accurate reproductive status analysis under edge computing conditions was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SICHUAN RES INST OF GIANT PANDA SCI
- Filing Date
- 2026-05-06
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies, when using collar sensor data to analyze the reproductive status of giant pandas, have difficulty distinguishing between changes in the collar's reference position and actual behavioral changes, leading to errors in the analysis results. In particular, when the collar rotates or shifts slightly during actions such as scratching, rubbing, rolling, lying prone, and climbing, it is difficult to accurately determine the reproductive status.
By performing edge computing on the collar sensing data, similar action segments are identified and paired, reference displacement segments are extracted, displacement correction is performed, and continuous behavioral change relationships are extracted from the corrected sensing sequence to distinguish between collar reference position changes and actual behavioral changes.
It effectively suppressed the interference of collar wearing posture drift on the reproductive status analysis results, improved the consistency of cross-time period behavior comparison, reduced the impact of single behavior fluctuations on change identification results, and formed traceable continuous behavior analysis results.
Smart Images

Figure CN122139675A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of animal behavior monitoring and sensor data processing technology, and more specifically, to a method for analyzing the reproductive status of giant pandas based on collar sensor data. Background Technology
[0002] In the technical practice of analyzing the reproductive status of giant pandas using collar sensor data, the current processing focus is usually on identifying individual behavioral changes based on information such as acceleration, angular velocity, posture changes and activity rhythms continuously collected by the collar, and forming corresponding status judgments accordingly. In engineering implementation, the raw sensor data is first filtered, normalized, and the posture is calculated or the coordinates are corrected on the collar side or near-end processing side, and then the activity amplitude, rotational changes, static-dynamic switching and movement rhythm are extracted for subsequent analysis. Taking the continuous monitoring of giant pandas wearing collars in breeding bases or semi-natural habitats as an example, on the one hand, it is required to continuously provide usable analysis results without long-term transmission of full raw data and without excessively increasing the frequency of human contact; on the other hand, it is necessary to deal with the situation where the collars rotate slightly, shift locally, or change in tightness during scratching, rubbing, rolling, lying down, and climbing. Under such usage conditions, the following phenomenon repeatedly occurs on site: the same type of actual behavior will show obvious changes in amplitude distribution, overall rewriting of three-axis projection relationship or collective shift in posture representation in adjacent time periods. The existing processing link is difficult to determine whether this difference comes from the giant panda's own behavior changes or from the change of collar reference position. As a result, it is easy to mistake the sensing difference caused by the change of wearing status as the basis for the change of reproductive status. The technical problem this application aims to solve is: how to distinguish between real behavioral changes and collar reference position changes in collar sensing data under edge computing conditions, so as to avoid the interference of collar wearing posture drift on the analysis results of giant panda reproductive status. Summary of the Invention
[0003] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a method for analyzing the reproductive status of giant pandas based on collar sensing data. This method identifies changes in the collar reference position by performing pre- and post-processing pairings of similar action segments, performs displacement correction on the reference displacement segments, and extracts continuous behavioral change relationships from the corrected sensing sequence. This distinguishes between actual behavioral changes and collar reference position changes in the collar sensing data, thereby solving the problems mentioned in the background art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a method for analyzing the reproductive status of giant pandas based on collar sensor data, comprising: S1. Read the three-axis acceleration data, three-axis angular velocity data and time markers continuously collected by the collar, sort them into segments according to time sequence, extract repetitive motion segments with consistent attitude rise and fall directions and similar duration, and output the motion segment table. S2. The edge computing side performs similar pairing on the action segments in the action segment table that are in the same continuous monitoring round and belong to the same action type. It compares the order of changes in three-axis acceleration, the order of changes in three-axis angular velocity, and the corresponding order of peak positions of each axis item by item. The segment segment where the order of the three items changes at the same time is determined as the reference displacement segment, and the reference displacement table is output. S3. Based on the reference displacement table, perform axial corresponding rearrangement and amplitude corresponding mapping on the paired segments before and after each reference displacement segment to obtain the displacement correction relationship and write it into the corresponding sensing data segment, and output the correction sequence table. S4. Divide the corrected sequence list into continuous segments according to time sequence, extract the static holding time, round-trip activity order, head-turning switching order and activity concentration segment, organize the changes before and after according to the segmentation order, and output the behavior relationship table. S5. Perform joint comparison on the static holding time change direction, round-trip activity order change direction, head-turning switching order change direction and activity concentration area migration direction of adjacent segments in the behavior relationship table from the edge computing side. Determine the segment group in which at least two types of directions are consistent among multiple consecutive adjacent segments as the reproduction-related behavior change segment and output the behavior change table. S6. Merge and organize the behavior change table according to time sequence, merge the reproductive-related behavior change segments that are sequential and have the same direction of change into reproductive-related behavior process segments, and output the analysis results of giant panda reproductive-related behaviors.
[0005] In a preferred embodiment, S1 includes: S11. Align the triaxial acceleration data, triaxial angular velocity data and time markers after they are sorted in time segments, extract the position and duration of each axis from rising to falling and from falling to rising in each segment, and generate a segmented rise and fall sequence. S12. Perform a sequential comparison of each axis based on the segment rise and fall sequence of adjacent segments. Connect adjacent segments with consistent order of axis changes and corresponding duration differences that change in the same direction as candidate repeating segments, and output a candidate repeating segment table. S13. Perform a pre- and post-check on each candidate repeating segment in the candidate repeating segment table. Determine the candidate repeating segments with consistent start and stop directions and corresponding durations within the segments as repeating action segments and write them into the action segment table.
[0006] In a preferred embodiment, S2 includes: S21. The edge computing side selects action segments that are in the same continuous monitoring round and belong to the same action type from the action segment table, generates front and back pairing groups according to time sequence, extracts the three-axis acceleration change sequence string, the three-axis angular velocity change sequence string and the peak position sequence string of each axis from each front and back pairing group, and writes the front and back pairing groups with complete three types of sequence strings and no duplicate positions into the order pairing table. S22. For each pair of preceding and following segments in the order pairing table, calculate the triaxial acceleration reverse pairing, triaxial angular velocity reverse pairing, and peak position misalignment pairing between the preceding and following segments. Determine the preceding and following pairing groups with consistent position transformation relationships as stable pairing groups and write their position transformation relationships into the stable correspondence table.
[0007] In a preferred embodiment, S2 further includes: S23. Based on the stable correspondence table, perform front-to-back expansion on adjacent stable pairing groups, connect adjacent stable pairing groups with the same position transformation relationship and the pairing segments connected front and back as candidate displacement segments, and perform reverse back substitution verification on each candidate displacement segment. Write the candidate displacement segments whose front segment sequence string after back substitution corresponds to the original back segment sequence string position by position into the candidate displacement segment table. S24. Perform a before-and-after comparison on each candidate displacement segment in the candidate displacement segment table. The candidate displacement segments in which the order of triaxial acceleration change, the order of triaxial angular velocity change, and the order of peak position of each axis all change in the same order between the front and back segments and are continuously connected by each stable pairing group within the segment are determined as reference displacement segments and written into the reference displacement table.
[0008] In a preferred embodiment, S3 includes: S31. The edge computing side performs axis position expansion on the same type of paired segments before and after each reference displacement segment according to the preceding segment, following segment and position transformation relationship of each reference displacement segment in the reference displacement table, generating the preceding segment axis position sequence, following segment axis position sequence and axis position correspondence table. The preceding segment axis position sequence is rearranged according to the position transformation relationship and compared with the following segment axis position sequence position by position. The axis position pairs with the same axis position name and the same change direction are written into the valid correspondence table. S32. Perform amplitude mapping calculation on each axis pair according to the effective correspondence table. For each axis pair, extract the peak value, valley value, peak-valley interval of the previous segment and the peak value, valley value, peak-valley interval of the subsequent segment respectively. Construct a three-equation simultaneous relationship between the peak value, valley value, and peak-valley interval of the previous segment and the subsequent segment peak value, valley value, and peak-valley interval of the subsequent segment respectively after amplitude transformation. Solve the amplitude mapping formula of each axis pair and collect the amplitude mapping formulas of each axis pair into an intra-segment mapping group.
[0009] In a preferred embodiment, S3 further includes: S33. Perform forward mapping on the triaxial acceleration data and triaxial angular velocity data at each sampling time within the reference displacement segment according to the intra-segment mapping group, and perform time-by-time difference back substitution on the mapped triaxial acceleration data and triaxial angular velocity data with the coaxial position data of the subsequent segment to generate a time difference sequence. Determine the intra-segment mapping group in the time difference sequence that has the same sign of difference and whose absolute value of difference does not increase in time as the displacement correction relationship, and write it into the corresponding sensing data segment. S34. Perform a sequential check on each corresponding sensing data segment after writing the displacement correction relationship. Combine the sampling time before the reference displacement segment, each sampling time within the reference displacement segment, and the sampling time after the reference displacement segment into a continuous correction segment. Perform sequential recalculation on the triaxial acceleration change order, triaxial angular velocity change order, and peak position order of each axis in the continuous correction segment. Write the continuous correction segment whose recalculation result corresponds to the original order after the reference displacement segment into the correction sequence table.
[0010] In a preferred embodiment, S4 includes: S41. Expand the triaxial acceleration data, triaxial angular velocity data and time markers in the correction sequence list in the order of adjacent sampling times, extract the amplitude difference group and direction difference group between adjacent sampling times, and combine the continuous sampling times where the amplitude difference group is all zero and the direction difference group remains unchanged into a static segment. Calculate the time difference between the time before and after each static segment to form the static holding time, and write the non-static segments arranged in chronological order between adjacent static segments into the active segment table. S42. Based on the alternating order of positive and negative triaxial acceleration and triaxial angular velocity of each activity segment in the activity segment table, determine the round-trip activity order for activity segments with opposite directions in front and behind and passing through the same direction sequence in the middle, determine the turning switching order for activity segments where the dominant angular velocity axis changes position between adjacent sampling times, and determine the time segment where the number of sampling times in a continuous activity segment increases and then decreases continuously as the activity concentration segment, and output the segmented behavior table; S43. Perform a before-and-after comparison on adjacent segments in the segmented behavior table according to the time sequence. Write the difference between the static holding time of the next segment and the static holding time of the previous segment, the difference between the round-trip activity order of the next segment and the round-trip activity order of the previous segment, the difference between the turn-to-turn order of the next segment and the turn-to-turn order of the previous segment, and the difference between the start and end times of the activity concentration section of the next segment and the start and end times of the activity concentration section of the previous segment into the relationship items of the corresponding segments to form a behavior relationship table.
[0011] In a preferred embodiment, S5 includes: S51. The edge computing side assigns positive, negative and zero-direction labels to the differences in static holding time, round-trip activity order, turning and switching order, and start and end time of the activity concentration section between each adjacent segment in the behavior relationship table, and writes the four types of labels between the same adjacent segments into the direction group table in a fixed field order. S52. Based on the direction group table, perform the continuation and expansion of consecutive adjacent segments. Connect the direction items with the same mark position and the same mark value in the adjacent direction groups into a continuous direction chain. Write the segments contained in the same continuous direction chain into the corresponding linked list in sequence. Determine the segment group with two or more direction items in each corresponding linked list and consecutive continuation of the segments as candidate change segments. S53. Perform reverse verification on the candidate change segments, and determine the segment group where the marker values of the corresponding direction items between the last segment and the previous segment of the candidate change segment are consistent and there is no direction item back jump within the candidate change segment as the reproduction-related behavior change segment, and write it into the behavior change table.
[0012] In a preferred embodiment, S6 includes: S61. Arrange the reproductive-related behavioral change segments in the behavior change table according to their start times. Determine adjacent reproductive-related behavioral change segments whose end times and start times are consecutive and whose corresponding direction group marker values are consistent as successor segments, and output the successor segment pair table. S62. Based on the succession segment pair table, perform serial expansion on the succession segment pairs that are consecutively succeeded. Determine the continuous segment groups in each succession segment pair where there are no non-succession reproduction-related behavior change segments inserted between the start time of the first segment and the end time of the second segment as candidate process segments, and output the candidate process segment table. S63. Perform a pre- and post-verification check on each candidate process segment in the candidate process segment table. Determine the candidate process segments whose corresponding direction group marker values of the preceding and following segments are consistent and whose reproductive-related behavior change segments within the segment are consecutively inherited in chronological order as reproductive-related behavior process segments. Write the start time, end time, and corresponding direction group of each reproductive-related behavior process segment into the analysis results of giant panda reproductive-related behavior.
[0013] The technical effects and advantages of this invention are as follows: 1. This scheme separates the collar reference position change from the actual behavior change by pairing the same action type before and after, identifying position change and extracting the reference displacement segment, thereby relatively suppressing the interference of wearing posture drift on the reproductive status analysis results; 2. Perform axis rearrangement, amplitude mapping, and time-by-time back-substitution verification on the paired segments before and after the reference displacement segment to ensure that the corrected sensor data maintains a consistent expression standard with subsequent segments, thereby relatively improving the consistency of cross-time period behavior comparison. 3. Extract the static holding time, round trip activity sequence, head turning switching sequence, and activity concentration segment from the corrected sequence list, and construct a behavior relationship table according to adjacent segments, thereby organizing discrete sensing changes into a behavior relationship chain that can be continuously analyzed. 4. Assign directional labels to the various differences in the behavior relationship table and expand them into continuous directional chains. Then, combine this with reverse verification to identify the reproductive-related behavioral change segments, thereby relatively reducing the impact of single behavioral fluctuations on the change identification results. 5. Merge the reproductive-related behavioral change segments that are sequential and have the same direction group into reproductive-related behavioral process segments, and write the start time, end time and corresponding direction group to form a traceable continuous behavioral analysis result. Attached Figure Description
[0014] Figure 1 This is a flowchart outlining the method steps of the present invention. Detailed Implementation
[0015] 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.
[0016] Refer to the instruction manual appendix Figure 1 The present invention provides a method for analyzing the reproductive status of giant pandas based on collar sensor data, comprising: S1. Read the three-axis acceleration data, three-axis angular velocity data and time markers continuously collected by the collar, sort them into segments according to time sequence, extract repetitive motion segments with consistent attitude rise and fall directions and similar duration, and output the motion segment table. In this embodiment, the purpose of S1 is to extract stable structures that reflect the repetition of the same basic movement from the continuously sampled data of the collar after it has been segmented and organized chronologically, providing a unified input for subsequent matching, reference displacement identification, and displacement correction. Its mechanism is as follows: first, a one-to-one correspondence is established between the triaxial acceleration data, triaxial angular velocity data, and time markers at the same sampling moment; then, the position of each axis change and its corresponding duration are extracted from each segment to form a comparable segmented rise and fall sequence; subsequently, candidate repeating segments are screened out using the consistency of the order and the consistency of the duration difference between adjacent segments; finally, a final verification is performed based on the correspondence between the forward and backward directions and the duration, ensuring that the results written into the movement segment table simultaneously possess temporal continuity and movement structure consistency. This implementation process includes the following steps: In S11, the inputs are the triaxial acceleration data, triaxial angular velocity data, and time markers, all segmented and organized chronologically. First, using the time marker as the alignment key, the X-axis acceleration, Y-axis acceleration, Z-axis acceleration, X-axis angular velocity, Y-axis angular velocity, and Z-axis angular velocity values under the same time marker are written to the same sampling record. Then, within each segment, the difference between adjacent sampling values at the same axis position is calculated chronologically. The sampling time when the difference changes from positive to negative is determined as the position of change from rising to falling, and the sampling time when the difference changes from negative to positive is determined as the position of change from falling to rising. The interval between two adjacent change positions is then recorded. The time difference is determined as the corresponding duration. For cases where the difference between adjacent sampled values is consecutively zero, the moment before the consecutive zero value interval is taken as the corresponding change position. For cases where no change in the sign of the difference occurs at a certain axis position within a segment, the axis position is recorded as an unchanging axis position and an empty identifier is written in the corresponding field of this segment. It does not participate in the subsequent sequential comparison of this segment. After extracting the change position and corresponding duration of each axis, the combination of the change position from rising to falling, the change position from falling to rising, and the corresponding duration of each axis is written into the current segment record according to the fixed field order of the X-axis, Y-axis, and Z-axis, generating the segment rise and fall sequence for S12 to read. In S12, the input is a segmented start-stop sequence arranged chronologically. First, two adjacent segments are selected as adjacent segment groups according to the order of their start times. Then, within each adjacent segment group, the positions of the coaxial changes of the preceding and following segments are compared sequentially according to the fixed field order of the X-axis, Y-axis, and Z-axis. The positions of each change in the same axis are numbered according to their order of appearance to form a sequence number. The sequence number arrangement of the preceding and following segments is compared to see if they are consistent. If the sequence numbers are consistent, the difference of the corresponding duration is calculated, and it is determined whether the differences of all corresponding durations in the same adjacent segment group are all positive, all negative, or all zero. Adjacent segment groups that satisfy the condition that the order of the changes of each axis is consistent and the differences of the corresponding durations change in the same direction are connected to form candidate repeating segments. If any axis position is missing or changes, any axis position sequence number cannot be matched, or the duration difference within the same adjacent segment group shows both positive and negative signs, the connection of the adjacent segment group is terminated and not written into the candidate duplicate segment table; for the connection results that pass the comparison, the candidate duplicate segment number, the previous segment number, the next segment number, the included segment number group, the sequence correspondence of each axis, and the duration difference sign group are written to form the candidate duplicate segment table for S13 to read; In S13, the input quantities are the candidate repeating segment table and the segment rise and fall sequence corresponding to the candidate repeating segment. First, for each candidate repeating segment in the candidate repeating segment table, its preceding segment rise and fall sequence, following segment rise and fall sequence, and intermediate segment number group are read. Then, the rise and fall directions of the preceding and following segments are compared according to the fixed field order of the X-axis, Y-axis, and Z-axis. The result that the direction of the same change position of the preceding and following segments on the corresponding axis is both from rising to falling or both from falling to rising is determined to be consistent in rise and fall direction. Based on the consistency of rise and fall direction, the corresponding duration of the preceding segment, following segment, and intermediate segments is checked before and after. The duration difference sign between each adjacent segment in the same candidate repeating segment is compared with the duration difference sign group written in S12 item by item. When the item-by-item comparison is consistent, the candidate repeating segment is determined as a repeating action segment and written into the action segment table. The action segment table must include at least the action segment number, the preceding segment number, the following segment number, the included segment number group, the action type field, and the source candidate duplicate segment number. The action type field is determined by the preceding segment's take-off and landing sequence and the following segment's take-off and landing sequence. If the take-off and landing directions of the preceding and following segments are inconsistent, the duration of any segment in the middle is broken, or the candidate duplicate segment contains an empty identifier axis, resulting in an incomplete action structure, the candidate duplicate segment will not be written into the action segment table, and a rejection flag will be written in the corresponding record of the candidate duplicate segment table. Through the above implementation process, a processing chain with sequential connection and field closure is formed between the segmented take-off and landing sequences, the candidate duplicate segment table, and the action segment table. This allows S2 to directly perform the same action type pairing based on the action segment table without having to return to the original sampled data to perform duplicate screening. At the same time, the change position from rising to falling and from falling to rising, the corresponding duration, the axis-by-axis sequence relationship, and the sequential verification relationship are all fixed in the verifiable fields during this implementation process. In practical applications: For example, when continuously monitoring giant pandas wearing collars at breeding bases, the collars output triaxial acceleration data, triaxial angular velocity data, and time markers at fixed sampling intervals. On the edge side, multiple initial segments are first formed according to the continuous sampling time. Then, the position of change on each axis and the corresponding duration are extracted from each initial segment. If the order of the position changes on the X, Y, and Z axes of three consecutive segments is consistent, and the difference in the corresponding duration is positive, they are first connected as the same candidate repeat segment. Then, the correspondence between the rise and fall directions of the preceding and following segments and the duration of the middle segment of the candidate repeat segment is checked. When all correspondences are consistent, the candidate repeat segment is written into the action segment table as a repeat action segment, thus providing a stable and reusable input basis for subsequent reference displacement segment identification.
[0017] S2. The edge computing side performs similar pairing on the action segments in the action segment table that are in the same continuous monitoring round and belong to the same action type. It compares the order of changes in three-axis acceleration, the order of changes in three-axis angular velocity, and the corresponding order of peak positions of each axis item by item. The segment segment where the order of the three items changes at the same time is determined as the reference displacement segment, and the reference displacement table is output. In this embodiment, the purpose of S2 is to identify the motion representation change segments caused by changes in the collar reference position from the motion segment table, providing stable and referential reference displacement segments for subsequent displacement correction relationship solutions. Its working mechanism is as follows: First, establish a pairing relationship between motion segments of the same motion type within the same continuous monitoring cycle. Then, extract the triaxial acceleration change sequence, triaxial angular velocity change sequence, and peak position sequence of each axis from the preceding and following segments respectively, thereby solving the positional transformation relationship between the preceding and following segments. Subsequently, perform inheritance expansion and reverse substitution verification on adjacent stable pairing groups with the same positional transformation relationship to screen out candidate displacement segments that can be continuously explained by the same positional transformation relationship. Finally, through before-and-after comparison and continuous inheritance verification within segments, candidate displacement segments that meet the overall consistency are written into the reference displacement table. This implementation process includes the following steps: In S21, a pairing group for positional change analysis is formed from the action segment table, and the three types of sequence strings required for subsequent comparison are fixed in the order pairing table. The input is the action segment table, which includes at least the action segment number, the collar identifier, the continuous monitoring round number, the action type field, the start time, the end time, the source segment number group, and the corresponding segment rise and fall sequence. The edge computing side first groups the action segment table according to the collar identifier, the continuous monitoring round number, and the action type field. Within the same group, the segments are sorted according to the start time. Only two action segments that are adjacent in time are selected to generate a pairing group, where the earlier one is recorded as the earlier segment and the later one is recorded as the later segment. Subsequently, the source segment number groups corresponding to the preceding and following segments are read respectively. Within each source segment number group, the sequential numbers of the three-axis acceleration change positions are extracted according to the fixed field order of the X-axis, Y-axis, and Z-axis to form a three-axis acceleration change sequence string. The sequential numbers of the three-axis angular velocity change positions are extracted to form a three-axis angular velocity change sequence string. Then, the sequential numbers of the peak positions are extracted according to the order of the peak occurrence time of each axis to form a peak position sequence string for each axis. The peak position is the sampling time with the largest absolute value in the main change segment of the same action segment. If there are multiple peaks with the same absolute value in the same axis position, the sampling time with the earlier time is taken as the peak position of that axis position. Among them, the action segment is formed by the candidate repeated segment through front and back verification. The action segment table is written with the segment number group. Therefore, the source object corresponding to the previous segment and the next segment is the source segment number group. The subsequent three-axis acceleration change sequence string, three-axis angular velocity change sequence string and peak position sequence string of each axis are all extracted from their respective source segment number groups. After the three types of sequence strings are extracted, check whether each pairing group contains the corresponding fields of the X-axis, Y-axis, and Z-axis and whether there are no duplicate sequence numbers in the same type of sequence string. Write the pairing groups that meet the conditions into the sequence pairing table. The sequence pairing table should at least contain the pairing group number, the previous segment number, the next segment number, the three-axis acceleration change sequence string, the three-axis angular velocity change sequence string, and the peak position sequence string of each axis, and make it available for S22 to read. If only one action segment of a certain action type appears in the same continuous monitoring round, a certain action segment is missing the source segment number group, a certain axis does not have a valid change position or peak position, or there are duplicate sequence numbers in the same type of sequence string, do not generate a pairing group or write it into the sequence pairing table, and write an unpaired mark or an incomplete sequence mark in the corresponding record of the action segment table. In S22, a unified position transformation relationship is calculated for the preceding and following pairs in the order pairing table, and the preceding and following pairs that can be explained by the same position transformation relationship are fixed as stable pairs; the input is the order pairing table; firstly, the triaxial acceleration change sequence string, triaxial angular velocity change sequence string, and peak position sequence string of each axis are read for each preceding and following pair; within the triaxial acceleration change sequence string, the order pairs where the preceding segment is in the order first and the following segment is in the order second are generated into triaxial acceleration reverse sequence pairs; within the triaxial angular velocity change sequence string, triaxial angular velocity reverse sequence pairs are generated in the same way; within the peak position sequence string of each axis, peak position misalignment pairs are generated for peak position pairs where the preceding and following segments have different order ranks. Subsequently, the inverse pairings of triaxial acceleration, triaxial angular velocity, and peak position misalignment were converted into position transformation relationships. These relationship records the correspondence between the original and target positions in a fixed field order; for example, the first position corresponds to the second, the second to the third, and the third to the first. When the position transformation relationships for the inverse pairings of triaxial acceleration, triaxial angular velocity, and peak position misalignment are completely identical, the paired group is defined as a stable pairing, and the position transformation relationship is written into the stable pairing. The stable correspondence table should at least include the stable pairing group number, the preceding segment number, the following segment number, the position transformation relationship, the source order pairing group number, and the corresponding continuous monitoring round number, for S23 to read. For cases where the three types of position transformation relationships are inconsistent, any reverse pairing group or misaligned pairing group is empty and cannot form a complete position transformation relationship, or the same preceding segment corresponds to multiple following segments and all form consistent position transformation relationships, only the preceding and following pairing groups corresponding to the following segment whose start time is immediately adjacent to the end time of the preceding segment are written into the stable correspondence table, and the remaining preceding and following pairing groups are written into conflict records and are not included in the subsequent continuation and expansion. In S23, continuously connected stable pairing groups are expanded from the stable correspondence table, and candidate displacement segments that can be continuously explained by the same position transformation relationship are screened out through reverse substitution verification. The input is the stable correspondence table. First, the stable correspondence table is grouped according to the continuous monitoring round number and position transformation relationship. Within the same group, it is sorted according to the order of the start time of the previous segment. The adjacent stable pairing groups whose previous segment number is equal to the subsequent segment number of the previous stable pairing group, and whose previous segment start time is immediately after the subsequent segment end time of the previous stable pairing group by one sampling interval, are determined as adjacent stable pairing groups that are connected one step ahead. The adjacent stable pairing groups that meet the condition of being connected one step ahead are expanded to connect the adjacent stable pairing groups with the same position transformation relationship and connected one step ahead to form candidate displacement segments. The previous stable pairing group number, the subsequent stable pairing group number, the number group of all included stable pairing groups, and the corresponding position transformation relationship of the candidate displacement segment are written into the candidate displacement segment table. The previous stable pairing group number and the subsequent stable pairing group number represent the start boundary and the end boundary of the candidate displacement segment, respectively. Subsequently, a reverse substitution verification is performed on each candidate displacement segment. Specifically, the position transformation relationship of each stable pairing group in the candidate displacement segment is read, and the sequence of triaxial acceleration changes, triaxial angular velocity changes, and peak position sequences of each axis in the later segment are substituted back into the field order of the previous segment according to the inverse permutation result of the position transformation relationship. Then, the sequence of the previous segment after substitution is compared with the original sequence of the previous segment position by position. If the three types of sequence strings correspond to each other position by position under the fixed field order of the X-axis, Y-axis, and Z-axis, the stable pairing group is considered to have passed the reverse substitution verification. When all stable pairings within a candidate displacement segment pass the reverse substitution verification, the candidate displacement segment is written into the candidate displacement segment table and read by S24. If any stable pairing within a candidate displacement segment has any positional inconsistency with the original previous segment sequence string after substitution, or if a stable pairing that has not entered the same positional transformation relationship group is inserted between the candidate displacement segment and the previous segment, or if there is a time break within the candidate displacement segment, the candidate displacement segment is not written into the candidate displacement segment table, and a failure to inherit or a failure to substitute is written into the corresponding record in the stable correspondence table. In S24, overall consistency confirmation is performed on the candidate displacement segments, and candidate displacement segments that can reflect changes in the collar reference position are written into the reference displacement table. The input quantities are the candidate displacement segment table, the stable correspondence table, and the three types of sequence strings corresponding to the previous segment and the next segment of the candidate displacement segment. First, for each candidate displacement segment, the sequence string of the previous segment corresponding to the previous stable pairing group and the sequence string of the next stable pairing group are read. The three-axis acceleration change order, the three-axis angular velocity change order, and the corresponding order of the peak positions of each axis between the previous segment and the next segment are compared according to the fixed field order of the X-axis, Y-axis, and Z-axis to see if the position transformation is consistent with the internal position transformation of the candidate displacement segment. That is, after the position transformation relationship written by the candidate displacement segment is transformed, each position of the previous segment can be corresponding to the corresponding position of the next segment. Then, it is verified whether each stable pairing group within the candidate displacement segment is continuously received in chronological order, and whether the position transformation relationship written by each stable pairing group is consistent with the overall position transformation relationship of the candidate displacement segment. When the comparison between the front and back is valid and the continuous receipt within the segment is valid, the candidate displacement segment is determined as the reference displacement segment, and the reference displacement segment number, the previous segment number, the next segment number, the number of the included stable pairing group, the continuous monitoring round number, the action type field, and the position transformation relationship are written into the reference displacement table for S3 to read. If any kind of sequence between the front and back segments does not have a position transformation consistent with that within the segment, if there is an inconsistency in the position transformation relationship of the stable pairing group within the candidate displacement segment, or if the time span of the candidate displacement segment spans two continuous monitoring rounds, the candidate displacement segment is not written into the reference displacement table, and an inconsistency marker or a round span marker is written into the corresponding record in the candidate displacement segment table. Through the above implementation process, a closed processing chain is formed between the sequence pairing table, stable correspondence table, candidate displacement segment table, and reference displacement table, from local order extraction, position transformation calculation, continuous inheritance expansion to overall consistency confirmation. This ensures that the generated reference displacement segment can simultaneously satisfy the four constraints of the same continuous monitoring round, the same action type, the same position transformation relationship, and continuous inheritance. At the same time, the preceding and following pairing groups, stable pairing groups, and candidate displacement segments all retain the source number, position transformation relationship, and time inheritance relationship. Subsequently, S3 can directly read the preceding segment, following segment, and position transformation relationship in the reference displacement table to solve the displacement correction relationship without having to return to the action segment table to perform reference displacement identification. In practical applications: For example, within the same continuous monitoring cycle, four action segments of the same action type are sequentially denoted as action segment A, action segment B, action segment C, and action segment D. The edge calculation side first generates three pairing groups AB, BC, and CD, and extracts the sequence of three-axis acceleration changes, the sequence of three-axis angular velocity changes, and the sequence of peak positions for each axis, respectively. If the three pairing groups all obtain the same positional transformation relationship after S22, and AB and BC, and BC and CD satisfy the connection between the front and back in S23 and are verified by reverse substitution, then A, B, C, and D are connected as the same candidate displacement segment. Subsequently, in S24, it is further verified that the sequence of the preceding segment corresponding to action segment A is consistent with the sequence of the following segment corresponding to action segment D after transformation by the positional transformation relationship, and the stable pairing groups within the candidate displacement segment maintain continuous connection. Then, the corresponding segments of A, B, C, and D are written into the reference displacement table as reference displacement segments, thus providing direct input for subsequent displacement correction relationship calculation.
[0018] S3. Based on the reference displacement table, perform axial corresponding rearrangement and amplitude corresponding mapping on the paired segments before and after each reference displacement segment to obtain the displacement correction relationship and write it into the corresponding sensing data segment, and output the correction sequence table. In this embodiment, the purpose of S3 is to form a displacement correction relationship that can be written into the corresponding sensing data segment based on the reference displacement segment, the preceding segment, the following segment, and the position transformation relationship in the reference displacement table, and to output a correction sequence table that can be directly read for subsequent behavior relationship extraction. The mechanism is as follows: first, establish the axis position correspondence between the preceding segment and the following segment, then calculate the amplitude mapping formula for the corresponding axis position, then use the intra-segment mapping group to perform forward mapping and difference back substitution for each sampling time in the reference displacement segment, and finally confirm that the corrected continuous correction segment is consistent with the original order after the reference displacement segment through the continuation check. This implementation process includes the following steps: In S31, an effective axis position correspondence is established between the preceding and following segments to provide input for subsequent amplitude mapping calculations. The input includes a reference displacement table, the original triaxial acceleration data, triaxial angular velocity data, and the original triaxial acceleration data, triaxial angular velocity data, and time identifiers for each reference displacement segment. The edge computing side first reads the reference displacement segment number, the preceding segment number, the following segment number, and the position transformation relationship. Then, it extracts the axis position names and main change directions of the preceding and following segments according to the fixed field order of the X-axis, Y-axis, and Z-axis, generating the preceding segment axis position sequence and the following segment axis position sequence. The main change direction is determined by the cumulative sign of the difference between adjacent sampled values within the corresponding axis position main change segment. A positive cumulative result is recorded as positive, a negative cumulative result is recorded as negative, and a zero cumulative result is determined by the sign of the difference between the numerical values at the preceding and following sampling times of the main change segment. The axis position sequence of the preceding segment is then rearranged according to the positional transformation relationship, and compared position by position with the axis position sequence of the following segment. Axis position pairs with the same axis position name and the same main transformation direction are written into the valid correspondence table. The valid correspondence table must at least include the reference displacement segment number, the preceding axis position name, the following axis position name, the field position, and the positional transformation relationship for S32 to read. If there is missing axis position data in the preceding or following segment, the rearranged axis position names are inconsistent, or the main transformation direction is inconsistent, the axis position pairs are not written into the valid correspondence table. If there are fewer than three valid axis position pairs for the same reference displacement segment, it is considered that the axis position correspondence is incomplete and will not be included in the subsequent calculation. In S32, the amplitude mapping formula for the effective axis pair is solved so that the sampled values in the reference displacement segment can be mapped to the corresponding expression of the subsequent segment according to a unified relationship. The input is the effective correspondence table, the original data of the previous segment and the original data of the subsequent segment corresponding to each axis pair. The edge calculation side extracts the peak value, valley value and peak-valley interval in the main change segment of the previous segment and the peak value, valley value and peak-valley interval in the main change segment of the subsequent segment for each axis pair. The peak value is the sampled value with the largest absolute value in the main change segment, the valley value is the sampled value with the smallest absolute value in the main change segment and not at the same sampling time as the peak value, and the peak-valley interval is the time difference between the sampling time of the peak value and the sampling time of the valley value. Subsequently, using the proportional term, displacement term, and time scaling term as the unsolved variables, a three-equation system is established: the mapping relationship between the peak value of the previous segment and the peak value of the subsequent segment after mapping; the mapping relationship between the valley value of the previous segment and the valley value of the subsequent segment after mapping; and the mapping relationship between the peak-valley interval of the previous segment and the peak-valley interval of the subsequent segment after mapping. The amplitude mapping formula for the current axis position pair is then obtained by solving this system. When the solution result is unique, the amplitude mapping formula is written into the intra-segment mapping group and aggregated into the intra-segment mapping group corresponding to the current reference displacement segment according to the fixed field order of the X-axis, Y-axis, and Z-axis, for S33 to read. If there is no solution to the three-equation system, there are more than two solutions, the peak value and valley value are located at the same sampling time, or the peak-valley interval is zero, the formula is not written into the intra-segment mapping group. If there are fewer than three amplitude mapping formulas that can be solved for the same reference displacement segment, the mapping solution is considered to have failed. In S33, a displacement correction relationship is generated based on the intra-segment mapping group, and the displacement correction relationship is written into the corresponding sensing data segment. The input quantities are the intra-segment mapping group, the triaxial acceleration data, triaxial angular velocity data and subsequent coaxial position data at each sampling time in the reference displacement segment. The edge computing side first performs forward mapping on the triaxial acceleration data and triaxial angular velocity data at each sampling time in the reference displacement segment according to the scaling term, displacement term and time scaling term in the intra-segment mapping group, and obtains the mapped triaxial acceleration data and mapped triaxial angular velocity data. Subsequently, the mapped coaxial position data and the subsequent coaxial position data are subtracted according to the corresponding sampling time to generate a time difference sequence for each axis position. The sign of the difference in the time difference sequence for each axis position is checked to ensure that the absolute value of the difference does not increase sequentially over time. When all axes position meet this condition, the mapping group in the current segment is determined as the displacement correction relationship, and it is written to the corresponding sensor data segment as a new correction field. The correction field includes at least the reference displacement segment number, axis position correspondence, amplitude mapping formula, mapped sample value, and time difference sequence. If any axis position shows a change in the sign of the difference, an increase in the absolute value of the difference sequentially over time, missing coaxial position data in the subsequent segment, or the mapped sampling time cannot be matched, the displacement correction relationship is not written and it is recorded as a failed back-substitution. In S34, the corresponding sensing data segment after the displacement correction relationship is written is subjected to a continuation check, and the correction sequence list is output. The input quantities are the corresponding sensing data segment after the displacement correction relationship has been written, the original data of the previous sampling time of the reference displacement segment, the original data of the next sampling time of the reference displacement segment, and the original order after the reference displacement segment. The edge computing side first forms a continuous correction segment by chronological order of the previous sampling time of the reference displacement segment, each sampling time in the reference displacement segment, and the next sampling time of the reference displacement segment. Then, the difference between adjacent sampling times is recalculated for the triaxial acceleration data and triaxial angular velocity data in the continuous correction segment. The triaxial acceleration change order, triaxial angular velocity change order, and peak position order of each axis are extracted to form the recalculation order result. The recalculation sequence result is then compared with the original sequence after the reference displacement segment, position by position according to the fixed field order of the X-axis, Y-axis, and Z-axis. When the sequence of changes in acceleration, angular velocity, and peak position of each axis are consistent, the continuous correction segment is written into the correction sequence table. The correction sequence table must include at least the continuous correction segment number, the reference displacement segment number, the start time, the end time, the recalculation sequence result, and the source displacement correction relationship for S4 to read. If the reference displacement segment is located at the boundary of the continuous monitoring cycle, causing the previous or subsequent sampling time to be non-existent, the previous or subsequent sampling time within the reference displacement segment is used as the boundary of the continuous correction segment and a boundary correction identifier is written. If any position of the recalculation sequence result is inconsistent, the correction field is missing, or the peak position is repeated, it is not written into the correction sequence table and is recorded as a failure to continue. Through the above implementation process, the effective correspondence table, intra-segment mapping group, displacement correction relationship and correction sequence table form a closed processing chain. The sensing expression within the reference displacement segment is unified to the same reference position caliber, and the correction result is consistent with the original order after the reference displacement segment. At the same time, the correction field and the original field are retained in parallel, which facilitates the subsequent extraction of behavior relationship and source tracing. In practical applications: For example, if a reference displacement segment has its preceding segment, subsequent segment, and position transformation relationship written in the reference displacement table, the edge computing side first rearranges the axis position sequence of the preceding segment according to the position transformation relationship and compares it with the axis position sequence of the subsequent segment to obtain three effective axis position pairs; then, it extracts the peak value, valley value, and peak-valley interval of the three effective axis position pairs respectively, solves three amplitude mapping formulas, and collects them into an intra-segment mapping group; then, it uses the intra-segment mapping group to perform forward mapping on all sampling times within the reference displacement segment, and calculates the difference with the coaxial position data of the subsequent segment time by time. When the signs of the differences of each axis position are consistent and the absolute values of the differences do not increase with time sequence, the intra-segment mapping group is written as the displacement correction relationship; finally, the previous sampling time of the reference displacement segment, each sampling time within the reference displacement segment, and the next sampling time of the reference displacement segment are combined to form a continuous correction segment, and the change order and peak position order are recalculated. When the recalculation result is consistent with the original order after the reference displacement segment position by position, the continuous correction segment is written into the correction sequence table.
[0019] S4. Divide the corrected sequence list into continuous segments according to time sequence, extract the static holding time, round-trip activity order, head-turning switching order and activity concentration segment, organize the changes before and after according to the segmentation order, and output the behavior relationship table. In this embodiment, the purpose of S4 is to extract the static holding duration, round-trip activity sequence, head-turning sequence, and activity concentration segment from the corrected sequence list, which can directly characterize behavioral changes, and to write the before-and-after change relationship between adjacent segments into the behavior relationship table, providing a unified input for subsequent identification of reproduction-related behavioral change segments. The mechanism is as follows: First, the corrected sequence list is expanded according to adjacent sampling times; static segments and active segments are identified based on amplitude difference groups and direction difference groups; then, the round-trip activity sequence, head-turning sequence, and activity concentration segment are extracted within the active segment; finally, before-and-after comparison is performed on adjacent segments to form relationship items written in a fixed manner according to fields. This implementation process includes the following steps: In S41, stationary segments and active segments are distinguished from the correction sequence list, and the stationary holding time is calculated. The inputs are triaxial acceleration data, triaxial angular velocity data, and time markers from the correction sequence list. First, the sampling records in each continuous correction segment are expanded step by step according to the time markers. For each adjacent sampling time, the triaxial acceleration difference and triaxial angular velocity difference are calculated. The amplitude difference group is formed according to the fixed field order of the X-axis, Y-axis, and Z-axis. The signs of each difference are formed into the direction difference group according to the same field order. The difference is greater than zero and recorded as positive, less than zero and recorded as negative, and equal to zero and recorded as zero direction. Then, the continuous sampling time where the amplitude difference group is all zero and the direction difference group is consistent between multiple consecutive adjacent sampling times is combined into a stationary segment. The time marker difference between the time markers of the later time and the earlier time of the stationary segment is used as the stationary holding time. Then, all non-static sampling moments arranged sequentially between two adjacent static segments are combined into an active segment and written into the active segment table. The active segment table must contain at least the active segment number, start time, end time, previous static segment number, and subsequent static segment number for S42 to read. If there is no previous static segment or subsequent static segment at the start or end position of the continuous correction segment, the start or end time of the continuous correction segment is used as the corresponding boundary and a boundary identifier is written. If adjacent sampling moments are missing, time identifiers are not continuous, or correction fields are missing, the expansion of the current continuous correction segment is stopped, and the sampling records before and after the missing position are processed separately. In S42, the reciprocating activity sequence, head-turning sequence, and activity concentration segment are extracted from the activity segment table to form a segmented behavior table. The input quantities are the activity segment table and the corrected triaxial acceleration data, triaxial angular velocity data, and time markers corresponding to each activity segment. First, the triaxial acceleration positive-negative alternation sequence and the triaxial angular velocity positive-negative alternation sequence are extracted for each activity segment according to the time sequence. The positive-negative alternation sequence is generated in the order in which the signs of adjacent sampling differences at the same axis position change from positive to negative and from negative to positive. Then, in the triaxial acceleration positive-negative alternation sequence, the sequence chain in which the previous direction is opposite to the last direction and the middle direction repeats the same direction sequence is searched, and this sequence chain is written as the reciprocating activity sequence. Then, the cumulative absolute values of the three-axis angular velocities at each sampling time within each activity segment are summed, and the axis corresponding to the cumulative value is determined as the dominant angular velocity axis of the local change unit at that sampling time. When the dominant angular velocity axes of adjacent local change units are replaced, the order of replacement is written as the head switching order. At the same time, the number of effective sampling times within each window is counted using a fixed sampling window. The window length of the fixed sampling window is taken from the preset window length in the collar sampling configuration, and the window sliding step size is taken as one sampling interval. The window with the number of effective sampling times continuously increasing and then continuously decreasing in the sequence formed by the window order is counted. The interval is mapped to the original time identifier interval and identified as the activity concentration segment. After the above extraction is completed, the activity segment number, round trip activity order, head turning switching order, start time of the activity concentration segment, end time of the activity concentration segment, and static holding duration of the static segments on both sides of the activity segment are written into the segment behavior table for S43 to read. If there is no complete round trip order chain, the cumulative amount of the angular velocity dominant axis is parallel, or the number of effective sampling times in the fixed sampling window remains unchanged, an empty order identifier is written, a dominant axis is retained according to the fixed field order of X-axis, Y-axis, and Z-axis, or no activity concentration segment is written. In S43, adjacent segments in the segmented behavior table are transformed into directly comparable before-and-after change relationships, forming a behavior relationship table; the input is the segmented behavior table; first, the segments are sorted according to their start times, and two segments that are adjacent in time are identified as adjacent segment pairs, with the earlier segment being the previous segment and the later segment being the next segment; then, the differences between the static holding time of the next segment and the static holding time of the previous segment, the differences between the round-trip activity order of the next segment and the round-trip activity order of the previous segment, the differences between the turning and switching order of the next segment and the turning and switching order of the previous segment, the differences between the start time of the activity concentration section of the next segment and the start time of the activity concentration section of the previous segment, and the differences between the end time of the activity concentration section of the next segment and the end time of the activity concentration section of the previous segment are calculated, where the difference in order is written according to the position difference of the corresponding order item in the fixed field order; Then, write the above differences into the relationship items of the corresponding segments in a fixed field order. The relationship items should include at least the previous segment number, the next segment number, the difference in stationary holding time, the difference in round trip activity order, the difference in turning and switching order, the difference in the starting point of the activity concentration segment, and the difference in the ending point of the activity concentration segment, forming a behavior relationship table for S5 to read. If there is an empty order identifier, a missing activity concentration segment, or a missing stationary holding time in the previous or next segment, write an empty relationship identifier in the corresponding field and do not delete the adjacent segment pair for unified processing during subsequent direction marking. Through the above implementation process, the modified sequence table, activity segment table, segmented behavior table, and behavior relationship table form a closed chain from static identification and activity feature extraction to writing of preceding and following relationships. Subsequent steps can directly perform direction marking and continuous direction chain identification based on the behavior relationship table without having to return to the modified sequence table to re-extract behavior fields. At the same time, the static holding duration, round-trip activity order, head-turning switching order, and activity concentration segment all have fixed sources, fixed fields, and fixed writing order. In practical applications: For example, a continuous correction segment contains continuously sampled corrected triaxial acceleration data, triaxial angular velocity data, and time markers. First, the amplitude difference group and direction difference group are obtained according to adjacent sampling times. The continuous sampling times where the amplitude difference group is all zero and the direction difference group remains unchanged are combined into a static segment, and the static holding time is formed by the time difference before and after the static segment. Then, the non-static sampling times between two adjacent static segments are combined into an active segment. The alternation order of triaxial acceleration positive and negative, the alternation order of triaxial angular velocity positive and negative, the replacement result of the dominant axis of angular velocity, and the active concentration segment are extracted from the active segment. Finally, the difference in static holding time, the difference in round-trip activity order, the difference in head-turning order, and the difference in the start and end times of the active concentration segment are calculated for two segments that are adjacent in time, and written into the behavior relationship table in a fixed field order.
[0020] S5. Perform joint comparison on the static holding time change direction, round-trip activity order change direction, head-turning switching order change direction and activity concentration area migration direction of adjacent segments in the behavior relationship table from the edge computing side. Determine the segment group in which at least two types of directions are consistent among multiple consecutive adjacent segments as the reproduction-related behavior change segment and output the behavior change table. In this embodiment, the purpose of S5 is to transform the difference relationships in the behavior relationship table into a continuously traceable chain of directional changes, and to identify reproduction-related behavior change segments with consistent change characteristics, providing direct input for subsequent merging of behavior process segments. The mechanism is as follows: first, directional markers are generated for the differences in static holding time, round-trip activity order, head-turning order, and start-end time differences of the activity concentration segment. Then, directional items with the same field position and consistent marker values are extended forward according to a fixed field order to form a continuous directional chain. Finally, through a reverse verification that ensures consistency and prevents internal backtracking, candidate change segments that meet the requirements of continuous consistency are written into the behavior change table. This implementation process includes the following steps: In S51, all kinds of differences in the behavior relationship table are uniformly converted into comparable direction marks, and a direction group table required for subsequent development is formed; the input is the behavior relationship table; the edge computing side first reads the static holding time difference, round-trip activity order difference, turning switching order difference, activity concentration section start point difference, and activity concentration section end point difference item by item according to the front segment number and back segment number in the behavior relationship table, and then assigns direction marks to them respectively, where the difference is greater than zero is recorded as positive, the difference is less than zero is recorded as reverse, and the difference is equal to zero is recorded as zero direction; for the migration direction of the activity concentration section, the signs of the start point difference and the end point difference are compared first. When the start point difference and the end point difference are both positive, it is recorded as positive; when they are both negative, it is recorded as reverse; when they are both zero, it is recorded as zero direction; when the signs of the start point difference and the end point difference are different or one of them is an empty relationship mark, it is recorded as a broken direction; Subsequently, the static holding time direction marker, the round trip activity sequence direction marker, the head turn switching sequence direction marker, and the activity concentration segment migration direction marker are written into the direction group record corresponding to the same adjacent segment in a fixed field order to form a direction group table. The direction group table must at least write the previous segment number, the next segment number, the four types of direction markers, and the corresponding behavioral relationship table source number for S52 to read. When there is an empty relationship identifier in the behavioral relationship table, an empty direction identifier is written in the corresponding field position, and the direction group record is not deleted. In S52, consecutive identical directional items are expanded from the directional group table to form candidate change segments; the input is the directional group table; the edge computing side first sorts the directional group table according to the time sequence of the previous segment number and the subsequent segment number, and determines the adjacent directional groups whose previous segment number of the subsequent directional group is equal to the subsequent segment number of the previous directional group, and whose start time of the previous segment of the subsequent directional group is immediately after the end time of the subsequent segment of the previous directional group by one sampling interval as consecutive adjacent segments; then, the expansion is performed according to the positions of four fixed fields: static holding time, round-trip activity order, head-turning switching order, and migration direction of the activity concentration area, and the directional items with the same field position and the same mark value in consecutive adjacent segments are connected into a continuous directional chain, and the previous segment number group and the subsequent segment number group contained in the same continuous directional chain are written into the corresponding linked list in chronological order; After each corresponding linked list is generated, the number of direction items that maintain the same tag value in the corresponding linked list is counted, and the segment numbers between the previous segment and the next segment of the corresponding linked list are checked to see if they are consecutive. When the number of direction items reaches two and the previous and next segments are consecutive, the segment group covered by the corresponding linked list is determined as a candidate change segment and written into the candidate change segment table. The candidate change segment table must at least write the candidate change segment number, the previous segment number, the next segment number, the segment number group contained therein, the position of the corresponding direction item, and the corresponding tag value for S53 to read. When a break direction identifier or an empty direction identifier is written in any field position in the direction group, the expansion will not continue at that field position, but the expansion results of other field positions will be retained. In S53, consistency verification is performed on candidate change segments, and the change segments related to reproduction behavior are output. The inputs are the candidate change segment table and the direction group table. The edge computing side first reads the preceding segment number, the following segment number, the segment number group it contains, the corresponding direction item position and the corresponding tag value for each candidate change segment. Then, based on the segment number group, it reads back all the direction group records inside the candidate change segment and performs a reverse verification on the same direction item position. Specifically, it first compares whether the tag value of the direction item position between the last segment and the preceding segment of the candidate change segment is consistent. Then, it checks whether the tag value of the direction item position inside the candidate change segment shows a direction item backtracking in chronological order. A direction item backtracking refers to the same direction item position showing at least two direction switches inside the same candidate change segment. Zero-direction insertion is counted as one direction switch. When the marker values of the corresponding directional items between the last segment and the previous segment are consistent and there is no directional item back jump within the candidate change segment, the candidate change segment is identified as a reproduction-related behavior change segment and written into the behavior change table. The behavior change table must at least include the reproduction-related behavior change segment number, the previous segment number, the next segment number, the included segment number group, the corresponding directional item position, and the corresponding marker value for S6 to read. If any directional item position within the candidate change segment changes direction twice or more, the marker values of the previous segment and the next segment are inconsistent, or there is a break in the segment number group covered by the candidate change segment, it is not written into the behavior change table, and a review failure flag is written in the corresponding record of the candidate change segment table. Through the above implementation process, the behavior relationship table, direction group table, candidate change segment table, and behavior change table form a closed processing chain consisting of difference marking, continuous acceptance, candidate screening, and reverse verification. Subsequent steps can directly perform process segment merging based on the behavior change table without having to return to the behavior relationship table for direction consistency judgment. At the same time, all four types of direction items are generated, accepted, and verified in a fixed field order, ensuring that the formation criteria of reproduction-related behavior change segments are consistent and the source is traceable. In practical applications: For example, if the difference in static holding time for three consecutive adjacent segments in the behavior relationship table is positive, the difference in the order of multiple round trip activities is written as an empty relationship identifier, the difference in the order of turning around is negative, and the difference in the starting point and ending point of the activity concentration segment is positive, then the edge computing side first generates a positive static holding time marker, a reverse turning around order marker, and a positive activity concentration segment migration marker, and writes them into the direction group table; then, continuous direction chains are expanded in the static holding time field and the activity concentration segment migration field, respectively. When any continuous direction chain covers two direction items and the preceding and following segments are consecutive, the corresponding segment group is written into the candidate change segment table; finally, a reverse review is performed on the candidate change segment. If the marker values of the preceding and following segments are consistent and there is no internal direction item back jump, the candidate change segment is written into the behavior change table.
[0021] S6. Merge and organize the behavior change table according to time sequence, merge the reproductive-related behavior change segments that are sequential and have the same direction of change into reproductive-related behavior process segments, and output the analysis results of giant panda reproductive-related behaviors. In this implementation, the purpose of S6 is to further merge the reproduction-related behavior change segments in the behavior change table into reproduction-related behavior process segments with complete time boundaries and unified direction groups, and output the giant panda reproduction-related behavior analysis results that can directly correspond to the analysis conclusions. The mechanism is as follows: First, based on the start time, end time, and corresponding direction group marker values, adjacent reproduction-related behavior change segments that can be continuously connected are identified. Then, the continuous connecting segments are concatenated and expanded to form candidate process segments that are temporally continuous and have no non-connecting reproduction-related behavior change segments inserted in between. Finally, through front-to-back verification and intra-segment connection verification, the candidate process segments that meet the consistency conditions are written into the giant panda reproduction-related behavior analysis results. This implementation process includes the following steps: In S61, adjacent reproduction-related behavior change segments that can be continuously connected and whose direction groups are consistent are identified from the behavior change table, providing a basis for subsequent serialization and expansion; the input is the behavior change table; first, the behavior change table is sorted according to the start time of each reproduction-related behavior change segment, and two reproduction-related behavior change segments that are adjacent in time are determined as adjacent reproduction-related behavior change segments, where the one with the earlier time is recorded as the previous reproduction-related behavior change segment, and the one with the later time is recorded as the next reproduction-related behavior change segment; Subsequently, the termination time of the previous reproduction-related behavior change segment, the start time of the next reproduction-related behavior change segment, and the corresponding direction group marker values are read. A check is then performed to verify whether the termination time of the previous reproduction-related behavior change segment and the start time of the next reproduction-related behavior change segment are consecutive. Consecutive succession means that the start time of the next reproduction-related behavior change segment is equal to one sampling interval after the termination time of the previous reproduction-related behavior change segment. If contiguous succession is confirmed, the fixed fields of stationary holding time, round-trip activity sequence, head-turning sequence, and migration direction of the activity concentration segment are then sequentially checked. The section compares the direction group marker values of the preceding and following reproductive-related behavioral change segments. Adjacent reproductive-related behavioral change segments that match each other are identified as successor segments and written into the successor segment pair table. The successor segment pair table must at least include the preceding segment number, the following segment number, the starting time of the preceding segment, the ending time of the following segment, and the corresponding direction group marker value for S62 to read. If there is a time gap between adjacent reproductive-related behavioral change segments, inconsistencies in the position marker values of any field in the direction group, or a missing direction group field, the segment is not written into the successor segment pair table, and a non-successor identifier is written in the corresponding record of the behavioral change table. In S62, based on the succession segment pair table, consecutive succession segment pairs are expanded into candidate process segments, excluding cases where non-succession reproduction-related behavior change segments are inserted in the middle; the input quantities are the succession segment pair table and the behavior change table; first, the succession segment pairs are sorted according to the order of the start time of the previous segment in the succession segment pair table, and the succession segment pairs whose previous segment number is equal to the subsequent segment number of the previous succession segment pair are determined as consecutive succession segment pairs; then, the consecutive succession segment pairs are expanded by concatenation, and the consecutive reproduction-related behavior change segments between the start time of the previous segment and the end time of the subsequent segment are merged into a continuous segment group, and all reproduction-related behavior change segment records in the behavior change table between the start time of the previous segment and the end time of the subsequent segment are read, and it is checked whether there are any non-succession reproduction-related behavior change segments that have not entered the current succession chain; When there is no non-receiving reproductive behavior change segment to insert, the continuous segment group is identified as a candidate process segment and written into the candidate process segment table. The candidate process segment table shall at least write the candidate process segment number, the previous segment number, the next segment number, the number group of reproductive behavior change segments included, the start time, the end time, and the corresponding direction group mark value for S63 to read. If there is a numbering break or time overlap between consecutive receiving segment pairs, or if there is a reproductive behavior change segment that has not entered the current receiving chain between the start time of the previous segment and the end time of the next segment, it shall not be written into the candidate process segment table, and a serialization failure mark shall be written in the corresponding record of the receiving segment pair table. In S63, final consistency confirmation is performed on the candidate process segments, and the analysis results of giant panda reproduction-related behaviors are generated. The inputs are the candidate process segment table and the behavior change table. First, for each candidate process segment, its preceding segment number, following segment number, the number group of reproduction-related behavior change segments it contains, the start time, the end time, and the corresponding direction group marker value are read. Then, the direction group marker values of the preceding and following segments are read respectively. The fixed fields of static holding time, round-trip activity order, head turning switching order, and migration direction of the activity concentration area are compared item by item. The candidate process segments whose corresponding direction group marker values of the preceding and following segments are consistent are retained as process segments to be confirmed. Subsequently, a continuous connection check is performed on all the numbered segments of the reproduction-related behavior changes contained within the candidate process segment according to the time sequence. This confirms that adjacent reproduction-related behavior change segments have formed connection pairs in the connection segment pair table, and there are no unconnected records. When the front and rear direction group marker values are consistent item by item and the reproduction-related behavior change segments within the segment are continuously connected in chronological order, the candidate process segment is determined as a reproduction-related behavior process segment. The start time, end time, corresponding direction group, process segment number, and the numbered segments of the reproduction-related behavior changes contained within the process segment are written into the giant panda reproduction-related behavior analysis results. If any field in the front and rear direction group marker values is inconsistent, if any adjacent reproduction-related behavior change segments within the process segment do not form a connection pair, or if the numbered segments of the reproduction-related behavior changes contained within the process segment are broken, the process segment is not written into the giant panda reproduction-related behavior analysis results, and a verification failure mark is written in the corresponding record in the candidate process segment table. Through the above implementation process, the behavior change table, the succession segment pair table, the candidate process segment table, and the analysis results of giant panda reproduction-related behaviors form a closed processing chain consisting of succession identification, serial expansion, and pre- and post-verification. This ensures that the final output not only has a clear start and end time, but also a unified direction group and a complete source change segment number group, facilitating subsequent back-pointing to specific behavior change chains. At the same time, the succession segment pairs, candidate process segments, and reproduction-related behavior process segments are all generated with fixed fields and fixed succession rules. In practical applications: For example, if there are three reproductive-related behavioral change segments arranged chronologically in the behavior change table, and the end time of the first reproductive-related behavioral change segment is consecutive to the start time of the second reproductive-related behavioral change segment, and the end time of the second reproductive-related behavioral change segment is consecutive to the start time of the third reproductive-related behavioral change segment, and the corresponding direction group marker values of the three reproductive-related behavioral change segments are consistent item by item, then the edge computing side first writes the first and second reproductive-related behavioral change segments, and the second and third reproductive-related behavioral change segments into the continuation segment pair table respectively; then it concatenates and expands the two continuation segment pairs into a continuous segment group, and checks that there are no unconnected reproductive-related behavioral change segments between the start time of the first reproductive-related behavioral change segment and the end time of the third reproductive-related behavioral change segment; finally, it performs a front-to-back check on the continuous segment group, and when the direction group marker values of the preceding and following segments are consistent item by item and all reproductive-related behavioral change segments within it are continuously connected, the continuous segment group is written into the giant panda reproductive-related behavior analysis results.
[0022] The working principle of this scheme is as follows: First, from the continuously collected triaxial acceleration data, triaxial angular velocity data, and time markers from the collar, the recurring motion segments are segmented in chronological order and identified. Then, within the same continuous monitoring cycle and the same motion type, the order of changes and peak positions of the preceding and following motion segments are compared item by item to identify the reference displacement segment caused by the change in the collar's reference position. Subsequently, based on the correspondence before and after the reference displacement segment, the sensor data within the reference displacement segment is rearranged in axis position and mapped in amplitude to obtain a corrected sensor sequence. Based on the corrected sequence, the static holding time and reciprocating motion are further extracted. The sequence of activities, the order of head turning and switching, and the concentrated activity areas are analyzed, and the relationship between changes in adjacent segments is organized. Finally, directional consistency analysis is performed on these relationships to identify segments of continuous and consistent reproduction-related behavior changes. These segments that are consecutive and have consistent directional groups are then merged into reproduction-related behavior process segments, thus outputting the analysis results of giant panda reproduction-related behaviors. The core causal relationship of the entire process is: first, the sensor offset caused by changes in the collar reference position is corrected; then, behavioral changes are extracted; and finally, discrete changes are organized into a continuous process. This avoids mistaking changes in collar wearing as changes in giant panda behavior. For example, in breeding bases or semi-natural monitoring scenarios, when a giant panda wearing a collar moves, rolls, rubs, or turns its head, the collar itself may rotate or shift slightly, causing the same type of action to show different axis sequences and amplitude relationships in the sensor data. According to this solution, the edge computing side will first identify repetitive action segments from continuous sampling data, then find out which segment differences actually come from changes in the collar reference position, and perform corrections on these segments. After the correction is completed, observe whether the giant panda's stillness time shortens, its back-and-forth activity increases, its head-turning switching becomes more frequent, and whether its activity gradually concentrates into continuous time periods, and merge these consecutive changes with the same direction. In this way, without relying on long-term full-volume raw data backhaul, and without the need for frequent manual intervention to readjust the collar, it is possible to continuously obtain results of reproduction-related behavioral processes based on collar sensor data.
[0023] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for analyzing the reproductive status of giant pandas based on collar sensor data, characterized in that, include: S1. Read the three-axis acceleration data, three-axis angular velocity data and time markers continuously collected by the collar, sort them into segments according to time sequence, extract repetitive motion segments with consistent attitude rise and fall directions and similar duration, and output the motion segment table. S2. The edge computing side performs similar pairing on the action segments in the action segment table that are in the same continuous monitoring round and belong to the same action type. It compares the order of changes in three-axis acceleration, the order of changes in three-axis angular velocity, and the corresponding order of peak positions of each axis item by item. The segment segment where the order of the three items changes at the same time is determined as the reference displacement segment, and the reference displacement table is output. S3. Based on the reference displacement table, perform axial corresponding rearrangement and amplitude corresponding mapping on the paired segments before and after each reference displacement segment to obtain the displacement correction relationship and write it into the corresponding sensing data segment, and output the correction sequence table. S4. Divide the corrected sequence list into continuous segments according to time sequence, extract the static holding time, round-trip activity order, head-turning switching order and activity concentration segment, organize the changes before and after according to the segmentation order, and output the behavior relationship table. S5. Perform joint comparison on the static holding time change direction, round-trip activity order change direction, head-turning switching order change direction and activity concentration area migration direction of adjacent segments in the behavior relationship table from the edge computing side. Determine the segment group in which at least two types of directions are consistent among multiple consecutive adjacent segments as the reproduction-related behavior change segment and output the behavior change table. S6. Merge and organize the behavior change table according to time sequence, merge the reproductive-related behavior change segments that are sequential and have the same direction of change into reproductive-related behavior process segments, and output the analysis results of giant panda reproductive-related behaviors.
2. The method for analyzing the reproductive status of giant pandas based on collar sensor data according to claim 1, characterized in that: S1 includes: S11. Align the triaxial acceleration data, triaxial angular velocity data and time markers after they are sorted in time segments, extract the position and duration of each axis from rising to falling and from falling to rising in each segment, and generate a segmented rise and fall sequence. S12. Perform a sequential comparison of each axis based on the segment rise and fall sequence of adjacent segments. Connect adjacent segments with consistent order of axis changes and corresponding duration differences that change in the same direction as candidate repeating segments, and output a candidate repeating segment table. S13. Perform a pre- and post-check on each candidate repeating segment in the candidate repeating segment table. Determine the candidate repeating segments with consistent start and stop directions and corresponding durations within the segments as repeating action segments and write them into the action segment table.
3. The method for analyzing the reproductive status of giant pandas based on collar sensor data according to claim 2, characterized in that: S2 includes: S21. The edge computing side selects action segments that are in the same continuous monitoring round and belong to the same action type from the action segment table, generates front and back pairing groups according to time sequence, extracts the three-axis acceleration change sequence string, the three-axis angular velocity change sequence string and the peak position sequence string of each axis from each front and back pairing group, and writes the front and back pairing groups with complete three types of sequence strings and no duplicate positions into the order pairing table. S22. For each pair of preceding and following segments in the order pairing table, calculate the triaxial acceleration reverse pairing, triaxial angular velocity reverse pairing, and peak position misalignment pairing between the preceding and following segments. Determine the preceding and following pairing groups with consistent position transformation relationships as stable pairing groups and write their position transformation relationships into the stable correspondence table.
4. The method for analyzing the reproductive status of giant pandas based on collar sensor data according to claim 3, characterized in that: S2 also includes: S23. Based on the stable correspondence table, perform front-to-back expansion on adjacent stable pairing groups, connect adjacent stable pairing groups with the same position transformation relationship and the pairing segments connected front and back as candidate displacement segments, and perform reverse back substitution verification on each candidate displacement segment. Write the candidate displacement segments whose front segment sequence string after back substitution corresponds to the original back segment sequence string position by position into the candidate displacement segment table. S24. Perform a before-and-after comparison on each candidate displacement segment in the candidate displacement segment table. The candidate displacement segments in which the order of triaxial acceleration change, the order of triaxial angular velocity change, and the order of peak position of each axis all change in the same order between the front and back segments and are continuously connected by each stable pairing group within the segment are determined as reference displacement segments and written into the reference displacement table.
5. The method for analyzing the reproductive status of giant pandas based on collar sensor data according to claim 4, characterized in that: S3 includes: S31. The edge computing side performs axis position expansion on the same type of paired segments before and after each reference displacement segment according to the preceding segment, following segment and position transformation relationship of each reference displacement segment in the reference displacement table, generating the preceding segment axis position sequence, following segment axis position sequence and axis position correspondence table. The preceding segment axis position sequence is rearranged according to the position transformation relationship and compared with the following segment axis position sequence position by position. The axis position pairs with the same axis position name and the same change direction are written into the valid correspondence table. S32. Perform amplitude mapping calculation on each axis pair according to the effective correspondence table. For each axis pair, extract the peak value, valley value, peak-valley interval of the previous segment and the peak value, valley value, peak-valley interval of the subsequent segment respectively. Construct a three-equation simultaneous relationship between the peak value, valley value, and peak-valley interval of the previous segment and the subsequent segment peak value, valley value, and peak-valley interval of the subsequent segment respectively after amplitude transformation. Solve the amplitude mapping formula of each axis pair and collect the amplitude mapping formulas of each axis pair into an intra-segment mapping group.
6. The method for analyzing the reproductive status of giant pandas based on collar sensor data according to claim 5, characterized in that: S3 also includes: S33. Perform forward mapping on the triaxial acceleration data and triaxial angular velocity data at each sampling time within the reference displacement segment according to the intra-segment mapping group, and perform time-by-time difference back substitution on the mapped triaxial acceleration data and triaxial angular velocity data with the coaxial position data of the subsequent segment to generate a time difference sequence. Determine the intra-segment mapping group in the time difference sequence that has the same sign of difference and whose absolute value of difference does not increase in time as the displacement correction relationship, and write it into the corresponding sensing data segment. S34. Perform a sequential check on each corresponding sensing data segment after writing the displacement correction relationship. Combine the sampling time before the reference displacement segment, each sampling time within the reference displacement segment, and the sampling time after the reference displacement segment into a continuous correction segment. Perform sequential recalculation on the triaxial acceleration change order, triaxial angular velocity change order, and peak position order of each axis in the continuous correction segment. Write the continuous correction segment whose recalculation result corresponds to the original order after the reference displacement segment into the correction sequence table.
7. The method for analyzing the reproductive status of giant pandas based on collar sensor data according to claim 6, characterized in that: S4 includes: S41. Expand the triaxial acceleration data, triaxial angular velocity data and time markers in the correction sequence list in the order of adjacent sampling times, extract the amplitude difference group and direction difference group between adjacent sampling times, and combine the continuous sampling times where the amplitude difference group is all zero and the direction difference group remains unchanged into a static segment. Calculate the time difference between the time before and after each static segment to form the static holding time, and write the non-static segments arranged in chronological order between adjacent static segments into the active segment table. S42. Based on the alternating order of positive and negative triaxial acceleration and triaxial angular velocity of each activity segment in the activity segment table, determine the round-trip activity order for activity segments with opposite directions in front and behind and passing through the same direction sequence in the middle, determine the turning switching order for activity segments where the dominant angular velocity axis changes position between adjacent sampling times, and determine the time segment where the number of sampling times in a continuous activity segment increases and then decreases continuously as the activity concentration segment, and output the segmented behavior table; S43. Perform a before-and-after comparison on adjacent segments in the segmented behavior table according to the time sequence. Write the difference between the static holding time of the next segment and the static holding time of the previous segment, the difference between the round-trip activity order of the next segment and the round-trip activity order of the previous segment, the difference between the turn-to-turn order of the next segment and the turn-to-turn order of the previous segment, and the difference between the start and end times of the activity concentration section of the next segment and the start and end times of the activity concentration section of the previous segment into the relationship items of the corresponding segments to form a behavior relationship table.
8. The method for analyzing the reproductive status of giant pandas based on collar sensor data according to claim 7, characterized in that: S5 includes: S51. The edge computing side assigns positive, negative and zero-direction labels to the differences in static holding time, round-trip activity order, turning and switching order, and start and end time of the activity concentration section between each adjacent segment in the behavior relationship table, and writes the four types of labels between the same adjacent segments into the direction group table in a fixed field order. S52. Based on the direction group table, perform the continuation and expansion of consecutive adjacent segments. Connect the direction items with the same mark position and the same mark value in the adjacent direction groups into a continuous direction chain. Write the segments contained in the same continuous direction chain into the corresponding linked list in sequence. Determine the segment group with two or more direction items in each corresponding linked list and consecutive continuation of the segments as candidate change segments. S53. Perform reverse verification on the candidate change segments, and determine the segment group where the marker values of the corresponding direction items between the last segment and the previous segment of the candidate change segment are consistent and there is no direction item back jump within the candidate change segment as the reproduction-related behavior change segment, and write it into the behavior change table.
9. The method for analyzing the reproductive status of giant pandas based on collar sensor data according to claim 8, characterized in that: S6 includes: S61. Arrange the reproductive-related behavioral change segments in the behavior change table according to their start times. Determine adjacent reproductive-related behavioral change segments whose end times and start times are consecutive and whose corresponding direction group marker values are consistent as successor segments, and output the successor segment pair table. S62. Based on the succession segment pair table, perform serial expansion on the succession segment pairs that are consecutively succeeded. Determine the continuous segment groups in each succession segment pair where there are no non-succession reproduction-related behavior change segments inserted between the start time of the first segment and the end time of the second segment as candidate process segments, and output the candidate process segment table. S63. Perform a pre- and post-verification check on each candidate process segment in the candidate process segment table. Determine the candidate process segments whose corresponding direction group marker values of the preceding and following segments are consistent and whose reproductive-related behavior change segments within the segment are consecutively inherited in chronological order as reproductive-related behavior process segments. Write the start time, end time, and corresponding direction group of each reproductive-related behavior process segment into the analysis results of giant panda reproductive-related behavior.