A method, device, and storage medium for closed-loop control of nightlights based on human and pet recognition.

By combining a quaternary pyroelectric infrared sensor and millimeter-wave radar, human-pet recognition and consistency detection are achieved, solving the problem of accidental triggering of nightlights, improving the accuracy and intelligence of lighting control, and ensuring the sleep and health of users and pets.

CN123124181APending Publication Date: 2026-11-17张雪妮
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611474660.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing nightlights cannot accurately distinguish between people and pets, leading to frequent false triggers that affect the sleep and health of both users and pets, and their level of intelligence is low.

Method used

By combining a quaternary pyroelectric infrared sensor and millimeter-wave radar, human-pet recognition is achieved through weighted fusion of thermal radiation area characteristics and spatial motion characteristics. Consistency detection is performed over multiple consecutive acquisition cycles to trigger lighting switching.

Benefits of technology

It improves the accuracy and stability of human-pet recognition, ensures the precision and intelligence of lighting control, adapts to the sleep needs of humans and pets, reduces the false trigger rate, and provides health warning functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123124181A_ABST
    Figure CN123124181A_ABST
Patent Text Reader

Abstract

This invention relates to a closed-loop control method, device, and storage medium for nightlights based on human-pet recognition. In each acquisition cycle, a first sensor and a second sensor acquire the thermal amplitude area characteristics and spatial motion characteristics of a target within the detection area, respectively. These characteristics are then mapped to sub-confidence scores belonging to a human and weighted fusion is performed. The target state recognition result is obtained based on the weighted fusion result. If the consistency detection of the target state recognition results passes for N consecutive acquisition cycles, lighting switching is triggered, driving the red LED module to output lighting according to the lighting parameter set corresponding to the target state recognition result. During the lighting output, the target state recognition result is continuously acquired and updated, and the lighting parameter set is updated to drive the red LED module to achieve closed-loop switching control of the lighting. Therefore, this invention can accurately distinguish between humans and pets and adapt to different lighting parameters, achieving intelligent lighting switching and ensuring the sleep and health of both users and pets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent lighting technology, and in particular to a closed-loop control method, device, and storage medium for nightlights based on human and pet recognition. Background Technology

[0002] Existing nightlights and sleep lamps mostly use a single pyroelectric infrared sensor to achieve motion-sensing illumination. Their control logic is simple, and the triggering condition is singular; they can only control the light's on / off state based on the movement signal of a target heat source. This has the following drawbacks in practical applications: 1. A single infrared sensor can only collect heat source characteristics, which is easily affected by environmental interference such as changes in ambient temperature, heat source drift, and obstruction by debris, resulting in frequent false triggering and missed triggering problems and poor stability of lighting control; Second, traditional pyroelectric sensors can only detect changes in heat sources and cannot distinguish between human and pet heat sources. At night, pet activities can easily trigger the lights to turn on frequently, causing light pollution and wasting electricity. Frequent light flashing can also disturb the sleep of both humans and pets at night, resulting in a poor user experience. Furthermore, the significant differences in visual structure between pets and humans are not taken into account. Lighting parameters suitable for humans are not suitable for pets. Long-term exposure will interfere with the sleep and health of pets, and the level of intelligence is extremely low.

[0003] Therefore, there is an urgent need for a technical solution that can accurately distinguish between humans and pets and adapt to different lighting parameters to achieve intelligent lighting switching, thereby ensuring the sleep and health of users and pets. Summary of the Invention

[0004] The technical problem to be solved by the present invention is that it provides a closed-loop control method, device and storage medium for night lights based on human and pet recognition, which can accurately distinguish between humans and pets and adapt to different lighting parameters, realize intelligent lighting switching, and ensure the sleep and health of users and pets.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: In a first aspect, the present invention provides a closed-loop control method for nightlights based on human-pet recognition, comprising: In each acquisition cycle, the thermal radiation area features of the target within the detection area are obtained through the first sensor, and the spatial motion features of the target within the detection area are obtained through the second sensor. The thermal radiation area features and the spatial motion features are mapped to sub-confidences attributable to humans through a feature mapping table and then weighted and fused to obtain the weighted fusion result corresponding to each acquisition cycle. The target state identification result for each acquisition cycle is obtained based on the weighted fusion result for each acquisition cycle. The target state identification result includes human state, pet state, and idle state. A consistency check is performed on the target state identification results for N consecutive acquisition cycles. If the consistency check passes, lighting switching is triggered. By acquiring the lighting parameter group corresponding to the target state identification results that have passed the consistency check, the red LED module is driven to output lighting according to the lighting parameter group. During the lighting output, the target state identification results are continuously acquired and updated according to the acquisition cycle, and the lighting parameter group is updated according to the updated target state identification results to drive the red LED module to realize closed-loop switching control of lighting.

[0006] The beneficial effects of this invention are as follows: It maps thermal radiation area characteristics and spatial motion characteristics to sub-confidence values ​​attributed to humans and performs weighted fusion to obtain target state recognition results, solving the defects of traditional single infrared sensing recognition methods such as confusion between humans and pets and high false trigger rates; it implements a consistency detection mechanism for target state recognition results across multiple consecutive acquisition cycles, triggering lighting switching only when the consistency detection passes, avoiding frequent lighting jumps caused by misjudgments in a single acquisition cycle due to short-term sensor disturbances and instantaneous interference; it continuously acquires and updates lighting parameters during lighting output, enabling dynamic adaptive updates of lighting parameters according to the target's actual state, improving the stability, accuracy, and intelligence of lighting control, and ensuring the sleep and health of users and pets.

[0007] Optionally, the first sensor is a quaternary pyroelectric infrared sensor, and the step of acquiring the thermal radiation area characteristics of the target within the detection area through the first sensor in each acquisition cycle includes: The detection area is pre-divided into M detection zones using a quaternary pyroelectric infrared sensor and a Fresnel lens array, and each detection zone is assigned a corresponding zone identifier. The calibration distance and field of view coverage area of ​​each detection zone are the same. In each acquisition cycle, the detection zones triggered by the target within the detection area are detected by a quaternary pyroelectric infrared sensor, all triggered detection zones are obtained, and the zone identifier and pulse amplitude of each triggered detection zone are acquired. The number of different triggered detection partitions within L consecutive acquisition cycles is counted based on the partition identifier to obtain the total number of triggered detection partitions. At the same time, the pulse amplitude of the same triggered detection partition within L consecutive acquisition cycles is processed by moving average to obtain the average pulse amplitude of each triggered detection partition. The detection distance of the target within the detection area is obtained by the second sensor. The thermal radiation area value is calculated based on the detection distance, the total number of triggered detection zones, the calibration distance, and the field of view coverage area. The thermal radiation area value is then corrected for temperature compensation using the average pulse amplitude to obtain the thermal radiation area characteristics.

[0008] As described above, this invention solves the problems of high noise, limited data, and inability to quantify heat source area in traditional pyroelectric sensing signals; the introduced temperature compensation correction mechanism improves the accuracy of thermal radiation area characteristics.

[0009] Optionally, the second sensor is a millimeter-wave radar, and the spatial motion characteristics include ground-elevation characteristics, motion speed characteristics, micro-Doppler gait characteristics, and ground-hugging characteristics. Simultaneously acquiring the spatial motion characteristics of targets within the detection area through the second sensor includes: Simultaneously, the millimeter-wave radar transmits frequency-modulated continuous wave signals to the detection area and receives echo signals. The echo signals are subjected to two-dimensional Fourier transforms in the range dimension and Doppler dimension to obtain a two-dimensional energy map. Constant false alarm rate detection is performed on the two-dimensional energy map to obtain all scattering points and the range, radial velocity, azimuth angle and elevation angle of each scattering point. Density clustering is performed on all scattering points within the same acquisition cycle to obtain target point cloud clusters. Trajectory association is performed on target point cloud clusters in adjacent acquisition cycles to obtain the motion trajectory and trajectory position sequence of the target point cloud clusters. Based on the elevation angle and distance of all scattering points in the target point cloud cluster, the ground clearance of each scattering point is calculated. Based on the ground clearance of each scattering point, the ground clearance of the highest point of the target point cloud cluster is obtained. The ground clearance of the highest point is superimposed with the preset radar installation height to obtain the ground clearance characteristics of the target. The target's motion velocity characteristics are calculated based on the radial velocities of all scattering points in the target point cloud cluster. Micro-Doppler analysis is performed on the echo signals of the target point cloud cluster's motion trajectory within a set time window to obtain the micro-Doppler spectrum. The gait dominant frequency is extracted from the micro-Doppler spectrum to obtain the target's micro-Doppler gait characteristics. The target's motion trajectory characteristics are obtained based on the trajectory position sequence. The trajectory height variance is calculated based on the height distribution of the target point cloud cluster over P acquisition cycles in the trajectory position sequence to obtain the target's ground contact characteristics.

