Sleeping posture adjusting method based on cervical vertebra flexion and shoulder width and adjustable pillow

By identifying the user's sleeping posture and measuring the cervical flexion and shoulder width, and adjusting the pillow height and curvature using neural networks, the problem of inaccurate personalized adjustment in the prior art is solved, and sleep quality and cervical vertebrae support are improved.

CN119600645AInactive Publication Date: 2025-03-11GUANGXI HEALTH VOCATIONAL & TECH COLLEGE
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411609753.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing adjustable pillows cannot be adjusted accurately according to the user's cervical flexion and shoulder width, resulting in the cervical spine not being fully supported during sleep, causing or aggravating cervical discomfort and pain.

Method used

By obtaining image data of the user's current sleeping position, the sleeping position category is identified using Gaussian differential scale space and clustering analysis algorithm, and combining cervical flexion and shoulder width, the height and radian of the pillow are adjusted using a neural network.

Benefits of technology

It realizes accurate identification and adjustment of user sleeping posture, cervical flexion and shoulder width, providing personalized sleep support, improving sleep quality and reducing cervical discomfort.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600645A_ABST
    Figure CN119600645A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sleeping posture adjustment, in particular to a sleeping posture adjustment method based on cervical vertebra flexion and shoulder width and an adjustable pillow. The method comprises the following steps: acquiring image data of a current sleeping posture of a user, and determining feature points of the image data based on the image data; direction parameters of the feature points are obtained through calculation based on the feature points, the image data are mapped into feature vectors based on the direction parameters, clustering analysis is conducted on the feature vectors through a clustering analysis algorithm, and the current sleeping posture category of the user is obtained; obtaining the current cervical vertebra curvature and the shoulder width of the user based on the current sleeping posture category of the user, and adjusting the height and radian of the pillow based on the current cervical vertebra curvature, the shoulder width and the current sleeping posture category of the user. According to the method, the sleeping posture category of the user can be accurately recognized, personalized adjustment is performed according to the sleeping posture category of the user, the cervical vertebra flexion degree and the shoulder width of the user, and the sleeping quality of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of sleeping posture adjustment, and in particular to a sleeping posture adjustment method based on cervical vertebra flexion and shoulder width and an adjustable pillow. Background Art

[0002] In modern society, with the accelerated pace of life and increased work pressure, more and more people are facing cervical problems and sleep disorders. Traditional pillow designs often ignore the natural curvature of the human cervical spine and the difference in shoulder width, resulting in insufficient support for the cervical spine during sleep, which can cause or aggravate cervical discomfort and pain. Therefore, it is particularly important to develop a pillow that can be adaptively adjusted according to the individual cervical curvature and shoulder width.

[0003] There are already some adjustable pillow products on the market, which cater to the sleeping needs of different users by changing the height, hardness or shape of the pillow. For example, an adjustable pillow design includes multiple layers of pillow core sheets, and the user can change the height and hardness of the pillow by adjusting the stacking height and order of these sheets. However, these pillows can often only be roughly adjusted in height, and cannot be accurately adjusted according to the user's cervical flexion and shoulder width.

[0004] In addition, there are some existing technologies, such as using airbags or supporting air cushions to dynamically adjust according to the pressure of the human cervical spine. A pillow core design that adjusts the height of the head, neck, and shoulders according to the curvature of the cervical spine includes a head support area, a neck support area, and a shoulder support area. These areas are equipped with lifting airbags and can be adjusted separately according to the needs of the user. Although this design can theoretically achieve more precise adjustment, its structure is relatively complex and the adjustment process may be more cumbersome.

[0005] Therefore, there is an urgent need for a sleeping posture adjustment method based on cervical vertebra flexion and shoulder width and an adjustable pillow to solve the above problems. Summary of the invention

[0006] The purpose of the present invention is to provide a sleeping posture adjustment method and an adjustable pillow based on cervical vertebra flexion and shoulder width: to solve the technical problem that the adjustable pillow of the existing solution can only perform rough height adjustment and cannot accurately perform personalized adjustment according to the user's cervical vertebra flexion and shoulder width.

