Clustering algorithm-based contour map feature extraction method for sleeping posture recognition

By using a contour map feature extraction method based on the K-means clustering algorithm, combined with a mattress-type pressure sensor and a support vector machine algorithm, the problems of wearing discomfort, privacy leakage, and data processing difficulties in existing sleeping posture recognition technologies are solved, achieving high-precision sleeping posture recognition.

CN120632422APending Publication Date: 2025-09-12SHENYANG UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510768678.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing sleeping posture recognition technologies have problems such as wearing discomfort, privacy leakage, occlusion and light impact, difficulty in data processing and high computational cost. In particular, the pressure sensor-based method has low recognition accuracy when the number of pressure detection units is limited, and the computer vision-based method has limitations in terms of privacy and occlusion.

Method used

A contour map feature extraction method based on the K-means clustering algorithm is adopted. The body pressure distribution data is collected through a mattress-type pressure sensor. The K-means clustering algorithm is used to cluster the data and draw a contour map. The high-pressure area and pressure distribution shape features are extracted. The support vector machine algorithm is combined for sleeping posture recognition, reducing the data dimension and optimizing the parameters to improve the accuracy.

Benefits of technology

It achieves the precise collection of pressure data without affecting sleep comfort, reduces computing costs, improves the accuracy of sleeping posture recognition, and achieves a classification accuracy of 99.17%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632422A_ABST
    Figure CN120632422A_ABST
Patent Text Reader

Abstract

The invention discloses a contour map feature extraction method for sleeping posture recognition based on a clustering algorithm, and relates to the technical field of sleeping posture recognition. The pressure sensor is used for collecting body pressure distribution, so that the patient is not restrained, the privacy of the patient is not leaked, and the influence of shielding and light intensity is avoided. Aiming at the problem of high data dimension caused by more pressure detection units, the invention provides a contour map feature extraction method based on a K-means clustering algorithm, and features are extracted from original high-dimensional data for sleeping posture recognition. The method comprises the following steps: S1, preprocessing original body pressure distribution data; s2, clustering the preprocessed body pressure distribution data through a K-means clustering algorithm; and S3, according to the cluster center value in each cluster, drawing a body pressure distribution contour map corresponding to each contour line from top to bottom in the contour map in a descending order.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sleeping posture recognition, and in particular to a contour map feature extraction method based on a K-means clustering algorithm for sleeping posture recognition. Background Art

[0002] Sleeping posture significantly impacts sleep quality and health. Poor sleeping posture can lead to health problems or exacerbate existing conditions. Sleeping in a supine position increases the risk of sleep apnea. Prolonged sleep in one position can cause or worsen pressure ulcers, which can be avoided by adopting different sleeping positions. Furthermore, for women in late pregnancy, sleeping in a supine position can cause the gravid uterus to impinge on the aorta and inferior vena cava. Therefore, sleep posture recognition technology is crucial for those experiencing these health issues.

[0003] Currently, sleep posture recognition technologies include accelerometer-based sleep posture monitoring methods. However, these methods inevitably attach accelerometers to the patient, which can increase discomfort during sleep. Furthermore, these methods can also act as an independent variable to influence sleep posture, resulting in certain differences in sleeping posture between patients wearing and not wearing accelerometers. Computer vision-based sleep posture recognition methods can achieve high accuracy, but they have limitations, such as susceptibility to occlusion and light intensity. Furthermore, privacy concerns make computer vision-based methods less acceptable to patients. Current sleep posture recognition methods based on pressure sensors, both domestically and internationally, suffer from the following drawbacks: The number of pressure detection units in the pressure sensor limits sleep posture recognition performance. More pressure detection units improves classification accuracy, but increases data processing complexity and computational cost. Fewer pressure detection units lack detailed information about the body's pressure distribution, reducing sleep posture recognition accuracy. Summary of the Invention

