Air conditioner control method and device, electronic equipment and storage medium
By using dynamic background modeling and compensation mechanisms to identify and compensate for human body areas, and combining fuzzy logic reasoning to identify posture, the problems of infrared temperature measurement distortion and false absorption by stationary human bodies caused by forced convection airflow in air conditioners are solved. This achieves efficient posture perception and air supply control, and improves the intelligence and energy-saving performance of air conditioners.
Patent Information
- Application Number
- CN202611119137.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-11-17
AI Technical Summary
The forced convection airflow generated by air conditioning operation causes infrared temperature measurement distortion, and stationary human bodies are easily mistakenly absorbed as background, resulting in the loss of human targets and affecting the accuracy and reliability of human perception.
By determining the temperature difference between the dynamic background model and the current frame thermal image, the human body region and background region are identified, and attenuation compensation is performed to generate a stable human body region mask. Combined with multi-dimensional thermal features and lightweight fuzzy logic reasoning, the human body posture is identified, and differentiated air supply operations are performed.
It effectively resists the interference of airflow on infrared temperature measurement, prevents stationary human bodies from being mistakenly absorbed, improves the stability and accuracy of human body area detection, realizes intelligent linkage between posture perception and airflow control, and significantly improves energy-saving effect.
Smart Images

Figure CN123110718A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and energy-efficient electrical appliances, and in particular to an air conditioner control method, an air conditioner control device, an electronic device, and a computer-readable storage medium. Background Technology
[0002] With the continuous development of smart homes, energy-efficient household air conditioners are gradually transforming from simple temperature control devices into environmental sensing and intelligent interactive terminals. Users' demands for air conditioners are no longer limited to the basic temperature control functions; they are paying more attention to comfort and intelligent interactive experiences, such as automatically adjusting fan speed and direction based on the activity of people indoors, proactively reducing fan speed during sleep, and providing strong airflow when people are active. The prerequisite for achieving such refined control is that the air conditioning system can accurately sense the presence, location, and posture of people indoors.
[0003] However, in the practical application of human posture perception, there are still corresponding technical problems: on the one hand, the forced convection airflow generated by the operation of air conditioning will interfere with the accuracy of perception and cause changes in human thermal characteristics. If human detection and posture discrimination are performed directly based on distorted temperature data, the reliability of the perception results will be seriously affected. On the other hand, with the adoption of conventional background update strategies, the temperature characteristics of stationary human bodies are easily mis-absorbed by the gradually updated background model, causing the human target to be judged as background and lost, making it impossible to achieve human body locking at all times. Summary of the Invention
[0004] The present invention provides an air conditioner control method, device, electronic device, and computer-readable storage medium to solve or partially solve the problems that the forced convection airflow generated during air conditioner operation can easily lead to infrared temperature measurement distortion and the easy misabsorption of stationary human bodies as background, resulting in target loss.
[0005] This invention discloses a method for controlling an air conditioner, comprising: Determine the dynamic background model corresponding to the acquired raw thermal images; Based on the temperature difference between the temperature value of each pixel in the current frame thermal image and the estimated background temperature of the corresponding pixel in the dynamic background model, the human body region and the background region are identified from the original thermal image. Attenuation compensation is applied to the human body region in the original thermal image to obtain the target thermal map; The target heatmap is divided into multiple local regions, and a binarization threshold for each local region is determined. The pixels in the local regions are marked as foreground and background according to the binarization threshold to generate a corresponding human body region mask. The current human posture corresponding to the human body region mask is identified, and an air conditioning operation matching the current human posture is executed.
[0006] In some feasible implementations, determining the dynamic background model corresponding to the acquired raw thermal image includes: The system continuously acquires a preset number of raw thermal images using an infrared sensor. Obtain the pixel temperature value corresponding to each pixel in the original thermal image, as well as the sensor parameters of the infrared sensor; Using the preset frame number, the pixel temperature value, and the sensor parameters, the initial background temperature estimate corresponding to each pixel in the original thermal image is calculated, and the initial dynamic background model is formed by the initial background temperature estimate corresponding to each pixel.
[0007] In some feasible implementations, after determining the dynamic background model corresponding to the acquired raw thermal image, the method further includes: Obtain the current temperature value of the target pixel in the current frame thermal image, and the estimated background temperature value corresponding to the target pixel in the dynamic background model; Calculate the temperature difference between the current temperature value and the estimated background temperature value; Based on the temperature difference, determine whether to update the estimated background temperature value corresponding to the target pixel in the dynamic background model.
[0008] In some feasible implementations, determining whether to update the background temperature estimate corresponding to the target pixel in the dynamic background model based on the temperature difference includes: When the temperature difference is greater than the first temperature difference threshold, the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen. When the temperature difference is less than or equal to the first temperature difference threshold, the current temperature value and the background temperature estimate are used to calculate the updated background temperature estimate, and the updated background temperature estimate is used to replace the background temperature estimate corresponding to the target pixel in the dynamic background model.
[0009] In some feasible implementations, freezing the update of the background temperature estimate corresponding to the target pixel in the dynamic background model when the temperature difference is greater than a first temperature difference threshold includes: When the temperature difference is greater than the first temperature threshold and less than the second temperature threshold, it is determined that there is a suspected micro-moving target, and the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen. When the temperature difference is greater than the second temperature threshold, it is determined that there is a significant human target or a sudden heat source interference, and the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen.
[0010] In some feasible implementations, the step of calculating the updated background temperature estimate using the current temperature value and the background temperature estimate includes: The updated background temperature estimate is calculated using a weighted moving average method based on a preset update rate, the current temperature value, and the estimated background temperature value.
[0011] In some feasible implementations, identifying the human body region and the background region from the original thermal image based on the temperature difference between the temperature values of each pixel in the current frame thermal image and the estimated background temperature of the corresponding pixel in the dynamic background model includes: Obtain the current temperature value of each pixel in the current frame thermal image, and the estimated background temperature value of the corresponding pixel in the dynamic background model; The temperature difference corresponding to each pixel is calculated using the current temperature value of each pixel and the estimated background temperature value. Pixels whose temperature difference is greater than the first temperature difference threshold are identified as pixels in the human body region, and the human body region is formed by the pixels in the human body region. Pixels whose temperature difference is less than or equal to the first temperature difference threshold are identified as pixels in the background region, and the background region is formed by the pixels in the background region.
[0012] In some feasible implementations, the attenuation compensation of the human body region in the original thermal image to obtain the target thermal map includes: Obtain the real-time operating status parameters of the air conditioner, including the real-time fan speed setting and the set temperature difference; Determine the convection correction coefficient corresponding to the real-time wind speed setting and the set temperature difference; The convection correction coefficient is used to compensate for the distance attenuation of the temperature value of each pixel in the human body region to obtain the target thermal map.
[0013] In some feasible implementations, the step of using the convection correction coefficient to perform distance attenuation compensation on the temperature values of each pixel in the human body region to obtain a target heatmap includes: Obtain the target distance corresponding to each pixel in the human body region; Using a preset attenuation constant, the target distance, and the convection correction coefficient, the temperature value of the pixel is attenuated to obtain the compensated target temperature value. Based on the compensated target temperature value, the temperature value of each pixel in the human body region is updated to obtain the corresponding target heat map.
[0014] In some feasible implementations, determining the binarization threshold for each of the local regions includes: Obtain the mean temperature and standard deviation of the temperature of each pixel in the local region of the target heat map; The binarization threshold corresponding to each local region is calculated using the mean temperature and the standard deviation of temperature.
[0015] In some feasible implementations, the step of marking the pixels of the local region as foreground and background based on the binarization threshold to generate a corresponding human body region mask includes: For each pixel in each of the local regions, pixels with a temperature value greater than the binarization threshold corresponding to the local region are marked as foreground, and pixels with a temperature value less than or equal to the binarization threshold are marked as background. Get the number of times each pixel is marked as foreground in multiple consecutive frames; Using the aforementioned number of times and a preset number of frames, the confidence level of each pixel belonging to the foreground is calculated; Pixels with a confidence level greater than a preset confidence threshold are used as pixels that constitute the human body region, and a corresponding human body region mask is generated from the pixels of the human body region.
[0016] In some feasible implementations, identifying the current human pose corresponding to the human body region mask includes: Extract a multidimensional physical feature vector from the human body region mask. The multidimensional physical feature vector includes at least one of the following: human body region area, aspect ratio of the human body circumscribed rectangle, thermal centroid height ratio, and edge thermal gradient divergence. The human body region area, the aspect ratio of the circumscribed rectangle of the human body, the thermal centroid height ratio, and the edge thermal gradient divergence are input into a preset classifier to perform human posture recognition, thereby obtaining the current human posture output by the classifier.
[0017] In some feasible implementations, the extraction of multidimensional physical feature vectors from the human body region mask includes: Determine the center and edge positions of the human body hotspot in the human body area mask; The temperature change rate is calculated along multiple directions from the intermediate position to the edge position, and the edge thermal gradient divergence is determined using the temperature change rate in each direction.
[0018] In some feasible implementations, the classifier is a fuzzy logic inferencer. The step of inputting at least one of the following into a preset classifier—the area of the human body region, the aspect ratio of the circumscribed rectangle of the human body, the height ratio of the thermal centroid, and the edge thermal gradient divergence—to perform human pose recognition and obtain the current human pose output by the classifier includes: At least one of the following is used as the input variable of the fuzzy logic inferencer: the area of the human body region, the aspect ratio of the circumscribed rectangle of the human body, the height ratio of the thermal centroid, and the edge thermal gradient divergence. The fuzzy logic inferencer executes the following fuzzy logic rules to calculate the membership degree of each attitude category: When the aspect ratio of the circumscribed rectangle of the human body is greater than the first aspect ratio threshold, the thermal centroid height ratio is greater than the first height ratio threshold, and the edge thermal gradient divergence is greater than the first divergence threshold, it is determined to be a standing posture. When the aspect ratio of the circumscribed rectangle of the human body is less than the second aspect ratio threshold and the thermal center of gravity height ratio is less than the second height ratio threshold, it is determined to be a lying posture. When the area of the human body region is smaller than a preset area threshold, it is determined to be an abandoned state; If the above criteria are not met, it is determined to be a sitting posture. Based on the membership degree corresponding to each of the posture categories, the posture category with the highest membership degree is taken as the current human posture output by the fuzzy logic inferencer.
[0019] In some feasible implementations, the step of calculating the membership degree of each pose category by executing the following fuzzy logic rules through the fuzzy logic inferencer further includes: Obtain historical pose information from the previous frame; When the historical posture information of the previous frame is a lying posture and the center displacement of the human body region in the current frame is less than the displacement threshold, the fuzzy logic inferencer suppresses the membership degree of the standing posture when executing the fuzzy logic rule.
[0020] In some feasible implementations, after determining the recognition result of the current human pose based on the membership degree of each pose category, the method further includes: When the decrease in the area of the human body region within a consecutive preset number of frames is greater than a preset proportional threshold, it is determined to be an off-duty state.
[0021] This invention also discloses an air conditioner control device, comprising: The dynamic background model determination module is used to determine the dynamic background model corresponding to the acquired original thermal image. The human body background region recognition module is used to identify the human body region and the background region from the original thermal image based on the temperature difference between the temperature value of each pixel in the current frame thermal image and the background temperature estimate of the corresponding pixel in the dynamic background model. The attenuation compensation module is used to perform attenuation compensation on the human body region in the original thermal image to obtain the target thermal map. The mask generation module is used to divide the target heatmap into multiple local regions, determine the binarization threshold of each local region, and mark the pixels of the local regions as foreground and background according to the binarization threshold to generate the corresponding human body region mask. The posture recognition and air supply control module is used to identify the current human posture corresponding to the human body area mask and execute air conditioning air supply operation that matches the current human posture.
[0022] In some feasible implementations, the dynamic background model determination module is specifically used for: The system continuously acquires a preset number of raw thermal images using an infrared sensor. Obtain the pixel temperature value corresponding to each pixel in the original thermal image, as well as the sensor parameters of the infrared sensor; Using the preset frame number, the pixel temperature value, and the sensor parameters, the initial background temperature estimate corresponding to each pixel in the original thermal image is calculated, and the initial dynamic background model is formed by the initial background temperature estimate corresponding to each pixel.
[0023] In some feasible implementations, the apparatus further includes: The background update judgment module is used to obtain the current temperature value of the target pixel in the current frame thermal image and the background temperature estimate value corresponding to the target pixel in the dynamic background model after the dynamic background model determination module determines the dynamic background model corresponding to the acquired original thermal image; calculate the temperature difference between the current temperature value and the background temperature estimate value; and determine whether to update the background temperature estimate value corresponding to the target pixel in the dynamic background model based on the temperature difference value.
[0024] In some feasible implementations, the background update judgment module is specifically used for: When the temperature difference is greater than the first temperature difference threshold, the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen. When the temperature difference is less than or equal to the first temperature difference threshold, the current temperature value and the background temperature estimate are used to calculate the updated background temperature estimate, and the updated background temperature estimate is used to replace the background temperature estimate corresponding to the target pixel in the dynamic background model.
[0025] In some feasible implementations, the background update determination module is further used for: When the temperature difference is greater than the first temperature threshold and less than the second temperature threshold, it is determined that there is a suspected micro-moving target, and the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen. When the temperature difference is greater than the second temperature threshold, it is determined that there is a significant human target or a sudden heat source interference, and the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen.
[0026] In some feasible implementations, the background update judgment module is specifically used for: The updated background temperature estimate is calculated using a weighted moving average method based on a preset update rate, the current temperature value, and the estimated background temperature value.
[0027] In some feasible implementations, the human background region recognition module is specifically used for: Obtain the current temperature value of each pixel in the current frame thermal image, and the estimated background temperature value of the corresponding pixel in the dynamic background model; The temperature difference corresponding to each pixel is calculated using the current temperature value of each pixel and the estimated background temperature value. Pixels whose temperature difference is greater than the first temperature difference threshold are identified as pixels in the human body region, and the human body region is formed by the pixels in the human body region. Pixels whose temperature difference is less than or equal to the first temperature difference threshold are identified as pixels in the background region, and the background region is formed by the pixels in the background region.
[0028] In some feasible implementations, the attenuation compensation module is specifically used for: Obtain the real-time operating status parameters of the air conditioner, including the real-time fan speed setting and the set temperature difference; Determine the convection correction coefficient corresponding to the real-time wind speed setting and the set temperature difference; The convection correction coefficient is used to compensate for the distance attenuation of the temperature value of each pixel in the human body region to obtain the target thermal map.
[0029] In some feasible implementations, the attenuation compensation module is specifically used for: Obtain the target distance corresponding to each pixel in the human body region; Using a preset attenuation constant, the target distance, and the convection correction coefficient, the temperature value of the pixel is attenuated to obtain the compensated target temperature value. Based on the compensated target temperature value, the temperature value of each pixel in the human body region is updated to obtain the corresponding target heat map.
[0030] In some feasible implementations, the mask generation module includes: The threshold determination unit is used to obtain the mean temperature and standard deviation of the temperature of each pixel point in the local area of the target heat map; and to calculate the binarization threshold corresponding to each local area using the mean temperature and the standard deviation of the temperature.
[0031] In some feasible implementations, the mask generation module is further used for: For each pixel in each of the local regions, pixels with a temperature value greater than the binarization threshold corresponding to the local region are marked as foreground, and pixels with a temperature value less than or equal to the binarization threshold are marked as background. Get the number of times each pixel is marked as foreground in multiple consecutive frames; Using the aforementioned number of times and a preset number of frames, the confidence level of each pixel belonging to the foreground is calculated; Pixels with a confidence level greater than a preset confidence threshold are used as pixels that constitute the human body region, and a corresponding human body region mask is generated from the pixels of the human body region.
[0032] In some feasible implementations, the attitude recognition and air supply control module includes: The feature extraction unit is used to extract a multi-dimensional physical feature vector from the human body region mask. The multi-dimensional physical feature vector includes at least one of the human body region area, aspect ratio of the human body's circumscribed rectangle, thermal centroid height ratio, and edge thermal gradient divergence. The posture recognition unit is used to input at least one of the human body area, the aspect ratio of the human body's circumscribed rectangle, the thermal centroid height ratio, and the edge thermal gradient divergence into a preset classifier to perform human posture recognition and obtain the current human posture output by the classifier.
[0033] In some feasible implementations, the feature extraction unit is specifically used for: Determine the center and edge positions of the human body hotspot in the human body area mask; The temperature change rate is calculated along multiple directions from the intermediate position to the edge position, and the edge thermal gradient divergence is determined using the temperature change rate in each direction.
[0034] In some feasible implementations, the classifier is a fuzzy logic inferencer, and the pose recognition unit is specifically used for: At least one of the following is used as the input variable of the fuzzy logic inferencer: the area of the human body region, the aspect ratio of the circumscribed rectangle of the human body, the height ratio of the thermal centroid, and the edge thermal gradient divergence. The fuzzy logic inferencer executes the following fuzzy logic rules to calculate the membership degree of each attitude category: When the aspect ratio of the circumscribed rectangle of the human body is greater than the first aspect ratio threshold, the thermal centroid height ratio is greater than the first height ratio threshold, and the edge thermal gradient divergence is greater than the first divergence threshold, it is determined to be a standing posture. When the aspect ratio of the circumscribed rectangle of the human body is less than the second aspect ratio threshold and the thermal center of gravity height ratio is less than the second height ratio threshold, it is determined to be a lying posture. When the area of the human body region is smaller than a preset area threshold, it is determined to be an abandoned state; If the above criteria are not met, it is determined to be a sitting posture. Based on the membership degree corresponding to each of the posture categories, the posture category with the highest membership degree is taken as the current human posture output by the fuzzy logic inferencer.
[0035] In some feasible implementations, the pose recognition unit is further used for: Obtain historical pose information from the previous frame; When the historical posture information of the previous frame is a lying posture and the center of gravity displacement of the human body region in the current frame is less than the displacement threshold, the membership degree of the standing posture is suppressed when the fuzzy logic inferencer executes the fuzzy logic rule.
[0036] In some feasible implementations, the attitude recognition and air supply control module further includes: The off-duty determination unit is used to determine the off-duty state when the reduction of the human body area within a preset number of consecutive preset frames is greater than a preset ratio threshold after determining the recognition result of the current human body posture based on the membership degree of each posture category.
[0037] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.
[0038] This invention also discloses a computer-readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.
[0039] The embodiments of the present invention have the following advantages: In this embodiment of the invention, the air conditioner identifies the human body region and background region by determining a dynamic background model corresponding to the original thermal image and utilizing the temperature difference of the same pixel point between the original thermal image and the dynamic background model. This allows for effective extraction of the human body's thermal radiation region through the dynamic background model, adapting to the slow drift of indoor ambient temperature and effectively preventing target loss due to the mistaken absorption of stationary human bodies as background by freezing the background update of the human body region. Next, by performing attenuation compensation on the identified human body region coupled with the real-time operating parameters of the air conditioner, interference from the airflow during air conditioner operation on infrared thermometry is effectively resisted, restoring the authenticity of human body temperature characteristics at long distances and along the airflow path. Based on this, a stable human body region mask is generated by performing partitioned adaptive threshold segmentation and multi-frame statistics on the compensated target thermal map, thereby enabling the extraction of the target body region through partitioned adaptive threshold solution. This approach solves the problem of poor adaptability of globally fixed thresholds in complex thermal fields. Furthermore, by combining multi-frame statistics, it effectively suppresses pixel-level flickering at hot spot edges under low resolution, improving the stability and accuracy of human body region detection. Then, based on the human body region mask, multi-dimensional thermal features are extracted and the current human posture is identified using a lightweight artificial intelligence inference algorithm (fuzzy logic inferencer). Based on accurate human body region information and posture recognition results, differentiated air supply operations are executed. This not only achieves intelligent linkage between posture perception and air supply control, but also significantly improves the energy-saving effect of energy-efficient air conditioning equipment in different usage scenarios by differentiating between standing, sitting, and lying postures and executing corresponding air supply strategies. Simultaneously, the entire perception and inference process requires only minimal MCU computing resources to achieve millisecond-level response, solving the industry pain point that traditional high-power neural networks cannot be deployed on low-computing-power devices. It has good practicality and industrial promotion value. Attached Figure Description
[0040] Figure 1 This is a flowchart of the steps of an air conditioner control method provided in an embodiment of the present invention; Figure 2 This is a structural block diagram of an air conditioner control device provided in an embodiment of the present invention. Detailed Implementation
[0041] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0042] As examples, with the deepening development of smart homes, household air conditioners are gradually transforming from simple temperature control devices into environmental sensing and intelligent interactive terminals. Users' demands for air conditioners are no longer limited to temperature control functions; they are paying more attention to physical comfort and intelligent interactive experiences, such as automatically adjusting fan speed and direction based on the activity of people indoors, proactively reducing fan speed during sleep, and providing strong airflow when someone is active. Infrared array sensors, with their advantages of non-contact temperature measurement, unaffected by lighting conditions, and no privacy risks, are increasingly widely used in the field of human body sensing in air conditioners. However, the practical application of using low-resolution infrared array sensors (such as 32×24 pixels) to realize human posture perception in air conditioning still faces technical bottlenecks: On the one hand, the forced convection airflow generated by the operation of air conditioning will accelerate the heat loss of the human body surface, causing the human body surface temperature measured by the infrared sensor to show a nonlinear decay with the increase of distance. Especially at a distance or in the airflow path, the temperature distortion of the human body area is more significant. Directly based on the distorted temperature data for human body detection and posture discrimination will seriously affect the reliability of the perception results. On the other hand, the indoor ambient temperature will change dynamically with the air conditioning control. The background model needs to be constantly updated to adapt to the environmental drift. However, when the human body remains still for a long time (such as in deep sleep), its thermal radiation signal is relatively stable. If a conventional background update strategy is adopted, the temperature characteristics of the still human body are easily mis-absorbed by the gradually updated background model, causing the human target to be judged as background and lost, making it impossible to achieve human body locking at all times.
[0043] In this embodiment, based on a joint mechanism of dynamic background modeling and physical field coupling compensation, when the air conditioner acquires the original thermal image collected by the infrared array sensor, it can first determine the dynamic background model corresponding to the original thermal image, and use the temperature difference between the dynamic background model and the current frame thermal image to separate the human body region and the background region from the original thermal image, thereby locking the complete human body region, including stationary human bodies, using background subtraction. Next, the air conditioner couples its real-time operating status parameters to perform targeted attenuation compensation on the identified human body region to restore the authenticity of the human body temperature characteristics under airflow interference. Then, the compensated target thermal map is subjected to partition adaptive threshold processing and multi-frame statistics to generate a stable human body region mask. Furthermore, multi-dimensional thermal features are extracted based on the human body region mask, and the current human body posture is identified through lightweight fuzzy logic reasoning. Differentiated air supply operations matching the posture are then executed, thereby realizing the air conditioner's continuous locking of the human body target and posture-adaptive intelligent air supply control.
[0044] Reference Figure 1The diagram illustrates a flowchart of an air conditioner control method provided in an embodiment of the present invention, which may specifically include the following steps: Step 101: Determine the dynamic background model corresponding to the acquired original thermal image; In this embodiment of the invention, the method can be applied to energy-saving air conditioning equipment. The air conditioning system may include an indoor unit, an infrared array sensor, and a controller. The infrared array sensor can be a thermopile infrared array sensor, for example, it can be installed above the center of the air outlet of the indoor unit, tilted downwards at 15° to 25°, to effectively cover a core activity area of approximately 3 meters × 4 meters indoors. This invention does not limit this. Furthermore, the infrared array sensor can continuously acquire thermal images of the indoor scene at a predetermined sampling frequency (e.g., 10Hz, i.e., 10 frames per second).
[0045] Accordingly, the controller can be an MCU (microcontroller unit) built into the indoor unit of the air conditioner, which can receive raw thermal image data output by the infrared array sensor and execute the processing steps in the method provided in the embodiments of the present invention. It should be noted that the controller is not limited to the MCU built into the air conditioner, but can also be a processing unit with computing capabilities such as the host computer of the air conditioning system, local gateway, home server or cloud server, and the present invention does not limit it.
[0046] The raw thermal image can be a temperature value matrix directly output by an infrared array sensor. In some examples, the infrared array sensor can be an MLX90640 infrared array sensor, etc., with a spatial resolution of 32×24 pixels. That is, each frame of the raw thermal image contains temperature data of 32 columns × 24 rows = 768 pixels, and the temperature value of each pixel corresponds to the surface temperature of a specific area in the indoor space. The raw thermal image can be represented as a temperature matrix T(i, j), where i = 1, 2, ..., 32 are column indices, j = 1, 2, ..., 24 are row indices, and T(i, j) is the temperature value of the (i, j)th pixel, in °C.
[0047] Furthermore, the dynamic background model can be a digital description of the temperature distribution in a static indoor environment (such as walls, floors, furniture, and other non-human objects). It can characterize the "normal" temperature value of each spatial location in the indoor environment when there are no human targets. The dynamic background model has the same resolution as the original thermal image, that is, it can also be represented as a 32×24 background temperature matrix B, where B(i,j) can be the estimated background temperature value corresponding to pixel (i,j).
[0048] It should be noted that the dynamic background model can be continuously updated during the operation of the air conditioner. That is, the indoor ambient temperature will change constantly as the air conditioner cools or heats. Correspondingly, the initial background temperature distribution will gradually become "outdated". Therefore, the dynamic background model can adaptively adjust to the drift of the ambient temperature. At the same time, it also needs to be able to "remember" the human body area that has been stationary for a long time without absorbing it into the background.
[0049] In some feasible implementations, during the cold start phase of the air conditioner, before the background model is established, the controller can continuously acquire a preset number of original thermal images using an infrared sensor. Then, it can obtain the pixel temperature value corresponding to each pixel in the original thermal image, as well as the sensor parameters of the infrared sensor. Then, using the preset number of frames, pixel temperature values, and sensor parameters, it can calculate the initial background temperature estimate corresponding to each pixel in the original thermal image. The initial dynamic background model is formed by the initial background temperature estimate corresponding to each pixel.
[0050] In the specific implementation, during the air conditioner's cold start phase, the infrared sensor continuously acquires N frames of raw thermal images. For each pixel location (i,j), the controller obtains the temperature value sequence Tk(i,j) of that pixel in the N frames of raw thermal images, where k=1,2,…,N is the frame number. Then, the controller can calculate the initial global average ambient temperature using the following formula. That is, the initial background temperature estimate:
[0051] Where W can be the width (number of columns) of the original thermal image, and H can be the height (number of rows) of the original thermal image. For example, W can be 32 and H can be 24. This resolution can be determined by the physical characteristics of the infrared sensor itself. For example, if a sensor with a different resolution (e.g., 64×48) is used, the values of W and H will be adjusted accordingly. k can be the frame number (corresponding to the acquisition time sequence of the original thermal image). This can be the row and column numbers of the sensor matrix. By calculating the average of the temperature values across multiple frames corresponding to all pixels, random noise that occasionally appears in a single image can be effectively eliminated, making the initial background data cleaner and more stable, and providing a high signal-to-noise ratio benchmark for subsequent dynamic updates.
[0052] In some examples, if the temperature values of a pixel in 30 frames are 26.1℃, 26.2℃, 26.0℃, 26.3℃, 26.1℃, ..., then its initial background temperature estimate is the arithmetic mean of these 30 temperature values, for example, 26.15℃. This initial background temperature estimate represents the "normal" temperature of the indoor location corresponding to that pixel when there are no human targets. After the controller calculates the initial background temperature estimate for each of the 768 pixels, these estimates are combined to form a 32×24 initial background temperature matrix. This is the initial dynamic background model. The initialization process is executed automatically during the air conditioner's cold start without manual intervention. Through this multi-frame averaging initialization, the controller establishes a clean and stable background temperature reference, providing a high signal-to-noise ratio starting point for subsequent dynamic updates.
[0053] After the air conditioner enters the real-time operation phase, the indoor ambient temperature will continue to change (for example, the wall temperature will gradually decrease during the cooling process, or the wall temperature will gradually increase during the heating process). The initial background model will gradually become "outdated". Therefore, the controller needs to continuously update the dynamic background model according to the current frame thermal image to adapt to the slow drift of the indoor ambient temperature.
[0054] In some feasible implementations, the controller can obtain the current temperature value of the target pixel in the current frame of the thermal image. And the estimated background temperature value of the previous time step corresponding to the target pixel in the dynamic background model. Next, the temperature difference Δ between the current temperature value and the estimated background temperature value is calculated. i , j )=| - The temperature difference reflects the degree of temperature deviation of the pixel relative to the background model. Then, based on the temperature difference, it is determined whether to update the background temperature estimate corresponding to the target pixel in the dynamic background model: if the deviation is small, it means that the current temperature of the pixel is close to the background temperature and belongs to the static background area, and should be updated to follow the environmental changes; if the deviation is large, it means that there may be human targets or heat sources interfering with the pixel, and it should be frozen and updated to protect the target from being absorbed by the background.
[0055] More specifically, the controller determines whether to update the background temperature estimate corresponding to the target pixel in the dynamic background model based on the temperature difference. This can be achieved as follows: if the temperature difference is greater than a first temperature difference threshold (e.g., 3℃), the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen; if the temperature difference is less than or equal to the first temperature difference threshold, the current temperature value and the background temperature estimate are used to calculate the updated background temperature estimate using a weighted moving average method, and this updated background temperature estimate replaces the background temperature estimate corresponding to the target pixel in the dynamic background model. The first temperature difference threshold is a critical value used to determine whether a pixel belongs to the "potentially human presence" category. This threshold can be pre-calibrated experimentally, for example, set to 3℃. When the temperature difference is greater than 3℃, it indicates that the pixel's temperature has significantly increased relative to the background (e.g., after a human enters the area, the pixel's temperature rises from 26℃ to 30℃, a difference of 4℃). At this point, the controller determines that the pixel belongs to the human body area and freezes the background update—that is, it does not absorb the current temperature value into the background model. When the temperature difference is less than or equal to 3℃, it indicates that the temperature change of that pixel is within the normal range and belongs to the background area. The controller updates the data using a weighted moving average method, with the update formula as follows: ·
[0056] in, This is the updated background temperature estimate at the current moment. This is the estimated background temperature value from the previous moment. The temperature value of the corresponding pixel in the current frame's temperature data is α, and the preset update rate is α. Optionally, the preset update rate can be a very low value, such as α=0.05, which means that the changes in the background model are very smooth, that is, only 5% of the new data in each frame is incorporated into the background, and 95% of the original background information is retained.
[0057] In the process described above, this extremely low update rate allows the background model to slowly follow changes in indoor ambient temperature (e.g., the process of a wall temperature gradually decreasing from 28°C to 25°C due to air conditioning), without drastic changes caused by occasional temperature fluctuations in a single frame (e.g., hot air introduced by opening a door). This smooth update mechanism ensures the background model's adaptability to ambient temperature drift while filtering out transient noise interference, thus improving the robustness of the background model.
[0058] In other feasible implementations, the controller also introduces a second temperature difference threshold to identify stationary human bodies exhibiting "breathing-level micro-movements." Specifically, when the temperature difference is greater than a first temperature difference threshold (e.g., 3°C), the controller further determines: if the temperature difference is greater than the first temperature threshold but less than the second temperature threshold (e.g., 0.3°C), it identifies a suspected micro-movement target (such as breathing fluctuations or slight turning over in deep sleep), and freezes the update of the background temperature estimate corresponding to the target pixel in the dynamic background model; if the temperature difference is greater than the second temperature threshold (e.g., 0.3°C), it identifies a significant human target or sudden heat source interference, and similarly freezes the background update. Here, the relationship between the first and second temperature difference thresholds is: the first temperature difference threshold is greater than the second temperature difference threshold. For example, the first temperature difference threshold is 3°C, and the second temperature difference threshold is 0.3°C.
[0059] In real-world scenarios, when a user is in deep sleep, their body surface temperature is relatively stable. However, the slight fluctuations in the chest and abdomen caused by breathing can lead to minute temperature fluctuations in the corresponding pixels, typically within 0.3°C. Without a second temperature difference threshold, these minute fluctuations would easily be interpreted as "unchanged" and absorbed by the background model in traditional background subtraction methods, resulting in the human body being "swallowed up." By setting a second temperature difference threshold, when the temperature difference Δ satisfies 0.3°C < Δ < 3°C, the controller can identify a "suspected micro-movement target," meaning a very small temperature change, indicating the presence of a living being that is essentially still. Therefore, the background update is also frozen. Through this dual-threshold freezing mechanism, the controller ensures that even a completely still human body in deep sleep will not be "swallowed up" by the background update, achieving full-time human body locking.
[0060] Step 102: Based on the temperature difference between the temperature value of each pixel in the current frame thermal image and the estimated background temperature of the corresponding pixel in the dynamic background model, identify the human body region and the background region from the original thermal image. After the controller determines the dynamic background model corresponding to the current indoor scene, it uses this model to separate the human body region and the background region from the current frame's thermal image. Specifically, the controller compares the temperature value of each pixel in the current frame's thermal image with the estimated background temperature of the corresponding pixel in the dynamic background model, identifying which pixels belong to the human body region and which belong to the background region based on the magnitude of the temperature difference. Since the surface temperature of the human body is usually significantly higher than the indoor ambient background temperature (e.g., the human body surface is about 36°C, and the indoor background is about 26°C, a temperature difference of about 10°C), pixels with large temperature differences are likely to belong to the human body region, while pixels with small temperature differences belong to the background region.
[0061] In some feasible implementations, the process by which the controller identifies the human body region and the background region from the original thermal image based on temperature differences can be as follows: The current temperature value of each pixel in the current frame of the thermal image is obtained, along with the estimated background temperature value of the corresponding pixel in the dynamic background model; the current temperature value of each pixel and the estimated background temperature value are used to calculate the temperature difference value corresponding to each pixel; pixels with a temperature difference value greater than a first temperature difference threshold are identified as pixels in the human body region, and the human body region is formed by the pixels in the human body region; pixels with a temperature difference value less than or equal to the first temperature difference threshold are identified as pixels in the background region, and the background region is formed by the pixels in the background region.
[0062] In the specific implementation, the controller can obtain the current temperature value of each pixel in the current frame of the thermal image. And the estimated background temperature of the corresponding pixel in the dynamic background model. Next, the temperature difference Δ( ) corresponding to each pixel can be calculated using the current temperature value of each pixel and the estimated background temperature. i , j )=| - Then, pixels with a temperature difference greater than a first temperature difference threshold (e.g., 3°C) are identified as pixels in the human body region, and the human body region is formed by the pixels in the human body region; and pixels with a temperature difference less than or equal to the first temperature difference threshold are identified as pixels in the background region, and the background region is formed by the pixels in the background region.
[0063] It should be noted that the first temperature difference threshold here can be the same threshold used in step 101 to determine whether to update the background. They use the same judgment criteria in two dimensions: on the one hand, if the temperature difference of a pixel is greater than the threshold, it indicates that the pixel has a significant thermal deviation, and the controller should identify it as a human body region (the purpose of step 102); on the other hand, for updating the dynamic background model, if the temperature difference of a pixel is greater than the threshold, it indicates that the pixel contains a human body or interference source, and the controller should freeze the background update of that pixel (the purpose of step 101). Through this threshold reuse mechanism, the controller, based on consistent temperature difference judgment logic, simultaneously completes the identification of human body regions and the decision to update the background model, simplifying the algorithm logic and reducing computational overhead.
[0064] Through this background difference processing, the controller achieves preliminary extraction of the human body's thermal radiation area from the original thermal image, regardless of whether the human body is in motion. Even a completely stationary human body can be successfully identified as long as there is a measurable temperature difference between its surface temperature and the background temperature.
[0065] Step 103: Perform attenuation compensation on the human body region in the original thermal image to obtain the target thermal map; In practical applications, the forced convection airflow generated by air conditioning accelerates heat loss from the human body surface, causing the measured human body surface temperature by infrared sensors to exhibit a non-linear decay with increasing distance. This temperature distortion is particularly pronounced in areas of the human body at long distances or directly in the path of the airflow. Directly using this distorted temperature data for subsequent binarization threshold calculations and posture recognition would severely impact the accuracy of the human body region mask and the reliability of posture determination. Therefore, the controller needs to perform attenuation compensation on the pixels within the identified human body region to restore the authenticity of the human body temperature characteristics.
[0066] In some feasible implementations, during the process of attenuation compensation of the human body area in the original thermal image, the controller can obtain the real-time operating status parameters of the air conditioner, including the real-time fan speed and the set temperature difference. Then, it determines the convection correction coefficient corresponding to the real-time fan speed and the set temperature difference, and then uses the convection correction coefficient to perform distance attenuation compensation on the temperature value of each pixel in the human body area to obtain the target thermal map.
[0067] In practical implementation, the real-time operating status parameters of the air conditioner can characterize its current operating condition. Among these, the real-time fan speed setting represents the current rotational speed of the indoor unit's fan, which can be categorized into multiple settings such as 0 (off), 1 (low), 2 (medium), 3 (high), and 4 (strong), each corresponding to different airflow speeds and intensities. The set temperature difference represents the difference between the air conditioner's current set temperature and the indoor ambient temperature. For example, if the current set temperature is 24℃ and the indoor ambient temperature is 29℃, the set temperature difference is 5℃ (cooling mode); if the set temperature is 26℃ and the indoor ambient temperature is 22℃, the set temperature difference is -4℃ (heating mode). The real-time fan speed setting and the set temperature difference together determine the intensity of forced convection under the current air conditioner operating condition: the higher the fan speed and the larger the set temperature difference, the more intense the indoor airflow, the faster the heat loss from the human body surface via convection, and the more significant the temperature attenuation in infrared thermometry.
[0068] Furthermore, after acquiring the real-time operating status parameters of the air conditioner, the controller can determine the corresponding convection correction coefficient γ based on the real-time fan speed setting and the set temperature difference through a preset mapping relationship. This preset mapping relationship can be obtained in advance through experimental calibration. For example, under different fan speed settings and different set temperature difference combinations, the difference between the actual temperature of the human body surface at the same distance and the temperature measured by the infrared sensor can be measured, thereby fitting a mapping table or functional relationship between the convection correction coefficient and each parameter. Optionally, the value of the convection correction coefficient γ can be dynamically changed according to the actual operating conditions: when the fan speed is high and the temperature difference is large, the value of γ is larger (e.g., 1.8), indicating a larger compensation range; when the fan speed is low and the temperature difference is small, the value of γ is smaller (e.g., 0.8), indicating a smaller compensation range.
[0069] Furthermore, in some feasible implementations, the controller uses a convection correction coefficient to compensate for the distance attenuation of the temperature value of each pixel in the human body region. The specific implementation method is as follows: the controller obtains the target distance corresponding to each pixel in the human body region; the controller uses a preset attenuation constant, target distance and convection correction coefficient to compensate for the attenuation of the temperature value of the pixel to obtain the compensated target temperature value; based on the compensated target temperature value, the controller updates the temperature value of each pixel in the human body region to obtain the corresponding target heat map.
[0070] In the specific implementation, for pixels identified as human body regions, the controller can perform the compensation temperature calculation for the coupling convection factor according to the following formula:
[0071] in, The compensated temperature value To compensate for the original temperature value (i.e., the measured temperature) of the previous pixel. k The physical attenuation constant (e.g., 0.5). d This is the target distance (in meters) corresponding to this pixel. β The convection correction coefficient can be dynamically mapped from the fan speed setting and the set temperature difference in real time from the air conditioning MCU.
[0072] In this formula, the target distance d The distance can be calculated by combining the spatial location of the human body area in the infrared thermal image with the sensor's installation parameters (such as sensor installation height and tilt angle). For example, in one installation configuration, the infrared sensor is installed above the center of the air conditioner vent, at a height of 2.2 meters above the ground, tilted downwards at a 20° angle. For a pixel (i,j) in the thermal image, the horizontal distance corresponding to that pixel can be calculated based on its row index j in the image (a smaller row index indicates a higher field of view).
[0073] Specifically, the following method can be used: the pitch angle corresponding to row index j is θ(j) = θ0 + (jJ / 2) × Δθ, where θ0 is the pitch angle of the sensor's central line of sight (i.e., a tilt angle of 20°), J is the total number of rows in the image (i.e., 24), and Δθ is the angular resolution corresponding to each row of pixels (determined by the sensor's field of view). Then, based on the pitch angle θ(j) and the sensor's installation height h, the target distance d = h / sin(θ(j)) is calculated.
[0074] After obtaining the target distance, k·d²·(T_measured-T_env)·β characterizes the physical law that the temperature decreases with increasing distance—the greater the distance, the greater the decrease; at the same time, this compensation amount is also positively correlated with the difference between the measured temperature and the ambient temperature (T_measured-T_env), that is, the greater the temperature difference between the human body and the environment, the more significant the heat loss caused by convection, and the greater the compensation amount required.
[0075] In addition, β is the convection correction coefficient, which can be dynamically mapped from the real-time output fan speed setting of the air conditioner MCU to the set temperature difference. It is used as a multiplicative coefficient to scale the attenuation amount to adapt to the influence of convection intensity on the attenuation degree under the current air conditioner operating mode: if the air conditioner is in a high fan speed and large temperature difference operating state, the value of β is larger and the compensation amount is increased accordingly; conversely, if the air conditioner is in a low fan speed or standby state, the value of β is smaller and the compensation amount is reduced accordingly.
[0076] Through the aforementioned distance attenuation compensation, the temperature values of human pixel points located at a distance or along the airflow path are effectively restored. For example, assuming the original measured temperature of a pixel point in the human body area 3 meters from the air conditioner is 30.5℃, the current indoor ambient temperature T_env = 26.0℃, the physical attenuation constant k = 0.03, the target distance d = 3, and the convection correction coefficient β = 1.5 (high-speed cooling condition), then the compensation amount = k × d² × (T_measured - T_env) × β = 0.03 × 9 × (30.5 - 26.0) × 1.5 = 0.03 × 9 × 4.5 × 1.5 = 1.8225℃, and the compensated temperature value T_comp = 30.5 + 1.82 = 32.32℃. This compensated temperature value is closer to the actual human body surface temperature, thus correcting the temperature distortion caused by distance and convection effects.
[0077] In the above process, after the controller sequentially performs the aforementioned attenuation compensation on all pixels in the human body region, it can obtain the updated temperature value of the human body region, while the temperature values of the background region pixels that have not undergone temperature compensation remain unchanged. Thus, the controller obtains a complete target heatmap, which contains the complete temperature field information after compensation and correction, providing an accurate data foundation for the subsequent precise generation of the human body region mask.
[0078] Step 104: Divide the target heatmap into multiple local regions, determine the binarization threshold of each local region, and mark the foreground and background of the pixels in the local regions according to the binarization threshold to generate the corresponding human body region mask. After obtaining the temperature-compensated target heatmap, to overcome the problems of blurred edges and pixel-level flickering of human body hotspots in low-resolution heatmaps, the controller needs to binarize the target heatmap, that is, to label each pixel as either foreground (belonging to the human body) or background (not belonging to the human body), thereby generating a binarized human body region mask. However, since the background temperature may vary in different areas of the target heatmap (e.g., the temperature is lower near air conditioning vents, and higher near windows due to sunlight), if a single fixed threshold is used for binarization across the entire map, false negatives will occur in areas with higher background temperatures and false positives will occur in areas with lower background temperatures. Therefore, the controller adopts a partitioned adaptive threshold strategy, dividing the target heatmap into multiple local regions and independently calculating the binarization threshold for each local region, thereby overcoming the adaptability problem of a globally fixed threshold.
[0079] In some feasible implementations, the controller can determine the binarization threshold for each local region by: obtaining the mean temperature and standard deviation of the temperature of the pixels in each local region of the target heat map; and using the mean temperature and standard deviation of the temperature, calculating the corresponding binarization threshold for each local region.
[0080] In its implementation, the controller first divides the target heatmap (32×24 pixels) into 8×6 local region blocks, each local region block being 4×4 pixels in size (16 pixels in total). For each local region block (m,n), where m=1,2,…,8 is the horizontal block index and n=1,2,…,6 is the vertical block index, the controller obtains the temperature values of all pixels within that block and calculates the average of these temperature values. and standard deviation The mean reflects the background temperature level of the area, and the standard deviation reflects the degree of temperature dispersion within the area. The controller then calculates the binarization threshold for each local region using the following formula:
[0081] in, The threshold value is the binarization threshold for a local region block (m, n). Pixels with a temperature higher than this value are marked as "1" (foreground / target, etc.), and pixels with a temperature lower than this value are marked as "0" (background). Correspondingly, the subscript (m, n) indicates the position of the block in the global heatmap, where m is the horizontal block index (1~8) and n is the vertical block index (1~6). It can be the average background temperature of each block, representing the normal temperature of that area; A minimum temperature difference threshold (e.g., 0.5°C) is used to prevent small temperature fluctuations (such as noise) from being misjudged as foreground. The standard deviation of temperature within a local region block (m,n) represents the degree of temperature dispersion (fluctuation) of the 16 pixels within that block. It is used to adaptively adjust the threshold: regions with large temperature fluctuations have higher thresholds to reduce false alarms; regions with uniform temperature have lower thresholds to improve sensitivity.
[0082] Optionally, the meaning of this formula is: the binarization threshold of a local area consists of three parts—(1) the mean background temperature T_bg_block of the area (base value), (2) the standard deviation of the temperature in the area σ_block (adaptive adjustment), and (3) a fixed minimum temperature difference threshold ΔT_min (ensuring a lower limit of sensitivity). Wherein:
[0083] That is, the average background temperature of 16 pixels within the local area block. Areas with large temperature fluctuations (large standard deviation) use a higher threshold to reduce false alarms. For example, areas near air conditioner vents experience significant temperature fluctuations due to cold air flow; a low threshold could easily misinterpret these fluctuations as human bodies. Conversely, areas with uniform temperature (small standard deviation) use a lower threshold to improve sensitivity. For example, areas far from vents have more uniform temperatures; a high threshold could easily miss low-temperature human body areas. In this way, the controller calculates an adaptive threshold for each local area block, allowing the binarization process to adaptively adapt to the local thermal field characteristics in the current heatmap.
[0084] Furthermore, in some other feasible implementations, the controller can generate a corresponding human body region mask by marking pixels in local regions as foreground and background based on a binarization threshold. This can be achieved as follows: For each pixel in each local region, the controller marks pixels with a temperature value greater than the corresponding binarization threshold as foreground and pixels with a temperature value less than or equal to the binarization threshold as background; it obtains the number of times each pixel is marked as foreground in multiple consecutive frames; using this number and a preset number of frames, it calculates the confidence level of each pixel belonging to the foreground; pixels with a confidence level greater than a preset confidence threshold are used as pixels constituting the human body region, and the corresponding human body region mask is generated from these pixels.
[0085] Furthermore, to suppress pixel-level edge flicker at low resolution—specifically, in low-resolution (32×24 pixels) thermal maps, pixels in the edge region of human body hotspots may frequently jump between "above threshold" and "below threshold" due to slight temperature fluctuations between adjacent frames, causing jitter in the generated mask edges—the controller does not directly output a hard mask of 0 or 1 based on the labeling results of a single frame. Instead, it introduces a multi-frame statistical mechanism to output a probability mask map based on consecutive multiple frames. Optionally, the controller can count the number of times each pixel is labeled as foreground C in consecutive frames (e.g., a preset number of frames L=5 frames) and calculate the confidence level of each pixel belonging to the foreground according to the confidence level P=C / L. If a pixel exceeds the threshold for consecutive frames, its confidence level of containing a human body approaches 1, thereby filtering out single-frame pixel jitter interference.
[0086] For example, if a pixel is marked as foreground in 4 out of 5 consecutive frames, the confidence level of that pixel belonging to the foreground is 80%. When the confidence level P is greater than a preset confidence threshold (e.g., 0.6), the controller determines that pixel as the final human body region pixel; otherwise, it is determined as a background pixel. Through this multi-frame confidence statistics, occasional mislabeling caused by temperature fluctuations in a single frame (such as a pixel in the background region being mislabeled as foreground due to instantaneous airflow interference) is effectively filtered out, making the edges of the human body region more stable and smooth.
[0087] In a specific example, suppose a pixel is labeled as [foreground, foreground, background, foreground, foreground] over 5 consecutive frames. The foreground count C=4, and the confidence level P=4 / 5=0.8, which is greater than the preset confidence threshold of 0.6. Therefore, this pixel is identified as a human pixel. Another pixel is labeled as [foreground, background, background, background, foreground], with a count C=2 and a confidence level P=2 / 5=0.4, which is less than the confidence threshold of 0.6. Therefore, this pixel is identified as a background pixel. Through this multi-frame statistical mechanism, the controller effectively suppresses the "edge flickering" phenomenon caused by single-frame temperature fluctuations, improving the stability and accuracy of the human body region mask.
[0088] Through the above process, all pixels identified as human body regions can form a corresponding human body region mask. This human body region mask can be a binary matrix with the same resolution as the original thermal image, where "1" indicates that the pixel belongs to the human body region and "0" indicates that the pixel belongs to the background region.
[0089] Step 105: Identify the current human posture corresponding to the human body area mask, and perform an air conditioning operation that matches the current human posture.
[0090] After obtaining a stable human body area mask, the controller needs to identify the current human posture (standing, sitting, or lying down, etc.) from the mask and execute differentiated air supply control strategies based on the identification results to achieve intelligent linkage between posture perception and air conditioning air supply control.
[0091] In some feasible implementations, the controller can identify the current human pose corresponding to the human region mask in the following ways: the controller extracts a multi-dimensional physical feature vector from the human region mask. The multi-dimensional physical feature vector may include at least two of the following: human region area, aspect ratio of the human body's circumscribed rectangle, thermal centroid height ratio, and edge thermal gradient divergence. Then, the above features can be input into a preset classifier to perform human pose recognition and obtain the current human pose output by the classifier.
[0092] Among them, the human body area S area It can be used to make a preliminary judgment on the number of people and their activity range, and its calculation formula is as follows:
[0093] Correspondingly, the aspect ratio R of the circumscribed rectangle of the human body aspect =H box / W box H box W is the height (in pixels) of the smallest bounding rectangle of the human body region. box This is the width (in pixels). When standing, the human body extends vertically, and this ratio is larger (e.g., greater than 1.8); when lying down, the human body extends horizontally, and this ratio is smaller (e.g., less than 1.2); when sitting, this ratio is in the middle.
[0094] Correspondingly, the thermal center of gravity height is higher than R. gravity =G y / H total G y H represents the vertical centroid coordinates of the hotspot in the human body region (in pixels, measured from the bottom of the image). total This represents the total height of the image (in pixels). This feature reflects where the body's thermal radiation is primarily concentrated in the vertical direction of the image: when standing, the center of gravity of the body's thermal spot is higher (closer to the top of the image), and this ratio is larger (e.g., greater than 0.55); when lying down, the center of gravity of the body's thermal spot is lower (closer to the bottom of the image), and this ratio is smaller (e.g., less than 0.45).
[0095] Correspondingly, the edge thermal gradient divergence D gradientThis is used to characterize the rate of temperature decrease from the center to the edge of a human body hotspot. In some feasible implementations, the edge thermal gradient divergence can be extracted as follows: the controller determines the center and edge positions of the human body hotspot in the human body region mask; the temperature change rate in each direction is calculated along multiple directions from the center position to the edge position; and the edge thermal gradient divergence is determined using the temperature change rate in each direction.
[0096] In its implementation, the controller first calculates the geometric center of the human body region mask, which is the average coordinate of all pixels in the mask. Then, it acquires temperature value sequences along multiple directions from the center to the edge (e.g., eight directions: top, bottom, left, right, top left, top right, bottom left, and bottom right), and calculates the rate of temperature change with distance in each direction. Edge thermal gradient divergence can be defined as the statistical value of the rate of temperature change in each direction (e.g., the reciprocal of the mean or the variance). In a standing position, the human body has a large contact area with the surrounding air, and heat radiation dissipates quickly through convection, resulting in a steep temperature drop from the center to the edge of the hot spot. Therefore, the rate of temperature change in each direction is large, and the divergence value is high. In a lying position, the back of the human body is in contact with the bed or sofa surface, creating a solid-state heat conduction path. The edge of the hot spot exhibits a slow, diffused diffusion, resulting in a smaller rate of temperature change in each direction and greater differences between directions, leading to a lower divergence value. Using this feature, the controller can effectively distinguish between "lying down posture" and "standing posture". Even if the aspect ratio of the two outer rectangles may be similar at low resolution (for example, when a person is standing with their back to the sensor, its horizontal width is similar to that when lying down), the edge thermal gradient divergence can still reflect different heat conduction mechanisms, thus achieving accurate differentiation.
[0097] Furthermore, in some feasible implementations, the pre-defined classifier can be a fuzzy logic inferencer. The controller can use the area of the human body region, the aspect ratio of the circumscribed rectangle, the thermal centroid height ratio, and the edge thermal gradient divergence as input variables for the fuzzy logic inferencer. Then, the fuzzy logic inferencer executes pre-defined fuzzy logic rules to calculate the membership degree of each posture category. Finally, based on the membership degrees corresponding to each posture category, the posture category with the highest membership degree is taken as the current human posture output by the fuzzy logic inferencer.
[0098] In a practical implementation, a fuzzy logic inferencer can define multiple fuzzy sets: standing posture, sitting posture, lying posture, and off-site state, etc., and then the inferencer can execute the following fuzzy logic rules: Rule 1: When the aspect ratio of the circumscribed rectangle of the human body is greater than the first aspect ratio threshold (e.g., 1.8), the thermal centroid height ratio is greater than the first height ratio threshold (e.g., 0.55), and the edge thermal gradient divergence is greater than the first divergence threshold (e.g., 5.0), it is determined to be a standing posture.
[0099] Rule 2: When the aspect ratio of the circumscribed rectangle of the human body is less than the second aspect ratio threshold (e.g., 1.2) and the thermal center of gravity height ratio is less than the second height ratio threshold (e.g., 0.45), it is determined to be a lying posture. This rule can effectively distinguish between lateral lying and standing with one's back to the sensor. That is, even if the aspect ratio of the circumscribed rectangle of the human body is close to that of the lying posture due to the human body facing away from the sensor, its edge thermal gradient divergence is still significantly higher. The aforementioned edge thermal gradient divergence extraction mechanism can effectively avoid confusion.
[0100] Rule 3: When the area of the human body is smaller than the preset area threshold, it is determined to be an off-duty state.
[0101] Rule 4: When the conditions for judgment of Rule 1, Rule 2 and Rule 3 above are not met, it is judged as a sitting posture.
[0102] Based on the above process, the controller can determine the posture category with the highest membership degree as the recognition result of the current human posture based on the membership degree of each posture category. For example, if the feature combination of a certain frame meets the judgment condition of rule 1, then the membership degree of the standing posture is 0.85, the membership degree of the sitting posture is 0.10, and the membership degree of the lying posture is 0.05, and the controller outputs the standing posture.
[0103] Furthermore, in some feasible implementations, the fuzzy logic inferencer also introduces historical posture information from the previous frame as an inertial correction term to improve the temporal stability of posture recognition. Optionally, the controller can obtain historical posture information from the previous second (i.e., the posture category and the center of gravity position of the human body region at the previous moment); when the historical posture information from the previous moment is a lying posture and the displacement of the center of gravity of the human body region in the current frame is less than a displacement threshold (e.g., 5 pixels), the fuzzy logic inferencer suppresses the membership degree of the standing posture when executing fuzzy logic rules.
[0104] In real-world scenarios, when a user rolls over while lying down, their body orientation changes, potentially causing a brief shift in the center of gravity of the infrared hotspot. This shift could be incorrectly identified as a standing posture for a very short time. To address this, by incorporating historical posture information, the controller can determine: if the user was lying down in the previous moment and the current frame shows a small shift in the center of gravity (indicating the user is not actually standing but simply rolling over), then during fuzzy logic reasoning, it proactively reduces the membership degree of the standing posture. This avoids instantaneous misjudgments caused by occlusion due to rolling over, significantly improving the accuracy and robustness of posture recognition in sleep scenarios.
[0105] Furthermore, in some feasible implementations, the controller, after recognizing the current human posture, also executes a departure determination logic. Optionally, when the decrease in the human body area within a consecutive preset number of frames (e.g., 50 consecutive frames, corresponding to approximately 5 seconds, if the sampling frequency is 10Hz) exceeds a preset percentage threshold (e.g., 50%), it is determined to be a departure state. In real-world scenarios, when a user leaves their seat or leaves the room, the area of the human body area mask gradually decreases until it disappears. If the mask area decreases by more than 50% within 5 seconds, it indicates that the user is rapidly moving away from the sensor's monitoring area, and the controller can determine that the user has left their seat. At this time, the air conditioner can implement corresponding energy-saving strategies, such as reducing the airflow, switching to energy-saving standby mode, or turning off the air supply, thereby achieving the goal of energy saving and carbon reduction.
[0106] After the controller identifies the current human posture, it executes a differentiated air delivery strategy that matches that posture: If the current human posture is standing, the controller can control the air conditioner to perform full-area air sweeping at the first air volume. A standing posture typically corresponds to an active indoor occupant, in which case the user has a higher need for rapid and even indoor temperature control. The controller controls the air conditioner to operate at a high air volume (first air volume, for example, 70% to 100% of the maximum air volume) and controls the air deflectors to perform full-area air sweeping in both horizontal and vertical directions to promote rapid indoor air circulation and temperature equalization, meeting the user's need for rapid cooling or heating while active.
[0107] If the current human posture is seated, the controller can control the air conditioner to deliver airflow towards the human area at the second air volume. A seated posture typically corresponds to a relatively still working or resting state (such as working, reading, or watching TV). In this position, users have higher requirements for localized airflow comfort but need to avoid cold air blowing directly on their heads to prevent discomfort. The controller controls the air conditioner to operate at a medium air volume (the second air volume, for example, 40% to 70% of the maximum air volume) and controls the air deflector to deliver directional airflow towards the human area. Simultaneously, it offsets the airflow angle in both the horizontal and vertical directions by a preset angle (for example, 15° to 30°) to prevent airflow from blowing directly on the head, balancing coolness and comfort.
[0108] If the current human body is in a lying position, the controller can control the air conditioner to use a third airflow setting to prevent direct airflow. A lying position typically corresponds to a person sleeping or resting, in which case the user's needs for low noise, low fan speed, and prevention of direct airflow are prioritized. The controller controls the air conditioner to operate at a low airflow (third airflow, such as 20% to 40% of the maximum airflow), raising the air guide to its highest angle in cooling mode and lowering it to its lowest angle in heating mode. This utilizes natural air convection for gentle airflow, preventing strong air from blowing directly onto the sleeping person, thus ensuring comfort and health during nighttime sleep.
[0109] The relationship between the first air volume, the second air volume, and the third air volume is as follows: the first air volume is greater than the second air volume, and the second air volume is greater than the third air volume. That is, the standing posture corresponds to the highest air volume (to meet the needs of rapid temperature adjustment), the sitting posture corresponds to the medium air volume (to balance the air supply effect and comfort), and the lying posture corresponds to the lowest air volume (to prioritize low noise and prevent direct airflow). This invention does not impose any restrictions on this.
[0110] Through the aforementioned differentiated air supply control, the controller achieves closed-loop linkage between attitude perception results and air supply strategy, providing users with a precise and personalized intelligent air supply experience.
[0111] In a specific application scenario, let's take user A standing and moving around in the living room as an example. The air conditioner continuously collects indoor thermal images using an infrared sensor at a sampling frequency of 10Hz. The controller has already established an initial dynamic background model during the cold start phase. User A is standing in the center of the living room doing some tidying activities. In the current frame of the thermal image, the temperature value of a pixel in a certain human body area rises from the estimated background temperature of 26℃ to 30.5℃, with a temperature difference Δ=4.5℃, which is greater than the first temperature difference threshold of 3℃. The controller determines that this pixel belongs to the human body area and freezes the background update for that pixel. After identifying the complete human body area, the controller obtains the current real-time air conditioner fan speed setting as level 3 (medium-high fan) and the set temperature difference as 5℃. Through a preset mapping relationship, it determines the convection correction coefficient β=1.5. For each pixel in the human body region, the controller calculates its target distance (e.g., 3 meters), obtains the current indoor ambient temperature of 26.0℃, and compensates according to the above compensation formula (where k=0.03). The compensation amount is 0.03×9×(30.5-26.0)×1.5=1.8225℃. The compensated temperature value recovers from 30.5℃ to 32.32℃, which is closer to the actual body surface temperature. The controller divides the target heat map into 8×6 local regions. For a certain local region (m,n), the background temperature mean of 26.8℃ and standard deviation of 1.2℃ are obtained. According to the formula in the above embodiment (where ΔT_min=0.5℃), the binarization threshold θ of the region is calculated. block =26.8 + 0.5 + 1.2 = 28.5℃. Then, each pixel is marked, and a stable human body region mask is generated after multi-frame confidence statistics. The controller extracts features from the mask: the area S of the human body region. area =245 pixels, aspect ratio R of the circumscribed rectangle of the human body aspect =2.1, thermal center of gravity height ratio R gravity =0.62, edge thermal gradient divergence D gradient=6.8. The fuzzy logic inference engine determines the posture as standing based on rule 1 (standing membership degree 0.85, sitting membership degree 0.10, lying membership degree 0.05). The controller then controls the air conditioner to start full-area air sweeping at high air volume (first air volume) to quickly equalize the indoor temperature.
[0112] In another application scenario, let's take user B sleeping at night as an example. The air conditioner runs continuously, and user B lies in bed in a deep sleep with minimal movement and stable breathing. The controller detects a temperature difference Δ = 0.2℃ at a pixel in the human body area. This difference is less than the second temperature difference threshold of 0.3℃ but greater than 0℃. The controller determines this pixel to be a "suspected micro-movement target" (corresponding to minor temperature fluctuations on the body surface caused by breathing), freezes the background update of this pixel, and thus prevents the sleeping user B from being mistakenly absorbed by the background model and "swallowed up." After generating a mask for the human body area, the controller extracts features: the area S of the human body area. area =320 pixels, R aspect =0.8 (width is significantly greater than height in the lying position), R gravity =0.32 (the center of gravity of the hot spot is near the bottom of the image), D gradient =2.3 (solid-state heat conduction occurs when the back contacts the bed surface, with diffusion at the edges). The fuzzy logic inferencer determines the user to be in a lying position based on rules 2 and 4 (lying position membership 0.92, sitting position membership 0.05, standing position membership 0.03). The controller then controls the air conditioner to switch to sleep mode with anti-direct airflow, operating at a low airflow (third airflow), with the air guide plate raised to its highest angle to avoid strong airflow directly blowing on user B, while operating at extremely low noise to ensure comfort during sleep. When user B turns over in sleep, the controller detects a displacement of 3 pixels in the body's center of gravity, less than the displacement threshold of 5 pixels, and the previous second's posture was lying down. When calculating the membership of the current frame, the fuzzy logic inferencer actively suppresses the membership of the standing posture, avoiding misjudging the turning over action as a standing posture.
[0113] In another application scenario, let's take user C briefly leaving the room as an example. User C was initially sitting on the sofa (seated posture, human body area mask area is 120 pixels), and suddenly got up and left the room. Over 50 consecutive frames (approximately 5 seconds), the controller detected that the human body area mask area gradually decreased from 120 pixels to 55 pixels, a reduction of 65 pixels, or approximately 54%, which is greater than the preset threshold of 50%. The controller determined that user C had left the room and immediately controlled the air conditioner to reduce the fan speed to standby low fan mode, entering energy-saving mode. When user C returned to the room, the controller detected an increase in the human body area mask area again and automatically resumed the normal posture recognition and airflow control process.
[0114] In this embodiment of the invention, the air conditioner identifies the human body region and background region by determining a dynamic background model corresponding to the original thermal image and utilizing the temperature difference of the same pixel point between the original thermal image and the dynamic background model. This allows for effective extraction of the human body's thermal radiation region through the dynamic background model, adapting to the slow drift of indoor ambient temperature and effectively preventing target loss due to the mistaken absorption of stationary human bodies as background by freezing the background update of the human body region. Next, by performing attenuation compensation on the identified human body region coupled with the real-time operating parameters of the air conditioner, interference from the airflow during air conditioner operation on infrared thermometry is effectively resisted, restoring the authenticity of human body temperature characteristics at long distances and along the airflow path. Based on this, a stable human body region mask is generated by performing partitioned adaptive threshold segmentation and multi-frame statistics on the compensated target thermal map, thereby enabling the extraction of the target body region through partitioned adaptive threshold solution. This approach solves the problem of poor adaptability of globally fixed thresholds in complex thermal fields. Furthermore, by combining multi-frame statistics, it effectively suppresses pixel-level flickering at hot spot edges under low resolution, improving the stability and accuracy of human body region detection. Then, based on the human body region mask, multi-dimensional thermal features are extracted and the current human posture is identified using a lightweight artificial intelligence inference algorithm (fuzzy logic inferencer). Based on accurate human body region information and posture recognition results, differentiated air supply operations are executed. This not only achieves intelligent linkage between posture perception and air supply control, but also significantly improves the energy-saving effect of energy-efficient air conditioning equipment in different usage scenarios by differentiating between standing, sitting, and lying postures and executing corresponding air supply strategies. Simultaneously, the entire perception and inference process requires only minimal MCU computing resources to achieve millisecond-level response, solving the industry pain point that traditional high-power neural networks cannot be deployed on low-computing-power devices. It has good practicality and industrial promotion value.
[0115] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0116] Reference Figure 2 The diagram shows a structural block diagram of an air conditioner control device provided in an embodiment of the present invention, which may specifically include the following modules: The dynamic background model determination module 201 is used to determine the dynamic background model corresponding to the acquired original thermal image. The human body background region recognition module 202 is used to identify the human body region and the background region from the original thermal image based on the temperature difference between the temperature value of each pixel in the current frame thermal image and the background temperature estimate of the corresponding pixel in the dynamic background model. The attenuation compensation module 203 is used to perform attenuation compensation on the human body region in the original thermal image to obtain the target thermal map. The mask generation module 204 is used to divide the target heatmap into multiple local regions, determine the binarization threshold of each local region, and mark the pixels of the local regions as foreground and background according to the binarization threshold to generate a corresponding human body region mask. The posture recognition and air supply control module 205 is used to identify the current human posture corresponding to the human body area mask and execute an air conditioning air supply operation that matches the current human posture.
[0117] In some feasible implementations, the dynamic background model determination module 201 is specifically used for: The system continuously acquires a preset number of raw thermal images using an infrared sensor. Obtain the pixel temperature value corresponding to each pixel in the original thermal image, as well as the sensor parameters of the infrared sensor; Using the preset frame number, the pixel temperature value, and the sensor parameters, the initial background temperature estimate corresponding to each pixel in the original thermal image is calculated, and the initial dynamic background model is formed by the initial background temperature estimate corresponding to each pixel.
[0118] In some feasible implementations, the apparatus further includes: The background update judgment module is used to obtain the current temperature value of the target pixel in the current frame thermal image and the background temperature estimate value corresponding to the target pixel in the dynamic background model after the dynamic background model determination module 201 determines the dynamic background model corresponding to the acquired original thermal image; calculate the temperature difference between the current temperature value and the background temperature estimate value; and determine whether to update the background temperature estimate value corresponding to the target pixel in the dynamic background model based on the temperature difference value.
[0119] In some feasible implementations, the background update judgment module is specifically used for: When the temperature difference is greater than the first temperature difference threshold, the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen. When the temperature difference is less than or equal to the first temperature difference threshold, the current temperature value and the background temperature estimate are used to calculate the updated background temperature estimate, and the updated background temperature estimate is used to replace the background temperature estimate corresponding to the target pixel in the dynamic background model.
[0120] In some feasible implementations, the background update determination module is further used for: When the temperature difference is greater than the first temperature threshold and less than the second temperature threshold, it is determined that there is a suspected micro-moving target, and the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen. When the temperature difference is greater than the second temperature threshold, it is determined that there is a significant human target or a sudden heat source interference, and the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen.
[0121] In some feasible implementations, the background update judgment module is specifically used for: The updated background temperature estimate is calculated using a weighted moving average method based on a preset update rate, the current temperature value, and the estimated background temperature value.
[0122] In some feasible implementations, the human background region recognition module 202 is specifically used for: Obtain the current temperature value of each pixel in the current frame thermal image, and the estimated background temperature value of the corresponding pixel in the dynamic background model; The temperature difference corresponding to each pixel is calculated using the current temperature value of each pixel and the estimated background temperature value. Pixels whose temperature difference is greater than the first temperature difference threshold are identified as pixels in the human body region, and the human body region is formed by the pixels in the human body region. Pixels whose temperature difference is less than or equal to the first temperature difference threshold are identified as pixels in the background region, and the background region is formed by the pixels in the background region.
[0123] In some feasible implementations, the attenuation compensation module 203 is specifically used for: Obtain the real-time operating status parameters of the air conditioner, including the real-time fan speed setting and the set temperature difference; Determine the convection correction coefficient corresponding to the real-time wind speed setting and the set temperature difference; The convection correction coefficient is used to compensate for the distance attenuation of the temperature value of each pixel in the human body region to obtain the target thermal map.
[0124] In some feasible implementations, the attenuation compensation module 203 is specifically used for: Obtain the target distance corresponding to each pixel in the human body region; Using a preset attenuation constant, the target distance, and the convection correction coefficient, the temperature value of the pixel is attenuated to obtain the compensated target temperature value. Based on the compensated target temperature value, the temperature value of each pixel in the human body region is updated to obtain the corresponding target heat map.
[0125] In some feasible implementations, the mask generation module 204 includes: The threshold determination unit is used to obtain the mean temperature and standard deviation of the temperature of each pixel point in the local area of the target heat map; and to calculate the binarization threshold corresponding to each local area using the mean temperature and the standard deviation of the temperature.
[0126] In some feasible implementations, the mask generation module 204 is further used for: For each pixel in each of the local regions, pixels with a temperature value greater than the binarization threshold corresponding to the local region are marked as foreground, and pixels with a temperature value less than or equal to the binarization threshold are marked as background. Get the number of times each pixel is marked as foreground in multiple consecutive frames; Using the aforementioned number of times and a preset number of frames, the confidence level of each pixel belonging to the foreground is calculated; Pixels with a confidence level greater than a preset confidence threshold are used as pixels that constitute the human body region, and a corresponding human body region mask is generated from the pixels of the human body region.
[0127] In some feasible implementations, the attitude recognition and air supply control module 205 includes: The feature extraction unit is used to extract a multi-dimensional physical feature vector from the human body region mask. The multi-dimensional physical feature vector includes at least one of the human body region area, aspect ratio of the human body's circumscribed rectangle, thermal centroid height ratio, and edge thermal gradient divergence. The posture recognition unit is used to input at least one of the human body area, the aspect ratio of the human body's circumscribed rectangle, the thermal centroid height ratio, and the edge thermal gradient divergence into a preset classifier to perform human posture recognition and obtain the current human posture output by the classifier.
[0128] In some feasible implementations, the feature extraction unit is specifically used for: Determine the center and edge positions of the human body hotspot in the human body area mask; The temperature change rate is calculated along multiple directions from the intermediate position to the edge position, and the edge thermal gradient divergence is determined using the temperature change rate in each direction.
[0129] In some feasible implementations, the classifier is a fuzzy logic inferencer, and the pose recognition unit is specifically used for: At least one of the following is used as the input variable of the fuzzy logic inferencer: the area of the human body region, the aspect ratio of the circumscribed rectangle of the human body, the height ratio of the thermal centroid, and the edge thermal gradient divergence. The fuzzy logic inferencer executes the following fuzzy logic rules to calculate the membership degree of each attitude category: When the aspect ratio of the circumscribed rectangle of the human body is greater than the first aspect ratio threshold, the thermal centroid height ratio is greater than the first height ratio threshold, and the edge thermal gradient divergence is greater than the first divergence threshold, it is determined to be a standing posture. When the aspect ratio of the circumscribed rectangle of the human body is less than the second aspect ratio threshold and the thermal center of gravity height ratio is less than the second height ratio threshold, it is determined to be a lying posture. When the area of the human body region is smaller than a preset area threshold, it is determined to be an abandoned state; If the above criteria are not met, it is determined to be a sitting posture. Based on the membership degree corresponding to each of the posture categories, the posture category with the highest membership degree is taken as the current human posture output by the fuzzy logic inferencer.
[0130] In some feasible implementations, the pose recognition unit is further used for: Obtain historical pose information from the previous frame; When the historical posture information of the previous frame is a lying posture and the center of gravity displacement of the human body region in the current frame is less than the displacement threshold, the membership degree of the standing posture is suppressed when the fuzzy logic inferencer executes the fuzzy logic rule.
[0131] In some feasible implementations, the attitude recognition and air supply control module 205 further includes: The off-duty determination unit is used to determine the off-duty state when the reduction of the human body area within a preset number of consecutive preset frames is greater than a preset ratio threshold after determining the recognition result of the current human body posture based on the membership degree of each posture category.
[0132] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0133] In addition, this embodiment of the invention also provides an air conditioner for implementing the air conditioner control method as described in this embodiment of the invention.
[0134] In addition, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described air conditioner control method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0135] This invention also provides a readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described air conditioner control method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0136] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0137] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, EEPROM, Flash, and eMMC, etc.) containing computer-usable program code.
[0138] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0139] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0141] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0142] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0143] The above provides a detailed description of an air conditioner control method and an air conditioner control device provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A control method of an air conditioner, characterized by, include: A dynamic background model corresponding to the acquired raw thermal image is determined, wherein the dynamic background model contains the background temperature estimate corresponding to each pixel. Based on the temperature difference between the temperature value of each pixel in the current frame thermal image and the estimated background temperature of the corresponding pixel in the dynamic background model, the human body region and the background region are identified from the original thermal image. Attenuation compensation is applied to the human body region in the original thermal image to obtain the target thermal map; The target heatmap is divided into multiple local regions, and a binarization threshold for each local region is determined. The pixels in the local regions are marked as foreground and background according to the binarization threshold to generate a corresponding human body region mask. The current human posture corresponding to the human body region mask is identified, and an air conditioning operation matching the current human posture is executed.
2. The method of claim 1, wherein, The determination of the dynamic background model corresponding to the acquired original thermal image includes: The system continuously acquires a preset number of raw thermal images using an infrared sensor. Obtain the pixel temperature value corresponding to each pixel in the original thermal image, as well as the sensor parameters of the infrared sensor; Using the preset frame number, the pixel temperature value, and the sensor parameters, the initial background temperature estimate corresponding to each pixel in the original thermal image is calculated, and the initial dynamic background model is formed by the initial background temperature estimate corresponding to each pixel.
3. The method of claim 1, wherein, After determining the dynamic background model corresponding to the acquired original thermal image, the method further includes: Obtain the current temperature value of the target pixel in the current frame thermal image, and the estimated background temperature value corresponding to the target pixel in the dynamic background model; Calculate the temperature difference between the current temperature value and the estimated background temperature value; Based on the temperature difference, determine whether to update the estimated background temperature value corresponding to the target pixel in the dynamic background model.
4. The method of claim 3, wherein, The step of determining whether to update the background temperature estimate corresponding to the target pixel in the dynamic background model based on the temperature difference includes: If the temperature difference is greater than the first temperature difference threshold, then freeze the update of the background temperature estimate corresponding to the target pixel in the dynamic background model. If the temperature difference is less than or equal to the first temperature difference threshold, then the current temperature value and the background temperature estimate are used to calculate the updated background temperature estimate, and the updated background temperature estimate is used to replace the background temperature estimate corresponding to the target pixel in the dynamic background model.
5. The method of claim 4, wherein, The step of freezing the update of the background temperature estimate corresponding to the target pixel in the dynamic background model if the temperature difference is greater than the first temperature difference threshold includes: If the temperature difference is greater than the first temperature threshold and less than the second temperature threshold, it is determined that there is a suspected micro-moving target, and the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen. If the temperature difference is greater than the second temperature threshold, it is determined that there is a significant human target or a sudden heat source interference, and the update of the background temperature estimate corresponding to the target pixel in the dynamic background model is frozen. Wherein, the first temperature threshold is less than the second temperature threshold.
6. The method of claim 4, wherein, The step of calculating the updated background temperature estimate using the current temperature value and the background temperature estimate includes: The updated background temperature estimate is calculated using a weighted moving average method based on a preset update rate, the current temperature value, and the estimated background temperature value.
7. The method of claim 1, wherein, The step of identifying the human body region and the background region from the original thermal image based on the temperature difference between the temperature values of each pixel in the current frame thermal image and the estimated background temperature of the corresponding pixel in the dynamic background model includes: Obtain the current temperature value of each pixel in the current frame thermal image, and the estimated background temperature value of the corresponding pixel in the dynamic background model; The temperature difference corresponding to each pixel is calculated using the current temperature value of each pixel and the estimated background temperature value. Pixels whose temperature difference is greater than the first temperature difference threshold are identified as pixels in the human body region, and the human body region is formed by the pixels in the human body region. Pixels whose temperature difference is less than or equal to the first temperature difference threshold are identified as pixels in the background region, and the background region is formed by the pixels in the background region.
8. The method according to claim 1, characterized in that, The step of performing attenuation compensation on the human body region in the original thermal image to obtain the target thermal map includes: Obtain the real-time operating status parameters of the air conditioner, including the real-time fan speed setting and the set temperature difference; Determine the convection correction coefficient corresponding to the real-time wind speed setting and the set temperature difference; The convection correction coefficient is used to compensate for the distance attenuation of the temperature value of each pixel in the human body region to obtain the target thermal map.
9. The method according to claim 8, characterized in that, The step of using the convection correction coefficient to compensate for distance attenuation of the temperature values of each pixel in the human body region to obtain a target heat map includes: Obtain the target distance corresponding to each pixel in the human body region; Using a preset attenuation constant, the target distance, and the convection correction coefficient, the temperature value of the pixel is attenuated to obtain the compensated target temperature value. Based on the compensated target temperature value, the temperature value of each pixel in the human body region is updated to obtain the corresponding target heat map.
10. The method according to claim 1, characterized in that, Determining the binarization threshold for each of the local regions includes: Obtain the mean temperature and standard deviation of the temperature of each pixel in each local region of the target heat map; The binarization threshold corresponding to each local region is calculated using the mean temperature and the standard deviation of temperature.
11. The method according to claim 1, characterized in that, The step of marking the pixels in the local region as foreground and background according to the binarization threshold to generate a corresponding human body region mask includes: For each pixel in each of the local regions, pixels with a temperature value greater than the binarization threshold corresponding to the local region are marked as foreground, and pixels with a temperature value less than or equal to the binarization threshold are marked as background. Get the number of times each pixel is marked as foreground in multiple consecutive frames; Using the aforementioned number of times and a preset number of frames, the confidence level of each pixel belonging to the foreground is calculated; Pixels with a confidence level greater than a preset confidence threshold are used as pixels that constitute the human body region, and a corresponding human body region mask is generated from the pixels of the human body region.
12. The method according to claim 1, characterized in that, The process of identifying the current human pose corresponding to the human body region mask includes: Extract a multidimensional physical feature vector from the human body region mask. The multidimensional physical feature vector includes at least one of the following: human body region area, aspect ratio of the human body circumscribed rectangle, thermal centroid height ratio, and edge thermal gradient divergence. The human body region area, the aspect ratio of the circumscribed rectangle of the human body, the thermal centroid height ratio, and the edge thermal gradient divergence are input into a preset classifier to perform human posture recognition, thereby obtaining the current human posture output by the classifier.
13. The method according to claim 12, characterized in that, The extraction of multi-dimensional physical feature vectors from the human body region mask includes: Determine the center and edge positions of the human body hotspot in the human body area mask; The temperature change rate is calculated along multiple directions from the intermediate position to the edge position, and the edge thermal gradient divergence is determined using the temperature change rate in each direction.
14. The method according to claim 12, characterized in that, The classifier is a fuzzy logic inferencer. The step of inputting at least one of the following factors—the area of the human body region, the aspect ratio of the circumscribed rectangle of the human body, the height ratio of the thermal centroid, and the edge thermal gradient divergence—into a preset classifier for human pose recognition, and obtaining the current human pose output by the classifier, includes: At least one of the following is used as the input variable of the fuzzy logic inferencer: the area of the human body region, the aspect ratio of the circumscribed rectangle of the human body, the height ratio of the thermal centroid, and the edge thermal gradient divergence. The fuzzy logic inferencer executes the following fuzzy logic rules to calculate the membership degree of each attitude category: When the aspect ratio of the circumscribed rectangle of the human body is greater than the first aspect ratio threshold, the thermal centroid height ratio is greater than the first height ratio threshold, and the edge thermal gradient divergence is greater than the first divergence threshold, it is determined to be a standing posture. When the aspect ratio of the circumscribed rectangle of the human body is less than the second aspect ratio threshold and the thermal center of gravity height ratio is less than the second height ratio threshold, it is determined to be a lying posture. When the area of the human body region is smaller than a preset area threshold, it is determined to be an abandoned state; If the above criteria are not met, it is determined to be a sitting posture. Based on the membership degree corresponding to each of the posture categories, the posture category with the highest membership degree is taken as the current human posture output by the fuzzy logic inferencer.
15. The method according to claim 14, characterized in that, The step of calculating the membership degree of each attitude category by executing the following fuzzy logic rules through the fuzzy logic inferencer further includes: Obtain historical pose information from the previous frame; When the historical posture information of the previous frame is a lying posture and the center displacement of the human body region in the current frame is less than the displacement threshold, the fuzzy logic inferencer suppresses the membership degree of the standing posture when executing the fuzzy logic rule.
16. The method according to claim 14, characterized in that, After determining the recognition result of the current human posture based on the membership degree of each posture category, the method further includes: When the decrease in the area of the human body region within a consecutive preset number of frames is greater than a preset proportional threshold, it is determined to be an off-duty state.
17. A control device for an air conditioner, characterized in that, include: The dynamic background model determination module is used to determine the dynamic background model corresponding to the acquired raw thermal image. The human body background region recognition module is used to identify the human body region and the background region from the original thermal image based on the temperature difference between the temperature value of each pixel in the current frame thermal image and the background temperature estimate of the corresponding pixel in the dynamic background model. The attenuation compensation module is used to perform attenuation compensation on the human body region in the original thermal image to obtain the target thermal map. The mask generation module is used to divide the target heatmap into multiple local regions, determine the binarization threshold of each local region, and mark the pixels of the local regions as foreground and background according to the binarization threshold to generate the corresponding human body region mask. The posture recognition and air supply control module is used to identify the current human posture corresponding to the human body area mask and execute air conditioning air supply operation that matches the current human posture.
18. An air conditioner, characterized in that, Used to implement the method as described in any one of claims 1 to 17.
19. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-17.
20. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-17.
