Pet behavior state identification method, device and equipment

By dividing pet behavior data into data segments and utilizing conditional random fields and convolutional base feature extraction techniques, the problem of ignoring the temporal correlation of behavior states in existing technologies is solved, achieving more accurate pet behavior state recognition.

CN121598013APending Publication Date: 2026-03-03GUANGZHOU GULULU TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511778170.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing methods for identifying pet behavior states ignore the temporal correlation between behavior states, leading to inaccurate analysis.

Method used

Pet behavior data is divided into multiple data segments according to time sequence. The probability distribution of behavioral states in each data segment is analyzed by conditional random field analysis. Features are extracted using one-dimensional and two-dimensional convolutional basis methods. The Viterbi algorithm is then used to solve for the optimal combination of state labels.

Benefits of technology

It improves the accuracy of pet behavior state recognition, takes into account the possibility of switching between behavior states, and ensures the consistency and logical rationality of the recognition results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121598013A_ABST
    Figure CN121598013A_ABST
Patent Text Reader

Abstract

The invention discloses a pet behavior state recognition method, device and equipment, and the method comprises the steps: dividing pet behavior data into a plurality of data segments according to a time sequence after the pet behavior data is obtained, analyzing each data segment, and determining the probability distribution of the behavior state of a pet in each data segment; the probability distribution of the behavior state of the pet in each data segment serves as an observation sequence to be input into a conditional random field, a state label representing the behavior state of the pet in each data segment is output, and the conditional random field does not simply depend on isolated data segments to carry out behavior state analysis, but considers the possibility of switching between the behavior states; the optimal state label combination of the whole observation sequence is searched, and the behavior state recognition accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to pet monitoring technology, and more particularly to a method, device, and equipment for identifying pet behavior status. Background Technology

[0002] Since pets can't speak, abnormal behavior is often the first sign of illness. Furthermore, analyzing pet behavior allows for more scientific management of their exercise and weight, preventing obesity or insufficient exercise.

[0003] Existing identification methods collect pet behavior data, divide the data into multiple time windows, and then analyze each time window separately to determine the pet's behavioral state within each window. This method analyzes the entire behavior data in isolated time windows, ignoring the temporal correlation between different behavioral states, leading to inaccurate behavior state analysis. Summary of the Invention

[0004] This invention provides a method, apparatus, and device for identifying pet behavior states, in order to improve the accuracy of behavior state identification.

[0005] In a first aspect, the present invention provides a method for identifying pet behavior states, comprising:

[0006] Obtain pet behavior data;

[0007] The pet behavior data is divided into multiple data segments according to time sequence;

[0008] Analyze each of the data segments to determine the probability distribution of the pet's behavioral state in each data segment;

[0009] The probability distribution of the pet's behavioral state in each data segment is used as the input conditional random field for the observation sequence, and the output is a state label representing the pet's behavioral state in each data segment.

[0010] Optionally, the pet behavior data includes motion data collected by a six-axis motion sensor, and the pet behavior data is divided into multiple data segments in chronological order, including:

[0011] The motion data is standardized to obtain standardized motion data;

[0012] The standardized motion data is segmented using a sliding window to obtain multiple time windows of motion data as motion data segments, wherein the window length of the sliding window is greater than the sliding step size of the sliding window.

[0013] Optionally, the pet behavior data includes voice data collected by a microphone, and the pet behavior data is divided into multiple data segments in chronological order, including:

[0014] Endpoint detection is performed on the voice data to identify multiple voice data segments, including data from the start point to the end point of the pet's bark.

[0015] Optionally, the data segments are analyzed to determine the probability distribution of the pet's behavioral state in each data segment, including:

[0016] Feature extraction is performed on the data segment to obtain the behavioral features of the data segment;

[0017] The probability distribution of the behavioral features mapped to the behavioral states of the data segments.

[0018] Optionally, the pet behavior data includes motion data collected by a six-axis motion sensor and voice data collected by a microphone. The data segments include motion data segments segmented using a sliding window and voice data segments obtained using endpoint detection. Feature extraction is performed on the data segments to obtain the behavioral features of the data segments, including:

[0019] The motion data segments of the time window are constructed into a two-dimensional matrix. The two-dimensional matrix includes multiple multi-dimensional vectors arranged in chronological order. Each multi-dimensional vector is composed of data from the six sensor channels of the six-axis motion sensor.

[0020] A one-dimensional convolutional basis is used to extract features from the two-dimensional matrix to obtain the action features of motion data segments in each time window as behavioral features.

[0021] The speech data segment is divided into frames to obtain multiple speech data frames, wherein the frame shift of the framing is less than the frame length of the speech data frame.

[0022] Add a Hamming window to the speech data frame to obtain a windowed speech data frame;

[0023] Perform a Fast Fourier Transform on the windowed speech data frame to obtain the spectral representation of the windowed speech data frame;

[0024] Mel frequency cepstral coefficients are extracted from the spectral representation of the windowed speech data frame to obtain the acoustic feature vector of the speech data frame;

[0025] The acoustic feature vectors of multiple speech data frames of the speech data segment are arranged in chronological order to construct a two-dimensional audio feature spectrogram.

[0026] The audio feature spectrogram is extracted using a two-dimensional convolutional basis to obtain the audio features of the speech data segment as behavioral features.

[0027] Optionally, mapping the behavioral features to a probability distribution of the behavioral states of the data segment includes:

[0028] The action features are input into the classification head for processing to obtain the probability distribution of the behavior state of each time window as the first probability distribution;

