Sleeping posture detection method and device based on intelligent mattress

By integrating the pressure capacitance sensor and main control circuit on the smart mattress, using the maximum difference calculation and preset threshold judgment, the rapid and accurate identification of the changes in sleeping postures of different groups of people is achieved, and the existing sleeping posture detection methods are solved, which is the problem of low accuracy and high sensor complexity, and the sleep experience and device reliability are improved.

CN119924820APending Publication Date: 2025-05-06SHENZHEN HONGXING MENGSI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510083839.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The existing sleeping position detection methods have low accuracy and low applicability, and high sensor complexity, high cost and high failure rate.

Method used

The sleeping posture detection method based on smart mattresses is adopted, and the pressure capacitance sensor and main control circuit are used to calculate the maximum difference and judge the preset threshold, so as to achieve rapid and accurate identification of the sleeping posture changes of different groups of people.

Benefits of technology

It improves the accuracy and efficiency of sleeping posture detection, reduces the complexity and cost of sensors, reduces the failure rate, and improves the user's sleep experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119924820A_ABST
    Figure CN119924820A_ABST
Patent Text Reader

Abstract

The invention discloses a sleeping posture detection method and device based on an intelligent mattress, and the method comprises the steps: obtaining current sensor data through a pressure-volume sensor, and transmitting the current sensor data to a main control circuit; performing maximum difference calculation on the current sensor data and the reference sensor data through a microprocessor in the main control circuit to obtain current maximum difference data; whether a user exists on the intelligent mattress or not is judged through the microprocessor according to the current maximum difference value data and a preset sleeping posture judgment threshold value; if it is judged that the user exists on the intelligent mattress, the microprocessor detects the sleeping posture of the user according to the current maximum difference value data and a preset sleeping posture judgment threshold value, and a sleeping posture detection result is obtained. According to the invention, sleeping posture changes of different people can be quickly and accurately identified, so that the accuracy and efficiency of sleeping posture detection are improved, the sleeping experience of the user is improved, and the method can be widely applied to the technical field of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a sleeping posture detection method and device based on a smart mattress. Background Art

[0002] In the related art, there are methods for detecting the sleeping posture of a human body. The current sleeping posture detection methods mainly include detection methods based on the pressure width of different sleeping postures of the human body and sleeping posture detection methods based on a pressure sensing matrix. However, the detection method based on the pressure width of different sleeping postures of the human body has low accuracy and low applicability in detecting the sleeping posture of the human body; the sleeping posture detection method based on the pressure sensing matrix has many sensing points, which makes the sensor too complicated and costly, and too many sensing points are prone to high failure rates.

