An infrared device control state verification method, device and equipment based on edge computing

CN122546757APending Publication Date: 2026-08-11XIAMEN INTRETECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-07
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0003]有鉴于此,本发明的目的在于提出一种基于边缘计算的红外设备控制状态验证方法、装置以及设备,旨在解决现有红外遥控智能家居系统中因缺乏闭环反馈而导致的设备状态不同步,以及依赖云端计算存在延迟高与隐私泄露等问题

Benefits of technology

以上方案,通过在智能网关侧集成边缘计算能力,并协同家庭总线的电力监测数据,构建了一套本地化、非侵入式的状态验证闭环。其从根本上将红外控制从“开环”升级为“闭环”,通过在本地实时分析控制指令执行后总线上的负载特征变化,验证设备是否成功响应,确保了控制可靠性与状态同步性;该方法仅需在家庭总线入口部署单一的电力监测点,即可覆盖全屋所有的传统红外设备,无需对每个设备进行硬件改造或加装智能插座,显著降低了硬件成本与部署复杂度;所有涉及用户隐私的原始用电数据的分析与计算均在本地网关完成,仅将最终的状态结果上报,在保证低延迟响应的同时,极大程度地保护了用户家庭用电行为的隐私安全。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122546757A_ABST
    Figure CN122546757A_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, and device for verifying the control status of infrared devices based on edge computing. The method includes: receiving a control command for a target infrared device; transmitting a corresponding infrared control signal according to the control command; and opening a preset monitoring time window after transmission. Within the monitoring time window, real-time power data stream of a home bus is acquired through a power monitoring module. Based on the real-time power data stream, a real-time feature vector characterizing device load changes is calculated. The load change status of the target infrared device is determined based on the real-time feature vector and pre-constructed reference information corresponding to the target infrared device. An execution status verification result of the control command is generated based on the load change status. Through local edge computing and single-point bus power monitoring, a low-cost, low-latency, and highly privacy-protected closed-loop verification of the infrared control status is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart home control technology, and in particular to a method, apparatus, and device for verifying the control status of infrared devices based on edge computing. Background Technology

[0002] With the popularization of smart homes, many traditional home appliances (such as air conditioners, televisions, and fans) still use infrared remote control. Smart home systems typically rely on infrared repeaters to remotely control these devices. However, the inherent unidirectional transmission characteristic of infrared communication results in an "open-loop control" state: after the gateway issues a command, it cannot confirm whether the device has actually received and executed it, for example, due to obstruction, misalignment, or signal interference, leading to control failure. This uncertainty can cause discrepancies between the user's displayed status and the actual device status, resulting in inconvenience or even safety hazards (such as high-power heating equipment failing to turn off). To solve these status feedback problems, existing technologies attempt to equip each infrared device with a smart socket with power consumption statistics, or replace all home appliances with smart devices that support two-way communication. However, such solutions are costly in hardware and complex to modify, making them unsuitable for existing older appliances. Furthermore, some non-intrusive load monitoring technologies rely on cloud servers to analyze massive amounts of household power data, which not only consumes network bandwidth and introduces transmission delays but also poses the risk of user electricity privacy leaks. Summary of the Invention

[0003] In view of this, the purpose of this invention is to propose an infrared device control status verification method, apparatus and device based on edge computing, which aims to solve the problems of asynchronous device status caused by the lack of closed-loop feedback in existing infrared remote control smart home systems, as well as the high latency and privacy leakage caused by relying on cloud computing.

[0004] To achieve the above objectives, the present invention provides an infrared device control status verification method based on edge computing. The method is applied to a smart gateway, which is communicatively connected to a power monitoring module installed at a home bus. The method includes: Receive control commands for the target infrared device, transmit corresponding infrared control signals according to the control commands, and open a preset monitoring time window after transmission; Within the monitoring time window, the real-time power data stream of the home bus is acquired through the power monitoring module; Calculations are performed based on the real-time power data stream to obtain a real-time feature vector characterizing the changes in equipment load; The load change state of the target infrared device is determined based on the real-time feature vector and the reference information pre-built for the target infrared device, and the execution status verification result of the control command is generated based on the load change state.

[0005] Preferably, the reference information includes a reference feature vector and the rated power of the target infrared device, wherein the process of constructing the reference feature vector includes: When the target infrared device is turned on or off individually, the discrete voltage sequence and discrete current sequence are captured within a preset time period before and after the execution of the control command. Using a single AC cycle as the step size, the effective value of voltage is calculated based on the discrete voltage sequence, the effective value of current is calculated based on the discrete current sequence, and the active power and reactive power are calculated based on the effective voltage and effective current values. Calculate the average active power and average reactive power within a preset time before the control command is transmitted, and calculate the average active power and average reactive power when the power stabilizes after the control command is transmitted, and determine the power stabilization time. The change in active power is calculated based on the difference between the average active power before and after launch, and the change in reactive power is calculated based on the difference between the average reactive power before and after launch. The change in active power, the change in reactive power, and the power stabilization time are used as the reference feature vector.