[0029] The audio features are input into a classification function to obtain the probability distribution of the behavioral state of each speech data segment as a second probability distribution;

[0030] Determine whether the motion data segment and the speech data segment overlap in time;

[0031] If not, then the first probability distribution of the motion data segment or the second probability distribution of the speech data segment shall be used as the probability distribution of the behavioral state of the data segment;

[0032] If so, the first probability distribution of the motion data segment and the second probability distribution of the speech data segment are weighted and fused together, and the resulting fused probability distribution is used as the probability distribution of the behavioral state of the data segment.

[0033] Optionally, the probability distribution of the pet's behavioral state in each data segment is used as the input conditional random field to the observation sequence, and the output is a state label representing the pet's behavioral state in each data segment, including:

[0034] The Viterbi algorithm is used to solve for the score of each possible label sequence under the observed sequence conditions, and the label sequence with the highest score is used as the state label of the pet's behavior state in each data segment.

[0035] Optionally, the Viterbi algorithm is used to solve for the score of each possible label sequence under the observed sequence conditions, and the label sequence with the highest score is used as the state label of the pet's behavior state in each data segment, including:

[0036] For the i-th data segment, determine the highest total score for the (i-1)-th data segment and the target state label corresponding to the highest total score;

[0037] For each state label, the transition score from the target state label of the (i-1)th data segment to the state label is calculated using the transition feature function;

[0038] The probability distribution of the i-th data segment is calculated using the state feature function, which is then used as the state score of the state label.

[0039] Calculate the sum of the highest total score of the (i-1)th data segment, the transition score, and the state score to obtain the total score of the first i data segments ending with the state label;

[0040] The state label with the highest total score is determined as the target state label of the last data segment in the first i data segments;

[0041] After determining the target state label of the last data segment, backtracking is performed to determine the target state labels of all data segments, which serve as the state labels of the behavioral state of each data segment.

[0042] Secondly, the present invention also provides a pet behavior state recognition device, comprising:

[0043] The behavior data acquisition module is used to acquire pet behavior data;

[0044] The data segmentation module is used to divide the pet behavior data into multiple data segments according to time sequence.

[0045] The data fragment analysis module is used to analyze each of the data fragments and determine the probability distribution of the pet's behavioral state in each data fragment;

[0046] The status label determination module is used to take the probability distribution of the behavior status of each pet in the data segment as the observation sequence input conditional random field, and output a status label representing the behavior status of each pet in the data segment.

[0047] Thirdly, the present invention also provides an electronic device, comprising:

[0048] One or more processors;

[0049] Storage device for storing one or more programs;

[0050] When the one or more programs are executed by the one or more processors, the one or more processors implement the pet behavior state recognition method as described in the first aspect of the present invention.

[0051] Fourthly, the present invention also provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the pet behavior state recognition method as described in the first aspect of the present invention.

[0052] The pet behavior state recognition method provided by this invention, after acquiring pet behavior data, divides the pet behavior data into multiple data segments according to time sequence, analyzes each data segment to determine the probability distribution of the pet's behavior state in each data segment, uses the probability distribution of the pet's behavior state in each data segment as the observation sequence input to a conditional random field, and outputs a state label representing the pet's behavior state in each data segment. The conditional random field does not simply rely on isolated data segments for behavior state analysis, but considers the possibility of switching between behavior states and finds the optimal combination of state labels for the entire observation sequence, which can improve the accuracy of behavior state recognition.

[0053] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 A flowchart of a pet behavior state recognition method provided by the present invention;

[0056] Figure 2 This is a schematic diagram of the structure of a pet behavior state recognition device provided by the present invention;

[0057] Figure 3 This is a schematic diagram of the structure of an electronic device provided by the present invention.

[0058] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0059] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.

[0060] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0061] Figure 1 This is a flowchart of a pet behavior state recognition method provided by the present invention. This embodiment is applicable to accurately predicting pet behavior states. The method can be executed by the pet behavior state recognition device provided by the present invention. This device can be implemented by software and / or hardware, and is typically configured in an electronic device, such as... Figure 1 As shown, the pet behavior state recognition method includes the following steps:

[0062] S101. Obtain pet behavior data.

[0063] In this embodiment of the invention, pet behavior data collected by a data acquisition device is obtained. For example, in this embodiment, the pet behavior data may include motion data collected by a six-axis motion sensor, or voice data collected by a microphone, or a combination of motion data collected by a six-axis motion sensor and voice data collected by a microphone; this invention does not impose any limitations on these data.

[0064] For example, the data acquisition device can be mounted on a pet collar (smart collar). A six-axis motion sensor, including a three-axis accelerometer and a three-axis gyroscope, is used to capture real-time information such as the pet's posture, acceleration, and angular velocity. A microphone is used to collect the pet's vocalizations. For example, the six-axis motion sensor continuously acquires data from six channels of three-axis acceleration (Acc_x, Acc_y, Acc_z) and three-axis angular velocity (Gyro_x, Gyro_y, Gyro_z) at a preset sampling frequency (e.g., 50Hz or 100Hz). The pet collar also includes a low-power processor and a communication module (such as a Bluetooth module) responsible for acquiring and initially packaging the data, and transmitting the data to a base station via low-power wireless communication.

[0065] A base station is a fixed device that can be placed in a home environment. Its main functions are:

[0066] Data reception and forwarding: Receives raw motion and audio data from the smart collar via wireless communication (such as Bluetooth).

