Home linkage control method and system based on smart wearable device
Patent Information
- Application Number
- CN202610714991.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]本申请提供了一种基于智能穿戴设备的家居联动控制方法及系统,解决了现有基于穿戴设备的家居联动控制方案依赖人工预标定静态设备方位角地图、无法自动建立和持续维护设备空间方位信息的问题,以及在多设备方位角相近场景下单次朝向角测量无法可靠区分控制目标的问题,提高了智能穿戴设备家居联动控制系统在无预配置条件下的自主部署能力及多设备场景下目标设备识别的准确率
[0010]Regarding the automatic creation and maintenance of device azimuth probability maps, this application uses device execution feedback signals as supervised learning labels for azimuth calibration. The precise azimuth is updated online using an exponentially weighted moving average formula to measure the mean and standard deviation of the azimuth angles for map entries. The design of a learning rate that decreases with the number of records allows the map to respond quickly to observation data in the early stages and stabilize after sufficient recording. The synchronous narrowing of the azimuth standard deviation directly improves the resolution of the Gaussian matching function in azimuth differentiation. The sliding window success rate monitoring mechanism takes a binary sequence of operation success and failure results as input. When the success rate falls below the drift judgment threshold, the corresponding entry is marked as needing recalibration, and the standard deviation is reset to its initial value. This triggers a local broadcast probe to re-collect the azimuth angle of that entry, while other entries remain unaffected. This local self-repair mechanism enables the map to automatically sense and update itself when the home layout changes, fundamentally overcoming the inherent defect of static pre-calibrated maps in existing technologies that become invalid after layout changes.
Smart Images