[0006] Preferably, the process of constructing the reference feature vector further includes anti-interference processing, wherein the anti-interference processing includes: Repeat the on / off operation of the same target infrared device multiple times, and collect multiple sets of corresponding candidate reference feature vectors respectively; If the variance among multiple sets of candidate reference feature vectors exceeds the preset tolerance range, it is determined that there is background interference in the current learning process, and the currently learned data is discarded.

[0007] Preferably, the step of determining the load change state of the target infrared device based on the real-time feature vector and the pre-constructed reference information corresponding to the target infrared device, and generating the execution state verification result of the control command based on the load change state, includes: When the control command is an enable command, calculate the Euclidean distance between the real-time feature vector and the reference feature vector in the reference information; If the Euclidean distance is less than the distance threshold, the load change state is determined to be successfully started, and the successful start is taken as the execution state verification result.

[0008] Preferably, the step of determining the load change state of the target infrared device based on the real-time feature vector and the pre-constructed reference information corresponding to the target infrared device, and generating the execution state verification result of the control command based on the load change state, includes: When the control command is a shutdown command, based on the real-time feature vector and the rated power of the target infrared device in the reference information, it is determined whether the change in active power in the real-time feature vector satisfies the preset negative step condition. If satisfied, the load change state is determined to be a successful shutdown, and the successful shutdown is taken as the execution state verification result; wherein, the negative step condition includes the absolute value of the difference between the change in active power and the negative value of the rated power being less than the tolerance threshold.

[0009] Preferably, after calculating the real-time feature vector characterizing the equipment load change based on the real-time power data stream, the method further includes: Determine whether there is strong interference within the monitoring time window. If so, generate an execution status verification result indicating an uncertain state and trigger a retest verification process.

[0010] Preferably, determining whether strong interference exists within the monitoring time window includes: The system analyzes whether there are irrelevant power fluctuations in the real-time power data stream within the monitoring time window. If so, it determines that there is strong interference. The existence of irrelevant power fluctuations includes situations where the total power change of the acquired real-time power data stream within the monitoring time window exceeds a preset multiple of the rated power of the target infrared device.

[0011] Preferably, the triggering retest verification process includes: By employing a truncated binary exponential backoff algorithm to delay for a random time, the infrared control signal corresponding to the control command is automatically retransmitted, and a monitoring time window is opened to re-execute the verification process. After a preset number of retries, if the generated execution status verification result indicates an uncertain state, an unknown execution result status code is reported to the cloud and the user terminal.

[0012] To achieve the above objectives, the present invention also provides an infrared device control status verification device based on edge computing. The device is applied to a smart gateway, which is communicatively connected to a power monitoring module installed at a home bus. The device includes: The transmitting unit is used to receive control commands for the target infrared device, transmit corresponding infrared control signals according to the control commands, and open a preset monitoring time window after transmission; The acquisition unit is used to acquire the real-time power data stream of the home bus through the power monitoring module within the monitoring time window; The calculation unit is used to perform calculations based on the real-time power data stream to obtain a real-time feature vector characterizing the changes in equipment load; The verification unit is used to determine the load change state of the target infrared device based on the real-time feature vector and the reference information pre-built for the target infrared device, and to generate the execution state verification result of the control command based on the load change state.

[0013] To achieve the above objectives, the present invention also proposes an infrared device control status verification device based on edge computing, comprising a processor, a memory, and a computer program stored in the memory, wherein the computer program is executed by the processor to implement the steps of an infrared device control status verification method based on edge computing as described in the above embodiments.

[0014] To achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a computer program that is executed by a processor to implement the steps of an edge computing-based infrared device control status verification method as described in the above embodiments.

[0015] Beneficial effects: The above solution integrates edge computing capabilities on the smart gateway side and coordinates with power monitoring data from the home bus to construct a localized, non-intrusive closed-loop status verification system. It fundamentally upgrades infrared control from an "open-loop" to a "closed-loop" system. By analyzing load characteristic changes on the bus after control commands are executed locally in real time, it verifies whether the device has responded successfully, ensuring control reliability and status synchronization. This method only requires deploying a single power monitoring point at the home bus entry point to cover all traditional infrared devices in the house, eliminating the need for hardware modifications or smart sockets for each device, significantly reducing hardware costs and deployment complexity. All analysis and calculation of raw power consumption data involving user privacy are completed locally at the gateway, with only the final status results reported. This ensures low-latency response while greatly protecting the privacy and security of users' household electricity consumption behavior.

[0016] By extracting discrete voltage and current sequences before and after control commands, and calculating effective values ​​and active / reactive power in single-cycle AC steps, the system extracts the steady-state mean difference (active and reactive power changes) and power stabilization time before and after transmission to construct a multi-dimensional and comprehensive reference feature vector. This avoids instantaneous surge interference and improves the accuracy and robustness of feature representation. In particular, the introduction of reactive power changes effectively distinguishes resistive loads (such as electric kettles) from inductive loads (such as air conditioner compressors), providing a crucial basis for accurately identifying specific devices in complex electrical environments. By adding anti-interference processing, the system effectively identifies and eliminates background interference caused by the occasional start-up and shutdown of other appliances during the learning phase, ensuring that the device feature vectors stored in the database are pure and stable. This lays a solid foundation for high accuracy in subsequent real-time verification and improves the robustness and reliability of the entire system in real-world home environments.

