Sleep posture auxiliary recognition method based on bluetooth screen state perception

By using dual-modal cross-validation of Bluetooth screen status perception and pressure sensor and IMU data, combined with cascaded dual closed-loop PID control, the accuracy and response delay issues of smart pillows in recognizing sleep postures are solved, enabling comfortable support adjustment and gradual intervention for poor posture.

CN123072701APending Publication Date: 2026-11-10SHENZHEN GONGYUN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611143540.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing smart pillows rely on a single pressure sensor or gyroscope to accurately determine the usage scenario when recognizing sleep posture, and the Bluetooth module is not fully utilized, resulting in system response delays and logical confusion.

Method used

A sleep posture-assisted recognition method based on Bluetooth screen status perception is adopted. The BLE module parses the mobile phone broadcast packets to obtain the screen on/off status, device posture and operation activity. It performs dual-modal cross-verification with pressure sensor and IMU data, and combines cascade dual closed-loop PID control strategy and global state machine management to achieve accurate posture recognition and adjustment.

Benefits of technology

It effectively avoids logical conflicts in usage scenarios, achieves rapid response and precise pillow support adjustment, provides a comfortable support feel, and corrects poor posture through a three-level progressive intervention mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123072701A_ABST
    Figure CN123072701A_ABST
Patent Text Reader

Abstract

The application discloses a sleep posture auxiliary identification method based on Bluetooth screen state sensing, relates to the field of smart home, and comprises the following steps: system initialization and global data architecture building, BLE sensing sub-process independent running, bimodal cross verification and confidence fusion, fusion determination and execution, and global state machine management and intervention steps, a BLE module is introduced to deeply analyze a mobile phone broadcast packet, screen light-out, device posture and operation activity are acquired, and bimodal cross verification is carried out with pillow end pressure and IMU data, through physical consistency determination, the problem that logical conflicts occur in use scenes is effectively avoided, the problem of single sensor sensing blind area is solved, and a three-level progressive intervention mechanism is designed for bad sleeping postures, when a user has not entered deep sleep or a posture has just changed, only a slight influence is applied to guide natural adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart homes, and in particular to a sleep posture-assisted recognition method based on Bluetooth screen status perception. Background Technology

[0002] Existing smart pillows typically integrate pressure sensors, inertial measurement units, and Bluetooth communication modules to adjust the pillow's support height by monitoring the user's sleeping posture.

[0003] In existing technologies, traditional sleep posture recognition mainly relies on pressure sensors or gyroscope data inside the pillow, which cannot accurately determine the user's usage scenario. For example, when a user is lying on their side on the pillow and using their phone, the system often only determines that they are sleeping on their side based on the pressure distribution and blindly adjusts the pillow height.

[0004] Furthermore, in existing technologies, smart pillows typically only use the Bluetooth module as a data conduit to connect to a mobile phone for uploading sleep data or downloading control commands. The rich information on the screen status, device posture, and operational activity of the mobile phone is not associated with the pillow, resulting in system response delays.

[0005] Furthermore, existing technologies lack rigorous state machine transition logic. When faced with complex sleep scenario switching, the system is prone to logical confusion or state jumps, leading to adjustment failure.

[0006] Therefore, we propose a sleep posture-assisted recognition method based on Bluetooth screen status awareness to solve the above problems. Summary of the Invention

[0007] The purpose of this invention is to provide a sleep posture-assisted recognition method based on Bluetooth screen status perception, so as to solve the problems mentioned in the background art.

[0008] To achieve the above objectives, the present invention provides the following technical solution: a sleep posture-assisted recognition method based on Bluetooth screen status perception, comprising the following steps:

[0009] S1: System initialization and global data architecture construction: Construct a shared data pool with timestamps to achieve time alignment of multi-source data; Start two independent perception sub-processes in parallel: behavior scene determination and posture type determination; For posture type determination, extract the contact area and pressure center coordinates of the flexible pressure sensor array as core feature vectors for discrimination;

[0010] S2: BLE perception sub-process runs independently: The BLE module independently scans and parses the mobile phone broadcast packets locally to obtain the screen on / off status, device spatial posture and operation activity;

[0011] S3: Bimodal cross-validation and confidence fusion: Read data from the shared data pool, perform physical consistency verification, and determine the compatibility between physical posture and behavioral scenario; dynamically allocate human posture weights and BLE scenario weights according to the current sleep stage, and output the final scenario and adjustment parameters;

[0012] S4: Fusion Judgment and Execution: Based on the final scenario and adjustment parameters, the pillow airbag adjustment and BLE collaborative command are executed simultaneously; the airbag adjustment adopts a cascaded dual closed-loop PID control strategy of outer loop pressure gradient and inner loop air pressure;

[0013] S5: Global State Machine Management and Intervention: State transitions are triggered based on BLE events, and a three-level progressive intervention mechanism is executed when a poor posture is detected.

[0014] Preferably, the attitude type determination rule in step S1 specifically includes:

[0015] When the contact area is detected to be less than the first preset ratio, and the pressure center coordinate is significantly biased to the left side of the array, and the pressure ratio on one side is higher than the first ratio threshold, it is determined to be a left lateral decubitus position.

[0016] When the contact area is detected to be within the second preset ratio range, and the pressure center coordinate is significantly biased to the right side of the array, and the pressure ratio on one side is higher than the first ratio threshold, it is determined to be a right lateral decubitus position.

[0017] When the contact area is detected to be greater than the second preset ratio and concentrated, and the pressure center coordinate is located in the central axis area of ​​the array and is slightly backward along the longitudinal direction, it is determined to be supine.

[0018] When the contact area is detected to be smaller than the first preset ratio and distributed in a dotted pattern, and the pressure center of gravity is extremely forward, it is determined to be prone.

[0019] When the contact area is detected to be close to zero or the total pressure value is lower than the pillow separation threshold, it is determined to be a pillow separation state.

[0020] Preferably, the logic for the BLE module to parse broadcast packets in step S2 includes:

[0021] For screen on / off status: directly read specific flag bits in the broadcast data structure to make the determination;

[0022] For device spatial attitude: extract the three-axis acceleration data embedded in the broadcast packet, calculate the angle between the gravity component and the device coordinate system, and determine the screen orientation when the long side of the device is parallel to the ground and the short side is vertical, and determine the screen orientation when the long side of the device is vertical and the short side is horizontal.