[0010] As described above, millimeter-wave radar can extract multi-dimensional spatial motion features. Among them, the features of ground height, micro-Doppler gait, and ground contact can effectively distinguish between humans and pets, improve the discrimination and anti-interference ability of human-pet recognition, and ensure the accuracy of human-pet recognition.

[0011] Optionally, it also includes: Based on the movement speed characteristics, it is determined whether the target is in a sleep state. If the target is in a sleep state, the millimeter-wave radar is switched from the default illumination mode to the monitoring mode. In the monitoring mode, a distance range is generated based on the distances of all scattering points in the target point cloud cluster, and the echo signal within the distance range is continuously phase-sampled to obtain complex sample values; The phase angle of the complex sampled values ​​is taken to obtain a phase sequence. The phase sequence is unwrapped to obtain a phase sequence after phase unwrapping. The phase sequence after phase unwrapping is bandpass filtered to obtain a breathing frequency band signal. Peak detection is performed on the respiratory frequency band signal to estimate the respiratory cycle, and the respiratory cycle is converted within a sliding window of a set length to obtain the respiratory rate; Based on the movement trajectory characteristics, the activity level and the number of times one gets up at night are counted. The respiratory rate, activity level and the number of times one gets up at night are summarized for all collection cycles within a single nighttime statistical period to obtain the respiratory rate index, activity level index and the number of times one gets up at night index for a single nighttime statistical period. The individual baselines for respiratory rate, activity level, and number of nighttime urinations of the target are obtained. The respiratory rate, activity level, and number of nighttime urinations of a single nighttime statistical period are compared with the corresponding individual baselines for respiratory rate, activity level, and number of nighttime urinations, respectively, to calculate the deviations for respiratory rate, activity level, and number of nighttime urinations. Health warnings are then issued to the target based on these deviations.

[0012] As described above, by reusing the spatial motion characteristics acquired by millimeter-wave radar, dual-mode switching can be achieved. Based on lighting perception, a health early warning mechanism can be extended to realize non-contact respiratory rate detection. Nighttime health monitoring can be achieved without the need for additional monitoring equipment, thus improving scene adaptability.

[0013] Optionally, the step of providing a health warning to the target based on the deviation of the respiratory rate, the deviation of the activity level, and the deviation of the number of times the target urinates at night includes: When the absolute value of any one of the deviations—the respiratory rate deviation, the activity level deviation, or the number of times one gets up at night—exceeds the first deviation threshold, a Level 1 health warning is output. When the absolute value of any of the deviations of the respiratory rate deviation, the activity level deviation, or the number of times the person gets up at night exceeds the second deviation threshold for two consecutive nightly statistical periods, a level two health warning is output, wherein the second deviation threshold is greater than the first deviation threshold. When the amplitude of the respiratory frequency band signal during the sleep period is consistently lower than the background noise and the duration exceeds the set duration, it is determined to be a sleep apnea event, an immediate health warning is output, and the red LED module is controlled to gradually brighten to the lighting level. The sleep period is the time period from when the target is determined to be in a sleep state to when the target is determined to exit the sleep state.

[0014] As described above, a graded health early warning system is implemented by using multi-level deviation thresholds, thereby improving the security and intelligence of the early warning system.

[0015] Optionally, obtaining the target state recognition result for the corresponding acquisition period based on the weighted fusion result for each acquisition period includes: The system sequentially determines whether the weighted fusion result corresponding to each acquisition cycle is higher than the first state threshold. If it is higher than the first state threshold, the system generates the target state recognition result for the human state. If it is lower than the first state threshold, the system determines whether it is higher than the second state threshold. If it is, the system generates the target state recognition result for the pet state. If it is lower than the second state threshold, the system generates the target state recognition result for the idle state.

[0016] As described above, the boundary conditions for human state, pet state, and idle state are clearly defined by the hierarchical state threshold judgment rule, so as to avoid the ambiguity of the boundary and the confusion of the judgment logic, which would affect the accuracy of the target state recognition result.

[0017] Optionally, the lighting parameter set includes spectral parameters, illuminance level, and dimming drive parameters. The lighting parameter set corresponding to the target state recognition result that has passed the consistency detection includes: When the target state identification result of the consistency detection is human state, the spectral parameters are as follows: the amber light channel and the red light channel of the red light LED module are activated simultaneously, and the current ratio of the amber light channel and the red light channel is a preset first ratio, the light power ratio of the red light channel is a preset first ratio, the peak wavelength of the composite light emitted by the amber light channel and the red light channel is not lower than a preset first wavelength threshold, and the proportion of short-wavelength components is not greater than a preset first proportion threshold. The illuminance level is a preset first illuminance range. The dimming drive parameters include the relative brightness level corresponding to the illuminance level. When the relative brightness level is not lower than the preset brightness threshold, pure amplitude dimming is used and the output is a flat DC. When the relative brightness level is lower than the preset brightness threshold, a fixed base current is used and a pulse width modulation with a preset frequency and a preset number of bits is superimposed. The duty cycle is generated according to the ratio of the relative brightness level to the preset brightness threshold. When the target state identification result of the consistency detection is a pet state, the spectral parameters are: only the red light channel of the red light LED module is activated, the peak wavelength of the emitted light is not lower than the preset second wavelength threshold, the proportion of short-wavelength components is not greater than the preset second proportion threshold, the second proportion threshold is lower than the first proportion threshold, and the second wavelength threshold is not lower than the first wavelength threshold. The illuminance level is a preset second illuminance range, the upper limit of the second illuminance range is less than the lower limit of the first illuminance range; the dimming drive parameters for the red light channel adopt pure amplitude dimming or pulse width modulation according to the relationship between the relative brightness level and the preset brightness threshold. When the target state identification result of the consistency test is an idle state, the spectral parameter is to only start or turn off the red light channel of the red light LED module with a microcurrent. The illuminance level is a preset third illuminance range, the upper limit of which is less than the lower limit of the second illuminance range; the dimming drive parameter is either off or microcurrent drive.

[0018] As described above, differentiated and refined lighting parameter groups are configured for human, pet, and idle states. In human state, it provides comfortable companion lighting; in pet state, it avoids blue light stimulation and excessive brightness interference, adapting to the visual physiological characteristics of pets; and in idle state, it reduces energy consumption and achieves flicker-free output.

[0019] Optionally, it also includes: Obtain the daily activity rhythm model of the target, divide the future time period into high activity prediction zones and low activity prediction zones according to the daily activity rhythm model, and generate corresponding activity scheduling strategies. When the acquisition period falls into the high activity prediction zone or the low activity prediction zone, the corresponding activity scheduling strategy is activated to perform prior modulation on the working parameters of the recognition process corresponding to the target state recognition result. The activity scheduling strategy corresponding to the high activity prediction zone is to increase the sensing sensitivity of the working parameters and make the red LED module enter the illumination standby in advance. The activity scheduling strategy corresponding to the low activity prediction zone is to reduce the sensing sensitivity and sensing frame rate of the working parameters and lock the low light level of the red LED module. The activity level of the target is obtained based on the motion trajectory features in the spatial motion features. When the acquisition period falls into the high activity prediction zone and the target state identification result is idle or pet state, if the activity level is lower than the activity level threshold, it is determined that the high activity prediction zone conflicts with the target state identification result. When the acquisition period falls into the low activity prediction zone and the target state identification result is pet state, if the activity level exceeds the activity level threshold, it is determined that the low activity prediction zone conflicts with the target state identification result. The number of conflicts between the high-activity prediction zone and the low-activity prediction zone is counted separately. When the number of conflicts exceeds the conflict threshold within a preset conflict period, the corresponding activity scheduling strategy is turned off, and a callback is triggered to revert the working parameters to the default state.