[0007] The purpose of the present invention can be achieved through the following technical solutions: In one aspect, a method for adjusting sleeping posture based on cervical flexion and shoulder width comprises: Obtain image data of the user's current sleeping posture, construct a Gaussian difference scale space based on the image data and a multi-scale function, and calculate a scale space value of each image data sampling point based on the Gaussian difference scale space; Compare the scale space value of each image data sampling point with the scale space value of its adjacent points to determine the feature points of the image data; Direction parameters of the feature points are obtained based on the feature point calculations, image data is mapped into feature vectors based on the direction parameters, and cluster analysis is performed on the feature vectors using a cluster analysis algorithm to obtain the user's current sleeping posture category; The user's current cervical flexion and the user's shoulder width are obtained based on the user's current sleeping posture category, and the height and curvature of the pillow are adjusted based on the user's current cervical flexion, the user's shoulder width and the user's current sleeping posture category.

[0008] Furthermore, the scale space is constructed based on the image data and the multi-scale function, and the scale space value of each image data sampling point is calculated based on the Gaussian difference scale space, which specifically includes the following process: Based on the convolution of image data and multi-scale Gaussian function, the scale space value L corresponding to the image data is obtained: ; in, represents the scale space value of the image data in the scale space, represents the scale factor, and the smoothness of the image is given by The size of A large value of indicates that the image data has a high resolution. A small value of indicates that the image data has a low resolution. represents the convolution symbol, represents the two-dimensional coordinates of image data I, Represents the multi-scale Gaussian function expression for scale space transformation of image data; The Gaussian difference scale space is constructed based on the scale space L: ; in, Represents the scale space value of the image data in the Gaussian difference scale space, Represents the coordinate feature value of the image data in the scale space L, and its value is .

[0009] Furthermore, the scale space value of each image data sampling point is compared with the scale space value of its adjacent points to determine the feature points of the image data, which specifically includes the following process: (1) The scale space value of each image data sampling point and the scale space value of its adjacent points form a matrix Y, and the covariance matrix S of the samples of the matrix Y is calculated; (2) Calculate the eigenvectors of the covariance matrix S , ,…, and eigenvalues , , n represents the number of eigenvalues; (3) Project the data into the space of feature vectors and use the formula to calculate the dimension value corresponding to each feature vector : ; in, The value is the scale space value of the image data sampling point; (4) Value greater than preset The image data sampling points of the threshold are recorded as the feature points of the image data.

[0010] Furthermore, the process of calculating the direction parameters of the feature points based on the feature points specifically includes the following steps: ; ; in, Represents the characteristic parameters of the feature points, Indicates the angle parameter of the feature point.

[0011] Furthermore, the image data is mapped into a feature vector based on the direction parameter, and the feature vector is clustered by a cluster analysis algorithm to obtain the user's current sleeping posture category, which specifically includes the following process: Map the image data into a feature vector R based on the direction parameter: , ; in, A vector of a feature point in the image data, The model is , the direction parameter of the vector is , Z is a 1×64-dimensional vector; Add the values ​​of each row in R to obtain a 1×64-bit intermediate hash vector H; Cluster analysis of hash vector H based on k-means algorithm: Construct a data set based on the hash vector H; Set the k value according to the size and shape of the data set; Randomly select any hash vector H as the initial centroid; When the number of initial centroids is less than k, let is the dataset of preprocessed data, is the initial centroid; Based on the objective function Calculate the distance D(x) between each data point in the data set and the existing initial centroid, where: ; Take the data point corresponding to the maximum value in D(x) as the next initial centroid; K initial centroids are obtained in turn, and the data set is clustered based on the k initial centroids to obtain the sleeping posture category corresponding to the hash vector H.