[0067] Network connectivity: Connected to the internet via Wi-Fi or Ethernet, it acts as a data bridge between the smart collar and the backend server, forwarding received data to the backend server. The backend server can be used to execute the method of this invention.

[0068] Result reception and transmission: Receive the recognition results processed by the backend server and send instructions to the smart collar (such as adjusting the collection strategy).

[0069] S102. Divide the pet behavior data into multiple data segments according to the time sequence.

[0070] The acquired pet behavior data is a data segment with a certain duration. To facilitate analysis, the pet behavior data can be divided into multiple data segments in chronological order.

[0071] In some embodiments of the present invention, different partitioning methods can be applied to different data types.

[0072] For example, motion data acquired by a six-axis motion sensor can be pre-standardized (e.g., using Z-score standardization) to eliminate the influence of individual sensor differences or different dimensions, ensuring that the data from each sensor channel follows a standard normal distribution with a mean of 0 and a standard deviation of 1. Then, a fixed-length sliding window is used to segment the standardized motion data, resulting in multiple time windows as motion data segments. The window length of the sliding window is greater than the sliding step size. This ensures a certain degree of overlap between the data in each time window, guaranteeing the continuity of the behavioral sequence analysis and capturing complete actions that cross the window boundaries. For example, in a specific embodiment of the invention, the sampling rate is 50Hz, the window length can be set to 2 seconds (corresponding to 100 sampling points), and the sliding step size can be set to 0.5 seconds.

[0073] For example, for voice data captured by a microphone, Voice Activity Detection (VAD) technology can be used to detect endpoints in the voice data. By calculating indicators such as short-term energy or zero-crossing rate, a threshold is set, and only valid audio segments with energy exceeding the threshold are retained. This identifies multiple voice data segments, including data from the start point to the end point of a pet's bark. Endpoint detection can reduce background noise interference and unnecessary calculations, improving data processing efficiency.

[0074] S103. Analyze each data segment to determine the probability distribution of the pet's behavioral state in each data segment.

[0075] In this embodiment of the invention, each data segment is analyzed to determine the probability distribution of the pet's behavioral state in each data segment. For example, each data segment is input into a pre-trained recognition model, which then performs inference to determine the probability distribution of the pet's behavioral state in each data segment. The probability distribution of the behavioral state of a data segment is a vector composed of the probability values ​​of the pet's behavioral state belonging to each behavioral state label under that data segment. In this embodiment of the invention, behavioral state labels may include "eating," "walking," "drinking," "running," "jumping," "grooming," "sleeping," etc., and are not limited thereto.

[0076] In some embodiments of the present invention, a pre-trained feature extractor can be used to extract features from data segments to obtain behavioral features of the data segments, and then the behavioral features can be mapped to a probability distribution of the behavioral states of the data segments.

[0077] In some embodiments of the present invention, pet behavior data includes motion data collected by a six-axis motion sensor, and the above-mentioned feature extraction and mapping process may include the following sub-steps:

[0078] 1. Construct a two-dimensional matrix from the motion data segments of the time window. The two-dimensional matrix includes multiple multi-dimensional vectors arranged in chronological order. Each multi-dimensional vector consists of data from the six sensor channels of the six-axis motion sensor.

[0079] As mentioned earlier, the six-axis motion sensor continuously acquires data from six channels of triaxial acceleration (Acc_x, Acc_y, Acc_z) and triaxial angular velocity (Gyro_x, Gyro_y, Gyro_z) at a preset sampling frequency (e.g., 50Hz or 100Hz). This means that the motion data at each acquisition point is a six-dimensional vector. After the aforementioned standardization process, the standardized motion data is divided into multiple time-window segments using a sliding window method. The vectors corresponding to each acquisition point within these time-window segments are then combined according to the temporal order of the acquisition points to form a two-dimensional matrix.

[0080] 2. A one-dimensional convolutional basis is used to extract features from the two-dimensional matrix to obtain the action features of motion data segments in each time window as behavioral features.

[0081] A one-dimensional convolutional base is used to extract features from the aforementioned two-dimensional matrix, obtaining the action features of motion data segments in each time window as behavioral features. These behavioral features represent a highly condensed and abstract representation of the original time window data. A one-dimensional convolutional base is a network specifically designed for temporal signals, such as a one-dimensional convolutional neural network (1D-CNN). Its typical structure includes multiple convolutional blocks, each of which includes:

[0082] One-dimensional convolutional layers (Conv1D) use convolutional kernels of different sizes to capture motion patterns at different time scales.

[0083] The pooling layer (MaxPooling1D) downsamples the features output by the one-dimensional convolutional layer, reducing computation and extracting the most salient local features.

[0084] Batch Normalization and Dropout layers are used to normalize and randomly drop features output from pooling layers to accelerate model convergence and prevent overfitting.

[0085] Activation function layers (such as ReLU) are used to perform non-linear transformations on the features output by the Batch Normalization and Dropout layers, introducing non-linear transformation capabilities.

[0086] 3. Input the action features into the classification head for processing to obtain the probability distribution of the behavior state in each time window.

[0087] The action features output from the convolutional base are input into the classification head for processing, obtaining the probability distribution of the behavior state for each time window as the first probability distribution. The classification head typically includes fully connected layers and a classification function layer (e.g., the Softmax function). The fully connected layer performs a fully connected mapping on the action features, mapping them to the class space of the behavior state labels, resulting in a vector with the same number of classes as the behavior state labels. The classification function layer maps the element values ​​in the vector output by the fully connected layer to probability values ​​between [0, 1], obtaining the probability distribution of the behavior state for that time window. In this way, the probability distribution of the behavior state for each time window is obtained.

