Pet positioning and motion state recognition method and system based on multi-source sensor fusion

CN122964647APending Publication Date: 2026-10-23ZHEJIANG SHENCHEN KAIDONG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611450629.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-18
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]在宠物定位技术方案中,通常依赖全球导航卫星系统(GNSS)与蜂窝网络上报位置,现有技术面向宠物自身肢体运动模式的分类,仅依赖单一加速度特征支路,在宠物被携带乘车时,车辆低频振动与宠物自主走跑的加速度幅值存在混叠,导致上述方案无法稳健区分宠物自主走跑与车辆载行两类运动场景,亦无法为定位轨迹提供可靠的行车行为语义,难以与定位上报及功耗管理策略有效联动

Benefits of technology

本发明通过姿态识别支路与宏观行车识别支路对宠物的三轴运动数据进行并行处理,结合车内宠物活动条件与车辆振动条件的双签名校验、共用进车门控的跑态否决与假段禁止、宏观运动段可用时的多路径进车与段缺失时的受限合成进车以及释放滞回机制,实现了在资源受限嵌入式平台上对宠物自主走跑与车辆载行两类在加速度幅值上存在混叠的运动场景的稳健区分,在抑制非车载活动误进入行车状态的同时提升了弱车载、短行程场景下的行车检出稳定性,解决了现有单支路方案既无法区分行车语义、又缺乏门控与滞回机制导致误进率高且状态频繁切换的综合技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122964647A_ABST
    Figure CN122964647A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of Internet of Things and embedded intelligent wearable technology, and provides a pet positioning and motion state recognition method and system based on multi-source sensor fusion to solve the problems of poor accuracy and high power consumption in pet positioning and motion state recognition. The pet positioning and motion state recognition method based on multi-source sensor fusion includes simultaneously extracting posture features and macro features from three-axis motion data in each time window and detecting macro motion segments; recognizing the posture of the pet based on the posture features in each time window; obtaining a double signature verification result allowing the pet to enter the car; configuring a shared car entry gate in combination with the current posture of the pet, the double signature verification result allowing the pet to enter the car, and the starting position of the macro motion segment; after satisfying the shared car entry gate, executing a matched entering driving state judgment program according to the availability of the macro motion segment. It can robustly distinguish between walking and running and driving, and perform pet positioning and motion state recognition in conjunction with positioning reporting and power consumption strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of Internet of Things and embedded smart wearable technology, and particularly relates to a method and system for pet positioning and motion state recognition based on multi-source sensor fusion. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] In pet location technology solutions, the location is usually reported by the Global Navigation Satellite System (GNSS) and cellular networks. Existing technologies are categorized based on the pet's own limb movement patterns and rely on only a single acceleration feature branch. When a pet is being carried in a vehicle, the low-frequency vibration of the vehicle and the acceleration amplitude of the pet's own walking and running overlap, making the above solutions unable to reliably distinguish between the two types of movement scenarios: the pet's own walking and running and the vehicle being carried. They also cannot provide reliable driving behavior semantics for the location trajectory and are difficult to effectively link with location reporting and power consumption management strategies. Summary of the Invention

[0004] To address the aforementioned technical issues, this invention provides a pet location and motion state recognition method and system based on multi-source sensor fusion. It can run in real time on a resource-constrained embedded platform, robustly distinguish between walking / running and driving, and coordinate with location reporting and power consumption strategies to perform pet location and motion state recognition.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of the present invention provides a method for pet localization and motion state recognition based on multi-source sensor fusion.

[0006] In one or more embodiments, a method for pet localization and motion state recognition based on multi-source sensor fusion is provided, including: Receive the pet's three-axis motion data and divide it into rolling time windows. Simultaneously extract posture features and macroscopic features from the three-axis motion data within each time window and detect macroscopic motion segments. Based on the posture features within each time window, the system prioritizes judging whether the pet's posture is running according to the set rules. If the posture is not running, the system uses a machine learning model to distinguish between walking and standing still. Determine whether the macroscopic features within each time window meet the conditions for pet activity inside the vehicle and / or vehicle vibration. Based on the condition judgment results within several consecutive time windows, obtain the dual signature verification result that allows entry into the vehicle. Combining the pet's current posture, the dual signature verification result allowing entry into the vehicle, and the configuration of a shared vehicle entry gate at the start position of the macroscopic movement segment, after satisfying the shared vehicle entry gate requirement, a pre-configured first entry driving state determination procedure is executed based on the availability of the macroscopic movement segment; wherein, the first entry driving state determination procedure contains several parallel sub-determination procedures, and each sub-determination procedure independently determines the entry driving state. Once the vehicle is determined to be in driving mode, the pet's status is locked as driving mode. The driving mode is released when the number of consecutive time windows not covered by the macro motion segment reaches the preset release hysteresis threshold.

[0007] As one implementation method, the macroscopic features within each time window are compared with preset thresholds for in-vehicle pet activity conditions and vehicle vibration conditions to determine whether the in-vehicle pet activity conditions and / or vehicle vibration conditions are met.

[0008] As one implementation method, the process of determining the preset thresholds for pet activity conditions inside the vehicle and vehicle vibration conditions is as follows: Macroscopic features are extracted from three-axis motion data samples labeled as stationary, walking, running, vehicle idling, vehicle driving, and parked; the three-axis motion data samples labeled as vehicle idling, vehicle driving, and parked are positive on-vehicle samples; the three-axis motion data samples labeled as stationary, walking, and running are negative off-vehicle samples. Based on the macroscopic feature distribution of positive in-vehicle samples and negative in-vehicle samples, candidate threshold combinations for in-vehicle pet activity conditions and vehicle vibration conditions are generated. Using the weighted sum of the vehicle-mounted missed detection rate and the non-vehicle-mounted false entry rate as the objective function, and with the constraints that the three-axis motion data samples of the running tag should not trigger vehicle entry and the three-axis motion data samples of the stationary tag when there is no macroscopic motion segment should not trigger vehicle entry alone, based on the remaining three-axis motion data samples, the threshold with the smallest objective function is selected from the candidate threshold combinations as the preset threshold for the pet activity conditions and vehicle vibration conditions in the vehicle.

