A control method and device of an air conditioner and the air conditioner
By combining a TOF sensor and an infrared sensor with a long short-term memory network model, the problem of insufficient information from a single sensor in the traditional air conditioner sleep mode is solved, enabling accurate identification of user posture and thermal status and adaptive adjustment of air conditioner parameters.
Patent Information
- Application Number
- CN202611537131.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-20
AI Technical Summary
Traditional air conditioners' sleep modes cannot be dynamically adjusted according to the user's actual state, and the information obtained by a single sensor is insufficient and its accuracy is difficult to guarantee under different environmental conditions.
A TOF sensor is used to acquire a full-body depth image of the user, and an infrared sensor is used to acquire full-body temperature field data. The attitude and thermal features are weighted and fused by calculating confidence levels, and a long short-term memory network model is used for state recognition and air conditioning parameter adjustment.
It achieves accurate recognition of user posture and thermal state in complex sleep environments, reduces the impact of environmental interference on detection results, and enables adaptive adjustment of air conditioning operating parameters.
Smart Images

Figure CN123134579A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of air conditioner technology, and more specifically, to an air conditioner control method, device, and air conditioner. Background Technology
[0002] Sleep mode on air conditioners is an important application scenario in the field of smart home appliances. Its core objective is to provide a comfortable ambient temperature and ensure sleep quality during the user's sleep. Traditional air conditioner sleep modes typically use fixed temperature curves or simple timer adjustment strategies, which cannot dynamically adjust according to the user's actual condition.
[0003] Currently, some air conditioning control solutions attempt to optimize sleep control by detecting user status using sensors. For example, they determine sleep regulation needs by detecting the user's heart rate data, or by acquiring body characteristic parameters. However, the information obtained from a single sensor is limited in scope and cannot fully reflect the user's true thermal comfort state. Furthermore, existing technologies do not consider the reliability differences of sensors under different environmental conditions; for example, when sensors are interfered with by factors such as ambient light or blankets, the accuracy of the detection results is difficult to guarantee.
[0004] Therefore, an air conditioning control method is needed that can integrate multi-dimensional sensing information and evaluate sensor reliability to solve the technical problems of insufficient information dimensions from a single sensor and difficulty in ensuring accuracy under interference conditions, so as to achieve precise adaptive adjustment of air conditioning operating parameters in sleep mode. Summary of the Invention
[0005] The purpose of this invention is to provide a control method, device and air conditioner for an air conditioner, to solve the technical problems of insufficient information dimension of a single sensor and difficulty in ensuring accuracy under interference conditions, and to realize adaptive adjustment of air conditioner operating parameters in sleep mode.
[0006] To achieve the above objectives, the present invention provides an air conditioning control method, comprising: in response to the air conditioner entering sleep mode, acquiring a full-body depth image of the user via a Time-of-Flight (TOF) sensor, and extracting the three-dimensional coordinates of key points of the whole body skeleton from the depth image; extracting posture features based on the three-dimensional coordinates of the key points of the whole body skeleton; acquiring full-body temperature field data of the user via an infrared sensor, and extracting thermal features from the temperature field data; calculating a first confidence level of the TOF sensor and a second confidence level of the infrared sensor respectively; weighting the posture features based on the first confidence level and weighting the thermal features based on the second confidence level to construct a weighted feature vector; constructing a temporal feature sequence from multiple weighted feature vectors within a continuous time window, inputting it into a Long Short-Term Memory (LSTM) network model, the LTM network model outputting a cooling state, a comfortable state, or a heating state; and controlling the operating parameters of the air conditioner in sleep mode according to the state output by the LTM network model.
[0007] The technical effects achieved by adopting this solution are as follows: First, by acquiring full-body depth images of the user through a Time-of-Flight (TOF) depth sensor and full-body temperature field data through an infrared sensor, simultaneous acquisition of user posture and physiological thermal state information is achieved, overcoming the shortcomings of insufficient information dimensions from a single sensor. Second, by calculating the state confidence scores of the TOF depth sensor and the infrared sensor separately, and then weighting and fusing the corresponding features based on the confidence scores, the interference of complex sleep environment factors such as changes in ambient light, sensor distance offset, occlusion by blankets, and wind speed interference on the user's body surface is reduced, improving the accuracy of the detection results. Third, by constructing a temporal feature sequence from the weighted feature vectors within a continuous time window and inputting it into a Long Short-Term Memory (LSTM) network model for modeling and analysis, the temporal pattern of the user's cold and hot sensations over time is fully utilized, achieving accurate comfort recognition. Finally, the air conditioning operating parameters are adaptively adjusted based on the cold, comfortable, or hot sensations output by the model. Therefore, this technical solution solves the technical problems of insufficient information dimensions from a single sensor and difficulty in ensuring accuracy under interference conditions, achieving adaptive adjustment of air conditioning operating parameters in sleep mode.
[0008] Furthermore, the three-dimensional coordinates of key points of the whole body skeleton are extracted from the depth image. Specifically, this includes: performing background subtraction processing on the depth image to extract the human foreground region; performing skeletonization processing on the human foreground region to obtain skeleton lines with a single pixel width; traversing the skeleton lines using a forest tree traversal method with the center of the human region as the parent node, detecting the endpoints and bifurcation points of the skeleton branches, which are respectively used as the human end position and the human joint position; combining the image coordinates of the detected human end position and human joint position with the corresponding depth values, and converting them into three-dimensional spatial coordinates through the camera intrinsic parameter matrix to obtain the three-dimensional coordinates of the key points of the whole body skeleton; the key points of the whole body skeleton include at least the following 17 points: head, neck, left shoulder, right shoulder, left elbow, right elbow, left wrist, right wrist, left hip, right hip, left knee, right knee, left ankle, right ankle, chest center, hip center, and centroid.
[0009] The technical effects achieved by adopting this solution are as follows: Background subtraction processing accurately separates the foreground region of the human body from the depth image, eliminating interference from static backgrounds such as the bed and blankets; skeletonization of the foreground region yields single-pixel-width skeleton lines, providing a clear topological structure for locating the human extremities and joints; a forest tree traversal method, using the center of the human region as the parent node, accurately detects the endpoints and bifurcation points of the skeleton branches, corresponding to the positions of the human extremities and joints, respectively. The detected image coordinates are combined with the corresponding depth values and converted into three-dimensional spatial coordinates through the camera intrinsic parameter matrix, achieving a mapping from two-dimensional images to three-dimensional physical space. This yields 17 skeletal key points covering major parts such as the head, neck, upper limbs, torso, and lower limbs, providing comprehensive and accurate data for determining sleeping posture type, limb activity intensity, and curling angles.
[0010] Furthermore, posture features are extracted based on the three-dimensional coordinates of key points of the whole skeleton, specifically including: calculating the angle between the line connecting the center of the shoulder to the center of the hip and the horizontal plane, as the trunk tilt angle; calculating the angle formed by the lines connecting the center of the shoulder, the center of the hip, and the center of the knee, as the curl angle; calculating the square root of the sum of the squares of the displacements of all key points of the skeleton between two consecutive frames, as the intensity of limb activity; calculating the limb extension angle formed by the center of the shoulder, the center of the hip, the center of the knee, and the center of the ankle, as the limb extension degree; and determining the sleeping posture type as supine, lateral, prone, or curled up based on the trunk tilt angle, curl angle, and limb extension degree.
[0011] The technical effects achieved by adopting this solution are as follows: The trunk tilt angle is obtained by calculating the angle between the line connecting the center of the shoulder to the center of the hip and the horizontal plane, accurately reflecting the overall tilt of the user's trunk; the curl angle is obtained by calculating the angle formed by the lines connecting the centers of the shoulder, hip, and knee, quantifying the degree of curling of the user's trunk and lower limbs. When users feel cold, they often instinctively curl up to conserve heat; the smaller the angle value, the more severe the curling, providing important behavioral data for judging cold sensation; the limb activity intensity is obtained by calculating the square root of the sum of the squares of the displacements of all skeletal key points between two consecutive frames, quantifying the overall intensity of the user's activity during sleep. Insufficient activity intensity indicates deep sleep or cold-induced stiffness. Excessive intensity may indicate frequent turning over due to discomfort from heat, thus providing behavioral data for judging the user's comfort state. By calculating the limb extension angle formed by the center of the shoulder, hip, knee, and ankle, the degree of limb extension is obtained, which can reflect the degree of extension of the user's limbs. When users feel discomfort from heat, they often extend their limbs to increase the heat dissipation area. The greater the extension, the higher the likelihood of heat. By combining the three dimensions of trunk tilt angle, curling angle, and limb extension, the sleeping posture is determined to be one of supine, lateral, prone, or curled up. This realizes the determination of sleeping posture based on multi-dimensional posture parameters, providing more accurate posture feature data for the long short-term memory network model to identify the cold, comfortable, or hot state, and improving the recognition accuracy of features under complex sleep postures.
[0012] Furthermore, the system acquires whole-body temperature field data of the user through an infrared sensor and extracts thermal features from the temperature field data. Specifically, this includes: acquiring whole-body temperature field data of the user through an infrared sensor; calculating the average temperature of all pixels in the human body region of the whole-body temperature field data as the user's body surface temperature; calculating the difference between the average temperature of the neck and chest regions of the human body and the average temperature of the hand and foot regions of the human body as the core-terminal temperature difference; marking pixels in the whole-body temperature field data whose temperature is lower than the local average temperature and whose difference exceeds a preset threshold as sweating candidate pixels, and calculating the proportion of sweating candidate pixels to the total number of pixels in the human body region as the sweating area.
[0013] The technical effects achieved by adopting this solution are as follows: Calculating the average temperature of all pixels in the human body area as the user's body surface temperature reflects the user's overall thermal comfort level and can serve as a direct basis for determining hot or cold sensations. By calculating the difference between the average temperature of the neck and chest areas (core area) and the average temperature of the hand and foot areas (extremity area), the core-extremity temperature difference is obtained. This core-extremity temperature difference reflects the contraction and dilation of the user's peripheral blood vessels. When the body feels cold, peripheral blood vessels constrict to reduce heat loss, increasing the core-extremity temperature difference; when the body feels hot, peripheral blood vessels dilate to increase heat loss, increasing the core-extremity temperature difference. The decrease or near-zero temperature difference at the extremities provides important physiological data for judging hot and cold sensations. By marking pixels in the temperature field whose temperature is lower than the local average temperature and whose difference exceeds a preset threshold as candidate pixels for sweating, and calculating the proportion of these pixels to the total number of pixels in the human body area as the area of the sweating region, it is possible to effectively identify obvious cooling areas caused by sweat evaporation on the local skin. The larger the sweating area, the higher the probability that the user is in a hot state, providing physiological evidence for judging hot sensations. It provides more accurate thermal feature data for the Long Short-Term Memory Network Model to identify cold, comfortable, or hot states, and further improves the recognition accuracy of features under complex sleep postures.
[0014] Furthermore, the formula for calculating the first confidence level of a TOF sensor is as follows: in, The first confidence level of the TOF sensor. For ambient light intensity, For the user's skin surface reflectivity, The actual distance between the TOF sensor and the user. To achieve the optimal distance between the TOF sensor and the user, , , This is an empirical coefficient.
[0015] The technical effects achieved by adopting this solution are as follows: Since the accuracy of the TOF sensor is affected by factors such as excessive ambient light intensity, low reflectivity of the user's body surface, or the user's distance from the sensor exceeding its optimal operating range, the reliability of the TOF sensor is quantitatively evaluated by introducing three influencing factors: ambient light intensity, user's body surface reflectivity, and the distance between the sensor and the user. This avoids interference from factors such as changes in ambient light intensity, differences in user's body surface material, and user position offset on the depth image quality, and improves the reliability of posture feature extraction in complex sleep environments.
[0016] Furthermore, the formula for calculating the second confidence level of the infrared sensor is as follows: in, This represents the second confidence level of the infrared sensor. For ambient temperature, For user's body surface temperature, Wind speed at the user's body surface. The quilt coverage factor is . , , This is an empirical coefficient.
[0017] The technical effects achieved by adopting this solution are as follows: Since the ambient temperature of the room, whether the user is covered by a blanket, and the wind speed on the user's body surface all affect the measurement accuracy of the infrared sensor, the reliability of the infrared sensor is quantitatively evaluated by introducing three influencing factors: the reciprocal of the difference between the ambient temperature and the user's body surface temperature, the blanket coverage coefficient, and the wind speed on the user's body surface. This avoids the impact of factors such as the room ambient temperature being close to the body surface temperature, the blanket covering a large area, and air conditioning interference on the accuracy of infrared temperature measurement, and improves the reliability of thermal feature extraction in complex sleep environments.
[0018] Furthermore, the posture features are weighted based on the first confidence level, and the thermal features are weighted based on the second confidence level to construct a weighted feature vector. Specifically, this includes: multiplying the limb activity intensity in the posture features by the first confidence level to obtain the weighted limb activity intensity; multiplying the curling angle in the posture features by the first confidence level to obtain the weighted curling angle; converting the sleeping posture type in the posture features into a continuous vector and multiplying it by the first confidence level to obtain the weighted sleeping posture type vector; multiplying the user's body surface temperature in the thermal features by the second confidence level to obtain the weighted user's body surface temperature; multiplying the core-to-terminal temperature difference in the thermal features by the second confidence level to obtain the weighted core-to-terminal temperature difference; multiplying the sweating area in the thermal features by the second confidence level to obtain the weighted sweating area; and concatenating the weighted limb activity intensity, weighted curling angle, weighted sleeping posture type vector, weighted user body surface temperature, weighted core-to-terminal temperature difference, and weighted sweating area to form the weighted feature vector.
[0019] The technical effects achieved by adopting this solution are as follows: By weighting posture features with a first confidence level and thermal features with a second confidence level, this solution can adjust the weights according to the actual data quality of the sensor, ensuring that highly reliable features contribute more to the judgment result. Furthermore, the weighted features from the six dimensions are concatenated to form a unified weighted feature vector, achieving effective fusion of multi-dimensional features and providing accurate data for the Long Short-Term Memory (LSTM) network model to identify cold, comfortable, or hot states.
[0020] Furthermore, the long short-term memory network model is a long short-term memory network structure, including: a first layer of long short-term memory network units with 32~128 neurons and tanh activation function; a second layer of long short-term memory network units with 16~64 neurons and tanh activation function; a random dropout layer with a dropout rate of 0.1~0.5; and a fully connected layer with 3 neurons and Softmax activation function.
[0021] The technical effects achieved by adopting this solution are as follows: A long short-term memory (LSTM) network structure is used to perform temporal modeling of weighted feature vector sequences within a continuous time window. The first LSTM unit extracts deep temporal dependencies from the input sequence, while the second LSTM unit further abstracts and reduces dimensionality at the high-level semantic level. Both layers use the tanh activation function to ensure the non-linear expressive power of the gradient. A random dropout layer is used to randomly drop some neurons during training, effectively preventing overfitting and enhancing generalization ability. Finally, a fully connected layer maps the high-level features output by the LSTM network model to three neurons, and a Softmax activation function is used to output the probability distribution of three states: cold, comfortable, or hot. This allows the air conditioner to execute the corresponding operating parameters based on the state with the highest probability.
[0022] This invention also provides an air conditioning control device for implementing any of the above-described air conditioning control methods, comprising: an acquisition module for acquiring a user's whole-body depth image via a TOF sensor and extracting the three-dimensional coordinates of key points of the whole-body skeleton from the depth image; a posture feature extraction module for extracting posture features based on the three-dimensional coordinates of the key points of the whole-body skeleton; a thermal feature extraction module for acquiring the user's whole-body temperature field data via an infrared sensor and extracting thermal features from the temperature field data; a confidence calculation module for calculating a first confidence level of the TOF sensor and a second confidence level of the infrared sensor, respectively; a weighted feature vector construction module for weighting the posture features based on the first confidence level and weighting the thermal features based on the second confidence level to construct a weighted feature vector; a long short-term memory network inference module for constructing a temporal feature sequence from multiple weighted feature vectors within a continuous time window and inputting it into a long short-term memory network model, wherein the long short-term memory network model outputs a cooling state, a comfortable state, or a heating state; and a control module for controlling the operating parameters of the air conditioner in sleep mode according to the state output by the long short-term memory network model.
[0023] The technical effects achieved by adopting this solution are as follows: The air conditioner is controlled to enter sleep mode by collecting the user's posture and thermal features using a TOF sensor and an infrared sensor, respectively, achieving multi-dimensional perception and overcoming the limitations of insufficient information from a single sensor. By calculating the dynamic confidence levels of the two sensors separately and performing differentiated weighted fusion of the corresponding features, the interference of factors such as ambient light, blanket coverage, and wind speed on the detection results is reduced, ensuring a greater contribution of highly reliable features. The multi-dimensional weighted features are concatenated into a unified vector, input into a long short-term memory network for temporal modeling, and finally output the probability distribution of three states: cooling, comfort, or heating, achieving accurate identification of the user's thermal comfort state. Furthermore, the air conditioner's operating parameters can be precisely and adaptively adjusted in sleep mode without requiring the user to wear any devices.
[0024] The present invention also provides an air conditioner, characterized in that it comprises: an indoor unit body; a TOF sensor installed on the front of the indoor unit body for acquiring a user's full-body depth image; an infrared sensor installed on the front of the indoor unit body for acquiring the user's full-body temperature field data; a memory storing a computer program; and a processor connected to the TOF sensor, the infrared sensor, and the memory, wherein the processor executes the computer program to implement the air conditioning control method as described above.
[0025] The technical effects achieved by adopting this solution are as follows: By integrating the TOF sensor and the infrared sensor and installing them on the front of the indoor unit of the air conditioner, non-contact depth images and temperature field data of the user in bed can be collected synchronously at the air conditioner installation location. The air conditioner can achieve adaptive adjustment of operating parameters in sleep mode without the user wearing any additional equipment. Attached Figure Description
[0026] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which: Figure 1 A flowchart of the steps of an air conditioning control method provided in an embodiment of the present invention; Figure 2 A schematic block diagram of a control device for an air conditioner provided in an embodiment of the present invention; Figure labeling: 100-Air conditioning control device; 110-Acquisition module; 120-Attitude feature extraction module; 130-Thermal feature extraction module; 140-Confidence calculation module; 150-Weighted feature vector construction module; 160-Long short-term memory network inference module; 170-Control module. Detailed Implementation
[0027] To make the above-mentioned objectives, features, and advantages of the present invention more apparent and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] When the air conditioner enters sleep mode in response to a user command, embodiments of the present invention provide an air conditioner control method, see [link to relevant documentation]. Figure 1 As shown, it includes: S1: In response to the air conditioner entering sleep mode, the user's full-body depth image is acquired through the TOF sensor, and the three-dimensional coordinates of key points of the whole body skeleton are extracted from the depth image. This includes extracting the three-dimensional coordinates of key points of the whole-body skeleton from depth images; specifically: S11: Perform background subtraction processing on the depth image to extract the foreground region of the human body; Before the air conditioner is initially installed or before the user goes to bed, a background depth image of the room excluding human figures is pre-captured and stored as a background model in the air conditioner's memory. When the air conditioner enters sleep mode, the TOF sensor acquires the user's current depth image in real time. The depth difference between the current depth image and the corresponding pixels of the background model is calculated one by one. When the depth difference of a pixel exceeds a preset threshold (e.g., 50mm), the pixel is determined to belong to the foreground region of the human body; otherwise, it is determined to be the background region. Through pixel-by-pixel difference comparison and binarization processing, a foreground mask image is generated, with pixels having a mask value of 1 constituting the foreground region of the human body. This accurately removes static backgrounds such as the bed surface, pillow, and walls, retaining only the pixel region corresponding to the user's body.
[0029] S12: Skeletonize the foreground area of the human body to obtain a skeleton line with a width of one pixel; Based on the human foreground region obtained in step S11, a morphological thinning algorithm is used to perform iterative erosion processing. In each iteration, all foreground pixels in the mask are traversed simultaneously. For example, the distribution of its 8-neighbor pixels is checked. When the neighbor pixel connection number is 1 and the number of foreground pixels in the neighborhood is between 2 and 6, the pixel is marked as to be deleted, until there are no more pixels to be deleted. After multiple iterations, the human foreground region, which originally had a certain width, is gradually eroded into skeleton lines composed only of single-pixel-width lines.
[0030] S13: Using the forest tree traversal method, the skeleton line is traversed with the center of the human body region as the parent node, and the endpoints and bifurcation points of the skeleton branches are detected, which are respectively used as the end position of the human body and the position of the human body joint. First, calculate the center of the human body region, which is the average of the coordinates of all pixels within the foreground area of the human body. Then, starting from the center of the human body region, traverse sequentially along the connected paths of the skeleton lines, recording each skeleton pixel on the path and its connectivity. When a skeleton pixel has only one adjacent skeleton pixel, it is determined to be a branch endpoint, corresponding to the end position of the human body, such as the head, fingertips, toes, etc. When a skeleton pixel has three or more adjacent skeleton pixels, it is determined to be a bifurcation point, corresponding to the joint position of the human body, such as the shoulder, elbow, knee, etc. When the middle point of a branch path is reached and has two adjacent pixels, it is a normal path point.
[0031] S14: Combine the image coordinates of the detected human end position and human joint position with the corresponding depth values, and convert them into three-dimensional spatial coordinates through the camera intrinsic parameter matrix to obtain the three-dimensional coordinates of key points of the whole body skeleton.
[0032] The pixel coordinates (u, v) of each joint and end point detected in step S13 are extracted on the image. Combined with the depth value Z (unit: mm) measured by the TOF sensor at that pixel location, the coordinates are converted according to the inverse projection formula of the pinhole camera model through the pre-calibrated TOF sensor camera intrinsic parameter matrix.
[0033] The formula for inverse projection is: Where f_x and f_y are the equivalent focal lengths of the TOF sensor in the x and y directions (unit: pixels), and c_x and c_y are the pixel coordinates of the principal point of the image. After the above transformation, the image coordinates (u,v) and depth value Z of each joint point are mapped to three-dimensional spatial coordinates (X,Y,Z). The origin of the coordinate system is the optical center of the TOF sensor, the X-axis is the horizontal direction (negative on the left and positive on the right), the Y-axis is the vertical direction (negative at the top and positive at the bottom), and the Z-axis is the depth direction (positive when the sensor points towards the user).
[0034] The key points of the entire skeletal system include at least the following 17 points: head, neck, left shoulder, right shoulder, left elbow, right elbow, left wrist, right wrist, left hip, right hip, left knee, right knee, left ankle, right ankle, center of the chest, center of the hip, and center of mass. The center of mass is the center point of the body region; the center of the chest is the midpoint between the center of the neck and the center of the hip; the center of the hip is the midpoint between the left and right hips. The final result is the extraction of three-dimensional coordinate data for these 17 key points.
[0035] S2: Extracting pose features based on the 3D coordinates of key points on the whole skeleton; specifically including: Calculate the angle between the line connecting the center of the shoulder to the center of the hip and the horizontal plane, and use it as the trunk tilt angle; Calculate the angle formed by the lines connecting the center of the shoulder, the center of the hip, and the center of the knee, and use this angle as the curl-up angle; Calculate the square root of the sum of squares of displacements of all skeletal keypoints between two consecutive frames, and use it as the intensity of limb activity; Calculate the limb extension angles formed by the center of the shoulder, center of the hip, center of the knee, and center of the ankle, as the limb extension degree; Based on the trunk tilt angle, curling angle, and limb extension, the sleeping position type is determined to be one of supine, lateral, prone, or curled-up.
[0036] Examples of sleeping posture type determination are as follows: When the trunk tilt angle is 8° (trunk horizontal), the curl-up angle is 168° (close to straight), and the limb extension is 0.92 (limbs fully extended), the overall determination is supine; when the trunk tilt angle is 42° (trunk obviously tilted), the curl-up angle is 155° (moderate flexion), and the limb extension is 0.55 (limbs slightly flexed), the overall determination is lateral; when the trunk tilt angle is 12° (trunk horizontal), the curl-up angle is 170° (close to straight), and the limb extension is 0.50 (limbs slightly flexed), the extension is significantly lower than supine, and the overall determination is prone; when the trunk tilt angle is 15° (trunk nearly horizontal), the curl-up angle is 95° (obvious folding), and the limb extension is 0.25 (limbs tightly tucked in), the overall determination is curled up.
[0037] S3: Acquires the user's whole-body temperature field data using an infrared sensor, and extracts thermal features from the temperature field data; specifically including: The user's whole-body temperature field data is collected using an infrared sensor; Calculate the average temperature of all pixels in the human body region of the whole body temperature field data, and use it as the user's body surface temperature; The difference between the average temperature of the neck and chest regions of the human body and the average temperature of the hand and foot regions is calculated as the core-terminal temperature difference. In the whole-body temperature field data, pixels whose temperature is lower than the local average temperature and whose difference exceeds a preset threshold are marked as sweating candidate pixels. The proportion of sweating candidate pixels to the total number of pixels in the human body area is calculated as the area of the sweating region.
[0038] The average temperature of all pixels in the human body region is calculated as the user's body surface temperature, which reflects the user's overall thermal comfort level. If the user's body surface temperature is too low (below 31°C), it indicates a feeling of cold; if it is too high (above 35°C), it indicates a feeling of heat. This serves as a direct basis for determining whether the user feels hot or cold. The core-to-distal temperature difference is obtained by calculating the difference between the average temperature of the neck and chest regions (core region) and the average temperature of the hand and foot regions (distal region). This core-to-distal temperature difference reflects the contraction and dilation of the user's peripheral blood vessels. When the body feels cold, peripheral blood vessels constrict to reduce heat loss, increasing the core-to-distal temperature difference; when the body feels hot, peripheral blood vessels dilate to increase heat loss, decreasing the core-to-distal temperature difference or approaching zero. This provides important physiological data for judging whether the user feels hot or cold. In the temperature field data, each pixel within the human body area is scanned pixel by pixel, and the local average temperature of the 3×3 neighborhood around the pixel is calculated. When the temperature of the pixel is lower than its local average temperature and the difference exceeds a preset threshold, the pixel is marked as a candidate pixel for sweating. The preset threshold can be set to 0.5℃. The number of all candidate pixels for sweating within the human body area is counted and divided by the total number of pixels in the human body area to obtain the proportion of the sweating area. The larger the area of the sweating area, the more likely the user is to be in a state of heat sensation.
[0039] S4: Calculate the first confidence level of the TOF sensor and the second confidence level of the infrared sensor respectively; The formula for calculating the first confidence level of a TOF sensor is as follows: in, The first confidence level of the TOF sensor. For ambient light intensity, For the user's skin surface reflectivity, The actual distance between the TOF sensor and the user. To achieve the optimal distance between the TOF sensor and the user, , , This is an empirical coefficient.
[0040] Since the accuracy of TOF sensors can be affected by excessively strong ambient light, low reflectivity of the user's skin, or when the user's distance exceeds the sensor's optimal operating range, three influencing factors—ambient light intensity, user's skin reflectivity, and the distance between the sensor and the user—are introduced to quantitatively evaluate the measurement reliability of TOF sensors. This avoids interference from factors such as changes in ambient light, differences in user skin material, and user position offset on depth image quality, thereby improving the reliability of posture feature extraction in complex sleep environments.
[0041] Specifically, the ambient light intensity varies greatly depending on whether the lights are off at night, sunlight shines directly through windows during the day, or the daytime is cloudy versus daytime with curtains drawn. Higher ambient light intensity leads to stronger interference with the TOF sensor and lower confidence levels. The color of the blanket (when covered) and the color of the pajamas (when uncovered) affect the reflectivity of the user's skin. Darker blankets or pajamas reflect less near-infrared light emitted by the TOF sensor, resulting in weaker signals and lower confidence levels. Conversely, lighter blankets or pajamas reflect more light and have higher confidence levels. Being too close or too far from the TOF sensor also affects measurement accuracy; larger measurement errors result in lower confidence levels. Conversely, when the user is within the sensor's optimal operating distance, measurement accuracy is highest and confidence levels are highest.
[0042] The formula for calculating the second confidence level of the infrared sensor is as follows: in, This represents the second confidence level of the infrared sensor. For ambient temperature, For user's body surface temperature, Wind speed at the user's body surface. The quilt coverage factor is . , , This is an empirical coefficient.
[0043] Since the ambient temperature of the user's room, whether the user is covered by a blanket, and the wind speed on the user's body surface all affect the measurement accuracy of the infrared sensor, this paper introduces three influencing factors: the reciprocal of the difference between the ambient temperature and the user's body surface temperature, the blanket coverage coefficient, and the wind speed on the user's body surface. This approach quantifies and evaluates the measurement reliability of the infrared sensor, avoiding the impact of factors such as the room temperature being close to the body surface temperature, the blanket covering a large area, and air conditioning interference on the accuracy of infrared temperature measurement. This improves the reliability of thermal feature extraction in complex sleep environments.
[0044] Specifically, the greater the difference between the ambient temperature and the user's body surface temperature, the stronger the thermal contrast between the human body and the background, resulting in a clear and discernible human outline in the infrared image. This leads to higher temperature measurement accuracy and confidence level for the infrared sensor. Conversely, when the difference is small, the thermal contrast decreases, the human outline becomes blurred in the infrared image, and the temperature measurement accuracy and confidence level of the infrared sensor decline. Whether the user is covered by a blanket affects the blanket coverage coefficient. When the blanket covers a large area of the user's body, the infrared sensor can only detect the temperature of locally exposed areas such as the face and hands. This results in incomplete and unrepresentative temperature field data, reducing the reliability of the infrared sensor's measurements. The larger the coverage area, the lower the confidence level. Wind speed on the user's body surface reflects the degree of airflow from the air conditioner. Higher wind speeds result in stronger convection heat loss from the skin surface, leading to a greater deviation between the body surface temperature detected by the infrared sensor and the user's actual core body temperature. This results in lower temperature measurement accuracy, and therefore, higher wind speeds lead to lower confidence levels.
[0045] S5: Weight the pose features based on the first confidence level and weight the thermal features based on the second confidence level to construct a weighted feature vector; specifically including: Multiply the intensity of limb activity in the posture features by the first confidence level to obtain the weighted limb activity intensity; Multiply the curl-up angle in the pose feature by the first confidence level to obtain the weighted curl-up angle; After converting the sleeping posture type in the posture features into a continuous vector, multiply it by the first confidence level to obtain a weighted sleeping posture type vector. Multiply the user's body surface temperature in the thermal features by the second confidence level to obtain the weighted user body surface temperature; Multiply the core-terminal temperature difference in the thermal characteristics by the second confidence level to obtain the weighted core-terminal temperature difference; Multiply the area of the sweating region in the thermal feature by the second confidence level to obtain the weighted area of the sweating region; The weighted feature vector is constructed by concatenating the weighted limb activity intensity, weighted curling angle, weighted sleeping posture type vector, weighted user body surface temperature, weighted core-to-extremity temperature difference, and weighted sweating area.
[0046] By weighting posture features with a first confidence level and thermal features with a second confidence level, this technique adjusts the weights based on the actual quality of the sensor data, ensuring that highly reliable features contribute more to the judgment result. Furthermore, the weighted features from the six dimensions are concatenated to form a unified weighted feature vector, achieving effective fusion of multi-dimensional features and providing accurate data for the Long Short-Term Memory (LSTM) network model to identify cold, comfortable, or hot states.
[0047] S6: Construct a temporal feature sequence from multiple weighted feature vectors within a continuous time window, input it into the long short-term memory network model, and the long short-term memory network model outputs the cold state, comfortable state, or hot state. The Long Short-Term Memory (LSTM) network model comprises: a first-layer LSTM unit with 32-128 neurons and tanh activation; a second-layer LSTM unit with 16-64 neurons and tanh activation; a random dropout layer with a dropout rate of 0.1-0.5; and a fully connected layer with 3 neurons and Softmax activation. This LSTM network structure performs temporal modeling on weighted feature vector sequences within a continuous time window. The first-layer LSTM unit extracts deep temporal dependencies from the input sequence, while the second-layer LSTM unit further abstracts and reduces dimensionality at the high-level semantic level. Both layers use the tanh activation function to ensure the non-linear expressive power of the gradient. The random dropout layer randomly drops some neurons during training, effectively preventing overfitting and enhancing generalization ability. Finally, the fully connected layer maps the high-level features output by the LSTM model to three neurons, and the Softmax activation function outputs the probability distribution of three states: cold, comfortable, or hot. This allows the air conditioner to execute the corresponding operating parameters based on the state with the highest probability.
[0048] S7: Control the operating parameters of the air conditioner in sleep mode based on the output state of the long short-term memory network model.
[0049] See Figure 2As shown, this embodiment of the invention also provides an air conditioning control device 100 for implementing any of the above-described air conditioning control methods, including: an acquisition module 110, which acquires a user's whole-body depth image through a TOF sensor and extracts the three-dimensional coordinates of key points of the whole-body skeleton from the depth image; a posture feature extraction module 120, which extracts posture features based on the three-dimensional coordinates of key points of the whole-body skeleton; a thermal feature extraction module 130, which acquires the user's whole-body temperature field data through an infrared sensor and extracts thermal features from the temperature field data; a confidence calculation module 140, which calculates the first confidence of the TOF sensor and the second confidence of the infrared sensor respectively; a weighted feature vector construction module 150, which weights the posture features based on the first confidence and the thermal features based on the second confidence to construct a weighted feature vector; a long short-term memory network inference module 160, which constructs a temporal feature sequence from multiple weighted feature vectors within a continuous time window and inputs it into a long short-term memory network model, and the long short-term memory network model outputs a cooling state, a comfortable state, or a heating state; and a control module 170, which controls the operating parameters of the air conditioner in sleep mode according to the state output by the long short-term memory network model. The system controls the air conditioner to enter sleep mode by collecting the user's posture and thermal features using a TOF sensor and an infrared sensor, respectively, achieving multi-dimensional perception and overcoming the limitations of single-sensor information. By calculating the dynamic confidence levels of the two sensors separately and performing differentiated weighted fusion of the corresponding features, the system reduces the interference of factors such as ambient light, blanket coverage, and wind speed on the detection results, ensuring a greater contribution of highly reliable features. The multi-dimensional weighted features are concatenated into a unified vector and input into a long short-term memory network for temporal modeling, ultimately outputting the probability distribution of three states: cold, comfortable, or hot, achieving accurate identification of the user's thermal comfort state. Furthermore, the system enables precise adaptive adjustment of the air conditioner's operating parameters in sleep mode without requiring the user to wear any devices.
[0050] This invention also provides an air conditioner, characterized in that it includes: an indoor unit body; a TOF sensor installed on the front of the indoor unit body for acquiring a user's full-body depth image; an infrared sensor installed on the front of the indoor unit body for acquiring the user's full-body temperature field data; a memory storing a computer program; and a processor connected to the TOF sensor, the infrared sensor, and the memory, wherein the processor executes the computer program to implement the air conditioning control method described above. By integrating the TOF sensor and the infrared sensor on the front of the indoor unit body, non-contact synchronous acquisition of depth images and temperature field data of the user in bed can be achieved at the air conditioner's installation location, enabling adaptive adjustment of air conditioning operating parameters in sleep mode without requiring the user to wear any additional equipment.
[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An air conditioning control method, characterized in that, include: In response to the air conditioner entering sleep mode, a full-body depth image of the user is acquired through a TOF sensor, and the three-dimensional coordinates of key points of the whole body skeleton are extracted from the depth image. Posture features are extracted based on the three-dimensional coordinates of the key points of the entire skeletal system. The user's whole-body temperature field data is acquired using an infrared sensor, and thermal features are extracted from the temperature field data. Calculate the first confidence level of the TOF sensor and the second confidence level of the infrared sensor, respectively; The pose features are weighted based on the first confidence level, and the thermal features are weighted based on the second confidence level to construct a weighted feature vector; Multiple weighted feature vectors within a continuous time window are used to form a temporal feature sequence, which is then input into a long short-term memory network model. The long short-term memory network model outputs a cold state, a comfortable state, or a hot state. Based on the state output by the Long Short-Term Memory Network model, the operating parameters of the air conditioner in sleep mode are controlled.
2. The air conditioning control method according to claim 1, characterized in that, The extraction of the three-dimensional coordinates of key points of the whole-body skeleton from the depth image specifically includes: The depth image is subjected to background subtraction processing to extract the foreground region of the human body; The foreground region of the human body is skeletonized to obtain a skeleton line with a width of one pixel. Using the forest tree traversal method, the skeleton line is traversed with the center of the human body region as the parent node, and the endpoints and bifurcation points of the skeleton branches are detected, which are respectively used as the end positions of the human body and the joint positions of the human body. The image coordinates of the detected human end position and the human joint position are combined with the corresponding depth values and converted into three-dimensional spatial coordinates through the camera intrinsic parameter matrix to obtain the three-dimensional coordinates of key points of the whole skeleton. The key points of the whole body skeleton include at least the following 17 points: head, neck, left shoulder, right shoulder, left elbow, right elbow, left wrist, right wrist, left hip, right hip, left knee, right knee, left ankle, right ankle, center of chest, center of hip, and center of mass.
3. The air conditioning control method according to claim 1, characterized in that, The extraction of pose features based on the three-dimensional coordinates of the key points of the whole body skeleton specifically includes: Calculate the angle between the line connecting the center of the shoulder to the center of the hip and the horizontal plane, and use it as the trunk tilt angle; Calculate the angle formed by the lines connecting the center of the shoulder, the center of the hip, and the center of the knee, and use this angle as the curl-up angle; Calculate the square root of the sum of squares of displacements of all skeletal keypoints between two consecutive frames, and use it as the intensity of limb activity; Calculate the limb extension angles formed by the center of the shoulder, center of the hip, center of the knee, and center of the ankle, as the limb extension degree; Based on the trunk tilt angle, the curling angle, and the limb extension, the sleeping posture type is determined to be one of supine, lateral, prone, or curled-up.
4. The air conditioning control method according to claim 1, characterized in that, The process of acquiring the user's whole-body temperature field data via an infrared sensor and extracting thermal features from the temperature field data specifically includes: The user's whole-body temperature field data is collected using an infrared sensor; Calculate the average temperature of all pixels in the human body region of the whole-body temperature field data, and use it as the user's body surface temperature; The difference between the average temperature of the neck and chest regions of the human body and the average temperature of the hand and foot regions is calculated as the core-terminal temperature difference. In the whole-body temperature field data, pixels whose temperature is lower than the local average temperature and whose difference exceeds a preset threshold are marked as sweating candidate pixels. The proportion of sweating candidate pixels to the total number of pixels in the human body area is calculated as the area of the sweating region.
5. An air conditioning control method according to claim 1, characterized in that, The formula for calculating the first confidence level of the TOF sensor is as follows: in, The first confidence level of the TOF sensor. For ambient light intensity, For the user's skin surface reflectivity, The actual distance between the TOF sensor and the user. To achieve the optimal distance between the TOF sensor and the user, , , This is an empirical coefficient.
6. The air conditioning control method according to claim 1, characterized in that, The formula for calculating the second confidence level of the infrared sensor is as follows: in, This represents the second confidence level of the infrared sensor. For ambient temperature, For user's body surface temperature, Wind speed at the user's body surface. The quilt coverage factor is . , , This is an empirical coefficient.
7. An air conditioning control method according to claim 1, characterized in that, The step of weighting the pose features based on the first confidence level and the thermal features based on the second confidence level to construct a weighted feature vector specifically includes: Multiply the limb activity intensity in the posture features by the first confidence level to obtain the weighted limb activity intensity; Multiply the curl-up angle in the posture features by the first confidence level to obtain the weighted curl-up angle; After converting the sleeping posture type in the posture features into a continuous vector, multiply it by the first confidence level to obtain a weighted sleeping posture type vector. Multiply the user's body surface temperature in the thermal feature by the second confidence level to obtain the weighted user's body surface temperature; Multiply the core-terminal temperature difference in the thermal feature by the second confidence level to obtain the weighted core-terminal temperature difference; Multiply the area of the sweating region in the thermal feature by the second confidence level to obtain the weighted area of the sweating region; The weighted feature vector is formed by concatenating the weighted limb activity intensity, the weighted curling angle, the weighted sleeping posture type vector, the weighted user body surface temperature, the weighted core-to-terminal temperature difference, and the weighted sweating area.
8. An air conditioning control method according to claim 1, characterized in that, The Long Short-Term Memory (LSTM) network model is a LTM network structure, including: The first layer of the long short-term memory network unit has 32-128 neurons and the activation function is tanh. The second layer of the long short-term memory network unit has 16-64 neurons and the activation function is tanh. Random drop-out layer with a drop-out rate of 0.1~0.5; The fully connected layer has 3 neurons and uses the Softmax activation function.
9. An air conditioning control device, characterized in that, The air conditioning control device is used to implement the air conditioning control method as described in any one of claims 1 to 8, including: The acquisition module acquires a full-body depth image of the user through a TOF sensor and extracts the three-dimensional coordinates of key points of the whole body skeleton from the depth image; The posture feature extraction module is used to extract posture features based on the three-dimensional coordinates of the key points of the whole body skeleton. The thermal feature extraction module acquires the user's whole-body temperature field data through an infrared sensor and extracts thermal features from the temperature field data. The confidence calculation module is used to calculate the first confidence level of the TOF sensor and the second confidence level of the infrared sensor, respectively. The weighted feature vector construction module is used to weight the pose features based on the first confidence level and the thermal features based on the second confidence level to construct a weighted feature vector; The Long Short-Term Memory Network Inference Module is used to construct a temporal feature sequence from multiple weighted feature vectors within a continuous time window and input it into the Long Short-Term Memory Network Model. The Long Short-Term Memory Network Model outputs a cold state, a comfortable state, or a hot state. The control module is used to control the operating parameters of the air conditioner in sleep mode based on the state output by the long short-term memory network model.
10. An air conditioner, characterized in that, include: Air conditioner indoor unit body; A TOF sensor is installed on the front of the indoor unit of the air conditioner to collect full-body depth images of the user; An infrared sensor is installed on the front of the indoor unit of the air conditioner to collect the user's whole-body temperature field data; Memory, which stores computer programs; A processor, connected to the TOF sensor, the infrared sensor, and the memory, executes the computer program to implement the air conditioning control method as described in any one of claims 1 to 8.