[0088] In some embodiments of the present invention, pet behavior data includes voice data collected by a microphone, and the above-mentioned feature extraction and mapping process may include the following sub-steps:

[0089] 1. Divide the speech data segment into frames to obtain multiple speech data frames, wherein the frame shift of the framing is less than the frame length of the speech data frame.

[0090] After performing endpoint detection on the speech data to identify multiple speech data segments including data from the start point to the end point of the pet's bark, the speech data segments are then framed to obtain multiple speech data frames. The frame shift of each segment is less than the frame length of the speech data frame. This ensures a certain degree of overlap between the frames, and this overlapping sampling setting ensures the continuity of behavior sequence analysis and captures complete actions across frames. For example, in one specific embodiment of the invention, the frame length is 25 milliseconds and the frame shift is 10 milliseconds.

[0091] 2. Add a Hamming window to the speech data frame to obtain a windowed speech data frame.

[0092] In this embodiment of the invention, a Hamming window is added to the voice data frame to reduce spectral leakage, resulting in a windowed voice data frame.

[0093] 3. Perform a Fast Fourier Transform on the windowed speech data frame to obtain the spectral representation of the windowed speech data frame.

[0094] In this embodiment of the invention, a fast Fourier transform is performed on the windowed speech data frame to obtain the spectral representation of the windowed speech data frame.

[0095] 4. Extract the Mel frequency cepstral coefficients from the spectral representation of the windowed speech data frame to obtain the acoustic feature vector of the speech data frame.

[0096] In this embodiment of the invention, the spectral representation of the windowed speech data frame is processed through a Mel filter bank, logarithmic energy is calculated, and then Mel frequency cepstral coefficients (MFCCs) are obtained through discrete cosine transform (DCT). In a preferred embodiment, 13-dimensional static MFCCs are extracted, and their first-order difference (Delta) and second-order difference (Delta-Delta) coefficients are calculated to finally form a 39-dimensional acoustic feature vector.

[0097] 5. Arrange the acoustic feature vectors of multiple speech data frames of the speech data segment in chronological order to construct a two-dimensional audio feature spectrogram.

[0098] In this embodiment of the invention, the acoustic feature vectors of multiple consecutive speech data frames in a speech data segment are arranged in chronological order to construct a two-dimensional audio feature spectrogram.

[0099] 6. Use two-dimensional convolutional basis to extract features from the audio feature spectrogram, and obtain the audio features of the speech data segment as behavioral features.

[0100] In this embodiment of the invention, since the audio feature spectrogram is a two-dimensional spectrogram, a two-dimensional convolutional basis is used to extract features from the audio feature spectrogram to obtain the audio features of the speech data segment as behavioral features. The two-dimensional convolutional basis typically adopts a two-dimensional convolutional neural network (2D-CNN) architecture, similar to a simplified version of VGGNet or ResNet used for image recognition.

[0101] 7. Input the audio features into the classification function to obtain the probability distribution of the behavioral state of each speech data segment.

[0102] In this embodiment of the invention, the audio features output by the two-dimensional convolutional basis are input into a classification function (e.g., a softmax function) to obtain the probability distribution of the behavioral state of each speech data segment.

[0103] In some embodiments of the present invention, pet behavior data includes motion data collected by a six-axis motion sensor and voice data collected by a microphone. The above-mentioned feature extraction and mapping process may include the following sub-steps:

[0104] 1. Construct a two-dimensional matrix from the motion data segments of the time window. The two-dimensional matrix includes multiple multi-dimensional vectors arranged in chronological order. Each multi-dimensional vector consists of data from the six sensor channels of the six-axis motion sensor.

[0105] As mentioned earlier, the six-axis motion sensor continuously acquires data from six channels of triaxial acceleration (Acc_x, Acc_y, Acc_z) and triaxial angular velocity (Gyro_x, Gyro_y, Gyro_z) at a preset sampling frequency (e.g., 50Hz or 100Hz). This means that the motion data at each acquisition point is a six-dimensional vector. After the aforementioned standardization process, the standardized motion data is divided into multiple time-window segments using a sliding window method. The vectors corresponding to each acquisition point within these time-window segments are then combined according to the temporal order of the acquisition points to form a two-dimensional matrix.

[0106] 2. A one-dimensional convolutional basis is used to extract features from the two-dimensional matrix to obtain the action features of motion data segments in each time window as behavioral features.

[0107] A one-dimensional convolutional base is used to extract features from the aforementioned two-dimensional matrix, obtaining the action features of motion data segments in each time window as behavioral features. These behavioral features represent a highly condensed and abstract representation of the original time window data. A one-dimensional convolutional base is a network specifically designed for temporal signals, such as a one-dimensional convolutional neural network (1D-CNN). Its typical structure includes multiple convolutional blocks, each of which includes:

[0108] One-dimensional convolutional layers (Conv1D) use convolutional kernels of different sizes to capture motion patterns at different time scales.

[0109] The pooling layer (MaxPooling1D) downsamples the features output by the one-dimensional convolutional layer, reducing computation and extracting the most salient local features.

[0110] Batch Normalization and Dropout layers are used to normalize and randomly drop features output from pooling layers to accelerate model convergence and prevent overfitting.

[0111] Activation function layers (such as ReLU) are used to perform non-linear transformations on the features output by the Batch Normalization and Dropout layers, introducing non-linear transformation capabilities.