[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention

[0004] The embodiments of the present application aim to solve at least one of the technical problems in the related art to a certain extent. To this end, the main purpose of the embodiments of the present application is to propose a sleeping posture detection method and device based on a smart mattress, which can quickly and accurately identify the sleeping posture changes of different groups of people, thereby improving the accuracy and efficiency of sleeping posture detection, and further improving the user's sleeping experience.

[0005] To achieve the above-mentioned purpose, one aspect of an embodiment of the present application proposes a sleeping posture detection method based on a smart mattress, which is applied to a smart mattress. A sleeping posture detection device is provided in the shoulder and back pressure distribution area of ​​the smart mattress. The sleeping posture detection device integrates a pressure-capacitive sensor and a main control circuit. The method comprises the following steps:

[0006] Acquire current sensor data through the pressure-capacitive sensor, and send the current sensor data to the main control circuit;

[0007] The microprocessor in the main control circuit calculates the maximum difference between the current sensor data and the reference sensor data to obtain current maximum difference data;

[0008] The microprocessor determines whether there is a user on the smart mattress according to the current maximum difference data and a preset sleeping posture judgment threshold;

[0009] If it is determined that there is a user on the smart mattress, the microprocessor performs sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold to obtain a sleeping posture detection result.

[0010] In some embodiments, before acquiring current sensor data through the pressure-capacitive sensor and sending the current sensor data to the main control circuit, the method further includes:

[0011] Acquire initial sensor data of the smart mattress when it is initially powered on through the pressure-capacitance sensor, and send the initial sensor data to the main control circuit;

[0012] The microprocessor in the main control circuit calculates the average value of the initial sensor data to obtain initial average value data;

[0013] The microprocessor performs maximum difference calculation based on the initial average value data and the initial sensor data to obtain initial maximum difference data;

[0014] The reference sensor data is determined by the microprocessor according to the initial maximum difference data and a preset reference deviation threshold.

[0015] In some embodiments, determining the reference sensor data according to the initial maximum difference data and a preset reference deviation threshold by the microprocessor includes:

[0016] Determining by the microprocessor whether a plurality of initial maximum difference sub-data in the initial maximum difference data have data consistency according to the initial maximum difference data and the preset reference deviation threshold;

[0017] If the value corresponding to each of the initial maximum difference sub-data is greater than or equal to the preset reference deviation threshold, it is determined that some of the initial maximum difference sub-data in the initial maximum difference data do not have data consistency, and the process returns to the step of obtaining the initial sensor data of the smart mattress at the time of initial power-on through the pressure-capacitance sensor, and sending the initial sensor data to the main control circuit, until the value corresponding to each of the initial maximum difference sub-data is less than the preset reference deviation threshold;

[0018] If the value corresponding to each of the initial maximum difference sub-data is smaller than the preset reference deviation threshold, it is determined that several of the initial maximum difference sub-data in the initial maximum difference data have data consistency, and the initial sensor data is used as the reference sensor data.

[0019] In some embodiments, the determining whether there is a user on the smart mattress by the microprocessor according to the current maximum difference data and a preset sleeping posture determination threshold comprises:

[0020] In the control process of the microprocessor, if the value corresponding to the current maximum difference data is greater than or equal to the preset lying-flat threshold, it is determined that there is a user on the smart mattress;

[0021] If the value corresponding to the current maximum difference data within the target time period is less than the preset lying-flat threshold, it is determined that there is no user on the smart mattress.

[0022] In some embodiments, the sleeping posture detection result includes a side-lying sleeping posture and a flat-lying sleeping posture. If it is determined that there is a user on the smart mattress, the microprocessor performs a sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold, and obtains a sleeping posture detection result, including:

[0023] In the control process of the microprocessor, if there is a user on the smart mattress and the value corresponding to the current maximum difference data is greater than or equal to the preset lying flat threshold, the sleeping posture state corresponding to the user is determined according to the current maximum difference data and the preset lying side threshold;

[0024] If the value corresponding to the current maximum difference data is greater than or equal to the preset side-lying threshold, determining that the sleeping posture state corresponding to the user is the side-lying sleeping posture;

[0025] If the value corresponding to the current maximum difference data is smaller than the preset side-lying threshold, it is determined that the sleeping posture state corresponding to the user is the lying flat sleeping posture.

[0026] In some embodiments, a leg lifting device is provided in the mattress leg support area inside the smart mattress, and an air bag is embedded in the leg lifting device. If it is determined that there is a user on the smart mattress, the microprocessor performs a sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold. After obtaining the sleeping posture detection result, the method further includes:

[0027] When the user's sleeping posture is a lying posture, the microprocessor in the main control circuit sends an airbag inflation instruction to the leg lifting device;

[0028] The leg lifting device inflates the airbag according to the airbag inflation instruction, so that the leg lifting device is in a raised state on the smart mattress.

[0029] In some embodiments, if it is determined that there is a user on the smart mattress, the microprocessor performs sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold, and after obtaining the sleeping posture detection result, the method further includes:

[0030] When the user's sleeping posture is side-lying and the leg lifting device is in a raised state on the smart mattress, an airbag deflation instruction is sent to the leg lifting device through the microprocessor in the main control circuit;

[0031] The leg lifting device is used to deflate the airbag according to the airbag deflation instruction, so that the leg lifting device is in a flat state on the smart mattress.

[0032] To achieve the above purpose, another aspect of the embodiment of the present application proposes a sleeping posture detection device based on a smart mattress, which is applied to a smart mattress. A sleeping posture detection device is provided in the shoulder and back pressure distribution area of ​​the smart mattress. The sleeping posture detection device integrates a pressure-capacitive sensor and a main control circuit. The device includes the following modules:

[0033] A current sensor data acquisition module, used to acquire current sensor data through the pressure-capacitive sensor and send the current sensor data to the main control circuit;

[0034] A current maximum difference data calculation module, used for calculating the maximum difference between the current sensor data and the reference sensor data through a microprocessor in the main control circuit to obtain the current maximum difference data;

[0035] A mattress usage judgment module, used for judging whether there is a user on the smart mattress according to the current maximum difference data and a preset sleeping posture judgment threshold through the microprocessor;

[0036] The sleeping posture detection module is used to, if it is determined that there is a user on the smart mattress, perform sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold through the microprocessor to obtain a sleeping posture detection result.

[0037] To achieve the above objective, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned method when executing the computer program.

[0038] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0039] The embodiments of the present application include at least the following beneficial effects: the present application provides a sleeping posture detection method and device based on a smart mattress, the scheme is applied to a smart mattress, a sleeping posture detection device is provided in the shoulder and back pressure distribution area of ​​the mattress inside the smart mattress, the sleeping posture detection device is integrated with a pressure-capacitive sensor and a main control circuit, the scheme obtains current sensor data through the pressure-capacitive sensor, and sends the current sensor data to the main control circuit; the microprocessor in the main control circuit performs a maximum difference calculation on the current sensor data and the reference sensor data to obtain the current maximum difference data; the microprocessor determines whether there is a user on the smart mattress according to the current maximum difference data and a preset sleeping posture judgment threshold; if it is determined that there is a user on the smart mattress, the microprocessor performs sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold to obtain a sleeping posture detection result. The embodiment of the present application obtains data of the shoulder and back pressure distribution area through a pressure-capacitive sensor, which can more accurately identify the changes in sleeping positions of different people, avoid the misjudgment problem caused by traditional sleeping position detection methods, and thus improve the accuracy of sleeping position detection; by using a pressure-capacitive sensor to obtain data, the sensing points of the sensor in the traditional sleeping position detection method are reduced, thereby reducing the complexity and cost of the sensor, making the smart mattress more economical and practical. Due to the reduction in sensing points, the corresponding failure rate will also be reduced, thereby improving the overall reliability and stability of the smart mattress; through the real-time processing of sensor data by the microprocessor in the main control circuit, it is possible to quickly and accurately determine whether there is a user on the mattress, and perform real-time detection of the user's sleeping position, so that personalized sleeping position detection can be achieved according to the sleeping posture characteristics of different users, thereby improving the user's sleep experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a flowchart of the steps of a sleeping posture detection method based on a smart mattress provided in an embodiment of the present application;

[0041] Figure 2 is a schematic diagram of device distribution on a smart mattress provided in an embodiment of the present application;

[0042] Figure 3 is a schematic diagram of the packaging of the sensing unit in the pressure-capacitive sensor provided in an embodiment of the present application;

[0043] Figure 4 is a schematic diagram of the internal structure of the smart mattress provided in an embodiment of the present application;

[0044] Figure 5 is a circuit connection diagram of a pressure-capacitive sensor provided in an embodiment of the present application;

[0045] Figure 6 It is a schematic diagram of a process for obtaining a sensor reference value when a smart mattress provided by an embodiment of the present application is powered on;

[0046] Figure 7 It is a logical diagram of sleeping posture judgment based on a smart mattress provided in an embodiment of the present application;

[0047] Figure 8 is a schematic diagram of adjusting the leg lifting device when lying flat on a smart mattress provided by an embodiment of the present application;

[0048] Fig. 9 is a schematic diagram of adjusting the leg lifting device when lying sideways on a smart mattress provided by an embodiment of the present application;

[0049] Fig.10 is a schematic diagram of raising the smart mattress when lying flat on the smart mattress provided by an embodiment of the present application;

[0050] Fig.11 is a schematic diagram of laying the smart mattress flat when lying on the side on the smart mattress provided by an embodiment of the present application;

[0051] Fig.12 is a structural schematic diagram of a sleeping posture detection device based on a smart mattress provided in an embodiment of the present application;