[0017] For the two most fundamental control commands, on and off, an optimized verification strategy is provided, thereby improving accuracy and efficiency within a general verification framework. For the on command, similarity matching is performed by calculating the Euclidean distance between the real-time feature vector and the pre-stored reference feature vector. This overall similarity judgment based on multi-dimensional feature vectors has stronger fault tolerance than single threshold judgment, and can adapt to minor feature drift caused by voltage fluctuations or slight aging of the device, improving the accuracy and adaptability of on verification. For the off command, the sharp negative step feature generated by the relay disconnecting when the device is turned off is utilized, combined with the pre-stored rated power, to determine whether the decrease in active power meets the preset tolerance condition (absolute value less than the tolerance threshold of rated power). The shutdown verification logic takes advantage of the fact that random automatic shutdowns are rare in homes, resulting in low background noise, high verification accuracy, strong anti-interference ability, and extremely high judgment accuracy. It is particularly suitable for safety-sensitive scenarios such as high-power heating equipment, effectively addressing users' safety anxiety about whether the device is truly turned off.

[0018] After obtaining the real-time feature vector, the system further determines whether strong interference exists within the monitoring time window. If it does, an uncertain state is directly generated and a retest verification process is triggered. This avoids erroneous judgments caused by interference, enabling the system to accurately reflect insufficient confidence in the verification results when faced with complex and unresolved power fluctuations, thus avoiding incorrect feedback and misleading users. The judgment criteria for strong interference are quantified: when the total power change within the window exceeds a preset multiple of the target device's rated power, an unrelated power fluctuation is determined. This signal-to-noise ratio threshold setting is simple, effective, and easy to implement using edge computing. The retest verification process is further defined: a truncated binary exponential backoff algorithm is used to automatically retransmit the infrared signal and re-verify after a random delay. This effectively avoids short-term interference source peaks and improves the success rate of retrying. If the uncertain state persists after a preset number of retries, an unknown execution result status code is reported, preventing user misjudgment caused by forced success or failure feedback. This significantly improves the system's fault tolerance and verification reliability in complex household power environments. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating an infrared device control status verification method based on edge computing, as provided in an embodiment of the present invention.

[0021] Figure 2 This is a structural block diagram of a smart home system provided in an embodiment of the present invention.

[0022] Figure 3 A flowchart of negative step detection and decision process for verifying a shutdown instruction provided in an embodiment of the present invention.

[0023] Figure 4 This is a schematic diagram of an infrared device control status verification device based on edge computing, provided in an embodiment of the present invention.

[0024] The realization of the invention's objective, its functional characteristics, and advantages will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to represent selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] The present invention will be described in detail below with reference to the embodiments.

[0027] Reference Figure 1 The diagram shows a flowchart of an infrared device control status verification method based on edge computing according to an embodiment of the present invention. In this embodiment, the method is based on... Figure 2 The smart home system shown is implemented by deploying it between the local home environment and the cloud service layer. A power monitoring module (such as a smart meter or current transformer) is installed at the home's mains bus to collect high-frequency data on the total voltage and current of the household. This power monitoring module is connected to the smart gateway in real time via Zigbee, Bluetooth mesh, or wired connection, and transmits data via real-time push. The cloud service layer only receives device status feedback results (such as "success," "failure," or "unknown") reported by the smart gateway and does not access any raw power data. At least one infrared device (such as a traditional infrared appliance like an air conditioner, television, or fan) receives and responds to infrared control signals from the smart gateway.

[0028] In the aforementioned system, this method is applied to a smart gateway that is communicatively connected to a power monitoring module installed on a home bus. The smart gateway includes: a communication module for receiving control commands for a target infrared device; an infrared transmitting module for transmitting corresponding infrared control signals according to the control commands; a power data interface for obtaining real-time power data streams from the power monitoring module connected to the home bus; and a memory for storing pre-built reference information (including reference feature vectors and rated power) for the corresponding target infrared device. Furthermore, the smart gateway also has a built-in edge computing unit configured with a load feature extraction engine and state decision logic.

[0029] Specifically, the method includes: S11, receive control instructions for the target infrared device, transmit corresponding infrared control signals according to the control instructions, and open a preset monitoring time window after transmission.

[0030] In this embodiment, the smart gateway continuously monitors control commands from user terminals (such as mobile apps) or cloud platforms via a communication module. Upon receiving an "on" control command for a target infrared device (such as a fixed-frequency air conditioner), the smart gateway first retrieves the corresponding infrared code library from its local database based on the device identifier and operation type carried in the command. The infrared transmitting module then modulates and generates the corresponding infrared control signal, which is transmitted into space via an infrared transmitter. At the moment of transmission completion, denoted as time T0, the smart gateway immediately initiates a preset monitoring time window. The duration Δt of this window can be preset according to the device's response characteristics, for example, set to 3 to 5 seconds, to ensure complete capture of changes in home bus power parameters that may be caused by the target device executing the command. In a preferred implementation, the smart gateway also temporarily stores power data for a period before and after the window's start time T0 in memory, for example, capturing discrete voltage and current sequences from [T0-2s, T0+5s], to obtain a stable power reference value for subsequent differential calculations. Because the power monitoring module and the smart gateway use real-time data push, the acquisition of data within the monitoring window is timely and synchronous.

