A method for intelligent reconstruction control of a daily household electrical appliance

By collecting high-frequency voltage, current, and electromagnetic radiation signals from the power circuits of home appliances, and combining lightweight temporal convolutional networks and edge-cloud collaborative learning, the problems of insufficient perception and privacy risks in the transformation of smart home appliances are solved. Fine-grained state recognition and protection of old home appliances are achieved, ensuring the reliability and privacy of control.

CN123047389APending Publication Date: 2026-11-06SHANGHAI SHESHIMAN INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611250143.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing smart home appliance retrofit technologies suffer from insufficient sensing dimensions, risks of damage to older appliances due to hard-cut-off control methods, privacy risks associated with centralized cloud-based inference, and a lack of personalized adaptation, resulting in insufficient depth of intelligent control and poor reliability.

Method used

By connecting a smart upgrade gateway to the power circuit of home appliances, high-frequency voltage and current trajectories and near-field electromagnetic radiation signals are collected. By combining lightweight temporal convolutional networks for edge inference, fine-grained state recognition is achieved. Flexible control is implemented using zero-crossing detection, infrared command reconstruction, and electroacoustic feedback closed-loop confirmation. Personalized optimization is achieved by combining edge-cloud collaborative learning.

Benefits of technology

It achieves fine-grained improvement in home appliance status recognition, protects older home appliances, ensures privacy and control reliability, meets real-time needs, and optimizes control accuracy over time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123047389A_ABST
    Figure CN123047389A_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent transformation and control method for household appliances. This invention relates to the fields of artificial intelligence and smart home technology. By connecting an intelligent transformation gateway to the power circuit of the controlled appliance in series, high-frequency voltage and current trajectory signals and near-field electromagnetic radiation signals are simultaneously collected without altering the internal circuit structure of the appliance. The resulting lightweight temporal convolutional network inference engine, which employs knowledge distillation and integer quantization compression, outputs the internal working state of the appliance. The control decision module dynamically selects one of three safety control strategies based on the inference results: flexible switching of a zero-crossing detection relay, infrared command reconstruction combined control, or electroacoustic feedback closed-loop confirmation. This invention effectively solves three core problems: zero-intrusion deep state recognition of existing non-smart appliances, safe and flexible control of old appliances, and personalized model adaptation under privacy protection conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and smart home technology, specifically to a method for intelligent transformation and control of household appliances. Background Technology

[0002] The smart home industry has developed rapidly over the past decade. However, the increased penetration rate of new smart home appliances cannot solve the problem of making a large number of existing non-smart home appliances in households smart. These existing home appliances are typically designed to last for 10 to 15 years, and users have a low willingness to replace them. This has created an island effect in the smart home ecosystem. Promoting low-cost, non-intrusive smart transformation of existing home appliances is an important issue for the current smart home industry.

[0003] The core idea of ​​non-intrusive load monitoring technology is to collect electrical signals at the power grid connection point and identify and separate the operating status of each household appliance by analyzing the changes in electrical characteristics generated during load switching. Traditional non-intrusive load monitoring systems usually use low-frequency sampling, rely on manually extracted power features, and combine hidden Markov models or support vector machines for state classification.

[0004] The closest existing technologies to this invention mainly fall into the following three categories;

[0005] The first type is the smart socket solution. Existing smart sockets connect to the smart home platform via wireless LAN or low-power wireless communication protocols, enabling remote control of power on / off, collection of total active power, and triggering of simple automation rules based on power thresholds. This solution collects active power through a low-frequency power metering chip and reports it to the cloud via a wireless communication module. Users can issue on / off commands through a mobile application or voice assistant, and the relay directly hard-cuts off the load circuit. The limitations of this solution are: it only knows whether the appliance is powered on and the total power, but cannot sense the internal operating status of the appliance. The control granularity is only two switch positions. The relay uses a hard-cut method, which poses a risk of impact damage to older appliances, especially for motor appliances that are running at high speed. The hard cut will generate an induced electromotive force backlash, which, combined with the power grid surge, can cause the peak voltage to exceed the rated value by several times, which can easily damage the motor windings of older appliances.

[0006] The second type is the intelligent infrared remote control box solution. This solution learns and replays infrared remote control codes to indirectly control infrared remote control-enabled home appliances such as air conditioners, TVs, and fans. Users point the original remote control at the learning box button, and the learning box records and stores the infrared code. After being triggered by an application or voice assistant, the learning box transmits the stored infrared code to the home appliance. This solution is a pure open-loop control and cannot obtain feedback confirmation of the actual execution status of the home appliance. It is only suitable for home appliances with infrared receiving windows and is completely ineffective for purely mechanical appliances. It cannot be linked with the current status of the home appliance and has the risk of issuing incorrect commands due to the lack of status perception.

[0007] The third category is traditional non-intrusive load monitoring and energy consumption monitoring solutions. This type of solution installs current transformers at the household distribution box to collect the current waveform of the entire house. It uses machine learning algorithms to identify the types of home appliances and count energy consumption. This solution is aimed at monitoring the energy consumption of the entire house rather than fine control of individual home appliances. The sampling rate and feature dimensions are insufficient to distinguish the different internal working modes of the same home appliance. All artificial intelligence inference is completed in the cloud, which poses privacy risks and network latency. It does not have the ability to actively control the data. Moreover, the high-frequency power data contains the user's detailed work and rest patterns, which are highly sensitive personal information. Centralized uploading poses a serious risk of privacy leakage.