[0052] Fig.13 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0054] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0055] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0057] In the related technology, there are methods for detecting the sleeping posture of a human body. The current sleeping posture detection methods mainly include detection methods based on the compression width of a human body in different sleeping postures and sleeping posture detection methods based on a pressure sensing matrix. However, the detection method based on the compression width of a human body in different sleeping postures has a low accuracy rate and low applicability in detecting the sleeping posture of a human body, that is, the compression width of different people may be different, which may easily lead to misjudgment; the sleeping posture detection method based on a pressure sensing matrix has many sensing points, which makes the sensor too complicated and costly, and too many sensing points may easily lead to a high failure rate.

[0058] In view of this, a sleeping posture detection method and device based on a smart mattress are provided in an embodiment of the present application. The scheme is applied to a smart mattress, and a sleeping posture detection device is provided in the shoulder and back pressure distribution area of ​​the mattress inside the smart mattress. The sleeping posture detection device is integrated with a pressure-capacitive sensor and a main control circuit. The scheme obtains current sensor data through the pressure-capacitive sensor and sends the current sensor data to the main control circuit; the microprocessor in the main control circuit performs a maximum difference calculation on the current sensor data and the reference sensor data to obtain the current maximum difference data; the microprocessor determines whether there is a user on the smart mattress according to the current maximum difference data and a preset sleeping posture judgment threshold; if it is determined that there is a user on the smart mattress, the microprocessor performs sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold to obtain a sleeping posture detection result. The embodiment of the present application obtains data of the shoulder and back pressure distribution area through a pressure-capacitive sensor, which can more accurately identify the changes in sleeping positions of different people, avoid the misjudgment problem caused by traditional sleeping position detection methods, and thus improve the accuracy of sleeping position detection; by using a pressure-capacitive sensor to obtain data, the sensing points of the sensor in the traditional sleeping position detection method are reduced, thereby reducing the complexity and cost of the sensor, making the smart mattress more economical and practical. Due to the reduction in sensing points, the corresponding failure rate will also be reduced, thereby improving the overall reliability and stability of the smart mattress; through the real-time processing of sensor data by the microprocessor in the main control circuit, it is possible to quickly and accurately determine whether there is a user on the mattress, and perform real-time detection of the user's sleeping position, so that personalized sleeping position detection can be achieved according to the sleeping posture characteristics of different users, thereby improving the user's sleep experience.

[0059] The sleeping posture detection method based on the smart mattress provided in the embodiment of the present application relates to the field of data processing technology. The sleeping posture detection method based on the smart mattress provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server, and can also be software running in the terminal or the server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or it can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network) and big data and artificial intelligence platforms and other basic cloud computing services. The cloud server, the server can also be a node server in the blockchain network; the software can be an application that implements the sleeping posture detection method based on the smart mattress, etc., but is not limited to the above forms.

[0060] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs (Personal Computers, personal computers), minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0061] See also Figure 1 , Figure 1 is an optional step flow chart of the sleeping posture detection method based on the smart mattress provided in the embodiment of the present application. Figure 1 The method is applied to a smart mattress, wherein a sleeping posture detection device is provided in the shoulder and back pressure distribution area of ​​the smart mattress, and the sleeping posture detection device integrates a pressure-capacitive sensor and a main control circuit. Figure 1 The method may include but is not limited to steps S101 to S104.

[0062] Step S101, obtaining current sensor data through the pressure-capacitive sensor, and sending the current sensor data to the main control circuit;

[0063] In the embodiment of the present application, a sleeping posture detection device is provided in the shoulder and back pressure distribution area of ​​the smart mattress, and the sleeping posture detection device integrates a pressure-capacitive sensor and a main control circuit. The pressure-capacitive sensor is used to collect sensor data and send it to the main control circuit, and finally the sleeping posture analysis is performed in the microprocessor of the main control circuit to obtain the sleeping posture detection result.

[0064] The shoulder and back pressure distribution area of ​​the mattress refers to the upper area of ​​the human body trunk formed by the shoulders and upper back of the human body. In actual applications, the shoulders and upper back constitute the upper part of the human body trunk. Based on the principle of ergonomics, when the human body lies flat on the mattress, the weight of the shoulders and back is supported by the larger surface of the back, and the pressure at the corresponding position of the mattress is small; when the human body lies on the mattress sideways, because the shoulder joint (relative to the torso) is convex, the weight of the shoulders and back of the human body is supported by the smaller surface of the shoulder joint and the surrounding area, and the pressure at the corresponding position of the mattress is large. Therefore, by setting a sleeping posture detection device at the upper part of the human body trunk corresponding to the shoulder and back pressure distribution area of ​​the smart mattress, the changes in the sleeping posture of the human body can be detected more accurately.

[0065] Optionally, a leg lifting device is provided in the mattress leg supporting area inside the smart mattress, and an air bag is embedded in the leg lifting device, wherein the mattress leg supporting area mainly refers to the calf area of ​​the human body.

[0066] See also Figure 2 , Figure 2 Schematic diagram of the device distribution on the smart mattress provided in the embodiment of the present application; Figure 2 As shown, Figure 2 Schematic diagram of a smart mattress. When a person lies on the mattress, a rectangular strip pressure sensor is placed in the mattress below the shoulder along the width of the mattress. The closest distance between the pressure sensor and the upper edge of the mattress is H1, which can be set in the range of 35cm to 45cm (can be set according to actual conditions); the width W of the rectangular strip pressure sensor is in the range of 8cm to 25cm (can be set according to actual conditions), and the length L1 is in the range of 40cm to 70cm (can be set according to actual conditions); optionally, a leg lifting device is provided in the mattress leg support area inside the smart mattress, and an air bag is embedded in the leg lifting device, wherein the mattress leg support area mainly refers to the human calf area, such as Figure 2As shown, the closest distance between the leg airbag and the lower edge of the mattress is H2, and the distance H2 can be set according to actual conditions; the range of the length L2 of the leg airbag can be set according to actual conditions, and similarly, the length of the leg airbag can also be set according to actual conditions. In an embodiment of the present application, for a mattress with a width less than 150 cm, there is 1 built-in sensor and 1 leg airbag; for a mattress with a width greater than or equal to 150 cm, there are 2 built-in sensors (i.e., 1 on the left and 1 on the right), and there are 2 leg airbags (i.e., 1 on the left and 1 on the right), wherein there needs to be a spacing d1 between the left and right sensors and d1>=5 cm, and the range of the spacing d2 between the left and right leg airbags can be set according to actual conditions. It should be noted that Figure 2 The left side and the right side in the text refer to the original left and right sides of the mattress. In the embodiment of the present application, the description is mainly based on a mattress with a width less than 150 cm. It can be understood that the data processing method for a mattress with a width greater than or equal to 150 cm is the same, and the embodiment of the present application will not be repeated here.