[0031] S12, within the monitoring time window, the real-time power data stream of the home bus is obtained through the power monitoring module.

[0032] In this embodiment, after the monitoring time window [T0, T0+Δt] opens, the smart gateway receives data pushed in real time from the power monitoring module installed at the home bus via its power data interface. This power monitoring module (such as a smart meter or current transformer) continuously collects the total voltage V(t) and total current I(t) of the home bus using a high-frequency sampling method, and connects to the smart gateway in real time via Zigbee, Bluetooth mesh, or wired connection, transmitting the raw waveform data to the smart gateway using a real-time data push mechanism. During the window period, the smart gateway continuously acquires the real-time power data stream within that window, specifically including discrete voltage and current sequences. To ensure the accuracy of subsequent feature extraction, the smart gateway also uses the data before the window in the aforementioned extended intercept range (e.g., [T0-2s, T0+5s]) as a background reference. The acquired real-time power data stream serves as the basic input for subsequent load characteristic analysis by the edge computing unit, used to calculate parameters such as effective voltage, effective current, active power, and reactive power. Through this process, the system achieves real-time capture of changes in home bus power, providing high-precision, low-latency data support for verifying the execution effect of infrared control commands.

[0033] S13, calculate based on the real-time power data stream to obtain a real-time feature vector characterizing the change in equipment load.

[0034] Furthermore, after calculating the real-time feature vector characterizing the equipment load change based on the real-time power data stream, the method further includes: Determine whether there is strong interference within the monitoring time window. If so, generate an execution status verification result indicating an uncertain state and trigger a retest verification process.

[0035] Furthermore, determining whether strong interference exists within the monitoring time window includes: The system analyzes whether there are irrelevant power fluctuations in the real-time power data stream within the monitoring time window. If so, it determines that there is strong interference. The existence of irrelevant power fluctuations includes situations where the total power change of the acquired real-time power data stream within the monitoring time window exceeds a preset multiple of the rated power of the target infrared device.

[0036] Furthermore, the triggering retest verification process includes: By employing a truncated binary exponential backoff algorithm to delay for a random time, the infrared control signal corresponding to the control command is automatically retransmitted, and a monitoring time window is opened to re-execute the verification process. After a preset number of retries, if the generated execution status verification result indicates an uncertain state, an unknown execution result status code is reported to the cloud and the user terminal.

[0037] In this embodiment, the smart gateway performs load characteristic analysis in the local edge computing unit based on the real-time power data stream obtained above. Specifically, this includes: the intelligent gateway extracting the discrete voltage sequence V(t) and discrete current sequence I(t) within the monitoring time window [T0, T0+Δt] from memory, and acquiring background data before the window using an extended auxiliary window [T0-2s, T0+5s]; calculating the effective voltage and effective current values ​​in steps of AC single cycles (e.g., 20ms), and calculating the instantaneous active power P(t) and instantaneous reactive power Q(t) based on both; calculating the average active power P_pre and average reactive power Q_pre within a preset time period before the control command is transmitted (i.e., 2 seconds before T0), and the average active power P_post and average reactive power Q_post when the power stabilizes after transmission, while determining the power stabilization time T_settling (the time required from the start of power change to entering a stable state); finally, calculating the change in active power ΔP_real = P_post - P_pre based on the difference between the average active power before and after transmission, and calculating the change in reactive power ΔQ_real = Q_post - P_pre based on the difference between the average reactive power. Q_pre, and ΔP_real, ΔQ_real, and T_settling together form a real-time feature vector F_real=[ΔP_real,ΔQ_real,T_settling] that characterizes the changes in equipment load.

[0038] After obtaining the real-time feature vector, the smart gateway synchronously performs noise filtering. Specifically, the smart gateway analyzes the real-time power data stream within the monitoring time window to detect whether there are irrelevant power fluctuations. The criterion for determining irrelevant power fluctuations is: the total power change ΔP_total within the window (i.e., the difference between the maximum and minimum instantaneous active power within the window) exceeds a preset multiple (e.g., 3 times) of the rated power P_rated of the target infrared device. That is, if ΔP_total > 3 × P_rated, then it is determined that there is strong interference within the window (e.g., a sudden high-power event such as the start of an electric kettle or refrigerator compressor). Once strong interference is determined, the smart gateway immediately generates an execution status verification result indicating an "uncertain" state and triggers the retest verification process. At the same time, it terminates the subsequent determination steps of this verification (e.g., no longer performing Euclidean distance comparison or negative step judgment) to avoid erroneous judgments caused by interference.

