Mattress linkage control method and device based on sleep state recognition and medium
Patent Information
- Application Number
- CN202611327982.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-03
AI Technical Summary
Existing smart mattresses and electric beds have several issues in terms of adjustment methods, such as a disconnect between the adjustment method and the actual sleep state, a lack of graded and progressive control for abnormal breathing intervention, a lack of unified timing for multiple actuators, mutual interference between dual-person zone and shared mechanism control, difficulty in stable iteration of personalized strategies, and difficulty in continuous operation of manual control and automatic linkage via APP in scenarios with network outages and conflicts.
By acquiring night-level assessment data, personal baselines, authorized profiles and recommendation constraints, end-side action summaries, and user feedback, a sleep state-mattress parameter linkage rule package is generated and versioned. This package is used to implement anti-shaking while in and out of bed, quality gating, and continuous status confirmation. It determines the targets for support firmness, temperature control, and massage intensity, uses a bilateral shared mechanism decision table to determine the headboard angle, and executes conflict resolution between manual commands and automatic linkages through the APP local direct connection channel and cloud channel to achieve personalized preference iteration.
It achieves stable and safe mattress linkage control even when the network is offline, reduces movement conflicts, provides personalized preference iteration, ensures that the mattress adjustment corresponds to the actual sleep state, realizes graded and progressive control of breathing abnormalities, and ensures unified timing of multiple actuators and independent control of dual-person zones.
Smart Images