[0004] To address these shortcomings, the present invention proposes a contour map feature extraction method based on the K-means clustering algorithm for sleep posture recognition. This method uses pressure sensors to collect body pressure distribution, without restricting the patient, leaking patient privacy, and avoiding the effects of occlusion and light intensity. To address the high dimensionality of data caused by the large number of pressure detection units, a contour map feature extraction method based on the K-means clustering algorithm is proposed to extract features from the raw high-dimensional data for sleep posture recognition.

[0005] To achieve the above object, the present invention adopts the following technical solution, which includes the following steps:

[0006] Step S1: preprocessing the original body pressure distribution data;

[0007] Step S2: clustering the preprocessed body pressure distribution data using the K-means clustering algorithm;

[0008] Step S3: based on the size of the cluster center value in each cluster, draw a contour map of the body pressure distribution corresponding to each contour line from top to bottom in the contour map in descending order;

[0009] Step S4: extracting high-pressure area features through the “mountaintop” of the contour map;

[0010] Step S5: extracting the body pressure shape distribution characteristics through the remaining contour lines of the contour map.

[0011] As a preferred solution, in step S1 of the present invention, the original pressure distribution data is collected by a mattress-type pressure sensor.

[0012] As another preferred solution, in step S1 of the present invention, the preprocessing includes irrelevant value processing and position calibration.

[0013] As another preferred embodiment, the present invention implements irrelevant value processing: when the pressure detection value exceeds the maximum detection range, it is stored as the maximum detection range. For example, if the detection range of each pressure detection unit of a mattress-type pressure sensor is 0 mmHg to 110 mmHg, when the pressure value detected by the pressure detection unit exceeds 110 mmHg, the value will be stored as "999" by default. Therefore, when using the data obtained by this mattress-type pressure sensor, the "999" must be converted to "110" ("110" corresponds to a detection value of 110 mmHg), i.e., irrelevant value processing.

[0014] As another preferred solution, the position calibration of the present invention is as follows: translating the center of gravity of the pressure distribution data according to the deviation from the physical center of the pressure sensor measurement area;

[0015] The calculation expression of the center of gravity of pressure distribution data is:

[0016] Among them, X C is the horizontal coordinate of the center of gravity of the pressure data; Y C is the vertical coordinate of the center of gravity of the pressure data; P (i,j) is the pressure value at the corresponding position in the pressure data.

[0017] Examples of the physical center of the pressure sensor's measurement area are as follows:

[0018] The measurement area is distributed with 64×25 pressure detection units, that is, there are 64 pressure detection units in a row, and there are 25 rows in total, so its physical center is (32, 12.5).

[0019] As another preferred solution, in step S2 of the present invention, each pressure data sample is clustered by the K-means clustering algorithm, the sum of squared errors within the sample class is calculated, and the number of clusters for each sample is determined, which is expressed as:

[0020] in

[0021] μ i It is cluster center C i The center of , k is the number of clusters, l is the pressure value in the pressure data sample;

[0022] Calculate the Euclidean distance from the pressure value to the initial cluster center, assign the pressure value to the nearest cluster center according to the calculated distance, and calculate the mean of the pressure values ​​included in each cluster center as the new cluster center until the center no longer changes or the maximum number of iterations is reached to obtain the final clustering result.

[0023] As another preferred embodiment, in step S3 of the present invention, a contour map of body pressure distribution is drawn, the original position coordinates of all pressure values ​​contained in each cluster on the pressure sensor are indexed, and each contour line of the contour map corresponding to each cluster is arranged from high to low in order of cluster center value from large to small (excluding clusters with cluster center value of 0), and a body pressure contour map is drawn according to the position coordinates of the pressure values ​​included in each cluster.

