Permanent magnet mattress neck massage force matching method and system based on parameter monitoring

CN122911265APending Publication Date: 2026-10-16HANGZHOU CIXIAOTANG SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611180147.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-05
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]传统技术通常采用预设的固定按摩程序,或仅依据床垫表面静态压力分布简单调节力度,该方法依赖间接压力信号推测肌肉状态,准确度不足,且该方法采用全局、固定频率的数据采集策略,产生大量冗余数据,处理效率低且功耗高,同时该方法按摩力度调节模式单一,缺乏对用户睡眠阶段、个人历史偏好的动态适应,容易在用户睡眠时造成干扰或按摩效果不佳

Benefits of technology

[0076]To address the problems described in the background section, this invention first obtains the current sleep iteration parameters based on massage intensity matching instructions. This step dynamically determines the pressure detection area and detection interval by analyzing the activity of historical pressure data. This changes the traditional approach of collecting data across the entire area at a fixed frequency, allowing for focused monitoring of only the user's actually active body areas. The detection frequency is adaptively adjusted based on the intensity of user posture changes, thereby reducing unnecessary data acquisition and processing power consumption and improving system response efficiency. Furthermore, when recognizing sleep postures, this solution not only relies on the latest pressure distribution image but also incorporates similarity information from historical pressure image sequences through weighted calculations. Compared to traditional methods that only match single-frame images, this effectively smooths out recognition fluctuations caused by brief, minor user movements, thus more accurately determining the user's continuous sleep. In addition to posture, this solution also introduces a user-adaptive massage database based on historical user data. By matching the current posture with muscle tension, it finds the best historical match. Compared to a fixed, universal massage intensity curve, this method can continuously learn and remember the user's personalized intensity preferences in different states, thereby achieving personalized adaptation of the massage strategy. When determining the final massage intensity, this solution not only adjusts proportionally based on the logarithmic relationship between baseline data and current muscle tension to make intensity changes more in line with human perception characteristics, but also specifically incorporates the judgment of sleep periods. During sleep periods, a preset lower intensity is used. Compared with traditional solutions that do not differentiate between time periods and use constant or single-mode adjustments, this provides effective muscle relaxation during non-sleep periods, while avoiding excessive massage intensity that disturbs the user's sleep during sleep periods, demonstrating the intelligence of the massage mattress. Therefore, this invention can improve the accuracy and intelligence of neck massage while reducing the overall power consumption of the massage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122911265A_ABST
    Figure CN122911265A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of magnetic therapy massage, and relates to a permanent-magnetic mattress neck massage force matching method and system based on parameter monitoring, which comprises the following steps: acquiring a current sleep iteration parameter, performing sleep posture recognition based on the current sleep iteration parameter and an original pressure detection device to obtain a current sleep posture, performing electromyographic data collection based on a neck electromyographic detection device to obtain a current muscle tension, identifying reference massage data in a user-adaptive massage database according to the current sleep posture and the current muscle tension, performing massage force matching according to the current muscle tension and the reference massage data to obtain target massage force. The application can improve the precision and intelligent degree of neck massage and simultaneously reduce the overall power consumption of massage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of magnetic therapy massage technology, and in particular to a method and system for matching neck massage intensity based on parameter monitoring in a permanent magnet mattress. Background Technology

[0002] As people's demand for sleep quality and health management increases, smart mattresses are becoming increasingly important as a health monitoring and intervention tool. In particular, for relieving neck discomfort, providing precise, comfortable and personalized massage interventions during sleep has become key to improving user experience and health benefits.

[0003] Traditional techniques typically employ preset, fixed massage programs or simply adjust the intensity based on the static pressure distribution on the mattress surface. This method relies on indirect pressure signals to infer muscle state, resulting in insufficient accuracy. Furthermore, the method uses a global, fixed-frequency data acquisition strategy, generating a large amount of redundant data, leading to low processing efficiency and high power consumption. Additionally, this method has a single massage intensity adjustment mode and lacks dynamic adaptation to the user's sleep stage and personal historical preferences, which can easily cause disturbance or poor massage effect during the user's sleep. Summary of the Invention

[0004] This invention provides a method for matching neck massage intensity based on parameter monitoring in a permanent magnet mattress, and a computer-readable storage medium. Its main purpose is to improve the accuracy and intelligence of neck massage, while reducing the overall power consumption of the massage.

[0005] To achieve the above objectives, the present invention provides a method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring, comprising:

[0006] The permanent magnet mattress to be controlled was identified, which includes: a permanent magnet massage device, a neck electromyography detection device, and a raw pressure detection device.

[0007] Receive massage intensity matching instructions, and obtain the current sleep iteration parameters based on the massage intensity matching instructions. The current sleep iteration parameters include: pressure detection interval and pressure detection area.

[0008] The current sleep posture is obtained by recognizing the current sleep posture based on the current sleep iteration parameters and the original pressure detection device.

[0009] Electromyography (EMG) data is acquired using a neck EMG detection device to obtain current EMG data. Muscle tension is then analyzed using this current EMG data to determine the current muscle tension level.

[0010] Based on the current sleeping posture and current muscle tension, baseline massage data is identified in a pre-built user-adaptive massage database. The baseline massage data includes: baseline massage intensity and baseline muscle tension.

[0011] The massage intensity is matched based on the current muscle tension and baseline massage data to obtain the target massage intensity. The intensity of the permanent magnet massage device is then adjusted using the target massage intensity to obtain the adjustable massage device, thus completing the neck massage intensity matching of the permanent magnet mattress based on parameter monitoring.

[0012] Optionally, obtaining the current sleep iteration parameters based on the massage intensity matching command includes:

[0013] A standard pressure image template is obtained based on the massage intensity matching instruction. The standard pressure image template includes multiple standard pixels, and each standard pixel corresponds to a mattress position.

[0014] Extract standard pixels sequentially from the standard pressure image template, and record the extracted standard pixels as the pixels to be analyzed;

[0015] Based on the mattress position corresponding to the pixel to be analyzed, the pressure value is traced back to obtain the historical mattress pressure value sequence, which includes multiple historical mattress pressure values.

[0016] Active pressure values ​​are obtained by performing an activity analysis based on the historical mattress pressure value sequence;

[0017] By summing the pressure activity values ​​corresponding to each standard pixel, multiple pressure activity values ​​are obtained;

[0018] The standard pressure image template is updated with pixel values ​​using multiple pressure activity values ​​to obtain a pressure activity image, which includes multiple pressure pixels.

[0019] Active regions are identified based on pressure activity images to obtain pressure detection regions, and pressure detection intervals are calculated based on these regions.

[0020] By merging the pressure detection area and the pressure detection interval, the current sleep iteration parameters are obtained.

[0021] Optionally, the step of performing activity analysis based on historical mattress pressure value sequences to obtain pressure activity values ​​includes:

[0022] Historical mattress pressure values ​​are extracted sequentially from the historical mattress pressure value sequence to determine the historical collection time of the extracted historical mattress pressure values;

[0023] The duration of historical data collection is calculated by using the preset current detection time;

[0024] The historical data collection duration is normalized to obtain the normalized data collection duration.

[0025] The normalized collection duration corresponding to each historical mattress pressure value is summarized to obtain the normalized collection duration sequence.

[0026] The pressure activity value is obtained by weighting the historical mattress pressure value sequence using the normalized collection time sequence.

