Smart pillow sleep posture recognition method and system

By collecting images of the pressure area of ​​the smart pillow and surrounding cameras, multiple sub-regions of the head and body are identified, and a sleeping posture coefficient is calculated. This solves the problem of low accuracy in sleeping posture recognition in existing technologies and achieves more accurate sleeping posture recognition.

CN120689904BActive Publication Date: 2026-06-23SHENZHEN SHUIDEHAO TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN SHUIDEHAO TECHNOLOGY CO LTD
Filing Date
2025-06-11
Publication Date
2026-06-23

Smart Images

  • Figure CN120689904B_ABST
    Figure CN120689904B_ABST
Patent Text Reader

Abstract

The application discloses a kind of intelligent pillow to the sleep posture recognition method and system of user, and the application relates to the technical field of sleep posture recognition method, the image of the head of user is determined according to the division of current sleep image of user;The head sleep posture coefficient of intelligent pillow is determined according to the image of the head of user, the spatial position of multiple sub-regions and the region form, improve the accuracy of the head sleep posture coefficient.Therefore, the image of body is determined according to the division of current sleep image of user, the sleep posture coefficient of upper body and the sleep posture coefficient of lower body are determined based on the recognition of the image of body;In intelligent pillow, the current sleep posture of user is determined based on the sleep posture coefficient of head, the sleep posture coefficient of upper body and the sleep posture coefficient of lower body, guarantee the accuracy of the current sleep posture of user, make full use of intelligent pillow and the camera of periphery, realize the collaborative control of intelligent pillow and the camera of periphery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of sleeping posture recognition methods, and more particularly to a smart pillow method and system for recognizing a user's sleeping posture. Background Technology

[0002] With the development of technology, pillows have gradually been applied to people's lives and support the user's head. When the user's head comes into contact with the pillow, it applies pressure to the pillow, so that the pillow has corresponding pressure areas. In the current technology, the user's head applies pressure to the pillow, and the pillow determines the sleeping posture coefficient of the user's head based on the analysis of the pressure areas. It performs a single-dimensional analysis along the pressure areas to determine the user's current sleeping posture, without considering the influence of the sleeping posture coefficients of the upper and lower body, resulting in low accuracy of the user's current sleeping posture. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides a method and system for recognizing a user's sleeping posture using a smart pillow.

[0004] This invention provides a method for a smart pillow to recognize a user's sleeping posture, including:

[0005] When the smart pillow is pressed against the user's head, the pressure area of ​​the smart pillow is collected, and the spatial position and shape of multiple sub-regions are determined based on the detection of the pressure area;

[0006] The smart pillow triggers the response of surrounding cameras, which then capture the user's current sleep image and determine the image of the user's head based on the segmentation of the current sleep image.

[0007] The user's head posture coefficient relative to the smart pillow is determined based on the image of the user's head, the spatial location of multiple sub-regions, and the shape of the regions.

[0008] The body image is determined based on the segmentation of the user's current sleep image, and the sleeping posture coefficients of the upper body and lower body are determined based on the recognition of the body image.

[0009] In smart pillows, the user's current sleeping position is determined based on the sleeping position coefficients of the head, upper body, and lower body.

[0010] This invention provides a smart pillow system for recognizing a user's sleeping posture. This smart pillow system for recognizing a user's sleeping posture is applied to the aforementioned smart pillow method for recognizing a user's sleeping posture. The smart pillow system for recognizing a user's sleeping posture includes:

[0011] The sub-region module is used to collect the pressure area of ​​the smart pillow when it is pressed against the user's head, and to determine the spatial location and shape of multiple sub-regions based on the detection of the pressure area;

[0012] The first image module is used to trigger the response of the surrounding cameras according to the position of the smart pillow, and to collect the user's current sleep image based on the camera, and to determine the image of the user's head according to the division of the user's current sleep image;

[0013] The head sleeping posture coefficient module is used to determine the user's head sleeping posture coefficient relative to the smart pillow based on the image of the user's head, the spatial position of multiple sub-regions, and the shape of the regions.

[0014] The body sleeping posture coefficient module is used to determine the body image based on the segmentation of the user's current sleep image, and to determine the sleeping posture coefficient of the upper body and the sleeping posture coefficient of the lower body based on the recognition of the body image.

[0015] The sleeping posture module is used in the smart pillow to determine the user's current sleeping posture based on the sleeping posture coefficients of the head, the upper body, and the lower body.

[0016] Compared with the prior art, the beneficial effects of the present invention are:

[0017] In this embodiment of the invention, the method involves collecting data on the pressure area of ​​the smart pillow when the user's head is pressed against it. Based on the detection of this pressure area, the spatial position and shape of multiple sub-regions are determined. The position of the smart pillow triggers the response of a surrounding camera, which then captures the user's current sleep image. The user's head image is determined based on the segmentation of this current sleep image. The user's head posture coefficient is determined based on the head image, the spatial position and shape of the multiple sub-regions. This method incorporates the user's head image and multiple sub-regions, taking into account the overall consideration of the user's head image, the spatial position and shape of the multiple sub-regions, thus improving the accuracy of the head posture coefficient.

[0018] Therefore, the body image is determined based on the segmentation of the user's current sleep image, and the sleeping posture coefficients of the upper and lower body are determined based on the recognition of the body image. In the smart pillow, the user's current sleeping posture is determined based on the sleeping posture coefficients of the head, upper body, and lower body. The introduction of head, upper body, and lower body sleeping posture coefficients achieves a holistic consideration of these coefficients, ensuring the accuracy of the user's current sleeping posture. It also makes full use of the smart pillow and surrounding cameras, achieving collaborative control between the smart pillow and the surrounding cameras. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating the method for recognizing a user's sleeping posture using a smart pillow according to an embodiment of the present invention.

[0020] Figure 2 This is a flowchart illustrating step S11 of the smart pillow's method for recognizing a user's sleeping posture in an embodiment of the present invention.

[0021] Figure 3 This is a flowchart illustrating step S12 of the smart pillow's method for recognizing a user's sleeping posture in an embodiment of the present invention.

[0022] Figure 4 This is a flowchart illustrating step S13 of the smart pillow's method for recognizing a user's sleeping posture in an embodiment of the present invention.

[0023] Figure 5 This is a flowchart illustrating step S14 of the smart pillow's method for recognizing a user's sleeping posture in an embodiment of the present invention.

[0024] Figure 6 This is a flowchart illustrating step S15 of the smart pillow's method for recognizing a user's sleeping posture in an embodiment of the present invention.

[0025] Figure 7 This is a schematic diagram of the structural composition of the smart pillow's user sleeping posture recognition system in an embodiment of the present invention. Detailed Implementation

[0026] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0027] Please see Figures 1 to 7 A method for recognizing a user's sleeping posture using a smart pillow, applied to scenarios where a smart pillow is used to recognize a user's sleeping posture; the method for recognizing a user's sleeping posture using a smart pillow includes:

[0028] Step S11: When the smart pillow is pressed against the user's head, the pressure area of ​​the smart pillow is collected, and the spatial position and shape of multiple sub-regions are determined based on the detection of the pressure area;

[0029] Step S12: Trigger the response of the surrounding cameras based on the position of the smart pillow, and collect the user's current sleep image based on the camera, and determine the image of the user's head based on the division of the user's current sleep image;

[0030] Step S13: Determine the head posture coefficient of the user's head relative to the smart pillow based on the image of the user's head, the spatial position of multiple sub-regions, and the shape of the regions;

[0031] Step S14: Determine the body image based on the segmentation of the user's current sleep image, and determine the sleeping posture coefficient of the upper body and the sleeping posture coefficient of the lower body based on the recognition of the body image.

[0032] Step S15: In the smart pillow, determine the user's current sleeping position based on the sleeping position coefficient of the head, the sleeping position coefficient of the upper body, and the sleeping position coefficient of the lower body;

[0033] refer to Figure 2 In step S11, when the smart pillow is pressed against the user's head, the pressure area of ​​the smart pillow is collected, and the spatial position and shape of multiple sub-regions are determined based on the detection of the pressure area.

[0034] In the specific implementation of this invention, the specific steps are as follows:

[0035] S111: The smart pillow responds to the user's head contact with the smart pillow and the user's head continuously applies pressure to the smart pillow, and the pressure state diagram of the smart pillow is determined based on the pressure parameters detected by the smart pillow.