[0024] As another preferred embodiment, in step S4 of the present invention, high-pressure area features are extracted. The "top" of the contour map is the location where the high-pressure area in the body pressure distribution appears, and the "top" of the contour map corresponds to the cluster with the largest cluster center value. Based on the position coordinates of the pressure values ​​contained in the cluster with the largest cluster center value, the number of pressure areas formed by the pressure values ​​contained in the cluster with the largest cluster center value is queried. Based on the number of pressure values ​​in the queried pressure areas, the pressure areas are divided into important pressure areas, less important pressure areas, and unimportant pressure areas. The center of gravity of each pressure area is calculated to represent the location of the high-pressure area in the body pressure distribution. The center of gravity calculation expression is:

[0025] Among them, (X, Y) is the coordinate of the center of gravity of the pressure area, p i is the ith pressure value in the pressure zone, x i ,y i are the horizontal and vertical coordinates corresponding to the i-th pressure value respectively.

[0026] As another preferred embodiment, the important pressure area of ​​the present invention has a pressure value number ≥ 3, the less important pressure area has a pressure value number of 2, and the unimportant pressure area has a pressure value number of 1.

[0027] Important pressure areas have 3 or more pressure values. A pressure value of 3 or more indicates a concentration of high pressure in this area, better representing the location of high pressure areas in the body. Secondary pressure areas have 2 pressure values, and unimportant pressure areas have 1 pressure value. When the number of important pressure areas varies, the secondary and unimportant pressure areas are selected to ensure that the characteristics of different sleeping posture samples are the same.

[0028] The division of important pressure areas, secondary important pressure areas, and unimportant pressure areas can better indicate the locations of high-pressure areas in different sleeping postures. (1) There are obvious differences in the pressure distribution of different sleeping postures. For example, when lying on your back, the contact area with the pressure sensor is larger, and the body weight can be dispersed in the larger back and buttocks areas, so the body pressure distribution is relatively uniform, and the high pressure is mainly concentrated in the buttocks and back; when lying on your side, the body pressure is mainly concentrated on the side of the body, and the contact area with the pressure sensor is smaller than that of the supine position, so the body pressure distribution is uneven, and areas with high pressure values ​​will appear in the shoulders, abdomen, buttocks, and calves. The important pressure area in the present invention is an area formed by multiple adjacent high-pressure values, representing the area where the sleep pressure of a person is concentrated, such as the buttocks in the supine position. It can better reflect the location of high-pressure areas in different sleeping postures and is more conducive to classification. The secondary important pressure area only includes two high-pressure values, and the unimportant pressure area only includes one high-pressure value. Although they also indicate the location of high-pressure areas in different postures, they cannot indicate the location of the main body high-pressure areas during sleep. (2) On the other hand, since the number of high-pressure areas in different sleeping postures is different, dividing the important pressure areas into the less important pressure areas and the less important pressure areas can better select features when using the classification model. When the number of important pressure areas is different, the less important pressure areas and the less important pressure areas are selected to ensure that the features of the samples of different sleeping postures are the same.

[0029] As another preferred embodiment, in step S5 of the present invention, the body pressure shape distribution characteristics are extracted. After removing the "mountain top" in the contour map, each contour line contains the body pressure distribution characteristics of different sleeping positions. From top to bottom, each cluster corresponding to each contour line has a cluster center value from large to small. The length and width of the distribution of all pressure values ​​contained in each cluster are calculated to represent the body pressure distribution characteristics of different sleeping positions.

[0030] Secondly, the high-pressure area features and pressure distribution shape features extracted by the present invention are used as the input module of the sleeping posture recognition model and divided into a training set and a test set;

[0031] The classification model is built using a support vector machine algorithm and a one-to-many classification strategy. A training set is used to train the support vector machine model, and then a test set is used to test the model's performance and verify whether the extracted features can classify different sleeping postures. While the support vector machine is a binary classification model, the present invention employs a five-class classification task. Using a one-to-many strategy enables the support vector machine to achieve this five-class classification task.