[0023] Regarding device activity level: count the number of broadcast packets received within a unit time window, and mark them as active or inactive based on the packet sending frequency;

[0024] Logically couple the above analysis results to initially determine the application scenarios, including landscape gaming, landscape movie watching, portrait reading, side-lying phone calls, and standard sleep scenarios.

[0025] Preferably, step S2 also includes an abnormal event detection and rapid response mechanism:

[0026] Synchronously perform abnormal event detection to monitor in real time whether events such as device screen switching on / off, sudden drop in activity, scene switching, and signal loss occur;

[0027] When critical events such as screen on / off switching and sudden drop in activity are triggered, the global state manager is directly triggered via GPIO hardware interrupt, skipping the regular periodic scheduling and achieving millisecond-level fast response.

[0028] Preferably, the physical consistency verification in step S3 adopts a hierarchical verification mechanism to determine the physical compatibility between the physical posture and the behavioral scene, and divides it into three levels:

[0029] If the behavior scenario and the pose type are physically compatible, they are defined as completely identical.

[0030] If the behavior scenario and the posture type are logically related but not a typical match, they are defined as partially consistent.

[0031] If the behavior scenario and the posture type physically conflict, it is defined as a complete contradiction.

[0032] If it is determined to be a complete contradiction, it is directly marked as abnormal, the previous stable state is maintained, and no adjustment is triggered.

[0033] Preferably, step S3 further includes a sleep state verification step:

[0034] After completing the physical consistency verification, the fusion judgment sub-process further determines the user's sleep state based on the micro-motion amplitude extracted by the pressure sensor and the body kinetic energy value output by the gyroscope.

[0035] Based on the results of the sleep state verification, the final adjustment sensitivity is corrected, and standardized instructions are generated. The standardized instructions specifically include the corresponding scenario, the corresponding pillow adjustment amount, and the corresponding coordination level.

[0036] Preferably, the cascaded dual-closed-loop PID control strategy described in step S4 specifically includes:

[0037] The outer loop serves as the main control loop, taking the target support height issued by the fusion judgment sub-process as the set value, and using the airbag pressure value and the shoulder and neck pressure gradient value as feedback quantities. After PID calculation, the target air pressure value is output to the inner loop.

[0038] The inner loop acts as a secondary regulation loop. It takes the received target air pressure value as the set value and the real-time internal pressure of the airbag sampled at high frequency by the MEMS air pressure sensor as the feedback quantity. After PID calculation, it outputs the PWM duty cycle to directly drive the speed of the micro air pump.

[0039] After the adjustment meets the target, the system controls the three-way solenoid valve to switch to the pressure holding and locking state to evaluate the performance. If the target is not met, the incremental PID algorithm is used to fine-tune the output.

[0040] Preferably, the global state machine transition rules in step S5 include:

[0041] Abnormal jump: If a sensor failure or Bluetooth signal loss is detected for more than a specified time in any state, the system will uniformly enter an abnormal degradation state and lock the current airbag height.

[0042] Positive transition: triggered by BLE behavioral characteristics and confirmed by human physical signs, transitioning from an active state to a sleep state;

[0043] Reverse jump: Triggered quickly by BLE screen-on event and confirmed by human body movement, jump from sleep state to active state.

[0044] Preferably, the three-level progressive intervention mechanism for poor posture described in step S5 specifically includes:

[0045] Level 1 intervention: If the poor posture persists for the first preset duration, it will trigger slight airbag undulation feedback and interface prompts;

[0046] Level 2 intervention: If the poor posture persists for the second preset duration, it will trigger a fine-tuning of the support height and a health advice push.

[0047] Level 3 intervention: If the poor posture persists for the third preset duration, a vibration alert and a strong pop-up notification will be triggered, and the system will switch to a safe support height.

[0048] If the user adjusts their posture during the intervention, the intervention will be terminated immediately and normal adaptation will be restored.

[0049] Preferably, it also includes self-learning and data feedback steps:

[0050] The results of each adjustment, intervention feedback data, and user posture adjustment data are written back to the shared data pool and incorporated into the self-learning database.

[0051] Based on accumulated historical data, the contact area threshold, consistency coefficient, dynamic weight coefficient, and preset duration of the three-level intervention are periodically optimized to achieve personalized sleep posture recognition and assisted adjustment.

[0052] The technical effects and advantages of this invention are as follows:

[0053] 1. A BLE module is introduced to perform deep analysis of mobile phone broadcast packets, obtain screen on / off status, device posture and operation activity, and perform dual-modal cross-validation with the pressure at the pillow end and IMU data. By judging physical consistency, the problem of logical conflicts in usage scenarios is effectively eliminated, and the problem of blind spots in single sensor perception is solved.

[0054] 2. The perception subprocess is run using the independent kernel built into the BLE module. The BLE module independently completes broadcast packet parsing, placement mode determination and abnormal event detection without occupying the main MCU's computing power. For critical events such as screen on / off switching, the main system is directly woken up through GPIO hardware interrupts to achieve fast response.

[0055] 3. Unlike traditional single-loop control, this invention adopts a cascade control strategy of pressure gradient / support height and airbag pressure. The pressure gradient / support height ensures that the pillow support surface conforms to ergonomics and provides a comfortable support feel; the airbag pressure achieves rapid response and high-precision maintenance of air pressure, combined with incremental PID fine-tuning and pressure-holding lock-up mechanism.

[0056] 4. A three-tiered progressive intervention mechanism was designed to address poor sleeping posture. The first tier provides gentle airbag undulation feedback, the second tier offers fine-tuning of support height, and the third tier provides micro-vibration reminders, with the intervention intensity increasing progressively. When the user has not yet entered deep sleep or their posture has just changed, only a minor influence is applied to guide them to adjust naturally. Attached Figure Description

[0057] Figure 1 This is a flowchart of the method of using the present invention;

[0058] Figure 2 This is an overall flowchart of the present invention;

[0059] Figure 3 This is a flowchart of the BLE perception and initial scene judgment sub-process of the present invention;

[0060] Figure 4 This is a flowchart of the dual-modal fusion decision sub-process of the present invention;