[0067] See also Figure 3 , Figure 3 is a schematic diagram of the packaging of the sensing unit in the pressure-capacitive sensor provided in the embodiment of the present application; Figure 3 As shown, Figure 3 The serial number 001 in the figure indicates a rectangular pressure sensor. A rectangular pressure sensor contains N (N>1) sensing units, which are arranged in a single row along the length direction. Each unit can sense and output data independently. The rectangular pressure sensor in the embodiment of the present application mainly adopts a pressure-capacitive sensor. Please refer to Figure 4 , Figure 4 Schematic diagram of the internal structure of the smart mattress provided in the embodiment of the present application; Figure 4 As shown, Figure 4 The serial number 100 in the figure indicates a smart mattress. The mattress layers of the smart mattress mainly include a surface layer, a comfort layer, a spring layer and a bottom layer. The bottom surface of the pressure sensor is attached to a substrate layer. A flat high-density sponge or cotton sticky is used as the substrate layer. The pressure sensor and the substrate layer bonding body are placed in the flexible comfort layer between the spring layer and the surface layer of the mattress. In addition, Figure 4 The serial number 200 in the figure represents a leg lifting device, which is realized by embedding an air bag in the mattress.

[0068] In the embodiment of the present application, the rectangular pressure sensor is a capacitive pressure sensor, and the capacitance of the sensor increases as the pressure increases, and conversely, the capacitance of the sensor decreases as the pressure decreases. It should be noted that the alternative rectangular pressure sensor may also be a piezoresistive sensor, and the resistance of the piezoresistive sensor decreases as the pressure increases, and conversely, the resistance of the sensor increases as the pressure decreases.

[0069] It should be noted that the pressure-capacitive sensor can be implemented using a combination of an airbag and an air pressure sensor, that is, an airbag and an air pressure sensor are used at the position of the pressure-capacitive sensor designed in the embodiment of the present application to obtain the change in the air pressure value of the airbag to calculate the sleeping position of the human body.