[0020] As described above, the introduction of a target-based daily activity rhythm model modulates the working parameters of the identification process in advance, taking into account both response efficiency and low power requirements; the introduction of conflict detection avoids control anomalies caused by the failure of the daily activity rhythm model, taking into account both the intelligence of predictive scheduling and the accuracy of real-time identification, and ensuring the response efficiency and adaptability of subsequent lighting switching.

[0021] Optionally, it also includes: The spatial motion characteristics of all collection cycles within the daily statistical period are summarized to obtain the daily activity data of the target; The daily activity data is divided into time bins according to a preset time period to obtain Q time bins. The corresponding activity probability is calculated based on the daily activity data in each time bin. An activity probability observation histogram is generated based on the activity probabilities of the Q time bins. The deviation between the activity probability observation histogram and the daily activity rhythm model is calculated. When the deviation exceeds a set proportion within a set number of consecutive days, it is determined that the activity rhythm of the target has shifted, and the daily activity rhythm model is reconstructed to obtain a new daily activity rhythm model.

[0022] As described above, a time-binding method is used to generate an activity probability observation histogram to determine whether the daily activity rhythm model has shifted, avoiding misjudgments caused by single random activity fluctuations. The reconstruction mechanism of the daily activity rhythm model achieves dynamic adaptation.

[0023] Secondly, the present invention provides a closed-loop control device for a red-light flicker-free night light based on human-pet recognition, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the closed-loop control method for a night light based on human-pet recognition described in the first aspect.

[0024] Thirdly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed, implements the night light closed-loop control method based on human-pet recognition described in the first aspect.

[0025] The technical effects of the closed-loop control device for a red-light flicker-free night light based on human-pet recognition provided in the second aspect and the computer-readable storage medium provided in the third aspect are the same as those of the closed-loop control method for a night light based on human-pet recognition provided in the first aspect. Attached Figure Description

[0026] Figure 1 This is a flowchart of the night light closed-loop control method based on human and pet recognition provided in this embodiment; Figure 2This is a schematic diagram of the overall process of the night light closed-loop control method based on human and pet recognition provided in this embodiment; Figure 3 This is a schematic diagram of the health early warning process involved in this embodiment; Figure 4 This is a schematic diagram of the process for reconstructing the prior modulation and diurnal activity rhythm model involved in this embodiment; Figure 5 This is a schematic diagram of a closed-loop control device for a red-light flicker-free night light based on human-pet recognition, as provided in this embodiment.

[0027] [Explanation of Labels in the Attached Image] 1. A closed-loop control device for a red-light flicker-free night light based on human-pet recognition; 2. Processor; 3. Memory. Detailed Implementation

[0028] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. However, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0029] Example 1 Please refer to Figures 1 to 4 This invention provides a closed-loop control method for nightlights based on human-pet recognition, comprising the following steps: S1. In each acquisition cycle, the thermal radiation area feature of the target in the detection area is obtained through the first sensor, and the spatial motion feature of the target in the detection area is obtained through the second sensor. The thermal radiation area feature and the spatial motion feature are mapped to sub-confidence values ​​belonging to humans through a feature mapping table and then weighted and fused to obtain the weighted fusion result corresponding to each acquisition cycle. In this embodiment, as Figure 2As shown, within each acquisition cycle, dual sensors are used to acquire the thermal radiation area features and spatial motion features of the target within the detection area. The acquisition cycle corresponds to the control cycle of the night light's main control MCU. The first sensor is a quaternary pyroelectric infrared sensor, and the second sensor is a millimeter-wave radar. The acquisition cycle corresponds one-to-one with the data frame cycle of the millimeter-wave radar, for example, a frame rate of 10-20Hz, meaning acquisition is performed every 50-100ms. The spatial motion features are multi-dimensional, including ground clearance features, motion speed features, micro-Doppler gait features, and ground contact features. The thermal radiation area features can also be acquired by a thermal imaging array or a thermopile infrared sensor, and the spatial motion features can also be acquired by a time-of-flight sensor, lidar, or ultrasonic array. A preset feature mapping table maps the thermal radiation area features and spatial motion features to sub-confidence values ​​attributed to humans, and then performs weighted fusion to obtain the weighted fusion result for each acquisition cycle. That is, the feature mapping table stores the boundary thresholds and slope coefficients for assigning thermal radiation area features and spatial motion features to humans, as shown in Table 1, and the corresponding sub-confidence value mapping functions attributed to humans. Table 1 and the sub-confidence mapping function attributing to individuals are as follows: Table 1. Category boundary thresholds and slope coefficients for humans in the feature mapping table The sub-confidence mapping function is: ; in, The subconfidence score indicates that feature i belongs to a person. The slope coefficient representing feature i belonging to a person. Indicate feature i, The boundary threshold for assigning feature i to a person.

[0030] The calculated sub-confidence scores are weighted and fused. The thermal radiation area feature and spatial motion feature have pre-set weight coefficients, such as: 0.25 for thermal radiation area feature, 0.30 for ground clearance feature, 0.10 for motion speed feature, 0.25 for micro-Doppler gait feature, and 0.10 for ground contact feature. Ground clearance feature and micro-Doppler gait feature have the least overlap and strongest discriminative power between humans and cats / dogs, and are given the highest weight; thermal radiation area feature is in the middle; motion speed feature and ground contact feature are easily affected by the target's instantaneous activity state, and are given lower weights as auxiliary features. The specific weight coefficients can be adjusted according to the actual situation.

[0031] The above feature mapping table can be updated based on subsequent real-world data, and can also be further updated by introducing sub-confidence scores belonging to pets. Pet categories include: cats, dogs, etc., as shown in Table 2. Table 2. Category Boundary Thresholds and Slope Coefficients for Pets in the Feature Map Table At this time, the first sensor in step S1 is a quaternary pyroelectric infrared sensor, and the acquisition of the thermal radiation area characteristics of the target within the detection area by the first sensor in each acquisition cycle includes: S10. The detection area is pre-divided into M detection zones using a quaternary pyroelectric infrared sensor and a Fresnel lens array, and a corresponding zone identifier is assigned to each detection zone. The calibration distance and field of view coverage area of ​​each detection zone are the same. S11. In each acquisition cycle, the detection zones triggered by the target within the detection area are detected by the quaternary pyroelectric infrared sensor to obtain all triggered detection zones, and the zone identifier and pulse amplitude of each triggered detection zone are acquired. S12. Based on the partition identifier, count the number of different triggered detection partitions in L consecutive acquisition cycles to obtain the total number of triggered detection partitions. At the same time, perform a moving average processing on the pulse amplitude of the same triggered detection partition in L consecutive acquisition cycles to obtain the average pulse amplitude of each triggered detection partition. S13. Obtain the detection distance of the target within the detection area through the second sensor, calculate the thermal radiation area value based on the detection distance, the total number of triggered detection zones, the calibration distance, and the field of view coverage area, and perform temperature compensation correction on the thermal radiation area value through the average pulse amplitude to obtain the thermal radiation area characteristics.

[0032] In this embodiment, as Figure 2 As shown, the first sensor is a quaternary pyroelectric infrared sensor with a response band of 5-14µm, covering the main thermal radiation band of 8-12µm for human and cat / dog surfaces. The quaternary pyroelectric infrared sensor is paired with a partitioned Fresnel lens array to pre-divide the detection area into M detection partitions, where M is in the range [15, 21], preferably 15. Each detection partition is assigned a unique partition identifier. The calibration distance and field of view coverage area are the same for each detection partition. The calibration distance is in the range [0.3, 5], preferably 1.5m, and the field of view coverage area is 0.02㎡.

[0033] Within each acquisition cycle, a quaternary pyroelectric infrared sensor detects the detection zones triggered by targets within the detection area. When a target enters a detection zone, that zone outputs a pulse signal. The main control MCU acquires the zone identifier and pulse amplitude of all triggered detection zones within that acquisition cycle, as well as the pulse duration and trigger time, for subsequent auxiliary judgment of the target's movement trend. The total number of triggered detection zones is obtained by statistically analyzing the different triggered detection zones over L consecutive acquisition cycles. Simultaneously, a moving average is performed on the pulse amplitude of the same triggered detection zone over L consecutive acquisition cycles to obtain the average pulse amplitude of each triggered detection zone, where L is 10.