[0009] As one implementation method, in the process of obtaining the dual signature verification result that allows entry into the vehicle, if the macroscopic features within each time window simultaneously meet the conditions for pet activity inside the vehicle and vehicle vibration, then a single-window dual signature is generated. Then, the number of time windows that continuously generate single-window dual signatures forward from the current time, the number of time windows that continuously meet the conditions for pet activity inside the vehicle forward from the current time, the number of time windows that meet the conditions for vehicle vibration within the current time interval, and the number of time windows that generate single-window dual signatures within the current time interval are compared with the set thresholds to obtain the dual signature verification result that allows entry into the vehicle.

[0010] As one implementation method, in the process of determining whether the shared vehicle access control is satisfied, when the posture is running, the shared vehicle access control is in a state of prohibiting entry into the vehicle. As one implementation method, in the process of determining whether the shared vehicle access control is satisfied, when the posture is walking, if the number of time windows for continuously generating single-window double signatures is not less than the set time window number threshold, or the difference between the exit peak position and the entry peak position of the macroscopic movement segment is not less than the set peak difference threshold, then it is determined that the shared vehicle access control is satisfied.

[0011] As one implementation method, the locking exit point is determined by combining the exit peak of the macro motion segment, the forward holding window, and the minimum duration window, and the locking exit point is extended when the preset macro motion segment coverage, overlap, or rolling holding conditions are met.

[0012] A second aspect of the present invention provides a pet localization and motion state recognition system based on multi-source sensor fusion.

[0013] In one or more embodiments, a pet localization and motion state recognition system based on multi-source sensor fusion includes: The feature extraction module is used to receive the pet's three-axis motion data and divide it into rolling time windows. It simultaneously extracts posture features and macro features from the three-axis motion data within each time window and detects macro motion segments. The posture recognition module is used to determine whether the pet's posture is running based on the posture features within each time window, according to the set rules. If the posture is not running, a machine learning model is used to distinguish between walking and standing still. The dual signature verification module is used to determine whether the macroscopic features within each time window meet the conditions for pet activity inside the vehicle and / or vehicle vibration. Based on the condition judgment results within several consecutive time windows, the dual signature verification result allowing entry into the vehicle is obtained. The vehicle entry status determination module is used to combine the pet's current posture, the dual signature verification result allowing entry into the vehicle, and the starting position of the macroscopic movement segment to configure a shared vehicle entry gate. After the shared vehicle entry gate is satisfied, the pre-configured first vehicle entry status determination program is executed according to the availability of the macroscopic movement segment. The first vehicle entry status determination program contains several parallel sub-determination programs, and each sub-determination program independently determines the vehicle entry status. The driving status locking and releasing module is used to lock the pet's status to driving status when it is determined that the driving status has been entered, and to release the driving status when the number of continuous time windows not covered by the macro motion segment reaches the preset release hysteresis threshold.

[0014] A third aspect of the present invention provides a computer-readable storage medium.

[0015] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the pet localization and motion state recognition method based on multi-source sensor fusion as described above.

[0016] A fourth aspect of the present invention provides an electronic device.

[0017] An electronic device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps of the pet localization and motion state recognition method based on multi-source sensor fusion as described above.

[0018] Compared with the prior art, the beneficial effects of the present invention are: This invention processes pet's three-axis motion data in parallel using a posture recognition branch and a macroscopic vehicle recognition branch. It combines dual signature verification of pet activity conditions and vehicle vibration conditions, running state rejection and false segment prohibition using shared vehicle entry gating, multi-path vehicle entry when macroscopic motion segments are available and restricted synthetic vehicle entry when segments are missing, and a release hysteresis mechanism. This enables robust differentiation of two types of motion scenarios with overlapping acceleration amplitudes—pet autonomous walking and running and vehicle-borne movement—on a resource-constrained embedded platform. While suppressing non-vehicle-borne activities from mistakenly entering the vehicle state, it improves the stability of vehicle detection in weak vehicle-borne and short-travel scenarios. It solves the comprehensive technical problems of existing single-branch solutions, which cannot distinguish vehicle semantics and lack gating and hysteresis mechanisms, resulting in high false entry rates and frequent state switching. Attached Figure Description

[0019] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0020] Figure 1 This is a schematic diagram of an example system environment for a pet localization and motion state recognition method based on multi-source sensor fusion according to an embodiment of the present invention; Figure 2 This is a flowchart of a pet localization and motion state recognition method based on multi-source sensor fusion according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the state changes of pet vehicle tracking according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a pet localization and motion state recognition system based on multi-source sensor fusion according to an embodiment of the present invention; Figure 5 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0021] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0022] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0023] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0024] Terminology Explanation: Inertial Measurement Unit (IMU): A sensor module integrating a three-axis accelerometer and a three-axis gyroscope, used to collect three-axis acceleration data and three-axis angular velocity data of the pet-wearing terminal, which is the basic data source for motion feature extraction in this invention.

[0025] Time window: A data segment obtained by dividing the continuously sampled data of the IMU into segments with a fixed window length and step size. Both attitude feature extraction and macroscopic feature extraction use the time window as the basic processing unit.

[0026] Posture label: The classification result of the pet's limb movement pattern within each time window, including three categories: stationary, walking, and running, output by the posture recognition branch.

[0027] Macroscopic features: The set of features calculated for each time window to characterize the low-frequency continuous vibration characteristics of the vehicle, including at least horizontal vibration intensity, half-window difference and frequency band energy ratio, which are distinguishable from gait vibration features in the frequency domain and amplitude.

[0028] Macroscopic motion segment: The continuous macroscopic vibration active range detected on the rolling time window sequence, which has attributes such as entering the peak position, exiting the peak position and segment span, and is an important basis for vehicle entry determination.

[0029] Single-window dual-signature: A marker generated when the conditions for pet activity inside the vehicle and vehicle vibration are met simultaneously within the same time window, indicating that evidence of pet activity and vehicle vibration exist simultaneously in that window.

[0030] Dual signature verification result: The vehicle entry verification conclusion is obtained by comprehensively judging the number of consecutive dual signature windows and the count of dual signature windows within the scrolling window.

[0031] Shared vehicle entry gate control: uniform pre-constraints applied to all vehicle entry paths, including running posture rejection, walking posture requiring continuous double signature conditions, and prohibition of false segment entry, etc., to suppress non-vehicle activities from mistakenly entering the driving state.

[0032] Locked Exit Point: The earliest time window position that allows exiting the driving state after successful vehicle entry, determined by the exit peak value of the macro segment, the number of forward holding windows, and the minimum number of continuous windows.