[0070] See also Figure 5 , Figure 5 is a circuit connection diagram of a pressure-capacitive sensor provided in an embodiment of the present application; Figure 5 To explain the circuit connection of the pressure sensor for a mattress with a width of >= 150 cm and two built-in sensors, the pressure sensor uses a pressure-capacitive sensor (left sensor and right sensor), such as Figure 5 As shown, each sensing point in the same pressure-capacitive sensor is an independent capacitor, and one of the electrodes of the capacitors is connected together and connected to the common terminal com (i.e. Figure 5 The other pole of the capacitor has an independent electrical interface connection in the capacitance value acquisition circuit (i.e. Figure 5 C1_1, C1_2, ..., C1_n, C2_1, C2_2, ..., C2_n) shown in the figure; there is a data converter chip (data converter) in the capacitance value acquisition circuit, which contains the main functions such as amplifier, analog-to-digital conversion circuit and data transmission interface. The capacitance value change is converted into digital change through the data converter and then the capacitance value data of each sensing point is sent to the MCU (Microcontroller Unit) processor of the main control circuit through the data transmission interface for summary calculation to determine the sleeping position of the human body on the mattress. Among them, the MCU processor is referred to as a microprocessor in the following text.

[0071] In some embodiments, before step S101, the method may further include: obtaining initial sensor data of the smart mattress when it is initially powered on by a pressure-capacitive sensor, and sending the initial sensor data to a main control circuit; calculating the average value of the initial sensor data by a microprocessor in the main control circuit to obtain initial average value data; calculating the maximum difference by the microprocessor based on the initial average value data and the initial sensor data to obtain initial maximum difference data; and determining the reference sensor data by the microprocessor based on the initial maximum difference data and a preset reference deviation threshold.

[0072] In some specific embodiments, the step of determining the reference sensor data according to the initial maximum difference data and the preset reference deviation threshold by the microprocessor may include: judging by the microprocessor whether several initial maximum difference sub-data in the initial maximum difference data have data consistency according to the initial maximum difference data and the preset reference deviation threshold; if the numerical value corresponding to each initial maximum difference sub-data is greater than or equal to the preset reference deviation threshold, judging that several initial maximum difference sub-data in the initial maximum difference data do not have data consistency, and returning to execute the step of obtaining the initial sensor data of the smart mattress at the time of initial power-on through the pressure-capacitive sensor, and sending the initial sensor data to the main control circuit until the numerical value corresponding to each initial maximum difference sub-data is less than the preset reference deviation threshold; if the numerical value corresponding to each initial maximum difference sub-data is less than the preset reference deviation threshold, judging that several initial maximum difference sub-data in the initial maximum difference data have data consistency, and using the initial sensor data as the reference sensor data.

[0073] The initial sensor data refers to the sensor data of the smart mattress when it is initially powered on. When the mattress is initially powered on, it is assumed that no one is on the mattress, and the baseline data can be acquired based on the situation where no one is on the mattress.

[0074] See also Figure 6 , Figure 6 is a schematic diagram of the process of obtaining the sensor reference value when the smart mattress provided by the embodiment of the present application is powered on; Figure 6 As shown, assuming that the smart mattress is equipped with a pressure-capacitive sensor, taking one sensor as an example, the data of each sensing point of the pressure-capacitive sensor is read by the microprocessor every △T time, and the data baseline value of each sensing point is recorded when the data at the same time has stable consistency. Specifically, the specific implementation process of obtaining the reference sensor data is as follows: first, the smart mattress is powered on, and it is assumed that there is no one on the mattress when powered on. At the same time, the data of each sensing point of the pressure-capacitive sensor (Data1_1, Data1_2, ..., Data1_n) is read every △T time; then, the arithmetic mean of the data of each sensing point of the pressure-capacitive sensor is calculated. ( Figure 6 In Next, calculate the data of each sensing point and the arithmetic mean The absolute deviation of the sensor is obtained, and then the maximum deviation value Max1 is obtained; finally, the reference sensor data Dref is obtained according to the maximum deviation value Max1. (preset reference deviation threshold, indicating the threshold of the absolute deviation of the sensor on one side of the mattress, the specific value of △D1 is set according to the actual sensitivity of the sensor) is true (that is, when the deviation of each data is less than the threshold △D1, it means that the sensor is stable and each sensing point is consistent), and then the data reference value Dref of each sensing point can be recorded (that is, Dref1_1=Data1_1, Dref1_2=Data1_2, ..., Dref1_n=Data1_n); In addition, if the maximum deviation value Max1>=△D1, then return to the step of reading the data Data of each sensing point of the pressure-capacitive sensor every △T time until the maximum deviation value Max1<△D1 to obtain the reference sensor data Dref. Among them, Dref represents the data reference value of the sensor's sensing point when no one is there; Data represents the data of the sensor's sensing point; When the mattress has only one sensor, it is expressed as the average value of all sensing points of the sensor; when the mattress has two sensors, It can be used to represent the average value of all sensing point data of the sensor on the right side of the mattress. It can be used to represent the average value of all sensing point data of the sensor on the left side of the mattress; △D1 represents the threshold of the absolute deviation of the sensor when the mattress has only one sensor; when the mattress has two sensors, △D1 can be used to represent the threshold of the absolute deviation of the sensor on the right side of the mattress, and the specific number of △D1 is set according to the actual sensitivity of the sensor; △D2 can be used to represent the threshold of the absolute deviation of the sensor on the left side of the mattress, and the specific number of △D2 is set according to the actual sensitivity of the sensor. In the embodiment of the present application, the setting of the parameter naming can be set according to the actual situation, and the embodiment of the present application does not limit this.

[0075] Step S102, calculating the maximum difference between the current sensor data and the reference sensor data by the microprocessor in the main control circuit to obtain current maximum difference data;

[0076] See also Figure 7 , Figure 7 is a schematic diagram of the sleeping posture judgment logic based on the smart mattress provided in the embodiment of the present application; Figure 7As shown, in the process of judging the sleeping posture, the data of each sensing point of the pressure-capacitive sensor is read by the microprocessor of the main control circuit, and the difference Dif between each sensing point data Data and the reference value Dref of each sensing point is calculated, and the maximum difference Max in the sensor data is screened. By comparing the maximum difference Max1 with the threshold value of human body lying flat and the threshold value of human body lying on the side, it is judged whether there is a person or no one on the mattress, and whether the user is lying on the side or lying flat when there is a person on the bed. Specifically, the data Data (Data1_1, Data1_2, ..., Data1_n) of each sensing point of the pressure-capacitive sensor is read by the microprocessor of the main control circuit every △T time; then, the difference Dif between each sensing point data Data of the pressure-capacitive sensor and the reference sensor data Dref is calculated (Dif1_1=Data1_1-Dref1_1, Dif1_2=Data1_2-Dref1_2, ..., Dif1_n=Data1_n-Dref1_n); then, the maximum deviation Max1 in the difference Dif is calculated.

[0077] Step S103, determining whether there is a user on the smart mattress by the microprocessor according to the current maximum difference data and a preset sleeping posture determination threshold;

[0078] In some embodiments, step S103 may include: in the control processing of the microprocessor, if the value corresponding to the current maximum difference data is greater than or equal to the preset lying flat threshold, it is judged that there is a user on the smart mattress; if the value corresponding to the current maximum difference data within the target time period is less than the preset lying flat threshold, it is judged that there is no user on the smart mattress.

[0079] like Figure 7As shown, in the process of judging the sleeping posture, the data of each sensing point of the pressure-capacitive sensor is read by the microprocessor of the main control circuit, the difference Dif=Data-Dref between the data Data of each sensing point and the reference value Dref of each sensing point is calculated, and the maximum difference Max in the sensor data is screened. By comparing the maximum difference Max1 with the threshold value of human body lying flat and the threshold value of human body lying on the side, it is judged whether there is someone on the mattress or not, and whether the user is lying on the side or lying flat when there is someone on the bed. Specifically, the microprocessor of the main control circuit reads the data Data (Data1_1, Data1_2, ..., Data1_n) of each sensing point of the pressure-capacitive sensor at every △T time; then, the difference Dif between the data Data of each sensing point of the pressure-capacitive sensor and the reference sensor data Dref is calculated (Dif1_1=Data1_1-Dref1_1, Dif1_2=Data1_2-Dref1_2, ..., Dif1_n=Data1_n-Dref1_n); then, the maximum deviation Max1 in the difference Dif is calculated; finally, the maximum difference Max1 is compared with the threshold value of the human body lying flat to determine whether there is a person on the mattress or not, specifically: when the maximum difference Max1 is greater than or equal to the threshold value THback1 of the sensor when judging the human body lying flat, and the maximum difference Max1 is greater than or equal to the threshold value THside1 of the sensor when judging the human body lying sideways, It is determined that there is someone on the mattress and the sleeping position is lying on the side; when the maximum difference Max1 is greater than or equal to the threshold value THback1 of the sensor when judging the human body lying flat, and the maximum difference Max1 is less than the threshold value THside1 of the sensor when judging the human body lying on the side, it is determined that there is someone on the mattress and the sleeping position is lying flat; when the maximum difference Max1 is less than the threshold value THback1 of the sensor when judging the human body lying flat and the time that "maximum difference Max1<threshold value THback1" is satisfied exceeds the time threshold T, it is determined that no one is on the mattress; when the maximum difference Max1 is less than the threshold value THback1 of the sensor when judging the human body lying flat and the time that "maximum difference Max1<threshold value THback1" is not satisfied exceeds the time threshold T (T is the time threshold for judging that the human body is not on the bed), it returns to the step of reading the data Data of each sensing point of the pressure-capacitive sensor at every △T time through the microprocessor of the main control circuit.

[0080] Step S104, if it is determined that there is a user on the smart mattress, the microprocessor performs sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold to obtain a sleeping posture detection result.

[0081] Optionally, the sleeping posture detection result includes a side-lying sleeping posture and a flat-lying sleeping posture.

[0082] In some embodiments, step S104 may include: in the control processing of the microprocessor, if there is a user on the smart mattress, and the value corresponding to the current maximum difference data is greater than or equal to the preset lying flat threshold, the sleeping position corresponding to the user is judged according to the current maximum difference data and the preset side lying threshold; if the value corresponding to the current maximum difference data is greater than or equal to the preset side lying threshold, it is determined that the sleeping position corresponding to the user is the side lying position; if the value corresponding to the current maximum difference data is less than the preset side lying threshold, it is determined that the sleeping position corresponding to the user is the lying flat position.

[0083] like Figure 7 As shown, when the maximum difference Max1 is greater than or equal to the threshold THback1 of the sensor when judging the human body lying flat, and the maximum difference Max1 is greater than or equal to the threshold THside1 of the sensor when judging the human body lying sideways, it is determined that there is a person on the mattress and the sleeping position is lying sideways; when the maximum difference Max1 is greater than or equal to the threshold THback1 of the sensor when judging the human body lying flat, and the maximum difference Max1 is less than the threshold THside1 of the sensor when judging the human body lying sideways, it is determined that there is a person on the mattress and the sleeping position is lying flat; when the maximum difference Max1 is less than the threshold THback1 of the sensor when judging the human body lying flat and the time that "maximum difference Max1<threshold THback1" is satisfied exceeds the time threshold T, it is determined that no one is on the mattress; when the maximum difference Max1 is less than the threshold THback1 of the sensor when judging the human body lying flat and the time that "maximum difference Max1<threshold THback1" is not satisfied exceeds the time threshold T (T is the time threshold for judging that the human body is not on the bed), it returns to the step of reading the data Data of each sensing point of the pressure-capacitive sensor at every △T time through the microprocessor of the main control circuit.

[0084] The embodiment of the present application installs a pressure-capacitive sensor in a specific area of ​​the mattress (a limited range of the joint area of ​​the pillow and the shoulders when the human body lies down) to detect the pressure changes on the sensor when the human body is lying flat, lying on the side, and when no one is around, thereby judging the human body's sleeping position more effectively and accurately.

[0085] Optionally, a leg lifting device is provided in the mattress leg supporting area inside the smart mattress, and an air bag is embedded in the leg lifting device.

[0086] In some embodiments, after step S104, the method may further include: when the user's sleeping position is lying flat, sending an airbag inflation instruction to the leg lifting device through the microprocessor in the main control circuit; inflating the airbag according to the airbag inflation instruction through the leg lifting device, so that the leg lifting device is in a raised state on the smart mattress.

[0087] In some embodiments, after step S104, the following may also be included: when the user's sleeping position is side-lying and the leg lifting device is in a raised position on the smart mattress, an airbag deflation instruction is sent to the leg lifting device through the microprocessor in the main control circuit; the airbag is deflated by the leg lifting device according to the airbag deflation instruction to make the leg lifting device in a flat state on the smart mattress.

[0088] In the embodiment of the present application, by setting a leg lifting device (also called a leg lifting device) in the leg support area of ​​the mattress inside the smart mattress, the different needs of the human body for leg lifting in different sleeping positions can be met by controlling the leg lifting device. When the human body lies on the mattress, a lifting device is installed inside the mattress at the calf of the human body. When the device is lowered to a low position, the corresponding mattress surface remains flat; when the device is raised to a high position, the corresponding mattress surface bulges to lift the calf of the human body, thereby improving the user's comfort. Figure 2 As shown, the leg lifting device is realized by embedding an airbag in the mattress, the length of the airbag is L2, L2 is in the range of 50 to 70 cm (can be set according to actual conditions), the distance between the leg lifting device and the edge of the foot end of the mattress is H2, H2 is in the range of 40 to 60 cm (can be set according to actual conditions); assuming that on a mattress with a width of >= 150 cm, independent airbags are used on the left and right sides, and the interval between the left and right airbags is d2, d2>5 cm (can be set according to actual conditions).

[0089] In actual application, when the pressure sensor detects that there is no one on the mattress, the airbag deflates to keep the mattress flat. Figure 8 , Figure 8 is a schematic diagram of adjusting the leg lifting device when lying flat on the smart mattress provided by an embodiment of the present application, such as Figure 8 As shown, Figure 8 The serial number 100 in the figure indicates a smart mattress. Figure 8 The serial number 200 in the figure indicates a leg lifting device, which is implemented by an air bag embedded in the mattress. When the pressure sensor detects that someone is lying flat on the mattress, the air bag is inflated, and the corresponding upper surface of the mattress bulges to lift the calf (such as Figure 8 The convex state shown in the serial number 200 shown in the figure) makes it easier for the lower body fluid to return to improve the user's experience and comfort; please refer to Fig. 9 , Fig. 9 is a schematic diagram of adjusting the leg lifting device when lying sideways on a smart mattress provided by an embodiment of the present application, such as Fig. 9 As shown, Fig. 9 The serial number 100 in the figure indicates a smart mattress. Fig. 9The serial number 200 in the figure indicates a leg lifting device, which is implemented by an air bag embedded in the mattress. When the pressure sensor detects that someone is lying on the mattress, the air bag is deflated so that the lower limbs can be laid flat when lying on the side without generating lateral lifting pressure (such as Fig. 9 The flat state shown by the serial number 200 shown in the figure) makes the legs more comfortable when lying on the side, thereby improving the user's experience and comfort.

[0090] In the specific implementation, when the pressure sensor detects that there is no one on the mattress, the smart mattress can send a flattening message to the electric bed through wired communication or wireless communication, so that the electric bed can be put down and kept flat. Please refer to Fig.10 , Fig.10 is a schematic diagram of raising the smart mattress when lying flat on the smart mattress provided by an embodiment of the present application, such as Fig.10 As shown, when the pressure sensor detects that someone is lying flat on the mattress, the mattress sends a lifting message to the electric bed through wired communication or wireless communication, so that the electric bed legs are lifted up to make it easier for the lower limb fluid to return; please refer to Fig.11 , Fig.11 is a schematic diagram of laying the smart mattress flat when lying on the side on the smart mattress provided by an embodiment of the present application, such as Fig.11 As shown, when the pressure sensor detects that someone is sleeping on the mattress in a side-lying position, the mattress sends a flattening information to the electric bed through wired communication or wireless communication, so that the legs of the electric bed can be laid flat so that the lower limbs can be laid flat when lying on the side without generating lateral lifting stress, making the legs more comfortable when lying on the side.

[0091] In a specific implementation, by setting a leg lifting device in the leg support area of ​​the mattress inside the smart mattress, the leg lifting device can be controlled to meet the different needs of the human body for leg lifting in different sleeping positions. When the human body lies on the mattress, the corresponding mattress surface remains flat when the device is lowered to a low position, and the corresponding mattress surface bulges when the device is raised to a high position to lift the human calf, thereby improving the user's comfort and experience.

[0092] In the application after the sleeping position detection is realized, the current relevant technology is mainly to adjust the softness and hardness of the mattress corresponding to the shoulders, back, waist, buttocks, etc., and in the embodiment of the present application, by associating the human leg lifting function with the sleeping position, the different ergonomic requirements for the legs of the human body in different sleeping positions such as lying flat and lying on the side are met. When the human body lies flat, the calf is naturally raised to make it easier for blood to return to the leg to achieve comfortable and relaxed legs. When lying on the side, the calf is naturally flattened to better meet ergonomic and more comfortable requirements, thereby improving the user experience and comfort.

[0093] It is worth mentioning that the control method of setting a leg lifting device in the leg support area of ​​the mattress inside the smart mattress and controlling the lifting of the leg lifting device according to the sleeping posture state to improve the user experience and comfort can be applied to the sleeping posture detection method provided in the embodiment of the present application, and can also be widely applied to other related sleeping posture detection methods to determine the sleeping posture state. The control method of controlling the lifting of the leg lifting device according to the sleeping posture state to improve the user experience and comfort provided in the embodiment of the present application has wide applicability.

[0094] In steps S101 to S104 shown in the embodiment of the present application, current sensor data is obtained through a pressure-capacitive sensor, and the current sensor data is sent to a main control circuit; a microprocessor in the main control circuit performs maximum difference calculation on the current sensor data and the reference sensor data to obtain current maximum difference data; the microprocessor determines whether there is a user on the smart mattress based on the current maximum difference data and a preset sleeping posture judgment threshold; if it is determined that there is a user on the smart mattress, the microprocessor performs sleeping posture detection on the user based on the current maximum difference data and the preset sleeping posture judgment threshold to obtain a sleeping posture detection result. The embodiment of the present application obtains data of the shoulder and back pressure distribution area through a pressure-capacitive sensor, which can more accurately identify the changes in sleeping positions of different people, avoid the misjudgment problem caused by traditional sleeping position detection methods, and thus improve the accuracy of sleeping position detection; by using a pressure-capacitive sensor to obtain data, the sensing points of the sensor in the traditional sleeping position detection method are reduced, thereby reducing the complexity and cost of the sensor, making the smart mattress more economical and practical. Due to the reduction in sensing points, the corresponding failure rate will also be reduced, thereby improving the overall reliability and stability of the smart mattress; through the real-time processing of sensor data by the microprocessor in the main control circuit, it is possible to quickly and accurately determine whether there is a user on the mattress, and perform real-time detection of the user's sleeping position, so that personalized sleeping position detection can be achieved according to the sleeping posture characteristics of different users, thereby improving the user's sleep experience.

[0095] See also Fig.12 The embodiment of the present application also provides a sleeping posture detection device 1200 based on a smart mattress, which can implement the above-mentioned sleeping posture detection method based on a smart mattress. The device 1200 is applied to a smart mattress, and a sleeping posture detection device is provided in the shoulder and back pressure distribution area of ​​the mattress inside the smart mattress. The sleeping posture detection device integrates a pressure-capacitive sensor and a main control circuit. The device includes the following modules:

[0096] A current sensor data acquisition module 1201 is used to acquire current sensor data through the pressure-capacitive sensor and send the current sensor data to the main control circuit;

[0097] The current maximum difference data calculation module 1202 is used to calculate the maximum difference between the current sensor data and the reference sensor data through the microprocessor in the main control circuit to obtain the current maximum difference data;

[0098] A mattress usage determination module 1203 is used to determine whether there is a user on the smart mattress according to the current maximum difference data and a preset sleeping posture determination threshold value through the microprocessor;

[0099] The sleeping posture detection module 1204 is used to, if it is determined that there is a user on the smart mattress, perform sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold through the microprocessor to obtain a sleeping posture detection result.

[0100] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0101] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned sleeping posture detection method based on the smart mattress when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.

[0102] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0103] See also Fig.13 , Fig.13 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0104] The processor 1301 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0105] The memory 1302 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1302 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1302, and the processor 1301 calls and executes the sleeping posture detection method based on the smart mattress in the embodiment of this application;