[0036] S112: Determine the detection node for user sleeping posture detection based on the recognition of the pressure state map of the smart pillow. In the detection node for user sleeping posture detection, collect multiple pressure positions of the smart pillow. Determine the pressure area of ​​the smart pillow based on the multiple pressure positions and the shape of the smart pillow.

[0037] S113: Detect the pressure area of ​​the smart pillow, determine multiple sub-areas based on the detection of the pressure area of ​​the smart pillow, and mark the spatial position and shape of the multiple sub-areas. At this time, the multiple sub-areas are used as the position of the pressure area and are arranged adjacent to each other in sequence.

[0038] In the embodiments of this application, multiple pressure sensors are embedded inside the smart pillow. These sensors are usually in a low-power standby state. When the user's head comes into contact with the smart pillow, one or more sensors will be triggered to activate the entire smart pillow's working system. This triggering mechanism is based on the design of a pressure threshold, that is, when the pressure applied by the head reaches or exceeds a certain preset value, the sensor will send a signal to activate the system.

[0039] Once activated, the smart pillow continuously monitors the pressure exerted on the user's head. This continuous pressure is key to recognizing the user's sleeping position, as different sleeping positions result in different distributions and pressure levels of the head on the pillow. For example, when a user lies on their side, one side of their head will exert greater pressure on the pillow, while the other side will experience less pressure. The smart pillow continuously records these changes in pressure distribution, providing data for subsequent analysis.

[0040] Smart pillows collect pressure data through their internal sensor network, which is then processed to generate a pressure state map. This map, typically displayed in two or three dimensions, visually reflects the pressure distribution across different areas of the pillow. The pressure state map usually includes information such as pressure magnitude, distribution area, and shape. Specifically, assuming a user lies on their back, the smart pillow detects the highest pressure in the center of the head, forming a distinct pressure peak. Simultaneously, the pressure on the sides of the pillow gradually decreases. Through algorithmic processing of this data, the smart pillow generates a pressure state map showing a highlighted area in the center of the head, indicating the area with the highest pressure. This pressure state map serves as a crucial basis for subsequent sleeping posture recognition. The smart pillow's pressure sensor network enables real-time monitoring of the user's head contact with the pillow and generates a pressure state map reflecting the pressure distribution, providing key data support for subsequent sleeping posture recognition. In practical applications, smart pillows often combine with other sensors (such as accelerometers and gyroscopes) to improve the accuracy and reliability of sleeping posture recognition.

[0041] Further, in step S111, a pressure state map of the smart pillow has been obtained, which shows the pressure situation in each area of ​​the pillow. In this step, it is necessary to identify key areas or nodes closely related to the user's sleeping posture based on this pressure state map. These nodes are usually the most obvious pressure locations, reflecting the posture of the user's head and neck. To achieve this, image processing or machine learning algorithms are used to analyze the pressure state map. The algorithm will identify the peaks and troughs in the pressure distribution and their relative positional relationship, thereby determining the detection nodes. At this point, assuming that the user's pressure state map shows a significant pressure peak in the center of the head and a relatively small pressure peak in the neck area, the algorithm will identify these two areas as detection nodes because they represent the positions of the user's head and neck, respectively.

[0042] Once the detection nodes are identified, more pressure location data needs to be collected from these nodes. This data will be used to more accurately describe the shape and size of the pressure areas, as well as the specific position of the user's head and neck on the pillow. To achieve this, a higher resolution sensor array is used, or additional sensors are added to the identified detection nodes. These sensors record more detailed pressure distribution data for subsequent analysis. At this point, more sensors were added to the identified head and neck detection nodes to collect pressure location data. For example, five sensors were set up in the head node to capture the pressure distribution in different areas of the head; and three sensors were set up in the neck node to capture the pressure distribution in the neck.

[0043] After collecting data from multiple pressure points, the overall shape and size of the pressure area need to be determined by combining the smart pillow's morphology (such as shape, size, and material). This step typically involves further data processing and analysis to extract key features that describe the pressure area. To achieve this, geometric modeling or machine learning algorithms are used to fit the pressure area. The algorithm generates a model that accurately describes the pressure area based on the collected pressure point data and the smart pillow's morphological parameters. Simultaneously, combining the collected pressure point data and the smart pillow's morphological parameters (such as length, width, and height), a machine learning algorithm generates a 3D model to fit the pressure area. This model shows a slightly concave elliptical area, representing the user's head and neck position on the pillow. By identifying key nodes in the pressure state diagram, collecting data from multiple pressure points, and combining the smart pillow's morphological parameters, the pressure area is accurately determined, providing crucial data support for subsequent sleeping posture recognition.

[0044] Therefore, the pressure-bearing area of ​​the smart pillow is detected, and multiple sub-regions are determined based on the detection of the pressure-bearing area. The spatial location and shape of the multiple sub-regions are marked. At this time, the multiple sub-regions are used as the location of the pressure-bearing area and are arranged adjacent to each other in sequence. This takes into account the overall consideration of the detection of the pressure-bearing area of ​​the smart pillow and ensures the accuracy of the multiple sub-regions.

[0045] At this point, in step S112, the pressure-bearing area of ​​the smart pillow has been determined. Further, this pressure-bearing area is subjected to more detailed inspection to identify its internal features. This typically involves accurately measuring and recording the pressure values ​​at various points within the pressure-bearing area. To achieve this, a higher-precision sensor array is used, or sensors are moved within the pressure-bearing area to obtain denser data points, which will be used for subsequent sub-region segmentation and morphological analysis. Now, assuming there is a smart pillow whose pressure-bearing area has been determined through step S112, a high-precision pressure sensor array is used to scan the pressure-bearing area at regular intervals. Each sensor records the pressure value at its location, thereby generating a dense pressure dataset.

[0046] After obtaining detailed pressure data within the pressure-affected area, this data needs to be divided into multiple sub-regions. These sub-regions are determined based on the distribution of pressure values, morphological changes, or algorithmic segmentation. Each sub-region represents a specific part of the pressure-affected area, possessing a unique spatial location and morphology. To achieve this, image processing techniques or machine learning algorithms are used to segment the pressure data. These techniques can identify natural boundaries or patterns in the data, thereby dividing the data into sub-regions. Simultaneously, an image processing algorithm is used to segment the pressure dataset. The algorithm identifies several distinct pressure peaks and troughs, as well as the transition regions between them. Based on these features, the algorithm divides the pressure-affected area into five sub-regions: the central head region, the lateral head region, the anterior neck region, and the posterior neck region.

[0047] After identifying the sub-regions, each sub-region needs to be labeled to record its spatial location and shape. This typically involves assigning a unique identifier to each sub-region and recording its boundaries, shape, size, and other characteristics. This information will be used for subsequent sleeping posture recognition and analysis. Geometric modeling techniques or data visualization tools are used to generate labeled maps of the sub-regions. These tools can visually display the spatial location and shape of the sub-regions, facilitating subsequent analysis and interpretation. At this point, a data visualization tool is used to generate labeled maps of the sub-regions. Each sub-region is assigned a unique color or pattern to distinguish the boundaries between them. Simultaneously, the tool records the shape, size, and location information of each sub-region, which is stored in a data file for later analysis.

[0048] By conducting more detailed detection of the pressure area of ​​the smart pillow, it is divided into multiple sub-regions, and the spatial location and shape of these sub-regions are marked. In this example, the pressure area is divided into five sub-regions: the central area of ​​the head, the two sides of the head, the front of the neck, and the back of the neck. These sub-regions, as the specific locations of the pressure area, are arranged adjacent to each other in sequence, providing accurate data support for subsequent sleeping posture recognition.

[0049] In some optional embodiments of this application, a sub-region matching table is collected, as shown in Table 1:

[0050] Table 1 Sub-region Matching Table

[0051] subregion Spatial location description Regional morphology 1 Center of the head, near the top of the pillow Circular shape, with uniform pressure distribution 2 Left side of the head, near the edge of the pillow Elliptical shape, with pressure distribution slightly above average. 3 Right side of the head, near the edge of the pillow Elliptical shape, with pressure distribution slightly above average. 4 Below the neck, near the center of the pillow Long and narrow shape, with lower pressure distribution 5 Shoulder area, near the two sides of the pillow Irregular shape, uneven pressure distribution

[0052] This sub-region matching table records the spatial location and morphological description of each sub-region, providing basic data for subsequent analysis.

[0053] refer to Figure 3 In step S12, the surrounding cameras are triggered to respond based on the position of the smart pillow, and the user's current sleep image is collected based on the camera. The image of the user's head is determined based on the division of the user's current sleep image.