[0027] Optionally, calculating the pressure detection interval based on the pressure detection area includes:

[0028] Based on the pressure detection area, the pixel position statistics of the region are performed to obtain the current active pixel set, which includes multiple current active pixels;

[0029] Identify historical active pixel sets and historical detection intervals based on the current detection time;

[0030] Extract the current active pixels sequentially from the current active pixel set, and obtain the current active position corresponding to the extracted current active pixel;

[0031] Determine if the current active location exists within the set of historical active pixels;

[0032] If the current active position exists in the set of historical active pixels, then the extracted current active pixel is recorded as an overlapping pixel.

[0033] By summing up the overlapping pixels, we obtain the set of overlapping pixels;

[0034] Count the number of overlapping pixels in the overlapping pixel set and the number of active pixels in the currently active pixel set respectively;

[0035] The active overlap degree is calculated based on the number of overlapping pixels and the number of active pixels.

[0036] The pressure detection interval is obtained by adjusting the historical detection interval using the active overlap and the preset historical overlap.

[0037] Optionally, the step of identifying the current sleep posture based on the current sleep iteration parameters and the original pressure detection device to obtain the current sleep posture includes:

[0038] The original pressure detection device is set with the current sleep iteration parameters to obtain the current pressure detection device.

[0039] Pressure detection is performed based on the current pressure detection device to obtain a target pressure distribution image sequence. The target pressure distribution image sequence includes multiple target pressure distribution images, and each target pressure distribution image corresponds to a pressure acquisition time.

[0040] Obtain a sleep posture pressure image library, which includes multiple sleep posture pressure images, and each sleep posture pressure image corresponds to a user's sleep posture.

[0041] The current sleep posture is obtained by recognizing the target pressure distribution image sequence and the sleep posture pressure image database.

[0042] Optionally, the step of obtaining a target pressure distribution image sequence based on the current pressure detection device includes:

[0043] Multiple working pressure sensors in the current pressure detection device were identified;

[0044] Acquire multiple working pressure detection positions corresponding to multiple working pressure sensors, and identify multiple idle pressure detection positions in the permanent magnet mattress to be controlled based on the multiple working pressure detection positions.

[0045] Based on the preset initial acquisition time and multiple working pressure sensors, pressure is acquired to obtain multiple current mattress pressure values, where each current mattress pressure value corresponds one-to-one with a working pressure sensor.

[0046] The pressure values ​​of the standard pressure image template are imported using multiple working pressure detection locations, multiple idle pressure detection locations, multiple current mattress pressure values, and preset empty pressure values ​​to obtain an updated pressure distribution image.

[0047] The target pressure distribution image is obtained by labeling the updated pressure distribution image based on the initial acquisition time.

[0048] The iteration acquisition time is determined based on the initial acquisition time and the pressure detection interval in the current sleep iteration parameters;

[0049] The iterative acquisition time is taken as the initial acquisition time, and the steps of pressure acquisition based on the preset initial acquisition time and multiple working pressure sensors are returned until the preset periodic acquisition end command is received.

[0050] The target pressure distribution images are summarized to obtain a target pressure distribution image sequence.

[0051] Optionally, the step of performing posture recognition based on the target pressure distribution image sequence and the sleep posture pressure image database to obtain the current sleep posture includes:

[0052] Identify the most recent pressure distribution image and the preceding pressure distribution image sequence in the target pressure distribution image sequence;

[0053] For each sleep posture stress image in the sleep posture stress image library, the following operations are performed:

[0054] Image similarity is calculated based on sleep posture pressure images and recent pressure distribution images to obtain recent posture similarity;

[0055] Similarity calculations were performed on sleep posture pressure images and preceding pressure distribution image sequences to obtain a preceding posture similarity sequence.

[0056] The target pose similarity is obtained by weighting the most recent pose similarity using the preceding pose similarity sequence;

[0057] The target pose similarity corresponding to each sleep posture pressure image is summarized to obtain multiple target pose similarities;

[0058] Determine the maximum pose similarity among multiple target pose similarities, and record the user's sleep pose corresponding to the maximum pose similarity as the current sleep pose.

[0059] Optionally, the step of matching the massage intensity based on the current muscle tension and baseline massage data to obtain the target massage intensity includes:

[0060] Determine whether the current detection time falls within the preset sleep period;

[0061] If the current detection time is not during the sleep period, the baseline massage intensity is adjusted using the current muscle tension and the baseline muscle tension in the baseline massage data to obtain the target massage intensity.

[0062] If the current detection time is within the sleep period, the baseline massage intensity is updated using the preset sleep massage intensity to obtain the target massage intensity.

[0063] Optionally, adjusting the reference massage intensity using the current muscle tension and the reference muscle tension in the reference massage data to obtain the target massage intensity includes:

[0064] Calculate the target massage intensity using the following formula:

[0065]

[0066] in, Indicates the target massage intensity. Indicates the baseline massage intensity. This represents a logarithmic function with the natural constant as its base. Indicates the current muscle tension. This indicates the baseline muscle tension.

[0067] To achieve the above objectives, the present invention also provides a permanent magnet mattress neck massage intensity matching system based on parameter monitoring, comprising:

[0068] The sleep parameter calculation module is used to identify the permanent magnet mattress to be controlled. The permanent magnet mattress to be controlled includes a permanent magnet massage device, a neck electromyography detection device, and a raw pressure detection device. It receives a massage intensity matching command and obtains the current sleep iteration parameters based on the massage intensity matching command. The current sleep iteration parameters include the pressure detection interval and the pressure detection area.

[0069] The sleep posture recognition module is used to identify the current sleep posture based on the current sleep iteration parameters and the original pressure detection device, and obtain the current sleep posture.

[0070] The muscle data acquisition module is used to acquire electromyography (EMG) data based on the neck EMG detection device, obtain the current EMG data, perform muscle tension analysis using the current EMG data to obtain the current muscle tension level, and identify the baseline massage data in the pre-built user-adaptive massage database based on the current sleeping posture and the current muscle tension level. The baseline massage data includes: baseline massage intensity and baseline muscle tension.

[0071] The massage device adjustment module is used to match the massage intensity based on the current muscle tension and the baseline massage data to obtain the target massage intensity. The permanent magnet massage device is then adjusted using the target massage intensity to obtain an adjustable massage device.

[0072] To address the above problems, the present invention also provides an electronic device, the electronic device comprising:

[0073] Memory, storing at least one instruction;

[0074] The processor executes the instructions stored in the memory to implement the above-described method for matching neck massage intensity based on parameter monitoring of a permanent magnet mattress.

[0075] To address the aforementioned issues, the present invention also provides a computer-readable storage medium storing at least one instruction, which is executed by a processor in an electronic device to implement the above-described method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring.