Figure CN122593616A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of gesture interaction technology, and in particular to a home linkage control method and system based on smart wearable devices. Background Technology
[0002] With the continuous development of IoT technology and smart wearable devices, wrist-worn devices such as smart bracelets and smart rings have the hardware capability to incorporate inertial measurement units (IMUs). Achieving contactless control of home appliances by collecting user hand movement data has gradually become a research hotspot in the field of human-computer interaction. In existing technologies, home control solutions based on wearable devices mainly rely on two types of interaction paths: one is triggering control commands through preset physical buttons or touch panels, requiring users to look down at the device interface to complete the operation; the other is activating the control process through voice wake-up words, which significantly reduces recognition rate in noisy environments. Some research attempts to introduce inertial sensors to collect hand movement data for gesture recognition, mapping aerial gestures such as drawing circles and swiping to control home appliances, thereby achieving a contactless interactive experience where users can control devices simply by raising their hands.
[0003] However, existing gesture recognition control schemes based on inertial sensors suffer from several common drawbacks. First, existing schemes generally employ a continuous high-frequency sampling strategy for inertial sensors, resulting in high power consumption in wearable devices and severely limiting battery life. Second, the system continuously listens to all motion signals indiscriminately, failing to distinguish between conscious control gestures and everyday limb movements during the triggering phase, leading to a high false trigger rate and impacting gesture recognition accuracy. Third, and most fundamentally, existing schemes rely on manually pre-built device spatial location maps to determine the control target after gesture recognition. This means users must manually configure the orientation coordinates or scanning markers of each home appliance before use, which involves static mapping. Figure 1 The solution becomes ineffective once the home layout changes, and no existing solution proposes a technical path for the automatic generation and continuous maintenance of equipment orientation maps. Summary of the Invention
[0004] This application provides a home linkage control method and system based on smart wearable devices, which solves the problems of existing home linkage control schemes based on wearable devices that rely on manual pre-calibration of static device azimuth maps, cannot automatically establish and continuously maintain device spatial orientation information, and cannot reliably distinguish control targets in a single orientation angle measurement in scenarios where multiple devices have similar azimuth angles. It improves the autonomous deployment capability of the smart wearable device home linkage control system under conditions without pre-configuration and the accuracy of target device identification in multi-device scenarios.
[0005] Firstly, this application provides a home automation control method based on a smart wearable device, the method comprising: Step S1: Based on the wrist motion data collected by the inertial measurement unit, extract the wrist intention preparatory state to obtain the gesture acquisition window; Step S2: Based on the inertial sensing timing data within the gesture acquisition window, extract the gesture type and wrist orientation angle to obtain gesture orientation data pairs; Step S3: Calculate the confidence level of matching the wrist orientation angle in the gesture orientation data pair with the average orientation angle of each device entry in the device orientation probability map. When the difference between the highest confidence level and the second highest confidence level is lower than the ambiguity threshold, detect the duplicate gesture with the same gesture type in the confirmation waiting window, and re-execute the matching with the average of the two wrist orientation angles as the accurate orientation angle to obtain the target device identifier and linkage command. Step S4: Send the linkage command to the home device corresponding to the target device identifier, and based on the device execution feedback signal, update the mean and standard deviation of the orientation angle of the corresponding entry of the target device identifier in the device azimuth probability map with the precise orientation angle to obtain the updated device azimuth probability map.
[0006] Secondly, this application provides a home linkage control system based on smart wearable devices, the home linkage control system based on smart wearable devices comprising: The extraction module is used to extract the wrist intention preparatory state based on the wrist motion data collected by the inertial measurement unit, and obtain the gesture acquisition window; The acquisition module is used to extract the gesture type and wrist orientation angle based on the inertial sensing timing data within the gesture acquisition window, and obtain gesture orientation data pairs. The matching module is used to calculate the confidence level of the wrist orientation angle in the gesture orientation data pair and the average orientation angle of each device entry in the device orientation angle probability map. When the difference between the highest confidence level and the second highest confidence level is lower than the ambiguity threshold, the module detects the duplicate gesture with the same gesture type in the confirmation waiting window, and re-executes the matching with the average of the two wrist orientation angles as the accurate orientation angle to obtain the target device identifier and linkage command. The update module is used to send the linkage command to the home device corresponding to the target device identifier, and based on the device execution feedback signal, update the mean and standard deviation of the orientation angle of the corresponding entry of the target device identifier in the device azimuth probability map with the precise orientation angle, so as to obtain the updated device azimuth probability map.
[0007] Thirdly, a home linkage control device based on a smart wearable device is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the home linkage control device based on the smart wearable device to execute the aforementioned home linkage control method based on the smart wearable device.
[0008] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the aforementioned home linkage control method based on a smart wearable device.
[0009] The technical solution provided in this application proposes to replace the traditional continuous high-frequency sampling strategy with a method that uses hierarchical sampling of the inertial measurement unit to trigger the wrist intention preparatory state. This method involves only performing lightweight calculations on the angular velocity magnitude during the normal low-frequency listening phase, and only switching to high-frequency sampling and opening the gesture acquisition window after detecting a feature sequence indicating a directional shift from a stationary state. This distinguishes conscious control gestures from everyday limb movements at the signal triggering level before they enter the recognition process. Based on this, sensor feature vectors are extracted from the inertial sensing time-series data within the gesture acquisition window, and a support vector machine classifier outputs the gesture type and gesture confidence score. The gesture type is associated with the synchronously acquired wrist orientation angle and encapsulated into a gesture orientation data pair. This ensures that a single gesture operation carries both action semantics and spatial orientation information, providing a two-dimensional input basis for subsequent device matching. In the device target determination stage, the angle difference between the wrist orientation angle and the mean orientation angle of each item in the device orientation angle probability map is normalized using a Gaussian function to obtain the matching confidence score. When the difference between the highest and second highest confidence scores is lower than the ambiguity threshold, a similar gesture re-confirmation mechanism is triggered. The mean of the two wrist orientation angles is used as the accurate orientation angle to re-perform the matching. This mechanism uses the second independent orientation angle measurement result carried by the repeated gesture itself to narrow the orientation uncertainty interval. Target disambiguation is completed without introducing any additional sensors or user active operation. Its core contribution is to unify the triggering conditions and disambiguation methods of ambiguity resolution within the single interaction channel of gesture recognition.
[0010] Regarding the automatic creation and maintenance of device azimuth probability maps, this application uses device execution feedback signals as supervised learning labels for azimuth calibration. The precise azimuth is updated online using an exponentially weighted moving average formula to measure the mean and standard deviation of the azimuth angles for map entries. The design of a learning rate that decreases with the number of records allows the map to respond quickly to observation data in the early stages and stabilize after sufficient recording. The synchronous narrowing of the azimuth standard deviation directly improves the resolution of the Gaussian matching function in azimuth differentiation. The sliding window success rate monitoring mechanism takes a binary sequence of operation success and failure results as input. When the success rate falls below the drift judgment threshold, the corresponding entry is marked as needing recalibration, and the standard deviation is reset to its initial value. This triggers a local broadcast probe to re-collect the azimuth angle of that entry, while other entries remain unaffected. This local self-repair mechanism enables the map to automatically sense and update itself when the home layout changes, fundamentally overcoming the inherent defect of static pre-calibrated maps in existing technologies that become invalid after layout changes. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic diagram of one embodiment of the home linkage control method based on smart wearable devices in this application. Figure 2 This is a schematic diagram illustrating the temporal change of the angular velocity magnitude during the wrist intention preparatory state detection process in an embodiment of this application; Figure 3 This is a schematic diagram illustrating the convergence process of the mean orientation angle of the device orientation probability map with the cumulative number of operations in the embodiments of this application. Detailed Implementation
[0013] This application provides a home linkage control method and system based on a smart wearable device. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0014] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the home linkage control method based on smart wearable devices in this application includes: Step S1: Based on the wrist motion data collected by the inertial measurement unit, extract the wrist intention preparatory state to obtain the gesture acquisition window; Specifically, the wrist intention preparation state is a wrist movement state marker determined by the signal morphology of the inertial measurement unit. The specific judgment logic is as follows: gyroscope three-axis angular velocity data are continuously collected at a first sampling frequency of 5Hz, and the magnitude of the angular velocity vector is calculated. When the magnitude is below 8° / s for three consecutive sampling cycles, it is recorded as a stationary state. Subsequently, if the magnitude is not lower than 25° / s and the change in the resultant force of the accelerometer's three axes is not lower than 2.0m / s² in the next sampling cycle, the stationary state is updated to the wrist intention preparation state, and the sampling frequency is switched to a second sampling frequency of 100Hz. A 1500ms gesture acquisition window is opened starting from the switching moment. The interval setting of the stationary threshold of 8° / s and the activation threshold of 25° / s stems from the physiological characteristic that the angular velocity fluctuations during daily walking and arm swinging cannot meet the continuous stationary condition, thus distinguishing conscious control actions from daily limb movements at the trigger level.
[0015] Step S2: Based on the inertial sensing timing data within the gesture acquisition window, extract the gesture type and wrist orientation angle to obtain gesture orientation data pairs; Specifically, the gesture orientation data pair is a structured data unit formed by binding and encapsulating the gesture type with the wrist orientation angle. The gesture type is obtained by classifying the sensor feature vectors using a support vector machine classifier. The sensor feature vectors are constructed by concatenating the mean, standard deviation, peak value, and zero-crossing rate of each channel of the inertial sensing time-series data within the gesture acquisition window into 50-point sub-windows, resulting in a total of 90 dimensions. The wrist orientation angle is extracted only when the classification confidence score is not lower than 0.65. The wrist orientation angle is calculated by converting the yaw angle component of the absolute orientation quaternion output from the magnetometer and accelerometer data through Madgwick complementary filtering. The value ranges from 0° to 360°, representing the absolute pointing orientation of the wearable device in the horizontal plane. The confidence threshold of 0.65 is set based on the following: below this value, the gesture type misclassification rate exceeds the acceptable range in actual testing; above this value, it can effectively filter out noisy gestures caused by random limb movements.
[0016] Step S3: Calculate the confidence level of matching the wrist orientation angle in the gesture orientation data pair with the average orientation angle of each device entry in the device orientation probability map. When the difference between the highest confidence level and the second highest confidence level is lower than the ambiguity threshold, detect duplicate gestures of the same type in the confirmation waiting window, and re-execute the matching with the average of the two wrist orientation angles as the accurate orientation angle to obtain the target device identifier and linkage command. Specifically, the device orientation probability map is a persistent data structure using device identifiers as keys and the mean and standard deviation of orientation angles as values. It records the distribution of wrist pointing orientations for each home appliance in space. The matching confidence score is calculated using a Gaussian function: the difference between the current wrist orientation angle and the mean orientation angle of a device item is used as input, and the standard deviation of that item's orientation angle is used as the distribution width parameter. The output score ranges from 0 to 1. After sorting all device item scores in descending order, the highest and second-highest scores are taken as the difference to obtain the confidence difference. The ambiguity threshold is set to 0.35. When the confidence difference is lower than this value, it indicates that the two candidate devices are too close in orientation, and a single orientation angle is insufficient to distinguish the target. In this case, a 2000ms confirmation waiting window is opened. The wrist orientation angles of the same type of repeated gestures detected in the window are checked against the first orientation angle in the buffer. If the deviation does not exceed 15°, the average of the two is taken as the accurate orientation angle, and the matching is re-executed. The average of two independent measurements is used to reduce the random error of a single measurement.
[0017] Step S4: Send the linkage command to the home device corresponding to the target device identifier, and based on the device execution feedback signal, update the mean and standard deviation of the orientation angle of the corresponding entry of the target device identifier in the device azimuth probability map with the accurate orientation angle to obtain the updated device azimuth probability map.
[0018] Specifically, the device execution feedback signal is the status change data returned by the home appliance after receiving the linkage command. Whether this signal arrives within a 3000ms timeout period is used as the criterion for determining the success of the operation. The average orientation angle is updated using an exponentially weighted moving average formula, with a learning rate α equal to 1 divided by the current number of records plus one. The learning rate decreases as the number of records increases, ensuring rapid convergence of the mean in the early stages and stability in the later stages. The standard deviation of the orientation angle is synchronously corrected based on the difference before and after the mean update. The success or failure result of each operation is appended to a sliding window of length 5. When the success rate within the window is below 0.4, the orientation angle record for that device item is considered to have experienced systematic drift. The standard deviation of the orientation angle is reset to the initial value of 30° and marked as requiring recalibration, triggering a local broadcast detection for that item. Other items are unaffected. The drift judgment threshold of 0.4 corresponds to at least 3 failures out of 5 operations. In actual testing scenarios, this proportion is sufficient to eliminate interference from occasional control failures while maintaining sufficient detection sensitivity for situations such as furniture movement causing orientation shifts.
[0019] In one specific embodiment, step S1 includes: Based on the inertial measurement unit, wrist motion data is continuously collected at the first sampling frequency, and the magnitude of the angular velocity vector in the wrist motion data is calculated to obtain the angular velocity magnitude sequence. Based on the angular velocity magnitude sequence, it is determined whether the angular velocity magnitude within a consecutive preset number of sampling periods is lower than the static threshold, thus obtaining the wrist static state marker; Based on the wrist stationary state marker, jump detection is performed on the angular velocity magnitude and acceleration change in subsequent sampling periods. When the angular velocity magnitude is not lower than the start threshold and the acceleration change is not lower than the acceleration threshold, the wrist stationary state marker is updated to the wrist intention preparation state. Based on the wrist intention preparation state, the sampling frequency of the inertial measurement unit is switched from the first sampling frequency to the second sampling frequency, and a gesture acquisition window of preset duration is opened starting from the switching moment.
[0020] Specifically, the inertial measurement unit continuously collects wrist motion data at a first sampling frequency of 5Hz. It calculates the magnitude of the three-axis angular velocity components ωx, ωy, and ωz output by the gyroscope using the Euclidean norm formula, i.e., taking the square root of the sum of the squares of the three-axis components to obtain the scalar angular velocity magnitude at each sampling moment. The magnitudes at each moment are arranged in chronological order to form an angular velocity magnitude sequence. A preset number of three sampling periods is used, with a stationary threshold of 8° / s. When the angular velocity magnitude is below 8° / s for three consecutive sampling periods, a wrist stationary state marker is output. This parameter combination is based on the fact that the wrist angular velocity fluctuations generated by normal walking arm swings typically exceed 12° / s and are persistent, making it impossible to form a signal pattern where the angular velocity is below 8° / s for three consecutive periods. However, the brief wrist-holding stationary state before the user actively initiates a gesture can stably meet this condition. The two types of motion modes have quantifiable differences in signal pattern.
[0021] After the wrist stationary state marker is generated, a jump detection is performed on the subsequent sampling cycle, simultaneously verifying two conditions: the angular velocity magnitude is not lower than the activation threshold of 25° / s, and the change in the resultant force of the three axes of the accelerometer between adjacent sampling moments is not lower than the acceleration threshold of 2.0 m / s². Both conditions must be met simultaneously to update the wrist stationary state marker to the wrist intention preparation state. The combination of the activation threshold of 25° / s and the acceleration threshold of 2.0 m / s² is designed to exclude false judgments triggered by simple low-speed drift or slight tremors. Low-speed drift usually does not meet the angular velocity condition, while slight limb tremors usually do not meet the acceleration change condition. Both must jump simultaneously to conform to the motion characteristics of actively initiated gestures. After the wrist intention preparation state is confirmed, the sampling frequency of the inertial measurement unit immediately switches from 5Hz to the second sampling frequency of 100Hz. A gesture acquisition window with a duration of 1500ms is opened from the moment the switch is completed, and inertial sensing timing data is continuously acquired at 100Hz until the window closes. The reason for setting the second sampling frequency to 100Hz is that the main motion frequency components of aerial gestures such as drawing circles and swiping left are concentrated in the 0 to 15Hz range. According to the Nyquist sampling theorem, at least 30Hz is required, and 100Hz is used to retain sufficient time domain resolution. The gesture acquisition window duration of 1500ms covers the time interval required to complete the above gestures at most normal speeds. If the window is exceeded, the acquisition will be terminated and the sampling frequency of the inertial measurement unit will be reduced to 5Hz.
[0022] Figure 2 This is a schematic diagram illustrating the temporal change of the angular velocity magnitude during the wrist intention preparatory state detection process in an embodiment of this application. Figure 2The figure shows a simulation curve of the angular velocity magnitude changing over time when the inertial measurement unit built into the wearable device collects wrist motion data at a first sampling frequency. The denser fluctuation segment in the figure corresponds to the daily arm swinging motion stage, in which the angular velocity magnitude is continuously higher than the rest threshold of 8° / s. The diagonally filled area corresponds to the wrist stationary state stage where the angular velocity magnitude is continuously lower than the rest threshold. The horizontally filled area corresponds to the gesture motion stage that begins after the detection of a directional start jump. The two horizontal reference lines in the figure are marked with the rest threshold of 8° / s and the start threshold of 25° / s, respectively, to illustrate the dual threshold joint determination condition of the wrist intention preparatory state.
[0023] In one specific embodiment, step S2 includes: The inertial sensing time series data in the gesture acquisition window is segmented according to the preset sub-window length. The mean, standard deviation, peak value and zero crossing rate of each sensor channel in each sub-window are spliced together to obtain the sensing feature vector. The sensor feature vectors are input into a support vector machine classifier to classify gestures, and the gesture type and gesture confidence score are obtained. Based on the comparison between the gesture confidence score and the preset confidence threshold, when the gesture confidence score is not lower than the preset confidence threshold, the yaw angle component is extracted from the absolute orientation quaternion output after the magnetometer data and accelerometer data are fused by Madgwick complementary filtering to obtain the wrist orientation angle. The gesture type is associated with the wrist orientation angle and encapsulated to obtain gesture orientation data pairs.
[0024] Specifically, the inertial sensing time-series data consists of six sensor channels: a gyroscope (three-axis angular velocity) and an accelerometer (three-axis acceleration). Within a 1500ms gesture acquisition window, 150 sampling points are obtained at 100Hz. This time-series data is divided into three non-overlapping sub-windows, each with 50 sampling points. For each sensor channel within each sub-window, four statistical features are calculated: mean, standard deviation, peak value, and zero-crossing rate. The zero-crossing rate is defined as the ratio of the number of times the signal value of that channel flips sign within the sub-window to the total number of sampling points. The calculation results of the three sub-windows, six channels, and four feature types are concatenated in a fixed order into a one-dimensional vector, resulting in a 72-dimensional sensing feature vector. This piecewise statistical method transforms the local dynamic characteristics of the time-series signal into a fixed-dimensional numerical representation, giving the classifier input a defined structure. The sensor feature vector is input into the support vector machine classifier. The kernel function is a radial basis function with a penalty coefficient of 10 and a kernel function bandwidth parameter of 0.05. The output is a gesture type label and the corresponding gesture confidence score. The gesture types include five categories: circle, swipe left, swipe right, click, and invalid. The gesture confidence score ranges from 0 to 1, reflecting the classifier's confidence in classifying the current feature vector as belonging to that gesture type.
[0025] A preset confidence threshold of 0.65 is used. If the gesture confidence score is lower than this value, the gesture is considered invalid and no further processing is performed. If the gesture confidence score is not lower than 0.65, the wrist orientation angle is extracted. The wrist orientation angle is obtained by fusing the magnetometer and accelerometer data from the nine-axis inertial measurement unit through Madgwick complementary filtering. The filter coefficient of Madgwick filtering is set to 0.1. This coefficient controls the correction strength of the accelerometer and magnetometer corrections to the gyroscope integral attitude. If the value is too high, it will introduce accelerometer noise and cause attitude jitter. If the value is too low, the gyroscope integral drift cannot be corrected in time. A value of 0.1 strikes a balance between the two. The fused output absolute orientation quaternion represents the device's absolute attitude relative to geomagnetic north in three-dimensional space with four components. The yaw angle, i.e., the absolute orientation angle in the horizontal plane, is obtained by converting the product of the real component and the two imaginary components of the quaternion using the arctangent function. Specifically, it is calculated by taking twice the sum of the product of the real part and the third imaginary part plus the sum of the products of the first imaginary part and the second imaginary part, and subtracting twice the sum of the squares of the second imaginary part and the third imaginary part from 1. After taking the arctangent of the above two terms, the result in radians is multiplied by 180 and divided by pi to convert it to degrees, with a value range of 0 degrees to 360 degrees, representing the absolute pointing orientation of the wearable device relative to geomagnetic north in the horizontal plane. The gesture type label and wrist orientation angle are packaged into a gesture orientation data pair in the form of key-value pairs. This data unit carries both the action semantics of the gesture and the spatial pointing information when the gesture is made.
[0026] In one specific embodiment, step S3 involves calculating the confidence level of matching the wrist orientation angle in the gesture orientation data pair with the mean orientation angle of each device entry in the device azimuth probability map, including: The angle difference between the wrist orientation angle in the gesture orientation data pair and the mean orientation angle of each device entry in the device orientation angle probability map is calculated to obtain the angle difference sequence of each device entry; Based on each angle difference in the angle difference sequence and the standard deviation of the orientation angle of the corresponding device item, the angle difference is normalized using a Gaussian function to obtain the matching confidence score of each device item. Sort the matching confidence scores in descending order, extract the highest matching confidence score and the second highest matching confidence score, and calculate the difference between the two to obtain the confidence difference value.
[0027] Specifically, the device azimuth probability map is a persistent data structure using device identifiers as keys and mean and standard deviation of orientation angles as values. The mean orientation angle records the weighted average of the wrist orientation angles during historical user operations of the device, while the standard deviation records the dispersion of the orientation angles around the mean across different operations. Together, they describe the spatial orientation distribution characteristics of the device under the user's habitual operating posture. The wrist orientation angles extracted from the hand gesture orientation data pairs are compared with the mean orientation angle of each device entry in the map to calculate the angle difference. The angle difference is the smaller of the absolute value of the difference between two orientation angles and 360 degrees minus that absolute value. This processing method eliminates the influence of the boundary between 0 degrees and 360 degrees on the difference calculation, ensuring that the difference between any two orientation angles falls within the range of 0 to 180 degrees. The angle difference values corresponding to all device entries are arranged in order of device number to obtain the angle difference sequence.
[0028] The matching confidence score for each device entry in the angle difference sequence is calculated by normalizing the angle difference of that entry using a Gaussian function: the square of the angle difference is divided by twice the square of the standard deviation of the orientation angle, and the natural exponent is calculated after taking the negative of the quotient. This yields a matching confidence score ranging from 0 to 1. The standard deviation of the orientation angle serves as the distribution width parameter in the Gaussian function. A smaller standard deviation results in a steeper function curve, meaning the score for the same angle difference decays more quickly, indicating that the historical control orientation of the device entry is relatively concentrated and has low tolerance for orientation angles deviating from the mean. A larger standard deviation results in a flatter curve, with a correspondingly higher tolerance for orientation angles deviating from the mean. This characteristic allows map entries to still generate reasonable matching scores even when the number of records is small and the orientation angle distribution has not yet converged. After sorting all device entries by matching confidence scores from highest to lowest, extract the highest matching confidence score (ranked first) and the second highest matching confidence score (ranked second). Subtract the two scores to obtain the confidence difference value. This difference value reflects the degree of distinction between the current wrist orientation angle and all device entries on the map. The larger the difference value, the clearer the distinction between the first candidate device and other devices in terms of orientation. The smaller the difference value, the more likely there are two or more candidate devices with similar orientations, indicating ambiguity in target orientation.
[0029] In one specific embodiment, in step S3, when the difference between the highest confidence level and the second highest confidence level is lower than the ambiguity threshold, a repeated gesture of the same type is detected within the confirmation waiting window, and the matching is re-executed using the average of the two wrist orientation angles as the accurate orientation angle, including: The confidence difference is compared with a preset ambiguity threshold. When the confidence difference is lower than the ambiguity threshold, a confirmation waiting window of a preset duration is opened starting from the current time, and the wrist orientation angle and gesture type in the gesture orientation data pair are cached in the buffer. Within the confirmation waiting window, the consistency of the gesture type of the newly detected repeated gesture with the gesture type in the buffer is checked, and the deviation of the wrist orientation angle of the newly detected repeated gesture with the wrist orientation angle in the buffer is checked. When the gesture type is consistent and the wrist orientation angle deviation does not exceed the preset deviation threshold, the average of the wrist orientation angle in the buffer and the wrist orientation angle of the repeated gesture is calculated to obtain the accurate orientation angle.
[0030] Specifically, the ambiguity threshold is set to 0.35. When the confidence difference is below 0.35, it indicates that the current wrist orientation angle is insufficient to distinguish between the first and second candidate devices in the device orientation probability map, and a single orientation angle measurement result cannot reliably determine the target device. At this time, a confirmation waiting window with a duration of 2000ms is opened starting from the current moment. The reason for setting the confirmation waiting window duration to 2000ms is that this duration is sufficient to cover the movement time required for the user to complete a complete gesture, while not affecting the real-time performance of the interaction due to excessive waiting time. The buffer is a temporary storage area that simultaneously writes the wrist orientation angle value and gesture type label from the current gesture orientation data pair for subsequent consistency and deviation checks. After the confirmation waiting window is opened, the inertial measurement unit maintains a high-frequency sampling state of 100Hz and continuously performs wrist intention preparation state detection. Once a new wrist intention preparation state is detected, the gesture acquisition and classification process is triggered to obtain the gesture type and wrist orientation angle of the repeated gesture.
[0031] After repeated gesture detection is completed, two conditions are simultaneously verified: First, the gesture type of the repeated gesture is compared with the gesture type stored in the buffer. The two must be completely identical, meaning the gesture type labels are the same, for the consistency verification to pass. Second, the angle difference between the wrist orientation angle of the repeated gesture and the wrist orientation angle stored in the buffer is calculated. This difference is calculated in the same way as the angle difference in the matching confidence calculation, taking the smaller value after boundary processing. When this difference does not exceed the preset deviation threshold of 15 degrees, the deviation verification is considered passed. The deviation threshold of 15 degrees is based on the fact that when a user repeatedly performs gestures on the same target device within a short period, the natural fluctuation of the wrist orientation angle is usually within 10 degrees. Setting it to 15 degrees can accommodate normal measurement noise while excluding situations where the user initiates a gesture again after a significant turn. If both checks pass, the arithmetic mean of the wrist orientation angle in the buffer and the wrist orientation angle of the repeated gesture is taken, i.e., the sum of the two is divided by 2, to obtain the precise orientation angle. If no repeated gesture satisfying the two check conditions is detected within 2000ms of the confirmation waiting window, the buffer is cleared, the current control flow terminates, and the sampling frequency of the inertial measurement unit is reduced to 5Hz. Compared with the single wrist orientation angle, the precise orientation angle integrates the orientation information of two independently measured measurements, narrowing the determination range of the target device in scenarios with insufficient orientation discrimination.
[0032] In one specific embodiment, step S3, obtaining the target device identifier and linkage command, includes: The confidence score of matching each device entry based on the accurate orientation angle is recalculated by matching the mean orientation angle of each device entry in the device azimuth probability map with the accurate orientation angle. Based on the matching confidence score, the device entry identifier corresponding to the highest matching confidence score is extracted to obtain the target device identifier; Based on the target device identifier and the gesture type in the gesture orientation data pair, and according to the pre-stored correspondence between gesture type and device control action, a linkage command is obtained.
[0033] Specifically, using the precise orientation angle as input, the angle difference is recalculated for the mean orientation angle of each device entry in the device azimuth probability map. The smaller value after boundary processing is used. Then, the standard deviation of each entry's orientation angle is substituted into a Gaussian function as the distribution width parameter to obtain the matching confidence score for each device entry based on the precise orientation angle. This calculation process is completely consistent with the initial matching confidence calculation, the only difference being that the input orientation angle is replaced by the mean of two wrist orientation angles instead of a single wrist orientation angle. The matching confidence scores of all device entries are sorted in descending order, and the device identifier corresponding to the top-ranked device entry is taken as the target device identifier. The target device identifier is a unique number assigned to the home device during gateway registration, bound to the device's physical address and communication protocol parameters. The gateway routes the linkage command to the corresponding device based on this identifier. When the matching confidence score of all device entries in the map is lower than the minimum confidence threshold of 0.30, it is determined that there is no valid target for this matching, the linkage process is terminated, and the sampling frequency of the inertial measurement unit reverts to 5Hz.
[0034] The pre-stored mapping between gesture types and device control actions is stored locally on the gateway in the form of a two-dimensional mapping table. The row index of the mapping table is the target device identifier, and the column index is the gesture type label. Each cell in the table stores the control action code that the device should execute when it receives the corresponding gesture type. Based on the gesture type in the target device identifier and gesture orientation data pair, the corresponding cell in the mapping table is located, the control action code is read, and the target device identifier and control action code are encapsulated into a linkage command. The linkage command data format is a fixed-length byte sequence, including a frame header identifier, a target device identifier field, a control action code field, and a cyclic redundancy check field. The frame header identifier is used for frame synchronization during gateway parsing, and the cyclic redundancy check field is used for data integrity verification during transmission. The linkage command is sent to the gateway in the form of an advertisement packet via the BLE 5.0 protocol. After parsing, the gateway distributes the control action to the corresponding home device according to the target device identifier.
[0035] In one specific embodiment, step S4 includes: The linkage command is sent to the home device corresponding to the target device identifier. Within the preset feedback timeout period, the status change data returned by the home device is received and the status change data is marked as the device execution feedback signal. Based on the device execution feedback signal, the mean orientation angle of the corresponding entry in the device azimuth probability map is calculated using the exponential weighted moving average formula, and the standard deviation of the orientation angle of the corresponding entry is updated synchronously using the difference before and after the mean orientation angle update, so as to obtain the updated mean orientation angle value and the updated standard deviation of the orientation angle. Write the mean and standard deviation of the orientation angle update values into the corresponding entries of the target device identifier in the device azimuth probability map, and append the operation results corresponding to the device execution feedback signal to the sliding window corresponding to the target device identifier to obtain the operation result sequence. The success rate of the operation results within the preset window length in the operation result sequence is calculated. When the success rate is lower than the drift judgment threshold, the standard deviation of the orientation angle of the corresponding entry of the target device identifier is reset to the initial standard deviation and the corresponding entry is marked as a state to be recalibrated, thus obtaining the updated device orientation angle probability map.
[0036] Specifically, after the linkage command is issued, the system waits for the home device to return status change data via the gateway within a preset feedback timeout period of 3000ms. This status change data is a device status message proactively reported by the home device to the gateway after performing a control action. The message contains the device identifier and the current operating status code. When status change data matching the target device identifier is received within 3000ms, it is marked as a valid device execution feedback signal, and the operation result is recorded as successful. If no matching message is received within 3000ms, the control operation is considered a failure, and the operation result is recorded as a failure; the update of the mean and standard deviation of the orientation angle is not performed. The feedback timeout period of 3000ms is chosen because the end-to-end delay between command transmission and device response under the BLE 5.0 protocol is typically no more than 500ms. 3000ms is sufficient to cover extreme cases of network congestion and device response delays, while also preventing excessive waiting time from affecting the response of the next gesture control. Upon receiving a valid device execution feedback signal, an exponentially weighted moving average is applied to update the mean orientation angle of the corresponding entry for the target device identifier using the precise orientation angle. The learning rate is the reciprocal of the current number of records plus one; that is, the learning rate is half for the first update, one-third for the second, and decreases with the number of records. The new mean orientation angle equals the old mean multiplied by one minus the learning rate, plus the precise orientation angle multiplied by the learning rate. The synchronous update method for the orientation angle standard deviation is as follows: the absolute value of the difference between the precise orientation angle and the mean orientation angle before the update is taken, and the sum of one minus the learning rate multiplied by the square of the old standard deviation, plus the learning rate multiplied by the square of the above difference, is taken as the square root of the new standard deviation update value.
[0037] The sliding window length is set to 5, meaning that for each device entry, a sequence of records of the most recent 5 operation results is retained. Operation results are stored in binary form, with success recorded as 1 and failure as 0. After each operation, the current result is appended to the end of the sliding window, while the oldest record is removed, maintaining a constant window length of 5 to obtain the operation result sequence. The success rate is obtained by summing the 5 records in the operation result sequence and dividing by 5. The drift judgment threshold is set to 0.4, meaning that if the number of successes in the most recent 5 operations does not exceed 2, the device entry is considered to have experienced orientation angle drift. The basis for setting it to 0.4 is that occasional single control failures are within the normal range, while multiple consecutive failures indicate that the average orientation angle recorded for that entry has systematically deviated from the user's actual control orientation. After triggering the drift determination, the standard deviation of the orientation angle of the entry is reset to the initial standard deviation of 30 degrees. The initial standard deviation of 30 degrees is based on the uncertainty range of a single orientation angle measurement without prior information. At the same time, the entry is marked as a state to be recalibrated. After the gateway detects the recalibration mark, it initiates a broadcast detection process to the wearable device to re-collect the orientation angle of the entry. The mean and standard deviation of the orientation angle of the other device entries are not affected. The current state of all entries is summarized and written back to persistent storage to obtain the updated device azimuth probability map.
[0038] Figure 3 This is a schematic diagram illustrating the convergence process of the mean orientation angle of the device orientation probability map with the cumulative number of operations in the embodiments of this application. Figure 3 The figure shows the convergence simulation curve of the mean orientation angle of a certain device entry in the device azimuth probability map as the cumulative number of operations increases under the exponentially weighted moving average algorithm. The solid line in the figure is the successive update trajectory of the mean orientation angle, the diagonal line filled in the band area is the corresponding standard deviation range of the orientation angle, and the dashed line is the true azimuth angle of the device, 135°. As can be seen from the figure, the mean orientation angle has a large deviation and a significant update amplitude when the number of operations is small. As the cumulative learning rate decreases with the number of operations, the mean gradually approaches the true azimuth angle and tends to stabilize, and the standard deviation range narrows in tandem.
[0039] The above describes the home linkage control method based on smart wearable devices in the embodiments of this application. The following describes the home linkage control system based on smart wearable devices in the embodiments of this application. One embodiment of the home linkage control system based on smart wearable devices in the embodiments of this application includes: The extraction module is used to extract the wrist intention preparatory state based on the wrist motion data collected by the inertial measurement unit, and obtain the gesture acquisition window; The acquisition module is used to extract the gesture type and wrist orientation angle based on the inertial sensing timing data within the gesture acquisition window, and obtain gesture orientation data pairs. The matching module is used to calculate the confidence level of the wrist orientation angle in the gesture orientation data pair and the average orientation angle of each device entry in the device orientation angle probability map. When the difference between the highest confidence level and the second highest confidence level is lower than the ambiguity threshold, the module detects the duplicate gesture with the same gesture type in the confirmation waiting window, and re-executes the matching with the average of the two wrist orientation angles as the accurate orientation angle to obtain the target device identifier and linkage command. The update module is used to send the linkage command to the home device corresponding to the target device identifier, and based on the device execution feedback signal, update the mean and standard deviation of the orientation angle of the corresponding entry of the target device identifier in the device azimuth probability map with the precise orientation angle, so as to obtain the updated device azimuth probability map.
[0040] This invention also provides a home automation control device based on a smart wearable device, which can be a server. The smart wearable device-based home automation control device includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor, designed as a computer, provides computing and control capabilities. The memory of the smart wearable device-based home automation control device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the smart wearable device-based home automation control device stores the data corresponding to this embodiment. The network interface of the smart wearable device-based home automation control device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the above-described method.
[0041] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the home linkage control method based on a smart wearable device.
[0042] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0043] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a home linkage control device (which may be a personal computer, server, or network device, etc.) based on a smart wearable device to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0044] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A home automation control method based on smart wearable devices, characterized in that, The method includes: Step S1: Based on the wrist motion data collected by the inertial measurement unit, extract the wrist intention preparatory state to obtain the gesture acquisition window; Step S2: Based on the inertial sensing timing data within the gesture acquisition window, extract the gesture type and wrist orientation angle to obtain gesture orientation data pairs; Step S3: Calculate the confidence level of matching the wrist orientation angle in the gesture orientation data pair with the average orientation angle of each device entry in the device orientation probability map. When the difference between the highest confidence level and the second highest confidence level is lower than the ambiguity threshold, detect the duplicate gesture with the same gesture type in the confirmation waiting window, and re-execute the matching with the average of the two wrist orientation angles as the accurate orientation angle to obtain the target device identifier and linkage command. Step S4: Send the linkage command to the home device corresponding to the target device identifier, and based on the device execution feedback signal, update the mean and standard deviation of the orientation angle of the corresponding entry of the target device identifier in the device azimuth probability map with the precise orientation angle to obtain the updated device azimuth probability map.
2. The home linkage control method based on smart wearable devices according to claim 1, characterized in that, Step S1 includes: Based on the inertial measurement unit, wrist motion data is continuously collected at a first sampling frequency, and the magnitude of the angular velocity vector in the wrist motion data is calculated to obtain the angular velocity magnitude sequence. Based on the angular velocity magnitude sequence, it is determined whether the angular velocity magnitude within a consecutive preset number of sampling periods is lower than the static threshold, and a wrist static state marker is obtained. Based on the wrist stationary state marker, jump detection is performed on the angular velocity magnitude and acceleration change in subsequent sampling periods. When the angular velocity magnitude is not lower than the start threshold and the acceleration change is not lower than the acceleration threshold, the wrist stationary state marker is updated to the wrist intention preparation state. Based on the wrist intention preparation state, the sampling frequency of the inertial measurement unit is switched from the first sampling frequency to the second sampling frequency, and a gesture acquisition window of preset duration is opened starting from the switching moment.
3. The home linkage control method based on smart wearable devices according to claim 1, characterized in that, Step S2 includes: The inertial sensing timing data within the gesture acquisition window is segmented according to a preset sub-window length, and the mean, standard deviation, peak value, and zero-crossing rate of each sensor channel within each sub-window are spliced together to obtain a sensing feature vector. The sensor feature vector is input into a support vector machine classifier to classify gestures, and the gesture type and gesture confidence score are obtained. Based on the comparison between the gesture confidence score and the preset confidence threshold, when the gesture confidence score is not lower than the preset confidence threshold, the yaw angle component is extracted from the absolute orientation quaternion output after the magnetometer data and accelerometer data are fused by Madgwick complementary filtering to obtain the wrist orientation angle. The gesture type is associated with the wrist orientation angle to obtain a gesture orientation data pair.
4. The home linkage control method based on smart wearable devices according to claim 1, characterized in that, Step S3 involves calculating the confidence level of matching the wrist orientation angle in the gesture orientation data pair with the mean orientation angle of each device entry in the device azimuth probability map, including: The angle difference between the wrist orientation angle in the gesture orientation data pair and the mean orientation angle of each device entry in the device azimuth probability map is calculated to obtain the angle difference sequence of each device entry; Based on each angle difference in the angle difference sequence and the standard deviation of the orientation angle of the corresponding device item, the angle difference is normalized using a Gaussian function to obtain the matching confidence score of each device item. The matching confidence scores are sorted in descending order, and the highest matching confidence score and the second highest matching confidence score are extracted. The difference between the two is obtained as the confidence difference value.
5. The home linkage control method based on smart wearable devices according to claim 4, characterized in that, In step S3, when the difference between the highest confidence level and the second highest confidence level is lower than the ambiguity threshold, a repeated gesture of the same type is detected within the confirmation waiting window, and the matching is re-executed using the average of the two wrist orientation angles as the accurate orientation angle, including: The confidence difference is compared with a preset ambiguity threshold. When the confidence difference is lower than the ambiguity threshold, a confirmation waiting window of a preset duration is opened starting from the current time, and the wrist orientation angle and gesture type in the gesture orientation data pair are cached in the buffer. Within the confirmation waiting window, the consistency of the gesture type of the newly detected repeated gesture with the gesture type in the buffer is checked, and the deviation of the wrist orientation angle of the newly detected repeated gesture with the wrist orientation angle in the buffer is checked. When the gesture type is consistent and the wrist orientation angle deviation does not exceed the preset deviation threshold, the average of the wrist orientation angle in the buffer and the wrist orientation angle of the repeated gesture is calculated to obtain the accurate orientation angle.
6. The home linkage control method based on smart wearable devices according to claim 5, characterized in that, The step S3 involves obtaining the target device identifier and linkage command, including: The confidence score of matching the precise orientation angle with the mean orientation angle of each device entry in the device azimuth probability map is recalculated to obtain the matching confidence score of each device entry based on the precise orientation angle. Based on the matching confidence score, the device entry identifier corresponding to the highest matching confidence score is extracted to obtain the target device identifier; Based on the target device identifier and the gesture type in the gesture orientation data pair, a linkage command is obtained according to the pre-stored correspondence between gesture types and device control actions.
7. The home linkage control method based on smart wearable devices according to claim 1, characterized in that, Step S4 includes: The linkage command is sent to the home device corresponding to the target device identifier. Within a preset feedback timeout period, the status change data returned by the home device is received, and the status change data is marked as a device execution feedback signal. Based on the device execution feedback signal, the mean orientation angle of the corresponding entry of the target device identifier in the device azimuth probability map is calculated using the exponential weighted moving average formula, and the standard deviation of the orientation angle of the corresponding entry is updated synchronously using the difference before and after the mean orientation angle update, so as to obtain the updated mean orientation angle value and the updated standard deviation of the orientation angle. The mean value of the orientation angle and the standard deviation value are written into the entry corresponding to the target device identifier in the device azimuth probability map, and the operation result corresponding to the current device execution feedback signal is appended to the sliding window corresponding to the target device identifier to obtain the operation result sequence. The success rate of the operation results within a preset window length in the operation result sequence is calculated. When the success rate is lower than the drift judgment threshold, the standard deviation of the orientation angle of the corresponding entry of the target device identifier is reset to the initial standard deviation and the corresponding entry is marked as a state to be recalibrated, so as to obtain the updated device orientation angle probability map.
8. A home linkage control system based on smart wearable devices, characterized in that, For implementing the home linkage control method based on a smart wearable device as described in any one of claims 1-7, the home linkage control system based on a smart wearable device comprises: The extraction module is used to extract the wrist intention preparatory state based on the wrist motion data collected by the inertial measurement unit, and obtain the gesture acquisition window; The acquisition module is used to extract the gesture type and wrist orientation angle based on the inertial sensing timing data within the gesture acquisition window, and obtain gesture orientation data pairs. The matching module is used to calculate the confidence level of the wrist orientation angle in the gesture orientation data pair and the average orientation angle of each device entry in the device orientation angle probability map. When the difference between the highest confidence level and the second highest confidence level is lower than the ambiguity threshold, the module detects the duplicate gesture with the same gesture type in the confirmation waiting window, and re-executes the matching with the average of the two wrist orientation angles as the accurate orientation angle to obtain the target device identifier and linkage command. The update module is used to send the linkage command to the home device corresponding to the target device identifier, and based on the device execution feedback signal, update the mean and standard deviation of the orientation angle of the corresponding entry of the target device identifier in the device azimuth probability map with the precise orientation angle, so as to obtain the updated device azimuth probability map.
9. A home linkage control device based on a smart wearable device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the home linkage control method based on any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor, it causes the processor to execute the home linkage control method based on smart wearable devices as described in any one of claims 1 to 7.