A control method and device of a mattress and the mattress
By mapping logical partitions to the physical location partitions of the mattress, the insertion and control of external devices are automatically determined, solving the problem of manual configuration dependence in smart bedding products and realizing accurate matching and efficient control of external devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANYANG XIANGYU MEDICAL EQUIP
- Filing Date
- 2026-05-22
- Publication Date
- 2026-07-28
AI Technical Summary
In existing technologies, the installation and control of external devices in smart bedding products rely heavily on manual configuration, which can easily lead to control overruns due to identification errors or inaccurate parameter input, resulting in low accuracy and low matching efficiency.
By mapping logical partitions to the physical location partitions of the mattress, the insertion of external devices is automatically determined, and the external devices are mapped and controlled, reducing manual configuration and debugging costs.
It enables automatic matching of external devices with mattress zones, avoiding incorrect positioning, improving user experience, and enhancing control accuracy and efficiency.
Smart Images

Figure CN122469711A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart homes, and in particular to a method, device, and mattress control system. Background Technology
[0002] Smart bedding products often contain multiple external devices, including mattresses, bed frames, lighting, massage functions, pneumatic controls, and sensors. These external devices may originate from different supply chains, product generations, or version systems, resulting in significant differences in hardware interfaces, control capabilities, partitioning methods, feedback capabilities, and security boundaries. Actual installation frequently involves module replacement, version upgrades, hot-swapping, combination changes, and even functional reduction. Related technologies are often manually configured by engineers during installation or after-sales service, selecting module models, entering control parameters, and specifying partition correspondences. However, manual configuration relies heavily on personnel experience and is prone to errors in identification or inaccurate parameter entry, leading to control overreach, low accuracy, and low matching efficiency. Summary of the Invention
[0003] The purpose of this invention is to provide a mattress control method, device, and mattress that automatically determines the insertion of external devices and automatically maps and controls them, reducing manual configuration and debugging costs. By mapping logical partitions to the physical location partitions of the mattress, different external devices are automatically matched with the current mattress partition, thereby avoiding positional errors and improving the user experience during subsequent control.
[0004] To solve the above-mentioned technical problems, the present invention provides a mattress control method, comprising:
[0005] Determine whether an external device is inserted into the mattress, wherein the external device includes at least one of a lighting device, a massage device, a pneumatic control device, and a sensing module;
[0006] When the external device is inserted, the standard control range and control position partition of the external device are determined;
[0007] Determine the mapping relationship between the control location zones of external devices and the physical location zones of the mattress;
[0008] Based on the standard control range of the external device and the mapping relationship, determine the standard control range of each physical location zone of the mattress;
[0009] Upon receiving a control request for the mattress, and if the control request meets the standard control range of the physical location partition, a control command is sent to the external device according to the mapping relationship and the control request.
[0010] On the other hand, determining whether an external device is plugged into the mattress includes:
[0011] The system determines whether an external device is plugged into the mattress based on the address of the newly added external device on the communication bus connecting the mattress control device and the external device, or the change in current on the power supply bus that powers the external device.
[0012] When it is determined that an external device is inserted, a handshake command is sent to the external device, and a handshake response is received from the external device.
[0013] The handshake response is used to confirm whether the external device is a legitimate insertion device.
[0014] When the external device is a legally inserted device, proceed to the step of determining the standard control range and control position partition of the external device.
[0015] On the other hand, when the external device is inserted, the standard control range and control position partitions of the external device are determined, including:
[0016] Send a query request to the external device and determine the standard control range and control location partition returned by the external device based on the query request;
[0017] When the external device is unable to return to the standard control range and the control position partition, a test command is sent to the external device, and the operation performed by the external device based on the test command is determined;
[0018] Based on the aforementioned operation, the standard control range and control location partitions of the external device are determined.
[0019] On the other hand, determining the mapping relationship between the control position zones of the external device and the physical position zones of the mattress includes:
[0020] Obtain the number of control location partitions sent by the external device, the name of each control location partition, and the installation orientation of the external device;
[0021] According to the installation orientation, the names of each control position partition are oriented and corrected. The corrected names of each control position partition are then converted into a unified form of control position partition identifier. The unified form includes a combination of left and right directions with head, middle and tail, or a control position partition number.
[0022] The mapping relationship is obtained by mapping the control position partition identifier to the physical position partition of the mattress.
[0023] On the other hand, the mapping relationship is obtained by mapping the control position partition identifiers one-to-one with the physical position partitions of the mattress, including:
[0024] When a single logical partition of the external device covers multiple physical location partitions of the mattress, the single logical partition is mapped to each of the multiple physical location partitions and saved in the mapping relationship;
[0025] When multiple logical partitions of the external device work together on the same physical location partition of the mattress, the multiple logical partitions are respectively mapped to the same physical location partition and saved in the mapping relationship.
[0026] On the other hand, based on the standard control range of the external device and the mapping relationship, the standard control range of each physical location zone of the mattress is determined, including:
[0027] Based on the mapping relationship, determine the control location partitions of all external devices corresponding to each physical location partition;
[0028] Determine the standard control range of the external devices corresponding to each of the control location partitions;
[0029] When a physical location partition corresponds to multiple logical partitions, the minimum value of the upper limit of the parameter in the standard control range of the external device in the corresponding multiple logical partitions is taken as the upper limit of the standard control range of the physical location partition, and the maximum value of the lower limit of the parameter in each standard control range is taken as the lower limit of the standard control range of the physical location partition.
[0030] When a physical location partition corresponds to a logical partition, the range consisting of the upper limit and lower limit of the parameters in the standard control range of the external device in the corresponding logical partition is taken as the standard control range of the physical location partition.
[0031] The upper limit, lower limit, default parameters, and parameter change slope limit for each physical location partition are determined as the standard control range for the physical location partition.
[0032] On the other hand, when a control request for the mattress is received and the control request meets the standard control range of the physical location zone, it includes:
[0033] Verify whether the control parameters corresponding to the control command exceed the upper or lower limit of the standard control range, whether each physical location partition has established a mapping relationship with the control location partition of the external device, whether there is a mutual exclusion relationship between the actions of different external devices, whether the feedback parameters required to execute the control command can be obtained normally, and whether the standard control range of the external device is complete.
[0034] If the verification passes, proceed to the step of sending control commands to the external device according to the standard control range;
[0035] If the verification fails, a degraded control range is generated, and a control command is issued to the external device according to the degraded control range. The degraded control range indicates that the maximum range of motion of the external device is limited, the speed of change is limited, and high-risk linkage actions are marked as prohibited.
[0036] On the other hand, upon receiving a control request for the mattress and the control request meeting the standard control range of the physical location partition, after sending a control command to the external device according to the mapping relationship and the control request, the process further includes:
[0037] Determine whether the communication status, feedback status, or standard control range of the plugged-in external device has changed;
[0038] When it is determined that the communication status of the external device is abnormal, the feedback signal is missing, or the standard control range is inconsistent with the actual behavior, the device enters the degraded operation mode and adjusts the standard control range to the degraded control range.
[0039] When an external device is detected to be reconnected, its firmware version is changed, or its installation orientation is changed, the process returns to the step of determining the standard control range and control location partition of the external device, and updates the standard control range of each physical location partition.
[0040] To address the aforementioned technical problems, the present invention also provides a mattress control device, comprising:
[0041] Memory, used to store computer programs;
[0042] A processor is used to implement the steps of the above-described mattress control method when executing the computer program.
[0043] To solve the above-mentioned technical problems, the present invention also provides a mattress, including the above-mentioned mattress control device, and further including a mattress body and an external device connected to the mattress body. The external device includes at least one of a lighting device, a massage device, a pneumatic control device, and a sensing module.
[0044] This application provides a mattress control method, device, and mattress, relating to the field of smart home. The method includes determining the mapping relationship between the control position zones of the external device and the physical position zones of the mattress when an external device is inserted; determining the standard control range of each physical position zone of the mattress based on the standard control range of the external device and the mapping relationship; and sending a control command to the external device based on the mapping relationship and the control request when a control request for the mattress that meets the standard control range of the physical position zone is received. This automatically determines the insertion of the external device and automatically maps and controls it, reducing manual configuration and debugging costs. By mapping logical zones to the physical position zones of the mattress, different external devices are automatically matched with the current mattress zones, thereby avoiding position errors during subsequent control and improving the user experience. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments will be briefly introduced below. 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.
[0046] Figure 1 A flowchart of a mattress control method provided by the present invention;
[0047] Figure 2 This is a schematic diagram of the structure of a mattress control device provided by the present invention. Detailed Implementation
[0048] The core of this invention is to provide a mattress control method, device, and mattress that automatically determines the insertion of external devices and automatically maps and controls them, reducing manual configuration and debugging costs. By mapping logical partitions to the physical location partitions of the mattress, different external devices are automatically matched with the current mattress partition, thereby avoiding positional errors during subsequent control and improving the user experience.
[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] Figure 1 A flowchart of a mattress control method provided by the present invention is provided, the mattress control method comprising:
[0051] S11: Determine whether an external device is plugged into the mattress. The external device includes at least one of the following: lighting equipment, massage equipment, pneumatic control equipment, and sensing module.
[0052] It detects new module access, module disconnection, module hot-swapping, or module version changes. It can trigger the capability identification process through methods such as bus enumeration, power supply identification, handshake commands, periodic heartbeats, device address scanning, or version comparison. It can promptly detect changes in module status, rather than relying on manual reconfiguration.
[0053] Specifically, the mattress's main control system continuously scans for new device addresses via the system bus and monitors current changes on the ports supplying power to external devices. For example, if a user inserts a pneumatic massage module into the mattress's dedicated interface, the main control system detects a new device address on the bus, and simultaneously the current at the power supply port increases, indicating a new external device has been inserted. To confirm whether the device is a legitimate module, the main control system sends a handshake command to that address and receives a returned handshake response. The handshake response contains the device type identifier (pneumatic massage module) and compatibility version number. After comparing it with a preset whitelist, the main control system confirms it is a legitimate device and proceeds to the next parameter determination step. Simultaneously, the main control system also detects that the status of another already connected zone lighting module has not changed, maintaining the original mapping relationship. The main control system is the processor.
[0054] S12: When inserting an external device, determine the standard control range and control position partition of the external device;
[0055] It can read or detect the module type, action category, number of partitions, upper and lower control limits, supported feedback parameters, communication protocol version, and fault feedback type of external devices. For modules with a standard capability description table, the capability table can be read directly; for modules with incomplete capability descriptions, their capability boundaries can be inferred by sending test commands, reading default states, observing feedback behavior, or combining rule base matching.
[0056] For lighting equipment, the standard control range includes brightness 0%-100%, color temperature 2700K-6500K, and gradient time 0ms-5000ms. For simple lights that only support switching, the range can be simplified to two states: on and off. The control position is divided into independently controllable light areas. For example, the overall control corresponds to 1 zone, the left and right bedside light zones correspond to 2 zones, and the head and tail zones correspond to 2 zones.
[0057] For massage devices, standard control ranges include vibration / tapping intensity of 0-100% or 0-5 levels, vibration frequency of 20Hz-100Hz or 1-3 levels, and massage time of 0-60 minutes; control position zones are independently controllable massage areas. For example, a whole back massage corresponds to 1 zone, an upper / lower back massage corresponds to 2 zones, and a neck, shoulder, waist, and leg massage corresponds to 4 zones.
[0058] For pneumatically controlled devices, a query request is sent to the pneumatic massage module. Supported motion types include airbag inflation / deflation and vibration massage. The standard control range is an upper limit of 60 kPa and a lower limit of 0 kPa for airbag pressure in each zone, a vibration frequency range of 20 Hz to 80 Hz, and six control position zones: left shoulder, right shoulder, left waist, right waist, left leg, and right leg. Since the module returns complete parameters, the main control system directly stores these parameters. For devices that cannot return complete parameters, such as lighting modules that only support basic on / off states, the main control system can infer their capability boundaries by sending test commands, such as turning on the left light and observing the current change.
[0059] For the sensing module, the standard control range depends on the measurement range of the sensor itself, and the control position partition is a position partition that can provide independent sensing data.
[0060] S13: Determine the mapping relationship between the control position zones of the external device and the physical position zones of the mattress;
[0061] Identify the structural relationships and partition correspondences between modules to form a unified partition topology map. For example, it can identify the mapping relationship between the left and right partitions of the mattress and the left and right lifting mechanisms of the bed frame, as well as the correspondence between the lighting area and the bedside area.
[0062] The system receives the six logical partition names and the installation orientation of the pneumatic massage module. The head direction marked on the pneumatic massage module is consistent with the head direction of the mattress, without inversion. The partition names are corrected according to the installation orientation; since the orientation is consistent, the original names are retained. Subsequently, the system converts the corrected partition names into a unified format of control position partition identifiers: left head zone, right head zone, left middle zone, right middle zone, left tail zone, right tail zone, or uniformly represented as head zone, middle zone, and tail zone. Simultaneously, the mattress itself predefines physical position partitions, also using a unified left / right-head / middle / tail coordinate system. The main control system establishes a one-to-one mapping between the converted control position partition identifiers and the mattress's physical position partitions; for example, the left-head logical partition corresponds to the left shoulder zone physical partition of the mattress.
[0063] S14: Determine the standard control range of each physical location zone of the mattress based on the standard control range and mapping relationship of the external device;
[0064] Based on the capability identification results and topology resolution results, a parameter mapping table that can be called by the upper layer is automatically generated. This mapping table includes at least the action limit, default parameters, partition control boundaries, linkage relationships, mutual exclusion relationships, and security degradation boundaries.
[0065] Based on the mapping relationship, the main control system determines the control position zones of all external devices corresponding to each physical position zone of the mattress. Taking the left shoulder zone of the mattress as an example, it only corresponds to the left shoulder logical zone of the pneumatic massage module. Therefore, the system directly uses the standard control range of this logical zone, i.e., pressure 0-60kPa and frequency 20-80Hz, as the standard control range for the left shoulder zone of the mattress, and records the default parameters of pressure 30kPa, frequency 50Hz, and the parameter change slope limit, with pressure change not exceeding 10kPa / second. For the lumbar region of the mattress, it may simultaneously correspond to the left and right lumbar logical zones of the pneumatic massage module. The system obtains the upper limit of pressure (60kPa) and the lower limit of pressure (0kPa) for these two logical zones respectively, and takes the minimum upper limit of 60kPa and the maximum lower limit of 0kPa as the standard control range for this physical zone, i.e., pressure 0-60kPa. Finally, the main control system generates a standard control range for each physical position zone of the mattress, including the upper limit, lower limit, default parameters, and slope limit.
[0066] S15: Upon receiving a control request for the mattress and the control request meets the standard control range of the physical location zoning, send a control command to the external device according to the mapping relationship and the control request.
[0067] This module verifies the mapping results for out-of-bounds errors, conflicts, missing items, or inconsistencies, and arbitrates when multiple modules share resources or interact with each other. Its main purpose is to screen for potential risks and logical conflicts before officially issuing the mapping results, preventing upper layers from directly facing unstable, incomplete, or insecure configuration results at runtime. When capability information is incomplete, module feedback is missing, communication is abnormal, or the confidence level of the identification results is insufficient, it outputs conservative control mappings or disables some high-risk functions. This module ensures that the system only executes certain and safe control actions even under conditions of incomplete uncertainty.
[0068] The user selects a lumbar massage, specifically inflating the airbags in the lumbar region to 50 kPa and setting the vibration frequency to 60 Hz for the pneumatic massage module. Upon receiving the control command, the system queries the stored standard control ranges to confirm that the target pressure of 50 kPa falls within the 0-60 kPa range and the frequency of 60 Hz falls within the 20-80 Hz range. After successful verification, the request is converted into control commands for the pneumatic massage module: a command to inflate to 50 kPa is sent to the left lumbar airbag channel, and the same command is sent to the right lumbar airbag channel, while simultaneously sending a 60 Hz drive signal to the vibration motor. After the commands are issued, the pneumatic massage module executes the corresponding actions, and the lumbar region of the mattress provides the expected massage.
[0069] This application provides a mattress control method, relating to the field of smart homes. The method includes, when an external device is inserted, determining the mapping relationship between the control position zones of the external device and the physical position zones of the mattress; determining the standard control range of each physical position zone of the mattress based on the standard control range of the external device and the mapping relationship; and, upon receiving a control request for the mattress that meets the standard control range of the physical position zone, sending a control command to the external device according to the mapping relationship and the control request. This automatically determines the insertion of the external device and automatically maps and controls it, reducing manual configuration and debugging costs. Through the mapping between logical zones and the physical position zones of the mattress, different external devices are automatically matched with the current mattress zone, thereby avoiding position errors during subsequent control and improving the user experience.
[0070] Based on the above embodiments:
[0071] In some embodiments, determining whether an external device is plugged into the mattress includes:
[0072] The system determines whether an external device is plugged into the mattress based on the address of the newly added external device on the communication bus connecting the mattress control device and the external device, or on the current change on the power supply bus that powers the external device.
[0073] When it is confirmed that an external device has been inserted, a handshake command is sent to the external device, and a handshake response is received from the external device.
[0074] The handshake response confirms whether the external device is a legitimate device.
[0075] When the external device is a validly inserted device, proceed to the steps of determining the standard control range and control location partition of the external device.
[0076] When an access module connects to the main control bus or control network, the module access detection module first determines whether the module is accessing for the first time, accessing after a power-on reset, hot-plugging, or accessing due to a version change. Detection methods may include, but are not limited to, bus enumeration, device ID reading, power handshake, timed heartbeat comparison, and address scanning.
[0077] Upon detecting module access, the master controller initiates a capability negotiation request to the module, reading or probing the following information: module type, module model, hardware version, firmware version, supported action categories, number of partitions, action parameter range, maximum power or current, feedback parameter type, fault reporting code, communication cycle, timestamp capabilities, etc. For modules with a standard capability description table, the capability table can be read directly; for modules with incomplete capability descriptions, capabilities can be inferred by sending test commands and observing feedback behavior.
[0078] For example, for the bed frame module, the system can identify whether it supports headrest lifting, legrest lifting, independent left and right lifting, angle feedback, and limit feedback; for the lighting module, it can identify whether it supports brightness adjustment, color temperature adjustment, zoned lighting, and gradient control; for the mattress module, it can identify whether it supports zoning, heating zones, or sensor zones. Through this process, the system no longer simply knows that an external device has been connected, but further understands what capabilities the external device possesses, where the boundaries of these capabilities lie, which capabilities have been confirmed, and which capabilities are still uncertain.
[0079] In some embodiments, when an external device is inserted, determining the standard control range and control location partitions of the external device includes:
[0080] Send a query request to the external device and determine the standard control range and control location partition of the external device based on the query request;
[0081] When the external device cannot return to the standard control range and control position partition, a test command is sent to the external device, and the operation performed by the external device based on the test command is determined.
[0082] Based on the operation, determine the standard control range and control location partitions of the external devices.
[0083] A lighting module can be connected. The lighting module only supports turning the light on and off and adjusting the brightness, but it does not have the function of actively reporting the capability description table. That is, the main control system cannot obtain its device parameters through conventional queries.
[0084] The main control system sent a query request to the standard address of the lighting module, requesting information including the action type, standard control range, and number of control position zones. Due to its low firmware version, the lighting module could not recognize the query request and returned no valid parameters. After a timeout, the main control system determined that the external device could not respond.
[0085] The main control system initiates a parameter probing process, sequentially sending a series of test commands and observing the module's response behavior under each command. The test commands can be:
[0086] Sending a light-on command: Observe the current at the power supply port rise from 0A to 0.1A, while the ambient light sensor detects a brightness of approximately 30 lux. The system records that the command was successfully executed and infers that the module supports switch control.
[0087] Sending a command to turn off the lights: The current drops back to 0A, and the brightness returns to zero. Confirm that the switch function is effective.
[0088] Sending a command to adjust brightness to 50%: The current increases to 0.15A, and the brightness increases to approximately 50 lux. The system's detection module supports proportional adjustment.
[0089] Sending a command to adjust brightness to 100%: The current increases to 0.2A, and the brightness increases to approximately 100 lux. The system records the current and illuminance values corresponding to the maximum brightness.
[0090] Sending a command to adjust brightness to 120%: The module either does not respond or responds to the same value as 100%. The system infers that the maximum adjustment limit is 100%.
[0091] A zone control command is sent, such as to light only the left light. However, this module lacks zone control capabilities, and the brightness does not change locally after the command is sent. Therefore, the system determines that the number of zones for the controlled position is 1.
[0092] Based on the observed operational results, the standard control range of the lighting module is inferred and determined:
[0093] Action types: turn lights on, turn lights off, adjust brightness;
[0094] Standard control range: brightness lower limit is 0%, upper limit is 100%, default brightness is 50%, and the change slope can be estimated based on the command interval time to complete the full adjustment within approximately 100 milliseconds;
[0095] Number of control location partitions: 1.
[0096] The parameters obtained from the above inference are stored as the standard control range of this module for subsequent partition mapping and control range generation.
[0097] In some embodiments,
[0098] Determine the mapping relationship between the control position zones of the external device and the physical position zones of the mattress, including:
[0099] Obtain the number of control location partitions sent by the external device, the name of each control location partition, and the installation orientation of the external device;
[0100] The names of each control position zone are corrected according to the installation orientation. The corrected names of each control position zone are then converted into a unified form of control position zone identifier. The unified form includes a combination of left and right directions with head, middle and tail, or control position zone number.
[0101] The identification of the control position zone is mapped one-to-one with the physical position zone of the mattress to obtain the mapping relationship.
[0102] Partition topology analysis not only identifies how many partitions a module has, but also further identifies the actual location of each partition in the device, what part each partition controls, which partitions can be controlled individually, which partitions need to operate together, and the correspondence between the partitions of this module and the partitions of other modules.
[0103] Specifically, the system can identify partition relationships based on one or more of the following information: the number and names of partitions actively reported by the module, module installation direction information, physical interface or port location, left / right / front / back markings, historical access records, pre-stored structure templates in the module model library, and partition correspondence determined by test actions and feedback results.
[0104] In a preferred embodiment, the system first establishes a unified system partition representation, and then converts the physical partitions of different modules to this unified representation. The unified representation can take the form of left / right, head / middle / tail, or zone number. For example, it can be uniformly represented as left head zone, right head zone, left middle zone, right middle zone, left tail zone, and right tail zone, or uniformly represented as head zone, middle zone, and tail zone. The upper-level control logic preferably calls according to this unified partition representation, rather than directly using the originally inconsistent partition names of each module.
[0105] When different modules are partitioned in different ways, the system establishes a corresponding relationship based on the actual controllable relationship.
[0106] For example, a mattress module might have six zones: left shoulder, right shoulder, left waist, right waist, left hip, and right hip, while a bed frame module only supports two movements: head lifting and leg lifting. In this case, the system can map the left and right shoulders in the mattress module to the head-related zones, and the left and right hips to the leg-related zones. Then, it can establish a correspondence between the head lifting movement and the head-related zones, and between the leg lifting movement and the leg-related zones.
[0107] In other words, the system only establishes actual control correspondences: although the bed frame can interact with the head and leg areas of the mattress, it does not mean that the bed frame can move independently to the left shoulder, right shoulder, left waist, right waist, etc., like the mattress. This avoids the upper-level logic interpreting the lower-level modules in too much detail, resulting in issuing control commands that cannot actually be executed.
[0108] For example, if a certain lighting module only supports two zones, the left and right lighting zones, while another type of lighting module only supports overall on / off control and does not support separate control of the left and right sides, then after the system identifies the module, the former module can establish separate correspondences between the left and right areas, while the latter module will only establish a correspondence between the overall lighting areas and will not incorrectly generate independent control capability for the left and right sides in the system.
[0109] Through the above method, the present invention can establish a unified, clear partition correspondence that is consistent with the actual hardware capabilities, even when different modules have different numbers of partitions, different naming methods, different installation directions, and different control ranges, thus providing a foundation for subsequent security parameter mapping.
[0110] After completing capability identification and topology analysis, the system generates a security parameter mapping table for each type of callable action based on the identification results and topology relationships. This mapping table includes at least the action name, applicable module, logical partition, physical channel, upper parameter limit, lower parameter limit, default parameters, change slope limit, mutual exclusion relationships, linkage relationships, and degradation boundaries. Essentially, it is not a simple replication of the module's original capabilities, but rather a unification of the module's actual supported capabilities with the platform's allowed security boundaries.
[0111] For example, for bed frame lifting actions, the mapping table can include parameters such as maximum lifting angle, default lifting speed, rate of change limit, whether linkage to zero is allowed, and whether simultaneous execution with massage actions is allowed; for lighting actions, the mapping table can include parameters such as maximum brightness, default brightness, nighttime brightness limit, gradient duration, and whether zone synchronization is supported; for mattress support actions, the mapping table can include maximum level, adjustable zone range, default support strength, and safe retraction boundaries when linked with other modules.
[0112] In a preferred embodiment, the mapping table generation also incorporates a rule base for security corrections. For example, although a lighting module reports support for high brightness output, if the current scene is a nighttime care mode, the system can proactively reduce the brightness limit in the mapping table. Similarly, a bed frame module may have high speed capabilities, but for comfort and safety, the system can set the default speed to a more conservative level. The resulting mapping table reflects both the module's true capabilities and the unified security boundaries at the platform level.
[0113] In some embodiments, a mapping relationship is obtained by mapping control position partition identifiers one-to-one with the physical position partitions of the mattress, including:
[0114] When a single logical partition of an external device covers multiple physical location partitions of the mattress, the single logical partition is mapped to each of the multiple physical location partitions and saved in the mapping relationship;
[0115] When multiple logical partitions of an external device work together on the same physical location partition of the mattress, the multiple logical partitions are mapped to the same physical location partition and saved in the mapping relationship.
[0116] Taking a scenario where the bed frame module, mattress module, and lighting module are all connected to the system simultaneously as an example, this paper provides a detailed explanation of the process of establishing the correspondence between partitions and the process of generating control parameters.
[0117] Assume that the bed frame module A connected to the system has two actions: head lifting and leg lifting; the mattress module B has six zones: left shoulder zone, right shoulder zone, left waist zone, right waist zone, left hip zone, and right hip zone; and the lighting module C has two lighting areas: the left bedside light area and the right bedside light area.
[0118] After the system completes module identification, it first organizes the partitions and action positions of each module.
[0119] In this embodiment, the left and right shoulder areas in mattress module B can be corresponding to the head-related areas, the left and right waist areas can be corresponding to the middle-related areas, and the left and right hip areas can be corresponding to the lower-related areas.
[0120] The head lifting action in bed frame module A is mapped to the head-related area, and the leg lifting action is mapped to the lower-related area;
[0121] In lighting module C, map the left bedside light area to the left care area and the right bedside light area to the right care area.
[0122] In this way, although the upper-level system faces a unified area name, the lower-level system still retains the actual execution method of each module.
[0123] After establishing the above correspondence, the system further generates control parameters.
[0124] For the head lifting action, the system maps it to the head execution channel of bed frame module A and provides the maximum and minimum angles, default speed and action variation limits that are allowed for this action.
[0125] For the leg lifting action, the system maps it to the leg execution channel of bed frame module A and provides the maximum angle, default speed, and restrictions on not being able to be executed simultaneously with other actions;
[0126] For the action of enhancing head support, the system corresponds to the left and right shoulder channels of mattress module B, and provides the range of support levels, the default level, and the adjustment limits.
[0127] For the action of gradually brightening the left-side care light, the system maps it to the left-side light area of the light module C and provides the brightness range, default brightness, and the time range required for gradual brightening.
[0128] Furthermore, if the system is currently in nighttime care mode, although the light module C itself supports high brightness output, the system can also actively limit the maximum brightness to a lower range, for example, only allowing low brightness output, in order to avoid disturbing the user at night.
[0129] If the system can only confirm that the lighting module C supports turning the lights on and off, but cannot reliably confirm whether it supports brightness adjustment, then the system will only retain the on / off control and will no longer enable the gradual brightening control or continuous brightness adjustment function.
[0130] For example, if bed frame module A reports support for a relatively fast movement speed, but the system detects abnormal angle feedback or a prolonged absence of feedback signals, the system can automatically tighten the range of available parameters for that bed frame module. For instance, it may only allow small movements, low-speed movements, or only allow zero-return movements, while no longer allowing large-angle rapid lifting.
[0131] In this way, even if the module has been connected, the system will not continue to release all control capabilities due to abnormal feedback.
[0132] This example demonstrates that after modules are connected, the present invention can not only identify the module type and basic capabilities, but also further determine the actual correspondence between the modules and generate directly executable control parameters accordingly.
[0133] Furthermore, when calling upper-level functional modules, it is not necessary to identify the specific models of the underlying layers one by one. It is only necessary to call a unified action and area name, and the system can convert it into the actual control command of the corresponding module within the confirmed safe range.
[0134] Therefore, this invention can ensure that the system has a unified, clear and implementable control boundary even when multiple modules are mixed and connected, the module capabilities are not completely consistent, and some modules are in abnormal states.
[0135] In some embodiments, the standard control range of each physical location zone of the mattress is determined based on the standard control range and mapping relationship of the external device, including:
[0136] Based on the mapping relationship, determine the control location partitions of all external devices corresponding to each physical location partition;
[0137] Determine the standard control range of the external devices corresponding to each control location zone;
[0138] When a physical location partition corresponds to multiple logical partitions, the minimum value of the upper limit of the parameter in the standard control range of the external device in the corresponding multiple logical partitions is taken as the upper limit of the standard control range of the physical location partition, and the maximum value of the lower limit of the parameter in each standard control range is taken as the lower limit of the standard control range of the physical location partition.
[0139] When a physical location partition corresponds to a logical partition, the range consisting of the upper limit and lower limit of the parameters in the standard control range of the external device in the corresponding logical partition is taken as the standard control range of the physical location partition.
[0140] Determine the upper limit, lower limit, default parameters, and parameter change slope limits for each physical location partition as the standard control range for the physical location partition.
[0141] Based on the capability identification results and topology analysis results, a unified security parameter mapping table is generated. This mapping table includes at least the action name, applicable module, logical partition, physical channel, upper limit of parameters, lower limit of parameters, default parameters, change slope limit, mutual exclusion relationship, linkage relationship, and degradation boundary.
[0142] To avoid the perception that security parameter mapping is simply a matter of copying the original parameters of the module, in this invention, security parameter mapping refers to the system generating a set of control parameters that can be directly used by the upper layer after identifying the module's capabilities and determining the partition correspondence, in combination with the platform's preset rules and the current operating status.
[0143] These control parameters are not the original parameters in the module manual, but rather the parameter range and control conditions that the system has confirmed can be used safely.
[0144] Specifically, the control parameters generated by the system may include one or more of the following: action name, corresponding module, corresponding partition, corresponding physical channel, upper limit of parameter, lower limit of parameter, default parameter, parameter change rate limit, action duration limit, whether it is allowed to be executed simultaneously with other actions, which takes priority in case of conflict, and which functions are allowed to be retained in abnormal situations.
[0145] Through this information, the upper-level functional modules do not obtain a simple list of module capabilities, but rather a table of security parameters that can be used to directly issue control commands.
[0146] In a preferred embodiment, the system generates the parameter table in the following manner:
[0147] Step 1: Read the parameter range, action type, feedback information, and partition information reported by the module itself;
[0148] Step 2: Based on the partition correspondence determined in the previous step, establish the correspondence between logical actions and underlying module channels;
[0149] Step 3: Invoke the platform's pre-set security rules to check and correct the module's original parameters;
[0150] Step 4: Further adjust the parameter range based on the current operating mode, the status of currently connected modules, the completeness of feedback, and the stability of communication.
[0151] Step 5: Check for issues such as parameter out-of-bounds errors, action conflicts, resource conflicts, and missing key feedback.
[0152] Step 6: If the check passes, output the control parameter table for normal use;
[0153] Step 7: If the check fails, or the module information is incomplete, the feedback is abnormal, or the communication is abnormal, then output a control parameter table with stricter restrictions.
[0154] For example, for the bed frame lifting action, the parameter table generated by the system may include: maximum lifting angle, minimum lifting angle, default lifting speed, restrictions on the speed of the action change, whether it is allowed to be performed simultaneously with the massage action, and whether only returning to zero is allowed when there is an abnormal feedback.
[0155] For lighting actions, the parameter table generated by the system may include: maximum brightness, minimum brightness, default brightness, brightness change time, brightness limit in night mode, and whether the left and right zones can change simultaneously.
[0156] For mattress support movements, the parameter table generated by the system may include: the adjustable range of each zone, the default level, the adjustment speed limit, and the retraction range when linked with the bed frame.
[0157] In some embodiments, receiving a control request for the mattress and the control request meeting a standard control range for a physical location zoning includes:
[0158] Verify whether the control parameters corresponding to the control command exceed the upper or lower limit of the standard control range, whether each physical location partition has established a mapping relationship with the control location partition of the external device, whether there is a mutual exclusion relationship between the actions of different external devices, whether the feedback parameters required to execute the control command can be obtained normally, and whether the standard control range of the external device is complete.
[0159] If the verification passes, proceed to the step of sending control commands to external devices according to the standard control range;
[0160] If the verification fails, a degraded control range is generated, and control commands are sent to the external device according to the degraded control range. The degraded control range indicates that the maximum range of motion of the external device is limited, the speed of change is limited, and high-risk linkage actions are marked as prohibited.
[0161] After the mapping table is generated, the system does not immediately distribute it to the upper-layer functional modules, but first enters the security verification process. The security verification includes at least: whether the parameters are out of bounds, whether the partition mapping is complete, whether the topology is consistent, whether there are resource conflicts, whether there is missing key feedback, whether the module version is compatible, and whether there are uncertified modules.
[0162] When multiple modules share the same resource or action, the system also needs to perform conflict arbitration. For example, if at the same time, a certain upper-level logic wants to increase the brightness of the lights, while the nighttime safety care logic requires a low-distraction mode, the system should reserve the brightness limit corresponding to the care mode according to the preset priority. Similarly, if certain bed frame actions and certain massage actions cannot be executed simultaneously structurally, the system needs to write the mutual exclusion rules into the mapping table and perform arbitration when called at runtime. Through this mechanism, the platform does not wait for a conflict to actually occur before passively reporting an error, but rather solidifies the conflict boundary in advance during the mapping phase.
[0163] For modules with incomplete capability identification, the system can introduce the concept of identification confidence. If a module can only identify the broad category but cannot reliably read the maximum parameter, feedback capability, or complete partition information, the system will not output a formal mapping but a conservative mapping. For example, it may only allow low-intensity actions, prohibit high-speed changes, disable high-risk linkages, or only enable basic control modes.
[0164] In some embodiments, after receiving a control request for the mattress and the control request meets the standard control range of the physical location zoning, and after sending a control command to an external device according to the mapping relationship and the control request, the method further includes:
[0165] Determine whether the communication status, feedback status, or standard control range of the plugged-in external device has changed;
[0166] When it is determined that the communication status of the external device is abnormal, the feedback signal is missing, or the standard control range is inconsistent with the actual behavior, the device enters the degraded operation mode and adjusts the standard control range to the degraded control range.
[0167] When an external device is detected to be reconnected, its firmware version is changed, or its installation orientation is changed, the system returns to the steps of determining the standard control range and control location partitions of the external device and updates the standard control range of each physical location partition.
[0168] After the mapping table is generated, the system further checks for issues such as out-of-bounds parameters, missing partition mappings, inconsistent topology relationships, resource conflicts, missing key feedback, or version incompatibility. If there are shared resources or mutually exclusive actions, arbitration must be performed according to preset priorities, and the arbitration result must be written back to the mapping table.
[0169] If the system passes the verification, it outputs the formal mapping table to the upper layer; if it fails the verification or the identification result has obvious uncertainty, it outputs a conservative mapping table instead, or restricts high-risk functions.
[0170] If changes in module status, capability table, module reconnection, installation direction, or feedback anomalies are detected during system operation, the system can re-trigger the capability identification, topology resolution, and mapping update processes to adapt to module changes during long-term operation.
[0171] When the system detects unstable module communication, missing feedback, module disconnection, inconsistencies between the capability table and actual behavior, changes in installation direction, or changes in partition capabilities during operation, the system enters a degraded operation mode. Degraded operation does not mean the system completely stops working, but rather that the control capabilities are proactively reduced to a confirmed safe range. The degraded methods may include: limiting the maximum range of motion, limiting the rate of change, disabling high-risk linkages, retaining only basic controls, disabling high-risk modes, and switching to the default static configuration, etc.
[0172] For example, when the system detects that a lighting module has gone offline, the associated actions of that lighting module automatically fail, but other functions of the mattress and bed frame can continue to work. When the system detects that a bed frame feedback loss has occurred, it can conservatively limit the bed frame to only perform a zero-return action or a small safety action to avoid performing large changes when the location is unknown. When the system detects a change in the partitioning capability of a mattress module, it only retains the safety control of confirmed partitions, and unconfirmed partitions are no longer called by the upper layer. In this way, the overall stability of the entire platform can be maintained as much as possible in the event of module abnormalities, rather than letting one abnormality drag down all functions.
[0173] In terms of dynamic updates, when a new module is detected to be reconnected, firmware is upgraded, capability table changes or installation direction changes are detected, the system can re-trigger the capability identification, topology resolution and mapping generation process, thereby ensuring that the platform can adapt to different module combinations in the long term without the need for manual reconfiguration of the entire system.
[0174] For both officially validated mapping tables and conservative mapping tables in an abnormal state, the system can output them to upper-level functional modules through a unified interface. When upper-level modules call these tables, they no longer directly target a specific bed frame model, light model, or mattress model, but instead target a unified logical action and safety parameter interface.
[0175] For example, the upper layer only needs to invoke actions such as gradually brightening the left-side care light, strengthening the head area support, and raising the head of the bed frame to a safe angle, and automatically switch to the specific module, physical channel, and parameter range of the lower layer according to the current valid mapping table.
[0176] Figure 2 This is a schematic diagram of a mattress control device provided by the present invention. The mattress control device includes:
[0177] Memory 21 is used to store computer programs;
[0178] The processor 22 is used to implement the steps of the above-described mattress control method when executing a computer program.
[0179] The description of the control device for the mattress provided in this application is similar to that in the above embodiments and will not be repeated here.
[0180] The present invention also provides a mattress, including the above-mentioned mattress control device, and further including a mattress body and an external device connected to the mattress body. The external device includes at least one of a lighting device, a massage device, a pneumatic control device, and a sensing module.
[0181] The description of the mattress provided in this application is similar to that in the above embodiments and will not be repeated here.
[0182] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0183] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0184] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A control method of a mattress, characterized by, include: Determine whether an external device is inserted into the mattress, wherein the external device includes at least one of a lighting device, a massage device, a pneumatic control device, and a sensing module; When the external device is inserted, the standard control range and control position partition of the external device are determined; Determine the mapping relationship between the control location zones of external devices and the physical location zones of the mattress; Based on the standard control range of the external device and the mapping relationship, determine the standard control range of each physical location zone of the mattress; Upon receiving a control request for the mattress that meets the standard control range of the physical location partition, a control command is sent to the external device according to the mapping relationship and the control request.
2. The control method of the mattress according to claim 1, characterized by, Determining whether an external device is plugged into the mattress includes: The system determines whether an external device is plugged into the mattress based on the address of the newly added external device on the communication bus connecting the mattress control device and the external device, or the change in current on the power supply bus that powers the external device. When it is determined that an external device is inserted, a handshake command is sent to the external device, and a handshake response is received from the external device. The handshake response is used to confirm whether the external device is a legitimate insertion device. When the external device is a legally inserted device, the process proceeds to the step of determining the standard control range and control position partition of the external device.
3. The control method of the mattress according to claim 1, characterized by, When the external device is inserted, the standard control range and control position partitions of the external device are determined, including: Send a query request to the external device and determine the standard control range and control location partition returned by the external device based on the query request; When the external device is unable to return to the standard control range and the control position partition, a test command is sent to the external device, and the operation performed by the external device based on the test command is determined; Based on the operation, the standard control range of the external device and the control location partition are determined.
4. The control method of the mattress according to claim 1, characterized by, Determine the mapping relationship between the control position zones of the external device and the physical position zones of the mattress, including: Obtain the number of control location partitions sent by the external device, the name of each control location partition, and the installation orientation of the external device; According to the installation orientation, the names of each control position partition are corrected for orientation, and the corrected names of each control position partition are converted into a unified form of control position partition identifier. The unified form includes a combination of left and right directions with head, middle and tail, or control position partition number form. The mapping relationship is obtained by mapping the identifiers of the control position partitions to the physical position partitions of the mattress.
5. The control method of the mattress according to claim 4, characterized by, The mapping relationship is obtained by mapping the identifiers of the control position zones one-to-one with the physical position zones of the mattress, including: When a single logical partition of the external device covers multiple physical location partitions of the mattress, the single logical partition is mapped to each of the multiple physical location partitions and saved in the mapping relationship; When multiple logical partitions of the external device work together on the same physical location partition of the mattress, the multiple logical partitions are respectively mapped to the same physical location partition and saved in the mapping relationship.
6. The control method of the mattress according to claim 1, characterized by, Based on the standard control range of the external device and the mapping relationship, the standard control range of each physical location zone of the mattress is determined, including: Based on the mapping relationship, determine the control location partitions of all external devices corresponding to each physical location partition; Determine the standard control range of the external devices corresponding to each of the control location partitions; When a physical location partition corresponds to multiple logical partitions, the minimum value of the upper limit of the parameter in the standard control range of the external device in the corresponding multiple logical partitions is taken as the upper limit of the standard control range of the physical location partition, and the maximum value of the lower limit of the parameter in each standard control range is taken as the lower limit of the standard control range of the physical location partition. When a physical location partition corresponds to a logical partition, the range consisting of the upper limit and lower limit of the parameters in the standard control range of the external device in the corresponding logical partition is taken as the standard control range of the physical location partition. The upper limit, lower limit, default parameters, and parameter change slope limit for each physical location partition are determined as the standard control range for the physical location partition.
7. The mattress control method as described in claim 1, characterized in that, When a control request for the mattress is received, and the control request meets the standard control range of the physical location zone, the following is included: Verify whether the control parameters corresponding to the control command exceed the upper or lower limit of the standard control range, whether each physical location partition has established a mapping relationship with the control location partition of the external device, whether there is a mutual exclusion relationship between the actions of different external devices, whether the feedback parameters required to execute the control command can be obtained normally, and whether the standard control range of the external device is complete. If the verification passes, proceed to the step of sending control commands to the external device according to the standard control range; If the verification fails, a degraded control range is generated, and a control command is sent to the external device according to the degraded control range. The degraded control range indicates that the maximum range of motion of the external device is limited, the speed of change is limited, and high-risk linkage actions are marked as prohibited.
8. The mattress control method according to any one of claims 1 to 7, characterized in that, Upon receiving a control request for the mattress that meets the standard control range of the physical location zone, after sending a control command to the external device according to the mapping relationship and the control request, the process further includes: Determine whether the communication status, feedback status, or standard control range of the plugged-in external device has changed; When it is determined that the communication status of the external device is abnormal, the feedback signal is missing, or the standard control range is inconsistent with the actual behavior, the device enters the degraded operation mode and adjusts the standard control range to the degraded control range. When an external device is detected to be reconnected, its firmware version is changed, or its installation orientation is changed, the process returns to the step of determining the standard control range and control location partition of the external device, and updates the standard control range of each physical location partition.
9. A control device for a mattress, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the mattress control method as described in any one of claims 1 to 8.
10. A mattress, characterized in that, The device includes the control device for the mattress as described in claim 9, and also includes the mattress body and an external device connected to the mattress body, wherein the external device includes at least one of a lighting device, a massage device, a pneumatic control device, and a sensing module.