[0032] The parameter optimization module uses the Bayesian optimization algorithm to optimize the regularization parameters and kernel function parameters of the support vector machine. The support vector machine algorithm includes regularization parameters and kernel function parameters. Adjusting the regularization parameters and kernel function parameters can achieve better classification accuracy for the training set and test set, avoiding overfitting and underfitting problems. The Bayesian optimization algorithm updates the parameters based on the results of each iteration to achieve higher classification accuracy.

[0033] The classification confusion matrix evaluates the performance of the feature extraction method and classification model. The numbers in the intersection lines of the classification confusion matrix represent the number of correctly classified samples, not the numbers in the diagonal lines. The sum of the diagonal numbers divided by the sum of all numbers in the matrix gives the average classification accuracy for the five sleeping postures. A high average classification accuracy indicates good performance of the feature extraction method and classification model.

[0034] In addition, the ratio of the training set and the test set in the present invention is: training set: test set = 7:3. The data set includes five sleeping positions, each sleeping position has 720 samples, and a total of 3600 samples.

[0035] The present invention has beneficial effects.

[0036] The present invention proposes a contour map feature extraction method based on the K-means clustering algorithm to extract high-pressure area features and pressure distribution shape features that are strongly correlated with sleeping posture. While using a pressure sensor with more pressure detection units to obtain fine pressure data, it also reduces the dimension of the pressure data, reduces the computational cost, and achieves excellent sleeping posture recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. The scope of protection of the present invention is not limited to the following description.

[0038] Figure 1 Schematic diagram of a mattress-type pressure sensor for collecting sleeping posture data according to the present invention.

[0039] Figure 2 Schematic diagram of the sleeping posture data collection interface of the present invention.

[0040] Figure 3 Schematic diagram of the intra-class sum of squared errors of pressure distribution data for different sleeping positions.

[0041] Figure 4 Schematic diagram of the K-means clustering algorithm flow.

[0042] Figure 5 Schematic diagram of K-means clustering results and pressure distribution contour map.

[0043] Figure 6 Schematic diagram of the 24 coordinate positions of the starting point and its proximity when querying the pressure area.

[0044] Figure 7 Schematic diagram of pressure areas with different levels of importance.

[0045] Figure 8 Schematic diagram of the pressure value distribution of the cluster with the smallest cluster center value (excluding the cluster with all cluster center values ​​0).

[0046] Figure 9 This is a flowchart of the sleeping posture recognition module.

[0047] Figure 10 Schematic diagram of the confusion matrix of the test set. DETAILED DESCRIPTION

[0048] As shown in the figure, the sleeping posture recognition method based on the contour map of the K-means clustering algorithm of the present invention is used to identify the sleeping posture during sleep, and accurate sleeping posture recognition is achieved using only the pressure distribution data captured by the mattress-type pressure sensor.

[0049] The mattress-type pressure sensor can be a mattress-type pressure sensor developed by Japan's Sumitomo Industries (product website: http: / / www.sumitomoriko.co.jp). This pressure sensor is mattress-type, which can avoid interfering with people's sleep, and the pressure sensor is basically not affected by the pressure of coverings such as quilts during sleep. The mattress-type pressure sensor includes a pressure measurement area and a non-measurement area. Figure 1 As shown, the non-measurement area includes circuits 1 and 2, and an extended USB port for connecting to a host computer and transmitting the collected pressure signals to it in real time. The pressure measurement area is 1800 mm long and 700 mm wide, with 1600 (64 × 25) evenly distributed pressure detection units. Each pressure detection unit has a detection range of 0 to 110 mm. If the pressure detection unit exceeds the detection range, the default display is "999" (this function is available in the mattress-type pressure sensor developed by Sumitomo Industries, Ltd. in Japan).