[0076] To address the problems described in the background section, this invention first obtains the current sleep iteration parameters based on massage intensity matching instructions. This step dynamically determines the pressure detection area and detection interval by analyzing the activity of historical pressure data. This changes the traditional approach of collecting data across the entire area at a fixed frequency, allowing for focused monitoring of only the user's actually active body areas. The detection frequency is adaptively adjusted based on the intensity of user posture changes, thereby reducing unnecessary data acquisition and processing power consumption and improving system response efficiency. Furthermore, when recognizing sleep postures, this solution not only relies on the latest pressure distribution image but also incorporates similarity information from historical pressure image sequences through weighted calculations. Compared to traditional methods that only match single-frame images, this effectively smooths out recognition fluctuations caused by brief, minor user movements, thus more accurately determining the user's continuous sleep. In addition to posture, this solution also introduces a user-adaptive massage database based on historical user data. By matching the current posture with muscle tension, it finds the best historical match. Compared to a fixed, universal massage intensity curve, this method can continuously learn and remember the user's personalized intensity preferences in different states, thereby achieving personalized adaptation of the massage strategy. When determining the final massage intensity, this solution not only adjusts proportionally based on the logarithmic relationship between baseline data and current muscle tension to make intensity changes more in line with human perception characteristics, but also specifically incorporates the judgment of sleep periods. During sleep periods, a preset lower intensity is used. Compared with traditional solutions that do not differentiate between time periods and use constant or single-mode adjustments, this provides effective muscle relaxation during non-sleep periods, while avoiding excessive massage intensity that disturbs the user's sleep during sleep periods, demonstrating the intelligence of the massage mattress. Therefore, this invention can improve the accuracy and intelligence of neck massage while reducing the overall power consumption of the massage. Attached Figure Description

[0077] Figure 1 This is a flowchart illustrating a method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring, provided in an embodiment of the present invention.

[0078] Figure 2 This is a functional block diagram of a permanent magnet mattress neck massage intensity matching system based on parameter monitoring, provided in an embodiment of the present invention.

[0079] Figure 3 This is a schematic diagram of the structure of an electronic device that implements the parameter monitoring-based method for matching neck massage intensity on a permanent magnet mattress, according to an embodiment of the present invention.

[0080] Explanation of reference numerals in the attached figures:

[0081] 10. Electronic device; 11. Processor; 12. Memory; 13. Bus.

[0082] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0083] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0084] This application provides a method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring. The execution entity of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application: a server, a terminal, etc. In other words, the method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.

[0085] Reference Figure 1 The diagram shown is a flowchart illustrating a method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring, according to an embodiment of the present invention. In this embodiment, the method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring includes:

[0086] S1. Identify the permanent magnet mattress to be controlled, which includes: a permanent magnet massage device, a neck electromyography detection device, and a raw pressure detection device.

[0087] It is understood that the controlled permanent magnet mattress refers to a mattress capable of massaging the user. The surface of the controlled permanent magnet mattress is distributed with a primary pressure detection device, which is a sensor capable of detecting pressure. Optionally, an array of multiple pressure sensors distributed at different locations on the controlled permanent magnet mattress constitutes the primary pressure detection device. This primary pressure detection device can collect the pressure value of the user's body on the controlled permanent magnet mattress in real time. The controlled permanent magnet mattress includes a neck area, which is a specific area on the upper part of the mattress corresponding to the human neck. The neck area is an arc-shaped depression, and a neck electromyography (EMG) detection device is distributed in this neck area. This neck EMG detection device is a sensor used to detect the bioelectrical signals of the neck muscles. Since the user's neck is directly exposed, the skin has good contact with the neck EMG detection device, which is conducive to obtaining the user's neck EMG signals. Therefore, this neck EMG detection device is used to obtain the EMG data of the user's neck muscles. Optionally, a surface electromyography (sEMG) sensor is selected as the neck EMG detection device. A permanent magnet massage device is also installed in the aforementioned neck area. This permanent magnet massage device refers to a mechanism that can generate mechanical force through permanent magnets to physically massage the neck muscles. For example, it is a massage head array driven by a micro motor and embedded with permanent magnets. After activation, the massage head can roll, vibrate, or change the magnetic field intensity to perform massage actions such as kneading and pressing on the neck muscles.

[0088] Furthermore, in addition to installing a permanent magnet massage device in the neck area, other areas of the permanent magnet mattress to be controlled can also be equipped with the same permanent magnet massage device, so as to provide a full-body massage for the user.

[0089] S2. Receive massage intensity matching instruction, and obtain the current sleep iteration parameters based on the massage intensity matching instruction. The current sleep iteration parameters include: pressure detection interval and pressure detection area.

[0090] Understandably, the massage intensity matching command refers to a command initiated by the user or automatically polled by the control system of the permanent magnet mattress to be controlled. Upon receiving the massage intensity matching command, the permanent magnet mattress to be controlled will adjust the massage intensity of the permanent magnet massage device. The current sleep iteration parameters refer to the data set of the pressure detection interval and the pressure detection area. The pressure detection interval refers to the time interval between two consecutive pressure detections by the original pressure detection device. The pressure detection area refers to a specific area in the permanent magnet mattress to be controlled that requires pressure detection.

[0091] Specifically, obtaining the current sleep iteration parameters based on the massage intensity matching command includes:

[0092] A standard pressure image template is obtained based on the massage intensity matching instruction. The standard pressure image template includes multiple standard pixels, and each standard pixel corresponds to a mattress position.

[0093] Extract standard pixels sequentially from the standard pressure image template, and record the extracted standard pixels as the pixels to be analyzed;

[0094] Based on the mattress position corresponding to the pixel to be analyzed, the pressure value is traced back to obtain the historical mattress pressure value sequence, which includes multiple historical mattress pressure values.

[0095] Active pressure values ​​are obtained by performing an activity analysis based on the historical mattress pressure value sequence;

[0096] By summing the pressure activity values ​​corresponding to each standard pixel, multiple pressure activity values ​​are obtained;

[0097] The standard pressure image template is updated with pixel values ​​using multiple pressure activity values ​​to obtain a pressure activity image, which includes multiple pressure pixels.

[0098] Active regions are identified based on pressure activity images to obtain pressure detection regions, and pressure detection intervals are calculated based on these regions.

[0099] By merging the pressure detection area and the pressure detection interval, the current sleep iteration parameters are obtained.

[0100] It should be explained that the standard pressure image template refers to a manually set pressure distribution reference map of the permanent magnet mattress to be controlled. This standard pressure image template consists of multiple standard pixels, where each standard pixel represents a location covered by a pressure sensor in the original pressure detection device. The position of this standard pixel in the permanent magnet template to be controlled is the same as its position in the standard pressure image template. The mattress position refers to the actual position of the standard pixel in the permanent magnet mattress to be controlled. The original pixel value of each standard pixel is 0. The historical mattress pressure value sequence refers to an ordered set of multiple historical mattress pressure values, where each historical mattress pressure value refers to the pressure value collected at a certain moment at the location corresponding to the pixel to be analyzed. The historical activity value refers to a numerical value representing the user's activity level at the mattress location corresponding to the pixel to be analyzed. The larger the historical activity value, the longer the user stays at that mattress location, meaning that pressure detection at that location is more necessary. The pressure active image refers to the standard pressure image template after pixel value updates. Updating the pixel value of the standard pressure image template using multiple pressure active values ​​means replacing the original pixel value of the corresponding standard pixel in the standard pressure image template with the pressure active value corresponding to each standard pixel, thereby generating a new image that intuitively reflects the pressure change activity at each position of the permanent magnet mattress to be controlled using pixel grayscale (which is the pressure active value). This new image is the pressure active image.