[0061] Figure 5 This is a flowchart of the adjustment and collaborative execution sub-process of the present invention;

[0062] Figure 6 This is a flowchart illustrating the stable state and jump conditions of the present invention;

[0063] Figure 7 This is a flowchart of the BLE event triggering flags and scene parameters of the present invention;

[0064] Figure 8 This is a flowchart of the undesirable posture intervention process of the present invention. Detailed Implementation

[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0066] This invention provides, for example Figures 1-8 The sleep posture-assisted recognition method based on Bluetooth screen status awareness, as shown, includes the following steps:

[0067] S1: System initialization and global data architecture construction: Construct a shared data pool with timestamps to achieve time alignment of multi-source data; Start two independent perception sub-processes in parallel: behavior scene determination and posture type determination; For posture type determination, extract the contact area and pressure center coordinates of the flexible pressure sensor array as core feature vectors for discrimination;

[0068] S2: BLE perception sub-process runs independently: The BLE module independently scans and parses the mobile phone broadcast packets locally to obtain the screen on / off status, device spatial posture and operation activity;

[0069] S3: Bimodal cross-validation and confidence fusion: Read data from the shared data pool, perform physical consistency verification, and determine the compatibility between physical posture and behavioral scenario; dynamically allocate human posture weights and BLE scenario weights according to the current sleep stage, and output the final scenario and adjustment parameters;

[0070] S4: Fusion Judgment and Execution: Based on the final scenario and adjustment parameters, the pillow airbag adjustment and BLE collaborative command are executed simultaneously; the airbag adjustment adopts a cascaded dual closed-loop PID control strategy of outer loop pressure gradient and inner loop air pressure;

[0071] S5: Global State Machine Management and Intervention: State transitions are triggered based on BLE events, and a three-level progressive intervention mechanism is executed when a poor posture is detected.

[0072] Specific step S1: System initialization and global data architecture setup

[0073] The system is initialized by sequentially completing four steps: hardware driver loading and power-on self-test, real-time clock calibration, BLE protocol stack initialization, and loading of factory calibration parameters and user-customized parameters.

[0074] After completing the initialization of the shared data pool, the shared data pool adopts a circular buffer structure with millisecond-level timestamps. All sensing data from the BLE module, pressure sensor and gyroscope are uniformly stamped with RTC timestamps before being written to ensure strict alignment of multi-source data on the time axis and eliminate sampling deviations caused by transmission delays.

[0075] After initialization, two independent perception subprocesses, behavior scene determination and posture type determination, are started in parallel.

[0076] Two independent sensing branches are launched in parallel:

[0077] Behavioral scenario determination: The BLE module runs independently, scans mobile phone broadcast packets for perception-driven determination, and outputs the scenario status. The scenario status includes: standard sleep, landscape viewing, portrait reading, landscape gaming, and side-lying call scenarios.

[0078] Posture type determination: The main MCU runs the determination, and the flexible pressure sensor array and 6-axis gyroscope perform the main determination and output the posture type. The posture types include: supine, left lateral, right lateral, prone and head-down position.

[0079] Specifically, the attitude determination incorporates the contact area and pressure center of gravity coordinates as core feature vectors to improve the distinguishability of similar attitudes.

[0080] The contact area is defined as the percentage of the number of effective pressure-bearing pixels to the total number of pixels in the flexible pressure sensor array; the pressure centroid coordinates are calculated using the following formula:

[0081]

[0082]

[0083] Let X be the coordinate of the center of gravity of the pressure in the X direction; Let be the coordinate of the pressure center of gravity in the Y direction; i is the i-th sensing point of the flexible pressure sensor array; This represents the pressure value read from the i-th sensing point of the flexible pressure sensor array. Let be the physical location of the i-th sensing point in the coordinate system of the flexible pressure sensor array;

[0084] Specifically disclosed, the attitude type determination sub-process is based on data collected by a flexible pressure sensor array. It extracts the contact area and pressure center coordinates as core feature vectors for logical discrimination. The specific determination rules are as follows:

[0085] When the contact area is less than 30%, the pressure center of gravity is significantly biased to the left side of the array, and the pressure ratio on one side is higher than 85%, it is determined to be a left lateral decubitus position.

[0086] When the contact area is detected to be moderate (30%), and the pressure center of gravity is significantly biased to the right side of the array, and the pressure ratio on one side is higher than 85%, it is determined to be a right lateral decubitus position.

[0087] When the contact area is detected to be greater than 30% and concentrated, the pressure center of gravity is located in the central axis area of ​​the array, and the X-axis center of gravity is offset backward, it is determined to be supine.

[0088] When the contact area is less than 30% and is distributed in a dotted pattern, and the center of gravity of the pressure is extremely forward, it is determined to be prone.

[0089] When the contact area is detected to be close to 0 or the total pressure value is lower than the pillow separation threshold, it is determined to be a pillow separation state.

[0090] The contact area threshold can be adjusted according to the actual user situation.

[0091] Specifically, step S2: The BLE-aware subprocess runs independently.

[0092] Specifically, the BLE sensing sub-process runs independently and locally on the Bluetooth module, without consuming the main MCU's computing power. The specific execution logic is as follows:

[0093] The BLE module continuously scans the broadcast channel, captures broadcast packets, performs validity checks, filters invalid data packets at each level, and discards those that fail the check.

[0094] The verification passed. Based on the data from the BLE module, the broadcast packets were parsed to obtain the screen on / off status, the accelerometer feature values ​​were parsed to obtain the device spatial attitude, the data packet frequency per unit time was counted to obtain the device operation activity, and the corresponding screen on / off status, device spatial attitude, device operation activity and application scenario were output.

[0095] Specifically, after successful verification, the BLE module immediately performs in-depth parsing of the broadcast packet:

[0096] Regarding screen on / off status: The module directly reads a specific flag bit in the broadcast data structure. If the flag bit indicates that the screen is on, it is determined to be on; if the flag bit indicates that the screen is off, it is determined to be off.

[0097] Regarding device spatial attitude: The module extracts the three-axis acceleration data embedded in the broadcast packet and calculates the angle between the gravity component and the device coordinate system.

[0098] Data is extracted; the device's long side is parallel to the ground and its short side is vertical, indicating a landscape orientation.