[0039] The retry verification process specifically employs a truncated binary exponential backoff algorithm. When the verification result is marked as uncertain, the smart gateway first calculates a random delay time based on the current number of retries: for the first retry, the delay time is randomly selected between 0 and 1 second; for the second retry, the delay time is randomly selected between 0 and 2 seconds; for the third retry, the delay time is randomly selected between 0 and 4 seconds. Each random value incorporates a slight jitter to further offset potential interference source peaks. After the delay ends, the smart gateway automatically retransmits the infrared control signal corresponding to the original control command and reopens the preset monitoring time window, i.e., re-executes the entire verification process (including acquiring power data streams, calculating real-time feature vectors, noise filtering, and subsequent state determination) starting from step S11. This embodiment sets the maximum number of retries to 3; if, after 3 retries, the generated execution status verification result is still "uncertain," the smart gateway ultimately reports an "execution result unknown" status code to the cloud server and user terminal, no longer forcibly reporting success or failure. Through the aforementioned noise filtering and retry mechanisms, the system can effectively distinguish between real device responses and transient interference in complex household power environments, significantly improving the robustness and reliability of state verification.

[0040] S14, determine the load change state of the target infrared device based on the real-time feature vector and the reference information pre-built for the target infrared device, and generate the execution status verification result of the control command based on the load change state.

[0041] Furthermore, the reference information includes a reference feature vector and the rated power of the target infrared device, wherein the process of constructing the reference feature vector includes: When the target infrared device is turned on or off individually, the discrete voltage sequence and discrete current sequence are captured within a preset time period before and after the execution of the control command. Using a single AC cycle as the step size, the effective value of voltage is calculated based on the discrete voltage sequence, the effective value of current is calculated based on the discrete current sequence, and the active power and reactive power are calculated based on the effective voltage and effective current values. Calculate the average active power and average reactive power within a preset time before the control command is transmitted, and calculate the average active power and average reactive power when the power stabilizes after the control command is transmitted, and determine the power stabilization time. The change in active power is calculated based on the difference between the average active power before and after launch, and the change in reactive power is calculated based on the difference between the average reactive power before and after launch. The change in active power, the change in reactive power, and the power stabilization time are used as the reference feature vector.

[0042] Furthermore, the construction process of the reference feature vector also includes anti-interference processing, wherein the anti-interference processing includes: Repeat the on / off operation of the same target infrared device multiple times, and collect multiple sets of corresponding candidate reference feature vectors respectively; If the variance among multiple sets of candidate reference feature vectors exceeds the preset tolerance range, it is determined that there is background interference in the current learning process, and the currently learned data is discarded.

[0043] In this embodiment, before executing the above verification method, the system needs to pre-build reference information for the target infrared device. This reference information includes a reference feature vector and the device's rated power. Taking an old fixed-frequency air conditioner as an example, the user triggers "learning mode" through an APP or smart gateway interface. The smart gateway prompts the user to use the original remote control to turn the device on or off independently, ensuring that no other high-power devices in the home are operating simultaneously during the operation. The smart gateway collects the discrete voltage and current sequences within a preset time period before and after the execution of the control command through the power monitoring module, specifically the intercepted interval T0. 2s, T0+5s, where T0 is the infrared signal transmission time. To eliminate transient spike noise in the raw data, the smart gateway first applies medium-range filtering to the voltage and current sequences, and then uses envelope extraction to smooth the device's startup or shutdown process. Next, using a single AC cycle (e.g., 20ms) as the step size, the effective voltage value is calculated based on the discrete voltage sequence, the effective current value is calculated based on the discrete current sequence, and the active power P(t) and reactive power Q(t) are calculated based on the effective voltage and current values. Subsequently, the average active power P_pre and the average reactive power Q_pre are calculated within a preset time before the control command is transmitted (i.e., 2 seconds before T0), and the average active power P_post and the average reactive power Q_post are calculated when the power reaches a stable state after the control command is transmitted. At the same time, the power stabilization time T_settling (the time required from the start of power change to entering a stable state) is determined. The change in active power ΔP = P_post – P_pre is calculated based on the difference in the average active power before and after launch, and the change in reactive power ΔQ = Q_post – Q_pre is calculated based on the difference in the average reactive power. Finally, ΔP, ΔQ, and T_settling are combined to form a reference feature vector F_ref = [ΔP, ΔQ, T_settling] for the device. The rated power of the device can be directly measured through a single shutdown operation in the learning mode: the negative step drop in active power at the instant the device is shut down is the rated power P_rated of the device, and this is stored in the local database.

[0044] To ensure the purity and reliability of the constructed reference feature vectors, this embodiment also introduces anti-interference processing. Specifically, the system requires the user to repeatedly turn the same target infrared device on and off multiple times (e.g., 3 times), with each operation independently acquiring a set of candidate reference feature vectors following the above process. After acquisition, the smart gateway calculates the variance among these multiple sets of candidate reference feature vectors. If the variance exceeds a preset tolerance range (e.g., the standard deviation of each feature component exceeds 5% of the mean), it is determined that there is background interference in the current learning process (e.g., other devices accidentally starting or stopping). In this case, all data from this learning is discarded, and the user is prompted via the smart gateway or APP to re-execute the learning mode after the home power environment stabilizes. Conversely, if the variance is within the tolerance range, the mean of each set of feature vectors is taken as the final stored reference feature vector, and the rated power of the device is also saved. Through the above anti-interference processing, the system can effectively avoid subsequent verification misjudgments caused by contaminated learning samples, ensuring the accuracy of the reference information. Furthermore, for target infrared devices with multiple operating states (such as multiple fan speeds or multiple air conditioning modes), this embodiment expands the reference feature vector into a feature matrix form, that is, independently learns and stores the corresponding reference feature vector for each operating state, thereby providing a foundation for subsequent multi-state recognition.