[0008] The aforementioned existing technologies share the following common drawbacks: First, insufficient perception dimensions lead to coarse-grained state recognition. Existing solutions only collect low-frequency total power, failing to distinguish between different operating states with similar power characteristics. For example, the power difference between washing and rinsing modes in a washing machine is only about 50 watts, making reliable differentiation difficult in power noise environments. This results in a lack of device state context in the generation of control commands, leading to a severe deficiency in the depth of intelligent control. Second, hard-cutoff control methods pose a risk of damage to older appliances and lack a safe and flexible switching mechanism based on device state. As the insulation layer of older appliances ages and their pressure resistance decreases, the control system cannot achieve safe and flexible switching based on state awareness, timing, and strategy. Third, centralized cloud-based inference carries privacy risks and network dependence, failing when the network is disconnected, thus failing to guarantee control reliability in home scenarios. Fourth, there is a lack of personalized adaptation mechanisms. Different households with the same model of appliances exhibit significant individual differences in electrical characteristics due to varying years of use. The unified pre-trained model has poor generalization ability and cannot automatically correct model parameters as appliances age. Therefore, we propose an intelligent transformation and control method for daily household appliances. Summary of the Invention

[0009] The purpose of this invention is to provide a method for intelligent transformation and control of household appliances.

[0010] To achieve the above objectives, the present invention provides the following technical solution: a method for intelligent transformation and control of household appliances, comprising the following steps:

[0011] Multi-dimensional electrical feature acquisition steps: Through the intelligent transformation gateway connected in series to the power circuit of the controlled home appliance, without changing the internal circuit structure of the controlled home appliance, the high-frequency voltage and current trajectory signals and near-field electromagnetic radiation signals of the power supply end of the controlled home appliance are acquired simultaneously. The high-frequency voltage and current trajectory signals are processed in frames on a single power frequency cycle basis. Each frame extracts a voltage and current statistical feature vector including active power, reactive power, apparent power, power factor, total harmonic distortion rate of current, and amplitude of each harmonic current. At the same time, the near-field electromagnetic radiation signal is integrated into multiple sub-frequency bands that are logarithmically evenly divided to form an electromagnetic radiation spectrum energy feature vector. The voltage and current statistical feature vector and the electromagnetic radiation spectrum energy feature vector are concatenated to form a single-frame fusion feature vector. Multiple consecutive frames of fusion feature vectors are stacked in a sliding window manner to form a time-series input tensor.

[0012] Edge inference steps: The time-series input tensor is deployed on the lightweight temporal convolutional network inference engine of the intelligent transformation gateway microcontroller, which is subjected to knowledge distillation and integer quantization compression, to obtain the predicted probability vector of the current internal working state of the controlled home appliance. The category corresponding to the highest probability is taken as the predicted state, and the results of multiple consecutive inferences are temporally smoothed using a majority voting sliding window to output a stable working state.

[0013] Safe and flexible control steps: The control decision module integrated in the main control unit of the intelligent transformation gateway microcontroller dynamically selects one of the three control strategies to execute based on the stable working state and external control commands: flexible switching of zero-crossing detection relay, infrared command reconstruction combination control, and electroacoustic feedback closed-loop confirmation. After the control execution is completed, closed-loop confirmation is performed through changes in electrical characteristics.

[0014] Edge-cloud collaborative learning steps: After the control command is executed, labeled training samples are automatically generated by comparing the electrical feature inference states before and after control. After accumulating to a preset number, local incremental stochastic gradient descent training is triggered. The model gradient difference is calculated and encrypted after differential privacy processing before being uploaded to the cloud federated aggregation server. The cloud server performs federated average aggregation weighted by data volume and distributes the updated global model to each smart transformation gateway in groups according to device type, completing the continuous personalized optimization of the lightweight edge model.

[0015] As a further aspect of the present invention, the voltage and current statistical feature vector includes active power, reactive power, apparent power, power factor, total harmonic distortion rate of current, and amplitude of the second to fifteenth harmonic currents. The electromagnetic radiation spectrum energy feature vector is divided into sixteen logarithmically evenly spaced sub-bands, covering a frequency range of 150 kHz to 30 MHz. Each component is the integral value of the power spectral density curve within the corresponding sub-band. The dimension of the spliced ​​single-frame fused feature vector is 43 dimensions, the sliding window length is 30 frames, and the temporal input tensor dimension is 30 rows and 43 columns.

[0016] As a further aspect of the present invention, the lightweight temporal convolutional network is composed of three stacked causal dilated convolutional residual blocks, with dilation factors of one, two, and four for each residual block, a kernel size of three, and thirty-two channels. After stacking the three layers, the total receptive field covers fifteen frames of temporal context, corresponding to three hundred milliseconds of historical temporal information. The knowledge distillation uses a full-precision large model in the cloud as the teacher model, and the distillation loss function is a weighted combination of hard-label cross-entropy loss and soft-label divergence loss. After distillation, symmetric linear integer quantization compression is performed on the student model, and the single inference latency after quantization is less than fifty milliseconds.

[0017] As a further aspect of the present invention, the specific process of the flexible switching of the zero-crossing detection relay is as follows: after the control decision module determines that the current stable working state belongs to the high-speed operation of the motor, it enables the zero-crossing detection interruption. After the AC power grid zero-crossing event is triggered, the relay coil is driven to complete the contact switching. After the relay action is completed, the change in active power and apparent power before and after the switching is compared within 500 milliseconds to perform closed-loop confirmation. If the expected electrical characteristic change is not detected, the retry process is entered, and the retry is performed up to three times.