[0012] Furthermore, adjusting the height and curvature of the pillow based on the user's current cervical flexion, the user's shoulder width, and the user's current sleeping posture category specifically includes the following process: Step 1: construct a neural network for adjusting the height and curvature of the pillow, and set the initial parameters of the neural network, including the number of nodes in the input layer, hidden layer, and output layer, as well as the initial values ​​of weights and biases; Step 2: Use the user's current cervical flexion, the user's shoulder width and the user's current sleeping position as input parameters of the neural network, and the corresponding pillow height and curvature as output layer parameters; calculate the node output value of each layer; Step 3: Multiply the input data by the initial weight matrix from the input layer to the hidden layer, that is, ; Where Y represents the input matrix, represents the output matrix, W represents the initial weight matrix; the initial weight matrix W is a small value that obeys the normal distribution; Step 4: After obtaining the output matrix, add the bias of the hidden layer and perform nonlinear transformation through the Sigmoid function to obtain the output value of the hidden layer. The formula of the Sigmoid function is as follows: ; Where e is the base of natural logarithm, is the input value; Step 5: Multiply the output value of the hidden layer by the weight matrix from the hidden layer to the output layer, add the bias of the output layer, and pass the Sigmoid function again to get the output value of the output layer; Step 6: Calculate the loss function, compare the output value of the neural network with the actual label value, and get the error value. The loss function calculation formula is as follows: ; in, , are the total amount of measured and predicted parameters when the number of elements is i; is the number of elements in the test sample; when When the value is minimum, the number of neurons in the hidden layer is determined; Step 7: According to the value of the loss function, the gradient of each layer is calculated by the chain rule. First, the gradient of the output layer is calculated, that is, the derivative of the output error with respect to the input of the output layer. Then, the gradient of the output layer is multiplied by the transpose of the weight matrix from the output layer to the hidden layer to obtain the gradient of the hidden layer. Finally, the weight matrix W and the bias value are updated according to the gradient and the learning rate. Step 8: Repeat steps 2 to 7 until the loss function changes Less than the set threshold; Step nine, use the trained neural network model to adjust the height and curvature of the pillow, input the test sample into the neural network, obtain the output value through forward propagation, and establish a stable neural network model through continuous training to output the height and curvature of the pillow.

[0013] Furthermore, the neural network includes a convolutional neural network (CNN).

[0014] In another aspect, an adjustable pillow includes a sleeping posture image data acquisition module, a user sleeping posture determination module, and an adjustment module; A sleeping posture image data acquisition module is used to acquire image data of the user's current sleeping posture; A user sleeping posture determination module is used to construct a Gaussian difference scale space based on image data and multi-scale functions, and calculate the scale space value of each image data sampling point based on the Gaussian difference scale space; compare the scale space value of each image data sampling point with the scale space value of its adjacent points to determine the feature points of the image data; calculate the direction parameters of the feature points based on the feature points, map the image data into feature vectors based on the direction parameters, and perform cluster analysis on the feature vectors using a cluster analysis algorithm to obtain the user's current sleeping posture category; The adjustment module is used to obtain the user's current cervical flexion and the user's shoulder width based on the user's current sleeping posture category, and adjust the height and curvature of the pillow based on the user's current cervical flexion, the user's shoulder width and the user's current sleeping posture category.

[0015] Compared with the existing solutions, the present invention achieves the following beneficial effects: The present invention obtains image data of a user's current sleeping posture, determines feature points of the image data based on the image data; calculates direction parameters of the feature points based on the feature points, maps the image data into feature vectors based on the direction parameters, performs cluster analysis on the feature vectors using a cluster analysis algorithm, and obtains the user's current sleeping posture category; obtains the user's current cervical flexion and the user's shoulder width based on the user's current sleeping posture category, and adjusts the height and curvature of the pillow based on the user's current cervical flexion, the user's shoulder width, and the user's current sleeping posture category.

[0016] The present invention can accurately identify the user's sleeping posture category, and perform personalized adjustments according to the user's sleeping posture category, the user's cervical flexion degree and shoulder width, thereby improving the user's sleep quality.