[0034] The detection range of targets within the detection area is obtained through a second sensor. The thermal radiation area value is calculated based on the detection range, the total number of triggered detection zones, the calibration distance, and the field of view coverage area. Temperature compensation correction is then performed using the average pulse amplitude to obtain the thermal radiation area characteristics. The specific calculation is as follows: ; in, This represents the thermal radiation area value, and N represents the total number of triggered detection zones. Indicates the area covered by the field of view. Indicates the calibration distance. Indicates the detection distance.

[0035] The specific temperature compensation corrections are as follows: ; Here, represents the thermal radiation area characteristics. Indicates the average pulse amplitude. This indicates the reference amplitude of the standard blackbody at the set temperature at the calibrated distance.

[0036] At this time, the second sensor in step S1 is a millimeter-wave radar, and the spatial motion characteristics include ground height characteristics, motion speed characteristics, micro-Doppler gait characteristics, and ground contact characteristics. Simultaneously acquiring the spatial motion characteristics of the target within the detection area through the second sensor includes: S14. Simultaneously, the millimeter-wave radar transmits frequency-modulated continuous wave signals to the detection area and receives echo signals. The echo signals are subjected to two-dimensional Fourier transforms in the range dimension and Doppler dimension to obtain a two-dimensional energy map. The two-dimensional energy map is subjected to constant false alarm rate detection to obtain all scattering points and the distance, radial velocity, azimuth angle and elevation angle of each scattering point. S15. Perform density clustering on all scattering points within the same acquisition cycle to obtain target point cloud clusters. Perform trajectory association on target point cloud clusters in adjacent acquisition cycles to obtain the motion trajectory and trajectory position sequence of the target point cloud clusters. S16. Calculate the ground clearance of each scattering point based on the elevation angle and distance of all scattering points in the target point cloud cluster. Obtain the ground clearance of the highest point of the target point cloud cluster based on the ground clearance of each scattering point. Superimpose the ground clearance of the highest point with the preset radar installation height to obtain the ground clearance characteristics of the target. S17. Calculate the target's motion velocity characteristics based on the radial velocities of all scattering points in the target point cloud cluster. Perform micro-Doppler analysis on the echo signals of the target point cloud cluster's motion trajectory within a set time window to obtain the micro-Doppler spectrum. Extract the gait dominant frequency from the micro-Doppler spectrum to obtain the target's micro-Doppler gait characteristics. Obtain the target's motion trajectory characteristics based on the trajectory position sequence. Calculate the trajectory height variance based on the height distribution of the target point cloud cluster over P acquisition cycles in the trajectory position sequence to obtain the target's ground contact characteristics.

[0037] In this embodiment, as Figure 2 As shown, the second sensor is a 60GHz FMCW millimeter-wave radar with multiple transmit / receive antennas in elevation dimension: 1 transmit, 3 receive, or 3 transmit / 4 receive MIMO, frequency modulation bandwidth not less than 500MHz, range resolution ≤30cm, frame rate 10-20Hz, detection range 0.3-5m, and elevation beam coverage ≥±30°. Candidate models include Infineon BGT60TR13C, Silicon Motion 60GHz radar SoC series, or equivalent models. The radar should be installed at a height of 10-40cm, with an upward tilt of 5°-15° to ensure complete point cloud coverage of a 1.8m tall target at a distance of 0.5-4m.

[0038] Within each acquisition cycle, a frequency-modulated continuous wave signal is transmitted to the detection area via millimeter-wave radar, and echo signals are received. The main control MCU performs a two-dimensional Fourier transform of the echo signals in the range and Doppler dimensions to obtain a range-Doppler two-dimensional energy map. Constant false alarm rate detection is performed on the two-dimensional energy map to obtain all scattering points and the range, radial velocity, azimuth angle, and elevation angle of each scattering point. Density clustering is performed on all scattering points within the same acquisition cycle to obtain target point clusters. Trajectory association is performed on target point clusters in adjacent acquisition cycles to obtain the motion trajectory and trajectory position sequence of the target point clusters. The trajectory position sequence is composed of the center position or representative point position of the target point cluster in each acquisition cycle.

[0039] Based on the elevation angle and range of all scattering points in the target point cloud cluster, the ground clearance of each scattering point is calculated as: Ground clearance = Range × sin(Elevation angle). The highest point of the target point cloud cluster is then determined from the ground clearance of each scattering point. The 90th percentile of the ground clearance of all scattering points is taken as the highest point's ground clearance to eliminate discrete group noise. The highest point's ground clearance is then superimposed with a preset radar installation height. The resulting ground clearance feature is smoothed using a 1-second sliding window with median smoothing to suppress instantaneous fluctuations. The target's velocity characteristics are calculated based on the radial velocities of all scattering points in the target point cloud cluster. The average radial velocity of all scattering points or the radial velocity of the scattering point with the highest capability is taken as the velocity characteristic. Micro-Doppler analysis is performed on the echo signal of the target point cloud cluster's motion trajectory within a set time window. The gait frequency is extracted from the obtained micro-Doppler spectrum to obtain the target's micro-Doppler gait characteristics. The motion trajectory characteristics are obtained based on the trajectory position sequence. The trajectory height variance is calculated based on the height distribution of the target point cloud cluster in the trajectory position sequence over P acquisition cycles to obtain the target's ground contact characteristics. Here, P is 10.

[0040] Furthermore, in this embodiment, candidate solutions are provided for the ground clearance feature. When the second sensor uses a millimeter-wave radar without elevation resolution, such as a 24GHz FMCW trajectory radar, the radar point cloud cannot directly provide the elevation angle. Therefore, a partitioned Fresnel lens can be used to divide the detection area into three position zones in the vertical direction: upper, middle, and lower. Each position zone corresponds to a different height range. The main control MCU provides the target's height range based on the highest position in the triggered detection zone, such as: upper zone: corresponding height ≥ 0.6m; middle zone: corresponding height 0.3-0.6m; lower zone: corresponding height < 0.3m. When the target triggers multiple position zones simultaneously, the highest position is taken as the height range. The target must enter the lower edge coverage area of ​​the radar beam to be stably detected. Therefore, the nearest radial distance is calculated based on the radar safety height and the preset elevation beamwidth, and the target's upper height limit is inferred from the nearest radial distance. By weighted fusion of the upper limit of altitude and the altitude range, the ground-free altitude feature can be obtained. At this time, the weight coefficient of the sub-confidence calculated from the ground-free altitude feature is reduced when participating in the weighted fusion, and the weight coefficient of the thermal radiation area feature and the micro-Doppler gait feature is increased accordingly.

[0041] In this embodiment, a health monitoring mechanism is also provided, specifically including: Based on the movement speed characteristics, it is determined whether the target is in a sleep state. If the target is in a sleep state, the millimeter-wave radar is switched from the default illumination mode to the monitoring mode. In the monitoring mode, a distance range is generated based on the distances of all scattering points in the target point cloud cluster, and the echo signal within the distance range is continuously phase-sampled to obtain complex sample values; The phase angle of the complex sampled values ​​is taken to obtain a phase sequence. The phase sequence is unwrapped to obtain a phase sequence after phase unwrapping. The phase sequence after phase unwrapping is bandpass filtered to obtain a breathing frequency band signal. Peak detection is performed on the respiratory frequency band signal to estimate the respiratory cycle, and the respiratory cycle is converted within a sliding window of a set length to obtain the respiratory rate; Based on the movement trajectory characteristics, the activity level and the number of times one gets up at night are counted. The respiratory rate, activity level and the number of times one gets up at night are summarized for all collection cycles within a single nighttime statistical period to obtain the respiratory rate index, activity level index and the number of times one gets up at night index for a single nighttime statistical period. The individual baselines for respiratory rate, activity level, and number of nighttime urinations of the target are obtained. The respiratory rate, activity level, and number of nighttime urinations of a single nighttime statistical period are compared with the corresponding individual baselines for respiratory rate, activity level, and number of nighttime urinations, respectively, to calculate the deviations for respiratory rate, activity level, and number of nighttime urinations. Health warnings are then issued to the target based on these deviations.