[0099] Extracting data, the device's long side is vertical and its short side is horizontal, which indicates that it is in portrait orientation.

[0100] Device activity level: The module counts the number of broadcast packets received within a unit time window.

[0101] The packet transmission frequency is higher than the background noise level, indicating that the device is in an operational state and is marked as active.

[0102] Packet sending is sparse and data is constant, and is marked as static;

[0103] The module logically couples the above analysis results to initially determine the application scenario:

[0104] If the analysis result shows a landscape mode and high activity level, it is determined to be a landscape game scene.

[0105] When the analysis result shows a landscape orientation but low activity level, it is determined to be a landscape viewing scenario;

[0106] If the analysis result shows a portrait orientation and high activity level, it is determined to be a portrait reading scenario;

[0107] When the analysis result is a vertical screen and the signal characteristics match the head reflection model, it is determined to be a side-lying call scenario.

[0108] When the analysis result shows that the screen is off and the activity level is low, it is judged as a standard sleep scenario.

[0109] Finally, the module summarizes and outputs these four types of parsing results.

[0110] Based on the extracted BLE-specific features and combined with the human posture category constraints synchronized from the shared data pool, the system independently performs initial scene judgment, device placement mode, and event flag generation.

[0111] Specifically, the placement mode is determined autonomously by the BLE module based on the accelerometer data embedded in the mobile phone's broadcast packet. The specific distinction is based on the rate of change of the device's tilt angle within the sliding time window, which is divided into three levels: handheld holding state, stand transition state, and static placement state. Each level corresponds to a different adjustment coefficient.

[0112] Handheld grip state: The tilt angle change rate remains at a high level, the device frequently flips between portrait and landscape modes, shakes slightly, or sways naturally with the user's hand, the tilt angle variance within the sliding window is greater than the first threshold, and the RSSI signal shows periodic fluctuations accompanied by micro-movements of the human chest or hand, indicating that the user is holding the mobile phone and is in an active usage state.

[0113] The first threshold is preferably 25. The second threshold is preferably 1. The aforementioned threshold was determined by pre-collecting typical grip shaking samples and desktop static noise samples, fitting the tilt angle variance data with a Gaussian mixture model, and selecting the value at the intersection of the probability density functions of the two types of samples, thus effectively distinguishing between human operation and environmental vibration.

[0114] BLE behavior scenarios show high confidence in both landscape gaming and portrait reading, strong coupling with human posture, and the pillow adjusts actively to scene switching.

[0115] The bracket transition state is characterized by a moderate rate of change in tilt angle, a relatively fixed but not completely stationary tilt angle, low-frequency attitude drift but no high-frequency human hand control characteristics, tilt angle variance within the sliding window between the first and second thresholds, and a decrease in broadcast packet frequency compared to the handheld state.

[0116] The device was not being held by hand, and the system was designed to detect transitional scenarios such as watching movies while lying on one's side or browsing apps before bed. The confidence level for the BLE scenario was moderate, and the pillow was adjusted to ensure a smooth transition, avoiding premature locking due to misjudgment as deep sleep.

[0117] Static state: The tilt angle change rate approaches zero, the tilt angle is locked for a long time, the tilt angle variance within the sliding window is less than the second threshold, and the broadcast packet frequency drops to the lowest maintenance level, accompanied by screen off and a sudden drop in activity.

[0118] In this state, BLE behavior can no longer reliably reflect the user's current interaction intent, but rather the physical location of the device. The control of pillow adjustment is transferred to the human posture channel of the pressure sensor and 6-axis gyroscope to avoid misjudgment of scenarios caused by the phone being idle.

[0119] Synchronously perform abnormal event detection to monitor in real time whether events such as device screen switching on / off, sudden drop in activity, scene switching, and signal loss occur;

[0120] Furthermore, the feature values, preliminary judgment results, and event flags are output, and the regular features, preliminary judgment results, and ordinary events are uniformly timestamped and written into the shared data pool for the fusion judgment subprocess to read.

[0121] When a critical event is triggered, such as screen on / off switching or a sudden drop in activity, the global state manager is directly triggered via GPIO hardware interrupt, skipping the regular periodic scheduling to achieve millisecond-level fast response and perform BLE-driven system state transitions.

[0122] Specifically, step S3: dual-modal cross-validation and confidence fusion

[0123] The two perception sub-processes, behavior scene determination and posture type determination, run in parallel. The original features are uniformly written into the shared data pool. The fusion determination sub-process reads all features from the pool, performs dual-modal cross-validation and confidence fusion, and outputs the final scene and total confidence.

[0124] Furthermore, the output of the fusion judgment needs to undergo state consistency judgment to verify the physical state consistency between the behavior scene and the posture type, so as to avoid execution chaos caused by abnormal jumps:

[0125] Determine if the state is consistent between the behavior scenario and the posture type. If the state types of the behavior scenario and the posture type are inconsistent, maintain the original state, update the data pool, and feed the data back to the data pool.

[0126] When the state type of the behavior scenario and the posture type are consistent, the adjustment and collaborative execution sub-process is started, the scenario parameters and event flags are input, the corresponding adjustment structure is output, the result is written back to the shared data pool after execution, the state is synchronized, all sub-processes are updated to the current state, and the current state is fed back to the BLE module, the flexible pressure sensor array and the 6-axis gyroscope.

[0127] Preferred: Consistency level verification, which judges the physical compatibility between physical posture and behavioral scene, and divides it into three levels: completely consistent, partially consistent, and completely contradictory;

[0128] Completely consistent: such as supine and standard sleep, the consistency coefficient is 1.0;

[0129] Partial consistency: For example, lying on the left side and watching movies in landscape mode are considered as using a mobile phone while lying on the side, with a consistency coefficient of 0.6.

[0130] Complete contradiction: such as prone or portrait reading, cannot be achieved, with a consistency coefficient of 0.2.

[0131] If it is determined to be a complete contradiction, it is directly marked as an anomaly, the previous stable state is maintained, the result is written back to the shared data pool, and no adjustment is triggered.

[0132] Dynamic weighted fusion: After the consistency check passes, the total confidence level is calculated using dynamic weights.

[0133] During the active phase of wakefulness, BLE activity is high, with a human posture weight of 0.55 and a BLE scene weight of 0.45.