[0017] The present invention can monitor the user's cervical flexion and shoulder width in real time, and automatically adjust the height and curvature of the pillow to provide optimal sleeping support and comfort. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0019] Figure 1 is a workflow diagram of a sleeping posture adjustment method based on cervical vertebra flexion and shoulder width according to an embodiment of the present invention; Figure 2 It is a structural block diagram of an adjustable pillow according to an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, well-known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0022] This embodiment provides a sleeping posture adjustment method based on cervical flexion and shoulder width. Figure 1 is a workflow diagram of a sleeping posture adjustment method based on cervical vertebra flexion and shoulder width according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps: Step S101: acquiring image data of the user's current sleeping posture, constructing a Gaussian difference scale space based on the image data and a multi-scale function, and calculating a scale space value of each image data sampling point based on the Gaussian difference scale space; Step S102: Compare the scale space value of each image data sampling point with the scale space value of its adjacent points to determine the feature points of the image data; Step S103: Calculating the direction parameters of the feature points based on the feature points, mapping the image data into feature vectors based on the direction parameters, and performing cluster analysis on the feature vectors using a cluster analysis algorithm to obtain the user's current sleeping posture category; Step S104: obtaining the user's current cervical flexion and the user's shoulder width based on the user's current sleeping posture category, and adjusting the height and curvature of the pillow based on the user's current cervical flexion, the user's shoulder width and the user's current sleeping posture category.

[0023] In summary, the present invention obtains image data of the user's current sleeping posture, determines feature points of the image data based on the image data; calculates directional parameters of the feature points based on the feature points, maps the image data into feature vectors based on the directional parameters, performs cluster analysis on the feature vectors using a cluster analysis algorithm, and obtains the user's current sleeping posture category; obtains the user's current cervical flexion and the user's shoulder width based on the user's current sleeping posture category, and adjusts the height and curvature of the pillow based on the user's current cervical flexion, the user's shoulder width, and the user's current sleeping posture category. The present invention can accurately identify the user's sleeping posture category, and perform personalized adjustments based on the user's sleeping posture category, the user's cervical flexion, and the user's shoulder width, thereby improving the user's sleep quality.

[0024] In some embodiments, constructing a scale space based on image data and a multi-scale function, and calculating a scale space value of each image data sampling point based on a Gaussian difference scale space specifically includes the following process: Based on the convolution of image data and multi-scale Gaussian function, the scale space value L corresponding to the image data is obtained: ; in, represents the scale space value of the image data in the scale space, represents the scale factor, and the smoothness of the image is given by The size of A large value of indicates that the image data has a high resolution. A small value of indicates that the image data has a low resolution. represents the convolution symbol, represents the two-dimensional coordinates of image data I, Represents the multi-scale Gaussian function expression for scale space transformation of image data; The Gaussian difference scale space is constructed based on the scale space L: ; in, Represents the scale space value of the image data in the Gaussian difference scale space, Represents the coordinate feature value of the image data in the scale space L, and its value is .

[0025] In some embodiments, comparing the scale space value of each image data sampling point with the scale space value of its adjacent points to determine the feature point of the image data specifically includes the following process: (1) The scale space value of each image data sampling point and the scale space value of its adjacent points form a matrix Y, and the covariance matrix S of the samples of the matrix Y is calculated; (2) Calculate the eigenvectors of the covariance matrix S , ,…, and eigenvalues , , n represents the number of eigenvalues; (3) Project the data into the space of feature vectors and use the formula to calculate the dimension value corresponding to each feature vector : ; in, The value is the scale space value of the image data sampling point; (4) Value greater than preset The image data sampling points of the threshold are recorded as the feature points of the image data.

[0026] In some embodiments, calculating the direction parameters of the feature points based on the feature points specifically includes the following process: ; ; in, Represents the characteristic parameters of the feature points, Indicates the angle parameter of the feature point.