[0042] The method of providing a health warning to the target based on the deviation of the respiratory rate, the deviation of the activity level, and the deviation of the number of times the target urinates at night includes: When the absolute value of any one of the deviations—the respiratory rate deviation, the activity level deviation, or the number of times one gets up at night—exceeds the first deviation threshold, a Level 1 health warning is output. When the absolute value of any of the deviations of the respiratory rate deviation, the activity level deviation, or the number of times the person gets up at night exceeds the second deviation threshold for two consecutive nightly statistical periods, a level two health warning is output, wherein the second deviation threshold is greater than the first deviation threshold. When the amplitude of the respiratory frequency band signal during the sleep period is consistently lower than the background noise and the duration exceeds the set duration, it is determined to be a sleep apnea event, an immediate health warning is output, and the red LED module is controlled to gradually brighten to the lighting level. The sleep period is the time period from when the target is determined to be in a sleep state to when the target is determined to exit the sleep state.

[0043] In this embodiment, as Figure 3As shown, the health monitoring mechanism reuses the millimeter-wave radar from the second sensor, implemented in firmware on the same hardware platform, eliminating the need for additional radar or vital sign sensors. All signal processing is completed on the night light's local main control MCU; the application only receives summarized indicators and alarms, without transmitting raw radar data. The health monitoring mechanism executes during lighting output, with the millimeter-wave radar switching between lighting and monitoring modes. The default lighting mode detects the spatial motion characteristics of the target at a frame rate of 10-20Hz, supporting lighting control. When the target is determined to be asleep based on its motion speed characteristics, the system switches from the default lighting mode to monitoring mode. The judgment criteria are: when the micro-motion energy of the target point cloud cluster is below a set threshold and the duration reaches a set duration (60 seconds), the system switches to monitoring mode. Conversely, if the micro-motion energy of the target point cloud cluster is detected to be above the set threshold in monitoring mode, the system switches back to lighting mode.

[0044] In monitoring mode, a distance range is generated based on the distances of all scattering points in the target point cloud cluster, and the echo signal within this distance range is locked. In this embodiment, the minimum and maximum distances of each scattering point in the target point cloud cluster are taken, or a distance range is generated with the centroid distance of the target point cloud cluster as the center and a set width as the radius, covering the distance interval where the target thorax is located. Continuous phase sampling is performed on the echo signal within the distance range, and the phase angle of the obtained complex sample values ​​is taken to obtain a phase sequence. Since the phase angle has ±π jumps, the phase sequence is unwrapped to obtain a phase unwrapped phase sequence, which is then bandpass filtered at 0.2-1.5Hz to obtain the respiratory frequency band signal. Peak detection is performed on the respiratory frequency band signal to estimate the respiratory cycle, and the respiratory cycle is converted within a sliding window of a set length to obtain the respiratory rate. The sliding window is set to 30s.

[0045] Based on movement trajectory characteristics, activity levels and nighttime urination frequency are statistically analyzed. The respiratory rate, activity levels, and nighttime urination frequency are summarized for all collection cycles within a single nighttime statistical period, yielding the respiratory rate index, activity level index, and nighttime urination frequency index for that single nighttime statistical period. The single nighttime statistical period is from 20:00 to 8:00 the following day. The number of nighttime urinations is defined as leaving the sleep area and remaining there for more than 2 minutes; this is counted each night. The sleep area is a 1.5m radius region centered on the user's designated sleeping area during user profile creation.

[0046] The respiratory rate, activity level, and frequency of nighttime urination for each nighttime statistical period are compared with the corresponding individual baselines to calculate the deviations in these metrics, thus providing health warnings for the target population. All individual baselines are initially constructed based on the corresponding metrics from the most recent seven nighttime statistical periods and are dynamically adjusted as the target population ages and the seasons change. The deviation is calculated as: (metric - individual baseline) / individual baseline.

[0047] A tiered early warning system is used for health alerts, as detailed below: When the absolute value of any deviation in respiratory rate deviation, activity level deviation, or nighttime urination frequency deviation exceeds the first deviation threshold, a Level 1 health warning is issued: a mark is made on the application, and the first deviation threshold is 30%. When the absolute value of any deviation in respiratory rate deviation, activity level deviation, or nighttime urination frequency deviation exceeds the second deviation threshold for two consecutive nighttime statistical periods, a Level 2 health warning is issued: an abnormality alert is proactively pushed, and the second deviation threshold is 50%, and a trend chart of the most recent 30 nighttime statistical periods is provided. When the amplitude of the respiratory frequency band signal during sleep is consistently lower than the background noise and the duration exceeds the set duration, it is determined to be a sleep apnea event, and an immediate health warning is issued: a strong reminder is pushed, and the red LED module is controlled to gradually brighten to the lighting level. The sleep period is the time period from when the target is in a sleep state to when the target exits a sleep state.

[0048] In addition, in this embodiment, for scenarios such as coexistence of humans and pets and multiple pets, corresponding individual baselines can be established and bound separately, and the corresponding individual baselines can be matched according to the thermal radiation area characteristics and spatial movement characteristics.

[0049] S2. Obtain the target state identification result for each acquisition cycle based on the weighted fusion result for each acquisition cycle. The target state identification result includes human state, pet state, and idle state. At this point, step S2, which involves obtaining the target state recognition result for each acquisition cycle based on the weighted fusion result, includes: S21. Sequentially determine whether the weighted fusion result corresponding to each acquisition cycle is higher than the first state threshold. If it is higher than the first state threshold, generate the target state recognition result for the human state. If it is lower than the first state threshold, determine whether it is higher than the second state threshold. If it is, generate the target state recognition result for the pet state. If it is lower than the second state threshold, generate the target state recognition result for the idle state.

[0050] In this embodiment, for the weighted fusion result corresponding to each acquisition cycle, if it is higher than the first state threshold, a target state recognition result for human state is generated. The first state threshold is 0.65. Conversely, if it is higher than the second state threshold, a target state recognition result for pet state is generated. The second state threshold is 0. If it is lower than the second state threshold, a target state recognition result for spatial state is generated.

[0051] S3. Perform a consistency check on the target state identification results for N consecutive acquisition cycles. If the consistency check passes, trigger lighting switching. By acquiring the lighting parameter group corresponding to the target state identification results that have passed the consistency check, drive the red LED module to output lighting according to the lighting parameter group. During the lighting output, continuously acquire and update the target state identification results according to the acquisition cycle, and update the lighting parameter group according to the updated target state identification results, so as to drive the red LED module to realize closed-loop switching control of lighting.

[0052] In this embodiment, as Figure 2 As shown, a consistency check is performed on the target state identification results for N consecutive acquisition cycles, where N is 5. If the target state identification results are consistent for 5 consecutive acquisition cycles, the consistency check passes, triggering illumination switching; otherwise, illumination switching is not triggered. N can be adjusted according to actual conditions. This embodiment also provides an alternative scheme: triggering illumination switching through hysteresis confirmation. Hysteresis confirmation refers to pre-setting different entry and exit thresholds to form a hysteresis band at the judgment boundary of the target state identification results, thereby suppressing repeated jumps in the target state identification results. When the confidence level corresponding to the target state identification result (i.e., the weighted fusion result) is higher than the entry threshold, the corresponding target state identification result is entered; when the confidence level corresponding to the target state identification result (i.e., the confidence level corresponding to the weighted fusion result) is lower than the exit threshold, the target state identification result is exited. A hysteresis band is constructed between the entry and exit thresholds. Within the hysteresis band, the illumination state remains unchanged, and illumination switching is not triggered. In addition, the following methods can be used to achieve delayed confirmation: time delay delay: after the target state recognition result changes, the switching is triggered after a set time; locked state delay: when continuous misjudgment or high-frequency flip is detected, the target state recognition result is prohibited from switching, and the locked state is exited after the situation stabilizes; scoring and voting delay: the target state recognition results are scored or voted on multiple times, and the lighting switching is triggered only after the score exceeds a set ratio.