Figure CN123023778A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent sleep control technology, and in particular to a mattress linkage control method, device and medium based on sleep state recognition. Background Technology
[0002] The existing adjustment methods for smart mattresses and electric beds mainly include manual adjustment, preset programs executed at fixed times, and single actions triggered by a single signal. Manual adjustment requires active operation by the user, preset programs lack correspondence with the actual sleep state, and single parameter feedback is difficult to cover the mattress linkage needs in light sleep, deep sleep, REM sleep, and abnormal breathing states.
[0003] When multiple actuators operate continuously, the lack of unified priority, interlocking, and power budget control for air pumps, temperature control, massage, and shared lifting motors can easily lead to action conflicts and noise superposition. When two people are sleeping together, the lack of independent left and right control for zoned mechanisms can cause mutual interference, and the shared headboard angle requires consideration of the real-time status of both sides. Fixed strategies are difficult to iterate based on personalized preferences, and when there is a lack of division of labor between manual operation and automatic linkage with local direct connection channels and cloud channels, it is difficult to maintain continuous control in the event of network interruption, repeated commands, and status changes. Furthermore, the lack of anti-shaking in bed and out of bed, as well as zoned sleep and wake-up control, can cause unnecessary start-stop cycles when turning over briefly or getting up at night. At the same time, if respiratory abnormality intervention is triggered by a single event to establish a fixed lift, the lack of continuous confirmation, graded angle, observation, capping, and gradual return processes can easily lead to over-adjustment or under-intervention. Summary of the Invention
[0004] In view of the problems existing in the prior art, the present invention is proposed.
[0005] Therefore, this invention provides a mattress linkage control method, device, and medium based on sleep state recognition, which solves the problems of existing mattress adjustment being disconnected from actual sleep state, lack of graded and progressive control for abnormal breathing intervention, lack of unified timing for multiple actuators, mutual interference between dual-person zone and shared mechanism control, difficulty in stable iteration of personalized strategies, and difficulty in continuous operation of APP manual control and automatic linkage in network outage and conflict scenarios.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a mattress linkage control method based on sleep state recognition, which includes: acquiring night-level assessment data, personal baseline, authorized profile and recommendation constraints, end-side action summary and user feedback; generating and versioning a sleep state-mattress parameter linkage rule package; performing integrity, device model and version verification on the sleep state-mattress parameter linkage rule package on the end-side to determine the current valid sleep state-mattress parameter linkage rule package; based on the current valid sleep state-mattress parameter linkage rule package, periodically reading the real-time status of both sides and the measured parameters of the device, performing anti-shake, quality gating and continuous status confirmation when in and out of bed, generating support hardness targets, temperature control targets and massage intensity targets for the left and right zones according to the status-parameter mapping, and determining the respiratory abnormality control level and left and right side angle requests based on the frequency of short-window respiratory abnormality candidate events, the cumulative duration of rhythm abnormality and the deviation of the heart rate baseline; and determining the shared reference angle based on the independent isolation relationship of the partitioned mechanism and the bilateral collaborative relationship of the shared lifting motor. The system utilizes a dual-sided shared mechanism decision table to adjudicate left and right side angle requests, forming a unique shared headboard angle target. It then integrates the left and right zone support firmness targets, temperature control targets, and massage intensity targets with the unique shared headboard angle target, setting mattress linkage targets based on limits, maximum rate of change, and safety envelopes. Local scheduling of the air pump, temperature control, massage, and shared lifting motors is performed based on a priority table, manual lease, interlock matrix, power budget, target validity period, and safety pause point. Adjustments to the shared lifting motors are executed through a gradual lifting, observation, capping, and slow return process. Feedback from the actuators is read, and a summary of end-side actions is generated. Conflict resolution between manual commands and automatic linkage, network outage operation, and reconnection reconciliation are handled via the APP's local direct connection channel and cloud channel. Personalized preference candidates are generated based on the end-side action summary, user manual adjustments, and effect feedback. These personalized preference candidates are observed, and corresponding processing is determined in the acceptance and rollback processing based on the observation results. The next version of the sleep state-mattress parameter linkage rule package is then updated.
[0007] As a preferred embodiment of the quality-gated adaptive evaluation method for sleep data described in this invention, the rule package for determining the current effective sleep state—mattress parameter linkage includes: The cloud reads night-level assessment data, personal baselines, authorized profiles and recommendation constraints, terminal action summaries and user feedback, and generates state-parameter mappings, thresholds and continuous confirmation parameters, priorities and interlocking rules, bilateral shared institutional decision tables, as well as amplitude limits, maximum rate of change and safety envelopes according to users and regions. The version number, effective time, status-parameter mapping, threshold and continuous confirmation parameters, priority and interlocking rules, bilateral shared mechanism decision table, amplitude limit, maximum change rate and safety envelope and integrity verification information are encapsulated into a sleep status-mattress parameter linkage rule package, and pre-release verification is performed according to the device model and actuator capabilities. The device verifies the integrity, device model, and version of the sleep status-mattress parameter linkage rule package. If the verification passes, the rule is written to the spare area and switched atomically. If the verification fails, the previous valid version is used. If any of the following occurs in the new rule: parsing error, continuous target rejection, or abnormal failure rate, the previous valid version is rolled back.
[0008] As a preferred embodiment of the quality-gated adaptive sleep data evaluation method of the present invention, the steps of performing in-bed and out-of-bed swaying, quality gating, and continuous status confirmation, and generating support firmness targets, temperature control targets, and massage intensity targets for the left and right zones according to the status-parameter mapping include: The system reads the bed status and confidence level of the left and right sides, the real-time sleep status and confidence level, the frequency of body movements, the overall signal quality, and the actual measured parameters of the corresponding zones. It continuously confirms the short-term status changes during the transition between bed and bed leaving, and determines the corresponding status based on the overall signal quality among three processing states: normal linkage, maintaining the current comfort parameters, and canceling the comfort goals that have not yet been implemented. After confirming that the person is in bed and that the real-time sleep status meets the continuous confirmation conditions, the system uses the status-parameter mapping in the current effective sleep status-mattress parameter linkage rule package to form support firmness targets, temperature control targets, and massage intensity targets by combining the user's and zone's baseline preferences, the current sleep status's corresponding status offset, and body movement correction. The system also limits the changes in these targets according to the device's allowable range, dead zone, and maximum rate of change. Airbag support, zoned heating, and massage are used as zoned mechanisms. The left zone generates a target based solely on the real-time state and preferences of the left side, and the right zone generates a target based solely on the real-time state and preferences of the right side. The current comfort parameters are maintained in any situation where the real-time sleep state is unknown, the overall signal quality is insufficient, or the sleep state does not allow for the generation of new comfort movements.
[0009] As a preferred embodiment of the quality-gated adaptive assessment method for sleep data described in this invention, the determination of the respiratory abnormality control level and the request for left and right lateral angles includes: A sliding control window is used to filter and confirm the effective time when the user is in bed and the overall signal quality meets the requirements. The candidate respiratory abnormality events within the effective time are deduplicated according to the event identifier and time overlap. The frequency of short-window respiratory abnormality candidate events is determined based on the number of deduplicated candidate events and the effective time. When it is confirmed that the user is in bed, the frequency of short-window respiratory abnormality candidate events is valid, and the user is not awake or in a state of gross physical activity, a level judgment is performed. The proportion of the cumulative duration of rhythm abnormalities to the effective window duration and the deviation of the median heart rate within the window from the historical baseline of the same user and the same sleep state are used as independent support quantities. A higher control level must satisfy at least one independent support quantity, and the corresponding control level is confirmed in level I, level II and level III through continuous judgment points. When there is a lack of independent support quantities, the highest control level is limited. The left and right angle requests are generated in progressively increasing order according to Level I, Level II and Level III. The left and right angle requests are then recorded in correspondence with the corresponding breathing abnormality control level, request increment and effective status for decision-making by the bilateral shared mechanism. The breathing abnormality control level is only used for mattress motion control.
[0010] As a preferred embodiment of the quality-gated adaptive evaluation method for sleep data described in this invention, the formation of the mattress linkage target includes: When there is no automatic angle action, the shared reference angle is determined according to the common confirmed value of all users currently in bed, the effective candidate preference of single users in bed, the conservative value of the candidate preferences on both sides when two people are in bed, and the equipment certification safety benchmark, and the shared reference angle is kept unchanged during this automatic action, observation and recovery. The system reads the angle requests from the left and right sides, as well as the bed status, real-time sleep status, overall signal quality, body movement status, and manual lease on the other side. It uses the dual-side shared mechanism decision table to determine the allowable increment and speed limit for the two-person scenario, ensuring that the increment of the shared bed head angle does not exceed the upper limit of the left and right side requests, the upper limit of the dual-side shared mechanism decision table, the upper limit of the automatic increment, and the remaining absolute angle space of the device. It also combines the absolute angle range of the device to form a unique shared bed head angle target. When one side confirms the patient's departure from the bed, only the active adjustment of the corresponding side's partition mechanism is turned off, while the other side continues to operate. When both sides confirm the patient's departure from the bed, the shared lifting motor returns to the departure reference. If any of the following situations occur on either side: awake, large movement, insufficient quality, valid manual lease, or shared lifting motor failure, the corresponding action is determined according to the decision table of the shared mechanism on both sides: freeze new lifting, delay, conservative limit, cancellation, and stop processing.
[0011] The support hardness, temperature control, and massage intensity targets for the left and right zones are respectively mapped to the air pump, temperature control module, massage mechanism, and shared lifting motor, along with the unique shared headboard angle target. Based on the equipment's allowable range, dead zone, maximum rate of change, shared reference angle, and safety envelope verification targets, targets that violate the independent isolation of the left and right zones, manual rental agreement, and safety envelope are eliminated, thus forming a mattress linkage target.
[0012] As a preferred embodiment of the quality-gated adaptive evaluation method for sleep data described in this invention, the generation of the end-side action summary includes: Priorities are set according to the following order: safety and fault actions, user local manual commands, breathing abnormality shared lifting motor adjustment, air pump support form adjustment, temperature control heating and cooling actions, and automatic massage. For actions of the same priority, the order is determined by the serial number received at the end side. When a higher priority action preempts a lower priority action, the preemption will take place after the actuator reaches the safety pause point. Safety and fault stops are not subject to the waiting conditions. The interlock matrix determines the relationships between actuators, including that they must not change simultaneously, are allowed to maintain their current output but not change their target, are allowed to run in parallel when the power budget is met, and are allowed to merge similar actions in series. When parallelism is allowed, the power consumption of the running mechanism is checked to ensure that it does not exceed the available power budget. Multiple automatic targets to be executed by the same actuator are merged into the latest valid target, and automatic targets that have exceeded their validity period are recalculated according to the latest real-time status of the left and right sides. For the single shared bedside angle target formed by the decision-making table of the two-sided shared institutions, the angle is gradually raised in small steps according to the corresponding respiratory abnormality control level. After reaching the current level, it is observed. If there is no improvement, the angle is gradually increased within the safety envelope and does not exceed the automatic increment limit. When either the improvement condition or the exit condition is met, the shared reference angle is gradually returned. When the entry condition is met again during the return process, the previous effective angle is restored and the observation is repeated. Output the target value, limit value, maximum rate of change and action number to the corresponding actuator, and output the corresponding instruction in the cancellation instruction and hold instruction according to the current scheduling status. Read the accepted status, rejected status, actual measured parameters of the equipment, in place status, fault status and safe pause point, and summarize the actuator feedback, the real-time status of the left and right sides and the current rule version to generate the end-side action summary.
[0013] As a preferred embodiment of the quality-gated adaptive evaluation method for sleep data described in this invention, the step of determining the corresponding process includes: Personalized preference candidates are generated from records that are maintained after manual settings by the user and have not been adjusted in the opposite direction, where the user explicitly provides positive feedback from either the comfort mark or the effective mark, and where automatic settings are not revoked within the effective night and subsequent indicators do not deteriorate. In the event of any of the following situations: insufficient overall signal quality, identity conflict, or security failure, the personalized preference candidates are not updated. Instead, the personalized preference candidates are observed as candidate rule versions and are not directly replaced by the stable version. Based on the quality of the effective observation nights during the observation period, the candidate's effective time, sleep efficiency, duration of wakefulness after falling asleep, number of awakenings, and frequency of short-window respiratory abnormality candidate events before and after respiratory control, it is determined whether the candidate has deteriorated. If the acceptance conditions are met, a new stable preference is formed; otherwise, the previous stable version is restored. The personal candidate preference corresponding to the shared bedside angle is only used as the candidate input for the shared baseline of the next stable session.
[0014] As a preferred embodiment of the sleep data adaptive evaluation method based on quality gating described in this invention, the step of resolving conflicts between manual instructions and automatic linkage, disconnection operation, and reconnection reconciliation via the APP local direct connection channel and the cloud channel includes: The local direct connection channel carries user manual adjustments, while the cloud channel carries asynchronous publishing of sleep status-mattress parameter linkage rule packages, mattress status summary and sleep process reporting, preference iteration, and report display. Business requests carry request identifiers, device identifiers, executor identifiers, left and right partitions, target values, source channels, source users, monotonically increasing source sequences, rule versions, generation times, validity periods, and idempotent keys. The source sequence, validity period, and idempotent keys are used to handle duplicate, out-of-order, and expired instructions. Target conflicts within the same executor are handled in the order of security failures, local manual adjustments within a valid lease, cloud-forwarded manual adjustments, automatic actions of edge rules, and cloud-planned tasks. When the network is down, the end side continues to use the last verified rule version and accept local manual instructions; after reconnection, the rule version, the sequence of each source, the most recent action number and the actual measurement snapshot of the device are exchanged. The actual measurement status of the device is used as the current physical fact. The local settings that are still under the manual lease are retained. Only unconfirmed and non-expired business events are retransmitted. Executed actions are not replayed. After the higher rule version in the cloud is verified, it is written to the backup area and switched atomically.
[0015] In a second aspect, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements any step of the mattress linkage control method based on sleep state recognition as described in the first aspect of the present invention. In a third aspect, the present invention provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements any step of the mattress linkage control method based on sleep state recognition as described in the first aspect of the present invention.
[0016] The beneficial effects of this invention are as follows: by asynchronously generating and versioning linkage rule packages in the cloud, the terminal side completes status confirmation, dual-person partition collaboration, progressive intervention for respiratory abnormalities, and multi-institution scheduling based on effective rules. Combined with dual-channel adjudication and personalized preference iteration in the APP, it achieves stable and secure mattress linkage control that can operate offline with low conflict. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of the overall architecture and the two-level link between the edge and cloud.
[0019] Figure 2 This is a flowchart illustrating the cloud-based generation and distribution process for the linkage mapping.
[0020] Figure 3 This is a flowchart illustrating the collaboration between dual-person zone control and shared mechanisms.
[0021] Figure 4 This is a flowchart of a multi-actuator priority and interlock state machine. Detailed Implementation
[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0025] Reference Figures 1-4 This is one embodiment of the present invention, which provides a mattress linkage control method based on sleep state recognition, including the following steps: S1: Obtain night-level assessment data, personal baseline, authorized profile and recommendation constraints, client-side action summary and user feedback, generate and version-deploy sleep state-mattress parameter linkage rule package, the client-side performs integrity, device model and version verification on the sleep state-mattress parameter linkage rule package, and determines the current valid sleep state-mattress parameter linkage rule package.
[0026] S1.1: Read night-level assessment data, personal baseline, authorized profile and recommendation constraints, client-side action summary and user feedback from the cloud, and organize them according to user and left and right partitions to determine the sleep status, personal benchmark preferences, risk control boundaries, execution results and feedback information used for the current rule version.
[0027] Specifically, the night-level assessment data includes night-by-night phased results, abnormal labels, scores, and night-level respiratory abnormality candidate event indices. The individual baseline adopts the individual robust baseline corresponding to the same user. The authorization profile and recommendation constraints include daily routine profiles, content preferences, risk control levels, and optional service suggestions, which are used to limit the scope of linkage in the current rule version.
[0028] The end-side action summary uses action records formed by the previous completed control cycle and historical valid sessions, and at least corresponds to the action zone, actuator, action number, target value, actual measured parameters of the equipment, position status, fault status, and manual lease status; user feedback records at least the results of manual adjustment, comfort feedback, effective feedback, discomfort feedback, immediate stop, and restoration of original settings, which are used for subsequent personalized preference candidate judgment.
[0029] The cloud does not generate second-level actions based on real-time sleep status. The current rule version only generates asynchronously based on completed night-level assessments, authorized profiles and recommended constraints, end-side action summaries and user feedback. Interventions for abnormal breathing, bed-off hibernation, bilateral adjudication of shared lifting motors and interlocking scheduling of multiple actuators are all completed locally on the end-side based on the cached current valid sleep status-mattress parameter linkage rule package.
[0030] S1.2: Based on the corresponding organized night-level assessment data, individual baselines, authorized profiles and recommendation constraints, edge action summaries and user feedback, generate state-parameter mappings, thresholds and continuous confirmation parameters, priority and interlocking rules, bilateral shared institutional decision tables, as well as amplitude limits, maximum change rates and safety envelopes according to users and partitions.
[0031] Specifically, the state-parameter mapping is used to map the confirmed real-time sleep state to target changes in support firmness, temperature control target, and massage intensity; the threshold and continuous confirmation parameters are used for in-bed and out-of-bed shaking prevention, comprehensive signal quality gating, continuous confirmation of real-time sleep state, and continuous confirmation of respiratory abnormality control level.
[0032] Priority and interlock rules are used to limit the execution sequence and parallel relationship of safety fault actions, manual actions, shared lifting motor actions, air pump support form adjustment, temperature control heating and cooling actions, and automatic massage; the dual-sided shared mechanism decision table is used to determine the allowable increment and speed limit of the shared lifting motor based on the angle requests of the left and right sides, the bed status, the real-time sleep status, the overall signal quality, the body movement status, and the manual lease.
[0033] The amplitude limit, maximum rate of change, and safety envelope are determined based on the equipment model and actuator capabilities, respectively limiting the allowable range, dead zone, maximum rate of change, automatic angle increment limit, and absolute angle range of the shared headboard angle for support hardness, temperature control target, massage intensity, and shared headboard angle. Personalized preference updates must not change the aforementioned safety boundaries.
[0034] S1.3: Encapsulate the version number, effective time, status-parameter mapping, threshold and continuous confirmation parameters, priority and interlocking rules, bilateral shared mechanism decision table, amplitude limit, maximum change rate and safety envelope and integrity verification information into a sleep status-mattress parameter linkage rule package, and perform pre-release verification according to the device model and actuator capabilities.
[0035] Specifically, the version number adopts a monotonically increasing method, the effective time is used to limit the rule switching time, and the integrity verification information is used to verify whether the rule content is complete. Before release, the device model, actuator type, partitioning capability, parameter allowable range, maximum change rate, absolute range of shared headboard angle and interlocking relationship are verified. Rule packages that fail the pre-release verification will not enter the end-side switching process.
[0036] After receiving the sleep state-mattress parameter linkage rule package, the terminal verifies its integrity, device model, and version. If the verification is successful, it writes the package to the spare area and atomically switches to the current valid sleep state-mattress parameter linkage rule package. If the verification fails, it continues to use the previous valid version. The terminal preferably retains both the current valid version and the previous valid version.
[0037] If any of the following situations occurs during the operation of the new rules: parsing error, continuous target rejection, or abnormal failure rate, the terminal side will roll back to the previous valid version and report the reason for the rollback. After the rollback, the automatic control conditions will be reconfirmed based on the current measured parameters of the equipment and the latest real-time status of both the left and right sides, and the old automatic targets that have already expired will not be executed.
[0038] S2: Based on the current effective sleep state-mattress parameter linkage rule package, periodically read the real-time status of both sides and the actual measured parameters of the device, perform anti-shake, quality gating and status continuous confirmation when in bed and out of bed, generate support hardness target, temperature control target and massage intensity target for the left and right zones according to the status-parameter mapping, and determine the breathing abnormality control level and left and right side angle requests based on the frequency of short window breathing abnormality candidate events, cumulative duration of rhythm abnormality and heart rate baseline deviation.
[0039] S2.1: The end-side reads the bed status and confidence level of the left and right sides, real-time sleep status and confidence level, body movement frequency, respiratory abnormality candidate events, cumulative duration of rhythm abnormality, median heart rate of the window, median respiratory rate of the window, comprehensive signal quality, and the actual measured parameters of the corresponding partition according to the acquisition cycle, and matches them according to the left and right partitions and acquisition time.
[0040] Specifically, when a field is empty, a missing flag is retained synchronously, and historical values are not used to fill in the current field; the actual measured parameters of the equipment include at least the actual measured values of the left and right partition support hardness, temperature control, massage intensity, and shared headboard angle, and the accepted status, rejected status, in-position status, fault status, and safety pause point of the actuator are read synchronously.
[0041] After the cycle reading is completed, the physical state of the mattress in this cycle is taken as the actual measured parameters of the current device on the end side, and the version of the current effective sleep state-mattress parameter linkage rule package is recorded in correspondence with the real-time status of the left and right sides; the cloud historical snapshot is only used for subsequent asynchronous analysis and does not replace the actual measured parameters of the current device.
[0042] S2.2: Based on the threshold and continuous confirmation parameters in the current effective sleep state-mattress parameter linkage rule package, perform in-bed and out-of-bed anti-shake, quality gating and real-time sleep state continuous confirmation, and determine whether to allow the generation of new comfort goals based on the confirmation results.
[0043] Specifically, the in-bed and out-of-bed stabilization uses four states: OFF, ENTER_PENDING, ON, and EXIT_PENDING. Preferably, a decision frame is set at 5 seconds. If the in-bed state is ON for 3 consecutive frames and the average in-bed confidence is not less than 0.70, the in-bed state is confirmed. If the in-bed state is OFF for 12 consecutive frames and the average in-bed confidence is not less than 0.70, the out-of-bed state is confirmed. If any decision frame is reversed, the corresponding pending confirmation state is canceled.
[0044] During ENTER_PENDING and EXIT_PENDING, new actions of the corresponding side air pump and massage are paused, and the temperature control maintains the current output. When one side confirms leaving the bed, only the corresponding zone enters sleep mode. After both sides confirm leaving the bed, the shared lifting motor returns to the bed leaving reference and enters the whole bed low power consumption mode. After reconfirmation, the current effective sleep state - mattress parameter linkage rule package is loaded behind the bed and the automatic comfort action is resumed after the state stabilizes.
[0045] The state-parameter mapping is switched only when the overall signal quality meets the normal linkage requirements and the same real-time sleep state meets the continuous confirmation condition; preferably, the overall signal quality is not lower than 0.70, the same sleep state appears at least twice in three consecutive 10-second judgment frames and the average state confidence is not lower than 0.65, and the state switch is confirmed.
[0046] When the overall signal quality is in a degraded range, the current comfort parameters are maintained and no new comfort goals are generated. When the overall signal quality enters a low-quality state, the corresponding comfort goals that have not yet been executed are cancelled. Safety, bed exit and fault actions are not subject to comfort quality gating delays.
[0047] S2.3: After confirming that the user is in bed and that the real-time sleep status meets the continuous confirmation conditions, according to the status-parameter mapping in the current effective sleep status-mattress parameter linkage rule package, the user and zone baseline preferences, the status offset corresponding to the current sleep status and body movement correction are used to form the support firmness target, temperature control target and massage intensity target for the left and right zones.
[0048] Specifically, airbag support, zoned heating, and massage are zoned mechanisms. The left zone generates targets based solely on the real-time state and preferences of the left side, while the right zone generates targets based solely on the real-time state and preferences of the right side. The shared headboard angle does not enter the independent state of the left and right zones—parameter mapping—but is determined separately by the respiratory abnormality control level and the bilateral shared mechanism decision table.
[0049] The formula for determining the target value of the partitionable execution parameters is: ; Where u* represents the target value of the partitionable execution parameter, r represents the left and right sides, j represents the category of the partitionable execution parameter, p represents the baseline preference saved by the user and the partition, a represents the state offset corresponding to the currently confirmed sleep state, b represents the body movement correction coefficient, m represents the body movement frequency of the corresponding side, mref represents the body movement reference value, L and U represent the lower and upper limits of the device's allowable range for the corresponding execution parameter, respectively, and j corresponds to the support hardness, temperature control target, and massage intensity.
[0050] When the difference between the new target and the measured parameters of the equipment is within the corresponding dead zone, the current value is maintained. When it exceeds the dead zone, it gradually approaches the target according to the maximum rate of change. In light sleep and easily awakened states, new comfort adjustments are allowed only after the body movement is stabilized. In deep sleep, the support firmness is maintained when entering deep sleep. In REM state, the support firmness and massage intensity are maintained. When the real-time sleep state is unknown or the overall signal quality is insufficient, the current comfort parameters are maintained.
[0051] S2.4: A sliding control window is used to filter the effective time when the patient is confirmed to be in bed and the overall signal quality meets the requirements. The candidate respiratory abnormality events within the effective time are deduplicated according to the event identifier and time overlap. The frequency of short-window respiratory abnormality candidate events is determined based on the number of deduplicated candidate events and the effective time. The respiratory abnormality control level and left and right side angle requests are determined by combining the cumulative duration of rhythm abnormality and the deviation of heart rate baseline.
[0052] Specifically, the control window that slides every 30 seconds for the most recent 5 minutes is preferred. Minutes in which the patient is confirmed to be in bed and the average comprehensive signal quality for that minute is not lower than 0.70 are determined as valid minutes. The number of candidate events for respiratory abnormalities within the valid minutes is obtained by deduplicating the candidate events. If the valid minutes are less than 4 minutes, the frequency of candidate events for respiratory abnormalities in the short window is determined to be unavailable, and no new respiratory abnormality control level is generated.
[0053] Before determining the level, the system verifies and confirms whether the user is in bed, the overall signal quality, the frequency of short-window respiratory abnormality candidate events, and whether the user is currently awake and in a state of gross movement. If the user is awake, in a state of gross movement, or if the aforementioned gating conditions are not met, no new respiratory abnormality control level is generated, and the system proceeds to the corresponding hold, cancel, or slow return processing.
[0054] In addition to meeting the short-window respiratory abnormality candidate event frequency condition, a higher respiratory abnormality control level must also meet at least one independent support quantity. The first independent support quantity is formed when the cumulative duration of rhythm abnormality reaches 10% of the effective window duration, and the second independent support quantity is formed when the deviation of the median heart rate in the window from the baseline of the same user in the same sleep state for the past 7 effective nights reaches 15%. A higher respiratory abnormality control level can be confirmed when at least one of the first and second independent support quantities is met.
[0055] The preferred short-window respiratory abnormality candidate event frequency is determined as follows: when the frequency reaches 8 candidate events / hour and is less than 12 candidate events / hour, it is determined as Level I; when it reaches 12 candidate events / hour and is less than 20 candidate events / hour and has independent support, it is determined as Level II; when it reaches 20 candidate events / hour and has independent support, it is determined as Level III. When the independent support is insufficient, the highest control level is limited to Level I. Each level requires three consecutive judgment points to meet the entry conditions before confirmation.
[0056] Levels I, II, and III generate progressively increasing left and right side angle requests, with preferred request increments of 3°, 6°, and 10°, respectively. The corresponding side's respiratory abnormality control level, request increment, and effective status are recorded together for bilateral shared mechanism decision-making. The respiratory abnormality control level is only used for mattress motion control and is not used for medical severity grading.
[0057] S3: Based on the independent isolation relationship between the left and right sides of the partition mechanism and the collaborative relationship between the two sides of the shared lifting motor, the shared reference angle is determined, and the decision table of the two-sided shared mechanism is used to adjudicate the angle requests of the left and right sides, forming a unique shared headboard angle target. The support hardness target, temperature control target, and massage intensity target of the left and right partitions are combined with the unique shared headboard angle target to form a mattress linkage target according to the limit, maximum change rate, and safety envelope.
[0058] S3.1: Based on whether the actuator can be independently controlled left and right, airbag support, zone heating and massage are identified as zoneable mechanisms, and the shared lifting motor is identified as a shared mechanism; when there is no automatic angle movement, the shared reference angle is determined according to the current status of the bed user, and the shared reference angle remains unchanged during this automatic movement, observation and slow return.
[0059] Specifically, the partitioned mechanism is independently isolated according to the left and right partitions. The target on the left only affects the left partition, and the target on the right only affects the right partition. When one side confirms that the person is getting off the bed, only the active action of the corresponding side air pump, massage and partition heating are turned off, while the other side continues to operate according to its own real-time status and the current effective sleep status - mattress parameter linkage rule package.
[0060] The shared reference angle is determined in the following order: the common confirmed value of all currently bedridden users, the valid candidate preference of single bedridden users, the smaller of the two candidate preferences when two people are in bed, and the equipment certification safety reference. After the shared reference angle is determined, the absolute angle range of equipment certification is verified first. It is not modified due to changes in unilateral preferences before the end of this automatic action, observation and slow return.
[0061] S3.2: Read the angle requests from the left and right sides, as well as the bed status, real-time sleep status, overall signal quality, body movement status, and manual lease on the other side. Use the dual-side shared mechanism decision table to determine the allowable increment and speed limit for the dual-person scenario, and combine the shared reference angle and the absolute angle range of the device to form a unique shared bedside angle target.
[0062] The formula for determining the target angle of a shared bed head is: ; Wherein, θtarget represents the unique shared headboard angle target, θ0sh represents the shared reference angle frozen in this control session, Δθallowed represents the allowed increment after the decision of the two-sided shared mechanism decision table, and θabs,min and θabs,max represent the lower limit and upper limit of the absolute angle for device authentication, respectively.
[0063] Specifically, the increment is allowed to take the larger value among the left and right angle requests, the upper limit of the dual-sided shared mechanism decision table, the 15° automatic increment upper limit, and the minimum value among the remaining absolute angle space of the equipment; when there are valid angle requests on both the left and right sides, the larger value among the angle requests on both sides is used as the basis for dual-sided coordination requests, and the movement speed is limited according to the dual-sided shared mechanism decision table.
[0064] When there is a valid angle request on one side and the other side has been confirmed to be out of bed, the request is processed within the safety envelope according to the control level of the requesting side; when the other side is in light sleep and the overall signal quality is valid, incremental processing is allowed according to the decision table; when the other side is in deep sleep and REM state, the addition of angle and movement speed are restricted to reduce the disturbance of the shared lifting motor movement to the sleep state of the other side.
[0065] When the other side is in a conscious state, new elevation requests are frozen. Once the other side stabilizes, old requests are discarded and recalculated based on the latest bilateral status. When the overall signal quality on the other side is in a degraded state, the current angle is maintained and no upgrade is performed. When the status is unknown or the quality is low, a conservative upper limit is adopted and automatic upgrades are stopped. When the manual lease for the shared lifting motor is valid, automatic angle requests are only recorded and not executed.
[0066] S3.3: The support hardness target, temperature control target, and massage intensity target of the left and right zones are respectively mapped to the air pump, temperature control module, massage mechanism, and shared lifting motor with the unique shared headboard angle target. The target content is verified according to the equipment allowable range, dead zone, maximum change rate, shared reference angle, and safety envelope to form the mattress linkage target.
[0067] Specifically, the mattress linkage targets are recorded separately for support firmness, temperature control, and massage intensity in the left and right partitions. The shared headboard angle retains only the unique target formed by the decision-making table of the two-sided shared mechanism. The target of one side of the partitioned mechanism is not written into the other side partition, and the shared mechanism does not accept the absolute target directly formed by any one-sided personal angle preference.
[0068] Verify the dead zone, allowable range, and maximum rate of change between the target value and the measured parameters of the equipment item by item. At the same time, verify the independent isolation of the left and right partitions, manual lease, shared reference angle, dual-sided shared mechanism decision table restrictions, and equipment safety envelope. Targets that do not meet the verification conditions will maintain the current measured parameters of the equipment and will not enter the subsequent automatic scheduling.
[0069] When both sides confirm that the person has left the bed, the shared lifting motor returns to the bed leaving reference if there is no valid manual lease and no malfunction. If either side experiences awakening, significant movement, insufficient quality, valid manual lease, or malfunction of the shared lifting motor, the corresponding processing for freezing new lifting, delaying, conservative limiting, cancellation, and stopping is determined according to the decision table of the shared mechanism on both sides.
[0070] S4: Based on the priority table, manual lease, interlock matrix, power budget, target validity period and safety pause point, perform local scheduling of air pump, temperature control, massage and shared lifting motor. Perform adjustment on shared lifting motor according to the process of gradual lifting, observation, capping and slow return. Read the feedback of the actuator and generate end-side action summary.
[0071] S4.1: Read the priority table and manual lease status in the current valid sleep state - mattress parameter linkage rule package, and perform local scheduling in the order of safety and fault actions, user local manual commands, breathing abnormality shared lifting motor adjustment, air pump support mode adjustment, temperature control heating and cooling actions, and automatic massage. The order of the same priority is determined by the terminal side receiving sequence number.
[0072] Specifically, it is preferable to set the fault stop, obstruction, limit switch and confirmed bed exit shutdown as P0, the user's local manual command as P1, the shared lifting motor for abnormal breathing as P2, and the air pump support mode adjustment, temperature control heating and cooling action and automatic massage as P3, P4 and P5 respectively.
[0073] When P0 occurs, the relevant automatic queue is immediately cancelled; P1 manual instructions must not exceed the safety envelope and a manual lease is established for the corresponding actuator; P2 shared lifting motor actions are decided by the decision table of both sides of the shared mechanism before execution, and the manual lease of the shared lifting motor on either side is effective for automatic angle requests on both sides.
[0074] When a high-priority action needs to preempt a low-priority action that is currently running, the terminal reads the safe pause point of the low-priority actuator. Except for P0 safety fault stop, the current low-priority action is paused and the actuator is released after the actuator reaches the safe pause point, and then the high-priority action is started.
[0075] S4.2: Verify the parallel relationship of each actuator based on the interlock matrix and power budget, and merge and check the validity period of automatic targets to be executed for the same actuator. Automatic targets that have exceeded their validity period are recalculated based on the latest real-time status of the left and right sides.
[0076] Specifically, in the interlock matrix, the actuators that cannot be changed simultaneously are only allowed to change the one with higher priority at the same time. The actuators that are allowed to maintain the current output keep the current value and do not change the target. The actuators that are allowed to run in parallel must also meet the available power budget. Similar actions are merged in a serial manner.
[0077] The shared lifting motor and air pump / massage should not be changed simultaneously. The shared lifting motor and temperature control are allowed to maintain the current output. The air pump and temperature control can run in parallel when the power budget is met. The air pump and massage should not be changed simultaneously. The temperature control and massage can run in parallel when the power budget is met. The stricter relationship given by the equipment certification takes precedence.
[0078] When parallel processing is allowed, the current running combination is verified to not exceed the available power budget based on the maximum power declared by each actuator. If it does, the lowest priority actuator in the current combination is suspended. When there are multiple automatic targets to be executed for the same actuator, only the latest valid target is retained to prevent old targets from being backed up and then continuously made up.
[0079] S4.3: For the unique shared bed head angle target formed by the decision-making table of the two-sided shared mechanism, the gradual lifting, observation, capping and slow return shall be performed according to the corresponding respiratory abnormality control level, and the angle action shall be re-verified when the real-time sleep status, comprehensive signal quality, bed status, manual lease and shared lifting motor failure change.
[0080] Specifically, Level I, Level II and Level III adopt progressively increasing initial request increments, preferably 3°, 6° and 10° respectively; the shared lifting motor gradually approaches the current step target in 1° small steps, with an action interval maintained between adjacent small steps, and is simultaneously limited by the speed allowed by the decision table of the dual-sided shared mechanism, the upper limit of automatic increment and the absolute angle range of the equipment.
[0081] After the shared elevator motor reaches the current step, it enters the observation period, preferably 120 seconds. When the most recent consecutive judgment points meet the exit conditions of the current level and no new candidate events of abnormal breathing are added during the observation period, it is determined to be an improvement. After the improvement status is stable, it is gradually returned to the shared reference angle that was frozen this time.
[0082] If the current and higher-level entry conditions are still met after observation and the improvement is insufficient, entry into the next tier is allowed. If there is no improvement, the increment will be gradually increased to the automatic incremental cap value. Once the cap value is reached, the angle will not be increased further. If there is still no improvement, the control will be recorded as not improved and the APP will be notified. The automatic request on the corresponding side will be cancelled and the cooling phase will begin. When there is no valid request on the other side and the shared lifting motor has no manual lease and no fault, the shared reference angle will begin to slowly return.
[0083] If the entry conditions for the grade are met again during the recovery process and a new candidate event for respiratory abnormality occurs, the previous effective angle is restored and observation is repeated; if the request for lateral rotation is confirmed to be conscious, grossly active, of low quality, or confirmed to be out of bed, the automatic angle request for that side is cancelled, and the shared lifting motor stops at the next safe pause point while it is moving, and then a new decision is made based on the latest bilateral status.
[0084] When the shared lifting motor experiences overcurrent, abnormal position feedback, obstruction, or limit switch malfunction, it will immediately stop, clear the relevant automatic queue, lock the automatic lifting mechanism, and report the fault to the APP. It will not automatically retry until the fault is cleared. The underlying actuator will maintain its current position and return to the certified safe position in accordance with the device authentication security policy.
[0085] S4.4: After completing the verification of priority, manual lease, interlock matrix, power budget, target validity period and safe pause point, output the target value, limit value, maximum rate of change and action number to the corresponding actuator, and output cancellation instruction and hold instruction according to the current scheduling status, read the actuator feedback and generate end-side action summary.
[0086] Specifically, the feedback from the actuator should include at least the accepted status, rejected status, actual equipment parameters, in-position status, fault status, and safety pause point; the end side should match the target value, actual equipment parameters before adjustment, actual equipment parameters after adjustment, and feedback status according to the action number, and the target value should not be directly regarded as the completed status if the actuator has not returned to the in-position status.
[0087] When a target is rejected, the reason for rejection is recorded and the validity of the automatic target is determined based on the latest real-time status of both the left and right sides. The same type of next target is not released before the target tolerance is reached by the same actuator. Newly emerging high-priority targets are handled in accordance with the safety pause point rules of S4.1.
[0088] The edge action summary records at least the action zone, actuator, action number, current rule version, action generation status, target value, limit value, maximum rate of change, action start and end time, accepted status, rejected status, in place status, fault status, manual lease status, and adjusted actual measured parameters of the equipment, and is asynchronously reported to the cloud for personalized preference assessment and generation of the next rule version.
[0089] When the cloud is unreachable, the terminal continues to perform quality gating, continuous status confirmation, bilateral shared mechanism adjudication, multi-executor scheduling, gradual lifting, observation and slow return based on the current effective sleep state and mattress parameter linkage rule package, and caches the terminal action summary locally. Asynchronous synchronization is then performed after the network is restored.
[0090] S5: Executes conflict resolution between manual commands and automatic linkage, performs offline operation and reconnection reconciliation through the APP local direct connection channel and cloud channel. Generates personalized preference candidates based on the terminal action summary, user manual adjustment and effect feedback. Observes the personalized preference candidates and determines the corresponding processing in the acceptance processing and rollback processing according to the observation results. Updates the sleep state - mattress parameter linkage rule package for the next version.
[0091] S5.1: Receive manual instructions and rule-based business requests according to the business division of the APP's local direct connection channel and cloud channel, and use source sequence, validity period and idempotent key to handle duplicate, out-of-order and expired instructions. Handle the same execution agency target conflict in the order of security failure, local manual within the valid lease, cloud forwarding manual, automatic action of end-side rules and cloud planned tasks.
[0092] Specifically, the local direct connection channel is used to enable users to manually adjust the support firmness, share the headboard angle and temperature control target, and can still be used when the cloud is unavailable; the cloud channel is used for asynchronous release of sleep status-mattress parameter linkage rule packages, mattress status summary and sleep process reporting, preference iteration and report display, and does not support second-level automatic action closed loop.
[0093] Business requests must carry at least the request identifier, device identifier, executor identifier, left and right partitions, target value, source channel, source user, monotonically increasing source sequence, rule version, generation time, validity period, and idempotent key; the client side stores the most recently accepted source sequence for each source, the same idempotent key is executed only once, and instructions whose source sequence is not greater than the accepted value or whose validity period has expired are not executed.
[0094] After receiving a request, the terminal determines the request processing status, which includes accepted and rejected status. If the status is rejected, the reason for rejection is returned synchronously. If the status is accepted and the action is completed, the actual measurement result of the device with the action number is returned. The manual shared bed head angle command establishes a manual lease for the shared mechanism, and the manual support and temperature control commands establish a manual lease for the corresponding actuator. During the lease period, automatic actions must not override manual settings.
[0095] S5.2: When the network is disconnected, the end side continues to use the last verified sleep state-mattress parameter linkage rule package and accepts local manual instructions. After reconnection, the rule version, each source sequence, the most recent action number and the actual device snapshot are exchanged, and the reconnection reconciliation is performed with the actual device status as the current physical fact.
[0096] Specifically, local manual settings formed during the network outage and still within a valid manual lease will be retained, and the corresponding manual settings and action results will be uploaded to the cloud; historical snapshots saved in the cloud will not be used to roll back the current mattress test parameters.
[0097] When the cloud-based rule version is higher than the current valid version on the client side and passes the integrity, device model, and version verification, it is written to the backup area and switched atomically; lower version rules do not cover the current client-side version, and both parties only retransmit unconfirmed and not yet expired business events, and actions that have already been executed and obtained action numbers are not retransmitted.
[0098] If parsing errors, continuous target rejections, or abnormal failure rates occur when running new rules after reconnection, the previous valid version will be rolled back. The automatic control conditions will be reconfirmed based on the current measured parameters of the device and the latest real-time status of both the left and right sides. Automatic targets that have expired during the network outage will not be restored.
[0099] S5.3: Generate personalized preference candidates based on the summary of actions on the client side, user manual adjustments, and effect feedback. Verify the candidate source, data quality, identity status, and security status. Once the candidate generation conditions are met, use the personalized preference candidate as input for the candidate rule version, without directly replacing the previous stable preference.
[0100] Specifically, personalized preference candidates are generated from three types of records: those that have been manually set by the user and have not been adjusted in the opposite direction; those that have received clear and effective feedback from the user; and those that have been automatically set and have not been revoked within the effective night and whose subsequent indicators have not deteriorated. Personalized preference candidates will not be updated when there is no effective feedback, insufficient overall signal quality, identity conflict, or security failure.
[0101] Personalized preferences correspond to support for hardness, temperature control, massage, and angle candidate preferences according to user and zone. The candidate values move slowly relative to the previous stable preference and are always limited to the range allowed by the device. The angle candidate preference is only used as a candidate input for the shared reference angle of the next stable session and does not directly cover the current shared reference angle or form the absolute target of the instant shared lifting motor.
[0102] S5.4: During the observation period, candidates for personalized preferences are effectively screened through observation nights, and the candidates are judged to have deteriorated based on sleep efficiency, duration of wakefulness after falling asleep, number of awakenings, and frequency of short-window respiratory abnormality candidate events before and after respiratory control. Based on the observation results, the corresponding treatment is determined in the acceptance treatment and rollback treatment.
[0103] Specifically, it is preferred to collect 3 valid observation nights within 14 calendar days after the candidate is released. Each valid observation night must meet the requirements of comprehensive signal quality, cumulative effective time of the candidate, and identity consistency. The sleep efficiency, wakefulness duration after falling asleep, and number of awakenings of the support hardness, temperature control, and massage candidates are compared with the valid nights of the previous stable version. The effective control window before the action and the effective control window after reaching the target and completing the observation are compared for the angle candidates.
[0104] Candidates are accepted and new stable preferences are formed when at least two out of three valid observation nights do not deteriorate and there is no negative manual feedback, short-term reverse adjustment, actuator failure, or P0 safety event. If the acceptance criteria are not met, the previous stable version is restored. If there are not enough valid observation nights within the observation period, the previous stable version is also restored and insufficient data is recorded.
[0105] When a user selects "uncomfortable," "stop immediately," or "restore original settings," the corresponding candidate is immediately rejected, the previously accepted parameter is restored, and a suppression period is established for similar automatic actions. Even if an angle candidate is observed, it is only used as a candidate input for the shared reference angle in the next stable session.
[0106] Based on the accepted personalized preferences, end-side action summaries, reconnection reconciliation results, and the latest night-level assessment data, generate the next version of the sleep state-mattress parameter linkage rule package. Update the current valid rule version according to the S1 pre-release verification, spare area writing, and atomic switching process; continue to use the previous stable version when candidates fail observation or rule package verification fails.
[0107] For example, in a local control scenario for two people for one night, the cloud sends out a valid rule version before the person falls asleep and the device enables it. When the left side enters light sleep and the frequency of body movement is low, the device generates a target for the left side support stiffness based on the left side baseline preference, light sleep state offset, and body movement correction. The target is then gradually adjusted according to the device's maximum rate of change, rather than being implemented all at once.
[0108] Subsequently, if the frequency of candidate respiratory abnormalities in the short control window on the left reaches the level II condition and the cumulative duration of rhythm abnormalities meets the independent support quantity, a level II angle request is formed after continuous confirmation; when the right side is in deep sleep and the quality is effective, the bilateral shared mechanism decision table adopts conservative constraints, first determining the shared reference angle and then forming a unique shared headboard angle target.
[0109] The shared lifting motor gradually approaches the unique shared headboard angle target in small steps and at a conservative speed. After reaching the current step, it enters the observation phase. After meeting the exit conditions, it first maintains stability and then gradually returns to the shared reference angle. If a level rebound occurs during the return process, the previous effective angle is restored and the observation is repeated.
[0110] When a user on the left manually adjusts the temperature control target through a local direct connection channel, a corresponding manual lease is established on the terminal side. During the lease period, automatic temperature control must not be overwritten. When the manual setting is stably maintained and subsequent feedback meets the candidate generation conditions, the cloud will only use it as a personalized preference candidate and accept or roll it back after effective observation.
[0111] During network outages, the aforementioned bilateral adjudication, quality gating, priority, interlocking, power budgeting, and buffering will continue to be executed according to the current valid rule version on the end side; after reconnection, only unconfirmed and non-expired business events and action summaries will be synchronized, and actions that have already been executed will not be replayed.
[0112] It should be noted that the quality gate threshold, control window, level boundary, angle increment, observation time, soft return step, manual lease period, and candidate observation period can all be adjusted within the scope of device certification and offline verification. The adjusted parameters still need to be written into the versioned rule package and constrained by the device security envelope.
[0113] Computer devices can interact with mattress-side devices, cloud services, and apps via communication interfaces. The processor performs at least one of the following processes: rule generation, version verification, status confirmation, bilateral shared mechanism adjudication, priority and interlock scheduling, network disconnection reconnection reconciliation, and personalized preference observation and rollback.
[0114] The type and number of partitions of the partitionable actuator can be adjusted, and the shared lifting motor can also be replaced with other two-person shared actuators; as long as the partitionable actuators maintain independent control of each partition, and the shared actuators coordinate based on the multi-side real-time status and the shared actuator decision relationship in the rule package, the processing method of the present invention is applicable.
[0115] State-parameter mapping can be generated by rule tables, traditional machine learning, reinforcement learning, or optimization methods. The APP's local direct connection channel can use Wi-Fi, Bluetooth, LAN, or a combination thereof. Regardless of the equivalent implementation used, the rule output must be converted into verifiable targets, thresholds, limits, rates of change, and interlocking constraints, and the valid rule version must be saved on the end side to complete local triggering and security adjudication.
[0116] Specifically, the cloud strategy layer and the terminal real-time layer establish an asynchronous relationship through the sleep state-mattress parameter linkage rule package. Each real-time action on the terminal is based on the current valid rule version and the current actual device test status. The cloud only updates subsequent versions based on action summaries and user feedback, and does not use delayed cloud instructions to overwrite completed local actions.
[0117] Specifically, in a two-person scenario, airbag support, zoned heating, and massage are controlled separately for the left and right zones. The shared lifting motor only receives one headboard angle target after being decided by the decision table of the two-sided shared mechanism; any unilateral request, unilateral preference, or unilateral angle candidate cannot be directly used as the absolute target of the shared lifting motor.
[0118] Specifically, during multi-executor scheduling, priority, manual lease, interlock matrix, power budget, target validity period, and safety pause point are all in effect simultaneously. High-priority actions, manual instructions, and safety faults will not lose their processing priority due to the backlog of automatic targets for comfort. Expired automatic targets will not be made up after the network is restored or the executor releases them.
[0119] This embodiment also provides a computer device applicable to the mattress linkage control method based on sleep state recognition, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the mattress linkage control method based on sleep state recognition as proposed in the above embodiment.
[0120] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0121] This embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the mattress linkage control method based on sleep state recognition as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0122] In summary, this invention achieves stable and secure mattress linkage control that can operate offline, with low conflict, and by asynchronously generating and versioning linkage rule packages in the cloud, generating and versioning linkage rules packages asynchronously in the cloud, and by completing status confirmation, two-person zone collaboration, progressive intervention for respiratory abnormalities, and multi-institution scheduling on the terminal side based on effective rules, combined with dual-channel adjudication and personalized preference iteration in the APP.
[0123] It should be noted that 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 preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A mattress linkage control method based on sleep state recognition, characterized in that, include: Acquire night-level assessment data, personal baseline, authorized profile and recommendation constraints, client-side action summary and user feedback, generate and version-deploy sleep state-mattress parameter linkage rule package, the client-side performs integrity, device model and version verification on the sleep state-mattress parameter linkage rule package, and determines the current valid sleep state-mattress parameter linkage rule package; Based on the current effective sleep state-mattress parameter linkage rule package, the system periodically reads the real-time status of both sides and the measured parameters of the device, performs anti-shaking while in bed and out of bed, quality gating and continuous status confirmation, generates support hardness targets, temperature control targets and massage intensity targets for the left and right zones according to the status-parameter mapping, and determines the breathing abnormality control level and left and right side angle requests based on the frequency of short window breathing abnormality candidate events, cumulative duration of rhythm abnormality and heart rate baseline deviation. Based on the independent isolation relationship between the left and right sides of the partition mechanism and the collaborative relationship between the two sides of the shared lifting motor, the shared reference angle is determined, and the decision table of the two-sided shared mechanism is used to adjudicate the angle requests of the left and right sides, forming a unique shared headboard angle target. The support hardness target, temperature control target, and massage intensity target of the left and right partitions are linked with the unique shared headboard angle target to form a mattress linkage target according to the limit, maximum change rate, and safety envelope. Based on the priority table, manual lease, interlock matrix, power budget, target validity period and safety pause point, the air pump, temperature control, massage and shared lifting motor are locally scheduled. The shared lifting motor is adjusted according to the process of gradual lifting, observation, capping and slow return. The feedback of the actuator is read and the end-side action summary is generated. The system executes conflict resolution between manual commands and automatic linkages, performs offline operation and reconnection reconciliation through the APP local direct connection channel and cloud channel. It generates personalized preference candidates based on the terminal action summary, user manual adjustment and effect feedback, observes the personalized preference candidates, and determines the corresponding processing in the acceptance processing and rollback processing based on the observation results, and updates the sleep state - mattress parameter linkage rule package for the next version.
2. The mattress linkage control method based on sleep state recognition as described in claim 1, characterized in that, The rule package for determining the current effective sleep state—mattress parameter linkage includes: The cloud reads night-level assessment data, personal baselines, authorized profiles and recommendation constraints, terminal action summaries and user feedback, and generates state-parameter mappings, thresholds and continuous confirmation parameters, priorities and interlocking rules, bilateral shared institutional decision tables, as well as amplitude limits, maximum rate of change and safety envelopes according to users and regions. The version number, effective time, status-parameter mapping, threshold and continuous confirmation parameters, priority and interlocking rules, bilateral shared mechanism decision table, amplitude limit, maximum change rate and safety envelope and integrity verification information are encapsulated into a sleep status-mattress parameter linkage rule package, and pre-release verification is performed according to the device model and actuator capabilities. The device verifies the integrity, device model, and version of the sleep status-mattress parameter linkage rule package. If the verification passes, the rule is written to the spare area and switched atomically. If the verification fails, the previous valid version is used. If any of the following occurs in the new rule: parsing error, continuous target rejection, or abnormal failure rate, the previous valid version is rolled back.
3. The mattress linkage control method based on sleep state recognition as described in claim 1, characterized in that, The process of performing bed-and-out anti-shake, quality gating, and continuous status confirmation, and generating support firmness targets, temperature control targets, and massage intensity targets for the left and right zones according to the status-parameter mapping, includes: The system reads the bed status and confidence level of the left and right sides, the real-time sleep status and confidence level, the frequency of body movements, the overall signal quality, and the actual measured parameters of the corresponding zones. It continuously confirms the short-term status changes during the transition between bed and bed leaving, and determines the corresponding status based on the overall signal quality among three processing states: normal linkage, maintaining the current comfort parameters, and canceling the comfort goals that have not yet been implemented. After confirming that the person is in bed and that the real-time sleep status meets the continuous confirmation conditions, the system uses the status-parameter mapping in the current effective sleep status-mattress parameter linkage rule package to form support firmness targets, temperature control targets, and massage intensity targets by combining the user's and zone's baseline preferences, the current sleep status's corresponding status offset, and body movement correction. The system also limits the changes in these targets according to the device's allowable range, dead zone, and maximum rate of change. Airbag support, zoned heating, and massage are used as zoned mechanisms. The left zone generates a target based solely on the real-time state and preferences of the left side, and the right zone generates a target based solely on the real-time state and preferences of the right side. The current comfort parameters are maintained in any situation where the real-time sleep state is unknown, the overall signal quality is insufficient, or the sleep state does not allow for the generation of new comfort movements.
4. The mattress linkage control method based on sleep state recognition as described in claim 1, characterized in that, The request to determine the level of respiratory abnormality control and the left and right lateral angles includes: A sliding control window is used to filter and confirm the effective time when the user is in bed and the overall signal quality meets the requirements. The candidate respiratory abnormality events within the effective time are deduplicated according to the event identifier and time overlap. The frequency of short-window respiratory abnormality candidate events is determined based on the number of deduplicated candidate events and the effective time. When it is confirmed that the user is in bed, the frequency of short-window respiratory abnormality candidate events is valid, and the user is not awake or in a state of gross physical activity, a level judgment is performed. The proportion of the cumulative duration of rhythm abnormalities to the effective window duration and the deviation of the median heart rate within the window from the historical baseline of the same user and the same sleep state are used as independent support quantities. A higher control level must satisfy at least one independent support quantity, and the corresponding control level is confirmed in level I, level II and level III through continuous judgment points. When there is a lack of independent support quantities, the highest control level is limited. The left and right angle requests are generated in progressively increasing order according to Level I, Level II and Level III. The left and right angle requests are then recorded in correspondence with the corresponding breathing abnormality control level, request increment and effective status for decision-making by the bilateral shared mechanism. The breathing abnormality control level is only used for mattress motion control.
5. The mattress linkage control method based on sleep state recognition as described in claim 1, characterized in that, The goals for forming a mattress linkage include: When there is no automatic angle action, the shared reference angle is determined according to the common confirmed value of all users currently in bed, the effective candidate preference of single users in bed, the conservative value of the candidate preferences on both sides when two people are in bed, and the equipment certification safety benchmark, and the shared reference angle is kept unchanged during this automatic action, observation and recovery. The system reads the angle requests from the left and right sides, as well as the bed status, real-time sleep status, overall signal quality, body movement status, and manual lease on the other side. It uses the dual-side shared mechanism decision table to determine the allowable increment and speed limit for the two-person scenario, ensuring that the increment of the shared bed head angle does not exceed the upper limit of the left and right side requests, the upper limit of the dual-side shared mechanism decision table, the upper limit of the automatic increment, and the remaining absolute angle space of the device. It also combines the absolute angle range of the device to form a unique shared bed head angle target. When one side confirms the patient's departure from the bed, only the active adjustment of the corresponding side's partition mechanism is turned off, while the other side continues to operate. When both sides confirm the patient's departure from the bed, the shared lifting motor returns to the departure reference. If any of the following situations occur on either side: awake, large movement, insufficient quality, valid manual lease, or shared lifting motor failure, the corresponding action is determined according to the decision table of the shared mechanism on both sides: freeze new lifting, delay, conservative limit, cancellation, and stop processing. The support hardness, temperature control, and massage intensity targets for the left and right zones are respectively mapped to the air pump, temperature control module, massage mechanism, and shared lifting motor, along with the unique shared headboard angle target. Based on the equipment's allowable range, dead zone, maximum rate of change, shared reference angle, and safety envelope verification targets, targets that violate the independent isolation of the left and right zones, manual rental agreement, and safety envelope are eliminated, thus forming a mattress linkage target.
6. The mattress linkage control method based on sleep state recognition as described in claim 1, characterized in that, The generated end-side action summary includes: Priorities are set according to the following order: safety and fault actions, user local manual commands, breathing abnormality shared lifting motor adjustment, air pump support form adjustment, temperature control heating and cooling actions, and automatic massage. For actions of the same priority, the order is determined by the serial number received at the end side. When a higher priority action preempts a lower priority action, the preemption will take place after the actuator reaches the safety pause point. Safety and fault stops are not subject to the waiting conditions. The interlock matrix determines the relationships between actuators, including that they must not change simultaneously, are allowed to maintain their current output but not change their target, are allowed to run in parallel when the power budget is met, and are allowed to merge similar actions in series. When parallelism is allowed, the power consumption of the running mechanism is checked to ensure that it does not exceed the available power budget. Multiple automatic targets to be executed by the same actuator are merged into the latest valid target, and automatic targets that have exceeded their validity period are recalculated according to the latest real-time status of the left and right sides. For the single shared bedside angle target formed by the decision-making table of the two-sided shared institutions, the angle is gradually raised in small steps according to the corresponding respiratory abnormality control level. After reaching the current level, it is observed. If there is no improvement, the angle is gradually increased within the safety envelope and does not exceed the automatic increment limit. When either the improvement condition or the exit condition is met, the shared reference angle is gradually returned. When the entry condition is met again during the return process, the previous effective angle is restored and the observation is repeated. Output the target value, limit value, maximum rate of change and action number to the corresponding actuator, and output the corresponding instruction in the cancellation instruction and hold instruction according to the current scheduling status. Read the accepted status, rejected status, actual equipment parameters, in-position status, fault status and safe pause point, and summarize the actuator feedback, the real-time status of both left and right sides and the current rule version to generate the end-side action summary.
7. The mattress linkage control method based on sleep state recognition as described in claim 1, characterized in that, The process of determining the corresponding step includes: Personalized preference candidates are generated from records that are maintained after manual settings by the user and have not been adjusted in the opposite direction, where the user explicitly provides positive feedback from either the comfort mark or the effective mark, and where automatic settings are not revoked within the effective night and subsequent indicators do not deteriorate. In the event of any of the following situations: insufficient overall signal quality, identity conflict, or security failure, the personalized preference candidates are not updated. Instead, the personalized preference candidates are observed as candidate rule versions and are not directly replaced by the stable version. Based on the quality of the effective observation nights during the observation period, the candidate's effective time, sleep efficiency, duration of wakefulness after falling asleep, number of awakenings, and frequency of short-window respiratory abnormality candidate events before and after respiratory control, it is determined whether the candidate has deteriorated. If the acceptance conditions are met, a new stable preference is formed; otherwise, the previous stable version is restored. The personal candidate preference corresponding to the shared bedside angle is only used as the candidate input for the shared baseline of the next stable session.
8. The mattress linkage control method based on sleep state recognition as described in claim 1, characterized in that, The process of resolving conflicts between manual commands and automated actions, handling network outages, and reconnecting for reconciliation via the APP's local direct connection channel and cloud channel includes: The local direct connection channel carries user manual adjustments, while the cloud channel carries asynchronous publishing of sleep status-mattress parameter linkage rule packages, mattress status summary and sleep process reporting, preference iteration, and report display. Business requests carry request identifiers, device identifiers, executor identifiers, left and right partitions, target values, source channels, source users, monotonically increasing source sequences, rule versions, generation times, validity periods, and idempotent keys. The source sequence, validity period, and idempotent keys are used to handle duplicate, out-of-order, and expired instructions. Target conflicts within the same executor are handled in the order of security failures, local manual adjustments within a valid lease, cloud-forwarded manual adjustments, automatic actions of edge rules, and cloud-planned tasks. When the network is down, the end side continues to use the last verified rule version and accept local manual instructions; after reconnection, the rule version, the sequence of each source, the most recent action number and the actual measurement snapshot of the device are exchanged. The actual measurement status of the device is used as the current physical fact. The local settings that are still under the manual lease are retained. Only unconfirmed and non-expired business events are retransmitted. Executed actions are not replayed. After the higher rule version in the cloud is verified, it is written to the backup area and switched atomically.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the mattress linkage control method based on sleep state recognition as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the mattress linkage control method based on sleep state recognition as described in any one of claims 1 to 8.