[0050] Use pressure sensors such as Figure 1As shown, the extended USB interface is connected to the host computer, and the APP configured with the pressure sensor can capture and save the human body pressure distribution data in real time, such as Figure 2 In this experiment, 12 volunteers of varying heights and weights were selected for the experiment. During the experiment, each volunteer simulated sleeping positions on the pressure sensor in the following order: supine, left side, right side, left prone, and right prone positions. To make the dataset more diverse, each volunteer's limbs were positioned according to their sleeping habits when simulating different sleeping positions. Sixty samples were collected for each sleeping position, for a total of 3,600 pressure samples.

[0051] The contour map feature extraction method based on the K-means clustering algorithm of this embodiment includes the following steps:

[0052] Step S1: Preprocess the raw pressure distribution data by replacing the irrelevant value "999" with "110." The mattress-type pressure sensor used in the present invention has a detection range of 0 to 110 mmHg for each pressure detection unit. When the pressure detected by a pressure detection unit exceeds 110 mmHg, the value is saved as "999" by default. Therefore, when using the data obtained by this mattress-type pressure sensor, the "999" is converted to "110," i.e., the raw pressure distribution data is processed as irrelevant.

[0053] Position calibration: To reduce the impact of different positions of volunteers lying on the pressure sensor on the data, the original pressure distribution data needs to be calibrated. That is, the center of gravity of the pressure distribution data is shifted according to the deviation from the physical center of the pressure sensor measurement area. The calculation expression of the center of gravity of the pressure distribution data is:

[0054] Among them, X C is the horizontal coordinate of the center of gravity of the pressure data; Y C is the vertical coordinate of the center of gravity of the pressure data; P (i,j) is the pressure value at the corresponding position in the pressure data.

[0055] Step S2: Calculate the sum of squared errors within the sample class and determine the number of clusters for each sample, such as Figure 3 As shown, each sample is determined to be clustered into 9 clusters (9 clusters refer to Figure 3 Which number is in Figure 3 In each figure, the horizontal axis represents the number of clusters, and the vertical axis is the calculated sum of squared errors within the class. Figure 3As can be seen from the three figures, when the number of clusters on the horizontal axis reaches 9, the sum of squared errors within the class will not change, that is, it reaches equilibrium. Therefore, the clustering of each sample is roughly set to 9). The K-means clustering algorithm is used to cluster each pressure distribution data into 9 clusters. First, 9 random pressure values ​​(9 pressure values ​​correspond to 9 clusters) are used as the initial cluster centers. Then, the Euclidean distance (the straight-line distance between two points in space) from each pressure value to the initial cluster center is calculated. The pressure value is assigned to the nearest cluster center according to the calculated distance. Then, the mean of the pressure values ​​included in each cluster center is calculated as the new cluster center until the center no longer changes or the maximum number of iterations is reached to obtain the final clustering result. The process is as follows: Figure 4 shown.

[0056] Step S3: Draw the contour map of the body pressure distribution. After each pressure distribution sample is clustered into 9 clusters, the original position coordinates of all pressure values ​​contained in each cluster on the pressure sensor are indexed, and each cluster is mapped to each contour line from high to low in the order of cluster center values ​​(excluding clusters with cluster center values ​​of 0), and the body pressure contour map is drawn according to the position coordinates of the pressure values ​​included in each cluster. Figure 5 (a) Each layer from top to bottom represents each cluster arranged from large to small cluster center values, and (b) is a pressure distribution contour map with 9 contour lines drawn based on 9 clusters.

[0057] Step S4: Extract the high-pressure area features through the "top of the mountain" of the contour map. Randomly select a pressure value from the cluster with the largest cluster center value and index its original position coordinates on the pressure sensor. Starting from this pressure value, query the 24 adjacent position coordinates around the position coordinate corresponding to this pressure value to see if there are other pressure values. If not, this random starting point pressure value is called an unimportant pressure area. Then randomly select a new pressure value position coordinate to continue querying. If yes, continue to query the 24 position coordinates adjacent to the new pressure value position coordinate to see if there is a new pressure value after excluding the starting point pressure value. If not, the pressure area formed by these two pressure values ​​is called a secondary pressure area; if yes, continue to query according to the above method until the position coordinates corresponding to all pressure values ​​in the cluster with the largest cluster center value are traversed, as shown in the figure. Figure 6 shown.

