Method and device for determining state of pet, electronic equipment and storage medium
By acquiring triaxial angular velocity data to calculate energy amplitude and low-amplitude fluctuation levels, and dynamically updating thresholds, the adaptiveness and robustness issues of pet state judgment are solved, achieving more accurate state recognition.
Patent Information
- Application Number
- CN202511863584.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-02-10
AI Technical Summary
In existing technologies, when pet wearable devices determine a pet's status using fixed thresholds, they suffer from poor adaptability and robustness. In particular, when the pet is stationary, it is easily affected by external disturbances, leading to inaccurate status judgments.
By acquiring three-axis angular velocity data through a pet device, calculating energy amplitude and low-amplitude fluctuation levels, dynamically updating dynamic and static thresholds, and combining the signal main frequency to determine the static time window, the status judgment is dynamically adjusted to avoid the influence of noise caused by individual differences and wearing position.
It improves the accuracy of pet status determination, adapts to different individuals and wearing positions, reduces the impact of external disturbances, and enhances the reliability of status judgment.
Smart Images

Figure CN121502385A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and in particular to a pet state determination method and device, electronic equipment and storage medium. BACKGROUND
[0002] The pet wearing device worn by the pet can monitor the motion state of the pet. The pet wearing device samples the angular velocity and acceleration through a gyroscope, and then determines the motion state or the static state of the pet by comparing with a fixed threshold or simple peak value counting.
[0003] However, the breathing fluctuation, slight body position adjustment / hair shaking (low frequency, small amplitude, periodicity) of the pet when the pet is static is regarded as motion by the fixed threshold; or the fixed threshold does not have adaptability due to different noises caused by the size of the pet, the wearing position, the tightness of the collar, the amount of hair, etc.; or the fixed threshold has poor robustness due to external disturbances introduced by the pet being held by the owner, riding a car, environmental vibration, etc. SUMMARY
[0004] Therefore, the present application provides a pet state determination method and device, electronic equipment and storage medium, which can improve the accuracy of pet state determination.
[0005] In a first aspect, the present application provides a pet state determination method, which comprises the following steps: obtaining three-axis angular velocity data of a current time window through a pet device worn by the pet; calculating the energy amplitude and low-amplitude fluctuation level of the current time window according to the three-axis angular velocity data of the current time window; determining whether the current time window is a static time window through the energy amplitude and signal main frequency of the current time window; if the current time window is a static time window, updating the dynamic estimation value and baseline energy level estimation value of the current time window according to the energy amplitude and low-amplitude fluctuation level of the current time window, and the dynamic estimation value and baseline energy level estimation value of the previous static time window; calculating the dynamic threshold and static threshold of the current time window according to the updated dynamic estimation value and baseline energy level estimation value of the current time window; matching the activity index with the dynamic threshold and static threshold of the current time window to determine the state of the pet in the current time window.
[0006] In an optional embodiment of the present application, the calculation of the energy amplitude and low-amplitude fluctuation level of the current time window according to the three-axis angular velocity data of the current time window comprises the following steps: the energy amplitude and low-amplitude fluctuation level of the current time window are calculated through the following formula:
[0007] wherein, is an energy amplitude of a current time window, is a number of triaxial angular velocity data in the current time window, is the tth triaxial angular velocity data, is a median of the current time window, is a low amplitude fluctuation level of the current time window.
[0008] In an optional embodiment provided by the present application, the determination of whether the current time window is a static time window through the energy amplitude and the signal main frequency of the current time window comprises: if the energy amplitude of the current time window is less than a static determination threshold and the signal main frequency of the current time window is less than a preset value, it is determined that the current time window is a static time window.
[0009] In an optional embodiment provided by the present application, the updating of the dynamic estimation value and the baseline energy level estimation value of the current time window according to the energy amplitude and the low amplitude fluctuation level of the current time window, and the dynamic estimation value and the baseline energy level estimation value of the last static time window comprises: updating the dynamic estimation value of the current time window according to the low amplitude fluctuation level of the current time window and the dynamic estimation value of the last static time window; updating the baseline energy level estimation value of the current time window according to the energy amplitude of the current time window and the baseline energy level estimation value of the last static time window.
[0010] In an optional embodiment provided by the present application, the calculation of the dynamic threshold and the static threshold of the current time window according to the updated dynamic estimation value and the baseline energy level estimation value of the current time window comprises: calculating a basic threshold of the current time window according to the updated dynamic estimation value and the baseline energy level estimation value of the current time window; calculating a sum of the basic threshold and a basic threshold of a preset proportion range to obtain a dynamic threshold of the current time window, and calculating a difference between the basic threshold and a basic threshold of a preset proportion range to obtain a static threshold of the current time window.
[0011] In an optional embodiment provided by the present application, the calculation of the basic threshold of the current time window according to the updated dynamic estimation value and the baseline energy level estimation value of the current time window comprises: calculating the basic threshold of the current time window through the following formula:
[0012] wherein, is the basic threshold of the current time window, an individual adaptation value, an updated dynamic estimation value of the current time window, an updated baseline energy level estimation value of the current time window, 、 、 an adjustment coefficient, a 95th percentile value of the signal of the current time window.
[0013] In an optional embodiment provided by the present application, the method further comprises: obtaining a number of static time windows and a baseline energy level average value collected in a preset statistical period; if the number of static time windows collected in the preset statistical period is greater than a minimum time window number, and a difference between the baseline energy level average value of the static time window and the initial baseline energy level estimation value is greater than a preset threshold, updating the individual adaptation value according to the individual adaptation value, the baseline energy level average value of the static time window, and the initial baseline energy level estimation value.
[0014] In a second aspect, the embodiments of the present application further provide a determination device for a state of a pet, which comprises: an obtaining module configured to obtain three-axis angular velocity data of a current time window through a pet device worn by the pet; a calculating module configured to calculate an energy amplitude and a low-amplitude fluctuation level of the current time window according to the three-axis angular velocity data of the current time window; a determining module configured to determine whether the current time window is a static time window according to the energy amplitude and a signal dominant frequency of the current time window; an updating module configured to, if the current time window is a static time window, update a dynamic estimation value and a baseline energy level estimation value of the current time window according to the energy amplitude and the low-amplitude fluctuation level of the current time window, and a dynamic estimation value and a baseline energy level estimation value of a previous static time window; the calculating module is further configured to calculate a dynamic threshold value and a static threshold value of the current time window according to the updated dynamic estimation value and the updated baseline energy level estimation value of the current time window; the determining module is further configured to match an activity index with the dynamic threshold value and the static threshold value of the current time window, and determine a state of the pet in the current time window.
[0015] In a third aspect, the embodiments of the present application further provide an electronic device, which comprises a processor, a memory and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the steps of the determination method for a state of a pet of the first aspect.
[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the method for determining the state of a pet as described in the first aspect.
[0017] This application provides a method, apparatus, electronic device, and storage medium for determining the state of a pet. First, the three-axis angular velocity data of the current time window is acquired through a pet device worn by the pet. Then, the energy amplitude and low-amplitude fluctuation level of the current time window are calculated based on the three-axis angular velocity data. The energy amplitude and signal frequency of the current time window are used to determine whether the current time window is a static time window. If the current time window is a static time window, the dynamic and baseline energy level estimates of the current time window are updated based on the energy amplitude and low-amplitude fluctuation level of the current time window, as well as the dynamic estimate and baseline energy level estimate of the previous static time window. Then, the dynamic and static thresholds of the current time window are calculated based on the updated dynamic and baseline energy level estimates. Finally, the activity index is matched with the dynamic and static thresholds of the current time window to determine the state of the pet in the current time window. Compared to existing technologies that determine a pet's status by matching a fixed threshold, this application determines the pet's status by dynamically calculating the dynamic and static thresholds based on the pet's triaxial angular velocity data. This avoids differences in background noise caused by variations in individual pets or the position of the pet's clothing, thereby improving the accuracy of pet status determination.
[0018] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating a method for determining the state of a pet according to an embodiment of this application is shown; Figure 2 A structural block diagram of a device for determining the state of a pet, provided in an embodiment of this application, is shown. Figure 3 A schematic diagram of a computer device provided in an embodiment of this application is shown. Detailed Implementation
[0021] The terms "first," "second," and "third," etc., used in this application specification, claims, and the aforementioned drawings are used to distinguish different objects, not to limit a specific order.
[0022] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner to facilitate understanding.
[0023] In the description of this application, unless otherwise stated, " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between the related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0024] In the embodiments of this application, at least one can also be described as one or more, and multiple can be two, three, four or more, and this application does not impose any restrictions.
[0025] like Figure 1 As shown in the embodiments of this application, a method for determining the state of a pet is provided. The method for determining the state of a pet provided by this application may include: S10. Obtain the three-axis angular velocity data of the current time window through the pet device worn by the pet.
[0026] The length of the time window can be set according to actual needs, such as 1–3 seconds. In this embodiment, the triaxial angular velocity data of the current time window can be obtained through a sampling frequency fs∈[25,200]Hz, specifically 100Hz. The obtained triaxial angular velocity data can be represented as follows: Its unit is ° / s or rad / s, corresponding to the angular velocity of the three spatial axes of the pet device.
[0027] In this embodiment, after acquiring the triaxial angular velocity data for the current time window, the triaxial angular velocity data needs to be preprocessed, including filtering and normalization. Preprocessing removes temperature drift, mechanical noise, and spikes, resulting in a stable base signal.
[0028] Specifically, in this embodiment, high-pass filtering can be used for drift removal first, and the calculation formula is as follows:
[0029]
[0030] in, This is the high-pass filtered angular velocity magnitude signal. Only rapidly changing components (fluctuations above the respiratory rate) are retained, where t is the sampling time. It is a high-pass filter with a cutoff frequency of 0.2~0.5 Hz, used to remove low-frequency drift (such as temperature drift or slow attitude changes). Let be the angular velocity modulus.
[0031] Then, the high-pass filtered drift-free... Perform low-pass noise reduction processing:
[0032] in, The signal after low-pass filtering represents the actual motion fluctuations (the dominant motion frequency is usually higher than the breathing frequency), and is obtained after filtering. Valid motion information was retained. The cutoff frequency of the low-pass filter is set between 8 and 15 Hz. The main frequency of a pet's movement is usually less than 10 Hz, and the part exceeding this frequency is mostly mechanical or electronic noise.
[0033] Finally, for the low-pass noise suppression Perform median filtering:
[0034] Or combine with amplitude limiting.
[0035] The window length N=35 is used to remove instantaneous spikes; , It is a clipping device used to forcibly truncate the signal between the 1st and 99th percentiles to avoid interference from abnormal peaks.
[0036] In this embodiment, the preprocessing of the triaxial angular velocity data can remove drift, noise, and spike interference; retain low-frequency features such as breathing and walking; and provide a stable input signal for step S20.
[0037] S20. Calculate the energy amplitude and low amplitude fluctuation level of the current time window based on the three-axis angular velocity data of the current time window.
[0038] In a specific embodiment provided in this application, the step of calculating the energy amplitude and low-amplitude fluctuation level of the current time window based on the triaxial angular velocity data of the current time window includes: The energy amplitude and low-amplitude fluctuation level of the current time window are calculated using the following formula:
[0039] in, The energy amplitude of the current time window. This represents the number of triaxial angular velocity data points within the current time window. For the t-th triaxial angular velocity data, This is the median of the current time window. This represents the low-amplitude fluctuation level of the current time window.
[0040] S30. Determine whether the current time window is a static time window by using the energy amplitude and signal frequency of the current time window.
[0041] In a specific embodiment provided in this application, determining whether the current time window is a static time window by the energy amplitude and signal frequency of the current time window includes: if the energy amplitude of the current time window is less than the static determination threshold and the signal frequency of the current time window is less than a preset value, then the current time window is determined to be a static time window.
[0042] Specifically, it can be done through formulas and Define the current time window as a static time window. This is the dominant frequency of the signal in the current time window. That is, the preset value is... , This is the threshold for determining stillness; the threshold for determining stillness can be set to the condition of being at rest. 1.2–1.5 times.
[0043] S40. If the current time window is a static time window, then update the dynamic estimate and baseline energy level estimate of the current time window based on the energy amplitude and low amplitude fluctuation level of the current time window, as well as the dynamic estimate and baseline energy level estimate of the previous static time window.
[0044] In a specific embodiment provided in this application, updating the dynamic estimate and baseline energy level estimate of the current time window based on the energy amplitude and low-amplitude fluctuation level of the current time window, as well as the dynamic estimate and baseline energy level estimate of the previous static time window, includes: S401. Update the dynamic estimate of the current time window based on the low amplitude fluctuation level of the current time window and the dynamic estimate of the previous static time window.
[0045] Specifically, this embodiment can be achieved through the formula Update the dynamic estimate for the current time window. Among these, This is a dynamic estimate for the current time window. It is a smoothing coefficient (its value can be 0.01~0.2). This is the dynamic estimate of the previous static time window. This represents the low-amplitude fluctuation level of the current time window.
[0046] S401. Update the baseline energy level estimate of the current time window based on the energy amplitude of the current time window and the baseline energy level estimate of the previous static time window.
[0047] Specifically, this embodiment can be achieved through the formula Update the baseline energy level estimate for the current time window. This is an estimate of the baseline energy level for the current time window. This is the baseline energy level estimate for the previous static time window. This represents the energy amplitude of the current time window.
[0048] In this embodiment, by retaining the results of the previous window and performing exponential weighted fusion with the features of the current window, a smooth update of the baseline is achieved, giving it continuity and robustness against anomalies.
[0049] S50. Calculate the dynamic threshold and static threshold of the current time window based on the updated dynamic estimate of the current time window and the baseline energy level estimate.
[0050] In a specific embodiment provided in this application, calculating the dynamic threshold and static threshold of the current time window based on the updated dynamic estimate of the current time window and the baseline energy level estimate includes: S501. Calculate the base threshold of the current time window based on the updated dynamic estimate of the current time window and the baseline energy level estimate.
[0051] Specifically, the step of calculating the basic threshold of the current time window based on the updated dynamic estimate of the current time window and the baseline energy level estimate includes: The base threshold for the current time window is calculated using the following formula:
[0052] in, This serves as the base threshold for the current time window. For individual fitness values, For the updated dynamic estimate of the current time window, This is an updated estimate of the baseline energy level for the current time window. , , For adjustment coefficients, This is the 95th percentile of the signal within the current time window, meaning that 95% of the data points do not exceed this value. This statistic is used to characterize the upper limit of normal fluctuations and can reflect the high-end fluctuation level of the signal without the interference of occasional spikes, thus serving as a reference for dynamic threshold adaptive adjustment.
[0053] In this embodiment, the calculation process of individual fitness value is as follows: obtain the number of static time windows collected by the pet in a preset statistical period and the average baseline energy level; if the number of static time windows collected in the preset statistical period is greater than the minimum number of time windows, and the difference between the average baseline energy level of the static time windows and the estimated initial baseline energy level is greater than a preset threshold, then update the individual fitness value according to the individual fitness value, the average baseline energy level of the static time windows, and the estimated initial baseline energy level.
[0054] Specifically, in this embodiment, the individual fitness value can be updated using the following formula:
[0055] Among them, Learning rate ( ≤0.01), It represents the baseline energy level average value collected within a preset statistical period of a static time window, used to reflect the typical energy level under the current long-term static state; This represents the initial baseline energy level estimate, which can be obtained through factory calibration or initial static calibration. This embodiment compares... and deviation on Fine-tuning is performed to achieve individual adaptive learning. The minimum number of time windows and preset thresholds (e.g., 5%~10%) can be set according to actual needs. This embodiment enables automatic adjustment of individual adaptation values for different body types, hair volume, or wearing methods, allowing the device to maintain accurate sensitivity over a long period.
[0056] S502. Calculate the sum of the basic threshold and the basic threshold of the preset proportional range to obtain the dynamic threshold of the current time window; calculate the difference between the basic threshold and the basic threshold of the preset proportional range to obtain the static threshold of the current time window.
[0057] Specifically, in this embodiment, the dynamic threshold and static threshold of the current time window can be calculated using the following formula:
[0058] in, This is the dynamic threshold for the current time window. This is the static threshold for the current time window. For hysteresis bandwidth, This is the base threshold for the current time window.
[0059] S60. Match the activity index with the dynamic and static thresholds of the current time window to determine the pet's state in the current time window.
[0060] Specifically, in this embodiment, the activity index can be based on the energy amplitude of the current time window. The activity index is calculated using the following formula:
[0061] in, This indicates the activity index of the current window. , , For weight values, The energy amplitude of the current time window. The window variance of the current window. Energy in the motion frequency band (motion frequency band 1–3 Hz). Energy for the respiratory frequency band (0.1–1 Hz).
[0062] In this embodiment, the activity index is matched with the dynamic and static thresholds of the current time window to determine the pet's state in the current time window. This state can be static, slightly moving, moving, high intensity, etc., but this embodiment does not make specific limitations on this.
[0063] Specifically, this embodiment can determine the pet's state in the current time window using the following matching conditions: stationary state:
[0064] Micro-motion state:
[0065] Movement status:
[0066] High-intensity state:
[0067] in, and The time threshold is set according to actual needs.
[0068] This application provides a method for determining the state of a pet. First, the three-axis angular velocity data of the current time window is obtained through a pet device worn by the pet. Then, the energy amplitude and low-amplitude fluctuation level of the current time window are calculated based on the three-axis angular velocity data of the current time window. The energy amplitude and signal frequency of the current time window are used to determine whether the current time window is a static time window. If the current time window is a static time window, the dynamic estimate and baseline energy level estimate of the current time window are updated based on the energy amplitude and low-amplitude fluctuation level of the current time window, as well as the dynamic estimate and baseline energy level estimate of the previous static time window. Then, the dynamic threshold and static threshold of the current time window are calculated based on the updated dynamic estimate and baseline energy level estimate of the current time window. Finally, the activity index is matched with the dynamic threshold and static threshold of the current time window to determine the state of the pet in the current time window. Compared to existing technologies that determine a pet's status by matching a fixed threshold, this application determines the pet's status by dynamically calculating the dynamic and static thresholds based on the pet's triaxial angular velocity data. This avoids differences in background noise caused by variations in individual pets or the position of the pet's clothing, thereby improving the accuracy of pet status determination.
[0069] When dividing each function into modules according to its corresponding function. Figure 2 This diagram illustrates a possible configuration of the device for determining the pet's state as described above and in the embodiments. Figure 2 As shown, the device for determining the pet's state may include: Module 21 is used to acquire three-axis angular velocity data of the current time window through the pet device worn by the pet. Calculation module 22 is used to calculate the energy amplitude and low amplitude fluctuation level of the current time window based on the triaxial angular velocity data of the current time window; The determining module 23 is used to determine whether the current time window is a static time window based on the energy amplitude and signal frequency of the current time window; The update module 24 is used to update the dynamic estimate and baseline energy level estimate of the current time window based on the energy amplitude and low amplitude fluctuation level of the current time window, as well as the dynamic estimate and baseline energy level estimate of the previous static time window, if the current time window is a static time window. The calculation module 22 is also used to calculate the dynamic threshold and static threshold of the current time window based on the updated dynamic estimate of the current time window and the baseline energy level estimate; The determining module 23 is further configured to match the activity index with the dynamic threshold and static threshold of the current time window to determine the state of the pet in the current time window.
[0070] In an optional embodiment provided by the present invention, the calculation module 22 is specifically used for: The energy amplitude and low-amplitude fluctuation level of the current time window are calculated using the following formula:
[0071] in, The energy amplitude of the current time window. This represents the number of triaxial angular velocity data points within the current time window. For the t-th triaxial angular velocity data, This is the median of the current time window. This represents the low-amplitude fluctuation level of the current time window.
[0072] In an optional embodiment provided by the present invention, the determining module 23 is specifically used for: If the energy amplitude of the current time window is less than the static determination threshold and the signal frequency of the current time window is less than a preset value, then the current time window is determined to be a static time window.
[0073] In an optional embodiment provided by the present invention, the updating module 24 is specifically used for: The dynamic estimate of the current time window is updated based on the low fluctuation level of the current time window and the dynamic estimate of the previous static time window. The baseline energy level estimate for the current time window is updated based on the energy amplitude of the current time window and the baseline energy level estimate of the previous static time window.
[0074] In an optional embodiment provided by the present invention, the calculation module 22 is specifically used for: The base threshold for the current time window is calculated based on the updated dynamic estimate of the current time window and the baseline energy level estimate; The dynamic threshold of the current time window is obtained by calculating the sum of the basic threshold and the basic threshold within the preset proportional range; the static threshold of the current time window is obtained by calculating the difference between the basic threshold and the basic threshold within the preset proportional range.
[0075] In an optional embodiment provided by the present invention, the calculation module 22 is specifically used for: The base threshold for the current time window is calculated using the following formula:
[0076] in, This serves as the base threshold for the current time window. For individual fitness values, For the updated dynamic estimate of the current time window, This is an updated estimate of the baseline energy level for the current time window. , , For adjustment coefficients, This is the 95th percentile of the signal for the current time window.
[0077] In an optional embodiment provided by the present invention, the updating module 24 is further configured to: Obtain the number of static time windows collected from the pet within a preset statistical period and the baseline average energy level; If the number of static time windows collected in the preset statistical period is greater than the minimum number of time windows, and the difference between the baseline energy level average of the static time windows and the initial baseline energy level estimate is greater than a preset threshold, then the individual fitness value is updated based on the individual fitness value, the baseline energy level average of the static time windows, and the initial baseline energy level estimate.
[0078] For specific limitations regarding the device, please refer to the limitations on the method for determining the pet's state mentioned above, which will not be repeated here. Each module in the aforementioned device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0079] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for determining the state of a pet.
[0080] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: The three-axis angular velocity data for the current time window is obtained through a pet device worn by the pet. Calculate the energy amplitude and low-amplitude fluctuation level of the current time window based on the triaxial angular velocity data of the current time window; Whether the current time window is a static time window is determined by the energy amplitude and signal frequency of the current time window. If the current time window is a static time window, then the dynamic estimate and baseline energy level estimate of the current time window are updated based on the energy amplitude and low amplitude fluctuation level of the current time window, as well as the dynamic estimate and baseline energy level estimate of the previous static time window. The dynamic and static thresholds for the current time window are calculated based on the updated dynamic estimate of the current time window and the baseline energy level estimate. The activity index is matched with the dynamic and static thresholds of the current time window to determine the pet's state in the current time window.
[0081] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: The three-axis angular velocity data for the current time window is obtained through a pet device worn by the pet. Calculate the energy amplitude and low-amplitude fluctuation level of the current time window based on the triaxial angular velocity data of the current time window; Whether the current time window is a static time window is determined by the energy amplitude and signal frequency of the current time window. If the current time window is a static time window, then the dynamic estimate and baseline energy level estimate of the current time window are updated based on the energy amplitude and low amplitude fluctuation level of the current time window, as well as the dynamic estimate and baseline energy level estimate of the previous static time window. The dynamic and static thresholds for the current time window are calculated based on the updated dynamic estimate of the current time window and the baseline energy level estimate. The activity index is matched with the dynamic and static thresholds of the current time window to determine the pet's state in the current time window.
[0082] In one embodiment, a computer program product is provided, the computer program product comprising a computer program that is executed by a processor to perform the following steps: The three-axis angular velocity data for the current time window is obtained through a pet device worn by the pet. Calculate the energy amplitude and low-amplitude fluctuation level of the current time window based on the triaxial angular velocity data of the current time window; Whether the current time window is a static time window is determined by the energy amplitude and signal frequency of the current time window. If the current time window is a static time window, then the dynamic estimate and baseline energy level estimate of the current time window are updated based on the energy amplitude and low amplitude fluctuation level of the current time window, as well as the dynamic estimate and baseline energy level estimate of the previous static time window. The dynamic and static thresholds for the current time window are calculated based on the updated dynamic estimate of the current time window and the baseline energy level estimate. The activity index is matched with the dynamic and static thresholds of the current time window to determine the pet's state in the current time window.
[0083] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0084] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0085] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for determining the state of a pet, characterized in that, The method includes: The three-axis angular velocity data for the current time window is obtained through a pet device worn by the pet. Calculate the energy amplitude and low-amplitude fluctuation level of the current time window based on the triaxial angular velocity data of the current time window; Whether the current time window is a static time window is determined by the energy amplitude and signal frequency of the current time window. If the current time window is a static time window, then the dynamic estimate and baseline energy level estimate of the current time window are updated based on the energy amplitude and low amplitude fluctuation level of the current time window, as well as the dynamic estimate and baseline energy level estimate of the previous static time window. The dynamic and static thresholds for the current time window are calculated based on the updated dynamic estimate of the current time window and the baseline energy level estimate. The activity index is matched with the dynamic and static thresholds of the current time window to determine the pet's state in the current time window.
2. The method according to claim 1, characterized in that, The calculation of the energy amplitude and low-amplitude fluctuation level of the current time window based on the triaxial angular velocity data of the current time window includes: The energy amplitude and low-amplitude fluctuation level of the current time window are calculated using the following formula: in, The energy range of the current time window. This represents the number of triaxial angular velocity data points within the current time window. For the t-th triaxial angular velocity data, This is the median of the current time window. This represents the low-amplitude fluctuation level of the current time window.
3. The method according to claim 2, characterized in that, Determining whether the current time window is a static time window by using the energy amplitude and signal frequency of the current time window includes: If the energy amplitude of the current time window is less than the static determination threshold and the signal frequency of the current time window is less than a preset value, then the current time window is determined to be a static time window.
4. The method according to claim 2, characterized in that, The step of updating the dynamic estimate and baseline energy level estimate of the current time window based on the energy amplitude and low-amplitude fluctuation level of the current time window, as well as the dynamic estimate and baseline energy level estimate of the previous static time window, includes: The dynamic estimate of the current time window is updated based on the low fluctuation level of the current time window and the dynamic estimate of the previous static time window. The baseline energy level estimate for the current time window is updated based on the energy amplitude of the current time window and the baseline energy level estimate of the previous static time window.
5. The method according to claim 4, characterized in that, The step of calculating the dynamic and static thresholds of the current time window based on the updated dynamic estimate of the current time window and the baseline energy level estimate includes: The base threshold for the current time window is calculated based on the updated dynamic estimate of the current time window and the baseline energy level estimate; The dynamic threshold of the current time window is obtained by calculating the sum of the basic threshold and the basic threshold within the preset proportional range; the static threshold of the current time window is obtained by calculating the difference between the basic threshold and the basic threshold within the preset proportional range.
6. The method according to claim 5, characterized in that, The calculation of the base threshold for the current time window based on the updated dynamic estimate of the current time window and the baseline energy level estimate includes: The base threshold for the current time window is calculated using the following formula: in, This serves as the base threshold for the current time window. For individual fitness values, For the updated dynamic estimate of the current time window, This is an updated estimate of the baseline energy level for the current time window. , , For adjustment coefficients, This is the 95th percentile of the signal for the current time window.
7. The method according to claim 6, characterized in that, The method further includes: Obtain the number of static time windows collected from the pet within a preset statistical period and the baseline average energy level; If the number of static time windows collected in the preset statistical period is greater than the minimum number of time windows, and the difference between the baseline energy level average of the static time windows and the initial baseline energy level estimate is greater than a preset threshold, then the individual fitness value is updated based on the individual fitness value, the baseline energy level average of the static time windows, and the initial baseline energy level estimate.
8. A device for determining the state of a pet, characterized in that, The device includes: The acquisition module is used to acquire the three-axis angular velocity data of the current time window through the pet device worn by the pet; The calculation module is used to calculate the energy amplitude and low amplitude fluctuation level of the current time window based on the triaxial angular velocity data of the current time window; The determination module is used to determine whether the current time window is a static time window based on the energy amplitude and signal frequency of the current time window; The update module is used to update the dynamic estimate and baseline energy level estimate of the current time window based on the energy amplitude and low amplitude fluctuation level of the current time window, as well as the dynamic estimate and baseline energy level estimate of the previous static time window, if the current time window is a static time window. The calculation module is also used to calculate the dynamic threshold and static threshold of the current time window based on the updated dynamic estimate of the current time window and the baseline energy level estimate. The determining module is further configured to match the activity index with the dynamic and static thresholds of the current time window to determine the pet's state in the current time window.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the machine-readable instructions are executed by the processor to perform the steps of the method for determining the state of a pet as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method for determining the state of a pet as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Pet status monitoring method and monitoring equipment
CN107687858A
Voltage detection method, equipment and system of storage battery
CN110293877A
Human body activity identification method, system and equipment
CN120279592A
Sleep monitoring visual analysis method and system based on smart bracelet
CN120549452A
Muscle stiffness symptom quantitative evaluation method based on machine learning and related equipment
CN120753590A