[0112] 3. Input the action features into the classification head for processing, and obtain the probability distribution of the behavior state in each time window as the first probability distribution.

[0113] The action features output from the convolutional base are input into the classification head for processing, obtaining the probability distribution of the behavior state for each time window as the first probability distribution. The classification head typically includes fully connected layers and a classification function layer (e.g., the Softmax function). The fully connected layer performs a fully connected mapping on the action features, mapping them to the class space of the behavior state labels, resulting in a vector with the same number of classes as the behavior state labels. The classification function layer maps the element values ​​in the vector output from the fully connected layer to probability values ​​between [0, 1], obtaining the probability distribution of the behavior state for that time window as the first probability distribution. Thus, the first probability distribution of the behavior state for each time window is obtained.

[0114] 4. Divide the speech data segment into frames to obtain multiple speech data frames, wherein the frame shift of the framing is less than the frame length of the speech data frame.

[0115] After performing endpoint detection on the speech data to identify multiple speech data segments including data from the start point to the end point of the pet's bark, the speech data segments are then framed to obtain multiple speech data frames. The frame shift of each segment is less than the frame length of the speech data frame. This ensures a certain degree of overlap between the frames, and this overlapping sampling setting ensures the continuity of behavior sequence analysis and captures complete actions across frames. For example, in one specific embodiment of the invention, the frame length is 25 milliseconds and the frame shift is 10 milliseconds.

[0116] 5. Add a Hamming window to the speech data frame to obtain a windowed speech data frame.

[0117] In this embodiment of the invention, a Hamming window is added to the voice data frame to reduce spectral leakage, resulting in a windowed voice data frame.

[0118] 6. Perform a Fast Fourier Transform on the windowed speech data frame to obtain the spectral representation of the windowed speech data frame.

[0119] In this embodiment of the invention, a fast Fourier transform is performed on the windowed speech data frame to obtain the spectral representation of the windowed speech data frame.

[0120] 7. Extract the Mel frequency cepstral coefficients from the spectral representation of the windowed speech data frame to obtain the acoustic feature vector of the speech data frame.

[0121] In this embodiment of the invention, the spectral representation of the windowed speech data frame is processed through a Mel filter bank, logarithmic energy is calculated, and then Mel frequency cepstral coefficients (MFCCs) are obtained through discrete cosine transform (DCT). In a preferred embodiment, 13-dimensional static MFCCs are extracted, and their first-order difference (Delta) and second-order difference (Delta-Delta) coefficients are calculated to finally form a 39-dimensional acoustic feature vector.

[0122] 8. Arrange the acoustic feature vectors of multiple speech data frames of the speech data segment in chronological order to construct a two-dimensional audio feature spectrogram.

[0123] In this embodiment of the invention, the acoustic feature vectors of multiple consecutive speech data frames in a speech data segment are arranged in chronological order to construct a two-dimensional audio feature spectrogram.

[0124] 9. Use two-dimensional convolutional basis to extract features from the audio feature spectrogram, and obtain the audio features of the speech data segment as behavioral features.

[0125] In this embodiment of the invention, since the audio feature spectrogram is a two-dimensional spectrogram, a two-dimensional convolutional basis is used to extract features from the audio feature spectrogram to obtain the audio features of the speech data segment as behavioral features. The two-dimensional convolutional basis typically adopts a two-dimensional convolutional neural network (2D-CNN) architecture, similar to a simplified version of VGGNet or ResNet used for image recognition.

[0126] 10. Input the audio features into the classification function to obtain the probability distribution of the behavioral state of each speech data segment as the second probability distribution.

[0127] In this embodiment of the invention, the audio features output by the two-dimensional convolutional basis are input into a classification function (e.g., a Softmax function) to obtain the probability distribution of the behavioral state of each speech data segment as a second probability distribution.

[0128] 11. Determine whether motion data segments and speech data segments overlap in time.

[0129] For any motion data segment and speech data segment, determine whether the motion data segment and speech data segment overlap in time.

[0130] 12. If not, then the first probability distribution of the motion data segment or the second probability distribution of the speech data segment shall be used as the probability distribution of the behavioral state of the data segment.

[0131] If the motion data segment and the speech data segment do not overlap in time, then the first probability distribution of the motion data segment or the second probability distribution of the speech data segment is used as the probability distribution of the behavioral state of the data segment.

[0132] 13. If so, the first probability distribution of the motion data segment and the second probability distribution of the speech data segment are weighted and fused together, and the resulting fused probability distribution is used as the probability distribution of the behavioral state of the data segment.

[0133] If motion data segments and speech data segments overlap in time, the first probability distribution of the motion data segments and the second probability distribution of the speech data segments are weighted and fused. The resulting fused probability distribution is used as the probability distribution of the behavioral state of the data segments. For example, the weighted fusion process is as follows:

[0134] ;

[0135] in, Let be the probability distribution of the behavioral state of the i-th data segment. (0≤α≤1) is a hyperparameter that can be empirically set based on the contribution of different modal data to a specific behavior or obtained through cross-validation learning. Let i be the first probability distribution of the i-th motion data segment. Let be the second probability distribution of the i-th speech data segment.

[0136] S104. Input the probability distribution of the pet's behavior state in each data segment into the conditional random field as the observation sequence, and output the state label representing the pet's behavior state in each data segment.