[0101] Furthermore, the specific steps for identifying the pressure detection region based on the pressure activity image include: judging the pixel value of each pressure pixel in the pressure activity image according to a preset activity threshold; when the pressure activity value corresponding to a pressure pixel is greater than the activity threshold, it indicates that the user has lingered at the mattress position corresponding to that pressure pixel at the corresponding time, and thus the pressure pixel is recorded as a target pixel; by summing up these target pixels, multiple target pixels are obtained, and the area formed by these multiple pressure activity values ​​is the pressure detection region. The aforementioned activity threshold refers to the threshold used to distinguish whether there is a human presence at the pressure activity value, and it can be set through pre-testing.

[0102] In detail, the active analysis based on the historical mattress pressure value sequence to obtain the pressure activity value includes:

[0103] Historical mattress pressure values ​​are extracted sequentially from the historical mattress pressure value sequence to determine the historical collection time of the extracted historical mattress pressure values;

[0104] The duration of historical data collection is calculated by using the preset current detection time;

[0105] The historical data collection duration is normalized to obtain the normalized data collection duration.

[0106] The normalized collection duration corresponding to each historical mattress pressure value is summarized to obtain the normalized collection duration sequence.

[0107] The pressure activity value is obtained by weighting the historical mattress pressure value sequence using the normalized collection time sequence.

[0108] It should be explained that the historical data collection time refers to the moment when the corresponding historical mattress pressure value was collected. The current detection time refers to the moment when the massage intensity matching command was received. The historical data collection duration refers to the time elapsed between the historical data collection time and the current detection time. The longer the historical data collection duration, the worse the timeliness of the data collected at that historical data collection time, and the less useful the data is for determining whether a user will stay at that location (the mattress location corresponding to the historical mattress pressure value) later. In other words, the historical mattress pressure value corresponding to that historical data collection time has a lower weight in the subsequent weighted calculation. The normalized data collection duration refers to the historical data collection duration after normalization. The formula for normalizing the historical data collection duration is as follows: ,in, Indicates the duration of historical data collection. This indicates the historical data collection duration that needs to be normalized. This indicates the number of historical mattress pressure values ​​in the sequence. The historical data collection duration corresponding to each historical mattress pressure value This represents the number of historical mattress pressure values ​​in the historical mattress pressure value sequence. The calculation formula for weighting the historical mattress pressure value sequence using the normalized collection duration sequence is as follows: ,in, Indicates the stress activity value. Represents the first in the normalized acquisition duration sequence Individual collection time, This represents the first in the historical mattress pressure value sequence. Historical mattress pressure values.

[0109] Specifically, the calculation of the pressure detection interval based on the pressure detection area includes:

[0110] Based on the pressure detection area, the pixel position statistics of the region are performed to obtain the current active pixel set, which includes multiple current active pixels;

[0111] Identify historical active pixel sets and historical detection intervals based on the current detection time;

[0112] Extract the current active pixels sequentially from the current active pixel set, and obtain the current active position corresponding to the extracted current active pixel;

[0113] Determine if the current active location exists within the set of historical active pixels;

[0114] If the current active position exists in the set of historical active pixels, then the extracted current active pixel is recorded as an overlapping pixel.

[0115] By summing up the overlapping pixels, we obtain the set of overlapping pixels;

[0116] Count the number of overlapping pixels in the overlapping pixel set and the number of active pixels in the currently active pixel set respectively;

[0117] The active overlap degree is calculated based on the number of overlapping pixels and the number of active pixels.

[0118] The pressure detection interval is obtained by adjusting the historical detection interval using the active overlap and the preset historical overlap.

[0119] It should be explained that the "currently active pixel set" refers to a collection of multiple currently active pixels, where each currently active pixel refers to a pixel in the pressure detection area. The "historically active pixel set" refers to the set of currently active pixels most recently acquired at the current detection time. The "historically detected interval" refers to the pressure detection interval most recently calculated at the current detection time; that is, the currently active pixel set and the pressure detection interval can be considered as iterations derived from the currently active pixel set and the historical detection interval, respectively. The "currently active position" refers to the mattress position of the extracted currently active pixel. The detailed method for determining whether the current active position exists in the historically active pixel set is as follows: traverse each historically active pixel in the historically active pixel set. If there exists a historically active pixel whose corresponding mattress position is the same as the current active position, then the current active position exists in the historically active pixel set. If the current active position exists in the historically active pixel set, it means that the mattress position corresponding to the current active pixel was also in an active state at the most recent pressure acquisition time, and is an area where the user's body pressure is continuously or frequently applied. The "number of overlapping pixels" refers to the number of overlapping pixels in the overlapping pixel set.

[0120] Furthermore, the number of active pixels refers to the number of currently active pixels in the current active pixel set. The active overlap ratio refers to the ratio between the number of overlapping pixels and the number of active pixels. The larger the active overlap ratio, the more pixels overlap between the current active pixel set and the historical active pixel set, meaning the range where the user stays on the permanent magnet mattress to be controlled changes less compared to the last collection time. The historical overlap ratio refers to the active overlap ratio most recently calculated from the current detection time. The specific calculation formula for adjusting the historical detection interval using the active overlap ratio and the preset historical overlap ratio is as follows: ,in, Indicates the pressure detection interval. Indicates the historical detection interval. Indicates the degree of historical overlap. Indicates the degree of overlap in activity, where, The smaller the value, the less overlap there is between the current user's position and the previous measurement, indicating a significant change in the user's posture or location. In this case, the interval between subsequent pressure measurements should be reduced (i.e., the historical detection interval should be reduced) so that the massage intensity can be adjusted promptly based on the user's changing posture or location.

[0121] S3. Based on the current sleep iteration parameters and the original pressure detection device, the sleep posture is identified to obtain the current sleep posture.

[0122] It is clear that the current sleeping posture refers to the user's current posture on the permanent magnet mattress to be controlled.

[0123] Specifically, the step of identifying the current sleep posture based on the current sleep iteration parameters and the original pressure detection device to obtain the current sleep posture includes:

[0124] The original pressure detection device is set with the current sleep iteration parameters to obtain the current pressure detection device.

[0125] Pressure detection is performed based on the current pressure detection device to obtain a target pressure distribution image sequence. The target pressure distribution image sequence includes multiple target pressure distribution images, and each target pressure distribution image corresponds to a pressure acquisition time.

[0126] Obtain a sleep posture pressure image library, which includes multiple sleep posture pressure images, and each sleep posture pressure image corresponds to a user's sleep posture.

[0127] The current sleep posture is obtained by recognizing the target pressure distribution image sequence and the sleep posture pressure image database.

[0128] It should be explained that the "current pressure detection device" refers to the original pressure detection device after the detection parameters have been set. Setting the detection parameters of the original pressure detection device using the current sleep iteration parameters means: activating all pressure sensors distributed within the pressure detection area of ​​the original pressure detection device; these activated pressure sensors constitute the current pressure detection device; and setting the detection interval of the current pressure detection device to the pressure detection interval in the current sleep iteration parameters. The "current pressure detection device" refers to multiple pressure sensors distributed within the pressure detection area. The "target pressure distribution image sequence" refers to an ordered set of multiple target pressure distribution images. The "target pressure distribution image" refers to the pressure distribution image of the permanent magnet mattress to be controlled acquired at a certain moment, and the size of this target pressure distribution image is the same as the size of the aforementioned standard pressure image template. The "pressure acquisition time" refers to the moment when the target pressure distribution image is acquired, such as the initial acquisition time in subsequent embodiments.