[0106] Input / output interface 1303, used to implement information input and output;

[0107] The communication interface 1304 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0108] A bus 1305 that transmits information between the various components of the device (e.g., the processor 1301, the memory 1302, the input / output interface 1303, and the communication interface 1304);

[0109] The processor 1301 , the memory 1302 , the input / output interface 1303 and the communication interface 1304 are connected to each other in communication within the device via a bus 1305 .

[0110] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the sleeping posture detection method based on the smart mattress is implemented.

[0111] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0112] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0113] The sleeping position detection method based on a smart mattress and the sleeping position detection device based on a smart mattress provided in the embodiments of the present application are applied to a smart mattress, and a sleeping position detection device is provided in the shoulder and back pressure distribution area of ​​the mattress inside the smart mattress, and the sleeping position detection device is integrated with a pressure-capacitive sensor and a main control circuit, and the method obtains current sensor data through the pressure-capacitive sensor and sends the current sensor data to the main control circuit; the microprocessor in the main control circuit performs maximum difference calculation on the current sensor data and the reference sensor data to obtain the current maximum difference data; the microprocessor judges whether there is a user on the smart mattress according to the current maximum difference data and a preset sleeping position judgment threshold; if it is judged that there is a user on the smart mattress, the microprocessor performs sleeping position detection on the user according to the current maximum difference data and the preset sleeping position judgment threshold to obtain a sleeping position detection result. The embodiment of the present application obtains data of the shoulder and back pressure distribution area through a pressure-capacitive sensor, which can more accurately identify the changes in sleeping positions of different people, avoid the misjudgment problem caused by traditional sleeping position detection methods, and thus improve the accuracy of sleeping position detection; by using a pressure-capacitive sensor to obtain data, the sensing points of the sensor in the traditional sleeping position detection method are reduced, thereby reducing the complexity and cost of the sensor, making the smart mattress more economical and practical. Due to the reduction in sensing points, the corresponding failure rate will also be reduced, thereby improving the overall reliability and stability of the smart mattress; through the real-time processing of sensor data by the microprocessor in the main control circuit, it is possible to quickly and accurately determine whether there is a user on the mattress, and perform real-time detection of the user's sleeping position, so that personalized sleeping position detection can be achieved according to the sleeping posture characteristics of different users, thereby improving the user's sleep experience.

