Anti-leg-warping reminding method and device
By combining the Kalman filter algorithm and multi-level confidence model with hardware interrupt wake-up mechanism and dynamic sampling rate switching, the problems of high false alarm and false negative rates and short battery life in leg-crossing behavior recognition are solved, realizing continuous and effective intervention in leg-crossing behavior and improving data quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-03
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies suffer from high false alarm and false negative rates, insufficient battery life, limited correction effects, and poor sensor stability when identifying leg-crossing behavior, leading to data source distortion.
By employing a Kalman filter algorithm combined with an attitude sensor and a multi-level confidence model, and through a hardware interrupt wake-up mechanism and dynamic sampling rate switching, a closed-loop state machine is constructed, consisting of sleep, low-power monitoring, high-precision identification, and continuous reminder modes. Combined with an adjustable fixing structure, this ensures the stability of the sensor and the leg.
Significantly reduces false alarm and false alarm rates, improves battery life, enables continuous and effective intervention and data quality for leg-crossing behavior, ensures sensor robustness, and enhances recognition reliability and correction effectiveness.
Smart Images

Figure CN121774504A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of human behavior monitoring technology, specifically relating to a method and device for preventing leg crossing reminders. Background Technology
[0002] Maintaining a crossed-legs sitting posture for extended periods can easily lead to health problems such as scoliosis and pelvic tilt. To correct this bad habit, various technological solutions have emerged, but all have significant shortcomings in terms of reliability, battery life, and user experience.
[0003] Early physical restraint solutions (such as foot straps and foot pedals) prevented leg crossing by restricting leg movement, but they severely sacrificed the user's freedom of posture and comfort, making them unsuitable for everyday scenarios.
[0004] Intelligent sensing solutions based on MEMS sensors attempt to address this problem, but due to limitations in their underlying technology, systemic issues still exist. The recognition algorithm is not reliable enough, with high false positive and false negative rates: Existing solutions mostly use simple static angle threshold judgment methods, which cannot effectively distinguish between crossing legs and normal activities such as sitting down, standing up, and leg shaking. The algorithm lacks targeted optimization and anti-interference ability for leg movement characteristics.
[0005] The power consumption architecture is crude, resulting in a significant short battery life: In pursuit of real-time performance, most solutions keep the sensors and main processor running at full speed continuously. Although some have introduced low-power modes, the wake-up mechanism that relies on the main processor to poll the sensor status is inefficient. The frequent wake-up operations themselves consume a lot of power, leading to short device battery life.
[0006] The monitoring logic and hardware foundation are weak, resulting in limited corrective effects: In terms of monitoring logic, existing solutions are mostly single-trigger alerts, which users can easily avoid by briefly adjusting their posture, failing to form a continuous intervention loop. Regarding the hardware, the wearable structure is prone to displacement, causing sensor data to be distorted from the source, significantly reducing the effectiveness of subsequent algorithm optimization.
[0007] Therefore, there is an urgent need in this field for a solution that incorporates systematic innovation from algorithms and power consumption architecture to monitoring logic to achieve reliable, long-lasting, and unobtrusive reminders for leg-crossing behavior. Summary of the Invention
[0008] This application proposes an anti-leg-lifting reminder method and device, aiming to systematically solve a series of interconnected technical defects in the prior art, such as high false alarm / false alarm rate due to simple and crude judgment logic, short battery life due to coarse power consumption architecture, limited correction effect due to discontinuous monitoring behavior, and data source distortion caused by poor wearing stability.
[0009] A first aspect of this application provides a method for preventing leg-crossing reminders executed by a wearable device, the wearable device being fixed to a user's shoe, comprising: When the device is in an ultra-low power operating mode, it is woken up and switched to a low power operating mode in response to the detection of a change in the user's leg posture. In the low-power operating mode, motion data of the user's legs is acquired, and the motion data is filtered based on the characteristics of leg motion to estimate the posture information of the legs. The filtering process is configured to suppress posture estimation drift caused by micro-movement of leg muscles. Based on the posture information, a confidence level for the leg-crossing behavior is calculated using a confidence model. The confidence model generates a base confidence level based at least on the posture angle and the duration of the posture, and a user-adaptive factor is used to personalize the base confidence level. When the confidence level of the leg-crossing behavior reaches a first threshold, the device is controlled to switch from the low-power operating mode to the high-power operating mode. In the high-power operating mode, the confidence level of the leg-crossing behavior is continuously monitored, and the user is reminded when the preset conditions are met. When the confidence level of the leg-crossing behavior is lower than the first threshold and continues for a preset time, the device is controlled to switch back to the low-power operating mode.
[0010] In some embodiments of this application, reminding the user when preset conditions are met includes: When the confidence level of the leg-crossing behavior is higher than the second threshold, a reminder is triggered and continuously sent to the user.
[0011] In some embodiments of this application, the wearable device includes at least a main control module and an attitude sensor connected in communication; The ultra-low power operating mode is a sleep mode; the low power operating mode is a low power monitoring mode; and the high power operating mode includes a high-precision identification mode and a continuous reminder mode. The method includes: When the device is in sleep mode, the posture sensor continuously collects the user's leg movement data at a first frequency. When a leg posture change event is detected, a wake-up message is sent to the main control module. In response to the wake-up message, the main control module is woken up from the sleep mode and controls the device to enter the low-power monitoring mode; In the low-power monitoring mode, the main control module acquires the user's leg motion data at a first rate and processes the motion data to calculate the confidence level of the leg-crossing behavior, wherein the motion data is acquired by the posture sensor at a second frequency. When the confidence level of the leg-crossing behavior reaches the first threshold, the main control module controls the device to switch from the low-power monitoring mode to the high-precision recognition mode. In the high-precision recognition mode, the posture sensor continuously collects the user's leg motion data at a third frequency, and the main control module acquires and processes the motion data at a second rate. The third frequency is greater than the second frequency, the second frequency is greater than the first frequency, and the second rate is greater than the first rate. The processing refers to the filtering and leg-crossing behavior confidence level calculation. In the high-precision recognition mode, when the confidence level of the leg-crossing behavior is higher than the second threshold, the main control module controls the device to switch from the high-precision recognition mode to the continuous reminder mode, and when the confidence level of the leg-crossing behavior is lower than the first threshold and continues for a first preset time, it switches back to the low-power monitoring mode. In the continuous reminder mode, reminders are continuously sent to the user. When the confidence level of the leg-crossing behavior is lower than the second threshold and continues for a second preset time, the system switches back to the high-precision recognition mode. If the motion data is not acquired for a third preset time, the main control module controls the device to switch back to the sleep mode.
[0012] In some embodiments of this application, the filtering process is implemented using the Kalman filter algorithm, and a damping term is introduced into the state equation of the Kalman filter algorithm to simulate the effect of micro-movement of leg muscles.
[0013] In some embodiments of this application, calculating the confidence level of the leg-crossing behavior using a confidence model includes: The confidence level of the leg-crossing behavior Determined by the following formula: Where x is the basic behavioral characteristic value that has not been adjusted by user habits, and its value is determined by the following function: in, The real-time leg tilt angle obtained through filtering is greater than 30° when identifying leg-crossing behavior; The integral value of the angular velocity over the past 2 seconds is used to capture the range of motion of the leg lift. To maintain the leg-crossing posture for a certain duration; , , The weights are obtained by training on historical leg-crossing behavior data, with values of 0.1, 0.3, and 0.05 respectively. For user adaptive factors; When the confidence level exceeds the threshold of 0.75, it is determined to be a leg-crossing behavior.
[0014] In some embodiments of this application, the user adaptive factor The system dynamically adjusts based on users' historical usage data, and the adjustment rules are as follows: If a false alarm occurs within each 24-hour cycle, the value of β decreases by 0.1. If a false negative occurs, the value of β increases by 0.05.
[0015] In some embodiments of this application, the user adaptive factor The value is limited to the range of 0.7 to 1.3.
[0016] A second aspect of this application provides an anti-leg-lifting reminder device, including a housing, a main control module disposed within the housing, a posture sensor, and a reminder module, wherein: It also includes an adjustable fixing structure for adapting and fixing the shell to the user's shoe; The attitude sensor is fixedly installed inside the housing, and its sensing direction is configured to collect leg posture change data. The posture sensor is configured to operate in an extremely low-power state when the device is in an extremely low-power operating mode, and to generate a wake-up signal when a change in the user's leg posture is detected. The signal output terminal of the attitude sensor is connected to the wake-up input terminal of the main control module, and is used to transmit the wake-up signal to the main control module; The main control module is configured to be woken up from an ultra-low power operating mode after receiving the wake-up signal, and to execute the method according to the first aspect of the embodiments of this application.
[0017] In some embodiments of this application, the attitude sensor is a six-axis inertial measurement unit that includes a three-axis accelerometer and a three-axis gyroscope.
[0018] In some embodiments of this application, the main control module is configured to control the attitude sensor to perform dynamic sampling rate switching: When the device is in the ultra-low power operating mode, the attitude sensor operates at the first sampling rate; When the device switches to the low-power operating mode, the attitude sensor switches to a second sampling rate higher than the first sampling rate. When the device switches to the high-power operating mode, the attitude sensor switches to a third sampling rate that is higher than the second sampling rate.
[0019] In summary, the anti-leg-crossing reminder method and device provided in the embodiments of this application address the problem of high false alarm / false negative rates by introducing a Kalman filter algorithm based on leg movement characteristics, effectively suppressing posture estimation drift caused by high-frequency interference such as muscle micro-movements during daily sitting activities, providing a clean data foundation for subsequent accurate identification; furthermore, by fusing a leg-crossing behavior confidence model that integrates angle and duration, single-point judgment is transformed into a comprehensive evaluation based on the behavior process, significantly improving the ability to distinguish between leg-crossing behavior and normal activity interference, thereby greatly reducing the false alarm and false negative rates; addressing the problem of short battery life by constructing a power management architecture consisting of hardware interrupt wake-up and dynamic sampling rate switching, ensuring that the system core processor is only woken up and put into operation when a valid posture change event is detected, avoiding the waste of continuous work or software polling, thereby achieving a significant reduction in average power consumption and a significant improvement in battery life; To address the issue of limited corrective effects: By establishing a closed-loop state machine based on multi-level confidence thresholds, a seamless monitoring and alerting process is achieved, from identifying potential leg-crossing behavior to the user fully correcting their posture. This avoids the drawbacks of single-trigger mechanisms being easily circumvented, thus enhancing the continuous intervention and correction of poor posture. To address the issue of data source distortion: An adjustable fixing structure ensures the stability of the relative position between the sensor and the legs, minimizing measurement errors caused by looseness at the physical level, thereby providing high-quality, highly consistent raw data for the entire system. Ultimately, through the synergistic effect of the above technical features, comprehensive improvements are achieved in recognition reliability, battery life, intervention effectiveness, and data foundation reliability. Attached Figure Description
[0020] The features and advantages of this application will become clearer with reference to the accompanying drawings, which are illustrative and should not be construed as limiting the application in any way. In the drawings: Figure 1 This is a system architecture diagram of an anti-leg-lifting reminder device according to some embodiments of this application; Figure 2 This is a circuit diagram of an anti-leg-lifting reminder device according to some embodiments of this application; Figure 3 This is a three-dimensional schematic diagram of the universal snap-fit fixing structure used in this application; Figure 4 This is a schematic diagram of the recommended wearing position of the anti-leg-crossing reminder device on the user's shoe according to an embodiment of this application; Figure 5 This is a flowchart illustrating an anti-leg-crossing reminder method according to some embodiments of this application; Figure 6 These are schematic diagrams illustrating four operating modes according to some embodiments of this application. Detailed Implementation
[0021] In the following detailed description, numerous specific details of this application are illustrated by example to provide a thorough understanding of the relevant disclosure. However, it will be apparent to those skilled in the art that this application can be practiced without these details. It should be understood that the terms “system,” “apparatus,” “unit,” and / or “module” used in this application are one way of distinguishing different parts, elements, sections, or components at different levels in a sequential arrangement. However, these terms may be replaced with other expressions if other expressions can achieve the same purpose.
[0022] It should be understood that when a device, unit, or module is referred to as being "on," "connected to," or "coupled to" another device, unit, or module, it may be directly connected to or coupled to or communicate with other devices, units, or modules, or there may be intermediate devices, units, or modules present, unless the context explicitly indicates otherwise. For example, the term "and / or" as used herein includes any one and all combinations of one or more of the relevant listed items.
[0023] The terminology used in this application is for the purpose of describing specific embodiments only and is not intended to limit the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates otherwise, words such as "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate that explicitly identified features, integrals, steps, operations, elements, and / or components are included, and such expressions do not constitute an exclusive list, and other features, integrals, steps, operations, elements, and / or components may also be included.
[0024] Referring to the following description and accompanying drawings, these and other features and characteristics, operating methods, functions of related structural elements, combinations of parts, and economics of manufacture of this application can be better understood, wherein the description and drawings form part of the specification. However, it is clearly understood that the drawings are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. It is understood that the drawings are not drawn to scale.
[0025] Various structural diagrams are used in this application to illustrate various variations of the embodiments according to this application. It should be understood that the preceding or following structures are not intended to limit this application. The scope of protection of this application is determined by the claims.
[0026] To address the shortcomings of existing anti-leg-crossing reminder devices, such as high false alarm and missed alarm rates and high system power consumption, as mentioned in the background art, this application provides an anti-leg-crossing reminder solution. Its core is the construction of a complete algorithm flow from signal anti-interference processing to intelligent behavior recognition, and its deep collaboration with an event-driven dynamic power management mechanism to reduce false alarm and missed alarm rates and system power consumption.
[0027] Figure 1 This is a system architecture diagram of an anti-leg-lifting reminder device according to some embodiments of this application. Figure 1 As shown, the physical carrier of the proposed solution is a wearable device containing components such as a posture sensor and a main control module. Its innovation lies in its algorithm and operational logic: First, Kalman filtering (introducing a damping term into the state equation to simulate muscle micro-movements) preprocesses the raw motion data, effectively suppressing interference from daily activities and estimating pure leg posture information. Then, a confidence model integrating posture angle, duration, and user adaptive factors replaces simple threshold judgment, achieving accurate identification and personalized adaptation of leg-crossing behavior. The algorithm is embedded in an operational flow triggered by hardware interrupt wake-up and confidence threshold decision-making: the device is normally in sleep mode, monitored by the sensor; when a posture change event is detected, a hardware interrupt wakes the system to enter a low-power monitoring mode, performing filtering and confidence calculation; only when the confidence reaches the threshold is a higher-power identification and alert mode activated step by step. This collaborative design of "targeted filtering + intelligent identification model + event / confidence-driven power management" systematically solves the contradiction between false alarms, missed alarms, and power consumption at its root.
[0028] The following section will, in conjunction with the accompanying drawings, first provide a detailed description of the specific hardware implementation of the scheme, and then elaborate on the control logic and complete process under each working mode.
[0029] Figure 2 This is a circuit diagram of an anti-leg-lifting reminder device according to an embodiment of this application. Figure 2 As shown, in the hardware architecture of the device, the main control module U6 (model STM32L031G6U6) serves as the control core. Its peripheral components include a six-axis inertial measurement unit U7 (model LSM6DS3TR-C) acting as an attitude sensor, an alert module consisting of a buzzer and drive circuitry, and a power management circuit. The attitude sensor U7 is used to collect leg movement data. The alert module provides the user with a reminder to cross their legs.
[0030] The device is installed on the user's shoe via a universal buckle structure that adapts to different users' instep sizes and provides a secure fit. Figure 3 This is a three-dimensional schematic diagram of the universal snap-fit fixing structure used in this application, as shown below. Figure 3As shown, the universal buckle fixing structure includes a pair of relatively sliding buckle arms and an adjusting locking mechanism. Its adjustment range is 10mm to 35mm, and the maximum locking force is ≥30N, ensuring a secure fit. The locking mechanism consists of a silicone buckle band with continuous ratchet grooves and a spring pin (elastic pawl) with elasticity provided by a curved spring plate, achieving stepless adjustment and self-locking.
[0031] To ensure the accuracy of posture data acquisition, the sensing axis of the posture sensor must maintain a preset alignment with the leg axis when worn. Therefore, this application achieves precise alignment through a combination of physical structural guidance and visual markings.
[0032] Figure 4 This is a schematic diagram illustrating the recommended wearing position of the anti-leg-crossing reminder device on the user's shoe according to an embodiment of this application. Figure 4 As shown, the main body of the device must be worn in a designated area on the instep. Specifically, the device shell and the matching rubber sleeve employ an asymmetrical physical foolproof design (such as a trapezoidal cross-section) to ensure that the device can only be worn in one correct orientation, thus aligning the sensor sensing axis with the longitudinal centerline of the device. Furthermore, a midline reference mark is printed on the surface of the rubber sleeve to guide the user in aligning the device with the line connecting the toes to the midpoint of the ankle bone. Inside the device, the PCB board housing the attitude sensor engages with the pillars inside the shell via positioning notches on its edges, and the sensor is mounted at a preset angle with a 0° deviation, mechanically ensuring that the sensor sensing axis is strictly aligned with the device reference line. After the device is powered on, the main control module reads the initial attitude value of the sensor. If the detected initial attitude angle (such as the angle with the horizontal plane) is within a preset range (e.g., <5°), alignment is considered successful; otherwise, a reminder module will prompt the user to re-wear the device.
[0033] The key to achieving low-power operation lies in the hardware connection design between the main control module U6 and the attitude sensor U7. For example... Figure 2 As shown, the interrupt pin (INT1) of the attitude sensor U7 is directly connected to the GPIO pin PA0 of the main control module U6 through an independent signal line called "WAKE_UP", forming a dedicated hardware interrupt wake-up link.
[0034] In this configuration, when the device is in a very low-power sleep mode, the main control module U6 can enter a deep sleep state, while the attitude sensor U7 maintains low-power operation and continuously monitors motion data. Once the programmable logic inside the attitude sensor U7 detects a leg attitude change event that meets preset conditions, its INT1 pin will immediately generate a high-level pulse, which is transmitted to the PA0 pin of the main control module U6 through the "WAKE_UP" signal line. This signal directly triggers the U6's internal external interrupt (EXTI), waking it up from sleep mode within microseconds and putting it into active mode. This eliminates the need for software polling to respond to events, fundamentally eliminating the unnecessary power consumption during standby.
[0035] The main control module U6 and the attitude sensor U7 establish a bidirectional data communication channel via an I2C bus (including I2C_SCL and I2C_SDA signal lines). The main control module U6 acts as the I2C master, using this channel to configure parameters and read data from the sensor U7, providing the hardware foundation for switching between multiple operating modes. Specifically: when the device is in sleep mode, the attitude sensor U7 is configured to acquire data at a first sampling rate (e.g., 12.5Hz); when the device is awakened and enters a low-power monitoring mode, the main control module U6 can configure the sensor U7 to operate at a second sampling rate higher than the first sampling rate (e.g., 52Hz); when the device switches to a high-power operating mode (such as a high-precision recognition mode), the main control module U6 can dynamically switch the sampling rate of the sensor U7 to a higher third sampling rate (e.g., 208Hz). This dynamic sampling rate adjustment strategy, precisely corresponding to the operating mode, is key to achieving the optimal balance between power consumption and accuracy in the system.
[0036] The alert function is implemented by the main control module U6 driving the buzzer circuit through control signal lines (such as the GPIO pin connected to the base of the buzzer driver transistor). The entire system is powered by a single lithium battery with a voltage range of 3.0V to 4.2V, and the voltage is stabilized at 3.3V by a low dropout linear regulator (LDO) to power the main control module U6, sensor U7, and other core components.
[0037] The hardware foundation for implementing this solution has been detailed above. The following section will further explain the software control logic and complete workflow based on this hardware architecture.
[0038] Figure 5 This is a flowchart illustrating an anti-leg-crossing reminder method according to some embodiments of this application. In some embodiments of this application, the anti-leg-crossing reminder method is... Figure 1 The main control module shown executes the method. The method includes the following steps: S510, when the device is in an ultra-low power operating mode, in response to the detection of a user's leg posture change event, the device is woken up from the ultra-low power operating mode and switched to a low power operating mode.
[0039] This step achieves the initial switch from ultra-low power standby to active monitoring. In one specific embodiment, the ultra-low power operating mode corresponds to a sleep mode. In sleep mode, the main control module U6 enters a deep sleep state. At this time, the attitude sensor U7 is configured to operate at its lowest power consumption and continuously collect acceleration and angular velocity data at a low first sampling rate (e.g., 12.5Hz). The programmable finite state machine inside the sensor U7 is configured to continuously monitor the data stream and determine whether a valid leg attitude change event that meets preset conditions has occurred (e.g., the angular velocity or acceleration threshold in a specific axis is exceeded).
[0040] Once such an event is detected, sensor U7 immediately sends a high-level interrupt pulse to the PA0 pin of main control module U6 via its INT1 pin and a dedicated "WAKE_UP" hardware interrupt signal line. This hardware interrupt signal directly triggers an external interrupt of main control module U6, waking it from sleep mode within microseconds.
[0041] After the main control module U6 wakes up, it first dynamically switches the sampling rate of sensor U7 from the first sampling rate (e.g., 12.5Hz) to a higher second sampling rate (e.g., 52Hz) via the I2C bus to meet the data processing requirements of the low-power monitoring mode. Subsequently, the system officially enters the low-power monitoring mode. This wake-up mechanism based on a dedicated hardware interrupt line completely avoids the power overhead of software polling and is key to achieving ultra-long standby time.
[0042] S520, in the low-power operating mode, acquire motion data of the user's legs, and perform filtering processing on the motion data based on the characteristics of leg motion to estimate the posture information of the legs. The filtering processing is configured to suppress posture estimation drift caused by micro-movement of leg muscles.
[0043] This step is implemented using the Kalman filter algorithm. Within each computation cycle, this algorithm executes a closed-loop process involving prediction and updating to fuse motion model predictions and sensor measurements, ultimately outputting the optimal attitude estimate.
[0044] The specific implementation steps are as follows: Initialization: Upon system startup, initial values are assigned to the state vector and its uncertainties. The state vector is defined as follows: Includes the leg inclination angle to be estimated. angular velocity and angular acceleration specifically designed to absorb muscle micro-movement disturbances. .
[0045] Execute prediction and update repeatedly: Prediction steps: Based on the optimal state vector estimate from the previous time step, predict the state vector at the current time step. Using state transition equations Make predictions. Among them, For process noise, the state transition matrix Its form is: Damping term in the matrix ( The core is ) . Its physical significance lies in the fact that when the sensor detects a high-frequency, small-amplitude change in angular acceleration (mainly caused by micromuscular movements), this model can ( The term effectively absorbs this disturbance and prevents it from being integrated into the angle estimate, thereby significantly suppressing attitude estimation drift.
[0046] Update step: The predicted state vector is fused with the current sensor measurements to obtain the optimal estimate for the current moment. The core of this step is the observation equation, which links the system's internal state with the actual sensor measurements: , Among them, among them, The observation vector, in this application, directly corresponds to the sensor measurements, namely the tilt angle and angular velocity; To observe noise; the observation matrix H specifies which quantities in the state vector can be directly observed, and its specific form is: In the update step, sensor observations are read. The algorithm dynamically determines the predicted value using Kalman gain. and observed values The trust weight is determined and the two are merged.
[0047] Uncertainty quantification: The uncertainties of the state prediction model and sensor measurements are quantified using the process noise covariance matrix Q and the observation noise covariance matrix R, respectively, which is the basis for the correct calculation of the Kalman gain. The optimized values are as follows: , Output: The optimized state estimate obtained at the end of each iteration. It contains filtered and stable real-time leg tilt angles and angular velocities, providing high-quality input for subsequent confidence calculations.
[0048] S530, based on the posture information, calculate the confidence level of the leg-crossing behavior using a confidence model. The confidence model generates a basic confidence level based at least on the posture angle and the duration of the posture, and uses a user adaptive factor to personalize the basic confidence level.
[0049] This step is the core of behavior recognition decision-making, and its operation process is as follows: The main control module U6 first obtains optimized posture information in real time from the S520 Kalman filter processing stage, including the clean real-time leg tilt angle ( ), the integral of angular velocity reflecting the amplitude of motion ( (take the integral value within the past 2 seconds) and attitude maintenance time ( The system then inputs these features into a pre-defined normalization function to generate a base confidence score (x) between 0 and 1. The specific form of this function is: , The purpose of this function is to fuse multiple dimensions of posture features (angle, amplitude, time) through a linear combination, and then map the calculation result into a basic confidence value representing the probability of the behavior occurring through a specific nonlinear transformation.
[0050] Subsequently, the system performs personalized calibration of the base confidence score based on an adaptive factor (β) stored independently for the user, resulting in the final confidence score for the leg-crossing behavior used for decision-making: .
[0051] Meanwhile, as a background adaptive process, the system dynamically adjusts the adaptive factor β every preset time interval. This process counts false positives and false negatives within this period: if a false positive occurs, the β value is decreased by 0.1 to reduce sensitivity; if a false negative occurs, the β value is increased by 0.05 to increase sensitivity. The adjusted new β value is then limited to the range of 0.7 to 1.3 for confidence calculation in the next period, thereby achieving continuous self-optimization of the algorithm.
[0052] S540, when the confidence level of the leg-crossing behavior reaches a first threshold, control the device to switch from the low-power operating mode to the high-power operating mode.
[0053] S550, in the high-power operating mode, continuously monitor the confidence level of the leg-crossing behavior, and remind the user when the preset conditions are met. When the confidence level of the leg-crossing behavior is lower than the first threshold and continues for a preset time, control the device to switch back to the low-power operating mode.
[0054] When the confidence level of the leg-crossing behavior reaches a first threshold, the device is controlled to switch from the low-power operating mode (i.e., low-power monitoring mode) to the high-power operating mode.
[0055] In a preferred embodiment, to further implement refined power management and reminder strategies, the high-power operating mode is designed to include two sub-modes: a high-precision identification mode and a continuous reminder mode. Therefore, in this embodiment, the device has a total of four operating modes (sleep mode, low-power monitoring mode, high-precision identification mode, and continuous reminder mode). Figure 6 This is a schematic diagram of the device's operating modes. The complete switching logic between these four operating modes constitutes an intelligent closed-loop state machine, as detailed below: Sleep mode and wake-up mechanism: The device initially operates in an extremely low-power sleep mode. In this mode, the main control module enters a deep sleep state, while the attitude sensor maintains minimal power consumption and continuously monitors data at a low sampling rate. Once the sensor's internal logic detects a valid leg attitude change event (such as an angular velocity change threshold exceeding 10° / s), it immediately sends a wake-up signal to the main control module via a dedicated hardware interrupt signal line (such as WAKE_UP). The main control module is then rapidly woken up by this interrupt and switches to the low-power monitoring mode. This hardware interrupt wake-up mechanism fundamentally avoids the power waste of software polling.
[0056] Mode upgrade path and reminder trigger: After being woken up, the device enters a low-power monitoring mode. In low-power monitoring mode, when the calculated confidence level of leg-lifting behavior reaches the first threshold, it indicates that the potential risk of leg-lifting behavior has been initially identified, and the device then switches from low-power monitoring mode to high-precision recognition mode.
[0057] In practice, typical conditions for reaching the first threshold include: the attitude information based on the Kalman filter output must satisfy a tilt angle > 15° and an angular velocity integral > 20° for 3 consecutive seconds. These specific conditions will be comprehensively calculated by the confidence model and reflected as a confidence value exceeding the first threshold.
[0058] In high-precision recognition mode, the main control module can increase the sampling rate of the attitude sensor to a higher third sampling rate (e.g., 208Hz) and run Kalman filtering and confidence models at a higher frequency for more accurate verification. If the confidence level further increases after verification and remains above the second threshold (e.g., >0.75), the device switches to continuous reminder mode and activates the reminder module (e.g., a buzzer) to continuously remind the user.
[0059] Mode downgrade and fallback mechanism: In continuous alert mode, if the confidence level drops below the second threshold and persists for a period of time due to the user adjusting their posture, the device switches back to high-precision recognition mode and stops alerting, continuing observation. In high-precision recognition mode, if the confidence level further drops below the first threshold and persists for a period of time, it indicates that the risk of leg crossing has been eliminated, and the device switches back to low-power monitoring mode.
[0060] The global mechanism for returning to sleep: As a final power consumption optimization measure, if the system fails to acquire valid attitude change data for a third preset time (e.g., tens of seconds) in any operating mode, the main control module will control the entire device to switch back to an extremely low power sleep mode to complete a complete working cycle.
[0061] This closed-loop state machine, built upon multi-level confidence thresholds and specific action conditions, enables continuous, adaptive, and efficient intelligent intervention in user behavior, while maximizing system power consumption while ensuring functional effectiveness.
[0062] In summary, the anti-leg-crossing reminder method and device provided in the embodiments of this application introduce a leg-crossing behavior confidence calculation mechanism based on posture information and its duration. This mechanism transforms a single instantaneous angle judgment into a comprehensive evaluation combining the duration dimension, providing richer discrimination criteria. This significantly improves the accuracy and reliability of behavior recognition, effectively distinguishing leg-crossing behavior from normal activity interference, and solves the defects of existing technologies with high false alarm and false negative rates due to simple and crude judgment logic. Furthermore, by constructing a dynamic power management architecture where a hardware interrupt wake-up signal is generated by the posture sensor, and the main control module switches its working mode accordingly, supplemented by a sampling and processing rate strategy that dynamically adjusts with the mode, this architecture ensures that the main control module is only woken up and put into operation when necessary, avoiding idle power consumption caused by continuous operation or software polling. This greatly reduces the average system power consumption and achieves ultra-long battery life, solving the problem of short battery life caused by a coarse power consumption architecture. The shortcomings are addressed by establishing a closed-loop state machine that automatically switches between low-power monitoring, high-precision identification, and continuous reminder modes based on multi-level confidence thresholds. This design ensures uninterrupted monitoring and reminders from the discovery of potential behavior to complete user correction, achieving continuous and uninterrupted effective intervention and correction of user leg-crossing behavior, thus overcoming the limitation of limited correction effect caused by discontinuous monitoring behavior. Furthermore, by employing an adjustable fixing structure to adapt and fix the device housing to the user's shoe, this structure physically ensures the stability of the relative position between the sensor and the leg, minimizing measurement errors caused by loosening or displacement, and ensuring signal quality and consistency from the data acquisition source. This solves the problem of data source distortion caused by poor wearing stability, which leads to a weak foundation for system reliability. Ultimately, through the synergistic effect of the above technical features, comprehensive improvements are achieved in identification reliability, battery life, intervention effectiveness, and data foundation reliability.
[0063] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding descriptions in the foregoing device embodiments, and will not be repeated here.
[0064] Although the subject matter described herein is provided in the general context of execution on a computer system in conjunction with an operating system and applications, those skilled in the art will recognize that other implementations can also be executed in conjunction with other types of program modules. Generally, program modules include routines, programs, components, data structures, and other types of structures that perform specific tasks or implement specific abstract data types. Those skilled in the art will understand that the subject matter described herein can be practiced using other computer system configurations, including handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframes, etc., and can also be used in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules may reside on both local and remote memory storage devices.
[0065] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0066] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of this application and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of this application should be included within the protection scope of this application. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.
Claims
1. A method for preventing leg-crossing reminders executed by a wearable device, said wearable device being fixed to a user's shoe, characterized in that, include: When the device is in an ultra-low power operating mode, it is woken up and switched to a low power operating mode in response to the detection of a change in the user's leg posture. In the low-power operating mode, motion data of the user's legs is acquired, and the motion data is filtered based on the characteristics of leg motion to estimate the posture information of the legs. The filtering process is configured to suppress posture estimation drift caused by micro-movement of leg muscles. Based on the posture information, a confidence level for the leg-crossing behavior is calculated using a confidence model. The confidence model generates a base confidence level based at least on the posture angle and the duration of the posture, and a user-adaptive factor is used to personalize the base confidence level. When the confidence level of the leg-crossing behavior reaches a first threshold, the device is controlled to switch from the low-power operating mode to the high-power operating mode. In the high-power operating mode, the confidence level of the leg-crossing behavior is continuously monitored, and the user is reminded when the preset conditions are met. When the confidence level of the leg-crossing behavior is lower than the first threshold and continues for a preset time, the device is controlled to switch back to the low-power operating mode.
2. The method according to claim 1, characterized in that, The step of reminding the user when preset conditions are met includes: When the confidence level of the leg-crossing behavior is higher than the second threshold, a reminder is triggered and continuously sent to the user.
3. The method according to claim 2, characterized in that: The wearable device includes at least a main control module and an attitude sensor with communication connectivity; The ultra-low power operating mode is a sleep mode; the low power operating mode is a low power monitoring mode; and the high power operating mode includes a high-precision identification mode and a continuous reminder mode. The method includes: When the device is in sleep mode, the posture sensor continuously collects the user's leg movement data at a first frequency. When a leg posture change event is detected, a wake-up message is sent to the main control module. In response to the wake-up message, the main control module is woken up from the sleep mode and controls the device to enter the low-power monitoring mode; In the low-power monitoring mode, the main control module acquires the user's leg motion data at a first rate and processes the motion data to calculate the confidence level of the leg-crossing behavior, wherein the motion data is acquired by the posture sensor at a second frequency. When the confidence level of the leg-crossing behavior reaches the first threshold, the main control module controls the device to switch from the low-power monitoring mode to the high-precision recognition mode. In the high-precision recognition mode, the posture sensor continuously collects the user's leg motion data at a third frequency, and the main control module acquires and processes the motion data at a second rate. The third frequency is greater than the second frequency, the second frequency is greater than the first frequency, and the second rate is greater than the first rate. The processing refers to the filtering and leg-crossing behavior confidence level calculation. In the high-precision recognition mode, when the confidence level of the leg-crossing behavior is higher than the second threshold, the main control module controls the device to switch from the high-precision recognition mode to the continuous reminder mode, and when the confidence level of the leg-crossing behavior is lower than the first threshold and continues for a first preset time, it switches back to the low-power monitoring mode. In the continuous reminder mode, reminders are continuously sent to the user. When the confidence level of the leg-crossing behavior is lower than the second threshold and continues for a second preset time, the system switches back to the high-precision recognition mode. If the motion data is not acquired for a third preset time, the main control module controls the device to switch back to the sleep mode.
4. The method according to claim 1, characterized in that: The filtering process is implemented using the Kalman filter algorithm, and the state equation of the Kalman filter algorithm introduces a damping term to simulate the effect of micro-movements of leg muscles.
5. The method according to claim 4, characterized in that, The calculation of the confidence level of the leg-crossing behavior using a confidence model includes: The confidence level of the leg-crossing behavior Determined by the following formula: Where x is the basic behavioral characteristic value that has not been adjusted by user habits, and its value is determined by the following function: in, The real-time leg tilt angle obtained through filtering is greater than 30° when identifying leg-crossing behavior; The integral value of the angular velocity over the past 2 seconds is used to capture the range of motion of the leg lift. To maintain the leg-crossing posture for a certain duration; , , The weight coefficients are obtained by training on historical leg-crossing behavior data, with values of 0.1, 0.3, and 0.05 respectively. For user adaptive factors; When the confidence level exceeds the threshold of 0.75, it is determined to be a leg-crossing behavior.
6. The method according to claim 5, characterized in that: The user adaptive factor The system dynamically adjusts based on users' historical usage data, and the adjustment rules are as follows: If a false alarm occurs within each 24-hour cycle, the value of β decreases by 0.
1. If a false negative occurs, the value of β increases by 0.
05.
7. The method according to claim 6, characterized in that: The user adaptive factor The value is limited to the range of 0.7 to 1.
3.
8. An anti-leg-lifting reminder device, comprising a housing, a main control module disposed within the housing, a posture sensor, and a reminder module, characterized in that: It also includes an adjustable fixing structure for adapting and fixing the shell to the user's shoe; The attitude sensor is fixedly installed inside the housing, and its sensing direction is configured to collect leg posture change data. The posture sensor is configured to operate in an extremely low-power state when the device is in an extremely low-power operating mode, and to generate a wake-up signal when a change in the user's leg posture is detected. The signal output terminal of the attitude sensor is connected to the wake-up input terminal of the main control module, and is used to transmit the wake-up signal to the main control module; The main control module is configured to be woken up from an ultra-low power operating mode after receiving the wake-up signal, and to execute the method described in any one of claims 1-7.
9. The apparatus according to claim 8, characterized in that: The attitude sensor is a six-axis inertial measurement unit that includes a three-axis accelerometer and a three-axis gyroscope.
10. The apparatus according to claim 7, characterized in that, The main control module is configured to control the attitude sensor to perform dynamic sampling rate switching: When the device is in the ultra-low power operating mode, the attitude sensor operates at the first sampling rate; When the device switches to the low-power operating mode, the attitude sensor switches to a second sampling rate higher than the first sampling rate. When the device switches to the high-power operating mode, the attitude sensor switches to a third sampling rate that is higher than the second sampling rate.