[0053] When lighting switching is triggered, the system acquires the lighting parameter set corresponding to the target state identification result that has passed the consistency check. Lighting parameter sets matching different target state identification results are pre-stored. The red LED module is driven to output lighting according to the lighting parameter set. During lighting output, the target state identification result is continuously acquired and updated according to the acquisition cycle, and the lighting parameter set is updated based on the updated target state identification result to drive the red LED module to achieve closed-loop switching control of the lighting. The red LED module includes an amber light channel and a red light channel. The peak wavelength of the amber light channel is 590nm, and the peak wavelength of the red light channel is 625nm. Both channels are direct-emitting LEDs, without phosphors, and each has an independent constant current drive branch. The rated operating current is 350mA per channel, which can be adjusted according to power requirements. The current ratio of the amber light channel to the red light channel differs between nighttime and daytime modes. In daytime mode, the ratio is 2.5:1, and the total power does not exceed 30% of the rated power. In nighttime mode, the ratio varies depending on the target state identification result, as detailed in the following steps. The lighting parameter group includes spectral parameters, illuminance levels, and dimming drive parameters.

[0054] At this point, the lighting parameter set mentioned in step S3 includes spectral parameters, illuminance level, and dimming drive parameters. The lighting parameter set corresponding to the target state recognition result that has passed the consistency detection includes: S30. When the target state identification result of the consistency detection is human state, the spectral parameters are as follows: the amber light channel and the red light channel of the red light LED module are activated simultaneously, and the current ratio of the amber light channel and the red light channel is a preset first ratio, the light power ratio of the red light channel is a preset first ratio, the peak wavelength of the composite light emitted by the amber light channel and the red light channel is not lower than a preset first wavelength threshold, and the proportion of short-wavelength components is not greater than a preset first proportion threshold. S31. The illuminance level is a preset first illuminance range. The dimming drive parameters include the relative brightness level corresponding to the illuminance level. When the relative brightness level is not lower than the preset brightness threshold, pure amplitude dimming is used and the output is a flat DC. When the relative brightness level is lower than the preset brightness threshold, a fixed base current is used and a pulse width modulation with a preset frequency and a preset number of bits is superimposed. The duty cycle is generated according to the ratio of the relative brightness level to the preset brightness threshold. S32. When the target state identification result of the consistency detection is a pet state, the spectral parameters are: only the red light channel of the red light LED module is activated, the peak wavelength of the emitted light is not lower than the preset second wavelength threshold, the proportion of short-wavelength components is not greater than the preset second proportion threshold, the second proportion threshold is lower than the first proportion threshold, and the second wavelength threshold is not lower than the first wavelength threshold. S33. The illuminance level is a preset second illuminance range, the upper limit of the second illuminance range is less than the lower limit of the first illuminance range; the dimming drive parameters for the red light channel adopt pure amplitude dimming or pulse width modulation according to the relationship between the relative brightness level and the preset brightness threshold. S34. When the target state identification result of the consistency test is an idle state, the spectral parameter is to only start or turn off the red light channel of the red light LED module with a microcurrent. S35, the illuminance level is a preset third illuminance range, the upper limit of the third illuminance range is less than the lower limit of the second illuminance range; the dimming drive parameter is off or micro-current drive.

[0055] In this embodiment, when the target state identification result of the consistency detection is human state, the spectral parameters are as follows: the amber light channel and the red light channel of the red light LED module are activated simultaneously, and the current ratio of the amber light channel and the red light channel is a preset first ratio, which is 1:6. The light power ratio of the red light channel is a preset first ratio, which is 80-90%. The peak wavelength of the combined emitted light is not lower than a preset first wavelength threshold, which is 610nm. The short-wavelength component ratio is not greater than a preset first ratio threshold, which is 5%. The short-wavelength component ratio refers to the ratio of the spectral power integral of the 380-530nm band to the spectral power integral of the 380-780nm visible band. The reason for choosing 530nm as the dividing point is that the sensitive peak of the canine visual cone is 429nm / 555nm, and the sensitive peak of the cat visual cone is 450nm / 555nm. The wavelength band below 530nm covers the entire short-wavelength sensitive peak of 429nm / 450nm and the short-wavelength flank of the sensitive peak of 555nm, and is the main source of short-wavelength stimulation for cats and dogs. The illuminance level is the preset first illuminance range, which is 3-5 lux. This illuminance range is the illuminance at eye level, and the measurement position is a reference plane 1.5m directly in front of the luminaire reference point and 0.75m above the ground. The dimming drive parameters include the relative brightness level corresponding to the illuminance level. The illuminance level is the target value of optical output, and the relative brightness level is the relative output ratio at the drive level. When the relative brightness level is not lower than the preset brightness threshold, pure amplitude dimming is used, and the output is a flat DC. When the relative brightness level is lower than the preset brightness threshold, a fixed base current is used, superimposed with a pulse width modulation at a preset frequency and a preset number of bits. The duty cycle is generated according to the ratio of the relative brightness level to the preset brightness threshold. In this case, the preset brightness threshold is 20%, the preset frequency is 25kHz, the preset number of bits is 12, and the relative brightness levels include: 100%, 50%, 20%, 10%, 5%, and 1%.

[0056] When the target state identification result that passes the consistency test is a pet state, the spectral parameters are set to activate only the red light channel of the red LED module. The peak wavelength of the emitted light is not lower than the preset second wavelength threshold, which is 625nm. The proportion of short-wavelength components is not greater than the preset second proportion threshold, which is 1% lower than the first proportion threshold. The reason for using only 625nm red light in the pet state is that cat and dog cone cells are not sensitive to the 625nm band, which is much higher than the short-wavelength sensitive peaks of 429nm / 450nm and 555nm, thus eliminating blue light stimulation at the source. At the same time, 625nm red light has little dark vision stimulation to cats and dogs and is less likely to interfere with their sleep rhythm.

[0057] The illuminance level is the preset second illuminance range. In this range, the upper limit of the preset second illuminance range is less than the lower limit of the first illuminance range, i.e., no greater than 1-2 lux. The illuminance measurement location is the ground 0.5m directly in front of the reference point. For the red light channel, the dimming drive parameters use pure amplitude dimming or pulse width modulation based on the relationship between the relative brightness level and the preset brightness threshold. Since only the red light channel works in pet mode, its dimming drive parameters are the same as the dimming strategy in S31: pure amplitude dimming is used when the relative brightness level is ≥20%; when the relative brightness level is <20%, a fixed base current is used, superimposed with pulse width modulation at a preset frequency and a preset number of bits. The duty cycle is generated according to the ratio of the relative brightness level to the preset brightness threshold. In pet mode, a slowly fluctuating breathing light of approximately 0.2Hz can also be selected.

[0058] When the target state identification result of the consistency detection is idle, the spectral parameters are set to start or stop the red light channel of the red LED module with a microcurrent only; the illuminance level is the preset third illuminance range. At this time, the upper limit of the preset third illuminance range is less than the lower limit of the second illuminance range, and the value is 0.5 lux. The dimming drive parameter is off or microcurrent drive. In the idle state, the main control MCU enters the intermittent wake-up mode, the millimeter-wave radar maintains low frame rate presence detection, and the standby power consumption of the whole machine is ≤0.5W.

[0059] In this embodiment, a circadian rhythm model is also provided for prior modulation, and the specific steps are as follows: Obtain the daily activity rhythm model of the target, divide the future time period into high activity prediction zones and low activity prediction zones according to the daily activity rhythm model, and generate corresponding activity scheduling strategies. When the acquisition period falls into the high activity prediction zone or the low activity prediction zone, the corresponding activity scheduling strategy is activated to perform prior modulation on the working parameters of the recognition process corresponding to the target state recognition result. The activity scheduling strategy corresponding to the high activity prediction zone is to increase the sensing sensitivity of the working parameters and make the red LED module enter the illumination standby in advance. The activity scheduling strategy corresponding to the low activity prediction zone is to reduce the sensing sensitivity and sensing frame rate of the working parameters and lock the low light level of the red LED module. The activity level of the target is obtained based on the motion trajectory features in the spatial motion features. When the acquisition period falls into the high activity prediction zone and the target state identification result is idle or pet state, if the activity level is lower than the activity level threshold, it is determined that the high activity prediction zone conflicts with the target state identification result. When the acquisition period falls into the low activity prediction zone and the target state identification result is pet state, if the activity level exceeds the activity level threshold, it is determined that the low activity prediction zone conflicts with the target state identification result. The number of conflicts between the high-activity prediction zone and the low-activity prediction zone is counted separately. When the number of conflicts exceeds the conflict threshold within a preset conflict period, the corresponding activity scheduling strategy is turned off, and a callback is triggered to revert the working parameters to the default state.