[0114] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0115] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0116] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0117] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0118] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0119] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0120] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0121] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0122] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0123] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0124] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A sleeping posture detection method based on a smart mattress, characterized in that: Applied to a smart mattress, a sleeping posture detection device is provided in the shoulder and back pressure distribution area of ​​the smart mattress, and the sleeping posture detection device integrates a pressure-capacitive sensor and a main control circuit. The method comprises the following steps: Acquire current sensor data through the pressure-capacitive sensor, and send the current sensor data to the main control circuit; The microprocessor in the main control circuit calculates the maximum difference between the current sensor data and the reference sensor data to obtain current maximum difference data; The microprocessor determines whether there is a user on the smart mattress according to the current maximum difference data and a preset sleeping posture judgment threshold; If it is determined that there is a user on the smart mattress, the microprocessor performs sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold to obtain a sleeping posture detection result.

2. The method according to claim 1, characterized in that Before acquiring current sensor data through the pressure-capacitive sensor and sending the current sensor data to the main control circuit, the method further includes: Acquire initial sensor data of the smart mattress when it is initially powered on through the pressure-capacitance sensor, and send the initial sensor data to the main control circuit; The microprocessor in the main control circuit calculates the average value of the initial sensor data to obtain initial average value data; The microprocessor performs maximum difference calculation based on the initial average value data and the initial sensor data to obtain initial maximum difference data; The reference sensor data is determined by the microprocessor according to the initial maximum difference data and a preset reference deviation threshold.