[0137] In this embodiment of the invention, the probability distribution of the pet's behavioral state in each data segment is used as the input conditional random field for the observation sequence, and the output is a state label representing the pet's behavioral state in each data segment. For example, as described above, pet behavior data may include motion data collected by a six-axis motion sensor, or voice data collected by a microphone, or a combination of motion data collected by a six-axis motion sensor and voice data collected by a microphone. The corresponding probability distribution is the probability distribution of a single type of pet behavior data segment, or the fused probability distribution of two types of pet behavior data segments; these will not be elaborated further in this invention.

[0138] The goal of a Conditional Random Field (CRF) is to find a sequence of state labels that maximizes the posterior probability given a sequence of observations. This probability is proportional to a global score function, which is the sum of the state scores at all time steps and the transition scores between adjacent states.

[0139] In some embodiments of this invention, the Viterbi algorithm is used to solve for the score of each possible label sequence under the observed sequence conditions, and the label sequence with the highest score is used as the state label of the pet's behavior state in each data segment. Utilizing the Viterbi algorithm, a dynamic programming method, the algorithm efficiently searches and determines the path with the highest total score among all possible state paths. This algorithm avoids making independent greedy decisions at each time step, but instead considers the contextual information of the entire sequence, ensuring the overall optimality of the output sequence. The optimal state path decoded by the Viterbi algorithm is the final, repaired, optimized, temporally coherent, and logically sound behavior state label sequence output by this invention.

[0140] In some embodiments of the present invention, the processing procedure of the conditional random field is as follows:

[0141] 1. For the i-th data segment, determine the highest total score of the (i-1)-th data segment and the target state label corresponding to the highest total score.

[0142] For example, for the first data segment, since there are no preceding data segments, the highest total score for the (i-1)th data segment is 0, and the target state label corresponding to the highest total score can be the initialization label. For data segments where i is greater than 1, determine the highest total score for the (i-1)th data segment and the target state label corresponding to the highest total score.

[0143] 2. For each state label, the transition score from the target state label of the (i-1)th data segment to the state label is calculated using the transition feature function.

[0144] In this embodiment of the invention, for each data segment and for each state label, a transition score is calculated using a transition feature function from the target state label of the (i-1)th data segment to that state label. The transition score represents the probability of transitioning from the target state label of the (i-1)th data segment to that state label of the ith data segment.

[0145] 3. The probability distribution of the i-th data segment is calculated using the state feature function, which is the state score of the state label.

[0146] In this embodiment of the invention, the probability distribution of the i-th data segment is calculated using a state feature function to obtain the state score of the state label. The state score represents the probability that the data segment is the state label under the current probability distribution. For example, for convenience, the probability distribution obtained in the aforementioned steps can be directly used as the state score of each state label.

[0147] 4. Calculate the sum of the highest total score, transition score, and state score of the (i-1)th data segment to obtain the total score of the first i data segments ending with the state label.

[0148] In this embodiment of the invention, the sum of the highest total score, transition score and state score of the (i-1)th data segment is calculated to obtain the total score of the first i data segments ending with the state label, that is, the last data segment in the first i data segments is the total score of the state label.

[0149] 5. Determine the state label with the highest total score as the target state label for the last data segment among the first i data segments.

[0150] After determining the total score corresponding to each state label, the state label with the highest total score is selected as the target state label of the last data segment in the first i data segments.

[0151] 6. After determining the target state label of the last data segment, backtrack backward to determine the target state labels of all data segments, which will serve as the state labels of the behavioral state of each data segment.

[0152] Repeat the above steps until the target state label of the last data segment is determined. Then, backtrack forward to determine the target state labels of all data segments, which will serve as the state labels for the behavioral state of each data segment.

[0153] Conditional random fields (CRFs) do not rely solely on isolated data segments for behavioral state analysis. Instead, they consider the possibility of switching between behavioral states and seek the optimal combination of state labels for the entire observation sequence, which can improve the accuracy of behavioral state identification. For example, for a certain data segment, the probability distribution gives a slightly higher probability of "eating" (0.5) than "resting" (0.4). However, considering that the previous data segment was intense "playing," switching directly to "eating" is not in line with the learned natural laws, while switching to "resting" is more reasonable.

[0154] The pet behavior state recognition method provided by this invention, after acquiring pet behavior data, divides the pet behavior data into multiple data segments according to time sequence, analyzes each data segment to determine the probability distribution of the pet's behavior state in each data segment, uses the probability distribution of the pet's behavior state in each data segment as the observation sequence input to a conditional random field, and outputs a state label representing the pet's behavior state in each data segment. The conditional random field does not simply rely on isolated data segments for behavior state analysis, but considers the possibility of switching between behavior states and finds the optimal combination of state labels for the entire observation sequence, which can improve the accuracy of behavior state recognition.

[0155] Figure 2 This is a schematic diagram of the structure of a pet behavior state recognition device provided by the present invention, as shown below. Figure 2 As shown, the pet behavior status recognition device includes:

[0156] Behavior data acquisition module 201 is used to acquire pet behavior data;

[0157] The data segmentation module 202 is used to divide the pet behavior data into multiple data segments according to time sequence.

[0158] The data fragment analysis module 203 is used to analyze each of the data fragments and determine the probability distribution of the pet's behavioral state in each data fragment;

[0159] The status label determination module 204 is used to take the probability distribution of the behavior status of each pet in the data segment as the observation sequence input conditional random field and output a status label representing the behavior status of each pet in the data segment.

[0160] In some embodiments of the present invention, the pet behavior data includes motion data collected by a six-axis motion sensor, and the data segmentation module 202 includes:

[0161] The standardization submodule is used to standardize the motion data to obtain standardized motion data.

[0162] The sliding window submodule is used to segment standardized motion data using a sliding window to obtain multiple time windows of motion data as motion data segments, wherein the window length of the sliding window is greater than the sliding step size of the sliding window.

[0163] In some embodiments of the present invention, the pet behavior data includes voice data collected by a microphone, and the data segmentation module 202 includes:

[0164] The endpoint detection submodule is used to perform endpoint detection on the voice data to determine multiple voice data segments, including data from the start point to the end point of the pet's bark.

[0165] In some embodiments of the present invention, the data fragment analysis module 203 includes:

[0166] The feature extraction submodule is used to extract features from the data segment to obtain the behavioral features of the data segment;

[0167] The feature mapping submodule is used to map the behavioral features to a probability distribution of the behavioral states of the data fragment.

[0168] In some embodiments of the present invention, the pet behavior data includes motion data collected by a six-axis motion sensor and voice data collected by a microphone. The data segments include motion data segments segmented using a sliding window and voice data segments obtained using endpoint detection. The feature extraction submodule includes:

[0169] A two-dimensional matrix construction unit is used to construct a two-dimensional matrix from the motion data segments of the time window. The two-dimensional matrix includes multiple multi-dimensional vectors arranged in chronological order, and each multi-dimensional vector is composed of data from the six sensor channels of the six-axis motion sensor.

[0170] A one-dimensional convolutional unit is used to extract features from the two-dimensional matrix using a one-dimensional convolutional basis to obtain the action features of motion data segments in each time window as behavioral features.

[0171] A framing unit is used to segment the speech data segment into multiple speech data frames, wherein the frame shift of the segmentation is less than the frame length of the speech data frame.

[0172] A windowing unit is used to add a Hamming window to the speech data frame to obtain a windowed speech data frame;

[0173] The Fourier transform unit is used to perform a fast Fourier transform on the windowed speech data frame to obtain the spectral representation of the windowed speech data frame.

[0174] The cepstral coefficient extraction unit is used to extract the Mel frequency cepstral coefficients from the spectral representation of the windowed speech data frame to obtain the acoustic feature vector of the speech data frame.

[0175] An audio feature spectrogram construction unit is used to arrange the acoustic feature vectors of multiple speech data frames of the speech data segment in chronological order to construct a two-dimensional audio feature spectrogram.

[0176] The feature extraction unit is used to extract features from the audio feature spectrogram using a two-dimensional convolutional basis, and obtain the audio features of the speech data segment as behavioral features.

[0177] In some embodiments of the present invention, the feature mapping submodule includes:

[0178] The first probability distribution determination unit is used to input the action features into the classification head for processing, and obtain the probability distribution of the behavior state of each time window as the first probability distribution;

[0179] The second probability distribution determination unit is used to input the audio features into a classification function to obtain the probability distribution of the behavioral state of each speech data segment as the second probability distribution;

[0180] An overlap determination unit is used to determine whether the motion data segment and the speech data segment overlap in time;

[0181] The third probability distribution determination unit is used to determine the first probability distribution of the motion data segment or the second probability distribution of the speech data segment as the probability distribution of the behavior state of the data segment if no.

[0182] The fourth probability distribution determination unit is used to, if so, weightedly fuse the first probability distribution of the motion data segment and the second probability distribution of the speech data segment, and use the resulting fused probability distribution as the probability distribution of the behavioral state of the data segment.

[0183] In some embodiments of the present invention, the status tag determination module 204 includes:

[0184] The state label determination submodule is used to solve for the score of each possible label sequence under the observation sequence conditions using the Viterbi algorithm, and to take the label sequence with the highest score as the state label of the behavior state of the pet in each data segment.

[0185] In some embodiments of the present invention, the status tag determination submodule includes:

[0186] The first label determination unit is used to determine the highest total score of the (i-1)th data segment and the target state label corresponding to the highest total score for the i-th data segment.

[0187] The transition score calculation unit is used to calculate the transition score from the target state label of the (i-1)th data segment to the state label for each state label using a transition feature function.

[0188] A state score calculation unit is used to calculate the state score of the i-th data segment whose probability distribution is the state label using a state feature function;

[0189] The total score calculation unit is used to calculate the sum of the highest total score of the (i-1)th data segment, the transition score and the state score, to obtain the total score of the first i data segments ending with the state label.

[0190] The second label determination unit is used to determine the state label with the highest total score as the target state label of the last data segment in the first i data segments;

[0191] The label backtracking unit is used to backtrack forward after determining the target state label of the last data segment to determine the target state labels of all data segments, which serve as the state labels of the behavioral state of each data segment.

[0192] The aforementioned pet behavior state recognition device can execute the pet behavior state recognition method provided in the foregoing embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the pet behavior state recognition method.

[0193] Figure 3 This is a schematic diagram of an electronic device provided by the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0194] like Figure 3As shown, the electronic device includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0195] Multiple components in the electronic device are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, optical disk, etc.; and a communication unit 19, such as a network card, modem, wireless transceiver, etc. The communication unit 19 allows the electronic device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0196] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as pet behavior state recognition methods.

[0197] In some embodiments, the pet behavior state recognition method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the pet behavior state recognition method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the pet behavior state recognition method by any other suitable means (e.g., by means of firmware).

[0198] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0199] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0200] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0201] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0202] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0203] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0204] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the pet behavior state recognition method provided in any embodiment of this application.