[0033] Release hysteresis threshold: The number of time windows that still need to be continuously observed after the current time window is no longer covered by the macroscopic motion segment, used to suppress state jitter caused by red light short stops or macroscopic segment flashing.

[0034] Figure 1 A schematic diagram illustrates an example system environment in which various embodiments of the present invention can be implemented. For example... Figure 1 As shown, the system environment includes a pet-wearing terminal 10, a cloud platform 20, and a user terminal 30.

[0035] The pet-wearing terminal 10 is an embedded smart hardware device worn around the pet's neck or back. It uses a microcontroller 11 as its core and connects to and controls the following peripheral modules: a six-axis IMU 12, used to collect the pet's three-axis acceleration and three-axis angular velocity data at a preset sampling frequency, serving as the basic data source for motion state recognition; a GNSS module 13, used to obtain the pet's geographic coordinates in scenarios away from home; a barometer 14, used to collect air pressure values ​​and assist in estimating floor changes; a WiFi scanning unit 15, used to scan surrounding wireless access points and compare them with pre-stored home access point information to determine if the pet is in a home environment; an LTE communication module 16, used to send a positioning report containing four-state motion and location information to the cloud platform 20 via the cellular network; a power management / low-power coprocessing unit 17, used to reduce the GNSS positioning frequency to save power in home scenarios; an audio playback unit 18, used to play audio reminders when needed; and a Flash memory 19, used to store machine learning model files and raw IMU data. The pet wearable terminal 10 can also be expanded into other wearable forms such as pet backpack locators and pet smart collars.

[0036] The cloud platform 20 receives the location data packets reported by the pet-wearing terminal 10 through the LTE (Long Term Evolution) network, parses and stores the messages containing four-state motion state codes, and provides the user terminal 30 with trajectory query and behavior semantic display services.

[0037] User terminal 30 is a mobile application or web page used by pet owners to query the pet's real-time location, historical trajectory, and semantic annotations of behaviors such as walking / running / driving, and to receive push notifications such as lost alerts.

[0038] The pet-wearing terminal 10 communicates with the cloud platform 20 via the LTE / MQTT protocol, and the cloud platform 20 interacts with the user terminal 30 via the HTTPS or WebSocket protocol.

[0039] In this embodiment of the invention, data acquisition and processing strictly comply with relevant laws and regulations. Pet location data and sensor data are used only for pet positioning and movement status identification, and not for any other unauthorized purposes. It should be understood that the above system environment is described for illustrative purposes only and does not imply any limitation on the scope of protection of this application; this invention can also be applied to other scenarios such as ranch animal tracking and scientific research animal behavior monitoring, and the system may also include other sensors or communication modules not shown.

[0040] Figure 2 A flowchart of a pet localization and movement state recognition method based on multi-source sensor fusion according to an embodiment of the present invention is provided. Figure 2 The pet localization and motion state recognition method based on multi-source sensor fusion in this embodiment may include the following steps S201 to S205.

[0041] The specific implementation process of steps S201 to S205 is as follows: Step S201: Receive the pet's three-axis motion data and divide it into rolling time windows. Simultaneously extract posture features and macroscopic features from the three-axis motion data within each time window and detect macroscopic motion segments.

[0042] The three-axis motion data here refers to the three-axis acceleration and three-axis angular velocity data acquired by a six-axis IMU. In one embodiment, the six-axis IMU continuously outputs acceleration and angular velocity at a sampling frequency of 100Hz. The sampling task timestamps each sampling point and writes it to a classification circular buffer. The classification task reads data from the buffer at a fixed window length (e.g., 200 sampling points, corresponding to 2 seconds) and a fixed step size (e.g., a step size of 50 sampling points, corresponding to 0.5 seconds), forming a sliding time window, i.e., windowed samples. There is a 75% overlap between adjacent time windows to ensure the temporal continuity of feature extraction. Optionally, the three-axis motion data can be synchronously written to a Flash memory using a persistent unit for offline playback verification.

[0043] Windowed samples are simultaneously fed into two parallel branches: posture feature extraction and macroscopic feature extraction. The posture feature extraction branch extracts at least the following features from each time window: statistical features (including mean, standard deviation, and range of each axis), spectral features (including main frequency amplitude and frequency band energy), acceleration features, and half-window features, forming a posture feature vector used to distinguish between stationary, walking, and running postures.

[0044] The macroscopic feature extraction branch extracts at least the standard deviation of the resultant acceleration vector within the same time window. Median of the resultant vector of angular velocity , Mean-free composite acceleration standard deviation , standard deviation of Z-axis acceleration Angular velocity / acceleration empirical ratio Low-frequency proportion of horizontal amplitude spectrum High-frequency proportion of horizontal amplitude spectrum The proportion of low frequencies in the gyroscope amplitude spectrum Macroscopic features, including those of vehicles, are used to distinguish between low-frequency continuous vibrations in vehicles and gait vibrations in pets. The subscript... Indicates the first A time window. Low-frequency proportion of the horizontal amplitude spectrum. High-frequency proportion of horizontal amplitude spectrum The proportion of low frequencies in the gyroscope amplitude spectrum All three are dimensionless proportions.

[0045] Macroscopic segment detection detects continuous active macroscopic vibration intervals within a rolling time window sequence and outputs the entry peak position of the macroscopic motion segment. Exit peak position and segment span . The unit of measurement is the number of time window intervals, which can be converted into time by multiplying by the single window step size of approximately 4 seconds in the current embodiment.

[0046] This solves the problem in existing technologies that rely solely on a single acceleration amplitude feature and cannot simultaneously characterize the pet's limb movement patterns and the low-frequency vibration characteristics of the vehicle. It enables the parallel supply of the same IMU sampling stream to two branches: attitude recognition and macroscopic vehicle recognition, providing a data foundation for subsequent dual-branch fusion judgment.

[0047] Step S202: Based on the posture features within each time window, prioritize judging whether the pet's posture is running according to the set rules. If the posture is not running, use a machine learning model to distinguish between walking and standing still.

[0048] This step of pose classification uses a hybrid strategy of priority rules and machine learning models: First, determine whether the pet's posture is running based on the set rules. Then, compare the median of the resultant acceleration vector of the k-th window with a set threshold (e.g., 6000) to determine the adjustable ratio. This is dimensionless data. When the median of the resultant acceleration vector of the k-th window is less than a set threshold (e.g., 6000), ,otherwise and order , ,in and These are the mean and standard deviation of the resultant acceleration vector, respectively; and These are the adjusted mean and standard deviation of the sum of acceleration vectors, respectively.