[0027] In some embodiments, mapping the image data into a feature vector based on the direction parameter, and performing cluster analysis on the feature vector using a cluster analysis algorithm to obtain the user's current sleeping posture category specifically includes the following process: Map the image data into a feature vector R based on the direction parameter: , ; in, A vector of a feature point in the image data, The model is , the direction parameter of the vector is , Z is a 1×64-dimensional vector; Add the values ​​of each row in R to obtain a 1×64-bit intermediate hash vector H; Cluster analysis of hash vector H based on k-means algorithm: Construct a data set based on the hash vector H; Set the k value according to the size and shape of the data set; Randomly select any hash vector H as the initial centroid; When the number of initial centroids is less than k, let is the dataset of preprocessed data, is the initial centroid; Based on the objective function Calculate the distance D(x) between each data point in the data set and the existing initial centroid, where: ; Take the data point corresponding to the maximum value in D(x) as the next initial centroid; K initial centroids are obtained in turn, and the data set is clustered based on the k initial centroids to obtain the sleeping posture category corresponding to the hash vector H.

[0028] Furthermore, adjusting the height and curvature of the pillow based on the user's current cervical flexion, the user's shoulder width, and the user's current sleeping posture category specifically includes the following process: Step 1: construct a neural network for adjusting the height and curvature of the pillow, and set the initial parameters of the neural network, including the number of nodes in the input layer, hidden layer, and output layer, as well as the initial values ​​of weights and biases; Step 2: Use the user's current cervical flexion, the user's shoulder width and the user's current sleeping position as input parameters of the neural network, and the corresponding pillow height and curvature as output layer parameters; calculate the node output value of each layer; Step 3: Multiply the input data by the initial weight matrix from the input layer to the hidden layer, that is, ; Where Y represents the input matrix, represents the output matrix, W represents the initial weight matrix; the initial weight matrix W is a small value that obeys the normal distribution; Step 4: After obtaining the output matrix, add the bias of the hidden layer and perform nonlinear transformation through the Sigmoid function to obtain the output value of the hidden layer. The formula of the Sigmoid function is as follows: ; Where e is the base of natural logarithm, is the input value; Step 5: Multiply the output value of the hidden layer by the weight matrix from the hidden layer to the output layer, add the bias of the output layer, and pass the Sigmoid function again to get the output value of the output layer; Step 6: Calculate the loss function, compare the output value of the neural network with the actual label value, and get the error value. The loss function calculation formula is as follows: ; in, , are the total amount of measured and predicted parameters when the number of elements is i; is the number of elements in the test sample; when When the value is minimum, the number of neurons in the hidden layer is determined; Step 7: According to the value of the loss function, the gradient of each layer is calculated by the chain rule. First, the gradient of the output layer is calculated, that is, the derivative of the output error with respect to the input of the output layer. Then, the gradient of the output layer is multiplied by the transpose of the weight matrix from the output layer to the hidden layer to obtain the gradient of the hidden layer. Finally, the weight matrix W and the bias value are updated according to the gradient and the learning rate. Step 8: Repeat steps 2 to 7 until the loss function changes Less than the set threshold; Step nine, use the trained neural network model to adjust the height and curvature of the pillow, input the test sample into the neural network, obtain the output value through forward propagation, and establish a stable neural network model through continuous training to output the height and curvature of the pillow.

[0029] It is worth mentioning that neural networks include convolutional neural networks (CNNs).

[0030] In some embodiments, Figure 2 is a structural block diagram of an adjustable pillow according to an embodiment of the present invention, such as Figure 2 As shown, the adjustable pillow includes a sleeping posture image data acquisition module, a user sleeping posture determination module and an adjustment module; A sleeping posture image data acquisition module is used to acquire image data of the user's current sleeping posture; A user sleeping posture determination module is used to construct a Gaussian difference scale space based on image data and multi-scale functions, and calculate the scale space value of each image data sampling point based on the Gaussian difference scale space; compare the scale space value of each image data sampling point with the scale space value of its adjacent points to determine the feature points of the image data; calculate the direction parameters of the feature points based on the feature points, map the image data into feature vectors based on the direction parameters, and perform cluster analysis on the feature vectors using a cluster analysis algorithm to obtain the user's current sleeping posture category; The adjustment module is used to obtain the user's current cervical flexion and the user's shoulder width based on the user's current sleeping posture category, and adjust the height and curvature of the pillow based on the user's current cervical flexion, the user's shoulder width and the user's current sleeping posture category.