[0018] As a further aspect of the present invention, the specific process of the infrared command reconstruction combination control is as follows: query the infrared protocol format and command code mapping table corresponding to the controlled home appliance from the local device command library, generate the optimal infrared command sequence required for state transition by combining the current stable working state and the target control state, transmit each infrared command in sequence, with an interval of 200 milliseconds between each command, and within three seconds after transmission, detect whether the change in electromagnetic radiation characteristics corresponds to the change in motor speed characteristics of the target state for closed-loop confirmation. If the confirmation fails, retransmit, and retry up to three times.

[0019] As a further aspect of the present invention, the automatic generation method of the labeled training samples is as follows: record the stable working state before the execution of the control command and the stable working state obtained by electrical feature inference after the execution, and use the state after execution as a label to form positive samples and add them to the local sample buffer. When the number of accumulated samples in the buffer reaches fifty or the 30-minute update cycle is reached, local incremental training is triggered.

[0020] As a further aspect of the present invention, the specific process of differential privacy processing is as follows: norm clipping based on a preset clipping threshold is performed on the gradient difference, and then Gaussian noise with a mean of zero and a variance proportional to the square of the clipping threshold is injected to obtain the privacy-preserving gradient. After obtaining the privacy-preserving gradient, it is uploaded to the cloud server using an encrypted transmission protocol without uploading any original power data.

[0021] As a further aspect of the present invention, the specific process of the cloud-based federated aggregation is as follows: the cloud server waits to receive gradient uploads from at least 30% of the clients participating in this round of aggregation, executes a federated average aggregation algorithm weighted by local data volume to calculate the global model parameters for the new round, evaluates the accuracy of the aggregated model on a standard test set, and if the accuracy is improved by more than 0.5 percentage points compared to the previous round, it is distributed in groups according to device type; otherwise, the aggregation results of this round are discarded and more clients are waited to participate in the next round.

[0022] As a further solution of the present invention, for newly connected smart transformation gateways, the cloud server pushes the latest aggregated model from the global federated model library of the corresponding device type as the initialization model according to the device type identifier reported by the gateway, so that the new gateway can obtain a high initial recognition accuracy without accumulating a large number of samples locally, thus solving the cold start problem of new devices.

[0023] As a further embodiment of the present invention, the length of the majority voting sliding window is five, and the mode of the results of five consecutive inferences is taken as the output of the stable working state. If the stable working state changes, the state transition timestamp is recorded and the state change event is triggered and reported to the control decision module.

[0024] Compared with the prior art, the beneficial effects of the present invention by adopting the above technical solution are as follows:

[0025] 1. The present invention significantly improves the fineness of state recognition. By fusing the multi-dimensional features of high-frequency voltage and current trajectories and near-field electromagnetic radiation, the fineness of household appliance state recognition is improved from the device level to the working mode level. The accuracy of multi-state recognition of typical household appliances such as washing machines and air conditioners is improved compared with the traditional single power feature method, filling the technical gap of deep state recognition under zero-intrusion conditions.

[0026] 2. The present invention has a significant effect on protecting home appliances. The zero-crossing detection and linkage switching makes the load current close to zero when the relay operates. The zero-crossing detection and linkage switching can significantly reduce the surge peak voltage when the relay operates, effectively protecting the motor windings of old home appliances. It fundamentally eliminates the risk of impact damage to old home appliances caused by hard cutting, and prevents electrical faults and even fire hazards caused by impact.

[0027] 3. This invention balances privacy protection and model performance. The federated learning framework combined with differential privacy processing ensures that the original power data is never taken out of the house. Under the condition of non-independent and identically distributed data, the personalized federated model has improved recognition accuracy compared with the unified pre-trained model. Moreover, it continuously self-optimizes with the use of the equipment, achieving a control experience that becomes more accurate with use.

[0028] 4. This invention ensures edge real-time performance. The lightweight temporal convolutional network model, after integer quantization, is compressed to the level of one hundred kilobytes. On mainstream IoT microcontrollers, the single inference latency is less than fifty milliseconds, and the memory usage is less than two hundred and fifty-six kilobytes, meeting real-time control requirements and ensuring the reliability of local control in offline environments. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the overall system architecture in an embodiment of the present invention;

[0030] Figure 2 This is a schematic diagram of the complete process of edge state recognition and reasoning in an embodiment of the present invention;

[0031] Figure 3 This is a schematic diagram of the overall process of secure flexible control and edge-cloud federated learning in an embodiment of the present invention. Detailed Implementation

[0032] The following is in conjunction with the appendix Figure 1-3 The specific embodiments of the present invention will be further described below. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.

[0033] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0034] I. System Overall Architecture:

[0035] The intelligent transformation and control method for household appliances proposed in this invention is based on an edge-cloud collaborative system architecture of edge intelligent transformation gateway and cloud federated learning server. The system consists of three layers: perception and control layer (hardware layer), edge inference and local control layer (software layer), and cloud federated aggregation layer.

[0036] Sensing and Control Layer: The intelligent transformation gateway (hereinafter referred to as the gateway) is connected to the power circuit of the home appliance in series. It integrates a high-frequency analog-to-digital conversion sampling module, an electromagnetic radiation antenna module, a zero-crossing detection circuit, a relay drive module, an infrared transceiver module, and a microcontroller main control unit. Without changing the internal circuit structure of the home appliance, the gateway collects the electrical signals of the home appliance in real time and executes control actions. All modules converge to the microcontroller main control unit through an internal bus. The gateway connects to the home router through local area network wireless communication and communicates with the cloud federated aggregation server through the Internet.

[0037] Edge Inference and Local Control Layer: A lightweight temporal convolutional network inference engine deployed on the gateway microcontroller is responsible for extracting multi-dimensional electrical features in real time, inferring the precise working status of home appliances, and selecting a safe and flexible control strategy based on the inference results. This layer is also responsible for incremental training and gradient uploading for the local federated learning client, as well as receiving global model updates from the cloud.