[0205] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0206] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0207] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for recognizing pet behavior states, characterized in that, include: Obtain pet behavior data; The pet behavior data is divided into multiple data segments according to time sequence; Analyze each of the data segments to determine the probability distribution of the pet's behavioral state in each data segment; The probability distribution of the pet's behavioral state in each data segment is used as the input conditional random field for the observation sequence, and the output is a state label representing the pet's behavioral state in each data segment.

2. The pet behavior state recognition method according to claim 1, characterized in that, The pet behavior data includes motion data collected by a six-axis motion sensor. This pet behavior data is divided into multiple data segments in chronological order, including: The motion data is standardized to obtain standardized motion data; The standardized motion data is segmented using a sliding window to obtain multiple time windows of motion data as motion data segments, wherein the window length of the sliding window is greater than the sliding step size of the sliding window.

3. The pet behavior state recognition method according to claim 1, characterized in that, The pet behavior data includes voice data collected by a microphone. This pet behavior data is divided into multiple data segments in chronological order, including: Endpoint detection is performed on the voice data to identify multiple voice data segments, including data from the start point to the end point of the pet's bark.

4. The pet behavior state recognition method according to any one of claims 1-3, characterized in that, Analyze each of the data segments to determine the probability distribution of the pet's behavioral state in each data segment, including: Feature extraction is performed on the data segment to obtain the behavioral features of the data segment; The probability distribution of the behavioral features mapped to the behavioral states of the data segments.

5. The pet behavior state recognition method according to claim 4, characterized in that, The pet behavior data includes motion data collected by a six-axis motion sensor and voice data collected by a microphone. The data segments include motion data segments segmented using a sliding window and voice data segments obtained using endpoint detection. Feature extraction is performed on the data segments to obtain their behavioral features, including: The motion data segments of the time window are constructed into a two-dimensional matrix. The two-dimensional matrix includes multiple multi-dimensional vectors arranged in chronological order. Each multi-dimensional vector is composed of data from the six sensor channels of the six-axis motion sensor. A one-dimensional convolutional basis is used to extract features from the two-dimensional matrix to obtain the action features of motion data segments in each time window as behavioral features. The speech data segment is divided into frames to obtain multiple speech data frames, wherein the frame shift of the framing is less than the frame length of the speech data frame. Add a Hamming window to the speech data frame to obtain a windowed speech data frame; Perform a Fast Fourier Transform on the windowed speech data frame to obtain the spectral representation of the windowed speech data frame; Mel frequency cepstral coefficients are extracted from the spectral representation of the windowed speech data frame to obtain the acoustic feature vector of the speech data frame; The acoustic feature vectors of multiple speech data frames of the speech data segment are arranged in chronological order to construct a two-dimensional audio feature spectrogram. The audio feature spectrogram is extracted using a two-dimensional convolutional basis to obtain the audio features of the speech data segment as behavioral features.

6. The pet behavior state recognition method according to claim 5, characterized in that, Mapping the behavioral features to the probability distribution of the behavioral states of the data segments includes: The action features are input into the classification head for processing to obtain the probability distribution of the behavior state of each time window as the first probability distribution; The audio features are input into a classification function to obtain the probability distribution of the behavioral state of each speech data segment as a second probability distribution; Determine whether the motion data segment and the speech data segment overlap in time; If not, then the first probability distribution of the motion data segment or the second probability distribution of the speech data segment shall be used as the probability distribution of the behavioral state of the data segment; If so, the first probability distribution of the motion data segment and the second probability distribution of the speech data segment are weighted and fused together, and the resulting fused probability distribution is used as the probability distribution of the behavioral state of the data segment.

7. The pet behavior state recognition method according to any one of claims 1-3, 5, and 6, characterized in that, The probability distribution of the pet's behavioral state in each data segment is used as the input conditional random field for the observation sequence, and the output is a state label representing the pet's behavioral state in each data segment, including: The Viterbi algorithm is used to solve for the score of each possible label sequence under the observed sequence conditions, and the label sequence with the highest score is used as the state label of the pet's behavior state in each data segment.

8. The pet behavior state recognition method according to claim 7, characterized in that, The Viterbi algorithm is used to calculate the score of each possible label sequence under the observed sequence conditions, and the label sequence with the highest score is used as the state label of the pet's behavior state in each data segment, including: For the i-th data segment, determine the highest total score for the (i-1)-th data segment and the target state label corresponding to the highest total score; For each state label, the transition score from the target state label of the (i-1)th data segment to the state label is calculated using the transition feature function; The probability distribution of the i-th data segment is calculated using the state feature function, which is then used as the state score of the state label. Calculate the sum of the highest total score of the (i-1)th data segment, the transition score, and the state score to obtain the total score of the first i data segments ending with the state label; The state label with the highest total score is determined as the target state label of the last data segment in the first i data segments; After determining the target state label of the last data segment, backtracking is performed to determine the target state labels of all data segments, which serve as the state labels of the behavioral state of each data segment.

9. A pet behavior status recognition device, characterized in that, include: The behavior data acquisition module is used to acquire pet behavior data; The data segmentation module is used to divide the pet behavior data into multiple data segments according to time sequence. The data fragment analysis module is used to analyze each of the data fragments and determine the probability distribution of the pet's behavioral state in each data fragment; The status label determination module is used to take the probability distribution of the behavior status of each pet in the data segment as the observation sequence input conditional random field, and output a status label representing the behavior status of each pet in the data segment.

10. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the pet behavior state recognition method as described in any one of claims 1-7.