[0129] Furthermore, the sleep posture pressure image library refers to a collection of multiple sleep posture pressure images. Each sleep posture pressure image refers to a pressure distribution image of a user in a specific sleep posture, and the user's sleep posture refers to the user's sleep posture at the time the corresponding sleep posture pressure image is captured. The acquisition method for this sleep posture pressure image library is as follows: When using the permanent magnet mattress to be controlled, the user needs to perform a sleep operation according to the posture acquisition instruction issued by the control system corresponding to the mattress. For example, if the control system issues a posture acquisition instruction of "Please maintain a supine position," the user needs to assume a supine sleeping position and hold it for a moment. The permanent magnet mattress to be controlled records the pressure distribution image at this time. This pressure distribution image is the sleep posture pressure image of the user in the supine sleeping position. This operation is performed for each built-in sleep posture to obtain the sleep posture pressure image library. The aforementioned control system refers to a user-end application capable of adjusting the parameters of the permanent magnet mattress to be controlled.

[0130] Specifically, the step of obtaining a target pressure distribution image sequence based on the current pressure detection device includes:

[0131] Multiple working pressure sensors in the current pressure detection device were identified;

[0132] Acquire multiple working pressure detection positions corresponding to multiple working pressure sensors, and identify multiple idle pressure detection positions in the permanent magnet mattress to be controlled based on the multiple working pressure detection positions.

[0133] Based on the preset initial acquisition time and multiple working pressure sensors, pressure is acquired to obtain multiple current mattress pressure values, where each current mattress pressure value corresponds one-to-one with a working pressure sensor.

[0134] The pressure values ​​of the standard pressure image template are imported using multiple working pressure detection locations, multiple idle pressure detection locations, multiple current mattress pressure values, and preset empty pressure values ​​to obtain an updated pressure distribution image.

[0135] The target pressure distribution image is obtained by labeling the updated pressure distribution image based on the initial acquisition time.

[0136] The iteration acquisition time is determined based on the initial acquisition time and the pressure detection interval in the current sleep iteration parameters;

[0137] The iterative acquisition time is taken as the initial acquisition time, and the steps of pressure acquisition based on the preset initial acquisition time and multiple working pressure sensors are returned until the preset periodic acquisition end command is received.

[0138] The target pressure distribution images are summarized to obtain a target pressure distribution image sequence.

[0139] It should be explained that the "working pressure sensor" refers to a pressure sensor in the current pressure detection device. The "working pressure detection position" refers to the mattress position corresponding to the working pressure sensor. The "idle pressure detection position" refers to a mattress position other than the working pressure detection position in the permanent magnet mattress to be controlled. Since the pressure sensor at the idle pressure detection position does not work in subsequent pressure acquisition steps, the pressure value at the idle pressure detection position is zero. The "initial acquisition time" refers to the moment when pressure acquisition is performed for the first time. The "empty pressure value" refers to a preset value representing a pressure-free state, such as a value of 0. This solution adopts the selective pressure acquisition strategy described here, so that areas with less user activity are not acquired. Compared with the traditional technology of continuous acquisition of all pressure sensors on the permanent magnet mattress to be controlled at a fixed frequency, this reduces invalid pressure acquisition, thereby reducing overall power consumption and improving the efficiency of adjusting the massage intensity of the permanent magnet mattress to be controlled.

[0140] Furthermore, the above-mentioned method of importing pressure values ​​into the standard pressure image template using multiple working pressure detection locations, multiple idle pressure detection locations, multiple current mattress pressure values, and preset empty pressure values ​​refers to: traversing each standard pixel in the standard pressure image template; if the mattress position of the standard pixel belongs to a working pressure detection location, then the current mattress pressure value collected by the pressure sensor at the corresponding working pressure detection location is used as the pixel value of that standard pixel; if the mattress position of the standard pixel belongs to an idle pressure detection location, then the preset empty pressure value is used as the pixel value of that standard pixel. When all standard pixels have completed the above operation, the standard pressure image template at this time is the updated pressure distribution image. The updated pressure distribution image refers to the pressure distribution image obtained after importing pressure values. The above-mentioned method of marking the updated pressure distribution image based on the initial acquisition time refers to: mapping the updated pressure distribution image to the initial acquisition time, making the initial acquisition time of the updated pressure distribution image searchable. The iterative acquisition time refers to the time when pressure acquisition is required next; the time obtained by adding the pressure detection interval to the initial acquisition time is the iterative acquisition time. The periodic acquisition end command refers to the command initiated after a complete target pressure distribution image sequence has been acquired. For example, when the number of target pressure distribution images reaches a preset number, the periodic acquisition end command is initiated.

[0141] Specifically, the step of performing posture recognition based on the target pressure distribution image sequence and the sleep posture pressure image database to obtain the current sleep posture includes:

[0142] Identify the most recent pressure distribution image and the preceding pressure distribution image sequence in the target pressure distribution image sequence;

[0143] For each sleep posture stress image in the sleep posture stress image library, the following operations are performed:

[0144] Image similarity is calculated based on sleep posture pressure images and recent pressure distribution images to obtain recent posture similarity;

[0145] Similarity calculations were performed on sleep posture pressure images and preceding pressure distribution image sequences to obtain a preceding posture similarity sequence.

[0146] The target pose similarity is obtained by weighting the most recent pose similarity using the preceding pose similarity sequence;

[0147] The target pose similarity corresponding to each sleep posture pressure image is summarized to obtain multiple target pose similarities;

[0148] Determine the maximum pose similarity among multiple target pose similarities, and record the user's sleep pose corresponding to the maximum pose similarity as the current sleep pose.

[0149] It should be explained that the most recent pressure distribution image refers to the last target pressure distribution image in the target pressure distribution image sequence, that is, the most recently acquired pressure distribution image. The preceding pressure distribution image sequence refers to the ordered set of the first to the second-to-last target pressure distribution images in the target pressure distribution image sequence. The recent posture similarity refers to the degree of matching of pressure distribution features between the sleep posture pressure image and the recent pressure distribution image. The greater the recent posture similarity, the more similar the sleep posture represented by the recent pressure distribution image is to the user's sleep posture corresponding to the sleep posture pressure image. First, the active region is extracted from the recent pressure distribution image. The active region refers to the region composed of all pixels in the recent pressure distribution image whose pixel value (i.e., pressure value) is greater than the preset perturbation pressure value. The perturbation pressure value refers to the pressure value that is set through experiments and represents the pressure caused by non-human direct pressure. For example, the background pressure generated by the mattress due to changes in ambient temperature, bedding covering, or slight deformation of the fabric itself can be set to 2-10 Pascals (Pa). The active region in the sleep posture pressure image is extracted in the same way. The minimum bounding rectangle of the contours of the two active regions is calculated respectively. Then, the intersection-union ratio (IoU) of the two minimum bounding rectangles is calculated. This IoU is used as the recent posture similarity.