[0049] In some alternative embodiments, the running criterion is: ; in, Indicates logical OR; This indicates a logical AND operation. , and three thresholds , , All values ​​use the original units of acceleration. ,For example , ; This is a dimensionless ratio; it should be noted that, in other embodiments, those skilled in the art can set it according to the actual situation. , , The specific value to be taken.

[0050] If the rule determines that the animal is not running, a machine learning model (in one embodiment, a random forest model with 24 trees and 11,418 nodes, occupying approximately 79,976 bytes of flash memory, with zero heap space) is loaded from the Flash memory to infer the posture feature vector, distinguish between walking and standing, and output a posture label (running / walking / standing). In the post-processing stage, multi-window voting and hysteresis smoothing mechanisms can be used to suppress brief fluctuations in posture labels between adjacent time windows. For pets of different breeds or sizes, adaptation can be achieved by adjusting the running judgment threshold table without retraining the model.

[0051] This embodiment sets the running determination as a rule in advance, avoiding the uncertainty of machine learning model inference in high amplitude scenarios. At the same time, it limits the model inference to walking / stationary binary classification, reducing the model complexity and embedded platform resource consumption.

[0052] Step S203: Determine whether the macroscopic features within each time window meet the conditions for pet activity inside the vehicle and / or vehicle vibration. Based on the condition judgment results within several consecutive time windows, obtain the dual signature verification result that allows entry into the vehicle.

[0053] Furthermore, the macroscopic features within each time window are compared with preset thresholds for in-vehicle pet activity conditions and vehicle vibration conditions to determine whether the in-vehicle pet activity conditions and / or vehicle vibration conditions are met. Single-window condition judgment is achieved by comparing macroscopic features with preset thresholds; the calculation is simple and suitable for real-time execution on resource-constrained embedded platforms.

[0054] Preferably, the preset thresholds for pet activity conditions inside the vehicle and vehicle vibration conditions are determined through the following process: Macroscopic features are extracted from three-axis motion data samples labeled as stationary, walking, running, vehicle idling, vehicle driving, and parked; three-axis motion data samples labeled as vehicle idling, vehicle driving, and parked are positive on-vehicle samples; three-axis motion data samples labeled as stationary, walking, and running are negative off-vehicle samples. Let the labeled sample set be ; For the first Macroscopic feature vectors extracted from each time window ; For the corresponding labels. Define the vehicle-mounted positive sample set. Non-vehicle-mounted negative sample set They are respectively: ; ; and from The set is divided proportionally. Used for objective function evaluation, the remaining samples constitute the training set. Used for candidate threshold generation; This is a set union operation. It divides the data into records rather than random windows to prevent adjacent windows of the same record from falling into both the training and hold-out sets simultaneously.

[0055] Based on each macroscopic feature in the training set The distribution of positive on-board samples and negative off-board samples in the dataset generates a candidate threshold set. The threshold vector is defined as: ( , , , , , , , , , , ); in, The threshold for the standard deviation of the sum vector of the running acceleration of a pet is consistent with the dimensions of the corresponding acceleration statistic. The threshold value for the median vector of the resultant vector of the pet's running angular velocity; The threshold for the standard deviation of the sum vector of pet walking acceleration is consistent with the dimensions of the corresponding acceleration statistics. The threshold value for the empirical ratio of a pet's walking angular velocity to acceleration; The threshold for the high-frequency proportion of the horizontal amplitude spectrum of pet walking is the dimensionless proportion threshold. It represents the minimum standard deviation of the vehicle acceleration vector, consistent with the dimensions of the corresponding acceleration statistic. The threshold value for the empirical ratio of vehicle angular velocity to acceleration; It represents the maximum standard deviation of the vehicle acceleration vector, consistent with the dimensions of the corresponding acceleration statistic. The threshold for the standard deviation of the vehicle's mean-free synthetic acceleration is consistent with the dimensions of the corresponding acceleration statistics. The minimum proportion of low frequencies in the vehicle's horizontal amplitude spectrum is denoted as , and the dimensionless proportion threshold is denoted as . is the minimum proportion of low frequencies in the amplitude spectrum of the vehicle gyroscope, and is the dimensionless proportion threshold. and Adopted and At the same empirical numerical scale, the threshold for the proportion of spectral amplitude is a dimensionless quantity.

[0056] Candidate threshold combination space This is the Cartesian product of the candidate sets for each of the 11 thresholds mentioned above; each candidate set can be generated from the neighboring quantiles of the corresponding feature, and the number of candidate values ​​for each threshold is limited. Keep it within the traversable range.

[0057] Each threshold in θ is associated with a corresponding macroscopic feature; the same macroscopic feature can correspond to an upper limit, a lower limit, or multiple thresholds under different business conditions, so the number of thresholds is not the same as the dimension of the macroscopic feature.

[0058] Traversal The candidate threshold combinations are used to calculate the vehicle-mounted missed detection rate, the non-vehicle-mounted false entry rate, and the following constraints on the holdout set.

[0059] Using the weighted sum of the vehicle-mounted missed detection rate and the non-vehicle-mounted false entry rate as the objective function, and with the constraints that the three-axis motion data samples of the running tag should not trigger vehicle entry and the three-axis motion data samples of the stationary tag when there is no macroscopic motion segment should not trigger vehicle entry alone, based on the remaining three-axis motion data samples, the threshold with the smallest objective function is selected from the candidate threshold combinations as the preset threshold for the pet activity conditions and vehicle vibration conditions in the vehicle.

[0060] Given threshold combinations In the The in-vehicle pet activity conditions and vehicle vibration conditions for each time window are defined as follows: and : ; ; Single window dual signature : ; That is, evidence of both pet activity and vehicle vibration was detected within the same time window. , and All evidence is single-window evidence; the fulfillment of any single condition alone does not directly equate to entering the driving state. Final entry into the vehicle requires a combination of continuous window counting, macroscopic motion segments, attitude gating, and driving model determination. This is an indicator function; it equals 1 if the condition is true, and equals 0 if the condition is false. For example, , , , , , , , , , and Acceleration thresholds use the original units of acceleration values, and angular velocity thresholds use the original units of angular velocity values. During deployment, the calibration, verification, and sensor range and the conversion relationship between the original values ​​should be consistent with those on the device.

