A residual current decomposition and safety identification method based on conditional flow matching and multi-modal fusion
Patent Information
- Application Number
- CN202610747796.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-28
AI Technical Summary
然而,从总剩余电流中分离出微弱的支路剩余电流面临极大挑战:
1、高精度分解:引入流匹配生成模型,通过确定性概率路径学习,有助于提升在低信噪比环境下对微弱剩余电流信号的分离能力。
Smart Images

Figure CN122654718A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrical safety monitoring and non-intrusive load monitoring (NILM), and in particular to a residual current decomposition and safety identification method based on conditional current matching and multimodal fusion. Background Technology
[0002] As building electrical systems become increasingly complex, the risk of electrical fires has increased significantly. Traditional electrical safety monitoring mainly relies on intrusive sensors (such as residual current transformers installed in each branch circuit), which suffers from problems such as complex wiring, high costs, and difficulty in large-scale deployment in existing buildings.
[0003] Chinese patent document CN117272230A discloses a non-intrusive load monitoring method and system based on a multi-task learning model, comprising: S1, acquiring total power data of residential user houses for training; S2, preprocessing the labeled data to obtain multiple segmented training sets; S3, inputting the training sets into a detection network based on multi-task learning in parallel to obtain a non-intrusive load monitoring model; S4, inputting the actual total power data of residential user houses into the non-intrusive load monitoring model to obtain the power sequence of individual electrical appliances and the probability sequence of appliance operating states, calculating and outputting the product of the two sequences; S5, comparing the actual power sequence of individual electrical appliances with the power sequence of individual electrical appliances obtained by the model, and optimizing the non-intrusive load monitoring model based on the comparison results.
[0004] Chinese patent document CN120448767A discloses a non-intrusive load monitoring method and system based on TransUNet, including: acquiring historical total power load and power consumption data of individual devices; using a non-intrusive load monitoring model to learn from the historical total power load and power consumption data of individual devices to identify the characteristics of different devices during use; and analyzing the collected real-time total power load data according to the trained non-intrusive load monitoring model to output the identification result of non-intrusive load.
[0005] While non-intrusive load monitoring (NILM) technology can decompose equipment energy consumption at the main inlet, existing research has focused on power decomposition, neglecting the decomposition of a key safety parameter—residual current.
[0006] Residual current is the most direct indicator of the condition of electrical insulation, especially the fundamental residual current component, which effectively reflects resistive leakage caused by insulation degradation. However, separating the weak branch residual current from the total residual current presents a significant challenge: 1. Extremely low signal-to-noise ratio: The leakage current of normal equipment is usually in the milliampere range, which is easily drowned out by environmental noise.
[0007] 2. Nonlinear coupling: There is a complex nonlinear superposition relationship between the total residual current and the current in each branch, and traditional linear decomposition methods (such as Fourier transform and independent component analysis) are not effective.
[0008] 3. Lack of physical constraints: Most existing deep learning models are black-box mappings, which often ignore physical conservation constraints such as Kirchhoff's Current Law (KCL), resulting in physically unreasonable decomposition results, and even the fallacy that the sum of branch currents is much greater than the total current.
[0009] In recent years, flow matching, as an emerging generative model, has been able to efficiently learn mappings between complex distributions by constructing deterministic probabilistic paths and vector fields. However, how to deeply integrate flow matching technology with electrical physics mechanisms to achieve high-fidelity, interpretable residual current decomposition remains a technological gap. Furthermore, existing methods lack the quantification of uncertainty in prediction results, making it difficult to distinguish between real potential hazards and model false alarms. Summary of the Invention
[0010] This invention provides a residual current decomposition and safety identification method based on conditional current matching and multimodal fusion. By constructing a rigorous mathematical model and physical constraint mechanism, high-precision and interpretable residual current decomposition can be achieved.
[0011] A residual current decomposition and safety identification method based on conditional current matching and multimodal fusion includes the following steps: (1) Collect the total residual current sequence, total power sequence and branch power sequence of the target power distribution system, and obtain the input sample after preprocessing; (2) The input samples are processed using a time-series feature extraction model and a feature encoding model to extract the time-series waveform features of the total residual current and the operating condition features of the power sequence, respectively; and a cross-modal attention mechanism is used to generate a conditional context vector that integrates physical operating condition information. (3) Define the probability path from the noise distribution to the actual branch residual current distribution; construct a conditional vector field network, which adopts a structure combining residual blocks and parallel branches with different convolutional expansion coefficients, and train the conditional vector field network with the conditional context vector as a constraint to predict the vector field and learn the evolution law under multiple time scales; introduce a physical constraint regularization term based on Kirchhoff's current law into the loss function; (4) Initialize random noise, use the trained conditional vector field network, and solve the ordinary differential equation using the numerical integration method to transform the noise into the residual current sequence of the target branch; keep the Dropout layer active during the inference process, and calculate the prediction variance through multiple sampling to quantify the uncertainty; (5) Identify and warn of electrical safety hazards based on the residual current sequence obtained from the decomposition.
[0012] Step (1) constructs a physically consistent input sample space through rigorous mathematical transformations. The specific process is as follows: (1-1) Use high-precision current transformers and smart meters with high-frequency or low-frequency sampling to synchronously collect the total residual current sequence of the target power distribution system. Total active power sequence and the active power sequence of each branch to be monitored ; Indicates the first A branch road; (1-2) Perform multi-source time alignment on the collected raw data, use mean interpolation or linear interpolation algorithm to fill in the missing values caused by sensor packet loss, and perform physical constraint verification on the data according to Kirchhoff's current law. When the relative error between the sum of the measured total power and the branch power exceeds the preset threshold, the data segment is discarded or marked. (1-3) A sliding window mechanism is used to divide the continuous sequence into sample segments of fixed length, and Z-Score standardization is performed on the global mean and standard deviation of the training set for current data and power data respectively to eliminate the difference in dimensions.
[0013] In steps (1-2), the clock deviation of the multi-source sensors is addressed. Using linear interpolation function Map asynchronous sequences to a unified time axis : ; For missing data points, the mean of the preceding and following neighborhoods is used to fill in the gaps, ensuring the continuity of the sequence.
[0014] Kirchhoff physical verification and adjustment, specifically including: Define power conservation residual : ; If relative error If a sample fails to meet a preset threshold (e.g., 0.05), it is marked as an anomaly; otherwise, the branch power is corrected using a weighted adjustment method. ; In steps (1-3), the current and power sequences are Z-score normalized to eliminate dimensions: ; in , These are the global mean and standard deviation of the training set, respectively.
[0015] The specific process of step (2) is as follows: (2-1) The preprocessed total residual current sequence Input the time series feature extraction model to obtain the spatiotemporal features of the current. ; (2-2) The preprocessed total active power sequence With branch active power sequence After concatenating the feature dimensions, the power features are input into the feature encoding model to obtain the power features. ; (2-3) Utilizing the cross-modal cross-attention mechanism, based on the spatiotemporal characteristics of current For the query vector Query, with power features Given the key vector Key and the value vector Value, the conditional context vector Z for generating fused physical condition information is calculated.
[0016] The feature encoding model, temporal feature extraction model, and generation model in this invention are not limited to specific network structures. Any model that can achieve feature extraction, feature mapping, or probability distribution modeling can be used, including but not limited to convolutional neural networks, recurrent neural networks, attention mechanism models, or other deep learning models.
[0017] Preferably, the temporal feature extraction model includes a one-dimensional convolutional layer Conv1D and a bidirectional long short-term memory network BiLSTM; the feature encoding model adopts a multilayer perceptron (MLP).
[0018] In step (2-1), the spatiotemporal characteristics of the current are obtained. The formula is: .
[0019] In step (2-2), the spliced power sequence After multilayer perceptron (MLP) encoding, the following is obtained: .
[0020] In steps (2-3), the calculation formula for the cross-modal cross-attention mechanism is as follows: ; in, , , The linear transformation parameter matrix is learnable. Let be the dimension of the key vector. For the spatiotemporal characteristics of current, For power characteristics, Will Mapped to The dimension of the conditional context vector Z obtained after transformation is the same as the dimension of the value vector V.
[0021] The conditional context vector Z contains deep correlation information between the current evolution trend and the external power conditions, serving as a strong conditional constraint for the subsequent generative model.
[0022] The specific process of step (3) is as follows: (3-1) Definition from standard Gaussian noise distribution To the actual branch residual current distribution A straight probability path; (3-2) During the training process, random sampling time steps and noise samples ~N(0,I), intermediate states on the construction path and theoretical target vector field ;in This is the actual sequence of residual currents in the branches. It is random noise; (3-3) Using conditional context vectors To constrain the network, a conditional vector field network is constructed. The conditional vector field network adopts a structure combining residual blocks and multi-branch dilated convolution, with different branches using different convolution dilation coefficients. The local branch r∈{1,2} and the global branch r∈{4,8,16} are used to capture multi-scale features. (3-4) Train the conditional vector field network to predict the vector field, and define the flow matching loss between the predicted vector field and the theoretical target vector field. At the same time, physical constraint regularization terms based on Kirchhoff's current law are introduced. Construct the total loss function .
[0023] In steps (3-4), the flow matching loss and physical constraint regularization terms The calculation formula is as follows: ; ; Where M is the total number of branches, For the first The branch road in the first The predicted current value at each time step. The measured total residual current on the 1st The value of each time step.
[0024] This forces the vector field predicted by the network to approximate the transmission path of the real data distribution; Force all branch prediction results The sum converges to the measured total residual current. , This is the balance coefficient (usually taken as 0.1~1.0).
[0025] The specific process of step (4) is as follows: (4-1) In the application phase, the total residual current and power data of the current window are collected and processed by the feature encoding model to obtain the conditional context vector; (4-2) Initialize random noise, preset the number of integration steps N, and the step size ; (4-3) Using the trained conditional vector field network, the ordinary differential equation is solved by numerical integration, and the noise is gradually transformed into the predicted residual current sequence of the target branch. (4-4) During the inference process, the Dropout layer in the generator network is kept active. M independent forward propagations are performed on the same input condition, and the variance of the M prediction results is calculated as the prediction uncertainty index.
[0026] Preferably, in step (4-3), the numerical integration method adopts the fourth-order Runge-Kutta method, as follows: Initial noise Set step size At every step The updated state is evaluated using a fourth-order vector field: ; ; ; ; ; The final predicted sequence is obtained after N iterations. .
[0027] Monte Carlo Dropout Uncertainty Quantification: During the inference phase, the Dropout layer is kept active (retention rate p=0.9), and M independent forward propagations are performed on the same input Z to obtain the prediction set. .
[0028] Calculate the predicted mean and variance : ; ; This refers to the uncertainty index for prediction, which is used to measure the reliability of the results.
[0029] The specific process of step (5) is as follows: (5-1) Calculate the effective value of the residual current sequence of the target branch obtained by decomposition. and average prediction variance .
[0030] (5-2) Hierarchical decision-making logic: According to the preset threshold (Current amplitude threshold) and (Uncertainty threshold) Perform hierarchical judgment.
[0031] Level 1 alarm (actual leakage): If (e.g., 30mA) and If the problem is identified as a high-confidence potential hazard, a trip command will be output.
[0032] Level 2 alarm (data anomaly): If but If the fault is determined to be sensor interference or an unknown fault, a warning will be issued but the circuit breaker will not trip.
[0033] Level 3 Warning (Early Trend): If ≤ And continuous The number of windows shows an upward trend (slope > 0). ), and provide maintenance suggestions.
[0034] Compared with the prior art, the present invention has the following beneficial effects: 1. High-precision decomposition: The introduction of a flow matching generation model and the use of deterministic probabilistic path learning help to improve the ability to separate weak residual current signals in low signal-to-noise ratio environments.
[0035] 2. Physical interpretability: Kirchhoff's current law (KCL) is innovatively introduced into the loss function as a soft constraint to ensure that the decomposition results conform to the physical laws of the circuit and improve the reliability of the model.
[0036] 3. Multi-scale perception: Through a multi-branch dilated convolution architecture, it simultaneously captures the transient spikes and progressive drift characteristics of residual current, adapting to the multi-timescale characteristics of electrical hazard evolution.
[0037] 4. Uncertainty Quantification: Provides confidence assessment of prediction results, which helps to distinguish between real hidden dangers and model false alarms, and reduces the false alarm rate of the safety early warning system.
[0038] 5. Strong generalization ability: By adopting a conditional input mechanism, a single model can decompose any number and type of branches without the need to train a separate model for each device.
[0039] 6. Code-level implementability: The solution is based entirely on a runnable deep learning architecture (ResNet+BiLSTM+Attention), with detailed specifications.
[0040] 7. Credibility assessment: In some implementations, Monte Carlo Dropout is introduced to quantify uncertainty and significantly reduce the false alarm rate. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0042] Figure 1 This is a flowchart of a residual current decomposition and safety identification method based on conditional flow matching and multimodal fusion according to an embodiment of the present invention.
[0043] Figure 2 This is a flowchart illustrating the workflow of the temporal feature extraction model and the feature encoding model in this embodiment of the invention.
[0044] Figure 3 This is the system framework diagram corresponding to the present invention. Detailed Implementation
[0045] 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 some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0046] It should be noted that, unless otherwise specified, the features in the following embodiments and implementation methods can be combined with each other.
[0047] like Figures 1-3 As shown, a residual current decomposition and safety identification method based on conditional current matching and multimodal fusion includes: S10. Synchronously acquire multi-source current and power data, and perform time alignment and physical consistency verification based on Kirchhoff's laws.
[0048] Collect the total residual current sequence and total active power sequence at the main power inlet, as well as the active power sequence of the branch to be decomposed; resample the multi-source heterogeneous data to unify the time base, and verify and correct the physical rationality of the data according to Kirchhoff's Current Law (KCL).
[0049] The specific implementation method of step S10 is as follows: S101. Using a residual current sensor and power meter with a sampling frequency ≥ 4kHz, synchronously collect the residual current waveform and active power data of the target building's electrical circuit bus terminal and each electrical equipment terminal. Since the sampling clocks of different sensors may deviate, the data of each channel is first resampled to a unified frequency, and linear interpolation is used to fill in the missing data points caused by communication packet loss.
[0050] S102. Perform a physical consistency check. According to Kirchhoff's current law, theoretically, the total residual current should equal the sum of the residual currents in each branch. For minor deviations caused by measurement errors (relative errors within a preset threshold)... (Inner) The weighted adjustment method is used to distribute the residuals to each branch according to the power weight, and the physical logic is forced to be satisfied; abnormal data that exceeds the threshold is removed or marked.
[0051] S20. Construct a dual-stream feature coding architecture and use a cross-modal attention mechanism to fuse waveform and operating condition features to generate conditional vectors.
[0052] A one-dimensional convolutional neural network (CNN) is used to extract local impulse features of the total residual current sequence, and a bidirectional long short-term memory network (BiLSTM) is combined to capture its long-range temporal dependence, generating a current spatiotemporal feature vector. A fully connected network is used to encode the total active power and the power of the branch to be decomposed, generating a power background feature vector. Through a cross-modal attention mechanism, the two types of features are dynamically fused with current features as queries and power features as keys and values to generate a conditional guidance vector containing operating condition information.
[0053] like Figure 2 As shown, the specific implementation method of step S20 is as follows: S201. Construct a dual-stream coding structure. Utilize the time-series feature extraction model as the current coding branch, inputting the total residual current sequence. First, local mutation fingerprints in the waveform are captured through multiple one-dimensional convolutional layers (Conv1D), with batch normalization (BN) and ReLU activation functions applied after each convolutional layer. Then, a bidirectional long short-term memory network (BiLSTM) is connected, utilizing historical and future contextual information to output current features rich in temporal dynamics. ; S202, The feature coding model serves as the power coding branch, with the total active power sequence as input. and the active power sequence of the target branch After concatenating the two, a nonlinear transformation is performed through a multilayer fully connected network (FC) to extract features reflecting the background of equipment operating load. ; S203, Introduce a cross-modal attention mechanism for feature fusion. Mapped to query vector Q, Mapped to key vector K Sum value vector V Calculate the attention weights and generate the final conditional guidance vector. Z : ; in, , , The linear transformation parameter matrix is learnable. Let be the dimension of the key vector. For the spatiotemporal characteristics of current, For power characteristics, Will Mapped to The dimension of the conditional context vector Z obtained after transformation is the same as the dimension of the value vector V.
[0054] S30. Construct a multi-scale conditional flow matching generation network and introduce physical conservation regularization terms to constrain vector field prediction training.
[0055] A conditional flow matching model based on ordinary differential equations (ODE) is constructed to learn a deterministic probabilistic path from a simple prior distribution to the residual current distribution of the target branch. The conditional guidance vector, the current evolution state, and the time step are used as inputs. The conditional vector field is parameterized through a deep residual network to guide the evolution of noise samples towards the residual current sequence of the target branch. A multi-scale probabilistic path learning strategy is adopted to capture instantaneous leakage spikes and long-term insulation degradation trends in parallel, and KCL soft constraints are added to the loss function.
[0056] The specific implementation method of step S30 is as follows: S301. Construct the conditional vector field network. A deep residual network (ResNet) is used as the backbone. Inputs include: the current evolutionary state. (Initially Gaussian noise), time step (embedded via sinusoidal position encoding) and the conditional vector generated in step S20 The network contains multiple residual blocks, each consisting of LayerNorm, SiLU activation function, and fully connected layers, outputting a predicted vector field. ; S302. Implement multi-scale modeling. To simultaneously capture transient leakage pulses and steady-state leakage drift, the vector field network is designed as a multi-branch parallel structure. Different branches employ convolutional layers with different dilation rates, corresponding to the local fine-scale and global trend scales, respectively. The total loss function is a weighted sum of the flow matching losses at each scale: ; in, For scale quantity, These are the balance coefficients at each scale. This represents the actual residual current in the branch. It is random noise.
[0057] S303. Add KCL constraint terms to the total loss function to improve the physical interpretability of the decomposition results: ; in, , where is the mean square error between the sum of the predicted residual currents of all branches and the measured total residual current. This is the balance coefficient.
[0058] S40. Initialize the noise and solve the evolution equation using the fourth-order Runge-Kutta method, combining multiple sampling to quantify the uncertainty.
[0059] During the inference phase, standard Gaussian noise is sampled as the initial state. Using the trained vector field network, the fourth-order Runge-Kutta method (RK4) is used to numerically solve the ordinary differential equation. The equation is integrated from the initial time to the final time to obtain the estimated value of the residual current of the branch. The Dropout layer in the network is kept on, and the same input is propagated forward multiple times. The variance of the predicted sample is calculated as an uncertainty index.
[0060] The specific implementation method of step S40 is as follows: S401. During the inference phase, given new total path observation data and target branch power, sample standard Gaussian noise. Using a trained vector field network, the fourth-order Runge-Kutta method (RK4) is employed to numerically solve the ordinary differential equations. ,from Points to The estimated value of the residual current of the branch is obtained. ; S402. Perform uncertainty assessment. Keep the Dropout layer in the network enabled and perform multiple forward propagations (e.g., M=50 times) on the same input to obtain a set of predicted samples. Calculate the variance of these samples. 2 serves as an indicator of predictive uncertainty.
[0061] S50 uses a multi-dimensional analysis of the decomposed current sequence and uncertainty indicators to identify safety hazards and trigger graded early warnings.
[0062] The residual current sequence of the target branch obtained from the decomposition is calculated as the effective value. The reliability of the results is assessed by combining the average prediction variance; when When the threshold is exceeded and the prediction variance is small, it is judged as a high-confidence leakage potential; when If the data exceeds the threshold but the prediction variance is large, it is judged as data anomaly or strong interference; when If the limit is not exceeded but multiple windows continue to rise, an early maintenance warning will be issued.
[0063] The specific implementation method of step S50 is as follows: S501, Set effective value threshold: current amplitude threshold and uncertainty threshold Number of trend determination windows and trend slope threshold ; S502, Execute hierarchical analysis logic: Level 1 alarm (actual leakage): If (e.g., 30mA) and If the problem is identified as a high-confidence potential hazard, a trip command will be output.
[0064] Level 2 alarm (data anomaly): If but If the fault is determined to be sensor interference or an unknown fault, a warning will be issued but the circuit breaker will not trip.
[0065] Level 3 Warning (Early Trend): If ≤ And continuous The number of windows shows an upward trend (slope > 0). ), and provide maintenance suggestions.
[0066] The embodiments described above provide a detailed explanation of the technical solutions and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A residual current decomposition and safety identification method based on conditional current matching and multimodal fusion, characterized in that, Includes the following steps: (1) Collect the total residual current sequence, total power sequence and branch power sequence of the target power distribution system, and obtain the input sample after preprocessing; (2) The input samples are processed using the time-series feature extraction model and the feature encoding model to extract the time-series waveform features of the total residual current and the operating condition features of the power sequence, respectively; A cross-modal attention mechanism is used to generate a conditional context vector that integrates physical condition information; (3) Define the probabilistic path from the noise distribution to the actual branch residual current distribution; A conditional vector field network is constructed, which adopts a structure combining residual blocks and parallel branches with different convolutional dilation coefficients. The conditional vector field network is trained with conditional context vectors as constraints to predict vector fields and learn the evolution law under multiple time scales. A physical constraint regularization term based on Kirchhoff's current law is introduced into the loss function. (4) Initialize random noise, use the trained conditional vector field network, and solve the ordinary differential equation using the numerical integration method to transform the noise into the residual current sequence of the target branch; keep the Dropout layer active during the inference process, and calculate the prediction variance through multiple sampling to quantify the uncertainty; (5) Identify and warn of electrical safety hazards based on the residual current sequence obtained from the decomposition.
2. The residual current decomposition and safety identification method based on conditional current matching and multimodal fusion according to claim 1, characterized in that, The specific process of step (1) is as follows: (1-1) Use high-precision current transformers and smart meters with high-frequency or low-frequency sampling to synchronously collect the total residual current sequence of the target power distribution system. Total active power sequence and the active power sequence of each branch to be monitored ; Indicates the first A branch road; (1-2) Perform multi-source time alignment on the collected raw data, use mean interpolation or linear interpolation algorithm to fill in the missing values caused by sensor packet loss, and perform physical constraint verification on the data according to Kirchhoff's current law. When the relative error between the sum of the measured total power and the branch power exceeds the preset threshold, the data segment is discarded or marked. (1-3) A sliding window mechanism is used to divide the continuous sequence into sample segments of fixed length, and Z-Score standardization is performed on the global mean and standard deviation of the training set for current data and power data respectively to eliminate the difference in dimensions.
3. The residual current decomposition and safety identification method based on conditional current matching and multimodal fusion according to claim 1, characterized in that, The specific process of step (2) is as follows: (2-1) The preprocessed total residual current sequence Input the time series feature extraction model to obtain the spatiotemporal features of the current. ; (2-2) The preprocessed total active power sequence With branch active power sequence After concatenating the feature dimensions, the power features are input into the feature encoding model to obtain the power features. ; (2-3) Utilizing the cross-modal cross-attention mechanism, based on the spatiotemporal characteristics of current For the query vector Query, with power features Given the key vector Key and the value vector Value, the conditional context vector Z for generating fused physical condition information is calculated.
4. The residual current decomposition and safety identification method based on conditional current matching and multimodal fusion according to claim 3, characterized in that, The temporal feature extraction model includes a one-dimensional convolutional layer Conv1D and a bidirectional long short-term memory network BiLSTM; The feature encoding model uses a multilayer perceptron (MLP).
5. The residual current decomposition and safety identification method based on conditional current matching and multimodal fusion according to claim 3, characterized in that, In steps (2-3), the calculation formula for the cross-modal attention mechanism is as follows: ; in, , , The linear transformation parameter matrix is learnable. Let be the dimension of the key vector. For the spatiotemporal characteristics of current, For power characteristics, Will Mapped to The dimension of the conditional context vector Z obtained after transformation is the same as the dimension of the value vector V.
6. The residual current decomposition and safety identification method based on conditional current matching and multimodal fusion according to claim 1, characterized in that, The specific process of step (3) is as follows: (3-1) Definition from standard Gaussian noise distribution To the actual branch residual current distribution A straight probability path; (3-2) During the training process, random sampling time steps and noise samples ~N(0,I), intermediate states on the construction path and theoretical target vector field ; (3-3) Using conditional context vectors To constrain the network, a conditional vector field network is constructed. The conditional vector field network adopts a structure that combines residual blocks with multi-branch dilated convolution, with different branches using different convolution dilation coefficients to capture multi-scale features; (3-4) Train the conditional vector field to predict the vector field, and define the flow matching loss between the predicted vector field and the theoretical target vector field. At the same time, physical constraint regularization terms based on Kirchhoff's current law are introduced. Construct the total loss function .
7. The residual current decomposition and safety identification method based on conditional current matching and multimodal fusion according to claim 5, characterized in that, In steps (3-4), the flow matching loss and physical constraint regularization terms The calculation formula is as follows: ; ; Where M is the total number of branches, For the first The branch road in the first The predicted current value at each time step. The measured total residual current on the 1st The value of each time step.
8. The residual current decomposition and safety identification method based on conditional current matching and multimodal fusion according to claim 1, characterized in that, The specific process of step (4) is as follows: (4-1) In the application phase, the total residual current and power data of the current window are collected and processed by the feature encoding model to obtain the conditional context vector; (4-2) Initialize random noise, preset the number of integration steps N, and the step size ; (4-3) Using the trained generative network, the ordinary differential equation is solved by numerical integration, and the noise is gradually transformed into the predicted residual current sequence of the target branch. (4-4) During the inference process, the Dropout layer in the generator network is kept active. M independent forward propagations are performed on the same input conditions, and the variance of the M prediction results is calculated as the prediction uncertainty index.
9. The residual current decomposition and safety identification method based on conditional current matching and multimodal fusion according to claim 8, characterized in that, In step (4-3), the numerical integration method adopted is the fourth-order Runge-Kutta method.
10. The residual current decomposition and safety identification method based on conditional current matching and multimodal fusion according to claim 1, characterized in that, The specific process of step (5) is as follows: (5-1) Calculate the effective value of the residual current sequence of the target branch obtained by decomposition. and average prediction variance; (5-2) Based on the preset threshold and Perform hierarchical judgment: If > And the average prediction variance < If it is, it is determined to be a Level 1 alarm; if > But the average prediction variance ≥ If so, it is determined to be a level two alarm; if ≤ And continuous Each window If the trend is upward, it is determined to be a Level 3 warning; (5-3) Output graded early warning signals based on the judgment results, and perform trip protection operation on the first-level alarm linkage control circuit breaker.
Citation Information
Patent Citations
Non-intrusive load monitoring method and system based on multi-task learning model
CN117272230A
TransUNet-based non-intrusive load monitoring method and system
CN120448767A