[0058] After the query is completed, the number of pressure values ​​included in all the formed pressure areas is queried. The importance of the pressure areas is divided according to the number of pressure values ​​included in the pressure areas: a pressure area with only one pressure value is called an unimportant pressure area; a pressure area with only two pressure values ​​is called a secondary pressure area; a pressure area with three or more pressure values ​​is called an important pressure area, such as Figure 7The center of gravity of each pressure area is calculated, and the coordinates of the center of gravity of four pressure areas are selected as the high-pressure area features for each pressure distribution sample according to the importance of the pressure area.

[0059] Step S5: Extract the pressure distribution shape distribution features. After removing the “mountain top” in the contour map, each contour line contains the pressure distribution features of the body in different sleeping positions, such as Figure 8 As shown in the figure, each contour line from top to bottom corresponds to a cluster with a center value from large to small. The length and width of the distribution of all pressure values ​​contained in each cluster are calculated to represent the pressure distribution characteristics of the body in different sleeping positions.

[0060] The sleeping posture recognition model process of this embodiment is as follows Figure 9 As shown in Figure 1, the input is a dataset created by extracting 22 features from each pressure distribution sample, and the dataset is divided into a training set and a test set (7:3). The classification model uses the support vector machine algorithm and a one-to-many classification strategy. The Bayesian optimization algorithm is used to optimize the support vector machine regularization parameters and kernel function parameters to achieve the optimal classification accuracy. The confusion matrix of the test set classification results is shown in Figure 1. Figure 10 As shown, the classification accuracy of the five sleeping postures, supine (0), left side (1), right side (2), left prone (3), and right prone (4), is 99.17%.

[0061] It can be understood that the above specific description of the present invention is only used to illustrate the present invention and is not limited to the technical solutions described in the embodiments of the present invention. Those skilled in the art should understand that the present invention can still be modified or replaced by equivalents to achieve the same technical effects; as long as the use requirements are met, they are within the scope of protection of the present invention.

Claims

1. A contour map feature extraction method based on clustering algorithm for sleeping posture recognition, characterized by The following steps are included: Step S1: preprocessing the original body pressure distribution data; Step S2: clustering the preprocessed body pressure distribution data using the K-means clustering algorithm; Step S3: based on the size of the cluster center value in each cluster, draw a contour map of the body pressure distribution corresponding to each contour line from top to bottom in the contour map in descending order; Step S4: Extract high-pressure area features through the "mountain top" of the contour map; Step S5: extracting the body pressure shape distribution characteristics through the remaining contour lines of the contour map.

2. The method for extracting contour map features based on clustering algorithm for sleeping posture recognition according to claim 1, characterized in that In step S1, the original pressure distribution data is collected by a mattress-type pressure sensor.

3. The method for extracting contour map features based on clustering algorithm for sleeping posture recognition according to claim 1, characterized in that In step S1, the preprocessing includes irrelevant value processing and position calibration; The irrelevant value processing: when the pressure detection value exceeds the maximum value of the detection range, it is saved as the maximum value of the detection range; The position calibration is as follows: the center of gravity of the pressure distribution data is translated according to the deviation from the physical center of the pressure sensor measurement area.

4. The method for extracting contour map features based on clustering algorithm for sleeping posture recognition according to claim 1, characterized in that In step S2, each pressure data sample is clustered using the K-means clustering algorithm, the sum of squared errors within the sample class is calculated, and the number of clusters for each sample is determined, which is expressed as: in μ i It is cluster center C i The center of , k is the number of clusters, l is the pressure value in the pressure data sample; Calculate the Euclidean distance from the pressure value to the initial cluster center, assign the pressure value to the nearest cluster center according to the calculated distance, and calculate the mean of the pressure values ​​included in each cluster center as the new cluster center until the center no longer changes or the maximum number of iterations is reached to obtain the final clustering result.