[0150] Furthermore, the preceding posture similarity sequence refers to a set of multiple preceding posture similarities. The preceding posture similarity refers to the degree of matching of pressure distribution features between a sleep posture pressure image and a certain preceding pressure distribution image. The higher the preceding posture similarity, the more similar the sleep posture represented by the preceding pressure distribution image is to the user's sleep posture corresponding to the sleep posture pressure image. The calculation method for the preceding posture similarity is the same as the calculation method for the most recent posture similarity mentioned above. The target posture similarity refers to the similarity obtained after weighting. The specific formula for weighting the most recent posture similarity using the preceding posture similarity sequence is as follows: ,in, Indicates the similarity of target poses. This represents the number of preceding pose similarities in the preceding pose similarity sequence. Represents the first position in the preceding pose similarity sequence. Similarity of preceding poses This indicates the data collection time corresponding to the most recent pose similarity. Indicates the first The acquisition time corresponding to each preceding pose similarity, in this calculation formula The term can be considered as a weight in the calculation; the larger the term, the stronger the weight. The further away the acquisition time of each preceding pose similarity score is from the current time, the lower its weight. The maximum pose similarity score refers to the target pose similarity score with the largest numerical value among multiple target pose similarities.

[0151] S4. Based on the neck electromyography detection device, collect electromyography data to obtain the current electromyography data, and use the current electromyography data to analyze muscle tension and obtain the current muscle tension level.

[0152] Understandably, the current muscle data refers to the bioelectrical signal sequence obtained after electromyography (EMG) data acquisition, such as a voltage value sequence within a time window acquired at a sampling frequency of 1000Hz. The current muscle tension refers to the muscle tension of the user's neck muscles obtained through muscle tension analysis. This muscle tension is a numerical value representing the degree of tension in the user's neck muscles; the higher the muscle tension, the greater the tension in the user's neck muscles, meaning a greater massage pressure is required. The formula for analyzing the current muscle tension is:

[0153]

[0154] in, This indicates the current muscle tension, and N represents the number of voltage values ​​in the current muscle data. This indicates the first muscle in the current data. Each voltage value.

[0155] S5. Identify baseline massage data in a pre-built user-adaptive massage database based on the current sleeping posture and current muscle tension. The baseline massage data includes baseline massage intensity and baseline muscle tension.

[0156] It is clear that the user-adapted massage database refers to a database composed of multiple user-adapted massage data sets. These user-adapted massage data sets include custom massage intensity, custom muscle tension, and custom sleep posture. Custom massage intensity refers to the massage intensity set by the user through custom control. Custom muscle tension refers to the user's neck muscle tension when setting the custom massage intensity. Custom sleep posture refers to the user's sleep posture during custom control. The specific method of custom control is as follows: when the user uses the permanent magnet mattress to be controlled for neck massage, the user's muscle tension and sleep posture are recorded in real time. If the user adjusts the massage intensity of the permanent magnet mattress at this time, it indicates that the adjusted massage intensity is the most comfortable for the user. The adjusted massage intensity is then recorded, and the muscle tension, adjusted massage intensity, and sleep posture are respectively recorded as custom massage intensity, custom muscle tension, and custom sleep posture.

[0157] Furthermore, after obtaining the current sleeping posture and current muscle tension, the current sleeping posture is used as an index to find multiple user-adaptive massage data corresponding to the current sleeping posture in the user-adaptive massage database. The user-adaptive massage data whose self-defined muscle tension is closest to the current muscle tension is recorded as the benchmark massage data. The self-defined massage intensity and self-defined muscle tension in the benchmark massage data are the benchmark massage intensity and benchmark muscle tension, respectively.

[0158] S6. Match the massage intensity based on the current muscle tension and baseline massage data to obtain the target massage intensity. Use the target massage intensity to adjust the intensity of the permanent magnet massage device to obtain the adjustable massage device, thus completing the neck massage intensity matching of the permanent magnet mattress based on parameter monitoring.

[0159] It is clear that the target massage intensity refers to the massage intensity most suitable for the user after matching the massage intensity. The adjustable massage device refers to the permanent magnet massage device after intensity adjustment, wherein adjusting the intensity of the permanent magnet massage device using the target massage intensity means setting the massage intensity of the permanent magnet massage device to the target massage intensity.

[0160] Specifically, the process of matching massage intensity based on current muscle tension and baseline massage data to obtain the target massage intensity includes:

[0161] Determine whether the current detection time falls within the preset sleep period;

[0162] If the current detection time is not during the sleep period, the baseline massage intensity is adjusted using the current muscle tension and the baseline muscle tension in the baseline massage data to obtain the target massage intensity.

[0163] If the current detection time is within the sleep period, the baseline massage intensity is updated using the preset sleep massage intensity to obtain the target massage intensity.

[0164] It should be explained that the sleep period refers to a time range set by the user, such as 10:00 PM to 6:30 AM the next day. During this sleep period, the massage intensity of the permanent magnet mattress to be controlled needs to be maintained at a relatively small value set by the user. This relatively small value set by the user is the sleep massage intensity. The target massage intensity refers to the massage intensity obtained after adjustment.

[0165] Specifically, the step of adjusting the reference massage intensity using the current muscle tension and the reference muscle tension in the reference massage data to obtain the target massage intensity includes:

[0166] Calculate the target massage intensity using the following formula:

[0167]

[0168] in, Indicates the target massage intensity. Indicates the baseline massage intensity. This represents a logarithmic function with the natural constant as its base. Indicates the current muscle tension. This indicates the baseline muscle tension.

[0169] It needs to be explained that in the above formula for calculating the target massage intensity, The larger the value, the higher the current muscle tension relative to the baseline muscle tension, meaning the greater the target massage intensity.

[0170] To address the problems described in the background section, this invention first obtains the current sleep iteration parameters based on massage intensity matching instructions. This step dynamically determines the pressure detection area and detection interval by analyzing the activity of historical pressure data. This changes the traditional approach of collecting data across the entire area at a fixed frequency, allowing for focused monitoring of only the user's actively active body areas. The detection frequency is adaptively adjusted based on the intensity of user posture changes, thereby reducing unnecessary data acquisition and processing power consumption and improving system response efficiency. Furthermore, when recognizing sleep postures, this solution not only uses the latest pressure distribution image but also incorporates similarity information from historical pressure image sequences through weighted calculations. Compared to traditional methods that rely solely on single-frame image matching, this effectively smooths out recognition fluctuations caused by brief user pauses, thus more accurately determining the user's continuous sleep posture. In addition to this, the present invention introduces a user-adaptive massage database based on historical user data. By matching the current posture with muscle tension, it finds the best historical match. Compared to a fixed, universal massage intensity curve, this method continuously learns and remembers the user's personalized intensity preferences in different states, thus achieving personalized massage strategy adaptation. When determining the final massage intensity, the present invention not only adjusts proportionally based on the logarithmic relationship between baseline data and current muscle tension to make intensity changes more consistent with human perception, but also specifically incorporates sleep period judgment. During sleep periods, a preset lower intensity is used. Compared to traditional methods that adjust intensity indiscriminately, constantly, or in a single mode, this provides effective muscle relaxation during non-sleep periods while avoiding excessive massage intensity that could disturb the user's sleep during sleep, demonstrating the intelligence of the massage mattress. Therefore, this invention can improve the accuracy and intelligence of neck massage while reducing the overall power consumption of the massage.

[0171] like Figure 2 The diagram shown is a functional block diagram of a permanent magnet mattress neck massage intensity matching system based on parameter monitoring, provided in an embodiment of the present invention.