[0134] During the sleep transition period, BLE activity decreases, with a human weight of 0.7 and a BLE weight of 0.3.

[0135] During deep sleep and steady state, BLE is off, the human body weight is 0.85, and the BLE weight is 0.15.

[0136] A total confidence level ≥ 0.7 is considered valid, and the final scenario and adjustment parameters are output.

[0137] A total confidence level of 0.5 to 0.7 indicates a fuzzy state, and the original state is maintained; a total confidence level of <0.5 indicates an invalid state, and the result is discarded, while the current state is maintained.

[0138] State machine validity verification: The result of the fusion judgment output needs to be verified by the global state manager. It will only take effect if it conforms to the preset state machine transition rules, so as to avoid abnormal transitions that cause execution chaos.

[0139] Furthermore, after the status is confirmed, the execution sub-process synchronously drives the airbag adjustment and BLE coordination command to be sent, and the actions of the pillow and the mobile phone are strictly aligned.

[0140] The execution results are written back to the data pool as the basis for subsequent judgment and optimization; abnormal events are uniformly reported by the monitoring sub-process, the status manager synchronously issues degradation instructions, and all sub-processes switch modes synchronously.

[0141] Specifically, step S4: Fusion judgment and execution

[0142] The fusion determination subprocess completes the full calculation by reading aligned data from the shared data pool. The specific logic is as follows:

[0143] By reading data from the shared data pool, the initial scene judgment and event flags output by the BLE side are obtained. The posture type of the human posture output is read by the flexible pressure sensor array and the 6-axis gyroscope. Physical consistency verification is performed to determine whether the human physical posture is compatible with the BLE scene.

[0144] When the physical pose is inconsistent with the BLE scene, it is marked as abnormal, the previous state is maintained, and the abnormal data is fed back to the shared data pool.

[0145] When the physical posture is consistent with the BLE scene, the confidence of the BLE scene is corrected by combining the placement mode coefficient, and then the sleep state is verified. The sleep state verification is based on the micro-motion amplitude extracted by the pressure sensor and the body kinetic energy value output by the gyroscope.

[0146] Based on the sleep results, the final adjustment sensitivity is adjusted, and standardized instructions are generated, including the corresponding scenario, the corresponding pillow adjustment amount, and the corresponding coordination level.

[0147] Specifically disclosed, during the deep sleep steady state, in order to avoid the noise of the airbag adjustment waking the user, the system forcibly reduces the frequency of the air pump drive PWM to the sleep mode and extends the outer loop PID adjustment cycle to more than 30 seconds, retaining only the inner loop air pressure holding function.

[0148] The command is output, verified by the global state manager, and then executed. At the same time, the result is written back to the shared data pool.

[0149] The adjustment and coordination execution sub-process executes corresponding operations by reading instruction data from the shared data pool. The specific logic is as follows:

[0150] Read data from the shared data pool, receive scene parameters, overall adjustment amount, coordination level and event type, and perform dual-end synchronous scheduling based on the received data to synchronously execute pillow airbag adjustment command and BLE coordination command;

[0151] Furthermore, send BLE collaboration commands to the mobile device to trigger corresponding functions. These functions can be set according to user needs, such as brightness adjustment, enabling do-not-disturb mode, and playing sleep aid content. Receive responses from the mobile device to provide operation feedback and status confirmation.

[0152] The synchronously driven airbag actuator inflates and deflates, employing a cascaded dual-closed-loop PID zone adjustment of the outer ring pressure gradient and inner ring air pressure. Real-time data acquisition of airbag pressure and shoulder / neck pressure gradient values ​​serves as feedback. Specifically:

[0153] Outer ring: Based on the target support height, the airbag pressure value and the shoulder and neck pressure gradient value are collected in real time as feedback;

[0154] Inner ring: Using the target air pressure value as a set value, the internal pressure of the airbag is collected in real time by a MEMS air pressure sensor as feedback.

[0155] The synchronously driven airbag actuator inflates and deflates using a cascaded dual-closed-loop PID zone control mechanism that combines outer ring pressure gradient and inner ring air pressure.

[0156] Specifically, the outer ring serves as the main control loop, with the target support height issued by the fusion judgment sub-process as the set value, and the air pressure value of the airbag collected by the MEMS air pressure sensor and the shoulder and neck pressure gradient value calculated by the flexible pressure array as the feedback quantity. After PID calculation, the target air pressure value is output to the inner ring.

[0157] The inner loop acts as a secondary regulation loop. It takes the received target air pressure value as the set value and the real-time internal pressure of the airbag sampled at high frequency by the MEMS air pressure sensor as the feedback quantity. After PID calculation, it outputs the PWM duty cycle to directly drive the speed of the micro air pump.

[0158] The outer ring ensures the support surface conforms to ergonomics, while the inner ring enables rapid air pressure response and high-precision maintenance. Once the adjustment reaches the target, the system controls the three-way solenoid valve to switch to the pressure-holding lockout state. Through dynamic adjustment of the gain of the outer ring, it achieves micro-level slow adjustment during the sleep period.

[0159] Furthermore, after completing the dual-end synchronous scheduling, the execution effect is evaluated to determine whether the target state has been achieved;

[0160] When the execution effect meets the target, switch the solenoid valve to the pressure holding and locking state to lock the pressure and maintain the gas, and enter the pressure stabilization state to maintain the pressure. The execution result and feedback data are fed back to the shared data pool.

[0161] If the execution effect does not meet the target, record the current error value, use an incremental PID algorithm to fine-tune the output, continue to perform the adjustment, and feed the data back to the airbag execution, and re-perform PID partition adjustment, enter closed-loop control, until the target effect is achieved, then lock the pressure and maintain the air, enter the pressure stabilization state, and write the execution result and feedback data back to the shared data pool.

[0162] Specifically, step S5: Global state machine management and intervention

[0163] The system has a built-in state mechanism definition, as well as all stable states and transition conditions. BLE events serve as the core transition trigger source, and all state transitions follow this state mechanism to logically ensure the consistency of sub-processes. The core trigger rules for state transitions are as follows:

[0164] General redirect rules:

