Remote determination method of giant panda behavior state based on collar sensor
By extracting continuous segments before and after the behavior transition point from the collar sensor and combining the relationship between activity and displacement values, the problem of continuous correlation before and after the behavior transition in the remote discrimination process is solved, and the stability and readability of the discrimination results are improved.
Patent Information
- Application Number
- CN202610485947.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-14
- Publication Date
- 2026-07-10
AI Technical Summary
In the process of using collar sensors for remote identification of giant panda behavior, existing technologies have difficulty preserving the continuous correlation before and after behavior changes under end-to-end collaborative conditions, resulting in insufficient correspondence and stability between the identification results and the actual behavior state.
By extracting continuous segments before and after the behavior transition point, the behavior state is determined based on the relationship between the changes in activity value and displacement value, forming a transition discrimination segment, and merging adjacent consistent segments to generate a remote behavior state sequence.
It improves the correspondence and stability between remote discrimination results and real behavior processes, reduces the jumps in discrimination results between adjacent time periods, and enhances the readability of behavior change processes.
Smart Images

Figure CN122349997A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of animal behavior monitoring technology using collar sensors, and more specifically, to a method for remotely determining the behavioral status of giant pandas based on collar sensors. Background Technology
[0002] In the technology of remotely judging the behavior of giant pandas using collar sensors, the existing processing focus is usually on improving the accuracy of behavior recognition results. A common approach is to continuously collect acceleration, angular velocity, displacement trajectory and body surface related information by the wearer, and send the continuous sampling results to the remote side in segments according to a preset time. The remote side then combines classification rules, statistical features or joint discrimination logic to identify states such as feeding, walking, resting, and alertness. Taking long-term tracking scenarios in wild habitats as an example, collar devices need to work continuously under conditions of limited power supply, limited transmission resources, and inability to rely on on-site video for synchronous verification. At the same time, the remote side also needs to directly form usable conclusions based on the returned data. Under such usage conditions, the continuous behavioral changes are easily divided into multiple independent data segments. This results in similar or even overlapping sensing performances in different segments, such as head-down feeding and slow movement, resting and on-the-spot vigilance, short-term head turning for observation and local disturbance. Furthermore, the same giant panda is repeatedly judged to different states in adjacent time periods, and the judgment results jump back and forth, making it difficult to explain the basis of the changes through a single segment of data. This phenomenon indicates that although the existing end-to-end collaborative processing method completes data collection and remote analysis, it fails to effectively retain the correlation between changes that determine the nature of behavior, thus making it difficult to ensure a stable correspondence between remote judgment results and the actual behavioral process. Therefore, the technical problem to be solved by this application is: how to preserve the continuous correlation before and after the behavior change in the process of remotely judging the behavior state of giant pandas based on collar sensors, under the condition of end-to-end collaboration, so as to improve the correspondence and stability of the remote judgment results to the real behavior state. Summary of the Invention
[0003] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a remote method for determining the behavioral state of giant pandas based on collar sensors. This method determines the behavioral state by extracting continuous segments before and after the behavioral transition point and determining the corresponding change relationship between the segments before and after the transition, thereby solving the problems mentioned in the background art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a remote discrimination method for giant panda behavior state based on collar sensors, comprising: S1. Collect behavioral monitoring data output by the collar during continuous monitoring, arrange the behavioral monitoring data in chronological order according to the sampling time, and calculate the corresponding activity value and displacement value at each sampling time to obtain the monitoring sequence. S2. Based on the direction of change of activity value and the state of change of displacement value at adjacent sampling times in the monitoring sequence, determine the connection time when the direction of change of activity value changes switches and the state of change of displacement value changes at the same time as the behavior transition point, and obtain the set of behavior transition points. S3. For each behavior transition point in the behavior transition point set, extract the pre-transformation segment connected to the behavior transition point forward, extract the post-transformation segment connected to the behavior transition point backward, and form the pre-transformation segment, behavior transition point and post-transformation segment into a transition discrimination segment in sequence to obtain the transition discrimination segment set. S4. Based on each transition discrimination segment in the transition discrimination segment set, compare the corresponding changes between the segments before and after the transition in terms of the continuous change mode of the activity value and the continuous change mode of the displacement value, determine the behavior state corresponding to each transition discrimination segment, and obtain the behavior state result set. S5. Write the set of behavioral state results into the corresponding transition discrimination segment of the monitoring sequence according to the time order of the behavioral transition points, and merge the adjacent transition discrimination segments with the same behavioral state to obtain the remote behavioral state sequence.
[0005] In a preferred embodiment, S1 includes: S1-1. Arrange the behavior monitoring data output by the collar at each sampling time in chronological order of sampling time, and merge the behavior monitoring data with the same sampling time into the data of the same time to obtain the time sequence; S1-2. Calculate the activity value corresponding to each sampling time based on the sum of the absolute values of the differences between the corresponding data at each time point in the time sequence and the data at the previous time point, and obtain the activity sequence. S1-3. Based on the position difference between the position data corresponding to each sampling time and the position data corresponding to the previous sampling time in the time sequence, calculate the displacement value corresponding to each sampling time, and write the activity value and displacement value into the corresponding sampling time to obtain the monitoring sequence.
[0006] In a preferred embodiment, S2 includes: S2-1. Based on the difference between the activity value at each sampling time and the activity value at the previous sampling time in the monitoring sequence, determine the direction of change of the activity value at each sampling time, and record the direction of change of the activity value corresponding to the positive difference as the upward direction, the direction of change of the activity value corresponding to the negative difference as the downward direction, and the direction of change of the activity value corresponding to the zero difference as the level direction, to obtain the sequence of activity value change directions. S2-2. Based on the difference between the displacement value at each sampling time and the displacement value at the previous sampling time in the monitoring sequence, determine the displacement value change state at each sampling time, and record the displacement value change state corresponding to zero difference as the stationary state and the displacement value change state corresponding to non-zero difference as the moving state, thus obtaining the displacement value change state sequence.
[0007] In a preferred embodiment, S2 further includes: S2-3. Based on the sequence of activity value change directions, extract the connection moments that are adjacent to each other and have different activity value change directions. Then, determine the connection moments between the upward and downward directions, the connection moments between the downward and upward directions, the connection moments before and after the level direction connecting the upward and downward directions respectively, and the connection moments before and after the level direction connecting the downward and upward directions respectively as the direction switching moments, and obtain the set of direction switching moments. S2-4. For each direction switching moment in the set of direction switching moments, read the current displacement value change state, the previous displacement value change state, and the next displacement value change state corresponding to that direction switching moment. Then, determine the direction switching moments where the current displacement value change state is different from the previous displacement value change state but the same as the next displacement value change state, as well as the direction switching moments where the current displacement value change state is the same as the previous displacement value change state but different from the next displacement value change state, as behavior transition points, and obtain the set of behavior transition points.
[0008] In a preferred embodiment, S3 includes: S3-1. For each behavior transition point in the set of behavior transition points, read the direction of change of activity value and the state of change of displacement value corresponding to the previous sampling time of the behavior transition point as the forward reference, read the direction of change of activity value and the state of change of displacement value corresponding to the next sampling time of the behavior transition point as the backward reference, and extract the sampling data in the monitoring sequence forward and backward step by step with the behavior transition point as the starting point to obtain the forward extraction sequence and the backward extraction sequence. S3-2. Based on the forward extraction sequence, sequentially determine whether the direction of change of the activity value corresponding to each sampling time is consistent with the forward reference, whether the state of change of the displacement value is consistent with the forward reference, and whether the position difference between the position data corresponding to the sampling time and the position data corresponding to the next sampling time has the same sign as the position difference between the position data corresponding to the previous sampling time and the position data corresponding to the current sampling time. Write the sampling time when all three conditions are met into the forward retention sequence, write the sampling time when only the first two conditions are met or only the last two conditions are met into the forward verification sequence, and use the remaining sampling times as the forward termination time and stop forward extraction to obtain the forward initial segment.
[0009] In a preferred embodiment, S3 further includes: S3-3. Based on the backward extraction sequence, determine in turn whether the direction of change of the activity value corresponding to each sampling time is consistent with the backward reference, whether the state of change of the displacement value is consistent with the backward reference, and whether the position difference between the position data corresponding to the next sampling time and the position data corresponding to the current sampling time has the same sign as the position difference between the position data corresponding to the current sampling time and the position data corresponding to the previous sampling time. Write the sampling time when all three conditions are met into the backward retention sequence, write the sampling time when only the first two conditions are met or only the last two conditions are met into the backward verification sequence, and use the remaining sampling times as the backward termination time and stop backward extraction to obtain the backward initial segment. S3-4. For each sampling moment in the forward verification sequence, compare whether the direction of change of the activity value and the state of change of the displacement value corresponding to the adjacent sampling moments before and after the sampling moment are the same. If both are the same, the sampling moment is incorporated into the forward initial segment. If both are different, the sampling moment and all sampling moments before it are deleted. For each sampling moment in the backward verification sequence, compare whether the direction of change of the activity value and the state of change of the displacement value corresponding to the adjacent sampling moments before and after the sampling moment are the same. If both are the same, the sampling moment is incorporated into the backward initial segment. If both are different, the sampling moment and all sampling moments after it are deleted, thus obtaining the pre-transformation segment and the post-transformation segment.
[0010] In a preferred embodiment, S3 further includes: S3-5. Based on the consistency between the direction of change of activity value and the state of change of displacement value at the last sampling time of the segment before the transformation and the direction of change of activity value and the state of change of displacement value at the sampling time before the behavior transformation point, and the consistency between the direction of change of activity value and the state of change of displacement value at the first sampling time of the segment after the transformation and the direction of change of activity value and the state of change of displacement value at the sampling time after the behavior transformation point, perform boundary correction on the segment before the transformation and the segment after the transformation. If there is inconsistency on either side, delete the sampling time closest to the behavior transformation point on that side and recorrect until both sides are consistent or the segment on that side is empty. When both sides are consistent, the segment before the transformation, the behavior transformation point, and the segment after the transformation are sequentially combined into a transformation discrimination segment. If the segment on either side is empty, delete the behavior transformation point to obtain the set of transformation discrimination segments.
[0011] In a preferred embodiment, S4 includes: S4-1. For each transition discrimination segment in the transition discrimination segment set, extract the continuous segment of the direction of change of activity value, the continuous segment of the state of change of displacement value in the segment before transition, the continuous segment of the direction of change of activity value in the segment after transition, and the continuous segment of the state of change of displacement value in the segment after transition to obtain the continuous segment result. S4-2. Based on the continuous segment results, calculate the directional segment difference between the number of continuous segments in the direction of change of activity value in the segment before the transformation and the number of continuous segments in the direction of change of activity value in the segment after the transformation, and the state segment difference between the number of continuous segments in the state of change of displacement value in the segment before the transformation and the number of continuous segments in the state of change of displacement value in the segment after the transformation, and obtain the segment difference results.
[0012] In a preferred embodiment, S4 further includes: S4-3. Based on the step difference results, determine the corresponding change relationship between the segment before transformation and the segment after transformation in terms of the continuous change mode of the activity value and the continuous change mode of the displacement value. The corresponding change relationship where both the direction step difference and the state step difference are zero is determined as the maintenance relationship. The corresponding change relationship where one of the direction step difference and the state step difference is zero and the other is non-zero is determined as the deflection relationship. The corresponding change relationship where both the direction step difference and the state step difference are non-zero is determined as the transformation relationship. The corresponding change relationship results are obtained. S4-4. Based on the corresponding change relationship results, determine the behavior state corresponding to each transition discrimination segment, and write the behavior state into the corresponding transition discrimination segment to obtain the behavior state result set.
[0013] In a preferred embodiment, S5 includes: S5-1. Write each behavior state result in the behavior state result set into the corresponding transition discrimination segment in the monitoring sequence according to the time order of the corresponding behavior transition point, and record the first sampling time and the last sampling time of each transition discrimination segment as the segment start point and segment end point, respectively, to obtain the writing result; S5-2. Based on the writing result, read the behavior state of two adjacent transition discrimination segments, the segment end point of the previous transition discrimination segment, and the segment start point of the next transition discrimination segment in sequence. Merge two adjacent transition discrimination segments with the same behavior state and no other transition discrimination segments between the segment end point and the segment start point into the same transition discrimination segment. Keep the other two adjacent transition discrimination segments unchanged to obtain the merging result. S5-3. Arrange the transition discrimination segments in the merged result according to the time order of the segment starting point to obtain the remote behavior state sequence.
[0014] The technical effects and advantages of this invention are as follows: 1. By extracting the segments before and after the behavior change point as the center and preserving the continuous correlation before and after the change, the jump in the discrimination results between adjacent time periods can be reduced, and the correspondence and stability between the remote discrimination results and the real behavior process can be improved. 2. By merging behavioral monitoring data according to sampling time and calculating activity values and displacement values separately to form a monitoring sequence, a unified data foundation can be provided for determining the direction of change of activity values, the state of change of displacement values, and the behavioral transition points. 3. By determining the connection point where the direction of change of activity value changes and the state of change of displacement value change simultaneously are the behavior transition points, it is possible to screen out positions with connection significance from continuous monitoring data, and relatively suppress the interference of local fluctuations on the discrimination results. 4. By comparing the corresponding changes in the continuous change patterns of activity values and displacement values between the segments before and after the transformation, the behavioral state can be determined based on the structural differences before and after the transformation, which relatively improves the problem that single-segment data is difficult to interpret the nature of behavior. 5. By writing the behavioral state results into the corresponding transition discrimination segments in chronological order and merging adjacent transition discrimination segments with the same behavioral state, a more continuous remote behavioral state sequence can be formed, which can improve the overall readability of the behavioral change process. Attached Figure Description
[0015] Figure 1 This is a flowchart of the method steps of the present invention. Detailed Implementation
[0016] 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.
[0017] Refer to the instruction manual appendix Figure 1 The present invention provides a remote method for determining the behavioral state of giant pandas based on collar sensors, comprising: S1. Collect behavioral monitoring data output by the collar during continuous monitoring, arrange the behavioral monitoring data in chronological order according to the sampling time, and calculate the corresponding activity value and displacement value at each sampling time to obtain the monitoring sequence. In this embodiment, S1 is used to organize the continuously output data from the collar into a monitoring sequence that can be directly used later. During processing, the data at the same sampling time are first grouped into the same record according to the sampling time. Then, the activity value is calculated based on the data change between two consecutive sampling times, and the displacement value is calculated based on the position change between two consecutive sampling times, so that each record corresponding to each sampling time contains both the activity value and the displacement value. In this way, when judging the direction of the change in activity value, the state of the change in displacement value, and the behavioral transition point, the calculation is based on the same time series record, and there will be no situation where one set of data is taken in the previous step and another set of data is taken in the later step. The implementation process includes the following steps: First, the behavior monitoring data output by the collar at each sampling time is arranged in chronological order of sampling time, and behavior monitoring data with the same sampling time are merged into data for the same time, resulting in a time sequence. Specifically, each behavior monitoring data entry includes a corresponding sampling time. If multiple monitoring data entries exist for the same sampling time, that sampling time is used as the merging criterion, and all monitoring data entries for the same sampling time are written into the same record, forming the data for the same time corresponding to that sampling time. It should be noted that the behavior monitoring data includes at least data reflecting changes in the collar's movement and position data; the former is used for subsequent calculation of activity values, and the latter for subsequent calculation of displacement values. If the arrival order of the original data is inconsistent with the sampling order, it is reordered based on the sampling time. If duplicate records exist for the same sampling time, data with the same field in the duplicate records are merged into the same record. After processing, each sampling time corresponds to one data entry for the same time, and all data entries for the same time are arranged from earliest to latest sampling time, resulting in a time sequence. Next, based on the sum of the absolute values of the differences between the corresponding data at each time point in the time sequence and the corresponding data at the previous time point, the activity value corresponding to each sampling time is calculated to obtain the activity sequence. Specifically, for the current sampling time, the corresponding data at the same time point and the corresponding data at the same time point of the previous sampling time are read, and corresponding data with the same monitoring type and the same field are selected from the two records and paired one by one. For each pair of corresponding data, the difference between the current value and the previous value is calculated, and the absolute value of the difference is taken. Then, all absolute values are accumulated to obtain the activity value corresponding to the current sampling time. The calculation object of the activity value is the data used to reflect the change of the collar movement, excluding position data. Position data is used separately for displacement value calculation. For the first sampling time, since there is no previous sampling time, the activity value of the sampling time is recorded as zero in this embodiment. After completing the calculation of each sampling time in sequence, the activity sequence corresponding to each sampling time is obtained. Then, based on the position difference between the position data corresponding to each sampling time and the position data corresponding to the previous sampling time in the time sequence, the displacement value corresponding to each sampling time is calculated, and the activity value and displacement value are written to the corresponding sampling time to obtain the monitoring sequence. Specifically, the position data of the current sampling time and the position data of the previous sampling time are read, and the method of determining the position difference value is determined according to the recording format of the position data. When the position data is in two-dimensional coordinates, the position difference is the distance between two adjacent two-dimensional coordinates; when the position data is in three-dimensional coordinates, the position difference is the distance between two adjacent three-dimensional coordinates; when the position data has already been expressed... When the position is represented as the position value along the trajectory, the position difference is the absolute value of the difference between the current position value and the previous position value. In this embodiment, the displacement value is the distance between the position coordinates of adjacent sampling times. If the position data of two consecutive sampling times are the same, the displacement value of that sampling time is recorded as zero. For the first sampling time, since there is no previous sampling time, the displacement value of that sampling time is recorded as zero in this embodiment. After the displacement value is calculated, the activity value and the displacement value are written into the record of the corresponding sampling time, so that the record of each sampling time contains the sampling time, activity value and displacement value at the same time, thereby forming a monitoring sequence. Through the above processing, the raw data output by the collar is organized into a monitoring sequence that can be directly calculated. Subsequent steps only need to read the activity value and displacement value along the monitoring sequence moment by moment to continue to determine the direction of change of activity value, the state of change of displacement value and the behavioral transition point, without having to go back to the original data to reorganize it. In practical applications: If the collar outputs multiple monitoring components and position coordinates at a fixed cycle, the multiple monitoring components and position coordinates at the same sampling time are first merged into the same time data, and then a time sequence is formed according to the sampling time sequence. After that, for each sampling time, the values of the same fields in the current time data and the previous time data are subtracted item by item, and the absolute values are accumulated to obtain the activity value of the sampling time. At the same time, the distance between the position coordinates of the current sampling time and the position coordinates of the previous sampling time is calculated to obtain the displacement value of the sampling time. Finally, the activity value and displacement value are written into the record corresponding to the sampling time, thus forming a monitoring sequence that can be directly called by subsequent steps.
[0018] S2. Based on the direction of change of activity value and the state of change of displacement value at adjacent sampling times in the monitoring sequence, determine the connection time when the direction of change of activity value changes switches and the state of change of displacement value changes at the same time as the behavior transition point, and obtain the set of behavior transition points. In this embodiment, S2 is used to find behavior transition points from the monitoring sequence that can characterize the start and end positions of behavior changes. During processing, the direction of activity value change is first determined based on the difference in activity values between adjacent sampling times, and the state of displacement value change is determined based on the difference in displacement values between adjacent sampling times. Then, the position where the direction switch occurs is found from the sequence of activity value change directions, and the state of displacement value change is checked at these positions to see if the state of displacement value change changes synchronously. Only the connection position that satisfies both of these types of change relationships is retained as a behavior transition point. It should be noted that the direction of activity value change is used to reflect the increase or decrease relationship of the collar movement change, and the state of displacement value change is used to reflect whether the current position is in the process of movement. The two together define the behavior transition point to avoid misjudging ordinary fluctuations as behavior changes based solely on the change in the direction of activity value change. To facilitate subsequent point-by-point reading, in this embodiment, the connection time is corresponding to the next sampling time among two adjacent sampling times, and the reading positions of the current state of displacement value change, the previous state of displacement value change, and the next state of displacement value change are unified accordingly. The implementation process includes the following steps: First, based on the difference between the activity value at each sampling time and the activity value at the previous sampling time in the monitoring sequence, the direction of change of the activity value at each sampling time is determined. The direction of change of the activity value corresponding to a positive difference is recorded as the upward direction, the direction of change of the activity value corresponding to a negative difference is recorded as the downward direction, and the direction of change of the activity value corresponding to zero difference is recorded as the neutral direction, thus obtaining the sequence of activity value change directions. In specific processing, for the current sampling time in the monitoring sequence, the activity value at this sampling time and the activity value at the previous sampling time are read, and the difference between the two is calculated. When the difference is greater than zero, the direction of change of the activity value at the current sampling time is recorded as the upward direction; when the difference is less than zero, the direction of change of the activity value at the current sampling time is recorded as the downward direction. When the difference is zero, the direction of change of the activity value at the current sampling time is recorded as the flat direction. It should be noted that the flat direction is not data to be discarded individually, but rather the case where the activity value remains unchanged between adjacent sampling times. When the activity value changes from rising to falling or from falling to rising, one or more flat directions may appear in between. Retaining the flat direction is beneficial for accurately locating the position of the direction switch later. For the first sampling time in the monitoring sequence, since there is no previous sampling time, the direction of change of the activity value at this sampling time is recorded as the flat direction in this embodiment. After processing in the above manner, a sequence of activity value change directions corresponding to each sampling time is obtained. Then, based on the difference between the displacement value at each sampling time and the displacement value at the previous sampling time in the monitoring sequence, the displacement value change state at each sampling time is determined. The displacement value change state corresponding to zero difference is recorded as the stationary state, and the displacement value change state corresponding to non-zero difference is recorded as the moving state, thus obtaining the displacement value change state sequence. In specific processing, for the current sampling time, the displacement value at this sampling time and the displacement value at the previous sampling time are read, and the difference between the two is calculated. When the difference is equal to zero, the displacement value change state at the current sampling time is recorded as the stationary state; when the difference is not equal to zero, the displacement value change state at the current sampling time is recorded as the stationary state. The displacement value change state is recorded as the moving state. It should be noted that the displacement value change state reflects whether the degree of change of the current position has changed, not whether the current position itself is zero. That is, if the displacement values of the current and subsequent sampling times are the same, it is recorded as the stationary state; if the displacement values of the current and subsequent sampling times are different, it is recorded as the moving state. For the first sampling time, since there is no previous sampling time, the displacement value change state of this sampling time is recorded as the stationary state in this embodiment. After processing each sampling time in the monitoring sequence in sequence, the displacement value change state sequence is obtained. Next, based on the sequence of activity value change directions, the connection moments that are adjacent but have different activity value change directions are extracted. The connection moments between the upward and downward directions, the connection moments between the downward and upward directions, the connection moments connecting the upward and downward directions before and after the level direction, and the connection moments connecting the downward and upward directions before and after the level direction are determined as direction switching moments, thus obtaining a set of direction switching moments. In specific processing, the activity value change directions corresponding to two adjacent sampling moments are read in chronological order along the activity value change direction sequence. If the two are the same, it means that no direction switch has occurred at that position and it is not considered for subsequent processing. If the activity value change directions of the previous sampling moment and the next sampling moment are different, a connection position is formed between them, and this connection position is assigned to the next sampling moment. The connection moments are written into the set to be judged. Then, for each connection moment, the combination of its preceding and following directions is judged: if the previous sampling moment is in the upward direction and the current sampling moment is in the downward direction, then the connection moment is determined to be a direction switching moment; if the previous sampling moment is in the downward direction and the current sampling moment is in the upward direction, then the connection moment is also determined to be a direction switching moment; if the current sampling moment is in the level direction, then the direction of change of the activity value of the level direction before and after the previous sampling moment is read. When they are in the upward direction and the downward direction respectively, the connection moment corresponding to the level direction is determined to be a direction switching moment; when they are in the downward direction and the upward direction respectively, the connection moment corresponding to the level direction is also determined to be a direction switching moment. After this processing, both direct switching and switching through the level direction transition can be included in the direction switching moment set. Finally, for each direction switching moment in the set of direction switching moments, the current displacement value change state, the previous displacement value change state, and the next displacement value change state corresponding to that direction switching moment are read. The direction switching moments where the current displacement value change state is different from the previous displacement value change state but the same as the next displacement value change state, and the direction switching moments where the current displacement value change state is the same as the previous displacement value change state but different from the next displacement value change state, are determined as behavior transition points, thus obtaining a set of behavior transition points. Specifically, since the connection moment in this embodiment corresponds to the next sampling moment, the current displacement value change state is taken from the displacement value change state of the sampling moment corresponding to that direction switching moment; the previous displacement value change state is taken from the displacement value change state of the sampling moment before that sampling moment; and the next displacement value change state is taken from the displacement value change state of the sampling moment after that sampling moment. If the current displacement value changes... If the current displacement value change state is different from the previous displacement value change state, and the current displacement value change state is the same as the next displacement value change state, it indicates that the displacement value change state has transitioned from the previous state to the next state at the moment of directional switching and continues on the next side. This moment of directional switching is determined as a behavior transition point. If the current displacement value change state is the same as the previous displacement value change state, and the current displacement value change state is different from the next displacement value change state, it indicates that the displacement value change state has changed after the moment of directional switching. This moment of directional switching is also determined as a behavior transition point. In other cases, it indicates that the displacement value change state has not formed a clear transition connection at the moment of directional switching, and this moment of directional switching is not retained as a behavior transition point. For directional switching moments at the end of the sequence where the next displacement value change state cannot be obtained, they are not included in the set of behavior transition points in this embodiment. After completing the above screening, the set of behavior transition points is obtained. Through the above processing, the simple increase / decrease relationship of activity value and change of displacement value in the monitoring sequence can be further converged to a small number of positions with clear connection characteristics. This yields a set of behavioral transition points that can be directly used for subsequent extraction of pre-transition and post-transition segments. It should be noted that the activity value change direction sequence provides the position of directional change, the displacement value change state sequence further filters out positions with only local fluctuations without forming a connection of position changes, and the flat direction is used to retain the transition between rise and fall. Therefore, the entire processing chain can separate the true turning point in behavioral change from the continuous monitoring data. In practical applications: If the activity value in a certain monitoring sequence successively increases, remains unchanged for a short time, and then decreases, and the corresponding displacement value changes from one set of stable differences to another set of stable differences between adjacent sampling times, then the direction of change of the activity value in this segment is first recorded as the upward direction, the level direction, and the downward direction, and then the position of the level direction is determined as the direction switching time. Then, the current displacement value change state corresponding to the direction switching time and the displacement value change state on the side before and after it are read. If the current displacement value change state is different from the previous displacement value change state and the same as the next displacement value change state, or the current displacement value change state is the same as the previous displacement value change state and different from the next displacement value change state, then the direction switching time is retained as the behavior transition point, and the segment before and after the transition is extracted around the behavior transition point in subsequent steps.
[0019] S3. For each behavior transition point in the behavior transition point set, extract the pre-transformation segment connected to the behavior transition point forward, extract the post-transformation segment connected to the behavior transition point backward, and form the pre-transformation segment, behavior transition point and post-transformation segment into a transition discrimination segment in sequence to obtain the transition discrimination segment set. In this embodiment, S3 is used to extract data directly connected to the behavior transition point from the monitoring sequence, and to form a transition discrimination segment that can be used for subsequent behavior state determination. During processing, instead of simply truncating data forward and backward at fixed lengths, the direction of change of activity value and the state of change of displacement value immediately preceding and following the behavior transition point are first used as the forward and backward references, respectively. Then, the data is retrieved moment by moment along the monitoring sequence to both sides, ensuring that the segment before the transition remains continuous with the state before the behavior transition point, and that the segment after the transition remains continuous with the state after the behavior transition point. The reason for using the sampling time before and after the behavior transition point as references is that the behavior transition point itself has already been transformed by... Since the direction of change of activity value and the state of change of displacement value are determined, these two sampling moments can most directly represent the instantaneous state before and after the behavior transition point. Furthermore, during the forward and backward extraction process, not only are the continuity of the direction of change of activity value and the state of change of displacement value checked, but also the continuity of the direction of change of position is checked. Among them, the position difference is the signed difference between adjacent sampling moments of the position quantity advancing along the trajectory. Positive values are considered to have the same sign, negative values are considered to have the same sign, zero values are not considered to have the same sign as positive or negative values, and two consecutive zero values are considered to have the same sign. In this way, the continuous segments that are truly connected to the behavior transition point can be retained, and the sampling data that deviates from the original change relationship in the middle can be excluded. The implementation process includes the following steps: First, for each behavior transition point in the set of behavior transition points, the direction of change of activity value and the state of change of displacement value corresponding to the previous sampling time of the behavior transition point are read as the forward reference, and the direction of change of activity value and the state of change of displacement value corresponding to the next sampling time of the behavior transition point are read as the backward reference. Then, starting from the behavior transition point, the sampling data in the monitoring sequence are extracted forward and backward time by time to obtain the forward extraction sequence and the backward extraction sequence. Specifically, the sampling time corresponding to the behavior transition point is first located in the monitoring sequence, and then the records of the previous and next sampling times are read. The direction of change of activity value and the state of change of displacement value corresponding to the previous sampling time are used as the forward reference to constrain the continuity relationship of the data before the behavior transition point, and the direction of change of activity value and the state of change of displacement value corresponding to the next sampling time are used as the backward reference to constrain the behavior transition. The continuation relationship of the data after the point is determined; subsequently, starting from the behavior transition point, records in the monitoring sequence are read one by one backward according to the sampling time, and written into the forward extraction sequence according to the reading order; simultaneously, starting from the behavior transition point, records in the monitoring sequence are read one by one backward according to the sampling time, and written into the backward extraction sequence according to the reading order; it should be noted that each record in the forward extraction sequence and the backward extraction sequence retains the corresponding activity value change direction, displacement value change state, and position data for subsequent item-by-item judgment; if the behavior transition point is located at the beginning of the monitoring sequence and the previous sampling time cannot be obtained, then the behavior transition point does not participate in the forward extraction; if the behavior transition point is located at the end of the monitoring sequence and the next sampling time cannot be obtained, then the behavior transition point does not participate in the backward extraction; in this embodiment, only behavior transition points that have both the previous sampling time and the next sampling time are processed subsequently; Next, based on the forward extraction sequence, it is sequentially determined whether the direction of change of the activity value corresponding to each sampling moment is consistent with the forward reference, whether the state of change of the displacement value is consistent with the forward reference, and whether the position difference between the position data corresponding to the current sampling moment and the position data corresponding to the next sampling moment has the same sign as the position difference between the position data corresponding to the previous sampling moment and the position data corresponding to the current sampling moment. Sampling moments where all three conditions are met are written into the forward retention sequence, and sampling moments where only the first two conditions or only the last two conditions are met are written into the forward verification sequence. The remaining sampling moments are used as the forward termination moments and forward extraction is stopped, resulting in the forward initial segment. In specific processing, for the current sampling moment in the forward extraction sequence, first compare whether its direction of change of activity value is the same as the forward reference, and then compare whether its state of change of displacement value is the same as the forward reference. Then, read the position data of the previous sampling moment, the current sampling moment, and the next sampling moment, calculate the position difference from the previous sampling moment to the current sampling moment, and the position difference from the current sampling moment to the next sampling moment, and determine whether these two position differences have the same sign. If the activity value is met, the position difference between the previous sampling moment and the current sampling moment has the same sign. If the direction of the dynamic value change is consistent, the state of the displacement value change is consistent, and the sign of the position difference is the same, it indicates that the sampling moment is continuous with the preceding side in terms of direction, state, and position advancement, and this sampling moment is written into the forward retention sequence. If only the direction of the dynamic value change is consistent and the state of the displacement value change is consistent, or only the state of the displacement value change is consistent and the sign of the position difference is the same, it indicates that there is still a partial continuity relationship between this sampling moment and the forward reference, but further verification is needed, and this sampling moment is written into the forward verification sequence. Here, "the direction of the dynamic value change is consistent and the sign of the position difference is the same, but..." is not included. The case of "inconsistent displacement value change states" is written into the forward verification sequence because the displacement value change state directly reflects whether the current position change continues. If the item has deviated from the forward reference, then the sampling time no longer belongs to the same continuous state before the behavior transition point and should be treated as the truncation basis. For the current sampling time that does not belong to the forward retention sequence and the forward verification sequence, it is determined as the forward termination time and the forward extraction is stopped. At this time, the forward initial segment is composed of the sampling times in the forward retention sequence, and the sampling times in the forward verification sequence are not temporarily incorporated. Subsequently, based on the backward extraction sequence, it is sequentially determined whether the direction of change of the activity value corresponding to each sampling moment is consistent with the backward reference, whether the state of change of the displacement value is consistent with the backward reference, and whether the position difference between the position data corresponding to the next sampling moment and the position data corresponding to the current sampling moment has the same sign as the position difference between the position data corresponding to the current sampling moment and the position data corresponding to the previous sampling moment. Sampling moments where all three conditions are met are written into the backward retention sequence, and sampling moments where only the first two conditions or only the last two conditions are met are written into the backward verification sequence. The remaining sampling moments are used as the backward termination moments and backward extraction is stopped, resulting in the backward initial segment. In specific processing, for the current sampling moment in the backward extraction sequence, first compare whether its direction of change of activity value is the same as the backward reference, and then compare whether its state of change of displacement value is the same as the backward reference; then read the previous sampling moment, The position data at the current sampling time and the next sampling time are used to calculate the position difference from the previous sampling time to the current sampling time, and the position difference from the current sampling time to the next sampling time, respectively, and to determine whether these two position differences have the same sign. If all three conditions are met, the sampling time is written into the backward retention sequence. If only the direction of the activity value change is consistent and the state of the displacement value change is consistent, or only the state of the displacement value change is consistent and the position differences have the same sign, the sampling time is written into the backward verification sequence. In other cases, the current sampling time is determined as the backward termination time, and the extraction continues. After processing, the backward initial segment is composed of the sampling times in the backward retention sequence, and the sampling times in the backward verification sequence are not included for the time being. The forward judgment and the backward judgment use the same fields and the same comparison caliber, only the retrieval direction is opposite, thus ensuring that the extraction methods before and after the behavior change point are consistent. Furthermore, for each sampling moment in the forward verification sequence, the direction of change of the activity value and the state of change of the displacement value corresponding to the adjacent sampling moments before and after the sampling moment are compared. If both are the same, the sampling moment is incorporated into the forward initial segment; if they are different, the sampling moment and all previous sampling moments are deleted. For each sampling moment in the backward verification sequence, the direction of change of the activity value and the state of change of the displacement value corresponding to the adjacent sampling moments before and after the sampling moment are compared. If both are the same, the sampling moment is incorporated into the backward initial segment; if they are different, the sampling moment and all subsequent sampling moments are deleted, resulting in the pre-transformation segment and the post-transformation segment. In specific processing, for the current sampling moment in the forward verification sequence, the direction of change of the activity value and the state of change of the displacement value of the previous and next sampling moments are read. If the direction of change of the activity value of the two adjacent sampling moments are the same, and the displacement values of the two adjacent sampling moments are also the same... If the value change states are the same, it means that although the current sampling time does not fully meet the forward retention condition in the single-point judgment, the two sides still maintain the same continuity relationship. Therefore, the sampling time is incorporated into the forward initial segment. If either of the above two items is different, it means that the forward verification sequence has lost the continuous extension condition at the sampling time. At this time, the sampling time and the sampling time further away from the behavior transition point are not included in the pre-transformation segment. That is to say, forward "deletion" means stopping the incorporation to the front from the sampling time. The processing method for the backward verification sequence is the same: if the direction of change of the activity value of the adjacent sampling times before and after the current sampling time is the same and the displacement value change state is the same, the sampling time is incorporated into the backward initial segment; otherwise, the sampling time and the sampling time further away from the behavior transition point are not included in the post-transformation segment. After the above processing, the forward initial segment is verified and supplemented to form the pre-transformation segment, and the backward initial segment is verified and supplemented to form the post-transformation segment. Finally, based on the consistency between the activity value change direction and displacement value change state corresponding to the last sampling time of the pre-transformation segment and the activity value change direction and displacement value change state corresponding to the sampling time before the behavior transition point, and the consistency between the activity value change direction and displacement value change state corresponding to the first sampling time of the post-transformation segment and the activity value change direction and displacement value change state corresponding to the sampling time after the behavior transition point, boundary correction is performed on the pre-transformation and post-transformation segments. If there is inconsistency on either side, the sampling time closest to the behavior transition point on that side is deleted and re-corrected until both sides are consistent or the segment on that side is empty. When both sides are consistent, the pre-transformation segment, the behavior transition point, and the post-transformation segment are sequentially combined into a transformation discrimination segment. If the segment on either side is empty, the behavior transition point is deleted, resulting in a set of transformation discrimination segments. In specific processing, the activity value change direction and displacement value change state corresponding to the last sampling time closest to the behavior transition point in the pre-transformation segment are first read and compared with the activity value change direction and displacement value change state corresponding to the sampling time before the behavior transition point. If both are the same, the front boundary is consistent; if either is different, the front boundary is inconsistent. Then, the activity value change direction and displacement value change state corresponding to the last sampling time closest to the behavior transition point in the post-transformation segment are read. The direction of change of activity value and the state of change of displacement value corresponding to the first sampling moment near the behavior transition point are compared with the direction of change of activity value and the state of change of displacement value corresponding to the next sampling moment after the behavior transition point. If both are the same, the rear boundary is consistent; if either is different, the rear boundary is inconsistent. When inconsistencies exist on both sides simultaneously, in this embodiment, the front side is corrected first, then the rear side is corrected, and the consistency judgment is re-executed after completing one round of bilateral correction. During correction, if the front side is inconsistent, a sampling moment near the behavior transition point in the segment before the transition is deleted, and the new last sampling moment is judged again to see if it is consistent. If the two sides are inconsistent, delete the sampling moment closest to the behavior transition point in the transformed segment, and check again whether the new first sampling moment is consistent; repeat this process until both sides are consistent, or either side of the segment is empty; if both sides are finally consistent, connect the pre-transformation segment, behavior transition point, and post-transformation segment in chronological order to form a complete transformation discrimination segment; if either side of the segment is empty, it means that the behavior transition point lacks complete preceding and following continuity support, and the behavior transition point is not retained; after performing the above processing on each behavior transition point in the behavior transition point set in sequence, the transformation discrimination segment set is obtained; Through the above processing, a transition discrimination segment that is directly connected to each behavior transition point and whose front and back boundaries are self-consistent can be obtained. The forward reference and backward reference respectively define the direction and state that should continue on both sides before and after the behavior transition point. The same sign judgment of position difference further restricts the position advancement relationship. The forward verification and backward verification are used to handle sampling moments with local fluctuations but not really deviating from the original trend. Boundary correction is used to eliminate the situation where the beginning and end of the segment are inconsistent with the state adjacent to the behavior transition point. Therefore, the final retained transition discrimination segment not only retains the continuous change relationship before and after the behavior transition point, but also removes the sampling data that is no longer directly connected to the behavior transition point. In practical applications: When the direction of change of activity value before a certain behavior transition point remains continuously upward and the state of change of displacement value remains continuously moving, and the position data continues to increase along the trajectory advancement direction, these sampling moments are first written into the forward retention sequence; if the direction of change of activity value and the state of change of displacement value at a certain sampling moment are still consistent with the forward reference, but the position difference is interrupted for a short time, then the sampling moment is first written into the forward verification sequence, and then it is determined whether to merge it into the pre-transition segment by the direction of change of activity value and the state of change of displacement value of the adjacent sampling moments before and after it; the post-transition segment is formed in the same way after the behavior transition point; if the last sampling moment of the pre-transition segment closest to the behavior transition point is inconsistent with the sampling moment before the behavior transition point in terms of the direction of change of activity value or the state of change of displacement value, then the last sampling moment is deleted and re-compared; if the first sampling moment of the post-transition segment is inconsistent with the sampling moment after the behavior transition point, then the first sampling moment is deleted and re-compared; when both the front and rear sides have been corrected and are consistent, the pre-transition segment, the behavior transition point, and the post-transition segment are connected in sequence to obtain the transition discrimination segment used for subsequent behavior state determination.
[0020] S4. Based on each transition discrimination segment in the transition discrimination segment set, compare the corresponding changes between the segments before and after the transition in terms of the continuous change mode of the activity value and the continuous change mode of the displacement value, determine the behavior state corresponding to each transition discrimination segment, and obtain the behavior state result set. In this embodiment, S4 is used to determine the behavioral state based on the structural differences between the pre-transformation segment and the post-transformation segment. During processing, instead of directly judging a single sampling moment, continuous segments of the direction of change of activity value and the state of change of displacement value are extracted from both the pre-transformation and post-transformation segments. The number of continuous segments is then used as the representation of the continuous change mode of activity value and displacement value. The difference in the number of continuous segments between the pre-transformation and post-transformation segments is then compared to determine the corresponding change relationship. Finally, the behavioral state is determined based on this corresponding change relationship. It should be noted that the continuous change mode of activity value is represented by the number of continuous segments of the direction of change of activity value, and the continuous change mode of displacement value is represented by the number of continuous segments of the state of change of displacement value. A continuous segment refers to a set of sampling moments within the same segment where the direction of change of activity value is continuously the same or the state of change of displacement value is continuously the same, and there are no other directions of change of activity value or states of change of displacement value in between. By first extracting continuous segments and then comparing their numbers, the continuous change structure between the pre-transformation and post-transformation segments can be directly correlated, avoiding judgment based solely on local changes at individual sampling moments. The implementation process includes the following steps: First, for each transition discrimination segment in the transition discrimination segment set, extract the continuous segments of the activity value change direction, displacement value change state, activity value change direction, and displacement value change state from the segment before transition, respectively, to obtain the continuous segment results. Specifically, first read the segment before and after transition from a given transition discrimination segment, then traverse the sampling time records of each of the two segments sequentially. For the continuous segment of the activity value change direction, use whether the activity value change direction corresponding to adjacent sampling times is the same as the segmentation criterion: if the activity value change direction of two adjacent sampling times is the same, record it in the same continuous segment of the activity value change direction; if the activity value change direction of two adjacent sampling times is different, end the previous continuous segment of the activity value change direction and start from... A new continuous segment of the direction of change of active values begins at the current sampling time. For a continuous segment of the state of displacement value change, the segmentation is based on whether the states of displacement value change are the same at adjacent sampling times: if the states of displacement value change are the same at two adjacent sampling times, they are recorded as the same continuous segment of the state of displacement value change; if the states of displacement value change are different at two adjacent sampling times, the previous continuous segment of the state of displacement value change ends, and a new continuous segment of the state of displacement value change begins at the current sampling time. After processing the segment before and after the transformation in the above manner, the continuous segment result corresponding to the transformation discrimination segment is obtained. The continuous segment result includes at least the continuous segment of the direction of change of active values in the segment before the transformation, the continuous segment of the state of displacement value change in the segment before the transformation, the continuous segment of the direction of change of active values in the segment after the transformation, and the continuous segment of the state of displacement value change in the segment after the transformation. Next, based on the continuous segment results, the directional segment difference between the number of continuous segments in the direction of activity value change in the segment before transformation and the number of continuous segments in the direction of activity value change in the segment after transformation, and the state segment difference between the number of continuous segments in the state of displacement value change in the segment before transformation and the number of continuous segments in the state of displacement value change in the segment after transformation are calculated to obtain the segment difference results. Specifically, the number of continuous segments in the direction of activity value change in the segment before transformation is counted first, then the number of continuous segments in the direction of activity value change in the segment after transformation is counted, and the difference between the two is taken as the directional segment difference. It should be noted that the directional segment difference can be obtained by subtracting the number of continuous segments in the direction of activity value change in the segment after transformation from the number of continuous segments in the direction of activity value change in the segment before transformation. Then, the state segment difference is calculated. The number of consecutive segments with changing displacement values in the preceding segment and the number of consecutive segments with changing displacement values in the following segment are used, and the difference between the two is taken as the state segment difference. It should be noted that the state segment difference can be obtained by subtracting the number of consecutive segments with changing displacement values in the following segment from the number of consecutive segments with changing displacement values in the preceding segment. Since subsequent corresponding changes are determined solely based on whether the segment difference is zero, the direction segment difference and state segment difference can retain both positive and negative results, or simultaneously record their values and whether they are zero. In this embodiment, the original difference results of the direction segment difference and state segment difference are retained, and their zeroness is determined in subsequent steps. After calculating the segment difference for each transformation discrimination segment in the transformation discrimination segment set sequentially, the segment difference result is obtained. Subsequently, based on the segment difference results, the corresponding change relationships between the pre-transformation and post-transformation segments in terms of continuous change patterns of activity values and displacement values are determined. A corresponding change relationship where both direction and state segment differences are zero is defined as a maintenance relationship; a corresponding change relationship where one of the direction and state segment differences is zero and the other is non-zero is defined as a deflection relationship; and a corresponding change relationship where both direction and state segment differences are non-zero is defined as a transformation relationship. The corresponding change relationship results are obtained. In specific processing, for a given transformation segment, the direction and state segment differences corresponding to that segment are first read. If both the direction and state segment differences are zero, it indicates that the pre-transformation and post-transformation segments have not changed in the number of continuous segments in the direction of activity value change and the number of continuous segments in the state of displacement value change. In this case, the corresponding change relationship of the transformation segment is defined as a maintenance relationship. If the direction... If the segment difference is zero but the state segment difference is not zero, or the direction segment difference is not zero but the state segment difference is zero, it means that the segment before and after the transformation only changes in one of the continuous change modes of activity value and displacement value, while the other remains unchanged. In this case, the corresponding change relationship of the transformation segment is determined as a deflection relationship. If the direction segment difference is not zero and the state segment difference is not zero, it means that the segment before and after the transformation changes in both the continuous change mode of activity value and displacement value. In this case, the corresponding change relationship of the transformation segment is determined as a transformation relationship. After processing each transformation segment according to the above rules, the corresponding change relationship results are obtained. It should be noted that the maintenance relationship, deflection relationship, and transformation relationship are the classification results of the structural differences between the segment before and after the transformation, and the subsequent behavior state is determined based on the classification results. Finally, based on the corresponding change relationship results, the behavioral state corresponding to each transition segment is determined, and the behavioral state is written into the corresponding transition segment to obtain a behavioral state result set. Specifically, the corresponding change relationship result of a certain transition segment is first read, and then the behavioral state of that transition segment is determined according to a pre-set relationship correspondence rule. It should be noted that the behavioral state can be a state marker used to distinguish different behavioral change types, or a state name corresponding to a specific behavioral category. In this embodiment, the corresponding change relationship result is used to determine the category to which the behavioral state belongs: when the corresponding change relationship result is a hold-in relationship, the behavioral state corresponding to the transition segment is determined as a hold-in state; when the corresponding change relationship result is a deflection relationship... When determining the relationship, the behavior state corresponding to the transition judgment segment is determined as a deflection state; when the corresponding change relationship result is a transition relationship, the behavior state corresponding to the transition judgment segment is determined as a transition state; after determining the behavior state, the behavior state is written into the corresponding transition judgment segment record, so that each transition judgment segment has a corresponding behavior state; after writing each transition judgment segment in the transition judgment segment set, a behavior state result set is obtained; if it is necessary to further map the hold state, deflection state, and transition state to a specific one of the feeding state, moving state, stationary state, or alert state, then the corresponding relationship can be set based on business needs; in this embodiment, S4 completes the determination of the behavior state's category; Through the above processing, the structural differences between the pre-transformation and post-transformation segments can be converted into directly quantifiable behavioral state results. The extraction of continuous segments provides the continuous structure within the pre-transformation and post-transformation segments. The directional segment difference and state segment difference indicate the degree of difference between the two segments in the continuous change of activity value and displacement value. The corresponding change relationship further converges this difference into a maintenance relationship, a deflection relationship, and a transformation relationship. Ultimately, the determination of the behavioral state is based on the overall correspondence between the pre-transformation and post-transformation segments, rather than on the local changes at a single sampling moment. In practical applications: If the number of continuous segments in the direction of activity value change in a pre-transformation segment is 2 and the number of continuous segments in the state of displacement value change is 1, and the number of continuous segments in the direction of activity value change in a post-transformation segment is also 2 and the number of continuous segments in the state of displacement value change is also 1, then both the direction segment difference and the state segment difference are zero, the corresponding change relationship of this transformation segment is determined to be a maintenance relationship, and its behavior state is written as a maintenance state; if the direction segment difference is zero but the state segment difference is not zero, or the direction segment difference is not zero but the state segment difference is zero, then the corresponding change relationship of this transformation segment is determined to be a deflection relationship, and its behavior state is written as a deflection state; if both the direction segment difference and the state segment difference are not zero, then the corresponding change relationship of this transformation segment is determined to be a transformation relationship, and its behavior state is written as a transformation state; after this processing, each transformation segment in the set of transformation segments can form a corresponding behavior state result, which can be written and merged in subsequent steps.
[0021] S5. Write the set of behavior status results into the corresponding transition discrimination segment of the monitoring sequence according to the time order of behavior transition points, and merge the adjacent transition discrimination segments with the same behavior status to obtain the remote behavior status sequence. In this embodiment, step S5 is used to apply the behavioral state results obtained in the previous step to the corresponding transition discrimination segments of the monitoring sequence, and on this basis, merge similar transition discrimination segments that can be continuously connected into a longer continuous result, thereby forming a remote behavioral state sequence arranged in chronological order. During processing, firstly, each behavioral state result is written into the corresponding transition discrimination segment according to the chronological order of the behavioral transition points, and then the start point and end point of each transition discrimination segment are determined. Then, the behavioral state and boundary position of two adjacent transition discrimination segments are checked one by one in chronological order, and only adjacent segments with the same behavioral state and no other transition discrimination segments in between are merged. Finally, the merged transition discrimination segments are reordered according to the starting position to obtain a remote behavioral state sequence that can directly reflect the continuous behavioral change process of the giant panda. The implementation process includes the following steps: First, each behavior state result in the behavior state result set is sequentially written into the corresponding transition discrimination segment in the monitoring sequence according to the time order of its corresponding behavior transition point. The first sampling time and the last sampling time of each transition discrimination segment are recorded as the segment start time and segment end time, respectively, to obtain the writing result. Specifically, each behavior state result in the behavior state result set is read first, and the behavior transition point corresponding to each behavior state result is read. Then, all behavior state results are sorted according to the order of the behavior transition points in the monitoring sequence. After sorting, the transition discrimination segment corresponding to each behavior state result is read sequentially, and the behavior state result is written as a status marker to the corresponding transition discrimination segment. Each sampling time in the cover corresponds to a record; that is, each sampling time belonging to the same transition discrimination segment is written into the same behavior state; after writing is completed, the first sampling time of the transition discrimination segment arranged in chronological order is read and recorded as the segment start point, and the last sampling time of the transition discrimination segment arranged in chronological order is read and recorded as the segment end point; after performing the above processing on each behavior state result in the behavior state result set, the writing result is obtained; it should be noted that the segment start point and segment end point are directly taken from the actual boundary sampling time of the corresponding transition discrimination segment, and no new time point is generated separately, so subsequent adjacent judgments can still be directly returned to the monitoring sequence for verification; Next, based on the write result, the behavior state of two adjacent transition decision segments, the segment end of the previous transition decision segment, and the segment start of the next transition decision segment are read sequentially. Two adjacent transition decision segments with the same behavior state and no other transition decision segments between their segment end and segment start are merged into a single transition decision segment. The remaining two adjacent transition decision segments remain unchanged, resulting in a merged result. Specifically, all transition decision segments in the write result are first arranged according to the time order of their segment start points. Then, adjacent transition decision segments are read in pairs from front to back. For the currently read pair of transition decision segments, the behavior state of the previous transition decision segment is compared with that of the next transition decision segment. If they are different, the pair remains unchanged, and the next pair is read. If they are the same, the segment end of the previous transition decision segment and the segment start of the next transition decision segment are further read. Check if there are other transition discrimination segments between the end point and the start point of the segment. It should be noted that "no other transition discrimination segments" means that, in chronological order, there is no other transition discrimination segment whose start point is later than the end point of the previous transition discrimination segment and whose end point is earlier than the start point of the subsequent transition discrimination segment. If the behavioral state is consistent and there are no other transition discrimination segments in between, then the two adjacent transition discrimination segments are merged into a single transition discrimination segment. During merging, the start point of the previous transition discrimination segment is used as the start point of the merged transition discrimination segment, and the end point of the subsequent transition discrimination segment is used as the end point of the merged transition discrimination segment. All sampling times covered by the two transition discrimination segments are collectively recorded as the sampling range of the merged transition discrimination segment. If neither of the above two conditions is met, then the pair of transition discrimination segments remains unchanged. After processing all adjacent transition discrimination segments in sequence, the merged result is obtained. Finally, the transition discrimination segments in the merged result are arranged in chronological order of their starting points to obtain the remote behavior state sequence. Specifically, all transition discrimination segments in the merged result are read, and sorted from earliest to latest based on their starting points. If two transition discrimination segments have the same starting point, the ending point is used as a secondary sorting criterion. After sorting, the starting point, ending point, and behavior state of each transition discrimination segment are output sequentially in the order of arrangement, thus forming the remote behavior state sequence. It should be noted that each item in the remote behavior state sequence corresponds to a transition discrimination segment that has been written and merged. Therefore, this sequence not only retains the behavior state itself but also the start and end range of that behavior state in the monitoring sequence. Subsequent remote display, behavior playback, or continuous state statistics can be directly processed based on this remote behavior state sequence without needing to return to the behavior state result set and transition discrimination segment set for further processing. Through the above processing, the behavioral state results are no longer scattered and correspond to a single transition discrimination segment, but are further assigned to specific time periods in the monitoring sequence. On this basis, consecutive results with consistent behavioral states are merged to obtain a remote behavioral state sequence that better reflects the actual continuous behavioral process. Among them, the writing step clarifies the correspondence between behavioral states and transition discrimination segments, the merging step clarifies under what conditions adjacent segments can be merged, and the sorting step ensures that the time order of the final output results is clear. Therefore, the entire process smoothly connects from the behavioral state result set to the remote behavioral state sequence, and the processing relationship between the preceding and following steps is direct and complete. In practical applications: After multiple transition discrimination segments have been written to their corresponding behavioral states, the order of behavioral transition points in the monitoring sequence is used as the basis for arrangement. The results of each behavioral state are written to the sampling time covered by the corresponding transition discrimination segment, and the first and last sampling times of each transition discrimination segment are recorded. Then, two adjacent transition discrimination segments are read in pairs. If the behavioral states of the two segments are the same, and there is no third transition discrimination segment between the end point of the previous transition discrimination segment and the beginning point of the next transition discrimination segment, the two transition discrimination segments are merged into the same transition discrimination segment. If the behavioral states of the two segments are different, or there are other transition discrimination segments between them, they remain unchanged. Finally, all transition discrimination segments are output from the beginning point to the end, thus obtaining a remote behavioral state sequence that can continuously reflect the remote behavioral change process of giant pandas.
[0022] Working Principle: This scheme first continuously collects behavioral monitoring data of giant pandas using a collar, and organizes it into a monitoring sequence according to the sampling time. Then, it calculates activity values and displacement values from the data changes at adjacent time points. Subsequently, it determines the direction of activity value changes based on the increase or decrease of activity values, and determines the movement or stillness state based on the changes in displacement values. It identifies behavioral transition points from the locations where both change simultaneously. Around each behavioral transition point, it extracts continuous segments directly connected to that transition point both forward and backward. After verification and boundary correction, it forms transition discrimination segments. Next, it compares the correspondence between the segments before and after the transition in terms of the continuous change patterns of activity values and displacement values to determine the behavioral state corresponding to the transition discrimination segment. Finally, it writes each behavioral state back to the corresponding segment in chronological order, and merges adjacent segments with the same state to obtain a complete remote behavioral state sequence. The core of the whole process is that it does not directly make single-point judgments on scattered data, but rather, through end-to-end collaboration, first finds the true behavioral turning point in continuous data, and then reconstructs the change process around that point, thereby improving the correspondence between remote discrimination results and the actual behavioral process. In practical applications, such as long-term tracking of giant pandas in the wild, the collar continuously outputs monitoring data at each sampling time and sends the data to a remote end. The remote end first determines whether the activity value is continuously rising, remaining flat, or falling within a certain period, and at the same time determines whether the displacement value change is in motion or stillness. When it is found that the direction of the activity value change changes and the state of the displacement value change also changes, the position is retained as the behavior transition point. Then, continuous segments are extracted forward and backward around this behavior transition point. If the change relationship between the segments before and after can be stably connected, a complete transition discrimination segment is formed, and it is further determined whether the change is maintenance, deflection, or transformation, and then the corresponding behavior state is given. For example, when a giant panda in a bamboo forest gradually changes from continuous movement to stopping to feed, the continuous data collected by the collar end will first show that the position continues to advance and the activity change is more obvious, and then gradually change to the position change weakening but local activity still continues. The remote end can then identify that the behavior has changed from movement to another state based on this change process, and continue to merge adjacent similar segments with end-to-end collaboration, and finally form a remote behavior state sequence that is more consistent with the real activity process.
[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 remotely determining the behavioral state of giant pandas based on collar sensors, characterized in that, include: S1. Collect behavioral monitoring data output by the collar during continuous monitoring, arrange the behavioral monitoring data in chronological order according to the sampling time, and calculate the corresponding activity value and displacement value at each sampling time to obtain the monitoring sequence. S2. Based on the direction of change of activity value and the state of change of displacement value at adjacent sampling times in the monitoring sequence, determine the connection time when the direction of change of activity value changes switches and the state of change of displacement value changes at the same time as the behavior transition point, and obtain the set of behavior transition points. S3. For each behavior transition point in the behavior transition point set, extract the pre-transformation segment connected to the behavior transition point forward, extract the post-transformation segment connected to the behavior transition point backward, and form the pre-transformation segment, behavior transition point and post-transformation segment into a transition discrimination segment in sequence to obtain the transition discrimination segment set. S4. Based on each transition discrimination segment in the transition discrimination segment set, compare the corresponding changes between the segments before and after the transition in terms of the continuous change mode of the activity value and the continuous change mode of the displacement value, determine the behavior state corresponding to each transition discrimination segment, and obtain the behavior state result set. S5. Write the set of behavioral state results into the corresponding transition discrimination segment of the monitoring sequence according to the time order of the behavioral transition points, and merge the adjacent transition discrimination segments with the same behavioral state to obtain the remote behavioral state sequence.
2. The method for remotely determining the behavioral state of giant pandas based on collar sensors according to claim 1, characterized in that: S1 includes: S1-1. Arrange the behavior monitoring data output by the collar at each sampling time in chronological order of sampling time, and merge the behavior monitoring data with the same sampling time into the data of the same time to obtain the time sequence; S1-2. Calculate the activity value corresponding to each sampling time based on the sum of the absolute values of the differences between the corresponding data at each time point in the time sequence and the data at the previous time point, and obtain the activity sequence. S1-3. Based on the position difference between the position data corresponding to each sampling time and the position data corresponding to the previous sampling time in the time sequence, calculate the displacement value corresponding to each sampling time, and write the activity value and displacement value into the corresponding sampling time to obtain the monitoring sequence.
3. The method for remotely determining the behavioral state of giant pandas based on collar sensors according to claim 2, characterized in that: S2 includes: S2-1. Based on the difference between the activity value at each sampling time and the activity value at the previous sampling time in the monitoring sequence, determine the direction of change of the activity value at each sampling time, and record the direction of change of the activity value corresponding to the positive difference as the upward direction, the direction of change of the activity value corresponding to the negative difference as the downward direction, and the direction of change of the activity value corresponding to the zero difference as the level direction, to obtain the sequence of activity value change directions. S2-2. Based on the difference between the displacement value at each sampling time and the displacement value at the previous sampling time in the monitoring sequence, determine the displacement value change state at each sampling time, and record the displacement value change state corresponding to zero difference as the stationary state and the displacement value change state corresponding to non-zero difference as the moving state, thus obtaining the displacement value change state sequence.
4. The method for remotely determining the behavioral state of giant pandas based on collar sensors according to claim 3, characterized in that: S2 further includes: S2-3. Based on the sequence of activity value change directions, extract the connection moments that are adjacent to each other and have different activity value change directions. Then, determine the connection moments between the upward and downward directions, the connection moments between the downward and upward directions, the connection moments before and after the level direction connecting the upward and downward directions respectively, and the connection moments before and after the level direction connecting the downward and upward directions respectively as the direction switching moments, and obtain the set of direction switching moments. S2-4. For each direction switching moment in the set of direction switching moments, read the current displacement value change state, the previous displacement value change state, and the next displacement value change state corresponding to that direction switching moment. Then, determine the direction switching moments where the current displacement value change state is different from the previous displacement value change state but the same as the next displacement value change state, as well as the direction switching moments where the current displacement value change state is the same as the previous displacement value change state but different from the next displacement value change state, as behavior transition points, and obtain the set of behavior transition points.
5. The method for remotely determining the behavioral state of giant pandas based on collar sensors according to claim 4, characterized in that: S3 includes: S3-1. For each behavior transition point in the set of behavior transition points, read the direction of change of activity value and the state of change of displacement value corresponding to the previous sampling time of the behavior transition point as the forward reference, read the direction of change of activity value and the state of change of displacement value corresponding to the next sampling time of the behavior transition point as the backward reference, and extract the sampling data in the monitoring sequence forward and backward step by step with the behavior transition point as the starting point to obtain the forward extraction sequence and the backward extraction sequence. S3-2. Based on the forward extraction sequence, sequentially determine whether the direction of change of the activity value corresponding to each sampling time is consistent with the forward reference, whether the state of change of the displacement value is consistent with the forward reference, and whether the position difference between the position data corresponding to the sampling time and the position data corresponding to the next sampling time has the same sign as the position difference between the position data corresponding to the previous sampling time and the position data corresponding to the current sampling time. Write the sampling time when all three conditions are met into the forward retention sequence, write the sampling time when only the first two conditions are met or only the last two conditions are met into the forward verification sequence, and use the remaining sampling times as the forward termination time and stop forward extraction to obtain the forward initial segment.
6. The method for remotely determining the behavioral state of giant pandas based on collar sensors according to claim 5, characterized in that: S3 further includes: S3-3. Based on the backward extraction sequence, determine in turn whether the direction of change of the activity value corresponding to each sampling time is consistent with the backward reference, whether the state of change of the displacement value is consistent with the backward reference, and whether the position difference between the position data corresponding to the next sampling time and the position data corresponding to the current sampling time has the same sign as the position difference between the position data corresponding to the current sampling time and the position data corresponding to the previous sampling time. Write the sampling time when all three conditions are met into the backward retention sequence, write the sampling time when only the first two conditions are met or only the last two conditions are met into the backward verification sequence, and use the remaining sampling times as the backward termination time and stop backward extraction to obtain the backward initial segment. S3-4. For each sampling moment in the forward verification sequence, compare whether the direction of change of the activity value and the state of change of the displacement value corresponding to the adjacent sampling moments before and after the sampling moment are the same. If both are the same, the sampling moment is incorporated into the forward initial segment. If both are different, the sampling moment and all sampling moments before it are deleted. For each sampling moment in the backward verification sequence, compare whether the direction of change of the activity value and the state of change of the displacement value corresponding to the adjacent sampling moments before and after the sampling moment are the same. If both are the same, the sampling moment is incorporated into the backward initial segment. If both are different, the sampling moment and all sampling moments after it are deleted, thus obtaining the pre-transformation segment and the post-transformation segment.
7. The method for remotely determining the behavioral state of giant pandas based on collar sensors according to claim 6, characterized in that: S3 further includes: S3-5. Based on the consistency between the direction of change of activity value and the state of change of displacement value at the last sampling time of the segment before the transformation and the direction of change of activity value and the state of change of displacement value at the sampling time before the behavior transformation point, and the consistency between the direction of change of activity value and the state of change of displacement value at the first sampling time of the segment after the transformation and the direction of change of activity value and the state of change of displacement value at the sampling time after the behavior transformation point, perform boundary correction on the segment before the transformation and the segment after the transformation. If there is inconsistency on either side, delete the sampling time closest to the behavior transformation point on that side and recorrect until both sides are consistent or the segment on that side is empty. When both sides are consistent, the segment before the transformation, the behavior transformation point, and the segment after the transformation are sequentially combined into a transformation discrimination segment. If the segment on either side is empty, delete the behavior transformation point to obtain the set of transformation discrimination segments.
8. The method for remotely determining the behavioral state of giant pandas based on collar sensors according to claim 7, characterized in that: S4 includes: S4-1. For each transition discrimination segment in the transition discrimination segment set, extract the continuous segment of the direction of change of activity value, the continuous segment of the state of change of displacement value in the segment before transition, the continuous segment of the direction of change of activity value in the segment after transition, and the continuous segment of the state of change of displacement value in the segment after transition to obtain the continuous segment result. S4-2. Based on the continuous segment results, calculate the directional segment difference between the number of continuous segments in the direction of change of activity value in the segment before the transformation and the number of continuous segments in the direction of change of activity value in the segment after the transformation, and the state segment difference between the number of continuous segments in the state of change of displacement value in the segment before the transformation and the number of continuous segments in the state of change of displacement value in the segment after the transformation, and obtain the segment difference results.
9. The method for remotely determining the behavioral state of giant pandas based on collar sensors according to claim 8, characterized in that: S4 further includes: S4-3. Based on the step difference results, determine the corresponding change relationship between the segment before transformation and the segment after transformation in terms of the continuous change mode of the activity value and the continuous change mode of the displacement value. The corresponding change relationship where both the direction step difference and the state step difference are zero is determined as the maintenance relationship. The corresponding change relationship where one of the direction step difference and the state step difference is zero and the other is non-zero is determined as the deflection relationship. The corresponding change relationship where both the direction step difference and the state step difference are non-zero is determined as the transformation relationship. The corresponding change relationship results are obtained. S4-4. Based on the corresponding change relationship results, determine the behavior state corresponding to each transition discrimination segment, and write the behavior state into the corresponding transition discrimination segment to obtain the behavior state result set.
10. The method for remotely determining the behavioral state of giant pandas based on collar sensors according to claim 9, characterized in that: S5 includes: S5-1. Write each behavior state result in the behavior state result set into the corresponding transition discrimination segment in the monitoring sequence according to the time order of the corresponding behavior transition point, and record the first sampling time and the last sampling time of each transition discrimination segment as the segment start point and segment end point, respectively, to obtain the writing result; S5-2. Based on the writing result, read the behavior state of two adjacent transition discrimination segments, the segment end point of the previous transition discrimination segment, and the segment start point of the next transition discrimination segment in sequence. Merge two adjacent transition discrimination segments with the same behavior state and no other transition discrimination segments between the segment end point and the segment start point into the same transition discrimination segment. Keep the other two adjacent transition discrimination segments unchanged to obtain the merging result. S5-3. Arrange the transition discrimination segments in the merged result according to the time order of the segment starting point to obtain the remote behavior state sequence.