[0038] Cloud-based federated aggregation layer: The cloud server is responsible for receiving encrypted gradient parameters uploaded by each gateway, executing the federated aggregation algorithm, generating a global optimization model, and then distributing it to each gateway in groups according to device type. This enables cross-family knowledge sharing and continuous updates of personalized models. The original home appliance power data is always kept locally and is not uploaded through the transmission channel.

[0039] II. Multidimensional Electrical Feature Acquisition:

[0040] High-frequency voltage and current trajectory acquisition:

[0041] The gateway has built-in high-precision voltage transformers and current transformers to collect real-time voltage and current signals from the power supply of home appliances, respectively. The sampling rate is set to 10,000 times per second, that is, 100 sampling points are collected every half power frequency cycle. Sixteen-bit analog-to-digital conversion quantization is used to ensure the dynamic range and accuracy of the signal.

[0042] The raw signals collected are framed in units of a single power frequency cycle (twenty milliseconds under a fifty-hertz power grid). Each frame contains two hundred pairs of sampling points. On the phase plane, the two hundred pairs of sampling points are plotted as a two-dimensional voltage and current trajectory diagram. Its shape features such as area, tilt angle, symmetry, and curvature change significantly with the working state of the home appliance, constituting important perceptual information for distinguishing different working states.

[0043] Meanwhile, a statistical feature vector is extracted from each frame of signal, including active power, reactive power, apparent power, power factor, total harmonic distortion rate of current, and amplitude of the second to fifteenth harmonic currents, totaling nineteen statistical features, which comprehensively describe the linear and nonlinear electrical characteristics of the household appliance load.

[0044] Electromagnetic radiation feature extraction:

[0045] The gateway housing integrates a small printed circuit board antenna with a frequency range covering 150 kHz to 30 MHz. It is used to collect near-field electromagnetic radiation signals generated by home appliances during operation. Home appliances generate electromagnetic radiation noise from components such as switching power supplies and motor commutators during operation. Its spectral characteristics are closely related to the working status of the equipment and can supplement the high-frequency working information that cannot be reflected by voltage and current trajectory characteristics.

[0046] The electromagnetic radiation signal is analyzed by using the fast Fourier transform acceleration module built into the microcontroller. The frequency range is divided into sixteen sub-bands at logarithmic uniform intervals. The sixteen-dimensional electromagnetic radiation spectrum energy feature vector is obtained by integrating the power spectral density curves in each sub-band. Each component represents the normalized power spectral density energy of the corresponding sub-band. The energy of each band is obtained by integrating the power spectral density function in the corresponding sub-band.

[0047] Multidimensional feature fusion:

[0048] The 27-dimensional voltage and current statistical features (including 5 dimensions of active power, reactive power, apparent power, power factor, and total harmonic distortion rate of current, and 14 dimensions of the amplitude of the second to fifteenth harmonic currents, totaling 27 dimensions) are concatenated with the 16-dimensional electromagnetic radiation spectrum energy feature vector to form a 43-dimensional single-frame fusion feature vector. The fusion feature vectors of 30 consecutive frames are stacked in a sliding window manner to form a time-series input tensor with a dimension of 30 rows by 43 columns, corresponding to a historical time-series context of 600 milliseconds, which is used to capture the transient features of home appliance state switching.

[0049] The core value of multi-dimensional feature fusion lies in the fact that voltage and current statistical features provide steady-state power information of home appliance loads, which can effectively distinguish different devices with significant power differences, while electromagnetic radiation spectrum features provide high-frequency operating information such as switching power supply frequency and motor commutation frequency, which can further distinguish different operating modes when the power characteristics are similar. For example, the washing mode and rinsing mode of a washing machine have little difference in power, but the different motor speeds result in significant differences in the electromagnetic radiation spectrum distribution. The combined use of the two can significantly improve the accuracy of state recognition.

[0050] III. Lightweight Temporal Convolutional Network State Inference at the Edge:

[0051] Network architecture design:

[0052] The lightweight temporal convolutional network designed in this invention consists of three stacked causal dilated convolutional residual blocks followed by a fully connected classification head, which outputs the probability distribution of the working state of home appliances. The causal dilated convolution ensures the causality of the network in the time dimension, that is, the output at the current moment only depends on the input at the current and historical moments, and does not depend on future information, making it suitable for real-time streaming inference scenarios.

[0053] The dilation factors of the three residual blocks are one, two, and four, respectively. The kernel size is three, and the number of channels is thirty-two. The receptive field of the dilated convolution increases exponentially with the dilation factor. After stacking the three layers, the total receptive field covers fifteen frames of temporal context, corresponding to three hundred milliseconds, which is sufficient to capture the transient features of home appliance state switching.

[0054] The forward computation process for each residual block is as follows: the input feature map is processed by two layers of cascaded causal dilated convolution, batch normalization and linear rectified activation, then added to the input through residual connection (if the number of input and output channels is inconsistent, a one-to-one convolutional projection adaptation is added), and then activated again by linear rectified activation to output the feature map of the residual block. Finally, the hidden state vector of the last time step of the output of the last layer of the temporal convolutional network is taken, processed by fully connected layer and normalized exponential function, and the predicted probability vector of each working state category is output. The predicted state category is the category corresponding to the highest probability.

[0055] Compared to recurrent neural networks or long short-term memory networks, temporal convolutional networks have advantages such as parallelizable training, fast convergence speed, fewer parameters, and regular structure. They are suitable for deployment on microcontrollers after quantization and compression, which can meet the stringent constraints of computing power and memory at the edge while ensuring inference accuracy.

[0056] Model quantization compression scheme:

[0057] To enable lightweight temporal convolutional network models to be deployed on microcontrollers, a two-stage compression scheme combining knowledge distillation and integer quantization is adopted.

[0058] The first stage is knowledge distillation. A cloud-based full-precision large model (teacher model, 128 channels, 6 residual block layers) guides the training of a lightweight edge model (student model, 32 channels, 3 residual block layers). The knowledge learned by the teacher model is transferred to the student model, enabling the student model to maintain near-teacher model recognition performance with a significantly reduced number of parameters. The distillation loss function is a weighted combination of hard-label cross-entropy loss and soft-label divergence loss.

[0059] ;

[0060] in, For total distillation losses, Let cross-entropy be the loss function. Let KL divergence loss function be used. This is the output probability vector of the student model. This is the output probability vector (soft label) of the teacher model. This is the one-hot encoded vector of the real label. The temperature coefficient, set to four in this embodiment, is used to soften the output distribution of the teacher model, allowing it to contain richer information about inter-class relationships. For the hard label loss weight, this embodiment takes a value of 0.3;

[0061] The second stage is integer quantization, which performs symmetric linear quantization on the weights and activation values ​​of the distilled student model, compressing the 32-bit floating-point representation into an 8-bit integer representation. The quantization scaling factor is obtained by dividing the maximum absolute value of the weights by 127. The quantization zero point is zero during symmetric quantization. After quantization, the model volume is compressed to about one-quarter of the original model. On a microcontroller with a main frequency of 168 MHz, the single inference latency is less than 50 milliseconds and the memory usage is less than 256 kilobytes, which meets the resource constraints of typical IoT microcontrollers.

[0062] Complete process of edge state reasoning:

[0063] After the gateway is powered on and initialized, the microcontroller loads the integer quantized temporal convolutional network model weights from flash memory into random access memory, initializes the analog-to-digital conversion sampling direct memory access channel, the electromagnetic radiation antenna fast Fourier transform buffer, the zero-crossing detection interrupt, the relay drive general input / output interface and the infrared transceiver module, and at the same time reads the device type identifier of the controlled home appliance and the current local model version number from the local non-volatile memory to complete the initialization.

[0064] Continuous sampling of analog-to-digital conversion is initiated, and the original digital signals of the voltage and current channels are synchronously acquired at a sampling rate of 10,000 times per second and stored in a dual buffer. Whenever a frame (two hundred sampling point pairs, corresponding to twenty milliseconds) is filled, a direct memory access interrupt is triggered, and the acquisition is switched to the background buffer. The foreground buffer is submitted to the feature extraction task queue. The feature extraction task takes a frame of original data from the queue and calculates the active power, reactive power, apparent power, and power factor in sequence. A 256-point fast Fourier transform is performed on the current waveform to extract the amplitude of the second to fifteenth harmonics and the total harmonic distortion rate of the current. The current electromagnetic radiation antenna buffer is read, and a 512-point fast Fourier transform is performed on the electromagnetic radiation signal and integrated according to the logarithmic frequency band to obtain a sixteen-dimensional electromagnetic radiation feature vector. The above features are spliced ​​to form a forty-three-dimensional fused feature vector and written into a 30-frame circular sliding window buffer.

[0065] Whenever the sliding window buffer completes an update (i.e., triggered once every 20 milliseconds), the latest 30 frames of fused feature sequence are read from the buffer, forming a temporal input tensor, which is then fed into the integer quantized temporal convolutional network inference engine to perform forward inference, and outputs the state probability vector and the optimal predicted state.

[0066] The inference results are subjected to temporal smoothing filtering. A majority voting sliding window of length five is used to vote on five consecutive inference results. The mode is taken as the stable working state output to suppress single-frame inference jitter. If the stable working state is transferred, the state transfer timestamp is recorded and a state change event is triggered and reported to the control decision module.

[0067] Every 30 minutes, newly added labeled samples are used as incremental training data. A local stochastic gradient descent update is performed on the local federated learning client. The gradient difference of the model is calculated, and after differential privacy noise processing, it is encrypted and uploaded to the cloud federated server using the transport layer security protocol. At the same time, the global aggregated model update issued by the cloud is received, merged into the local model and written to flash memory, completing one end-to-cloud collaborative model iteration.

[0068] IV. State-aware, flexible safety control mechanism:

[0069] After obtaining the current stable working status of the home appliances, the control decision module selects a control scheme to execute according to the following priority strategy based on the device type, current status and received external control commands;

[0070] Zero-crossing detection flexible switching sub-process:

[0071] When the control decision module determines that the current stable working state belongs to the high-speed operation of the motor (such as the spin-drying mode of a washing machine or the high-speed setting of an electric fan), it marks that the zero-crossing flexible switching process needs to be executed. The relay action is not triggered temporarily, and the system waits for the timing window. The microcontroller enables the zero-crossing detection interrupt. This interrupt is triggered by the voltage sampling signal being compared with the zero value by a comparator. After the most recent zero-crossing event of the AC power grid is triggered, the relay coil is driven to be energized or de-energized through the flip signal of the general input / output port to complete the contact switching. Since the 50 Hz AC power grid has a zero-crossing point every 10 milliseconds, the maximum waiting time does not exceed 10 milliseconds, and the impact on the normal control response speed is negligible. The relay is switched at the zero-crossing moment, so that the contact is switched when the current is zero or close to zero, thereby eliminating the arc, avoiding contact erosion, and reducing the surge impact on the load to the theoretical minimum, effectively protecting the windings of the motors of old household appliances.