[0165] Abnormal jump: If a sensor malfunction or Bluetooth signal loss is detected in any state for more than a specified time (preferably 30 seconds), the system will enter an abnormal downgrade state, lock the current airbag height, and stop active adjustment to avoid misjudgment. When the fault is recovered and the system remains stable for a specified time (preferably 5 seconds), the system will automatically and smoothly return to the standby initialization state.

[0166] Positive transition, from active state to sleep state: triggered by BLE behavioral characteristics and confirmed by human physical signs, with a transition period set to avoid false transitions;

[0167] Reverse jump, from sleep state to active state: triggered quickly by BLE screen lighting event, with human body movement as the confirmation condition, prioritizing response speed;

[0168] The specific transition logic for each state is as follows:

[0169] Standby initialization state:

[0170] Once the stress level is reached and the BLE screen is off, the state transitions to standard sleep mode after maintaining a stable duration.

[0171] If the pressure is within the acceptable range and the BLE screen is on, it is determined to be in handheld mode. After maintaining a stable duration, the status will switch to viewing the phone adaptation mode.

[0172] Standard sleep state:

[0173] When the BLE screen is on and it is nighttime, after maintaining a stable duration, the state switches to low-interference wake-up state and performs a slight, slow adjustment.

[0174] When the BLE screen is on and the operation is active, after maintaining a stable duration, the status switches to the phone adaptation state.

[0175] Check phone compatibility status:

[0176] BLE activity continued to decline and vital signs stabilized, indicating a transition to a sleep state.

[0177] If the abnormal posture persists and meets the standard, the status will switch to the poor posture intervention state; the user can adjust the posture and then switch back to the phone viewing adaptation state.

[0178] Sleep transition state:

[0179] BLE screen is off and remains off for a specified duration, then the state transitions to standard sleep mode;

[0180] Specifically, the duration of maintaining stability is determined to be 5 seconds. The BLE screen is turned off and maintained for a specified duration, preferably 5 minutes.

[0181] BLE event-driven regulation mechanism:

[0182] Receive BLE event trigger flags and scene parameters, and perform differentiated processing according to event type:

[0183] Scene switching event: Load the corresponding scene partition parameters and perform smooth adjustments to avoid abrupt changes;

[0184] Phone screen on / off event: Start a timer, maintain the current support height, and continuously monitor human vital signs during the period; if vital signs are stable within the specified time, transition to sleep mode; if vital signs are active within the specified time, return to the original scene;

[0185] Phone screen off-to-on event: Initiate low-interference micro-adjustment, slowly raise the corresponding area, and send a low-brightness coordination command to avoid waking the user;

[0186] No-operation sleep aid event: Triggering sleep aid mode, the pillow slowly adjusts to the sleep aid support curvature and performs a micro-massage, and the mobile phone simultaneously turns on Do Not Disturb, dims the screen, and turns off the screen with a countdown;

[0187] For poor posture incidents: Implement a three-level progressive intervention mechanism, escalating the intervention intensity step by step according to the duration, and using a process of soft prompts, supportive guidance, and strong reminders;

[0188] The specific implementation logic of the three-tiered progressive intervention for undesirable postures, which is disclosed in detail, is as follows:

[0189] Input the final scene, the level of poor posture, and the sleep zone to determine whether the intervention conditions are triggered;

[0190] When no intervention conditions are triggered, normal adaptation and adjustment are performed in conjunction with the sleep cycle. The pillow and mobile phone are linked in two directions to achieve sleep aid and wake-up modes, and the pillow adjustment and mobile phone function are triggered. The intervention feedback data is included in the database.

[0191] When the intervention condition is triggered, the intervention level is determined, the corresponding intervention instruction is generated, the pillow is adjusted and a reminder is sent to the mobile phone, the intervention action is executed simultaneously, it is determined whether the user has adjusted their posture, if the user has adjusted their posture, the intervention is terminated, normal adaptation is restored, positive feedback is recorded, and the intervention feedback data is included in the database;

[0192] If the user does not adjust their posture, determine whether the duration of the unadjusted posture has met the standard. If not, continue to perform the current intervention action and determine whether the user's posture has been adjusted.

[0193] If a user fails to adjust their posture for a specified duration, the intervention is escalated to the next level. The intervention action is executed simultaneously, and the judgment is repeated to determine whether the user has adjusted their posture and the duration if they have not adjusted their posture.

[0194] Specifically, the three-tiered progressive intervention for undesirable postures is as follows:

[0195] Level 1 intervention, poor posture lasting ≥2 minutes: a pop-up notification on the mobile app, and a slight airbag undulation feedback is performed on the pillow side without changing the support height;

[0196] Level 2 intervention, poor posture lasting ≥5 minutes: The pillow is slightly adjusted to increase the support height, slightly changing the pressure on the neck to guide the user to naturally adjust their posture, and health advice is pushed to the mobile phone;

[0197] Level 3 intervention, poor posture lasting ≥10 minutes: three consecutive micro-vibrations at the pillow end to remind you, a strong pop-up notification on your mobile phone, and a forced switch to a safe support height.

[0198] Specifically disclosed, the duration of the three-level progressive intervention mechanism is based on ergonomic experimental data: the experimental data shows that the human body makes an unconscious body movement on average every 2 minutes during sleep, so the first-level intervention is set at 2 minutes to capture persistent poor postures that the user has not adjusted on their own; continuous pressure for more than 5 minutes may cause mild obstruction of local blood circulation, so the second-level intervention is set; continuous pressure for more than 10 minutes may cause limb numbness or cervical strain risk, so the third-level intervention is set.

[0199] During the intervention, the user's posture is monitored in real time. If the user actively adjusts their posture, the intervention is immediately terminated and normal adaptation is restored, and positive feedback data is recorded.

[0200] If the user does not adjust their posture, the timer continues, and once the target is met, the intervention level is upgraded to the next level. All intervention feedback data is incorporated into the self-learning database for subsequent personalized optimization of the judgment threshold and intervention intensity.

[0201] The supporting hardware equipment for this method relies on the complete hardware system built into the smart pillow, and all hardware components are existing, mature, mass-produced industrial-grade devices.

[0202] 1. Main control unit

[0203] Selection: STM32L431RCT6 low-power microcontroller, ARM Cortex-M4 core, 80MHz clock frequency, 256KB Flash, 64KB RAM;