[0061] In the reserved set Above, the on-board missed detection rate and the off-board false entry rate are defined as follows: ; ; in, This represents the final vehicle entry determination result for the i-th verification time window under the threshold combination θ.

[0062] objective function The weighted sum of the on-board missed detection rate and the off-board false entry rate: ; in, The weights are respectively for the vehicle-mounted missed detection rate and the non-vehicle-mounted false entry rate; The tolerance for missed detections and false entries can be adjusted according to the application scenario. In one embodiment, the tolerance is... .

[0063] When iterating through candidate threshold combinations, the following hard constraints must be met simultaneously: Constraint 1 (Running samples must not trigger vehicle entry): ; Constraint 2 (Stationary samples must not trigger restricted synthetic vehicle entry when there is no macroscopic motion segment): ; in, This indicates the number of macroscopic motion segments detected within the current scrolling window.

[0064] Under the condition that both constraint one and constraint two are satisfied, the optimal threshold combination The following optimization problem was identified: And it satisfies both constraint one and constraint two; That is, selecting the objective function from the candidate threshold combinations that satisfy the two hard constraints. The smallest combination is used as the final preset threshold. If no candidate combination satisfies both constraints simultaneously, then the restrictions are relaxed first. The weights are then re-evaluated and the process is repeated, or the above calibration procedure is re-executed after expanding the collected samples.

[0065] For new species, body types, or installation tightness, the above process can be re-executed to generate a parameter table without changing the dual-branch, dual-signature, and shared gating structure. This calibration process ensures the threshold's discriminative ability in real-world pet wearing scenarios and can be re-executed for new species, body types, or installation tightness without altering the algorithm structure.

[0066] The aforementioned thresholds use a fixed parameter table in the current firmware and do not perform online noise scaling. If other embodiments require the introduction of online calibration, the sensor units, scaling objects, and boundary conditions should be verified separately, rather than directly scaling the empirical ratio of angular velocity to acceleration. Low-frequency proportion of horizontal amplitude spectrum High-frequency proportion of horizontal amplitude spectrum The proportion of low frequencies in the gyroscope amplitude spectrum Dimensionless characteristics. Specifically, the acceleration threshold can only be scaled according to the acceleration calibration ratio, and the angular velocity threshold can only be scaled according to the angular velocity calibration ratio; the empirical ratio of angular velocity to acceleration... If the threshold needs to be converted, it should be converted simultaneously according to the ratio of the two proportions, and should not use the same scaling factor as a single frame threshold.

[0067] Specifically, in the process of obtaining the dual-signature verification result allowing vehicle entry, if the macroscopic features within each time window simultaneously meet the conditions for pet activity inside the vehicle and vehicle vibration, a single-window dual-signature is generated. Then, the number of time windows consecutively generating single-window dual-signatures backward from the current moment, the number of time windows consecutively meeting the pet activity condition backward from the current moment, the number of time windows meeting the vehicle vibration condition within the current time interval, and the number of time windows generating single-window dual-signatures within the current time interval are compared with a set threshold (the specific value can be manually set according to actual conditions) to obtain the dual-signature verification result allowing vehicle entry. By combining single-window condition "AND" logic with time-sequential multi-count verification, the problem of accidental vehicle entry triggered by a single condition, such as a pet running alone or the vehicle being stationary, is effectively avoided.

[0068] Step S204: Combining the pet's current posture, the dual signature verification result allowing entry into the vehicle, and the starting position of the macroscopic movement segment, configure a shared vehicle entry gate control. After satisfying the shared vehicle entry gate requirement, execute the matching entry driving status determination procedure based on the availability of the macroscopic movement segment.

[0069] Furthermore, the process for determining whether the shared vehicle access control is satisfied is as follows: When the vehicle is in a running posture, the shared entry gate control is set to prohibit entry into the driving state. When the posture is walking, if the number of time windows that continuously generate single-window dual signatures is not less than the set time window number threshold, or the difference between the exit peak position and the entry peak position of the macroscopic motion segment is not less than the set peak difference threshold, then it is determined that the shared vehicle entry gate control is satisfied; if the starting position of the macroscopic motion segment is in the candidate segment of the later part of the time window, then it is determined that the shared vehicle entry gate control is not satisfied.

[0070] The shared vehicle entry gate applies a unified pre-constraint to all vehicle entry paths, which can prevent running and false entry at the gate level, fundamentally reducing the misjudgment rate of non-vehicle activities.

[0071] In the shared vehicle entry gate control, it is prohibited to use macro motion segments whose starting position is in the preset proportion interval after the candidate search buffer as the basis for vehicle entry (false segment prohibition). That is, if the starting position of the macro motion segment is in the candidate interval after the time window buffer, the vehicle entry gate control verification is judged to fail.

[0072] During the process of executing a matching entry driving state determination procedure based on the availability of the macroscopic motion segment, when the macroscopic motion segment is available, a pre-configured first entry driving state determination procedure is executed; wherein, the first entry driving state determination procedure includes several parallel sub-determination procedures, each of which independently determines the entry driving state; these sub-determination procedures are all pre-configured according to the relevant parameters of the macroscopic motion segment, and those skilled in the art can design the sub-determination procedures in detail according to the actual situation, which will not be described in detail here.

[0073] When the macroscopic motion segment is missing or flashing, the pre-configured second entry driving state determination procedure is executed. In the second entry driving state determination procedure, it is only executed when the number of windows that meet the vehicle vibration conditions and the number of windows that generate single-window double signatures reach the preset number within the scrolling time. When there is no macroscopic motion segment, it is prohibited to trigger the vehicle entry in a static posture. When the number of macroscopic motion segments is 0, it is prohibited to execute the pre-configured second entry driving state determination procedure based solely on the scrolling vehicle feature label.

[0074] This embodiment minimizes the probability of a runner mistakenly entering the driving state by using multiple constraints of shared gating. At the same time, it ensures the vehicle entry detection capability in scenarios such as weak vehicle load and short travel distance through a multi-path vehicle entry mechanism, thus solving the problem of easy mistaken entry in the running scenario when judging driving with a single threshold in the prior art.