[0060] The spatial motion characteristics of all collection cycles within the daily statistical period are summarized to obtain the daily activity data of the target; The daily activity data is divided into time bins according to a preset time period to obtain Q time bins. The corresponding activity probability is calculated based on the daily activity data in each time bin. An activity probability observation histogram is generated based on the activity probabilities of the Q time bins. The deviation between the activity probability observation histogram and the daily activity rhythm model is calculated. When the deviation exceeds a set proportion within a set number of consecutive days, it is determined that the activity rhythm of the target has shifted, and the daily activity rhythm model is reconstructed to obtain a new daily activity rhythm model.

[0061] In this embodiment, as Figure 4 As shown, a daily activity rhythm model is provided for predictive scheduling during lighting output. The daily activity rhythm model is established by long-term statistical analysis of the activity patterns of the target and generates the activity scheduling strategy for the next day at a fixed time each day. The working parameters of the target state identification process are modulated in advance to achieve pre-emptive standby during active periods and desensitization and energy saving during deep sleep periods. Moreover, the in-between modulation does not change the final decision-making power of the target state identification results on lighting switching.

[0062] Based on the daily activity rhythm model, future time periods are divided into high-activity prediction zones and low-activity prediction zones, and corresponding activity scheduling strategies are generated. When the acquisition cycle falls within a high-activity prediction zone or a low-activity prediction zone, the corresponding activity scheduling strategy is activated to perform prior modulation on the working parameters of the recognition process corresponding to the target state recognition result. The activity scheduling strategy corresponding to the high-activity prediction zone is to increase the sensing sensitivity of the working parameters and put the red LED module into illumination standby mode in advance. The activity scheduling strategy corresponding to the low-activity prediction zone is to reduce the sensing sensitivity and sensing frame rate of the working parameters and lock the low-light level of the red LED module.

[0063] The activity level of the target is obtained based on the motion trajectory features in the spatial motion characteristics. When the acquisition period falls within the high activity prediction zone, and the target state identification result is idle or pet state, if the activity level is lower than the activity level threshold, it is determined that there is a conflict between the high activity prediction zone and the target state identification result. When the acquisition period falls within the low activity prediction zone, and the target state identification result is pet state, if the activity level exceeds the activity level threshold, it is determined that there is a conflict between the low activity prediction zone and the target state identification result. The number of conflicts in different activity prediction zones is counted separately. When the number of conflicts exceeds the conflict threshold within the preset conflict period, the corresponding activity scheduling strategy is turned off, and a callback is triggered to revert the working parameters to the default state. The preset conflict period is 2 days, and the conflict threshold is 2 times.

[0064] The spatial motion characteristics of all collection cycles within a daily statistical period are summarized to obtain the daily activity data of the target. A daily statistical period is either a calendar day or a scheduling day. The daily activity data is then divided into Q time bins according to a preset time period of 15 minutes. The corresponding activity probability is calculated based on the daily activity data within each time bin: the percentage of the target in an active state. The activity state is determined by whether the motion speed characteristic exceeds a resting threshold. If the deviation between the activity probability observation histogram and the daily activity rhythm model exceeds a set proportion within a consecutive set number of days, it is determined that the target's activity rhythm has migrated, triggering the reconstruction of the daily activity rhythm model. In this case, the preset number of days is 3 days, and the set proportion is 25%.

[0065] Example 2 Please refer to Figure 5 The present invention provides a closed-loop control device 1 for a red light flashless night light based on human-pet recognition, including a memory 3, a processor 2, and a computer program stored in the memory 3 and run on the processor 2. When the processor 2 executes the computer program, it implements the steps in Embodiment 1.

[0066] Example 3 The present invention also provides a computer-readable storage medium storing a computer program, which, when executed, performs the steps in Embodiment 1 above.

[0067] Since the system / device described in the above embodiments of the present invention is a system / device used to implement the method of the above embodiments of the present invention, those skilled in the art can understand the specific structure and modifications of the system / device based on the method described in the above embodiments of the present invention, and therefore will not be repeated here. Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims

1. A closed-loop control method for nightlights based on human-pet recognition, characterized in that, include: In each acquisition cycle, the thermal radiation area features of the target within the detection area are obtained through the first sensor, and the spatial motion features of the target within the detection area are obtained through the second sensor. The thermal radiation area features and the spatial motion features are mapped to sub-confidences attributable to humans through a feature mapping table and then weighted and fused to obtain the weighted fusion result corresponding to each acquisition cycle. The target state identification result for each acquisition cycle is obtained based on the weighted fusion result for each acquisition cycle. The target state identification result includes human state, pet state, and idle state. A consistency check is performed on the target state identification results for N consecutive acquisition cycles. If the consistency check passes, lighting switching is triggered. By acquiring the lighting parameter group corresponding to the target state identification results that have passed the consistency check, the red LED module is driven to output lighting according to the lighting parameter group. During the lighting output, the target state identification results are continuously acquired and updated according to the acquisition cycle, and the lighting parameter group is updated according to the updated target state identification results to drive the red LED module to realize closed-loop switching control of lighting.

2. The closed-loop control method for nightlights based on human-pet recognition as described in claim 1, characterized in that, The first sensor is a quaternary pyroelectric infrared sensor, and the acquisition of the thermal radiation area characteristics of the target within the detection area by the first sensor in each acquisition cycle includes: The detection area is pre-divided into M detection zones using a quaternary pyroelectric infrared sensor and a Fresnel lens array, and each detection zone is assigned a corresponding zone identifier. The calibration distance and field of view coverage area of ​​each detection zone are the same. In each acquisition cycle, the detection zones triggered by the target within the detection area are detected by a quaternary pyroelectric infrared sensor, all triggered detection zones are obtained, and the zone identifier and pulse amplitude of each triggered detection zone are acquired. The number of different triggered detection partitions within L consecutive acquisition cycles is counted based on the partition identifier to obtain the total number of triggered detection partitions. At the same time, the pulse amplitude of the same triggered detection partition within L consecutive acquisition cycles is processed by moving average to obtain the average pulse amplitude of each triggered detection partition. The detection distance of the target within the detection area is obtained by the second sensor. The thermal radiation area value is calculated based on the detection distance, the total number of triggered detection zones, the calibration distance, and the field of view coverage area. The thermal radiation area value is then corrected for temperature compensation using the average pulse amplitude to obtain the thermal radiation area characteristics.

3. The closed-loop control method for nightlights based on human-pet recognition as described in claim 1, characterized in that, The second sensor is a millimeter-wave radar. The spatial motion characteristics include ground altitude characteristics, motion speed characteristics, micro-Doppler gait characteristics, and ground contact characteristics. Simultaneously acquiring the spatial motion characteristics of targets within the detection area through the second sensor includes: Simultaneously, the millimeter-wave radar transmits frequency-modulated continuous wave signals to the detection area and receives echo signals. The echo signals are subjected to two-dimensional Fourier transforms in the range dimension and Doppler dimension to obtain a two-dimensional energy map. Constant false alarm rate detection is performed on the two-dimensional energy map to obtain all scattering points and the range, radial velocity, azimuth angle and elevation angle of each scattering point. Density clustering is performed on all scattering points within the same acquisition cycle to obtain target point cloud clusters. Trajectory association is performed on target point cloud clusters in adjacent acquisition cycles to obtain the motion trajectory and trajectory position sequence of the target point cloud clusters. Based on the elevation angle and distance of all scattering points in the target point cloud cluster, the ground clearance of each scattering point is calculated. Based on the ground clearance of each scattering point, the ground clearance of the highest point of the target point cloud cluster is obtained. The ground clearance of the highest point is superimposed with the preset radar installation height to obtain the ground clearance characteristics of the target. The target's motion velocity characteristics are calculated based on the radial velocities of all scattering points in the target point cloud cluster. Micro-Doppler analysis is performed on the echo signals of the target point cloud cluster's motion trajectory within a set time window to obtain the micro-Doppler spectrum. The gait dominant frequency is extracted from the micro-Doppler spectrum to obtain the target's micro-Doppler gait characteristics. The target's motion trajectory characteristics are obtained based on the trajectory position sequence. The trajectory height variance is calculated based on the height distribution of the target point cloud cluster over P acquisition cycles in the trajectory position sequence to obtain the target's ground contact characteristics.