[0172] The parameter monitoring-based permanent magnet mattress neck massage intensity matching system 100 of this invention can be installed in an electronic device. Depending on the functions implemented, the parameter monitoring-based permanent magnet mattress neck massage intensity matching system 100 may include a sleep parameter calculation module 101, a sleep posture recognition module 102, a muscle data acquisition module 103, and a massage device adjustment module 104. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and which are stored in the memory of the electronic device.

[0173] The sleep parameter calculation module 101 is used to identify the permanent magnet mattress to be controlled, wherein the permanent magnet mattress to be controlled includes: a permanent magnet massage device, a neck electromyography detection device and a raw pressure detection device, receives a massage intensity matching instruction, and obtains the current sleep iteration parameters based on the massage intensity matching instruction, wherein the current sleep iteration parameters include: pressure detection interval and pressure detection area;

[0174] The sleep posture recognition module 102 is used to recognize the current sleep posture based on the current sleep iteration parameters and the original pressure detection device, and obtain the current sleep posture.

[0175] The muscle data acquisition module 103 is used to acquire electromyographic data based on the neck electromyography detection device to obtain the current electromyographic data, perform muscle tension analysis using the current electromyographic data to obtain the current muscle tension, and identify benchmark massage data in a pre-built user-adaptive massage database based on the current sleeping posture and the current muscle tension. The benchmark massage data includes: benchmark massage intensity and benchmark muscle tension.

[0176] The massage device adjustment module 104 is used to match the massage intensity according to the current muscle tension and the baseline massage data to obtain the target massage intensity, and to adjust the intensity of the permanent magnet massage device using the target massage intensity to obtain the adjustable massage device.

[0177] In detail, the modules in the parameter monitoring-based permanent magnet mattress neck massage intensity matching system 100 described in this embodiment of the invention employ the same methods as described above during use. Figure 1 The method used is the same as the parameter monitoring-based neck massage intensity matching method for permanent magnet mattresses described above, and it can produce the same technical effect, so it will not be repeated here.

[0178] like Figure 3 The diagram shown is a structural schematic of an electronic device for implementing a method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring, according to an embodiment of the present invention.

[0179] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a method program for matching neck massage intensity of a permanent magnet mattress based on parameter monitoring.

[0180] The memory 11 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as the portable hard drive of the electronic device 1. In other embodiments, the memory 11 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 1. Furthermore, the memory 11 includes both internal storage units and external storage devices of the electronic device 1. The memory 11 can be used not only to store application software and various types of data installed on the electronic device 1, such as the code of a method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring, but also to temporarily store data that has been output or will be output.

[0181] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 (e.g., a method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0182] The bus 12 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 can be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize the connection and communication between the memory 11 and at least one processor 10, etc.

[0183] Figure 3 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0184] For example, although not shown, the electronic device 1 may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0185] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, a Bluetooth interface, etc.), which is typically used to establish communication connections between the electronic device 1 and other electronic devices.

[0186] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), and optionally, a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device 1 and to display a visual user interface.

[0187] The program for a permanent magnet mattress neck massage intensity matching method based on parameter monitoring, stored in the memory 11 of the electronic device 1, is a combination of multiple instructions. When run in the processor 10, it can achieve the following:

[0188] The permanent magnet mattress to be controlled was identified, which includes: a permanent magnet massage device, a neck electromyography detection device, and a raw pressure detection device.

[0189] Receive massage intensity matching instructions, and obtain the current sleep iteration parameters based on the massage intensity matching instructions. The current sleep iteration parameters include: pressure detection interval and pressure detection area.

[0190] The current sleep posture is obtained by recognizing the current sleep posture based on the current sleep iteration parameters and the original pressure detection device.

[0191] Electromyography (EMG) data is acquired using a neck EMG detection device to obtain current EMG data. Muscle tension is then analyzed using this current EMG data to determine the current muscle tension level.

[0192] Based on the current sleeping posture and current muscle tension, baseline massage data is identified in a pre-built user-adaptive massage database. The baseline massage data includes: baseline massage intensity and baseline muscle tension.

[0193] The massage intensity is matched based on the current muscle tension and baseline massage data to obtain the target massage intensity. The intensity of the permanent magnet massage device is then adjusted using the target massage intensity to obtain the adjustable massage device, thus completing the neck massage intensity matching of the permanent magnet mattress based on parameter monitoring.

[0194] Specifically, the processor 10's implementation method for the above instructions can be found in [reference needed]. Figures 1 to 3 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0195] Furthermore, if the modules / units integrated in the electronic device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0196] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0197] The permanent magnet mattress to be controlled was identified, which includes: a permanent magnet massage device, a neck electromyography detection device, and a raw pressure detection device.

[0198] Receive massage intensity matching instructions, and obtain the current sleep iteration parameters based on the massage intensity matching instructions. The current sleep iteration parameters include: pressure detection interval and pressure detection area.

[0199] The current sleep posture is obtained by recognizing the current sleep posture based on the current sleep iteration parameters and the original pressure detection device.

[0200] Electromyography (EMG) data is acquired using a neck EMG detection device to obtain current EMG data. Muscle tension is then analyzed using this current EMG data to determine the current muscle tension level.

[0201] Based on the current sleeping posture and current muscle tension, baseline massage data is identified in a pre-built user-adaptive massage database. The baseline massage data includes: baseline massage intensity and baseline muscle tension.

[0202] The massage intensity is matched based on the current muscle tension and baseline massage data to obtain the target massage intensity. The intensity of the permanent magnet massage device is then adjusted using the target massage intensity to obtain the adjustable massage device, thus completing the neck massage intensity matching of the permanent magnet mattress based on parameter monitoring.

[0203] In the embodiments provided by this invention, it should be understood that the disclosed devices, systems, and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and actual implementations may have other classification methods.

[0204] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0205] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0206] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0207] Finally, 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.

Claims

1. A method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring, characterized in that, The method includes: The permanent magnet mattress to be controlled was identified, which includes: a permanent magnet massage device, a neck electromyography detection device, and a raw pressure detection device. Receive massage intensity matching instructions, and obtain the current sleep iteration parameters based on the massage intensity matching instructions. The current sleep iteration parameters include: pressure detection interval and pressure detection area. The current sleep posture is obtained by recognizing the current sleep posture based on the current sleep iteration parameters and the original pressure detection device. Electromyography (EMG) data is acquired using a neck EMG detection device to obtain current EMG data. Muscle tension is then analyzed using this current EMG data to determine the current muscle tension level. Based on the current sleeping posture and current muscle tension, baseline massage data is identified in a pre-built user-adaptive massage database. The baseline massage data includes: baseline massage intensity and baseline muscle tension. The massage intensity is matched based on the current muscle tension and baseline massage data to obtain the target massage intensity. The intensity of the permanent magnet massage device is then adjusted using the target massage intensity to obtain the adjustable massage device, thus completing the neck massage intensity matching of the permanent magnet mattress based on parameter monitoring.