[0075] To verify the effectiveness of dual signatures, the vehicle model, and entry gating in suppressing unauthorized entry into non-vehicle-mounted walking / running activities, offline playback was performed using the same data link as the device: the original input frequency of the six-axis IMU was 100Hz, which was decimated by a factor of 2 to form an effective classification input of approximately 50Hz, with a window length of 200 points and a step size of 200 points, and each time window lasting approximately 4 seconds; whether the vehicle entered the vehicle at the final public state was used as the criterion. For three sets of complete walking / running records known to result in unauthorized entry, the initial unauthorized entry times before optimization were approximately 40 seconds, 100 seconds, and 52 seconds, respectively; after adding activity context consistency verification, the number of vehicle locking windows in the three sets of records decreased from 65 / 75, 50 / 76, and 60 / 75 to 0 / 75, 0 / 76, and 0 / 75, respectively. This result indicates that rejecting overlap between pet activity and weak macroscopic segments, sparse vehicle vibration accompanied by long review activities, and continuous horizontal high-frequency gait can prevent the vehicle model from being independently triggered at the end of the walking / running activity.

[0076] Further replay analysis was conducted using 69 non-vehicle-mounted negative activity samples from three species, encompassing 2619 valid time windows, ultimately resulting in zero vehicle entry errors. Seven real vehicle data points were then used for verification; all seven entered the vehicle, with initial entry times of 76 seconds, 44 seconds, 44 seconds, 36 seconds, 40 seconds, 72 seconds, and 40 seconds, respectively. Before and after the aforementioned walk-run error suppression rule was implemented, the initial entry time and window-by-window entry / exit status of these seven real vehicle records remained unchanged. This result demonstrates that while activity context rejection reduces known walk-run errors, it does not alter the initial entry result of this set of real vehicle data.

[0077] To verify short-term parking hold and long-term parking release, same-link playback was performed on four 20-second or 30-second short-term parking records and five 40-second or 60-second long-term parking records. All four short-term parking records maintained the driving state continuously; all five long-term parking records released the driving state during the parking phase and re-entered the driving state after the vehicle resumed movement. These results demonstrate that a lock-and-release mechanism based on recent driving references, relatively low-amplitude evidence, parking semantics, and recovery confirmation can distinguish between short-term parking hold and long-term parking release.

[0078] Step S205: After determining that the driving state has been entered, the pet state is locked to the driving state. The driving state is released when the number of continuous time windows not covered by the macro motion segment reaches the preset release hysteresis threshold.

[0079] Furthermore, the locking exit point is determined jointly based on the exit peak of the macroscopic motion segment, the forward holding window, and the minimum duration window, and the locking exit point is extended when the preset macroscopic motion segment coverage, overlap, or rolling holding conditions are met. The dynamic extension mechanism of the locking exit point ensures the continuous stability of the vehicle state in scenarios such as short stops at red lights and bumpy roads, effectively suppressing the state jitter caused by the temporary absence of macroscopic segments.

[0080] Initial lock exit point Take the maximum value of the following three: Macro segment exit peak position Current window number Add forward hold window number ; Entering peak position Add minimum number of continuous windows on the vehicle body .Right now In one embodiment, , .

[0081] When any subsequent macro segment overlaps with the locked segment within the preset overlap margin (in one embodiment) If they overlap within a time window, then update. If the current window is still covered by the macro segment, or if the conditions for scrolling pet-keeping or smooth vehicle-keeping are met, then continue extending backward. .

