Body region division method and device based on intelligent mattress
Through the combination of pressure array sensors and deep learning networks, the problem of body area division of static smart mattresses in dynamic sleep scenarios is solved, and accurate recognition of different users and sleep states is achieved, which improves the sleep experience and monitoring accuracy.
Patent Information
- Application Number
- CN202510530546.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-19
AI Technical Summary
The existing static smart mattress monitoring system cannot adapt to the dynamic evolution characteristics of human posture during sleep, and it is difficult to match the physiological structural differences of different individuals, resulting in high distortion rate of pressure sensing data and low generalization performance of monitoring algorithms.
The pressure array sensor is used to acquire the pressure distribution matrix, and the model training set is generated through threshold filtering and data augmentation, and the area mask prediction model of the deep learning network is built, and the body area is recognized in real time and the mask matrix is generated to realize dynamic adaptive body area division.
Accurate body area recognition for different users and sleep states is achieved, improving the human adaptability of sleep experience and the robustness of monitoring algorithms, and reducing body area definition errors.
Smart Images

Figure CN120501415A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart mattresses, and in particular to a body area division method and device based on a smart mattress. Background Art
[0002] In the field of smart mattresses, pressure sensing technology is widely used in human physiological signal monitoring, body area division, and sleep state analysis. However, existing pressure sensing technology has significant drawbacks:
[0003] On the one hand, traditional smart mattresses mostly use soft materials to improve comfort, but they are prone to generate high-frequency noise signals (such as friction sound, structural vibration sound, etc.) during the compression and deformation process. After this type of noise is coupled with human body pressure data, it will seriously interfere with the signal-to-noise ratio of the sensor signal, resulting in a decrease in the extraction accuracy of effective physiological information (such as body movement frequency, number of turning over, breathing rhythm, etc.).
[0004] On the other hand, the current mainstream body area division method has systematic defects. Most existing solutions are based on statistically averaged ergonomic models (such as dividing the mattress into fixed areas such as the head, torso, and lower limbs), and their algorithm logic relies on a preset ratio threshold. However, sleeping behavior has significant dynamic characteristics: Posture diversity: The human body will experience more than 10 typical postures such as supine, side, and prone during the sleep cycle, accompanied by sub-state changes such as limb extension and curling, resulting in nonlinear time-varying characteristics in the pressure distribution pattern; individual differences: The height, BMI index, and body shape characteristics of different users cause the body segment ratio to deviate from the statistical model. For example, the trunk mass of obese people may account for more than 65%, while the lower limb length ratio of adolescent users is 12%-15% higher than the adult average.
[0005] Based on the two dynamic characteristics of sleep mentioned above, the static partitioning mechanism will produce at least three technical contradictions in dynamic sleep scenarios:
[0006] 1) Spatial mapping misalignment: The fixed area boundary does not match the real-time pressure center trajectory, resulting in an increased misjudgment rate of body motion recognition;
[0007] 2) Signal aliasing effect: Pressure waveform components in adjacent areas interfere with each other, reducing the resolution of biometric feature extraction;
[0008] 3) Insufficient generalization performance: Algorithms optimized for specific populations fail when applied across age and body types, resulting in decreased system robustness.
[0009] In summary, existing static smart mattress monitoring systems are unable to adapt to the dynamic evolution of human posture during sleep and struggle to account for individual physiological variations. This results in high distortion in pressure sensor data and poor generalization of monitoring algorithms. Therefore, developing dynamic, adaptive body region segmentation technology is a key breakthrough for improving the effectiveness of smart mattress physiological monitoring. Summary of the Invention
[0010] Embodiments of the present invention provide a body region segmentation method and device based on a smart mattress, which are used to solve the following technical problems: existing static smart mattress monitoring systems are unable to adapt to the dynamic evolution characteristics of human posture during sleep and have difficulty matching the physiological structure differences of different individuals, resulting in high distortion rate of pressure sensor data and low generalization performance of monitoring algorithms.
[0011] The embodiment of the present invention adopts the following technical solutions:
[0012] In one aspect, an embodiment of the present invention provides a method for body region segmentation based on a smart mattress, wherein the smart mattress includes at least a pressure array sensor installed on a top layer of the mattress. The method includes:
[0013] The pressure array sensor collects initial pressure distribution matrices of different users and different sleeping postures, and performs threshold filtering on the pressure data in each initial pressure distribution matrix to obtain a set of denoised pressure distribution matrices;
[0014] generating a corresponding pressure distribution map according to each denoised pressure distribution matrix, marking key body parts in the pressure distribution map with rectangular boxes, and generating a regional mask matrix for each key body part;
[0015] Performing data enhancement on the body region elements in the denoised pressure distribution matrix to generate an extended pressure distribution matrix and a corresponding extended region mask matrix, which together with the denoised pressure distribution matrix and its corresponding region mask matrix constitute a model training set;
[0016] Constructing a region mask prediction model based on a deep learning network, and training the region mask prediction model using the model training set;
[0017] The pressure distribution matrix obtained in real time is threshold filtered and then input into the regional mask prediction model to obtain a corresponding regional mask matrix, and the corresponding body region division result is obtained according to the regional mask matrix.
[0018] In a feasible implementation, threshold filtering is performed on the pressure data in each initial pressure distribution matrix to obtain a set of denoised pressure distribution matrices, specifically including:
[0019] According to Threshold = sum(matrix_x) * α / matrix_PointCont, calculate the filtering threshold Threshold of the initial pressure distribution matrix matrix_x;
[0020] Where α is a preset hyperparameter; sum(matrix_x) is the sum of all elements in the initial pressure distribution matrix matrix_x; matrix_PointCont is the element count value in the initial pressure distribution matrix matrix_x;
[0021] according to Perform threshold filtering on the initial pressure distribution matrix matrix_x, and assign the element value to 0 if it is less than the filtering threshold; otherwise, retain the original value;
[0022] Among them, matrix_x ij is the element value in the i-th row and j-th column of the pressure distribution matrix matrix_x, where i = 1, 2, ..., m; j = 1, 2, ..., n; m and n are the total number of rows and columns of the pressure distribution matrix respectively.
[0023] In a feasible implementation, key body parts are marked with rectangular frames in the pressure distribution map, and a regional mask matrix for each key body part is generated, specifically including:
[0024] In the pressure distribution diagram, a body area is framed by two vertical lines, and the body area is divided into a number of key body parts by a number of horizontal lines. The rectangle formed by the intersection of the horizontal and vertical lines is taken as the key body part area; wherein the key body parts include at least shoulders, back, waist, buttocks and legs;
[0025] According to the coordinate values of the upper left corner and the lower right corner of the key body part area, the regional mask matrix corresponding to the key body part is determined; wherein the regional mask matrix includes at least a shoulder region mask, a back region mask, a waist region mask, a hip region mask and a leg region mask.
[0026] In a feasible implementation, determining a region mask matrix corresponding to the key body part according to the coordinate values of the upper left corner and the lower right corner of the key body part region specifically includes:
[0027] according to
[0028] Determine the regional mask matrix mask_label for each key body part ij ;
[0029] Among them, x top_right 、y top_right 、xlower_left 、y lower_left They represent the upper right corner horizontal coordinate, upper right corner vertical coordinate, lower left corner horizontal coordinate, and lower left corner vertical coordinate of the rectangle corresponding to the current key body part.
[0030] In a feasible implementation, data enhancement is performed on the body region elements in the denoised pressure distribution matrix to generate an extended pressure distribution matrix, specifically including:
[0031] Extracting body region elements from the denoised pressure distribution matrix, and determining a rotation center and several rotation angles of the body region elements based on human body mechanics;
[0032] Based on the rotation center and the rotation angle, geometrically transform the body region elements, and set all the transformed non-body region elements to 0 to generate a first extended pressure distribution matrix;
[0033] performing displacement transformation on the body region elements in the horizontal and vertical directions according to a preset translation vector, and setting all the transformed non-body region elements to 0 to generate a second expanded pressure distribution matrix;
[0034] The first extended pressure distribution matrix and the second extended pressure distribution matrix are combined into the extended pressure distribution matrix.
[0035] In a feasible implementation, data enhancement is performed on the body region elements in the denoised pressure distribution matrix to generate an extended region mask matrix corresponding to the extended pressure distribution matrix, specifically including:
[0036] Based on the rotation center and the rotation angle, a rectangle corresponding to each key body part corresponding to the denoised pressure distribution matrix is rotated to obtain a key body part region after the rotation transformation, and matrix elements in the key body part region after the rotation transformation are set to 1 and other elements are set to 0 to generate a first extended region mask matrix corresponding to each key body part;
[0037] Based on the translation vector, a rectangle corresponding to each key body part corresponding to the denoised pressure distribution matrix is subjected to a translation transformation to obtain a key body part region after the translation transformation, and matrix elements in the key body part region after the translation transformation are set to 1 and other elements are set to 0 to generate a second extended region mask matrix corresponding to each key body part;
[0038] The first extended area mask matrix and the second extended area mask matrix are respectively associated with corresponding extended pressure distribution matrices to obtain extended area mask matrices corresponding to the extended pressure distribution matrices.
[0039] In a feasible implementation, a region mask prediction model is constructed based on a deep learning network, specifically including:
[0040] Based on the U-NET deep learning network, an encoder-decoder structure is constructed. The encoder part includes a series of convolution and pooling operations to gradually reduce the resolution of the pressure distribution map and extract high-level semantic features of the pressure distribution map. The feature map output by the encoder part is directly spliced with the feature map of the corresponding layer of the decoder.
[0041] A regional mask matrix calculation module is constructed and connected to the encoder-decoder structure to form the regional mask prediction model; the regional mask matrix calculation module is used to perform regional mask matrix calculation on the feature map output by the encoder-decoder structure to output the regional mask matrix of each key body part.
[0042] In a feasible implementation, training the region mask prediction model using the model training set specifically includes:
[0043] During the model training process, the predicted region mask matrix output by the region mask prediction model is multiplied element by element with the true region mask matrix recorded in the model training set to obtain the intersection of the two matrices Intersection_i;
[0044] Add the predicted region mask matrix and the true region mask matrix element by element, and subtract the intersection to obtain the union of the two matrices, Union_i;
[0045] According to IoU=(Intersection_i+β) / (Union_i+β), the intersection over union (IoU) of the predicted region mask matrix and the true region mask matrix is calculated; where β is a custom constant;
[0046] Calculate the average of the intersection of all predicted results and the actual results And according to Constructing a loss function for the region mask prediction model;
[0047] During model training, when the loss function reaches a minimum value, the model converges, and training is stopped to obtain the final region mask prediction model.
[0048] In a feasible implementation, obtaining the corresponding body region division result according to the region mask matrix specifically includes:
[0049] performing a bitwise multiplication operation on the regional mask matrix corresponding to each key body part output by the regional mask prediction model and the denoised pressure distribution matrix input to the regional mask prediction model, and determining the multiplied matrix as the regional matrix corresponding to the key body part;
[0050] In the region matrix, the position, contact area and pressure data of each key body part on the smart mattress are determined based on the position, area and element value of the elements whose element values are not 0, and the body region division result is obtained.
[0051] On the other hand, an embodiment of the present invention also provides a body area division device based on a smart mattress, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, so that the at least one processor can execute the body area division method based on the smart mattress.
[0052] Compared with the prior art, the body area division method and device based on the smart mattress provided by the embodiment of the present invention has the following beneficial effects:
[0053] 1. Through the synergistic effect of sensor arrays and intelligent algorithms, this invention breaks through the static support mode of traditional mattresses. From pressure data collection to regional mask matrix generation, the entire link process supports real-time dynamic identification of pressure distribution characteristics in various areas of the user's body (such as shoulders, back, waist, buttocks, and legs), thereby realizing active support adjustment of the smart mattress, providing a precise data foundation for personalized comfort adjustment, and significantly improving the human adaptability of the sleeping experience.
[0054] 2. This invention utilizes a technical approach that combines deep learning with geometric analysis, reducing errors in body region delineation through threshold filtering. This approach is particularly robust against deformation characteristics of soft contact surfaces. Furthermore, rather than setting fixed region boundaries or pressure thresholds for body regions, the invention trains a deep learning model by acquiring body region masks. This allows the corresponding body region distribution to be identified based on changes in the pressure distribution matrix. This results in a dynamic, adaptive body region segmentation algorithm that is not limited to specific populations or individual differences and is applicable to a variety of users and sleep states. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments described in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0056] Figure 1 A flow chart of a method for dividing body regions based on a smart mattress provided by an embodiment of the present invention;
[0057] Figure 2 A pressure data distribution diagram before the filtering operation is performed according to an embodiment of the present invention;
[0058] Figure 3 A pressure data distribution diagram after the filtering operation is performed according to an embodiment of the present invention;
[0059] Figure 4 A schematic diagram of key body part region marking provided by an embodiment of the present invention;
[0060] Figure 5 This is a comparative analysis diagram of images after data enhancement provided by an embodiment of the present invention;
[0061] Figure 6 A diagram showing the change of the loss function during the model training process provided by an embodiment of the present invention;
[0062] Figure 7 A diagram showing the accuracy change during the model training process provided by an embodiment of the present invention;
[0063] Figure 8 A schematic structural diagram of a body area segmentation device based on a smart mattress provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0064] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0065] An embodiment of the present invention provides a body region division method based on a smart mattress. This method is applied to a smart mattress. The top layer of the smart mattress is equipped with a pressure array sensor, which can capture the body pressure distribution data of the user while sleeping.
[0066] like Figure 1 As shown, the body area division method based on the smart mattress specifically includes steps S101-S106:
[0067] S101 , collecting initial pressure distribution matrices of different users and sleeping postures through a pressure array sensor, and performing threshold filtering on the pressure data in each initial pressure distribution matrix to obtain a set of denoised pressure distribution matrices.
[0068] Specifically, when a user lies on a smart mattress, since smart mattresses are usually made of relatively soft materials, this soft characteristic leads to a significant problem in actual use, namely, it will generate relatively large noise. To effectively solve this problem, the present invention adopts threshold filtering technology. Since the amplitude of normal pressure data is greater than that of noise data, the principle of threshold filtering is to set a reasonable threshold. When the collected signal strength is lower than this threshold, it is determined to be a noise signal and filtered out; signals above the threshold are determined to be valid signals and retained. The specific process is as follows:
[0069] First, according to Threshold=sum(matrix_x)*α / matrix_PointCont, the filtering threshold Threshold of the initial pressure distribution matrix matrix_x is calculated.
[0070] Among them, α is a preset hyperparameter designed to avoid the situation where the set threshold is too large and prevent the data related to the human arms and legs from being accidentally filtered out during the filtering operation; sum(matrix_x) is the sum of all elements in the initial pressure distribution matrix matrix_x; matrix_PointCont is the element count value in the initial pressure distribution matrix matrix_x.
[0071] Further, according to Perform threshold filtering on the initial pressure distribution matrix matrix_x. If the element value is less than the filtering threshold, it is assigned to 0; otherwise, its original value is retained.
[0072] Among them, matrix_x ij is the element value in the i-th row and j-th column of the pressure distribution matrix matrix_x, where i = 1, 2, ..., m; j = 1, 2, ..., n; m and n are the total number of rows and columns of the pressure distribution matrix respectively.
[0073] As a feasible implementation method, Figure 2 This is a pressure data distribution diagram before the filtering operation is performed according to an embodiment of the present invention. Figure 3 The pressure data distribution diagram after the filtering operation is performed according to the embodiment of the present invention is shown in FIG. Figure 2 and Figure 3From the comparison, it can be seen that after filtering, most of the noise in the sample can be effectively filtered out, which significantly reduces the interference of noise on the data, greatly improves the quality and availability of the data, and provides a more reliable basis for subsequent data analysis and processing. In addition, due to the introduction of hyperparameters when calculating the filtering threshold, the pressure data of the user's legs can be well retained and is not filtered out as noise.
[0074] S102 , generating a corresponding pressure distribution map according to each denoised pressure distribution matrix, marking key body parts in the pressure distribution map with rectangular frames, and generating a regional mask matrix for each key body part.
[0075] Specifically, first generate the following equation based on the denoised pressure distribution matrix: Figure 3 The pressure distribution diagram shown in the figure is then used to frame the body area using two vertical lines, and to divide the body area into several key body parts using several horizontal lines.
[0076] Furthermore, a rectangle formed by the intersection of horizontal and vertical lines is taken as the key body part area; wherein the key body parts include at least shoulders, back, waist, buttocks and legs.
[0077] Furthermore, based on the coordinate values of the upper left corner and the lower right corner of the key body part area, the regional mask matrix corresponding to the key body part is determined; wherein the regional mask matrix includes at least a shoulder region mask, a back region mask, a waist region mask, a hip region mask and a leg region mask.
[0078] As a feasible implementation method, Figure 4 A schematic diagram of key body part region marking provided by an embodiment of the present invention, such as Figure 4 As shown in the figure, two vertical lines are used to frame the left and right contours of the body area, and then multiple horizontal lines are used to segment different body parts, such as shoulders, back, waist, buttocks and legs. Figure 4 It can be seen that the rectangular boxes formed by the intersection of the horizontal and vertical lines are the areas of various body parts. Read the coordinates of the upper left corner and lower right corner of these rectangles in the figure, and then calculate the equation based on the region mask matrix Determine the regional mask matrix mask_label for each key body part ij Among them, x top_right 、y top_right 、x lower_left 、y lower_left They represent the upper right corner horizontal coordinate, upper right corner vertical coordinate, lower left corner horizontal coordinate, and lower left corner vertical coordinate of the rectangle corresponding to the current key body part.
[0079] In one embodiment, if there are five body regions (shoulders, back, waist, hips, and legs), the region mask matrices of the five body parts will be obtained: mask_label_0, mask_label_1, mask_label_2, mask_label_3, mask_label_4, representing the shoulder region mask, back region mask, waist region mask, hip region mask, and leg region mask, respectively.
[0080] S103. Perform data enhancement on the body region elements in the denoised pressure distribution matrix to generate an extended pressure distribution matrix and a corresponding extended region mask matrix, which together with the denoised pressure distribution matrix and its corresponding region mask matrix constitute a model training set.
[0081] Specifically, the body region elements in the denoised pressure distribution matrix are extracted. The rotation centers and several rotation angles of these body region elements are determined based on human body mechanics. Based on these rotation centers and angles, the body region elements are geometrically transformed, and all non-body region elements after the transformation are set to zero, generating a first expanded pressure distribution matrix.
[0082] Then, based on the rotation center and rotation angle, the rectangles corresponding to each key body part corresponding to the denoised pressure distribution matrix are rotated to obtain the key body part area after the rotation transformation, and the matrix elements in the key body part area after the rotation transformation are set to 1, and the remaining elements are set to 0 to generate the first extended area mask matrix corresponding to each key body part.
[0083] Furthermore, according to a preset translation vector, the body region elements are subjected to displacement transformation in the horizontal and vertical directions, and all the transformed non-body region elements are set to 0 to generate a second extended pressure distribution matrix.
[0084] Then, based on the translation vector, the rectangles corresponding to each key body part corresponding to the denoised pressure distribution matrix are translated to obtain the key body part area after the translation transformation, and the matrix elements in the key body part area after the translation transformation are set to 1, and the remaining elements are set to 0 to generate the second extended area mask matrix corresponding to each key body part.
[0085] Finally, the first extended pressure distribution matrix and the second extended pressure distribution matrix are combined into an extended pressure distribution matrix. The first extended region mask matrix and the second extended region mask matrix are respectively associated with the corresponding extended pressure distribution matrix to obtain the extended region mask matrix corresponding to the extended pressure distribution matrix.
[0086] As a feasible implementation, in sleep monitoring research, given the vast diversity of human posture angles during sleep, data augmentation is essential to effectively improve the comprehensiveness and representativeness of the data, thereby enhancing the reliability and universality of subsequent data analysis. The data augmentation in this invention primarily focuses on annotated body region data, employing two key enhancement methods: rotation and translation.
[0087] Rotation simulates the various twisting positions a person may experience during sleep by geometrically transforming the body region data based on a specific rotation angle and center. Translation shifts the body region data horizontally and vertically according to a pre-set translation vector to reflect changes in the spatial position of a person's sleeping posture.
[0088] It is worth noting that when rotating and translating the body region data, the corresponding body region mask must also be processed synchronously. This is to remove invalid edge regions caused by data transformation and ensure that the mask accurately matches the transformed data region, ensuring that the mask can accurately identify the location of the transformed body region. Figure 5 This is a comparative analysis diagram of images after data enhancement provided by an embodiment of the present invention. Figure 5 (a) A clear image of the original pressure distribution is shown, which serves as a benchmark for subsequent comparisons and fully presents the body area data distribution in the initial state. Figure 5 (b) shows the data image after translation, from which the offset of the body area in space and the resulting change in data distribution can be intuitively observed; Figure 5 (c) shows the rotated data image, which clearly shows the changes in the angle of the body area and the impact of this rotation on the distribution of data features.
[0089] S104: Build a region mask prediction model based on the deep learning network, and train the region mask prediction model using the model training set.
[0090] Specifically, based on the U-NET deep learning network, an encoder-decoder structure is constructed; the encoder part contains a series of convolution and pooling operations, which are used to gradually reduce the resolution of the pressure distribution map and extract the high-level semantic features of the pressure distribution map; and the feature map output by the encoder part is directly spliced with the feature map of the corresponding layer of the decoder.
[0091] Furthermore, a regional mask matrix calculation module is constructed and connected to the encoder-decoder structure to form a regional mask prediction model; the regional mask matrix calculation module is used to perform regional mask matrix calculation on the feature map output by the encoder-decoder structure to output the regional mask matrix of each key body part.
[0092] As a feasible implementation, U-NET, a classic convolutional neural network architecture, is widely used in body region segmentation in fields such as medical image segmentation. It is mainly based on the following characteristics:
[0093] Encoder-Decoder Architecture: U-NET uses a symmetric encoder-decoder architecture. The encoder uses a series of convolution and pooling operations to gradually reduce the resolution of the pressure image and extract high-level semantic features.
[0094] Skip connections: U-NET utilizes numerous skip connections, where the encoder's feature maps are directly concatenated with the decoder's feature maps. This connection allows the decoder to retrieve richer low-level features from the encoder while restoring the pressure image's resolution. This includes detailed information about the pressure image, such as body part boundaries. The fusion of low-level features with high-level semantic features improves segmentation accuracy, particularly for more precise delineation of body region boundaries.
[0095] For a pressure matrix data matrix_T, after inputting it into the U-NET model, the model will calculate the pressure matrix data matrix_T to obtain its corresponding five body region masks. The specific formula is: F(matrix_T) = pre_mask_list, where matrix_T represents the denoised pressure distribution matrix, F represents the U-NET network model, and pre_mask_list stores the regional mask matrices corresponding to the five body regions. To obtain a certain region mask, you can use the formula mask_label_i = pre_mask_list[i], 0≤i≤4, where i represents the number of the body part to be obtained.
[0096] Furthermore, the region mask prediction model is trained using the model training set, specifically including:
[0097] During model training, the predicted region mask matrix output by the region mask prediction model is multiplied element-by-element with the true region mask matrix recorded in the model training set to obtain the intersection of the two matrices, Intersection_i. The predicted region mask matrix and the true region mask matrix are added element-by-element and the intersection is subtracted to obtain the union of the two matrices, Union_i.
[0098] Then, according to IoU=(Intersection_i+β) / (Union_i+β), the intersection-over-union (IoU) of the predicted region mask matrix and the true region mask matrix is calculated; where β is a custom constant. Then the average of the intersection-over-union (IoU) of all predicted results and the true results is calculated. And according to Construct a loss function for the region mask prediction model.
[0099] During model training, when the loss function reaches the minimum value, the model converges, training stops, and the final region mask prediction model is obtained.
[0100] As a feasible implementation method, based on the pre_mask_list output by the model, the intersection over union (IoU) of the real body area mask and the body area mask predicted by the model is calculated. The higher the IoU, the higher the degree of overlap between the body area mask predicted by the model and the real body area mask. Given that the real body area mask matrix mask_label_i is composed only of 0 and 1, the intersection area can be obtained by multiplying the predicted body area mask by the real body area mask element by element. From the perspective of mathematical calculation, the union of the two can be obtained by adding the corresponding elements of the predicted area mask and the real area mask, and then subtracting the intersection area of the two. Intersection over Union (IoU) is a key indicator used to measure the degree of consistency between the model prediction results and the actual situation. IoU is calculated by taking the ratio of the area of the intersection of the predicted area and the real area to the area of the real area. In actual calculations, the denominator may be zero, so the present invention introduces a very small constant β to participate in the calculation. Generally speaking, a larger IoU value indicates that the model's predictions are closer to the ground truth, meaning the model's prediction accuracy is higher. Based on the close connection between IoU and model prediction accuracy, the present invention designs a loss function related to the Intersection over Union (IoU) ratio. This loss function takes the IoU metric into account, prompting the model to continuously optimize its predictions during training. Therefore, the model's training objective can be explicitly stated as minimizing this loss function, ensuring that the model-predicted body region masks are as close to the ground truth as possible.
[0101] The model dataset constructed by the present invention covers 3,600 data items, including 2,520 training data items and 1,080 test data items. The region mask prediction model was trained for 50 rounds using the training data. As can be seen, the model's loss gradually decreased during training, while the predicted region coverage gradually increased. Specifically, the model's predicted region coverage reached 98.29% on the training set and 97.79% on the test set. As the number of training rounds increased, the model's loss and accuracy also changed.
[0102] Figure 6 This is a diagram showing the change of the loss function during the model training process provided by an embodiment of the present invention. Figure 7 The accuracy rate change process diagram of the model training process provided by the embodiment of the present invention is shown in Figure 6In the figure, the blue solid line represents the change of the loss value of the model on the training dataset, while the yellow dotted line is used to show the dynamic change of the loss value of the model on the test dataset. Figure 7 In the figure, the blue solid line shows the evolution of the IoU (intersection over union) coverage effect of the model on the training set, and the yellow dotted line shows the changing trend of the IoU coverage effect of the model on the test set.
[0103] S105 , after performing threshold filtering on the pressure distribution matrix obtained in real time, input the result into the regional mask prediction model to obtain the corresponding regional mask matrix, and obtain the corresponding body region division result according to the regional mask matrix.
[0104] Specifically, once a person lies on a stable, stable mattress, the system begins to precisely segment the body. The mattress's sensor array continuously collects pressure data, which is then fed into the regional mask prediction model for in-depth analysis. This model then generates a regional mask matrix for each key body part.
[0105] Furthermore, the regional mask matrix corresponding to each key body part output by the regional mask prediction model is bitwise multiplied with the denoised pressure distribution matrix input to the regional mask prediction model, and the multiplied matrix is determined as the regional matrix corresponding to the key body part.
[0106] In this area matrix, the position, contact area and pressure data of each key body part on the smart mattress are determined according to the position, area and element value of the elements whose element values are not 0, and the body area division results are obtained.
[0107] As a feasible implementation method, the pressure distribution matrix is bitwise multiplied with a specific position mask matrix to extract the corresponding body area. In the position mask matrix, the mask value of the position belonging to the body area is set to 1, and the mask value of the rest is 0. Based on the bitwise multiplication operation rules of matrices, when two matrices are bitwise multiplied, the elements of the corresponding positions are multiplied one by one. In this way, the numerical value corresponding to the body area will be retained, because the result of multiplying 1 with any numerical value is still the number; and the numerical value of the non-body area position, since its mask value is 0, after multiplying with the corresponding position element of the original matrix, the result is 0, so the regional position information of each key body part can be extracted.
[0108] S106. Combining the obtained body area division results with the time series to construct a three-dimensional health map.
[0109] Specifically, the rectangular coordinate matrix generated in this invention not only defines the location of physiological regions but also correlates time-series pressure change data to construct a three-dimensional health map. This map can assist in diagnosing spinal curvature abnormalities, pressure injury risks, and other issues, providing a new data dimension for remote medical monitoring and sleep health research.
[0110] The algorithm module in this invention adopts a pluggable design, supporting the subsequent integration of physiological parameters such as heart rate variability and respiratory rate, building a multimodal health monitoring platform. A reserved API interface also facilitates integration with smart home systems, forming a closed-loop management ecosystem for "sleep-environment-health."
[0111] In addition, the embodiment of the present invention also provides a body area division device based on a smart mattress, such as Figure 8 As shown, the body area division device based on the smart mattress specifically includes:
[0112] at least one processor; and a memory communicatively connected to the at least one processor; wherein,
[0113] The memory stores instructions executable by at least one processor, so as to enable the at least one processor to perform:
[0114] The pressure array sensor collects initial pressure distribution matrices of different users and different sleeping postures, and performs threshold filtering on the pressure data in each initial pressure distribution matrix to obtain a set of denoised pressure distribution matrices;
[0115] generating a corresponding pressure distribution map according to each denoised pressure distribution matrix, marking key body parts in the pressure distribution map with rectangular boxes, and generating a regional mask matrix for each key body part;
[0116] Performing data enhancement on the body region elements in the denoised pressure distribution matrix to generate an extended pressure distribution matrix and a corresponding extended region mask matrix, which together with the denoised pressure distribution matrix and its corresponding region mask matrix constitute a model training set;
[0117] Constructing a region mask prediction model based on a deep learning network, and training the region mask prediction model using the model training set;
[0118] The pressure distribution matrix obtained in real time is threshold filtered and then input into the regional mask prediction model to obtain a corresponding regional mask matrix, and the corresponding body region division result is obtained according to the regional mask matrix.
[0119] The various embodiments of the present invention are described in a progressive manner. Similar portions between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the device, apparatus, and non-volatile computer storage medium embodiments are generally similar to the method embodiments, so their descriptions are simplified. For relevant details, refer to the descriptions of the method embodiments.
[0120] The above description of specific embodiments of the present invention is provided. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0121] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations may be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A body area division method based on a smart mattress, characterized in that: The smart mattress comprises at least a pressure array sensor mounted on a top layer of the mattress, and the method comprises: The pressure array sensor collects initial pressure distribution matrices of different users and different sleeping postures, and performs threshold filtering on the pressure data in each initial pressure distribution matrix to obtain a set of denoised pressure distribution matrices; generating a corresponding pressure distribution map according to each denoised pressure distribution matrix, marking key body parts in the pressure distribution map with rectangular boxes, and generating a regional mask matrix for each key body part; Performing data enhancement on the body region elements in the denoised pressure distribution matrix to generate an extended pressure distribution matrix and a corresponding extended region mask matrix, which together with the denoised pressure distribution matrix and its corresponding region mask matrix constitute a model training set; Constructing a region mask prediction model based on a deep learning network, and training the region mask prediction model using the model training set; The pressure distribution matrix obtained in real time is threshold filtered and then input into the regional mask prediction model to obtain a corresponding regional mask matrix, and the corresponding body region division result is obtained according to the regional mask matrix.
2. The method for dividing body regions based on a smart mattress according to claim 1, characterized in that: Threshold filtering is performed on the pressure data in each initial pressure distribution matrix to obtain a set of denoised pressure distribution matrices, specifically including: According to Threshold = sum(matrix_x) * α / matrix_PointCont, calculate the filtering threshold Threshold of the initial pressure distribution matrix matrix_x; Where α is a preset hyperparameter; sum(matrix_x) is the sum of all elements in the initial pressure distribution matrix matrix_x; matrix_PointCont is the element count value in the initial pressure distribution matrix matrix_x; according to Perform threshold filtering on the initial pressure distribution matrix matrix_x, and assign the element value to 0 if it is less than the filtering threshold; otherwise, retain the original value; Among them, matrix_x ij is the element value in the i-th row and j-th column of the pressure distribution matrix matrix_x, where i = 1, 2, ..., m; j = 1, 2, ..., n; m and n are the total number of rows and columns of the pressure distribution matrix respectively.
3. The method for dividing body regions based on a smart mattress according to claim 1, characterized in that: In the pressure distribution map, key body parts are marked with rectangular frames, and a regional mask matrix for each key body part is generated, specifically including: In the pressure distribution diagram, a body area is framed by two vertical lines, and the body area is divided into a number of key body parts by a number of horizontal lines. The rectangle formed by the intersection of the horizontal and vertical lines is taken as the key body part area; wherein the key body parts include at least shoulders, back, waist, buttocks and legs; According to the coordinate values of the upper left corner and the lower right corner of the key body part area, the regional mask matrix corresponding to the key body part is determined; wherein the regional mask matrix includes at least a shoulder region mask, a back region mask, a waist region mask, a hip region mask and a leg region mask.
4. The method for dividing body regions based on a smart mattress according to claim 3, characterized in that: According to the coordinate values of the upper left corner and the lower right corner of the key body part area, the regional mask matrix corresponding to the key body part is determined, specifically including: according to Determine the regional mask matrix mask_label for each key body part ij ; Among them, x top_right 、y top_right 、x lower_left 、y lower_left They represent the upper right corner horizontal coordinate, upper right corner vertical coordinate, lower left corner horizontal coordinate, and lower left corner vertical coordinate of the rectangle corresponding to the current key body part.
5. The method for dividing body regions based on a smart mattress according to claim 1, characterized in that: Performing data enhancement on the body region elements in the denoised pressure distribution matrix to generate an extended pressure distribution matrix, specifically comprising: Extracting body region elements from the denoised pressure distribution matrix, and determining a rotation center and several rotation angles of the body region elements based on human body mechanics; Based on the rotation center and the rotation angle, geometrically transform the body region elements, and set all the transformed non-body region elements to 0 to generate a first extended pressure distribution matrix; performing displacement transformation on the body region elements in the horizontal and vertical directions according to a preset translation vector, and setting all the transformed non-body region elements to 0 to generate a second expanded pressure distribution matrix; The first extended pressure distribution matrix and the second extended pressure distribution matrix are combined into the extended pressure distribution matrix.
6. The method for dividing body regions based on a smart mattress according to claim 5, characterized in that: Performing data enhancement on the body region elements in the denoised pressure distribution matrix to generate an extended region mask matrix corresponding to the extended pressure distribution matrix specifically includes: Based on the rotation center and the rotation angle, a rectangle corresponding to each key body part corresponding to the denoised pressure distribution matrix is rotated to obtain a key body part region after the rotation transformation, and matrix elements in the key body part region after the rotation transformation are set to 1 and other elements are set to 0 to generate a first extended region mask matrix corresponding to each key body part; Based on the translation vector, a rectangle corresponding to each key body part corresponding to the denoised pressure distribution matrix is subjected to a translation transformation to obtain a key body part region after the translation transformation, and matrix elements in the key body part region after the translation transformation are set to 1 and other elements are set to 0 to generate a second extended region mask matrix corresponding to each key body part; The first extended area mask matrix and the second extended area mask matrix are respectively associated with corresponding extended pressure distribution matrices to obtain extended area mask matrices corresponding to the extended pressure distribution matrices.
7. The method for dividing body regions based on a smart mattress according to claim 1, characterized in that: Build a region mask prediction model based on a deep learning network, specifically including: Based on the U-NET deep learning network, an encoder-decoder structure is constructed. The encoder part includes a series of convolution and pooling operations to gradually reduce the resolution of the pressure distribution map and extract high-level semantic features of the pressure distribution map. The feature map output by the encoder part is directly spliced with the feature map of the corresponding layer of the decoder. A regional mask matrix calculation module is constructed and connected to the encoder-decoder structure to form the regional mask prediction model; the regional mask matrix calculation module is used to perform regional mask matrix calculation on the feature map output by the encoder-decoder structure to output the regional mask matrix of each key body part.
8. The method for dividing body regions based on a smart mattress according to claim 1, characterized in that: Training the region mask prediction model using the model training set specifically includes: During the model training process, the predicted region mask matrix output by the region mask prediction model is multiplied element by element with the true region mask matrix recorded in the model training set to obtain the intersection of the two matrices Intersection_i; Add the predicted region mask matrix and the true region mask matrix element by element, and subtract the intersection to obtain the union of the two matrices, Union_i; According to IoU=(Intersection_i+β) / (Union_i+β), the intersection over union (IoU) of the predicted region mask matrix and the true region mask matrix is calculated; where β is a custom constant; Calculate the average of the intersection of all predicted results and the actual results And according to Constructing a loss function for the region mask prediction model; During model training, when the loss function reaches a minimum value, the model converges, and training is stopped to obtain the final region mask prediction model.
9. The method for dividing body regions based on a smart mattress according to claim 1, characterized in that: Obtaining the corresponding body region division result according to the region mask matrix specifically includes: performing a bitwise multiplication operation on the regional mask matrix corresponding to each key body part output by the regional mask prediction model and the denoised pressure distribution matrix input to the regional mask prediction model, and determining the multiplied matrix as the regional matrix corresponding to the key body part; In the region matrix, the position, contact area and pressure data of each key body part on the smart mattress are determined based on the position, area and element value of the elements whose element values are not 0, and the body region division result is obtained.
10. A body area division device based on a smart mattress, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, so that the at least one processor can execute the body area division method based on the smart mattress according to any one of claims 1 to 9.