2. The method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring as described in claim 1, characterized in that, The process of obtaining the current sleep iteration parameters based on massage intensity matching instructions includes: A standard pressure image template is obtained based on the massage intensity matching instruction. The standard pressure image template includes multiple standard pixels, and each standard pixel corresponds to a mattress position. Extract standard pixels sequentially from the standard pressure image template, and record the extracted standard pixels as the pixels to be analyzed; Based on the mattress position corresponding to the pixel to be analyzed, the pressure value is traced back to obtain the historical mattress pressure value sequence, which includes multiple historical mattress pressure values. Active pressure values ​​are obtained by performing an activity analysis based on the historical mattress pressure value sequence; By summing the pressure activity values ​​corresponding to each standard pixel, multiple pressure activity values ​​are obtained; The standard pressure image template is updated with pixel values ​​using multiple pressure activity values ​​to obtain a pressure activity image, which includes multiple pressure pixels. Active regions are identified based on pressure activity images to obtain pressure detection regions, and pressure detection intervals are calculated based on these regions. By merging the pressure detection area and the pressure detection interval, the current sleep iteration parameters are obtained.

3. The method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring as described in claim 2, characterized in that, The active pressure value is obtained by performing an active analysis based on the historical mattress pressure value sequence, including: Historical mattress pressure values ​​are extracted sequentially from the historical mattress pressure value sequence to determine the historical collection time of the extracted historical mattress pressure values; The duration of historical data collection is calculated by using the preset current detection time; The historical data collection duration is normalized to obtain the normalized data collection duration. The normalized collection duration corresponding to each historical mattress pressure value is summarized to obtain the normalized collection duration sequence. The pressure activity value is obtained by weighting the historical mattress pressure value sequence using the normalized collection time sequence.

4. The method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring as described in claim 3, characterized in that, The calculation of the pressure detection interval based on the pressure detection area includes: Based on the pressure detection area, the pixel position statistics of the region are performed to obtain the current active pixel set, which includes multiple current active pixels; Identify historical active pixel sets and historical detection intervals based on the current detection time; Extract the current active pixels sequentially from the current active pixel set, and obtain the current active position corresponding to the extracted current active pixel; Determine if the current active location exists within the set of historical active pixels; If the current active position exists in the set of historical active pixels, then the extracted current active pixel is recorded as an overlapping pixel. By summing up the overlapping pixels, we obtain the set of overlapping pixels; Count the number of overlapping pixels in the overlapping pixel set and the number of active pixels in the currently active pixel set respectively; The active overlap degree is calculated based on the number of overlapping pixels and the number of active pixels. The pressure detection interval is obtained by adjusting the historical detection interval using the active overlap and the preset historical overlap.

5. The method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring as described in claim 4, characterized in that, The process of identifying the current sleep posture based on the current sleep iteration parameters and the original pressure detection device to obtain the current sleep posture includes: The original pressure detection device is set with the current sleep iteration parameters to obtain the current pressure detection device. Pressure detection is performed based on the current pressure detection device to obtain a target pressure distribution image sequence. The target pressure distribution image sequence includes multiple target pressure distribution images, and each target pressure distribution image corresponds to a pressure acquisition time. Obtain a sleep posture pressure image library, which includes multiple sleep posture pressure images, and each sleep posture pressure image corresponds to a user's sleep posture. The current sleep posture is obtained by recognizing the target pressure distribution image sequence and the sleep posture pressure image database.

6. The method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring as described in claim 5, characterized in that, The step of obtaining a target pressure distribution image sequence based on the current pressure detection device includes: Multiple working pressure sensors in the current pressure detection device were identified; Acquire multiple working pressure detection positions corresponding to multiple working pressure sensors, and identify multiple idle pressure detection positions in the permanent magnet mattress to be controlled based on the multiple working pressure detection positions. Based on the preset initial acquisition time and multiple working pressure sensors, pressure is acquired to obtain multiple current mattress pressure values, where each current mattress pressure value corresponds one-to-one with a working pressure sensor. The pressure values ​​of the standard pressure image template are imported using multiple working pressure detection locations, multiple idle pressure detection locations, multiple current mattress pressure values, and preset empty pressure values ​​to obtain an updated pressure distribution image. The target pressure distribution image is obtained by labeling the updated pressure distribution image based on the initial acquisition time. The iteration acquisition time is determined based on the initial acquisition time and the pressure detection interval in the current sleep iteration parameters; The iterative acquisition time is taken as the initial acquisition time, and the steps of pressure acquisition based on the preset initial acquisition time and multiple working pressure sensors are returned until the preset periodic acquisition end command is received. The target pressure distribution images are summarized to obtain a target pressure distribution image sequence.

7. The method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring as described in claim 6, characterized in that, The step of recognizing the current sleep posture based on the target pressure distribution image sequence and the sleep posture pressure image database includes: Identify the most recent pressure distribution image and the preceding pressure distribution image sequence in the target pressure distribution image sequence; For each sleep posture stress image in the sleep posture stress image library, the following operations are performed: Image similarity is calculated based on sleep posture pressure images and recent pressure distribution images to obtain recent posture similarity; Similarity calculations were performed on sleep posture pressure images and preceding pressure distribution image sequences to obtain a preceding posture similarity sequence. The target pose similarity is obtained by weighting the most recent pose similarity using the preceding pose similarity sequence; The target pose similarity corresponding to each sleep posture pressure image is summarized to obtain multiple target pose similarities; Determine the maximum pose similarity among multiple target pose similarities, and record the user's sleep pose corresponding to the maximum pose similarity as the current sleep pose.

8. The method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring as described in claim 7, characterized in that, The process of matching massage intensity based on current muscle tension and baseline massage data to obtain the target massage intensity includes: Determine whether the current detection time falls within the preset sleep period; If the current detection time is not during the sleep period, the baseline massage intensity is adjusted using the current muscle tension and the baseline muscle tension in the baseline massage data to obtain the target massage intensity. If the current detection time is within the sleep period, the baseline massage intensity is updated using the preset sleep massage intensity to obtain the target massage intensity.

9. The method for matching neck massage intensity on a permanent magnet mattress based on parameter monitoring as described in claim 8, characterized in that, The process of adjusting the baseline massage intensity using the current muscle tension and the baseline muscle tension in the baseline massage data to obtain the target massage intensity includes: Calculate the target massage intensity using the following formula: in, Indicates the target massage intensity. Indicates the baseline massage intensity. This represents a logarithmic function with the natural constant as its base. Indicates the current muscle tension. This indicates the baseline muscle tension.

10. A neck massage intensity matching system for a permanent magnet mattress based on parameter monitoring, characterized in that, The system includes: The sleep parameter calculation module is used to identify the permanent magnet mattress to be controlled. The permanent magnet mattress to be controlled includes a permanent magnet massage device, a neck electromyography detection device, and a raw pressure detection device. It receives a massage intensity matching command and obtains the current sleep iteration parameters based on the massage intensity matching command. The current sleep iteration parameters include the pressure detection interval and the pressure detection area. The sleep posture recognition module is used to identify the current sleep posture based on the current sleep iteration parameters and the original pressure detection device, and obtain the current sleep posture. The muscle data acquisition module is used to acquire electromyography (EMG) data based on the neck EMG detection device, obtain the current EMG data, perform muscle tension analysis using the current EMG data to obtain the current muscle tension level, and identify the baseline massage data in the pre-built user-adaptive massage database based on the current sleeping posture and the current muscle tension level. The baseline massage data includes: baseline massage intensity and baseline muscle tension. The massage device adjustment module is used to match the massage intensity based on the current muscle tension and the baseline massage data to obtain the target massage intensity. The permanent magnet massage device is then adjusted using the target massage intensity to obtain an adjustable massage device.