[0082] Release conditions while driving are divided into two categories: normal release and rapid release. General release requirements: The current window is not covered by the macro-motion segment and does not overlap with the locked segment; the number of consecutive uncovered windows is not less than the release hysteresis threshold. (like ), and has experienced no less than since reaching its peak. (like ( ) time windows; make For the current macroscopic motion segment tail exit peak associated with the locked segment; when Release the boundary when it is effective and no earlier than the minimum vehicle body continuous position. : ,otherwise It also needs to meet the current window number requirement. Release is only possible after the condition is met. In addition, parallel release branches are set for relative parking, parking transfer, engine shutdown, stable residual parking, pet activity parking, sensor low-noise parking, and long parking. Release can be achieved once any branch satisfies the minimum duration window count.

[0083] Fast release branch: release hysteresis threshold Generally, non-vehicle states are quickly confirmed using three consecutive time windows not covered by macroscopic motion segments; walking, running, or low-vibration stationary states are typically confirmed using five consecutive time windows not covered by macroscopic motion segments; when recent vehicle signatures or smooth vehicle evidence are sufficient, or when the current window is still within the lockout holding range, This indicates that release via a rapid, continuous counting path is prohibited, and the process should continue to be handled by the window or parking branch that has exited from the lock and has not been covered by the macroscopic motion segment for 20 consecutive times.

[0084] , , and The design process is as follows: On vehicle samples labeled with engine shutdown times, statistically analyze the distribution of the longest macroscopic gap caused by red lights, short stops, and road bumps, as well as the delay distribution from the disappearance of the vehicle signature after actual engine shutdown to the time when exiting the vehicle is due; shilling The higher percentile value of the short-term pause gap is used to avoid repeated exits / re-entries, and the upper limit is the maximum acceptable release time after the actual engine shutdown. Subsequently, a joint search was conducted. , and This maximizes vehicle-mounted retention and ensures that the engine shutdown release delay does not exceed the upper limit. The number of quick release windows is determined by the continuous non-vehicle window distribution of pet walking / running samples after leaving the vehicle.

[0085] After the driving state is released, the public motion state is restored to the state corresponding to the posture label output by the posture recognition branch (stationary, walking, or running), thus realizing the complete output of the four public motion states of stationary, walking, running, and driving. Figure 3 A schematic diagram illustrating the state changes during pet vehicle tracking is provided.

[0086] This embodiment ensures the continuous stability of the driving state in scenarios such as short stops at red lights and bumpy roads through a dynamic extension mechanism that locks the exit point; by using a dual-track mechanism of releasing the hysteresis threshold and fast release, it achieves state switching after the pet leaves the vehicle while suppressing state jitter, thus solving the problem of frequent state switching caused by the lack of driving state maintenance and exit mechanisms in the prior art.

[0087] In one or more embodiments, the pet localization and motion state recognition method based on multi-source sensor fusion further includes: The four public motion state codes (stationary, walking, running, and driving) are encoded and written into the status field of the positioning report message. A driving compatibility flag and a non-stationary flag are set when the public state is driving. Specifically, the four states and the selectable number of steps are fused into a positioning packet and sent to the cloud platform. In the positioning data packet, the location field carries location information such as latitude and longitude; the four-state encoding field maps stationary / walking / running / driving to different status codes (encoded as 0 / 1 / 2 / 3 respectively in one embodiment); the driving compatibility flag is set (value 1) when the public state is driving; the movement flag is generated based on whether the public state is stationary (set to 1 when non-stationary); the air pressure related field carries the cumulative air pressure difference between the current air pressure value and the relative reference air pressure; other fields such as fault bits may also be included. This encoding design enables the cloud and user terminal to directly parse the behavioral semantics (walking / running / driving / stationary) of the trajectory points and to perform low-power strategy linkage based on the driving flag.

[0088] In other embodiments, the pet localization and motion state recognition method based on multi-source sensor fusion further includes: The system scans for nearby Wi-Fi networks and compares them with pre-stored home access point information. If a match is found, the GNSS positioning frequency is reduced; otherwise, it is restored. Specifically, after a periodic trigger, the system reads the home Wi-Fi configuration (access point identifier, channel, and signal strength threshold), scans for nearby Wi-Fi networks, and determines whether a match is found with a home access point (AP) and whether the RSSI (Received Signal Strength Indicator) reaches the threshold. If so, the system is considered home, and the GNSS positioning frequency is suppressed or reduced to save power; otherwise, the system is considered away from home, and GNSS positioning is restored or enabled. IMU motion recognition and cellular reporting then continue, and the system waits for the next cycle. This strategy eliminates the need for frequent GNSS module wake-ups by pets in a home environment, effectively reducing overall terminal power consumption.

[0089] In other embodiments, the pet localization and motion state recognition method based on multi-source sensor fusion further includes: The system collects air pressure values ​​and calculates the cumulative pressure difference relative to a reference pressure, then writes the air pressure values ​​and cumulative pressure difference into the positioning report message. Specifically, the barometer periodically collects the current air pressure value, the microcontroller calculates the cumulative pressure difference between the current air pressure value and the reference pressure at the time of device startup or the last calibration, and writes these two values ​​into the air pressure-related field of the positioning data packet, which is then sent to the cloud platform along with the positioning report message for user terminals to use for auxiliary estimation of floor changes.

[0090] like Figure 4 As shown, the pet localization and motion state recognition system based on multi-source sensor fusion provided in this embodiment of the invention can be implemented in software. The pet localization and motion state recognition system based on multi-source sensor fusion includes the following software modules: The feature extraction module 401 is used to receive the pet's three-axis motion data and divide the rolling time window, and simultaneously extract posture features and macro features from the three-axis motion data in each time window and detect macro motion segments. The posture recognition module 402 is used to determine whether the pet's posture is running based on the posture features within each time window, according to the set rules. If the posture is not running, a machine learning model is used to distinguish between walking and standing still. The dual signature verification module 403 is used to determine whether the macroscopic features within each time window meet the conditions for pet activity inside the vehicle and / or vehicle vibration conditions. Based on the condition judgment results within several consecutive time windows, a dual signature verification result allowing entry into the vehicle is obtained. The vehicle entry status determination module 404 is used to combine the pet's current posture, the dual signature verification result allowing entry into the vehicle, and the starting position of the macroscopic movement segment to configure a shared vehicle entry gate. After the shared vehicle entry gate is satisfied, the pre-configured first vehicle entry status determination program is executed according to the availability of the macroscopic movement segment. The first vehicle entry status determination program includes several parallel sub-determination programs, and each sub-determination program independently determines the vehicle entry status. The driving state locking and releasing module 405 is used to lock the pet's state to driving state when it is determined that the driving state has been entered, and to release the driving state when the number of continuous time windows not covered by the macro motion segment reaches the preset release hysteresis threshold.

[0091] It should be noted that each module in the pet localization and motion state recognition system based on multi-source sensor fusion in this embodiment corresponds one-to-one with each step in the pet localization and motion state recognition method based on multi-source sensor fusion in the above embodiment, and their specific implementation processes are the same, so they will not be repeated here.

[0092] This embodiment processes the pet's three-axis motion data in parallel using a posture recognition branch and a macroscopic vehicle recognition branch. It suppresses erroneous entry through dual signature conditions and shared vehicle entry gating, improves the detection capability in weak vehicle scenarios through multi-path vehicle entry and restricted synthetic vehicle entry, and suppresses state jitter through lock maintenance and exit hysteresis. Finally, it outputs the four public motion states of stationary, walking, running and driving.

[0093] The structure of the electronic device according to an embodiment of the present invention will be described in detail below. Figure 5 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of the present invention. It can be understood that... Figure 5 The diagram shows only an exemplary structure of the electronic device, not the entire structure. Some or all of the structures shown may be implemented as needed.

[0094] The electronic device provided in this embodiment of the invention includes at least one processor 501, a memory 502, a user interface 503, and at least one network interface 504. The various components in the pet positioning and motion state recognition system based on multi-source sensor fusion are coupled together via a bus system 505. It can be understood that the bus system 505 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 505 also includes a power bus, a control bus, and a status signal bus. The user interface 503 may include a display, keyboard, mouse, trackball, click wheel, buttons, a touchpad, or a touch screen, etc.

[0095] It is understood that memory 502 can be volatile memory or non-volatile memory, or both. In this embodiment of the invention, memory 502 is capable of storing data to support the operation of the terminal. Examples of this data include any computer programs used to operate on the terminal, such as operating systems and applications. The operating system includes various system programs, such as framework layers, core library layers, driver layers, etc., used to implement various basic services and handle hardware-based tasks. Applications can include various applications.

[0096] In some embodiments, the pet localization and motion state recognition system based on multi-source sensor fusion provided in this invention can be implemented using a combination of hardware and software. For example, the system can be a processor in the form of a hardware decoding processor, programmed to execute the pet localization and motion state recognition method based on multi-source sensor fusion provided in this invention. For instance, the hardware decoding processor can employ one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0097] As an example, processor 501 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0098] As an example of the hardware implementation of the pet positioning and motion state recognition system based on multi-source sensor fusion provided in this embodiment of the invention, the device provided in this embodiment of the invention can be directly executed by a processor 501 in the form of a hardware decoding processor. For example, it can be executed by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components to implement the pet positioning and motion state recognition method based on multi-source sensor fusion provided in this embodiment of the invention.

[0099] The memory 502 in this embodiment of the invention is used to store various types of data to support the operation of the pet localization and motion state recognition system based on multi-source sensor fusion, or to store data for execution. Figure 2 The program code for the method shown. Examples of this data include: any executable instructions for operation on a pet localization and motion state recognition system based on multi-source sensor fusion, such as executable instructions that can be included in the program implementing the pet localization and motion state recognition method based on multi-source sensor fusion of the present invention.