5. The method for extracting contour map features based on clustering algorithm for sleeping posture recognition according to claim 1, characterized in that In step S3, a contour map of the body pressure distribution is drawn, the original position coordinates of all pressure values ​​contained in each cluster on the pressure sensor are indexed, each contour line of the contour map corresponding to each cluster is arranged from high to low in order of the cluster center value from large to small, and the body pressure contour map is drawn according to the position coordinates of the pressure values ​​included in each cluster.

6. The method for extracting contour map features based on clustering algorithm for sleeping posture recognition according to claim 1, characterized in that In step S4, the high-pressure area features are extracted. The "top" of the contour map is the location where the high-pressure area of ​​the body pressure distribution appears, and the "top" of the contour map corresponds to the cluster with the largest cluster center value. Based on the position coordinates of the pressure values ​​contained in the cluster with the largest cluster center value, the number of pressure areas formed by the pressure values ​​contained in the cluster with the largest cluster center value is queried. Based on the number of pressure values ​​in the queried pressure areas, the pressure areas are divided into important pressure areas, less important pressure areas, and unimportant pressure areas. The center of gravity of each pressure area is calculated to represent the location where the high-pressure area appears in the body pressure distribution. The center of gravity calculation expression is: Among them, (X, Y) is the coordinate of the center of gravity of the pressure area, p i is the ith pressure value in the pressure zone, x i ,y i are the horizontal and vertical coordinates corresponding to the i-th pressure value respectively.

7. The method for extracting contour map features based on clustering algorithm for sleeping posture recognition according to claim 6, characterized in that The important pressure area has a pressure value number ≥ 3, the less important pressure area has a pressure value number of 2, and the unimportant pressure area has a pressure value number of 1.

8. The method for extracting contour map features based on clustering algorithm for sleeping posture recognition according to claim 1, characterized in that In step S5, the body pressure shape distribution characteristics are extracted. After removing the "mountain top" in the contour map, each contour line contains the body pressure distribution characteristics of different sleeping postures. From top to bottom, each contour line corresponds to a cluster with a large to small cluster center value. The length and width of the distribution of all pressure values ​​contained in each cluster are calculated to represent the body pressure distribution characteristics of different sleeping postures.

9. The method for extracting contour map features based on clustering algorithm for sleeping posture recognition according to claim 1, characterized in that The extracted high-pressure area features and pressure distribution shape features are used as input modules of the sleeping posture recognition model and divided into a training set and a test set; The classification model was built using the support vector machine algorithm and a one-to-many classification strategy. The support vector machine model was trained using the training set, and then the performance of the model was tested using the test set to verify whether the extracted features could classify different sleeping postures. The parameter optimization module uses the Bayesian optimization algorithm to optimize the regularization parameters and kernel function parameters of the support vector machine. The support vector machine algorithm includes regularization parameters and kernel function parameters. Adjusting the regularization parameters and kernel function parameters can achieve better classification accuracy for the training set and test set, avoiding overfitting and underfitting problems. The Bayesian optimization algorithm updates the parameters based on the results of each iteration to achieve higher classification accuracy. The classification result confusion matrix evaluates the performance of the feature extraction method and classification model. The numbers in the intersection lines of the classification result confusion matrix represent the number of correctly classified samples, not the numbers in the diagonal lines. The sum of the numbers on the diagonal lines, which represents the number of incorrectly classified samples, is the average classification accuracy of sleeping postures. A high average classification accuracy indicates good performance of the feature extraction method and classification model.

10. The method for extracting contour map features based on clustering algorithm for sleeping posture recognition according to claim 9, characterized in that The ratio of the training set to the test set is: training set:test set=7:

3. The data set includes five sleeping positions, each of which has 720 samples, for a total of 3600 samples.