[0031] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A sleeping posture adjustment method based on cervical flexion and shoulder width, characterized in that: Methods include: Obtain image data of the user's current sleeping posture, construct a Gaussian difference scale space based on the image data and a multi-scale function, and calculate a scale space value of each image data sampling point based on the Gaussian difference scale space; Compare the scale space value of each image data sampling point with the scale space value of its adjacent points to determine the feature points of the image data; Direction parameters of the feature points are obtained based on the feature point calculations, image data is mapped into feature vectors based on the direction parameters, and cluster analysis is performed on the feature vectors using a cluster analysis algorithm to obtain the user's current sleeping posture category; The user's current cervical flexion and the user's shoulder width are obtained based on the user's current sleeping posture category, and the height and curvature of the pillow are adjusted based on the user's current cervical flexion, the user's shoulder width and the user's current sleeping posture category.

2. A sleeping posture adjustment method based on cervical vertebra flexion and shoulder width according to claim 1, characterized in that: The construction of scale space based on image data and multi-scale functions and the calculation of scale space value of each image data sampling point based on Gaussian difference scale space specifically include the following processes: Based on the convolution of image data and multi-scale Gaussian function, the scale space value L corresponding to the image data is obtained: ; in, represents the scale space value of the image data in the scale space, represents the scale factor, and the smoothness of the image is given by The size of A large value of indicates that the image data has a high resolution. A small value of indicates that the image data has a low resolution. represents the convolution symbol, represents the two-dimensional coordinates of image data I, Represents the multi-scale Gaussian function expression for scale space transformation of image data; The Gaussian difference scale space is constructed based on the scale space L: ; in, Represents the scale space value of the image data in the Gaussian difference scale space, Represents the coordinate feature value of the image data in the scale space L, and its value is .

3. The sleeping posture adjustment method based on cervical vertebra flexion and shoulder width according to claim 1, characterized in that: The scale space value of each image data sampling point is compared with the scale space value of its adjacent points to determine the specific feature points of the image data. The process includes: (1) The scale space value of each image data sampling point and the scale space value of its adjacent points form a matrix Y, and the covariance matrix S of the samples of the matrix Y is calculated; (2) Calculate the eigenvectors of the covariance matrix S , ,…, and eigenvalues , , n represents the number of eigenvalues; (3) Project the data into the space of feature vectors and use the formula to calculate the dimension value corresponding to each feature vector : ; in, The value is the scale space value of the image data sampling point; (4) Value greater than preset The image data sampling points of the threshold are recorded as the feature points of the image data.

4. The sleeping posture adjustment method based on cervical vertebra flexion and shoulder width according to claim 1, characterized in that: The specific process of calculating the direction parameters of feature points based on feature points is as follows: ; ; in, Represents the characteristic parameters of the feature points, Indicates the angle parameter of the feature point.

5. The sleeping posture adjustment method based on cervical vertebra flexion and shoulder width according to claim 4, characterized in that: Based on the direction parameter, the image data is mapped into a feature vector, and the feature vector is clustered using a cluster analysis algorithm to obtain the user's current sleeping posture category, which specifically includes the following process: Map the image data into a feature vector R based on the direction parameter: , ; in, A vector of a feature point in the image data, The model is , the direction parameter of the vector is , Z is a 1×64-dimensional vector; Add the values ​​of each row in R to obtain a 1×64-bit intermediate hash vector H; Cluster analysis of hash vector H based on k-means algorithm: Construct a data set based on the hash vector H; Set the k value according to the size and shape of the data set; Randomly select any hash vector H as the initial centroid; When the number of initial centroids is less than k, set is the dataset of preprocessed data, is the initial centroid; Based on the objective function Calculate the distance D(x) between each data point in the data set and the existing initial centroid, where: ; Take the data point corresponding to the maximum value in D(x) as the next initial centroid; K initial centroids are obtained in turn, and the data set is clustered based on the k initial centroids to obtain the sleeping posture category corresponding to the hash vector H.