[0100] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including functions for executing... Figure 2 The program code for the method shown. In such an embodiment, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by the central processing unit, it performs the various functions defined in the apparatus of this application.

[0101] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0102] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for pet localization and motion state recognition based on multi-source sensor fusion, characterized in that, include: Receive the pet's three-axis motion data and divide it into rolling time windows. Simultaneously extract posture features and macroscopic features from the three-axis motion data within each time window and detect macroscopic motion segments. Based on the posture features within each time window, the system prioritizes judging whether the pet's posture is running according to the set rules. If the posture is not running, the system uses a machine learning model to distinguish between walking and standing still. Determine whether the macroscopic features within each time window meet the conditions for pet activity inside the vehicle and / or vehicle vibration. Based on the condition judgment results within several consecutive time windows, obtain the dual signature verification result that allows entry into the vehicle. Combining the pet's current posture, the dual signature verification result allowing entry into the vehicle, and the configuration of a shared vehicle entry gate at the start position of the macroscopic movement segment, after satisfying the shared vehicle entry gate requirement, a pre-configured first entry driving state determination procedure is executed based on the availability of the macroscopic movement segment; wherein, the first entry driving state determination procedure contains several parallel sub-determination procedures, and each sub-determination procedure independently determines the entry driving state. Once the vehicle is determined to be in driving mode, the pet's status is locked as driving mode. The driving mode is released when the number of consecutive time windows not covered by the macro motion segment reaches the preset release hysteresis threshold.

2. The pet localization and motion state recognition method based on multi-source sensor fusion as described in claim 1, characterized in that, The macroscopic features within each time window are compared with preset thresholds for in-vehicle pet activity conditions and vehicle vibration conditions to determine whether the in-vehicle pet activity conditions and / or vehicle vibration conditions are met.

3. The pet localization and motion state recognition method based on multi-source sensor fusion as described in claim 2, characterized in that, The process of determining the preset thresholds for pet activity conditions inside the vehicle and vehicle vibration conditions is as follows: Macroscopic features were extracted from three-axis motion data samples labeled as stationary, walking, running, vehicle idling, vehicle driving, and parking. The three-axis motion data samples for vehicle idling, vehicle driving, and parking labels are positive on-board samples. The triaxial motion data samples labeled stationary, walking, and running are non-vehicle-mounted negative samples. Based on the macroscopic feature distribution of positive in-vehicle samples and negative in-vehicle samples, candidate threshold combinations for in-vehicle pet activity conditions and vehicle vibration conditions are generated. Using the weighted sum of the vehicle-mounted missed detection rate and the non-vehicle-mounted false entry rate as the objective function, and with the constraints that the three-axis motion data samples of the running tag should not trigger vehicle entry and the three-axis motion data samples of the stationary tag when there is no macroscopic motion segment should not trigger vehicle entry alone, based on the remaining three-axis motion data samples, the threshold with the smallest objective function is selected from the candidate threshold combinations as the preset threshold for the pet activity conditions and vehicle vibration conditions in the vehicle.

4. The pet localization and motion state recognition method based on multi-source sensor fusion as described in claim 1, characterized in that, During the process of obtaining the double signature verification result that allows entry into the vehicle, if the macroscopic features within each time window simultaneously meet the conditions for pet activity inside the vehicle and vehicle vibration, then a single-window double signature is generated. Then, the number of time windows that continuously generate single-window dual signatures forward from the current time, the number of time windows that continuously meet the conditions for pet activity inside the vehicle forward from the current time, the number of time windows that meet the conditions for vehicle vibration within the current time interval, and the number of time windows that generate single-window dual signatures within the current time interval are compared with the set thresholds to obtain the dual signature verification result that allows entry into the vehicle.

5. The pet localization and movement state recognition method based on multi-source sensor fusion as described in claim 1, characterized in that, In determining whether the shared vehicle access control is satisfied, when the posture is running, the shared vehicle access control is in a state of prohibiting entry into the vehicle.

6. The pet localization and motion state recognition method based on multi-source sensor fusion as described in claim 1, characterized in that, In the process of determining whether the shared vehicle access control is met, when the posture is walking, if the number of time windows for continuously generating single-window double signatures is not less than the set time window number threshold, or the difference between the exit peak position and the entry peak position of the macroscopic motion segment is not less than the set peak difference threshold, then the shared vehicle access control is determined to be met.

7. The pet localization and motion state recognition method based on multi-source sensor fusion as described in claim 1, characterized in that, The locking exit point is determined by combining the exit peak of the macro motion segment, the forward holding window, and the minimum duration window, and the locking exit point is extended when the preset macro motion segment coverage, overlap, or rolling holding conditions are met.

8. A pet localization and motion state recognition system based on multi-source sensor fusion, characterized in that, The pet localization and motion state recognition method based on multi-source sensor fusion as described in any one of claims 1-7 includes: The feature extraction module is used to receive the pet's three-axis motion data and divide it into rolling time windows. It simultaneously extracts posture features and macro features from the three-axis motion data within each time window and detects macro motion segments. The posture recognition module is used to determine whether the pet's posture is running based on the posture features within each time window, according to the set rules. If the posture is not running, a machine learning model is used to distinguish between walking and standing still. The dual signature verification module is used to determine whether the macroscopic features within each time window meet the conditions for pet activity inside the vehicle and / or vehicle vibration. Based on the condition judgment results within several consecutive time windows, the dual signature verification result allowing entry into the vehicle is obtained. The vehicle entry status determination module is used to combine the pet's current posture, the dual signature verification result allowing entry into the vehicle, and the starting position of the macroscopic movement segment to configure a shared vehicle entry gate. After the shared vehicle entry gate is satisfied, the pre-configured first vehicle entry status determination program is executed according to the availability of the macroscopic movement segment. The first vehicle entry status determination program contains several parallel sub-determination programs, and each sub-determination program independently determines the vehicle entry status. The driving status locking and releasing module is used to lock the pet's status to driving status when it is determined that the driving status has been entered, and to release the driving status when the number of continuous time windows not covered by the macro motion segment reaches the preset release hysteresis threshold.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the pet localization and motion state recognition method based on multi-source sensor fusion as described in any one of claims 1-7.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the steps in the pet localization and motion state recognition method based on multi-source sensor fusion as described in any one of claims 1-7.