[0045] Further, in step S14, determining the load change state of the target infrared device based on the real-time feature vector and the pre-built reference information corresponding to the target infrared device, and generating the execution state verification result of the control command based on the load change state, includes: S14-1, When the control command is an enable command, calculate the Euclidean distance between the real-time feature vector and the reference feature vector in the reference information; If the Euclidean distance is less than the distance threshold, the load change state is determined to be successfully started, and the successful start is taken as the execution state verification result.

[0046] Further, in step S14, determining the load change state of the target infrared device based on the real-time feature vector and the pre-built reference information corresponding to the target infrared device, and generating the execution state verification result of the control command based on the load change state, includes: S14-2, When the control command is a shutdown command, based on the real-time feature vector and the rated power of the target infrared device in the reference information, determine whether the change in active power in the real-time feature vector satisfies the preset negative step condition. If the condition is met, determine that the load change state is successful in closing, and use the successful closing as the execution status verification result; where the negative step condition includes that the absolute value of the difference between the active power change amount and the negative value of the rated power is less than the tolerance threshold.

[0047] In this embodiment, different state determination logics are executed according to the type of the control instruction. When the received control instruction is an opening instruction, the intelligent gateway extracts the real-time feature vector F_real = [ΔP_real, ΔQ_real, T_settling_real] calculated in step S13, and reads the pre-constructed reference feature vector F_ref = [ΔP_ref, ΔQ_ref, T_settling_ref] of the target infrared device from the local database. The intelligent gateway calculates the Euclidean distance D between the two, and the calculation formula is ; It should be noted that the power stabilization time T_settling is mainly used to assist in judging the waveform morphology consistency during the startup process and does not participate in the numerical calculation of the Euclidean distance to avoid interference caused by the startup time difference of different devices. After calculating the Euclidean distance D, the intelligent gateway compares it with the preset distance threshold Threshold. This threshold can be pre-calibrated according to the device power level and load type. For example, take twice the standard deviation of each component of the reference feature vector. If D < Threshold, it is determined that the real-time load change highly matches the reference, the load change state is determined as "successful in opening", and "successful in opening" is used as the execution status verification result of this control instruction; if D ≥ Threshold, it is determined that the opening fails, and the execution status verification result is "failed in opening". For a target infrared device with multiple working states (such as the multi-speed wind of a fan), the reference feature vector is stored in the form of a feature matrix, and the intelligent gateway needs to calculate the Euclidean distance between the real-time feature vector and each reference feature vector in the feature matrix, and take the minimum value of all distances to compare with the threshold to identify the matching working mode.

[0048] Refer to Figure 3 As shown, when the received control instruction is a closing instruction, the intelligent gateway makes a judgment based on the active power change amount in the real-time feature vector and the rated power of the target infrared device stored in the reference information. Specifically, the intelligent gateway extracts the active power change amount ΔP_real in the real-time feature vector (this value is negative in the closing scenario, indicating a power drop), and reads the rated power P_rated of the device from the local database; determine whether ΔP_real meets the preset negative step condition, that is, detect whether the active power has a sharp drop matching the rated power. Such as Figure 3As shown, the system first calculates the difference ΔP between the average power before and after the window, and determines whether ΔP is a negative jump; if so, it further determines whether the absolute value of ΔP is approximately equal to the rated power of the equipment; in this embodiment, "approximately equal to" is specifically quantified as: the absolute value of the difference between the change in active power and the negative value of the rated power is less than the tolerance threshold, expressed by the formula as follows: Where δ is the tolerance threshold, preferably, the tolerance threshold δ is set to 15% of the rated power P_rated, i.e. If the inequality is satisfied, it indicates that the target device has undergone the expected negative step shutdown, and the load change state is determined as "successful shutdown," which is then used as the execution status verification result. If the inequality is not satisfied, the shutdown is deemed a failure. This shutdown verification logic utilizes the sharp waveform characteristic of the current instantaneously returning to zero when the relay is disconnected. Furthermore, random automatic shutdowns of devices are extremely rare in home environments, thus exhibiting strong anti-interference capabilities and high accuracy, making it particularly suitable for safety-sensitive scenarios such as high-power heating equipment. Finally, the smart gateway reports the determined execution status verification result (successful startup / failure or successful shutdown / failure) to the cloud server and user terminal, completing the closed-loop feedback.

[0049] In another embodiment, when the target infrared device includes multiple operating states, the reference feature vectors are stored in the form of a feature matrix, which contains multiple reference feature vectors corresponding to the multiple operating states respectively.

[0050] Wherein, when the control command is an enable command, calculating the Euclidean distance between the real-time feature vector and the reference feature vector in the reference information includes: Calculate the Euclidean distance between the real-time feature vector and each reference feature vector in the feature matrix, take the minimum value among all Euclidean distances, and compare the minimum value with the distance threshold.