[0072] After the relay action is completed, the microcontroller re-collects electrical characteristics, compares the changes in active power and apparent power before and after the switching, and confirms that the load is successfully disconnected or connected. If the expected change in electrical characteristics is not detected within 500 milliseconds, the relay action is determined to have failed and the retry process is initiated. The retry can be repeated up to three times. If all three retry attempts fail, a control execution failure alarm is reported.

[0073] When the controlled home appliance is in standby or low power consumption state, since the load current itself is close to zero, the control decision module determines that there is no need to wait for the zero crossing moment and can directly execute the relay action, thereby reducing unnecessary control delay.

[0074] Infrared command reconfiguration combined control sub-process:

[0075] For home appliances that support infrared remote control (such as air conditioners and televisions), this invention adopts a state-aware infrared command reconstruction strategy instead of simply replaying pre-recorded infrared codes, in order to avoid issuing redundant commands that cause state confusion due to a lack of awareness of the current state.

[0076] The system queries the local device instruction library for the infrared protocol format (including common consumer electronics infrared protocol formats) and instruction code mapping table corresponding to the type identifier of the controlled home appliance. Combining the current inferred stable working state and the target control state, the system generates the optimal infrared instruction sequence required for state transition. For example, if the air conditioner is currently in a low cooling speed of 26 degrees Celsius and the target is a high cooling speed of 24 degrees Celsius, the system generates two infrared instructions: a set temperature of 24 degrees Celsius and a set high fan speed, instead of sending a complete initialization instruction sequence. This avoids unnecessary interference to the current state of the device. The system transmits each infrared instruction in sequence, with an interval of 200 milliseconds between each instruction, and waits for the home appliance to receive and respond.

[0077] Successful appliance status switching is confirmed through a closed-loop electromagnetic radiation feature: If the electromagnetic radiation feature vector detects the corresponding motor speed change feature (corresponding to fan speed switching) within three seconds after the command is sent, the execution is considered successful; otherwise, the command is resent, and the process can be repeated up to three times.

[0078] Electroacoustic feedback closed-loop confirmation sub-process for purely mechanical home appliances:

[0079] For purely mechanical knob-type home appliances (without infrared interfaces), this invention adopts a linkage control scheme of zero-crossing power-off, user manual adjustment, and zero-crossing power-on. The specific process is as follows: the power is cut off at the zero-crossing point via a relay, and the appliance is allowed to completely stop operating (confirmed by detecting that the current drops to zero and the electromagnetic radiation signal disappears). Then, a prompt sound is issued or the user is notified via an application to manually adjust the gear. After the user completes the adjustment, they press confirm on the application. The gateway then reconnects the power at the zero-crossing point and confirms the new state of the appliance through electrical characteristic inference, and records and archives the new state. This process retains the user's physical participation in adjusting the mechanical knob, while using the gateway to realize the perception and recording of the state before and after control, forming a complete control closed loop.

[0080] V. Edge-Cloud Collaborative Personalized Federated Learning Mechanism:

[0081] Federated Learning System Framework:

[0082] This invention adopts a horizontal federated learning framework, in which each home gateway (client) shares the same temporal convolutional network model structure. However, the local data (the electrical feature sequence and corresponding status label of each household appliance) exhibits non-independent and identically distributed characteristics due to differences in appliance model, brand, and years of use.

[0083] Assume the system has a total of The number of family nodes participating in federated learning, the first The local dataset size of each node is The total amount of data is The global optimization objective is to minimize the weighted sum of the data volume of the local loss function of each node:

[0084] ;

[0085] in, This is the parameter vector of the global temporal convolutional network model. For the globally weighted loss function, For the first The local loss function of each node represents the average cross-entropy classification loss of each sample on the local dataset of that node. This optimization objective is solved collaboratively by uploading the model gradient from each node rather than the original data, under the constraint that the original data does not leave the local dataset.

[0086] Local incremental training and gradient upload:

[0087] After executing control commands, each gateway automatically generates labeled samples by analyzing the changes in electrical characteristics before and after control, thus achieving weakly supervised automatic labeling and avoiding the cost and lack of scalability of manual labeling. The specific process is as follows: record the stable working state before the execution of the control command and the stable working state obtained by electrical characteristic inference after the execution, and use the state after the execution as a label to form positive samples and add them to the local sample buffer.

[0088] When the local sample buffer accumulates fifty new samples, or reaches the thirty-minute update cycle, local incremental training is triggered. The local dataset is initialized with the current globally distributed model parameters, and three rounds of local stochastic gradient descent iterations are performed (with a learning rate of 0.01) to calculate the locally updated model parameters.

[0089] Calculate the gradient difference and perform differential privacy noise reduction processing. The gradient difference is the difference between the locally updated model parameters and the globally distributed model parameters.

[0090] ;

[0091] The gradient difference is subjected to L2 norm clipping based on a preset clipping threshold and Gaussian noise injection to obtain a privacy-preserving gradient:

[0092] ;

[0093] in, The gradient difference after differential privacy processing. The L2 norm of the gradient difference. The gradient clipping threshold is set to 1.0 in this embodiment. The mean is zero and the variance is Gaussian noise matrix, The noise intensity factor is set to 0.01 in this embodiment. As an identity matrix of the same dimension as the gradient difference, L2 norm clipping limits the magnitude of the gradient difference to within the clipping threshold. Gaussian noise injection obscures the contribution of individual samples in a statistical sense. The combination of the two achieves differential privacy protection of gradient information, making it impossible for the cloud server to infer the original electricity consumption data of individual households from the gradient during the aggregation process.

[0094] The privacy-preserving gradient is encrypted using the transport layer security protocol and then uploaded to the cloud federated aggregation server. At the same time, the local data volume is uploaded for weighted aggregation, but no raw power data is uploaded.