[0204] Hardware interfaces: Supports a full range of peripheral interfaces such as I2C, SPI, UART, GPIO, PWM, and ADC; performs global state management, dual-modal fusion algorithm calculation, dual closed-loop PID control, self-learning parameter optimization, and anomaly monitoring and scheduling. The scheduling and coordination of all sub-processes are uniformly managed by the main control unit.

[0205] Run the fusion judgment sub-process, execute the control sub-process, and global state machine logic to output the final adjustment command; receive the raw data reported by each sensor and issue control and coordination commands; manage the shared data pool to ensure time alignment and state synchronization of multi-source data.

[0206] 2. BLE Bluetooth module

[0207] Selection: Nordic RF52832 Bluetooth 5.2 module, with a built-in 64MHz Cortex-M0 core, 128KB Flash, and 16KB RAM;

[0208] Hardware interface: UART serial port for communication with the main MCU, independent onboard Bluetooth antenna, and support for GPIO interrupt output;

[0209] It independently completes the entire BLE perception operation chain, including broadcast listening, data parsing, feature extraction, scene initial judgment, and event detection, without consuming the main MCU's computing power. It is also responsible for sending collaborative broadcast commands to achieve bidirectional connectionless interaction with the mobile device.

[0210] The system runs a complete BLE perception sub-process, independently completing the initial judgment of the behavior scene and the determination of the placement mode; key events such as screen on / off and sudden drop in activity level are directly woken up by the main MCU through GPIO hardware interrupt, achieving millisecond-level fast response; regular periodic data is written to the shared data pool through UART and aligned with human body perception data by timestamp.

[0211] 3. Flexible pressure sensor array

[0212] Selection: 8×8 matrix FSR flexible thin-film pressure sensor;

[0213] Hardware parameters: sampling frequency 10Hz, measurement range 0~10kPa, point spacing 0.5cm, covering the full support area of ​​the pillow surface, with a focus on covering the corresponding area of ​​the shoulders and neck;

[0214] Hardware interface: The I2C interface is connected to the main control unit;

[0215] Data on the pressure distribution of the head and neck on the pillow surface is collected to provide raw data for posture classification, pressure gradient calculation, and respiratory micro-motion extraction. Core features such as pressure center of gravity, unilateral pressure ratio, contact area, and pressure distribution entropy are provided for posture type determination. Pressure gradient feedback values ​​in the shoulder and neck area are provided for dual closed-loop control. Respiratory frequency and stability are calculated by extracting sub-millimeter-level pressure micro-motion signals to assist in the determination of sleep stage.

[0216] 4.6-axis inertial measurement unit

[0217] Selection: MPU6050 six-axis sensor, integrating a three-axis accelerometer and a three-axis gyroscope;

[0218] Hardware parameters: sampling frequency 10Hz, angular velocity range ±250° / s, acceleration range ±2g;

[0219] Hardware interface: The I2C interface is mounted on the main control unit and embedded in the center area of ​​the pillow;

[0220] It collects head spatial posture and motion data to assist in posture determination, body movement quantification, and micro-interaction detection, providing core data on head roll angle and pitch angle for posture type determination; it calculates body movement energy values ​​for sleep stage and body movement detection; and it recognizes micro-interaction actions such as continuous tapping to enable quick control functions.

[0221] 5. Airbag actuator

[0222] Components: Miniature silent air pump, three-position three-way solenoid valve assembly, independently partitioned left and right airbags, central support airbag, and miniature MEMS pressure sensor.

[0223] Hardware parameters: maximum inflation rate ≤5mm / s, air pressure resolution 0.01kPa, airbag uses medical-grade thermoplastic polyurethane (TPU) film, solenoid valve supports three-state switching of inflation, deflation and pressure holding;

[0224] Hardware interface: GPIO drives the air pump and solenoid valve to switch on and off, PWM realizes the air pump speed regulation, and ADC collects air pressure sensor data;

[0225] The system performs zoned inflation and deflation adjustment to achieve dynamic adjustment of pillow height and support curvature, completes zero-gap fit, receives PID control commands, and performs precise inflation and deflation. The air pressure sensor built into each airbag provides real-time feedback on the internal pressure of the airbag, serving as feedback for the inner loop control. After the adjustment reaches the target, the solenoid valve switches to the pressure-holding lock state, maintaining the support height even when power is off. The maximum duration of a single continuous inflation cycle is set to 15 seconds to prevent the air pump from overheating.

[0226] 6. Power supply and fault protection module

[0227] Composition: rechargeable lithium battery, charging management chip, overcurrent and overvoltage protection circuit;

[0228] Hardware parameters: Supports DC5V external power supply, with built-in overcurrent, overvoltage, and short circuit triple hardware protection;

[0229] It provides stable power supply for the entire system, ensures the safe operation of hardware, and monitors the power status and the working status of each module in real time. In case of failure, it triggers full-link degradation protection and immediately locks the airbag status to ensure safe use.

[0230] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A sleep posture-assisted recognition method based on Bluetooth screen status perception, characterized in that, Includes the following steps: S1: System initialization and global data architecture construction: Construct a shared data pool with timestamps to achieve time alignment of multi-source data; Start two independent perception sub-processes in parallel: behavior scene determination and posture type determination; For posture type determination, extract the contact area and pressure center coordinates of the flexible pressure sensor array as core feature vectors for discrimination; S2: BLE perception sub-process runs independently: The BLE module independently scans and parses the mobile phone broadcast packets locally to obtain the screen on / off status, device spatial posture and operation activity; S3: Bimodal cross-validation and confidence fusion: Read data from the shared data pool, perform physical consistency verification, and determine the compatibility between physical posture and behavioral scenario; dynamically allocate human posture weights and BLE scenario weights according to the current sleep stage, and output the final scenario and adjustment parameters; S4: Fusion Judgment and Execution: Based on the final scenario and adjustment parameters, simultaneously execute the pillow airbag adjustment and BLE collaborative instructions; The airbag adjustment adopts a cascaded dual closed-loop PID control strategy of outer loop pressure gradient and inner loop air pressure; S5: Global State Machine Management and Intervention: State transitions are triggered based on BLE events, and a three-level progressive intervention mechanism is executed when a poor posture is detected.