[0051] Specifically, when the target infrared device has multiple operating states (e.g., low, medium, and high fan speeds, or multiple modes such as cooling, heating, and ventilation in an air conditioner), the system's reference information construction and storage methods are expanded accordingly. In learning mode, the user needs to perform a separate activation operation for each operating state. Each operation independently collects and calculates the corresponding reference feature vector according to the aforementioned reference feature vector construction process. The system stores these reference feature vectors in the local database in the form of a feature matrix, denoted as M=[F_ref1,F_ref2,…,F_refk], where k is the total number of operating states, and each F_refi=[ΔP_refi,ΔQ_refi,T_settling_refi] corresponds to the reference feature vector of the i-th operating state. Simultaneously, the rated power (if different) corresponding to each operating state is also stored.

[0052] When a subsequent opening instruction for the target infrared device is received (for example, the user sends a command "set the fan to medium speed" through the APP), the smart gateway first calculates the real-time feature vector F_real = [ΔP_real, ΔQ_real, T_settling_real] according to the aforementioned steps S11 to S13; in the opening verification of step S14, the smart gateway reads the feature matrix M of the device from the local database and calculates the Euclidean distance between F_real and each reference feature vector F_refi in the feature matrix; after the calculation is completed, the minimum value D_min of all the Euclidean distances is taken, and this minimum value D_min is compared with the preset distance threshold Threshold: if D_min < Threshold, it is determined that the real-time feature vector matches a certain working state in the feature matrix, and the system further determines the working state corresponding to the matched reference feature vector (such as medium speed) as the actual load change state of the current device, and generates "opening success" and the corresponding gear information as the execution state verification result; if D_min ≥ Threshold, it is determined that the opening fails (for example, the instruction is not executed or the wrong gear is executed). Through the above feature matrix and minimum Euclidean distance matching mechanism, the system can not only verify whether the infrared opening instruction is successfully executed, but also accurately identify the specific working mode entered by the device, so as to achieve refined closed-loop control of multi-state infrared devices.

[0053] Refer to Figure 4 The figure shows a schematic structural diagram of a control state verification device for an infrared device based on edge computing provided by an embodiment of the present invention.

[0054] In this embodiment, the device 20 is applied to the smart gateway, and the smart gateway is communicatively connected to the power monitoring module installed at the home bus. The device includes: A transmitting unit 21, configured to receive a control instruction for a target infrared device, transmit a corresponding infrared control signal according to the control instruction, and open a preset monitoring time window after the transmission; An obtaining unit 22, configured to obtain the real-time power data stream of the home bus through the power monitoring module within the monitoring time window; A calculating unit 23, configured to calculate based on the real-time power data stream to obtain a real-time feature vector representing the load change of the device; A verifying unit 24, configured to determine the load change state of the target infrared device according to the real-time feature vector and the reference information pre-constructed for the target infrared device, and generate an execution state verification result of the control instruction according to the load change state.

[0055] Each unit module of the device 20 can execute the corresponding steps in the above method embodiment, so the details of each unit module will not be elaborated here. Please refer to the description of the corresponding steps above for details.

[0056] This invention also provides an edge computing-based infrared device control status verification device, which includes the edge computing-based infrared device control status verification apparatus described above. The edge computing-based infrared device control status verification apparatus can employ... Figure 4 The structure of the embodiment, correspondingly, can be executed Figure 1 The technical solutions of the method embodiments shown are similar in implementation principle and technical effect. For details, please refer to the relevant records in the above embodiments, which will not be repeated here.

[0057] The device includes: a mobile phone, digital camera, or tablet computer, or other device with a camera function; or a device with an image processing function; or a device with an image display function. The device may include components such as a memory, processor, input unit, display unit, and power supply.

[0058] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, applications required for at least one function, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide access to the memory for the processor and input units.

[0059] The input unit can be used to receive input numerical, character, or image information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, in addition to a camera, the input unit of this embodiment may also include a touch-sensitive surface (e.g., a touch screen) and other input devices.

[0060] The display unit can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The display unit may include a display panel, optionally configured as an LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other similar display panel. Furthermore, a touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it transmits the information to the processor to determine the type of touch event. Subsequently, the processor provides corresponding visual output on the display panel based on the type of touch event.

[0061] This invention also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the memory described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement... Figure 1 The illustrated method is an infrared device control status verification method based on edge computing. The computer-readable storage medium can be a read-only memory, a hard disk, or an optical disk, etc.

[0062] This invention also provides a computer program product, including a computer program / instructions, which are loaded and executed by a processor to implement... Figure 1 This paper presents an infrared device control status verification method based on edge computing.

[0063] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the device embodiments, equipment embodiments, and storage medium embodiments, since they are basically similar to the method embodiments, the descriptions are relatively simple, and relevant parts can be referred to the descriptions in the method embodiments.