3. The method according to claim 2, characterized in that The determining the reference sensor data according to the initial maximum difference data and a preset reference deviation threshold by the microprocessor includes: Determining by the microprocessor whether a plurality of initial maximum difference sub-data in the initial maximum difference data have data consistency according to the initial maximum difference data and the preset reference deviation threshold; If the value corresponding to each of the initial maximum difference sub-data is greater than or equal to the preset reference deviation threshold, it is determined that some of the initial maximum difference sub-data in the initial maximum difference data do not have data consistency, and the process returns to the step of obtaining the initial sensor data of the smart mattress at the time of initial power-on through the pressure-capacitance sensor, and sending the initial sensor data to the main control circuit, until the value corresponding to each of the initial maximum difference sub-data is less than the preset reference deviation threshold; If the value corresponding to each of the initial maximum difference sub-data is smaller than the preset reference deviation threshold, it is determined that several of the initial maximum difference sub-data in the initial maximum difference data have data consistency, and the initial sensor data is used as the reference sensor data.

4. The method according to claim 1, characterized in that: The determining, by the microprocessor, whether there is a user on the smart mattress according to the current maximum difference data and a preset sleeping posture determination threshold value includes: In the control process of the microprocessor, if the value corresponding to the current maximum difference data is greater than or equal to the preset lying-flat threshold, it is determined that there is a user on the smart mattress; If the value corresponding to the current maximum difference data within the target time period is less than the preset lying-flat threshold, it is determined that there is no user on the smart mattress.

5. The method according to claim 1, characterized in that The sleeping posture detection result includes a side-lying sleeping posture and a flat-lying sleeping posture. If it is determined that there is a user on the smart mattress, the microprocessor performs sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold, and obtains a sleeping posture detection result, including: In the control process of the microprocessor, if there is a user on the smart mattress and the value corresponding to the current maximum difference data is greater than or equal to the preset lying flat threshold, the sleeping posture state corresponding to the user is determined according to the current maximum difference data and the preset lying side threshold; If the value corresponding to the current maximum difference data is greater than or equal to the preset side-lying threshold, determining that the sleeping posture state corresponding to the user is the side-lying sleeping posture; If the value corresponding to the current maximum difference data is smaller than the preset side-lying threshold, it is determined that the sleeping posture state corresponding to the user is the lying flat sleeping posture.

6. The method according to claim 1, characterized in that The leg support area of ​​the mattress inside the smart mattress is provided with a leg lifting device, and the leg lifting device is embedded with an air bag. If it is determined that there is a user on the smart mattress, the microprocessor performs a sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold. After obtaining the sleeping posture detection result, the method further includes: When the user's sleeping posture is a lying posture, the microprocessor in the main control circuit sends an airbag inflation instruction to the leg lifting device; The leg lifting device inflates the airbag according to the airbag inflation instruction, so that the leg lifting device is in a raised state on the smart mattress.

7. The method according to claim 6, characterized in that If it is determined that there is a user on the smart mattress, the microprocessor performs sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold, and after obtaining the sleeping posture detection result, the method further includes: When the user's sleeping posture is side-lying and the leg lifting device is in a raised state on the smart mattress, an airbag deflation instruction is sent to the leg lifting device through the microprocessor in the main control circuit; The leg lifting device is used to deflate the airbag according to the airbag deflation instruction, so that the leg lifting device is in a flat state on the smart mattress.

8. A sleeping posture detection device based on a smart mattress, characterized in that: Applied to a smart mattress, a sleeping posture detection device is provided in the shoulder and back pressure distribution area of ​​the smart mattress, and the sleeping posture detection device integrates a pressure-capacitive sensor and a main control circuit. The device includes the following modules: A current sensor data acquisition module, used to acquire current sensor data through the pressure-capacitive sensor and send the current sensor data to the main control circuit; A current maximum difference data calculation module, used for calculating the maximum difference between the current sensor data and the reference sensor data through a microprocessor in the main control circuit to obtain the current maximum difference data; A mattress usage judgment module, used for judging whether there is a user on the smart mattress according to the current maximum difference data and a preset sleeping posture judgment threshold through the microprocessor; The sleeping posture detection module is used to, if it is determined that there is a user on the smart mattress, perform sleeping posture detection on the user according to the current maximum difference data and the preset sleeping posture judgment threshold through the microprocessor to obtain a sleeping posture detection result.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.