6. The sleeping posture adjustment method based on cervical vertebra flexion and shoulder width according to claim 1, characterized in that: The process of adjusting the height and curvature of the pillow based on the user's current cervical flexion, the user's shoulder width, and the user's current sleeping position category specifically includes the following steps: Step 1: construct a neural network for adjusting the height and curvature of the pillow, and set the initial parameters of the neural network, including the number of nodes in the input layer, hidden layer, and output layer, as well as the initial values ​​of weights and biases; Step 2: The user's current cervical flexion, the user's shoulder width and the user's current sleeping posture category are used as input parameters of the neural network, and the corresponding pillow height and curvature are used as output layer parameters; Calculate the node output value of each layer; Step 3: Multiply the input data by the initial weight matrix from the input layer to the hidden layer, that is, ; Where Y represents the input matrix, represents the output matrix, W represents the initial weight matrix; the initial weight matrix W is a small value that obeys the normal distribution; Step 4: After obtaining the output matrix, add the bias of the hidden layer and perform nonlinear transformation through the Sigmoid function to obtain the output value of the hidden layer. The formula of the Sigmoid function is as follows: ; Where e is the base of natural logarithm, is the input value; Step 5: Multiply the output value of the hidden layer by the weight matrix from the hidden layer to the output layer, add the bias of the output layer, and pass the Sigmoid function again to get the output value of the output layer; Step 6: Calculate the loss function, compare the output value of the neural network with the actual label value, and get the error value. The loss function calculation formula is as follows: ; in, , are the total amount of measured and predicted parameters when the number of elements is i; is the number of elements in the test sample; when When the value is minimum, the number of neurons in the hidden layer is determined; Step 7: According to the value of the loss function, the gradient of each layer is calculated by the chain rule. First, the gradient of the output layer is calculated, that is, the derivative of the output error with respect to the input of the output layer. Then, the gradient of the output layer is multiplied by the transpose of the weight matrix from the output layer to the hidden layer to obtain the gradient of the hidden layer. Finally, the weight matrix W and the bias value are updated according to the gradient and the learning rate. Step 8: Repeat steps 2 to 7 until the loss function changes Less than the set threshold; Step nine, use the trained neural network model to adjust the height and curvature of the pillow, input the test sample into the neural network, obtain the output value through forward propagation, and establish a stable neural network model through continuous training to output the height and curvature of the pillow.

7. The sleeping posture adjustment method based on cervical vertebra flexion and shoulder width according to claim 6, characterized in that: Neural networks include convolutional neural networks (CNNs).

8. An adjustable pillow, characterized in that: A sleeping posture adjustment method based on cervical flexion and shoulder width applicable to any one of claims 1 to 7, comprising a sleeping posture image data acquisition module, a user sleeping posture determination module and an adjustment module; A sleeping posture image data acquisition module is used to acquire image data of the user's current sleeping posture; A user sleeping posture determination module is used to construct a Gaussian difference scale space based on image data and multi-scale functions, and calculate the scale space value of each image data sampling point based on the Gaussian difference scale space; compare the scale space value of each image data sampling point with the scale space value of its adjacent points to determine the feature points of the image data; calculate the direction parameters of the feature points based on the feature points, map the image data into feature vectors based on the direction parameters, and perform cluster analysis on the feature vectors using a cluster analysis algorithm to obtain the user's current sleeping posture category; The adjustment module is used to obtain the user's current cervical flexion and the user's shoulder width based on the user's current sleeping posture category, and adjust the height and curvature of the pillow based on the user's current cervical flexion, the user's shoulder width and the user's current sleeping posture category.

Citation Information

Cited By

  • Sleep posture monitoring and intelligent pillow height adjusting method and system

    CN121795884A