[0054] In the specific implementation of this invention, the specific steps are as follows:

[0055] S121: The location of the smart pillow is collected. The smart pillow detects the surrounding devices at that location and triggers the response of the surrounding cameras. At this time, the smart pillow and the surrounding cameras are in online communication.

[0056] S122: Among the surrounding cameras, determine the shooting mode of the surrounding cameras for the smart pillow based on the location of the smart pillow, the corresponding type of surrounding environment, and the current orientation of the surrounding cameras.

[0057] S123: Surrounding cameras only take pictures in this shooting mode and collect the user's current sleep image; the user's head features are determined based on the recognition of the user's current sleep image, and the image of the user's head is determined based on the matching of the position and shape of the user's head features with the user's current sleep image.

[0058] In embodiments of this application, the smart pillow has a built-in position sensor (such as an accelerometer, gyroscope, or GPS module, although GPS is not the best choice in an indoor environment, but other sensors are sufficient). These sensors can collect the pillow's position information in real time. The position information includes the pillow's relative position in the room, or more advancedly, the pillow's position relative to the user's body (e.g., whether the pillow is correctly placed under the user's head).

[0059] Once the smart pillow has collected its own location information, it will begin to detect whether there are other smart devices in the surrounding environment, especially cameras. This is usually achieved through wireless communication protocols (such as Wi-Fi Direct, Bluetooth Low Energy, etc.). The smart pillow will send broadcast signals or query requests to find nearby smart devices. At this time, the smart pillow will use its built-in wireless communication module to send signals, which will be received and responded to by nearby smart devices. If the camera is within range and has been configured to be compatible with the smart pillow, it will respond to the query request.

[0060] When the smart pillow detects a nearby camera, it sends a command to the camera via wireless communication to trigger it to enter working mode. This typically involves sending a data packet containing specific commands, telling the camera to start recording video, adjust the focus, or perform other necessary settings. At the same time, a secure wireless communication channel is established between the smart pillow and the camera (such as through an encrypted Wi-Fi connection). The smart pillow sends a data packet containing commands to the camera, which, upon receiving the commands, parses and executes the corresponding operations. For example, the camera may start recording video or adjust its viewing angle to ensure it can capture the area where the smart pillow is located.

[0061] Specifically, a smart pillow is placed on the bed in the bedroom, while a camera is installed on the bedroom ceiling. When the user lies down and places their head on the smart pillow, the position sensor inside the pillow collects the pillow's position information. The sensor detects that the pillow is placed in the center of the bed and in close contact with the user's head. The smart pillow then sends a broadcast signal via the Wi-Fi Direct protocol to search for nearby smart devices. Upon receiving this signal, the camera responds and confirms its presence. Once the smart pillow confirms the camera's presence, it sends a command data packet to the camera via an encrypted Wi-Fi connection. This data packet contains a command to start recording video, as well as specific information about the smart pillow's location (such as its distance and angle relative to the camera). Upon receiving this command, the camera immediately begins recording video, ensuring a clear view of the area where the smart pillow is located. This example demonstrates how a smart pillow can interact with nearby cameras to achieve intelligent sleep monitoring.

[0062] Furthermore, the camera needs to obtain accurate location information from the smart pillow, which is usually achieved through wireless communication (such as Wi-Fi, Bluetooth, etc.). The smart pillow sends its location data to the camera or central control system. The location information includes the smart pillow's relative coordinates in the room and its relative position to the user's body.

[0063] The camera needs to understand the type of surrounding environment where the smart pillow is located, which helps determine the best shooting parameters. The type of surrounding environment includes lighting conditions (bright, dim, direct light, etc.), obstacles (such as furniture, curtains, etc.), and whether there are other factors that affect the shooting quality. This information is obtained through the camera's own sensors (such as light sensors, infrared sensors, etc.) or through other devices in the smart home system (such as smart lighting systems, curtain control systems, etc.).

[0064] The camera needs to know its current orientation and position in order to accurately adjust its viewing angle to capture the area where the smart pillow is located. This is usually achieved through the camera's built-in sensors (such as gyroscopes and accelerometers), which provide real-time attitude and position information. In addition, if the camera is movable (such as a gimbal camera), its control system also needs to know the camera's current mechanical position (such as pitch and yaw angles). After acquiring the smart pillow's location information, analyzing the surrounding environment, and determining the camera's current orientation and position, the camera needs to combine this information to determine the optimal shooting mode. Shooting modes include focus adjustment, exposure settings, white balance adjustment, and frame rate selection. These settings are designed to ensure that the camera can capture clear, accurate images that meet the user's needs.

[0065] Specifically, the smart pillow is placed on the bed in the bedroom, while the camera is installed in a corner of the bedroom and can be rotated horizontally and vertically via a gimbal. When the user lies down and places their head on the smart pillow, the position sensor inside the pillow collects the pillow's position information and sends it to the central control system via Wi-Fi. At this time, the system knows that the smart pillow is placed in the center of the bed and in close contact with the user's head.

[0066] The camera, using its built-in light sensor, detected that the lighting conditions in the bedroom were moderate, neither too bright nor too dim. Simultaneously, the camera learned from other devices in the smart home system that there were no large obstructions blocking the view and that the curtains were open, allowing natural light to enter. The camera used its built-in gyroscope and accelerometer to determine its current orientation and position. In this example, the camera was initially pointed towards the bedroom door, but needed to be rotated using a gimbal to capture the area where the smart pillow was located, thus determining the optimal shooting mode. Because the lighting conditions were moderate and there were no obstructions, the camera selected standard exposure settings and white balance adjustments. Furthermore, since the smart pillow was placed in the center of the bed, the camera rotated horizontally and vertically using the gimbal to adjust the viewing angle to the optimal position. Finally, the camera began recording video and transmitting it in real-time to the central control system for storage and analysis. This example demonstrates how a camera determines the optimal shooting mode based on the location of the smart pillow, the surrounding environment, and its own orientation and position.

[0067] Therefore, the surrounding cameras only take pictures in this shooting mode and collect the user's current sleep image; the user's head features are determined based on the recognition of the user's current sleep image, and the image of the user's head is determined by matching the position and shape of the user's head features with the user's current sleep image. This overall consideration of matching the position and shape of the user's head features with the user's current sleep image ensures the accuracy of the user's head image.

[0068] At this point, the camera begins capturing images of the user's current sleep state according to the previously determined shooting mode (such as focal length, exposure, white balance, etc.). This typically involves activating the camera's image sensor and capturing a series of frames to form a continuous video stream or still image sequence. The camera ensures that it begins capturing images at the correct time (such as some time after the user lies down) and continuously records the user's sleep state. The images captured by the camera are acquired and stored in real time, which involves transmitting image data from the camera's image sensor to its internal processor or storage device, or via a network to a central control system for further processing. The acquired image data should be of high resolution to facilitate accurate image recognition and analysis later.

[0069] The system uses image recognition algorithms to process the collected sleep images to identify the user's head features, including the contours and positions of facial features such as face shape, eyes, nose, and mouth. Image recognition algorithms are typically based on machine learning or deep learning techniques and can automatically extract useful information from images. Once the user's head features are identified, the system determines the user's head image based on the position, shape, and degree of matching of these features with the current sleep image. This usually involves comparing the identified features with a pre-stored user facial database to confirm the user's identity and extract the best-matching head image. If the system does not have the user's facial data before, it will require the user to register for facial recognition or manually enter relevant information.

[0070] Specifically, the smart pillow can monitor the user's sleep state and work with a camera to capture images of the user's sleep. When the user lies down and begins to sleep, the camera starts shooting according to a pre-determined shooting mode (such as adjusting the focus to clearly capture the bed surface and setting the exposure to ensure appropriate image brightness). The camera continuously records the user's sleep state and captures a series of frames to form a video stream. The images captured by the camera are acquired in real time and stored in its internal memory. These images are high-definition and can clearly show the user's head features.

[0071] The system uses image recognition algorithms to process the acquired sleep images, identifying the contours and positions of the user's face, eyes, nose, and mouth. These features are extracted and used for subsequent identity verification and head image determination. The system compares the identified head features with a pre-stored user facial database. In this example, it is assumed that the system has previously obtained the user's facial data through facial recognition registration. Through comparison, the system finds the head image that best matches the user's current sleep image and confirms the user's identity. At the same time, the system also provides personalized sleep analysis and suggestions based on the user's head features and sleep posture. The camera captures the user's sleep images according to the shooting mode and uses image recognition algorithms to identify the user's head features, ultimately determining the user's head image.

[0072] In some optional embodiments of this application, in order to determine the user's head image, the system uses a pre-built image matching table, which contains multiple known user head features and their corresponding head images, as shown in Table 2:

[0073] Table 2 Image Matching Table

[0074]

[0075]

[0076] The system will compare the identified user head features with the features in the image matching table to find the most matching user ID and the corresponding head image.

[0077] refer to Figure 4 In step S13, the head posture coefficient of the user's head relative to the smart pillow is determined based on the image of the user's head, the spatial position of multiple sub-regions, and the shape of the regions.

[0078] In the specific implementation of this invention, the specific steps are as follows:

[0079] S131: Collect images of the user's head, determine multiple contact points of the user's head with the smart pillow based on the recognition of the user's head images, and determine multiple head pressure features based on the positions of the multiple contact points and the shape of the user's head.

[0080] S132: A first matching coefficient is determined based on the comparison of multiple head pressure features and the spatial positions of multiple sub-regions; a second matching coefficient is determined based on the comparison of multiple head pressure features and the regional morphology of multiple sub-regions.

[0081] S133: Determine the user's head position coefficient relative to the smart pillow based on the first matching coefficient, the second matching coefficient, and the head position matching table.

[0082] In the embodiments of this application, an image of the user's head is acquired, and multiple contact points of the user's head with the smart pillow are determined based on the recognition of the user's head image. Multiple head pressure features are determined based on the position of the multiple contact points and the shape of the user's head, which takes into account the overall consideration of the position of the multiple contact points and the shape of the user's head, and ensures the accuracy of the multiple head pressure features.

[0083] At this point, the system captures images of the user's head while they are sleeping using a camera. To ensure image clarity and accuracy, the camera is typically placed directly above or to the side of the user's head, and taken at an appropriate angle and focal length. The captured images are then transmitted to the image processing module for further processing. After receiving the captured head images, the image processing module uses image recognition algorithms to process the images. These algorithms are typically based on machine learning or deep learning techniques and can automatically identify and extract key features from the images, such as the head contour and the position of facial features. By recognizing these features, the system can construct a three-dimensional model or two-dimensional contour map of the user's head, providing basic data for subsequent steps.

[0084] After recognizing the image of the user's head, the system needs to combine the internal sensor data of the smart pillow to determine the contact points between the head and the pillow. Smart pillows usually have built-in pressure sensors, temperature sensors, etc., which can monitor the contact between the head and the pillow and the pressure distribution in real time. The system matches this sensor data with the head image to find the actual contact point between the head and the pillow.

[0085] Once the contact points are identified, the system calculates the head pressure characteristics based on the location of these points and the user's head shape. These characteristics include the pressure value, pressure distribution, and contact area of ​​each contact point. By comprehensively analyzing these characteristics, the system can assess the pressure distribution and shape adaptability of the user's head to the smart pillow, thus providing key data for subsequent steps.

[0086] Specifically, the smart pillow has multiple built-in pressure sensors that can monitor the contact and pressure distribution between the head and the pillow in real time. When the user lies down and begins to sleep, the camera captures an image of the user's head. The camera is positioned directly above the user's head, with an appropriate angle and focal length to ensure image clarity and accuracy. After receiving the captured head image, the image processing module uses an image recognition algorithm to process the image. The algorithm automatically identifies key features such as the user's head contour and facial features, and constructs a two-dimensional contour map of the user's head. The system combines the identified head contour map with the sensor data from the smart pillow's internal sensors. Through matching, the system finds the actual contact points between the head and the pillow, i.e., the contact nodes. In this example, assume the system identifies three contact nodes, located at the back of the user's head, the left side, and the right side, respectively.

[0087] Based on the identified contact point locations and the user's head shape, the system calculates pressure characteristics such as pressure value, pressure distribution, and contact area for each contact point. For example, the system finds that the pressure value is higher at the contact point on the back of the head, while the pressure values ​​are relatively lower at the contact points on the left and right sides. By comprehensively analyzing these characteristics, the system can assess the pressure distribution and shape adaptation of the user's head to the smart pillow, providing crucial data for subsequent steps. This example demonstrates how the system collects images of the user's head, identifies key features in the images, determines the contact points between the head and the pillow, and calculates head pressure characteristics based on the location of these points and the head shape. These characteristics provide important basis for subsequent steps such as automatic pillow adjustment and sleep health analysis.

[0088] Furthermore, a first matching coefficient is determined based on the comparison of the spatial positions of multiple head pressure features and multiple sub-regions, and a second matching coefficient is determined based on the comparison of the regional morphology of multiple head pressure features and multiple sub-regions. This comprehensive consideration of comparing the regional morphology of multiple head pressure features and multiple sub-regions ensures the accuracy of the second matching coefficient.

[0089] At this point, the system first acquires the spatial location information of multiple sub-regions of the smart pillow. These sub-regions are usually predefined according to the pillow's structural design, and each sub-region has specific support and comfort characteristics. Next, the system compares multiple pressure characteristics of the user's head (such as pressure value, pressure distribution, etc.) with the spatial location of the sub-regions. The purpose of the comparison is to evaluate the degree of matching between the head pressure position and the design of the pillow's sub-regions. To quantify this degree of matching, the system calculates a first matching coefficient. Specifically, the system calculates the distance between the head pressure point and the center of each sub-region, or evaluates the degree of conformity between the pressure distribution and the shape of the sub-region, thereby deriving a value that reflects the degree of spatial location matching.

[0090] After determining the first matching coefficient, the system then focuses on the matching between the head pressure characteristics and the shape of the pillow sub-region. Here, shape refers not only to the geometry of the sub-region but also to factors affecting comfort, such as the curvature and material of its surface. The system assesses the adaptability between the shape of the head pressure characteristics (such as contact area and pressure gradient) and the shape characteristics of the sub-region. To quantify this adaptability, the system calculates a second matching coefficient. For example, the system calculates the similarity between the shape of the head pressure area and the shape of the sub-region, or assesses the degree of agreement between the pressure gradient and the support force distribution of the sub-region. Through these calculations, the system derives a numerical value that reflects the degree of shape matching.

[0091] Specifically, suppose the smart pillow is designed with three sub-areas: area A (back of the head support area), area B (side-lying support area), and area C (neck support area); each sub-area has specific shape, support, and comfort characteristics.

[0092] Regarding the first matching coefficient, when the user lies down, the system captures the pressure characteristics of the user's head through internal sensors. Assuming the system identifies a large pressure point in the back of the head area, two smaller pressure points in the side-lying area, and almost no pressure in the neck area, the system compares these pressure characteristics with the spatial locations of three sub-regions A, B, and C. The comparison results show that the pressure point at the back of the head is very close to the center of region A, the pressure point in the side-lying area partially overlaps with region B, and the lack of pressure in the neck area is inconsistent with the design of region C. Based on these comparison results, the system calculates a first matching coefficient, which reflects the overall degree of matching between the head pressure position and the pillow sub-region design. In this example, assuming the first matching coefficient is 0.8, it indicates a high degree of matching between the head pressure position and the pillow design.

[0093] Regarding the second matching coefficient, the system compares the shape of the head pressure features with the morphological characteristics of the sub-regions. It assumes the shape of the pressure area at the back of the head is similar to that of region A, and the pressure distribution is uniform. While the pressure point when lying on one's side is small, the pressure is relatively high, consistent with the support distribution of region B. The lack of pressure on the neck is inconsistent with the soft material and design of region C. Based on these morphological comparisons, the system calculates a second matching coefficient, which reflects the adaptability between the head pressure features and the shape of the sub-regions. In this example, the second matching coefficient is assumed to be 0.75, indicating that the head pressure features and the shape of the sub-regions have some adaptability, but there is still room for improvement. This example demonstrates how the system determines the first and second matching coefficients by comparing the spatial location and morphological characteristics of the head pressure features with those of the pillow's sub-regions.

[0094] Therefore, the head sleeping posture coefficient of the user's head relative to the smart pillow is determined based on the first matching coefficient, the second matching coefficient, and the head sleeping posture matching table. This takes into account the overall consideration of the first matching coefficient, the second matching coefficient, and the head sleeping posture matching table, ensuring the accuracy of the head sleeping posture coefficient of the user's head relative to the smart pillow. At the same time, the image of the user's head and multiple sub-regions are introduced, taking into account the overall consideration of the spatial position and regional shape of the user's head image and multiple sub-regions, thereby improving the accuracy of the head sleeping posture coefficient.

[0095] At this point, the system first integrates the previously calculated first and second matching coefficients. These two coefficients reflect the degree of matching between the user's head pressure position and the spatial position of the smart pillow's sub-region, as well as the adaptability of the head pressure characteristics to the sub-region's shape. When integrating these two coefficients, the system uses weighted average, product, or other mathematical operation methods to comprehensively consider the matching situation in terms of both spatial position and shape. Next, the system references a pre-established head sleeping position matching table. This matching table is a database that contains the relationship between different head pressure characteristics, matching coefficients, and corresponding sleeping position coefficients. The matching table is built based on a large amount of previous user data and evaluation results, aiming to provide users with personalized pillow matching suggestions.

[0096] Specifically, suppose the smart pillow company has a detailed head sleeping position matching table, which is built based on the sleep data of thousands of users and expert evaluations. The matching table contains multiple entries, each corresponding to a specific set of head pressure characteristics, a matching coefficient range, and a corresponding sleeping position coefficient. Suppose the first matching coefficient calculated earlier is 0.8 (reflecting the degree of spatial position matching) and the second matching coefficient is 0.75 (reflecting morphological adaptation). The system uses a weighted average method to integrate these two coefficients, with weights of 0.6 and 0.4 respectively (these weights are determined based on user preferences). Therefore, the integrated matching coefficient is 0.8 + 0.6 + 0.75 + 0.4 = 0.78.

[0097] The system determines the user's head sleeping posture coefficient relative to the smart pillow based on the integrated matching coefficient and a head sleeping posture matching table. This coefficient is a comprehensive indicator reflecting the degree of matching and comfort between the user's current sleeping posture and the smart pillow's design. The system derives this coefficient by looking up the matching table, interpolation calculation, or other algorithms. Specifically, the system now uses the head sleeping posture matching table to find the sleeping posture coefficient corresponding to the integrated matching coefficient. Suppose there is an entry in the matching table indicating that when the matching coefficient is between 0.75 and 0.80, the corresponding sleeping posture coefficient is 0.85 (indicating a high degree of matching and comfort). Based on the matching table and the integrated matching coefficient, the system determines the user's head sleeping posture coefficient to be 0.85. This coefficient indicates that the user's current sleeping posture is very well matched with the smart pillow's design and is expected to provide high comfort.

[0098] In some optional embodiments of this application, the system combines a first matching coefficient, a second matching coefficient, and a predefined head sleeping position matching table to determine the user's head sleeping position coefficient. The system uses a pre-built head sleeping position matching table, as shown in Table 3:

[0099] Table 3 Head Position Matching Table

[0100] First matching coefficient range Second matching coefficient range Head position 0.8-1.0 0.8-1.0 0.95 0.6-0.79 0.8-1.0 0.85 0.8-1.0 0.6-0.79 0.80 0.6-0.79 0.6-0.79 0.70

[0101] This head sleeping position matching table reflects the correspondence between the first and second matching coefficients and the sleeping position coefficient in different ranges; the sleeping position coefficient is a value between 0 and 1, and the higher the value, the higher the degree of matching and comfort between the user's head and the smart pillow.

[0102] refer to Figure 5 In step S14, the body image is determined based on the division of the user's current sleep image, and the sleeping posture coefficient of the upper body and the sleeping posture coefficient of the lower body are determined based on the recognition of the body image.

[0103] In the specific implementation of this invention, the specific steps are as follows:

[0104] S141: Collect the user's current sleep image, identify multiple body features based on the recognition of the user's current sleep image, determine the corresponding body image based on the position and shape of the multiple body features; mark multiple body features in the body image, and determine the feature combination of the upper half of the body and the feature combination of the lower half of the body based on the filtering of the multiple body features.

[0105] S142: In the feature combination of the upper body, the sleeping posture type of the upper body is determined according to the position, shape and connection area between the corresponding multiple body features, and the sleeping posture coefficient of the upper body is determined according to the identification of the sleeping posture type of the upper body.

[0106] S143: In the feature combination of the lower half of the body, the sleeping posture type of the lower half of the body is determined according to the position, shape and connection area between the corresponding multiple body features, and the sleeping posture coefficient of the lower half of the body is determined according to the identification of the sleeping posture type of the lower half of the body.

[0107] In the embodiments of this application, the user's current sleep image is collected, and multiple body features are determined based on the recognition of the user's current sleep image. The corresponding body image is determined based on the position and shape of the multiple body features. Multiple body features are marked in the body image, and the feature combination of the upper half of the body and the feature combination of the lower half of the body are determined based on the filtering of the multiple body features. This takes into account the overall consideration of the position and shape of multiple body features and ensures the accuracy of the corresponding body image.

[0108] At this time, the system uses a camera or other image acquisition device to capture the user's current sleep state. This is usually done automatically at preset time intervals after the user falls asleep, or according to the user's instructions. The captured images should be clear, accurate, and able to fully show the user's sleeping posture. The system uses image recognition technology, such as shape matching, to identify multiple body features of the user from the captured sleep images. These features include the head, shoulders, arms, torso, hips, thighs, and calves. The system needs to be able to accurately distinguish these features and determine their position and shape in the image.

[0109] After identifying multiple body features, the system constructs or reconstructs a complete body image based on the location and shape of these features. This image can be two-dimensional or three-dimensional, depending on the system's capabilities and requirements. In the two-dimensional image, the system uses lines, contours, or filled areas to represent body features. In the three-dimensional image, the system uses point clouds, meshes, or solid models. After constructing or reconstructing the body image, the system marks all previously identified body features in the image. This helps the system to further analyze and process the body features. The marking is done in the form of highlighting, borders, labels, or other forms, depending on the system's interface design and user preferences.

[0110] Finally, the system will divide body features into combinations of features in the upper body and combinations of features in the lower body according to certain screening criteria or rules. These criteria include the importance of the features, their impact on the judgment of sleeping posture, and their correlation with other features. For example, the head, shoulders, and arms are considered as features in the upper body, while the hips, thighs, and calves are considered as features in the lower body.

[0111] Specifically, suppose the system is monitoring a user's sleep and has already captured the user's current sleep image. In the image, the system identifies the shoulders (located below the head, shaped like two connected ellipses), arms (located on either side of the shoulders, shaped like elongated strips), torso (connecting the head and hips, shaped like a rectangle or ellipse), hips (located below the torso, shaped like a circle or ellipse), thighs (connecting the hips and knees, shaped like elongated strips), and calves (connecting the knees and feet, also shaped like elongated strips). Based on the position and shape of these features, the system constructs a two-dimensional body contour map. In the map, the system marks each body feature with lines or filled areas of different colors. Then, according to the selection criteria, the system categorizes the shoulders and arms as features of the upper body, and the hips, thighs, and calves as features of the lower body. In this way, the system completes the identification and processing of the user's current sleep image, providing a foundation for sleep posture analysis and suggestions in subsequent steps.

[0112] Furthermore, in the feature combination of the upper body, the sleeping posture type of the upper body is determined according to the position, shape and connection area between the corresponding multiple body features. The sleeping posture coefficient of the upper body is determined based on the identification of the sleeping posture type of the upper body, which takes into account the overall consideration of the identification of the sleeping posture type of the upper body and ensures the accuracy of the sleeping posture coefficient of the upper body.

[0113] At this point, the system first focuses on the combination of features in the upper body, which typically includes the shoulders, arms, and the connecting areas between them (such as the neck, scapula, etc.). The system needs to carefully analyze the position, shape, and relative relationships of these features. Based on the analysis of the combination of features in the upper body, the system then determines the user's upper body sleeping position. Sleeping positions include supine, prone, and lateral (left or right side). The system will make a judgment based on the specific manifestations of the features. For example, if the shoulders and arms are flat on the bed, it is a supine position; if the shoulders and arms are bent or folded, it is a prone position; if the shoulders are tilted, one arm is under the body, and the other arm is extended or placed on the pillow, it is a lateral position.

[0114] After determining the upper body sleeping position, the system will determine the corresponding sleeping position coefficient based on a preset sleeping position coefficient table. The sleeping position coefficient is a quantitative indicator used to assess the comfort and health of the sleeping position. The coefficient value is between 0 and 1, where 1 represents the most ideal and comfortable sleeping position, and 0 represents the most uncomfortable or unhealthy sleeping position. The determination of the sleeping position coefficient takes into account multiple factors, such as the impact of the sleeping position on health (e.g., side sleeping helps reduce snoring, but also leads to discomfort in the shoulder or arm), the user's personal sleep preferences and habits, and existing health problems.

[0115] Specifically, suppose the system is analyzing a user's upper body sleeping posture. In the captured image, the system identifies that the user's shoulders are slightly tilted, one arm (let's say the right arm) is flat on the bed, and the other arm (left arm) is bent and placed next to the pillow. Based on this information, the system determines that the user's upper body sleeping posture is right lateral decubitus. Then, the system assigns a coefficient value to this sleeping posture according to a preset sleeping posture coefficient table or algorithm. Assuming that the table shows that right lateral decubitus is a relatively comfortable sleeping posture for most users, especially having a positive effect on reducing snoring and acid reflux, the system assigns a relatively high coefficient value to right lateral decubitus, such as 0.85 (out of 1). In this way, the system completes the determination of the type and coefficient of the upper body sleeping posture, providing a basis for health analysis and suggestions in subsequent steps. At the same time, this information is also used for the automatic adjustment of the smart pillow to better adapt to the user's sleeping posture and needs.

[0116] Therefore, in the feature combination of the lower half of the body, the sleeping posture type of the lower half of the body is determined according to the position, shape and connection area between the corresponding multiple body features. The sleeping posture coefficient of the lower half of the body is determined based on the identification of the sleeping posture type of the lower half of the body. This takes into account the overall consideration of the position, shape and connection area between the corresponding multiple body features, and ensures the accuracy of the sleeping posture type of the lower half of the body.

[0117] At this point, the system shifts its focus to the combination of features in the lower body, which typically includes the hips, thighs, calves, and the connecting areas between them (such as the knees and hips). The system needs to carefully analyze the position, shape, and relative relationships of these features to accurately determine the type of lower body sleeping position. Based on the analysis of the combination of features in the lower body, the system then determines the type of lower body sleeping position for the user. Lower body sleeping positions include straight, bent, and crossed. The system will make a judgment based on the specific manifestations of the features. For example, if the hips, thighs, and calves are all in a straight line without obvious bending or crossing, it is a straight position; if the thighs are bent at a certain angle relative to the hips, and the calves are further bent or straightened, it is a bent position; if the thigh and calf of one leg are crossed above or below the other leg, it is a crossed position.

[0118] Once the lower body sleeping position is determined, the system will determine the corresponding sleeping position coefficient based on a preset sleeping position coefficient table or algorithm. Similar to the upper body sleeping position coefficient, the lower body sleeping position coefficient is also a quantitative indicator used to assess the comfort and health of the sleeping position. The coefficient value ranges from 0 to 1, where 1 represents the most ideal and comfortable sleeping position, and 0 represents the most uncomfortable or unhealthy sleeping position. The determination of the sleeping position coefficient takes into account multiple factors, such as the impact of the lower body sleeping position on the spine, joints, and muscles, as well as the user's personal sleep preferences and habits. These factors will jointly affect the system's judgment of the lower body sleeping position coefficient.

[0119] Specifically, suppose the system is analyzing a user's lower body sleeping posture. In the acquired images, the system identifies that the user's buttocks are located in the lower middle part of the bed, the thighs are bent at a certain angle relative to the buttocks, the lower legs are further bent, and the knees are pointing towards the ceiling. Simultaneously, the user's legs are not crossed and remain independent. Based on this information, the system determines that the user's lower body sleeping posture is a bent posture (assuming a slight knee bend). Then, the system assigns a coefficient value to this sleeping posture according to a preset sleeping posture coefficient table or algorithm. It is assumed that in this table, a slight knee bend is considered relatively... A comfortable sleeping posture, especially one that effectively relieves lower back pressure and promotes blood circulation, is assigned a high coefficient value, such as 0.8 (out of 1), by the system. This allows the system to determine the type and coefficient of sleeping posture for the lower body. This information will be combined with upper body sleeping posture data to provide comprehensive support for subsequent sleep health analysis, automatic adjustment of the smart pillow, and user suggestions. For example, the system may suggest that the user maintain the current sleeping posture combination (upper body lying on the right side + lower body slightly bent), or make adjustment suggestions based on the user's health condition and preferences.

[0120] In an optional embodiment of this application, it is assumed that there is a preset sleeping posture coefficient matching table for the lower half of the body, which is used to determine the sleeping posture type and sleeping posture coefficient of the lower half of the body based on the combination of features of the lower half of the body; the sleeping posture coefficient matching table for the lower half of the body is shown in Table 4:

[0121] Table 4: Sleeping Posture Coefficient Matching Table for Lower Body

[0122]

[0123]

[0124] Suppose that when the system analyzes the user's lower body sleeping posture, it identifies the following characteristics: the buttocks are located in the center of the bed, the thighs are slightly bent relative to the buttocks, the calves are further bent, the knees do not touch the bed, and the two legs are not crossed; according to the sleeping posture coefficient matching table for the lower body, these characteristics best match the description of "slight bending"; therefore, the system determines the user's lower body sleeping posture as "slight bending" and assigns a sleeping posture coefficient of 0.85 to the lower body.

[0125] refer to Figure 6 In step S15, the user's current sleeping position is determined in the smart pillow based on the sleeping position coefficient of the head, the sleeping position coefficient of the upper body, and the sleeping position coefficient of the lower body.

[0126] In the specific implementation of this invention, the specific steps are as follows:

[0127] S151: The smart pillow has a built-in sleeping posture database, which determines the user's head sleeping posture based on the sleeping posture database, the head sleeping posture coefficient, and the image of the user's head.

[0128] S152: Determine the corresponding body matching coefficient based on the sleeping posture coefficient of the upper body and the sleeping posture coefficient of the lower body. If the body matching coefficient is less than the preset matching coefficient threshold, trigger the autonomous adjustment of the sleeping posture coefficient of the upper body and the sleeping posture coefficient of the lower body to determine the optimized sleeping posture coefficient of the upper body and the sleeping posture coefficient of the lower body.

[0129] S153: If the body matching coefficient is greater than the preset matching coefficient threshold, then the first body posture coefficient is determined based on the user's head sleeping posture and the sleeping posture coefficient of the upper body, the second body posture coefficient is determined based on the user's head sleeping posture and the sleeping posture coefficient of the lower body, and the user's current sleeping posture is determined based on the mapping relationship between the first body posture coefficient, the second body posture coefficient and the user's sleeping posture.

[0130] In the embodiments of this application, the smart pillow has a built-in sleeping posture database. The user's head sleeping posture is determined based on the sleeping posture database, the head sleeping posture coefficient, and the image of the user's head. This comprehensive consideration of the sleeping posture database, the head sleeping posture coefficient, and the image of the user's head ensures the accuracy of the user's head sleeping posture.

[0131] At this point, the smart pillow integrates a sleeping posture database, which stores image data of various head sleeping postures and their corresponding sleeping posture coefficients. These image data cover various sleeping postures such as lying face up, lying side up (left or right), and lying prone. The sleeping posture coefficients are derived from a comprehensive evaluation based on factors such as user feedback, and are used to quantify the comfort and health impact of each sleeping posture.

[0132] Smart pillows are typically equipped with cameras or sensors that automatically capture images of a user's head after they lie down. These images can be two-dimensional or three-dimensional, depending on the pillow's hardware configuration and technology. The captured images are then compared with samples in a sleeping posture database. After capturing an image of the user's head, the system compares it to multiple samples in the sleeping posture database. The system's goal is to find the database sample that best matches the user's head image. Once the best-matching database sample is found, the system determines the user's sleeping posture and obtains the corresponding sleeping posture coefficient. This coefficient reflects the comfort and health impact of the current sleeping posture.

[0133] Specifically, suppose the smart pillow captures the following image features of a user's head: head facing upwards, slightly tilted to the right, eyes closed, and face relaxed; the database contains image data of various sleeping positions such as facing upwards, side-facing (left / right), and prone, along with their corresponding sleeping position coefficients; for example, the facing upwards sleeping position has a higher coefficient (e.g., 0.85), indicating that this sleeping position is relatively comfortable and healthy for most people; while the prone sleeping position has a lower coefficient (e.g., 0.60), because prolonged prone sleeping puts pressure on the cervical spine and respiratory system.

[0134] The smart pillow's built-in camera captures a real-time image of the user's head, showing the head facing upwards and slightly tilted to the right. The system compares the captured image with multiple samples of facing-up sleeping positions in its database, finding one sample that highly matches the user's image. Based on the comparison result, the system determines the user's head position to be facing upwards and retrieves the corresponding sleeping position coefficient (e.g., 0.85) from the database. This means that the current sleeping position is relatively comfortable and healthy for the user. This example demonstrates how a smart pillow uses its built-in sleeping position database to determine the user's head position and its corresponding sleeping position coefficient. This information is crucial for providing personalized sleep advice and improving the user's sleep quality.

[0135] Furthermore, a corresponding body matching coefficient is determined based on the sleeping posture coefficients of the upper and lower body. If the body matching coefficient is less than a preset matching coefficient threshold, the sleeping posture coefficients of the upper and lower body are automatically adjusted to determine the optimized sleeping posture coefficients of the upper and lower body. This takes into account the overall consideration of the sleeping posture coefficients of the upper and lower body, ensuring the accuracy of the corresponding body matching coefficient.

[0136] At this point, the system has determined the sleeping posture coefficients for the upper body (such as shoulders, chest, and back) and lower body (such as hips, thighs, and calves) based on previous analysis. These coefficients are derived from the analysis of the position, shape, and interconnected areas of various parts of the user's body and are used to quantitatively assess the comfort and health impact of sleeping postures. The body matching coefficient is a comprehensive index used to assess the coordination and matching degree between the sleeping postures of the upper and lower body. This coefficient is calculated by an algorithm that considers the differences, similarities, or other relevant factors between the upper and lower body sleeping posture coefficients. The value of the body matching coefficient is usually between 0 and 1, where 1 indicates that the upper and lower body sleeping postures are perfectly matched and ideal, and 0 indicates that they are completely mismatched and least ideal.

[0137] The system compares the calculated body matching coefficient with a preset matching coefficient threshold. This threshold is used to determine whether the current sleeping position needs to be adjusted. If the body matching coefficient is less than the preset threshold, the system considers the current sleeping position to be unsatisfactory and needs to trigger an autonomous adjustment mechanism.

[0138] If the body matching coefficient is less than a preset threshold, the system will trigger an automatic adjustment mechanism. This mechanism includes adjusting the mattress firmness and tilt, changing the pillow's shape, height, or material, or guiding the user to adjust their sleeping posture through other means (such as sound prompts, vibration feedback, etc.). The purpose of the adjustment is to optimize the sleeping posture coefficients of the upper and lower body to make them more compatible, thereby improving the overall comfort and health impact of the sleeping posture. After the adjustment, the system will recalculate the sleeping posture coefficients of the upper and lower body until the body matching coefficient reaches or exceeds the preset threshold.

[0139] Specifically, assuming the system has determined the user's upper body sleeping posture coefficient to be 0.75 (indicating relatively comfortable but still with room for improvement), and the lower body sleeping posture coefficient to be 0.60 (indicating insufficient comfort); the preset matching coefficient threshold is 0.80; the system has calculated the upper body sleeping posture coefficient to be 0.75 and the lower body sleeping posture coefficient to be 0.60; the system uses a certain algorithm to calculate the body matching coefficient, assuming that the algorithm considers factors such as the average value and difference of the upper and lower body sleeping posture coefficients; in this example, the body matching coefficient is calculated as (0.75+0.60) / 2-|0.75-0.60| / 2=0.675 (this formula is only an example, the actual algorithm is more complex);

[0140] The system compares the calculated body matching coefficient of 0.675 with the preset threshold of 0.80 and finds it to be less than the threshold. The system then triggers an autonomous adjustment mechanism to improve the lower body sleeping posture by adjusting the mattress firmness or tilt. After adjustment, the system recalculates the upper and lower body sleeping posture coefficients, assuming the optimized upper body sleeping posture coefficient is 0.80 and the lower body sleeping posture coefficient is 0.75. At this point, the body matching coefficient increases to (0.80+0.75) / 2-|0.80-0.75| / 2=0.875. This demonstrates how the system determines the body matching coefficient based on the sleeping posture coefficients of the upper and lower body and triggers an autonomous adjustment mechanism to optimize the sleeping posture coefficient when needed. This mechanism helps improve the overall comfort of the user's sleeping posture.

[0141] Therefore, if the body matching coefficient is greater than the preset matching coefficient threshold, a first body posture coefficient is determined based on the user's head sleeping posture and the sleeping posture coefficient of the upper body. A second body posture coefficient is determined based on the user's head sleeping posture and the sleeping posture coefficient of the lower body. The user's current sleeping posture is determined based on the mapping relationship between the first body posture coefficient, the second body posture coefficient, and the user's sleeping posture. This takes into account the overall consideration of the first body posture coefficient, the second body posture coefficient, and the user's sleeping posture mapping relationship, ensuring the accuracy of the user's current sleeping posture. At the same time, the sleeping posture coefficients of the head, the upper body, and the lower body are introduced, realizing the overall consideration of the sleeping posture coefficients of the head, the upper body, and the lower body, ensuring the accuracy of the user's current sleeping posture. It also makes full use of the smart pillow and the surrounding cameras, realizing the collaborative control of the smart pillow and the surrounding cameras.

[0142] At this point, the system first checks whether the previously calculated body matching coefficient is greater than the preset matching coefficient threshold. This threshold is used to determine whether the user's overall sleeping posture has reached or exceeded the ideal matching standard, without the need for further analysis and adjustment, or to identify excellent sleeping posture cases that require special attention. If the body matching coefficient is greater than the preset threshold, the system will further analyze the user's head sleeping posture and the sleeping posture coefficient of the upper body to determine the first body posture coefficient, in order to quantitatively evaluate the coordination and comfort between the head and the upper body in this excellent sleeping posture. The calculation method of this coefficient involves a comprehensive consideration of the head sleeping posture characteristics (such as lying face up, lying side up, lying prone, etc.) and the upper body sleeping posture coefficient.

[0143] The system also determines a second body posture coefficient based on the user's head and lower body sleeping posture coefficients. This coefficient is used to quantitatively assess the coordination and comfort of the head and lower body in this excellent sleeping posture. The calculation method for this coefficient is similar to that of the first body posture coefficient, but it focuses more on the analysis of the lower body sleeping posture coefficient. At the same time, the system uses the first and second body posture coefficients in combination with a preset user sleeping posture mapping relationship to determine the user's current sleeping posture. This mapping relationship is a complex algorithm or lookup table that maps different combinations of body posture coefficients to specific categories that represent excellent or ideal sleeping postures. These sleeping posture categories are also defined based on medical research or user preferences and are designed to describe whether the user's overall sleeping posture characteristics have reached an ideal state.

[0144] Specifically, assuming the user's head is facing upwards, the sleeping posture coefficient for the upper body is 0.90, the sleeping posture coefficient for the lower body is 0.85, and the preset matching coefficient threshold is 0.85; the system first calculates the body matching coefficient (assuming it is the average of the upper and lower body sleeping posture coefficients) and finds that it is greater than the preset threshold of 0.85.

[0145] Based on the head-up posture and the upper body sleeping posture coefficient of 0.90, the system uses an algorithm to calculate the first body posture coefficient as 0.92 (this value is only an example, the actual algorithm is more complex). This coefficient reflects the excellent coordination and comfort between the head and upper body sleeping posture.

[0146] Based on the head-up posture and the lower body sleeping position coefficient of 0.85, the system uses the same or similar algorithm to calculate the second body posture coefficient as 0.88. This coefficient indicates that the coordination between the head and lower body sleeping positions is also very good.

[0147] The system uses a first body posture coefficient of 0.92 and a second body posture coefficient of 0.88, combined with a preset user sleeping posture mapping relationship, to determine the user's current sleeping posture. Assuming the mapping relationship maps a combination of a first body posture coefficient between 0.90 and 1.00 and a second body posture coefficient between 0.85 and 0.95 to "a very comfortable face-up sleeping posture with excellent overall coordination," in this example, the system ultimately determines the user's current sleeping posture as "a very comfortable face-up sleeping posture with excellent overall coordination." This conclusion is presented to the user as a positive example or as a reference for further optimizing the sleep environment.

[0148] In an optional embodiment of this application, a current sleeping position matching table is collected, as shown in Table 5:

[0149] Table 5 Current Sleeping Position Matching Table

[0150]

[0151] Based on the previously determined first body posture coefficient of 0.85 and second body posture coefficient of 0.72, the corresponding current sleeping position description found in the current sleeping position matching table is "a relatively comfortable sleeping position with the upper body facing upwards, but the lower body is slightly uncomfortable".

[0152] Please see Figure 7 , Figure 7 This is a schematic diagram of the structural composition of the smart pillow's user sleeping posture recognition system in an embodiment of the present invention; the smart pillow's user sleeping posture recognition system includes:

[0153] Sub-region module 21 is used to collect the pressure area of ​​the smart pillow when it is pressed against the user's head, and determine the spatial position and shape of multiple sub-regions based on the detection of the pressure area;

[0154] The first image module 22 is used to trigger the response of the surrounding camera according to the position of the smart pillow, and to collect the user's current sleep image based on the camera, and to determine the image of the user's head according to the division of the user's current sleep image;

[0155] The head sleeping posture coefficient module 23 is used to determine the user's head sleeping posture coefficient relative to the smart pillow based on the image of the user's head, the spatial position of multiple sub-regions, and the shape of the regions.

[0156] The body sleeping posture coefficient module 24 is used to determine the body image based on the division of the user's current sleep image, and to determine the sleeping posture coefficient of the upper body and the sleeping posture coefficient of the lower body based on the recognition of the body image.

[0157] The sleeping posture module 25 is used in the smart pillow to determine the user's current sleeping posture based on the sleeping posture coefficient of the head, the sleeping posture coefficient of the upper body, and the sleeping posture coefficient of the lower body.

[0158] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A method for recognizing a user's sleeping posture using a smart pillow, characterized in that, include: When the user's head presses against the smart pillow, the pressure area of ​​the smart pillow is collected, and the spatial location and shape of multiple sub-regions are determined based on the detection of the pressure area; The smart pillow triggers the response of surrounding cameras, which then capture the user's current sleep image and determine the image of the user's head based on the segmentation of the current sleep image. The head posture coefficient of the user's head relative to the smart pillow is determined based on the image of the user's head, the spatial position of multiple sub-regions, and the shape of the regions. This includes: acquiring an image of the user's head; identifying multiple contact points between the user's head and the smart pillow based on the image recognition; determining multiple head pressure features based on the position of the multiple contact points and the shape of the user's head; determining a first matching coefficient based on the comparison between the multiple head pressure features and the spatial position of the multiple sub-regions; determining a second matching coefficient based on the comparison between the multiple head pressure features and the shape of the multiple sub-regions; and determining the head posture coefficient of the user's head relative to the smart pillow based on the first matching coefficient, the second matching coefficient, and a head posture matching table. The body image is determined based on the segmentation of the user's current sleep image, and the sleeping posture coefficients of the upper body and lower body are determined based on the recognition of the body image. In smart pillows, the user's current sleeping position is determined based on the sleeping position coefficients of the head, upper body, and lower body.

2. The method for recognizing a user's sleeping posture using a smart pillow according to claim 1, characterized in that, When the user's head presses against the smart pillow, the pressure area of ​​the smart pillow is collected, and the spatial location and shape of multiple sub-regions are determined based on the detection of the pressure area, including: The smart pillow responds to the user's head contact with it, continuously applying pressure to the pillow and determining its pressure state based on the pressure parameters detected by the pillow. The detection nodes for user sleeping posture detection are determined by recognizing the pressure state map of the smart pillow. At the detection nodes for user sleeping posture detection, multiple pressure points of the smart pillow are collected. Based on the multiple pressure points and the shape of the smart pillow, the pressure area of ​​the smart pillow is determined. The pressure-bearing areas of the smart pillow are detected, and multiple sub-regions are determined based on the detection of the pressure-bearing areas. The spatial location and shape of the multiple sub-regions are marked. At this time, the multiple sub-regions are used as the location of the pressure-bearing areas and are arranged adjacent to each other in sequence.

3. The method for recognizing a user's sleeping posture using a smart pillow according to claim 1, characterized in that, The process of triggering a response from a nearby camera based on the position of the smart pillow, acquiring the user's current sleep image based on the camera, and determining the image of the user's head based on the segmentation of the user's current sleep image includes: The location of the smart pillow is collected, and the smart pillow detects surrounding devices at that location and triggers the response of the surrounding cameras. At this time, the smart pillow and the surrounding cameras are in an online communication state. The shooting mode of the surrounding cameras for the smart pillow is determined based on the location of the smart pillow, the corresponding type of surrounding environment, and the current orientation of the surrounding cameras. Surrounding cameras only take pictures in this shooting mode and collect the user's current sleep image; the user's head features are determined based on the recognition of the user's current sleep image, and the image of the user's head is determined by matching the position and shape of the user's head features with the user's current sleep image.

4. The method for recognizing a user's sleeping posture using a smart pillow according to claim 1, characterized in that, The process of determining the body image based on the segmentation of the user's current sleep image, and determining the sleeping posture coefficients of the upper and lower body based on the recognition of the body image, includes: The system collects the user's current sleep image, identifies multiple body features based on the recognition of the user's current sleep image, and determines the corresponding body image based on the position and shape of the multiple body features. The system then marks multiple body features in the body image and determines the feature combination of the upper half of the body and the feature combination of the lower half of the body based on the selection of multiple body features.

5. The method for recognizing a user's sleeping posture using a smart pillow according to claim 4, characterized in that, The process of determining the body image based on the segmentation of the user's current sleep image, and determining the sleeping posture coefficients of the upper and lower body based on the recognition of the body image, further includes: In the feature combination of the upper body, the sleeping posture type of the upper body is determined according to the position, shape and connection area between the corresponding multiple body features, and the sleeping posture coefficient of the upper body is determined based on the identification of the sleeping posture type of the upper body. In the feature combination of the lower half of the body, the sleeping posture type of the lower half of the body is determined according to the position, shape and connection area between the corresponding multiple body features, and the sleeping posture coefficient of the lower half of the body is determined based on the identification of the sleeping posture type of the lower half of the body.

6. The method for recognizing a user's sleeping posture using a smart pillow according to claim 1, characterized in that, The smart pillow determines the user's current sleeping position based on the sleeping position coefficients of the head, upper body, and lower body, including: The smart pillow has a built-in sleeping posture database, which determines the user's head sleeping posture based on the sleeping posture database, the head sleeping posture coefficient, and the image of the user's head. The corresponding body matching coefficient is determined based on the sleeping posture coefficient of the upper body and the sleeping posture coefficient of the lower body. If the body matching coefficient is less than the preset matching coefficient threshold, the sleeping posture coefficient of the upper body and the sleeping posture coefficient of the lower body are automatically adjusted to determine the optimized sleeping posture coefficient of the upper body and the sleeping posture coefficient of the lower body.

7. The method for recognizing a user's sleeping posture using a smart pillow according to claim 6, characterized in that, The smart pillow determines the user's current sleeping position based on the sleeping position coefficients of the head, upper body, and lower body, and also includes: If the body matching coefficient is greater than the preset matching coefficient threshold, the first body posture coefficient is determined based on the user's head sleeping posture and the sleeping posture coefficient of the upper body, the second body posture coefficient is determined based on the user's head sleeping posture and the sleeping posture coefficient of the lower body, and the user's current sleeping posture is determined based on the mapping relationship between the first body posture coefficient, the second body posture coefficient and the user's sleeping posture.

8. A smart pillow system for recognizing a user's sleeping posture, characterized in that, The smart pillow's user sleeping posture recognition system is used to execute the smart pillow's user sleeping posture recognition method as described in any one of claims 1-7, wherein the smart pillow's user sleeping posture recognition system includes: The sub-region module is used to collect the pressure area of ​​the smart pillow when the user's head presses against it, and to determine the spatial location and shape of multiple sub-regions based on the detection of the pressure area; The first image module is used to trigger the response of the surrounding cameras according to the position of the smart pillow, and to collect the user's current sleep image based on the camera, and to determine the image of the user's head according to the division of the user's current sleep image; The head sleeping posture coefficient module is used to determine the user's head sleeping posture coefficient relative to the smart pillow based on the image of the user's head, the spatial position of multiple sub-regions, and the shape of the regions. The body sleeping posture coefficient module is used to determine the body image based on the segmentation of the user's current sleep image, and to determine the sleeping posture coefficient of the upper body and the sleeping posture coefficient of the lower body based on the recognition of the body image. The sleeping posture module is used in the smart pillow to determine the user's current sleeping posture based on the sleeping posture coefficients of the head, the upper body, and the lower body.