[0095] Cloud-based federated aggregation and personalized distribution:

[0096] The cloud server waits to receive gradient uploads from at least 30% of the clients participating in this round of aggregation. An asynchronous aggregation strategy is adopted to avoid global update stagnation due to a small number of gateway outages. A federated average aggregation algorithm weighted by data volume is executed to calculate the new round of global model parameters.

[0097] ;

[0098] in, For the first The model parameters after global aggregation, For the first Round global model parameters, To participate in the The client collection of wheel aggregation, For the first Local data volume per client For the first The privacy-preserving gradient difference uploaded by each client is aggregated in a weighted manner based on the amount of data. This allows clients with more data and richer features to contribute more to the global model, which is beneficial to improving the overall generalization ability of the global model.

[0099] The cloud server evaluates the accuracy of the aggregated global model on the retained standard test set. If the accuracy is improved by more than 0.5 percentage points compared to the previous round, the global model is triggered for distribution. Otherwise, the aggregation results of this round are discarded, and more clients are waited to participate in the next round of aggregation. The new global model that has passed the verification is grouped by device type (washing machine group, air conditioner group, fan group, etc.) and distributed in a personalized manner. Each gateway receives the model update corresponding to the device type, completes the local model replacement and writes it to flash memory, and completes a complete round of end-to-cloud collaborative federated learning iteration.

[0100] Cold start problem solutions:

[0101] For newly connected home gateways, the cloud server pushes the latest aggregated model from the global federated model library corresponding to the device type as the initial model based on the device type identifier reported by the gateway. This allows the new gateway to obtain a high initial recognition accuracy without accumulating a large number of samples locally, effectively solving the cold start problem of low model recognition accuracy due to lack of historical data. Subsequently, the new gateway continues to accumulate local samples through weak supervision and automatic annotation during normal use, participating in subsequent federated learning iterations. The recognition accuracy continues to improve with the increase of usage time, achieving a control experience that becomes more accurate with use.

[0102] VI. Complete system operation loop:

[0103] The system operates in a closed loop. Users issue control commands via mobile applications, voice assistants, or automated rules. The cloud or local home hub interprets the control intent and generates structured control commands, which are then sent to the smart transformation gateway for the corresponding home appliance. After reading the current stable operating status, the gateway executes the control action according to the device type and current status, entering the corresponding control strategy sub-process. After the control is executed, a closed-loop confirmation sub-process is entered, verifying the success of the state switch through electrical characteristic changes or electroacoustic feedback. Upon successful confirmation, tagged samples are recorded and the execution result is reported, triggering the writing of local sample buffers for federated learning. If confirmation fails, a retry mechanism is initiated. After more than three retries, a control failure alarm is reported. Once the sample accumulation reaches the trigger condition, asynchronous cloud-end collaborative federated learning updates are triggered, forming a complete closed-loop control link integrating perception, control, and learning, enabling the system to continuously self-optimize during long-term use.

[0104] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, any modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the protection scope defined by the claims of the present invention.

Claims

1. A method of intelligent retrofit control of a domestic appliance, characterized in that: include: Multi-dimensional electrical feature acquisition steps: Through the intelligent transformation gateway connected in series to the power circuit of the controlled home appliance, without changing the internal circuit structure of the controlled home appliance, the high-frequency voltage and current trajectory signals and near-field electromagnetic radiation signals of the power supply end of the controlled home appliance are acquired simultaneously. The high-frequency voltage and current trajectory signals are processed in frames on a single power frequency cycle basis. Each frame extracts a voltage and current statistical feature vector including active power, reactive power, apparent power, power factor, total harmonic distortion rate of current, and amplitude of each harmonic current. At the same time, the near-field electromagnetic radiation signal is integrated into multiple sub-frequency bands that are logarithmically evenly divided to form an electromagnetic radiation spectrum energy feature vector. The voltage and current statistical feature vector and the electromagnetic radiation spectrum energy feature vector are concatenated to form a single-frame fusion feature vector. Multiple consecutive frames of fusion feature vectors are stacked in a sliding window manner to form a time-series input tensor. Edge inference steps: The time-series input tensor is deployed on the lightweight temporal convolutional network inference engine of the intelligent transformation gateway microcontroller, which is subjected to knowledge distillation and integer quantization compression, to obtain the predicted probability vector of the current internal working state of the controlled home appliance. The category corresponding to the highest probability is taken as the predicted state, and the results of multiple consecutive inferences are temporally smoothed using a majority voting sliding window to output a stable working state. Safe and flexible control steps: The control decision module integrated in the main control unit of the smart transformation gateway microcontroller automatically matches the corresponding control strategy based on the stable working state and external control commands. The control decision module matches the device operation category to which the stable working state belongs, including high-speed motor operation, infrared controllable operation, and pure mechanical knob operation. This overcomes the technical bias of existing smart socket hard cut-off solutions that execute control without recognizing the internal state of the device and infrared remote control boxes that replay commands without sensing the device state. It realizes the linkage decision-making between state perception and control strategy, and performs closed-loop confirmation through changes in electrical characteristics after the control is executed. Edge-cloud collaborative learning steps: After the control command is executed, labeled training samples are automatically generated by comparing the electrical feature inference states before and after control. After accumulating to a preset number, local incremental stochastic gradient descent training is triggered. The model gradient difference is calculated and encrypted after differential privacy processing before being uploaded to the cloud federated aggregation server. The cloud server performs federated average aggregation weighted by data volume and distributes the updated global model to each smart transformation gateway in groups according to device type, completing the continuous personalized optimization of the lightweight edge model.