2. The sleep posture-assisted recognition method based on Bluetooth screen status awareness according to claim 1, characterized in that, The attitude type determination rules mentioned in step S1 specifically include: When the contact area is detected to be less than the first preset ratio, and the pressure center coordinate is significantly biased to the left side of the array, and the pressure ratio on one side is higher than the first ratio threshold, it is determined to be a left lateral decubitus position. When the contact area is detected to be within the second preset ratio range, and the pressure center coordinate is significantly biased to the right side of the array, and the pressure ratio on one side is higher than the first ratio threshold, it is determined to be a right lateral decubitus position. When the contact area is detected to be greater than the second preset ratio and concentrated, and the pressure center coordinate is located in the central axis area of ​​the array and is slightly backward along the longitudinal direction, it is determined to be supine. When the contact area is detected to be smaller than the first preset ratio and distributed in a dotted pattern, and the pressure center of gravity is extremely forward, it is determined to be prone. When the contact area is detected to be close to zero or the total pressure value is lower than the pillow separation threshold, it is determined to be a pillow separation state.

3. The sleep posture-assisted recognition method based on Bluetooth screen status awareness according to claim 1, characterized in that, The logic for the BLE module to parse broadcast packets in step S2 includes: For screen on / off status: directly read specific flag bits in the broadcast data structure to make the determination; For device spatial attitude: extract the three-axis acceleration data embedded in the broadcast packet, calculate the angle between the gravity component and the device coordinate system, and determine the screen orientation when the long side of the device is parallel to the ground and the short side is vertical, and determine the screen orientation when the long side of the device is vertical and the short side is horizontal. Regarding device operational activity: count the number of broadcast packets received within a unit time window, and mark them as active or inactive based on the packet sending frequency; Logically couple the above analysis results to initially determine the application scenarios, including landscape gaming, landscape movie watching, portrait reading, side-lying phone calls, and standard sleep scenarios.

4. The sleep posture-assisted recognition method based on Bluetooth screen status awareness according to claim 1, characterized in that, Step S2 also includes an abnormal event detection and rapid response mechanism: Synchronously perform abnormal event detection to monitor in real time whether events such as device screen switching on / off, sudden drop in activity, scene switching, and signal loss occur; When critical events such as screen on / off switching and sudden drop in activity are triggered, the global state manager is directly triggered via GPIO hardware interrupt, skipping the regular periodic scheduling and achieving millisecond-level fast response.

5. The sleep posture-assisted recognition method based on Bluetooth screen status awareness according to claim 1, characterized in that, In step S3, the physical consistency verification adopts a hierarchical verification mechanism to determine the physical compatibility between the physical posture and the behavioral scene, which is divided into three levels: If the behavior scenario and the pose type are physically compatible, they are defined as completely identical. If there is a logical connection between the behavior scenario and the posture type but it is not a typical match, it is defined as partially consistent. If the behavior scenario and the posture type physically conflict, it is defined as a complete contradiction. If it is determined to be a complete contradiction, it is directly marked as abnormal, the previous stable state is maintained, and no adjustment is triggered.

6. The sleep posture-assisted recognition method based on Bluetooth screen status awareness according to claim 1, characterized in that, Step S3 also includes a sleep state verification step: After completing the physical consistency verification, the fusion judgment sub-process further determines the user's sleep state based on the micro-motion amplitude extracted by the pressure sensor and the body kinetic energy value output by the gyroscope. Based on the results of the sleep state verification, the final adjustment sensitivity is corrected, and standardized instructions are generated. The standardized instructions specifically include the corresponding scenario, the corresponding pillow adjustment amount, and the corresponding coordination level.

7. The sleep posture-assisted recognition method based on Bluetooth screen status awareness according to claim 1, characterized in that, The cascaded dual-closed-loop PID control strategy described in step S4 specifically includes: The outer loop serves as the main control loop, taking the target support height issued by the fusion judgment sub-process as the set value, and using the airbag pressure value and the shoulder and neck pressure gradient value as feedback quantities. After PID calculation, the target air pressure value is output to the inner loop. The inner loop acts as a secondary regulation loop. It takes the received target air pressure value as the set value and the real-time internal pressure of the airbag sampled at high frequency by the MEMS air pressure sensor as the feedback quantity. After PID calculation, it outputs the PWM duty cycle to directly drive the speed of the micro air pump. After the adjustment meets the target, the system controls the three-way solenoid valve to switch to the pressure holding and locking state to evaluate the performance. If the target is not met, the incremental PID algorithm is used to fine-tune the output.

8. The sleep posture-assisted recognition method based on Bluetooth screen status awareness according to claim 1, characterized in that, The global state machine transition rules mentioned in step S5 include: Abnormal jump: If a sensor failure or Bluetooth signal loss is detected for more than a specified time in any state, the system will uniformly enter an abnormal degradation state and lock the current airbag height. Positive transition: triggered by BLE behavioral characteristics and confirmed by human physical signs, transitioning from an active state to a sleep state; Reverse jump: Triggered quickly by BLE screen-on event and confirmed by human body movement, jump from sleep state to active state.

9. The sleep posture-assisted recognition method based on Bluetooth screen status awareness according to claim 1, characterized in that, The three-level progressive intervention mechanism for poor posture described in step S5 specifically includes: Level 1 intervention: If the poor posture persists for the first preset duration, it will trigger slight airbag undulation feedback and interface prompts; Level 2 intervention: If the poor posture persists for the second preset duration, it will trigger a fine-tuning of the support height and a health advice push. Level 3 intervention: If the poor posture persists for the third preset duration, a vibration alert and a strong pop-up notification will be triggered, and the system will switch to a safe support height. If the user adjusts their posture during the intervention, the intervention will be terminated immediately and normal adaptation will be restored.

10. The sleep posture-assisted recognition method based on Bluetooth screen status awareness according to claim 1, characterized in that, It also includes self-learning and data feedback steps: The results of each adjustment, intervention feedback data, and user posture adjustment data are written back to the shared data pool and incorporated into the self-learning database. Based on accumulated historical data, the contact area threshold, consistency coefficient, dynamic weight coefficient, and preset duration of the three-level intervention are periodically optimized to achieve personalized sleep posture recognition and assisted adjustment.