[0064] Furthermore, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0065] The foregoing description illustrates and describes preferred embodiments of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept by means of the foregoing teachings or techniques or knowledge in related fields. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. An edge-computing-based infrared device control state verification method, characterized by, The method is applied to a smart gateway, which is communicatively connected to a power monitoring module installed at a home bus, and the method includes: Receive control commands for the target infrared device, transmit corresponding infrared control signals according to the control commands, and open a preset monitoring time window after transmission; Within the monitoring time window, the real-time power data stream of the home bus is acquired through the power monitoring module; Calculations are performed based on the real-time power data stream to obtain a real-time feature vector characterizing the changes in equipment load; The load change state of the target infrared device is determined based on the real-time feature vector and the pre-constructed reference information corresponding to the target infrared device, and the execution status verification result of the control command is generated based on the load change state. 2.The method of claim 1, wherein, The reference information includes a reference feature vector and the rated power of the target infrared device, wherein the process of constructing the reference feature vector includes: When the target infrared device is turned on or off individually, the discrete voltage sequence and discrete current sequence are captured within a preset time period before and after the execution of the control command. Using a single AC cycle as the step size, the effective value of voltage is calculated based on the discrete voltage sequence, the effective value of current is calculated based on the discrete current sequence, and the active power and reactive power are calculated based on the effective voltage and effective current values. Calculate the average active power and average reactive power within a preset time before the control command is transmitted, and calculate the average active power and average reactive power when the power stabilizes after the control command is transmitted, and determine the power stabilization time. The change in active power is calculated based on the difference between the average active power before and after launch, and the change in reactive power is calculated based on the difference between the average reactive power before and after launch. The change in active power, the change in reactive power, and the power stabilization time are used as the reference feature vector. 3.The method of claim 2, wherein, The construction process of the reference feature vector also includes anti-interference processing, wherein the anti-interference processing includes: Repeat the on / off operation of the same target infrared device multiple times, and collect multiple sets of corresponding candidate reference feature vectors respectively; If the variance among multiple sets of candidate reference feature vectors exceeds the preset tolerance range, it is determined that there is background interference in the current learning process, and the currently learned data is discarded. 4.The method of claim 1, wherein, The step of determining the load change state of the target infrared device based on the real-time feature vector and the pre-constructed reference information corresponding to the target infrared device, and generating the execution state verification result of the control command based on the load change state, includes: When the control command is an enable command, calculate the Euclidean distance between the real-time feature vector and the reference feature vector in the reference information; If the Euclidean distance is less than the distance threshold, the load change state is determined to be successfully started, and the successful start is taken as the execution state verification result. 5.The method of claim 1, wherein, The step of determining the load change state of the target infrared device based on the real-time feature vector and the pre-constructed reference information corresponding to the target infrared device, and generating the execution state verification result of the control command based on the load change state, includes: When the control command is a shutdown command, based on the real-time feature vector and the rated power of the target infrared device in the reference information, it is determined whether the change in active power in the real-time feature vector satisfies the preset negative step condition. If satisfied, the load change state is determined to be a successful shutdown, and the successful shutdown is taken as the execution state verification result; wherein, the negative step condition includes the absolute value of the difference between the change in active power and the negative value of the rated power being less than the tolerance threshold.

6. The infrared device control status verification method based on edge computing according to claim 1, characterized in that, After calculating the real-time feature vector characterizing the equipment load change based on the real-time power data stream, the method further includes: Determine whether there is strong interference within the monitoring time window. If so, generate an execution status verification result indicating an uncertain state and trigger a retest verification process. 7.The method of claim 6, wherein, The determination of whether strong interference exists within the monitoring time window includes: The system analyzes whether there are irrelevant power fluctuations in the real-time power data stream within the monitoring time window. If so, it determines that there is strong interference. The existence of irrelevant power fluctuations includes situations where the total power change of the acquired real-time power data stream within the monitoring time window exceeds a preset multiple of the rated power of the target infrared device. 8.The method of claim 6, wherein, The trigger retest verification process includes: By employing a truncated binary exponential backoff algorithm to delay for a random time, the infrared control signal corresponding to the control command is automatically retransmitted, and a monitoring time window is opened to re-execute the verification process. After a preset number of retries, if the generated execution status verification result indicates an uncertain state, an unknown execution result status code is reported to the cloud and the user terminal. 9.An edge computing-based infrared device control state verification apparatus, characterized by comprising: The device is applied to a smart gateway, which is communicatively connected to a power monitoring module installed at a home bus. The device includes: The transmitting unit is used to receive control commands for the target infrared device, transmit corresponding infrared control signals according to the control commands, and open a preset monitoring time window after transmission; The acquisition unit is used to acquire the real-time power data stream of the home bus through the power monitoring module within the monitoring time window; The calculation unit is used to perform calculations based on the real-time power data stream to obtain a real-time feature vector characterizing the changes in equipment load; The verification unit is used to determine the load change state of the target infrared device based on the real-time feature vector and the reference information pre-built for the target infrared device, and to generate the execution state verification result of the control command based on the load change state.

10. An edge-computing-based infrared device control state verification device, characterized by, The device includes a processor, a memory, and a computer program stored in the memory, which, when executed by the processor, implements the steps of an edge computing-based infrared device control status verification method as described in any one of claims 1 to 8.