2. The intelligent transformation and control method for household appliances according to claim 1, characterized in that: The voltage and current statistical feature vector includes active power, reactive power, apparent power, power factor, total harmonic distortion rate of current, and amplitude of the second to fifteenth harmonic currents. The electromagnetic radiation spectrum energy feature vector is divided into sixteen logarithmically evenly spaced sub-bands, covering a frequency range of 150 kHz to 30 MHz. Each component is the integral value of the power spectral density curve within the corresponding sub-band. The dimension of the stitched single-frame fused feature vector is 43 dimensions, the sliding window length is 30 frames, and the temporal input tensor dimension is 30 rows and 43 columns.

3. The intelligent transformation and control method for household appliances according to claim 1, characterized in that: The lightweight temporal convolutional network consists of three stacked causal dilated convolutional residual blocks, with dilation factors of 1, 2, and 4 for each residual block, a kernel size of 3, and 32 channels. After stacking the three layers, the total receptive field covers 15 frames of temporal context. The knowledge distillation uses a full-precision large model in the cloud as the teacher model and the lightweight temporal convolutional network at the edge as the student model. The distillation loss function is a weighted combination of hard-label cross-entropy loss and soft-label divergence loss, with a temperature coefficient of 4 and a hard-label loss weight of 0.

3. After distillation, symmetric linear integer quantization compression is performed on the student model. After quantization, the model's single inference latency is less than 50 milliseconds, and the memory usage is less than 256 kilobytes.

4. The intelligent transformation and control method for household appliances according to claim 1, characterized in that: The specific process of the flexible switching of the zero-crossing detection relay is as follows: After the control decision module determines that the current stable working state belongs to the high-speed operation of the motor, it enables the zero-crossing detection interruption. After the most recent zero-crossing event of the AC power grid is triggered, it drives the relay coil to complete the contact switching. After the relay action is completed, it compares the changes in active power and apparent power before and after the switching within 500 milliseconds to perform closed-loop confirmation. If the expected electrical characteristic change is not detected, it enters the retry process, and retrying up to three times. When the controlled home appliance is in standby mode, the control decision module determines that there is no need to wait for the zero-crossing moment and directly executes the relay action.

5. The intelligent transformation and control method for household appliances according to claim 1, characterized in that: The specific process of the infrared command reconstruction combination control is as follows: query the infrared protocol format and command code mapping table corresponding to the controlled home appliance from the local device command library, generate the optimal infrared command sequence required for state transition by combining the current stable working state and the target control state, and transmit each infrared command in sequence with an interval of 200 milliseconds between each command. Within three seconds after the transmission is completed, detect whether the change in electromagnetic radiation characteristics corresponds to the characteristics of the target state, perform closed-loop confirmation, and if the confirmation fails, retransmit the command, with a maximum of three retries.

6. The intelligent transformation and control method for household appliances according to claim 1, characterized in that: The automatic generation method of the labeled training samples is as follows: record the stable working state before the execution of the control command and the stable working state obtained by electrical feature inference after the execution. Use the state after execution as a label to form positive samples and add them to the local sample buffer. When the number of accumulated samples in the buffer reaches fifty or the 30-minute update cycle is reached, the local incremental training is triggered after three rounds of local stochastic gradient descent iterations on the local dataset with the current globally issued model parameters as initialization. The learning rate is set to 0.

01.

7. The intelligent transformation and control method for household appliances according to claim 1, characterized in that: The specific process of differential privacy processing is as follows: the difference between the model parameters after local incremental training and the globally distributed model parameters is calculated to obtain the gradient difference. The gradient difference is then subjected to L2 norm pruning based on a pruning threshold of 1.

0. Gaussian noise with a mean of zero and a variance equal to the product of the square of the noise intensity coefficient of 0.01 and the square of the pruning threshold is injected. After obtaining the privacy-preserving gradient, it is encrypted using a transport layer security protocol and uploaded to the cloud server without uploading any original power data.

8. The intelligent transformation and control method for household appliances according to claim 1, characterized in that: The specific process of cloud-based federated aggregation is as follows: The cloud server waits to receive gradient uploads from at least 30% of the clients participating in this round of aggregation, executes a federated average aggregation algorithm weighted by local data volume to calculate the parameters of the new round of global model, evaluates the accuracy of the aggregated model on a standard test set, and if the accuracy is improved by more than 0.5 percentage points compared to the previous round, the new global model is grouped by device type and distributed in a personalized manner; otherwise, the aggregation results of this round are discarded. Each gateway receives the model update corresponding to the device type, completes the local model replacement, and writes it to flash memory.

9. The intelligent transformation and control method for household appliances according to claim 1, characterized in that: For newly connected smart transformation gateways, the cloud server pushes the latest aggregated model from the global federated model library of the corresponding device type as the initialization model to the new gateway based on the device type identifier reported by the gateway. This allows the new gateway to obtain a high initial recognition accuracy without accumulating a large number of samples locally, solving the cold start problem of low recognition accuracy caused by the lack of historical data when new devices are connected.

10. The intelligent transformation and control method for household appliances according to claim 1, characterized in that: The length of the majority voting sliding window is five. The mode of five consecutive inference results is taken as the stable working state output to suppress single-frame inference jitter. The sampling rate of the high-frequency voltage and current trajectory signal is 10,000 times per second, and it is quantized by 16-bit analog-to-digital conversion. The intelligent transformation gateway is connected to the power circuit of the controlled home appliance in series and integrates a high-frequency analog-to-digital conversion sampling module, an electromagnetic radiation antenna module, a zero-crossing detection circuit, a relay drive module, an infrared transceiver module, and a microcontroller main control unit. All modules are converged to the microcontroller main control unit through an internal bus.