4. The closed-loop control method for nightlights based on human-pet recognition as described in claim 3, characterized in that, Also includes: Based on the movement speed characteristics, it is determined whether the target is in a sleep state. If the target is in a sleep state, the millimeter-wave radar is switched from the default illumination mode to the monitoring mode. In the monitoring mode, a distance range is generated based on the distances of all scattering points in the target point cloud cluster, and the echo signal within the distance range is continuously phase-sampled to obtain complex sample values; The phase angle of the complex sampled values ​​is taken to obtain a phase sequence. The phase sequence is unwrapped to obtain a phase sequence after phase unwrapping. The phase sequence after phase unwrapping is bandpass filtered to obtain a breathing frequency band signal. Peak detection is performed on the respiratory frequency band signal to estimate the respiratory cycle, and the respiratory cycle is converted within a sliding window of a set length to obtain the respiratory rate; Based on the movement trajectory characteristics, the activity level and the number of times one gets up at night are counted. The respiratory rate, activity level and the number of times one gets up at night are summarized for all collection cycles within a single nighttime statistical period to obtain the respiratory rate index, activity level index and the number of times one gets up at night index for a single nighttime statistical period. The individual baselines for respiratory rate, activity level, and number of nighttime urinations of the target are obtained. The respiratory rate, activity level, and number of nighttime urinations of a single nighttime statistical period are compared with the corresponding individual baselines for respiratory rate, activity level, and number of nighttime urinations, respectively, to calculate the deviations for respiratory rate, activity level, and number of nighttime urinations. Health warnings are then issued to the target based on these deviations.

5. The closed-loop control method for nightlights based on human-pet recognition as described in claim 4, characterized in that, The method of providing a health warning to the target based on the deviation of the respiratory rate, the deviation of the activity level, and the deviation of the number of times the target urinates at night includes: When the absolute value of any one of the deviations—the respiratory rate deviation, the activity level deviation, or the number of times one gets up at night—exceeds the first deviation threshold, a Level 1 health warning is output. When the absolute value of any of the deviations of the respiratory rate deviation, the activity level deviation, or the number of times the person gets up at night exceeds the second deviation threshold for two consecutive nightly statistical periods, a level two health warning is output, wherein the second deviation threshold is greater than the first deviation threshold. When the amplitude of the respiratory frequency band signal during the sleep period is consistently lower than the background noise and the duration exceeds the set duration, it is determined to be a sleep apnea event, an immediate health warning is output, and the red LED module is controlled to gradually brighten to the lighting level. The sleep period is the time period from when the target is determined to be in a sleep state to when the target is determined to exit the sleep state.

6. The closed-loop control method for nightlights based on human-pet recognition as described in claim 1, characterized in that, The step of obtaining the target state recognition result for each acquisition cycle based on the weighted fusion result for each acquisition cycle includes: The system sequentially determines whether the weighted fusion result corresponding to each acquisition cycle is higher than the first state threshold. If it is higher than the first state threshold, the system generates the target state recognition result for the human state. If it is lower than the first state threshold, the system determines whether it is higher than the second state threshold. If it is, the system generates the target state recognition result for the pet state. If it is lower than the second state threshold, the system generates the target state recognition result for the idle state.

7. The closed-loop control method for nightlights based on human-pet recognition as described in claim 1, characterized in that, The lighting parameter set includes spectral parameters, illuminance levels, and dimming drive parameters. The lighting parameter set corresponding to the target state recognition result obtained by the consistency detection includes: When the target state identification result of the consistency detection is human state, the spectral parameters are as follows: the amber light channel and the red light channel of the red light LED module are activated simultaneously, and the current ratio of the amber light channel and the red light channel is a preset first ratio, the light power ratio of the red light channel is a preset first ratio, the peak wavelength of the composite light emitted by the amber light channel and the red light channel is not lower than a preset first wavelength threshold, and the proportion of short-wavelength components is not greater than a preset first proportion threshold. The illuminance level is a preset first illuminance range. The dimming drive parameters include the relative brightness level corresponding to the illuminance level. When the relative brightness level is not lower than the preset brightness threshold, pure amplitude dimming is used and the output is a flat DC. When the relative brightness level is lower than the preset brightness threshold, a fixed base current is used and a pulse width modulation with a preset frequency and a preset number of bits is superimposed. The duty cycle is generated according to the ratio of the relative brightness level to the preset brightness threshold. When the target state identification result of the consistency detection is a pet state, the spectral parameters are: only the red light channel of the red light LED module is activated, the peak wavelength of the emitted light is not lower than the preset second wavelength threshold, the proportion of short-wavelength components is not greater than the preset second proportion threshold, the second proportion threshold is lower than the first proportion threshold, and the second wavelength threshold is not lower than the first wavelength threshold. The illuminance level is a preset second illuminance range, the upper limit of the second illuminance range is less than the lower limit of the first illuminance range; the dimming drive parameters for the red light channel adopt pure amplitude dimming or pulse width modulation according to the relationship between the relative brightness level and the preset brightness threshold. When the target state identification result of the consistency test is an idle state, the spectral parameter is to only start or turn off the red light channel of the red light LED module with a microcurrent. The illuminance level is a preset third illuminance range, the upper limit of which is less than the lower limit of the second illuminance range; the dimming drive parameter is either off or microcurrent drive.

8. The closed-loop control method for nightlights based on human-pet recognition as described in claim 1, characterized in that, Also includes: Obtain the daily activity rhythm model of the target, divide the future time period into high activity prediction zones and low activity prediction zones according to the daily activity rhythm model, and generate corresponding activity scheduling strategies. When the acquisition period falls into the high activity prediction zone or the low activity prediction zone, the corresponding activity scheduling strategy is activated to perform prior modulation on the working parameters of the recognition process corresponding to the target state recognition result. The activity scheduling strategy corresponding to the high activity prediction zone is to increase the sensing sensitivity of the working parameters and make the red LED module enter the illumination standby in advance. The activity scheduling strategy corresponding to the low activity prediction zone is to reduce the sensing sensitivity and sensing frame rate of the working parameters and lock the low light level of the red LED module. The activity level of the target is obtained based on the motion trajectory features in the spatial motion features. When the acquisition period falls into the high activity prediction zone and the target state identification result is idle or pet state, if the activity level is lower than the activity level threshold, it is determined that the high activity prediction zone conflicts with the target state identification result. When the acquisition period falls into the low activity prediction zone and the target state identification result is pet state, if the activity level exceeds the activity level threshold, it is determined that the low activity prediction zone conflicts with the target state identification result. The number of conflicts between the high-activity prediction zone and the low-activity prediction zone is counted separately. When the number of conflicts exceeds the conflict threshold within a preset conflict period, the corresponding activity scheduling strategy is turned off, and a callback is triggered to revert the working parameters to the default state.

9. The closed-loop control method for nightlights based on human-pet recognition as described in claim 8, characterized in that, Also includes: The spatial motion characteristics of all collection cycles within the daily statistical period are summarized to obtain the daily activity data of the target; The daily activity data is divided into time bins according to a preset time period to obtain Q time bins. The corresponding activity probability is calculated based on the daily activity data in each time bin. An activity probability observation histogram is generated based on the activity probabilities of the Q time bins. The deviation between the activity probability observation histogram and the daily activity rhythm model is calculated. When the deviation exceeds a set proportion within a set number of consecutive days, it is determined that the activity rhythm of the target has shifted, and the daily activity rhythm model is reconstructed to obtain a new daily activity rhythm model.

10. A closed-loop control device for a night light based on human-pet recognition, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 9.