A power quality disturbance identification method and device for a power distribution terminal

CN122839074APending Publication Date: 2026-09-29YUNNAN POWER GRID CO LTD KUNMING POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611129881.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0004]本申请的主要目的在于提供一种配电终端电能质量扰动识别方法及装置,旨在解决现有技术中针对大规模配电终端难以快速、准确地识别电能质量扰动,实时性和准确性较差的技术问题

Benefits of technology

[0019]本申请提供了一种配电终端电能质量扰动识别方法,在目标配电终端的初级检测结果为存在扰动异常时,将目标配电终端在当前时间窗口内的多模态时序信号转换为多模态词元向量;基于多模态词元向量对应的门控权重,对多模态词元向量进行融合,得到融合词元向量;基于融合词元向量对应的多头自注意力矩阵,从融合词元向量中提取出扰动特征向量;基于扰动特征向量与扰动原型向量之间的余弦相似度,确定相似扰动原型向量;基于相似扰动原型向量对应的扰动类别,确定目标配电终端电能质量的当前扰动类别。本申请无需将海量波形数据上传主站进行处理,可以在本地直接进行扰动识别,保证响应的实时性,并利用门控注意力融合机制,向高质量数据倾斜特征权重,融合词元向量能够稳定保留有效的扰动特征,通过多头自注意力矩阵挖掘融合词元向量的时序依赖关系,精准捕捉不同扰动类别的时序特征差异,预构建的扰动原型向量完全贴合配电场景的物理扰动特征分布,可有效避免小样本扰动场景下的过拟合误判,提升识别精度,从而可以在保证识别精度的前提下提升识别的实时性和鲁棒性,同时,仅在初级检测触发异常时,才启动完整识别流程,常态无扰动时段无需运行精细的特征提取与深度分析,减少数据传输负担,解决了针对大规模配电终端难以快速、准确地识别电能质量扰动,实时性和准确性较差的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122839074A_ABST
    Figure CN122839074A_ABST
Patent Text Reader

Abstract

The application discloses a power distribution terminal power quality disturbance identification method and device, and relates to the technical field of power quality monitoring. The method comprises the following steps: when the primary detection result of a target power distribution terminal is that a disturbance anomaly exists, converting the multi-modal time sequence signal of the target power distribution terminal in a current time window into a multi-modal word vector; fusing the multi-modal word vector based on the corresponding gating weight of the multi-modal word vector to obtain a fused word vector; extracting a disturbance feature vector from the fused word vector based on the multi-head self-attention matrix corresponding to the fused word vector; determining a similar disturbance prototype vector based on the similarity between the disturbance feature vector and a disturbance prototype vector; and determining the current disturbance category of the power quality of the target power distribution terminal based on the disturbance category corresponding to the similar disturbance prototype vector. Through the above method, the real-time performance and robustness of the identification are improved under the premise of ensuring the identification accuracy, and the data transmission burden is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power quality monitoring technology, and in particular to a method and device for identifying power quality disturbances in power distribution terminals. Background Technology

[0002] With the widespread integration of distributed energy sources (such as solar and wind power), disturbances such as voltage sags, voltage rises, and harmonics in the power grid system have increased significantly, placing higher demands on the response speed and accuracy of disturbance identification. Power quality disturbance identification mainly relies on uploading massive amounts of waveform data to a central station for centralized analysis. Existing solutions mostly depend on centralized computing architectures or cloud-based analysis models, which struggle to respond quickly and accurately when dealing with large-scale distribution terminals, resulting in poor real-time performance and accuracy.

[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this application is to provide a method and apparatus for identifying power quality disturbances in power distribution terminals, aiming to solve the technical problems in the prior art where it is difficult to quickly and accurately identify power quality disturbances in large-scale power distribution terminals, and where the real-time performance and accuracy are poor.

[0005] To achieve the above objectives, this application provides a method for identifying power quality disturbances in distribution terminals, the method comprising: When the initial detection result of the target power distribution terminal indicates the presence of a disturbance anomaly, the multimodal time-series signal of the target power distribution terminal within the current time window is converted into a multimodal word vector; Based on the gating weights corresponding to the multimodal word vectors, the multimodal word vectors are fused to obtain fused word vectors; Based on the multi-head self-attention matrix corresponding to the fused word vector, a perturbation feature vector is extracted from the fused word vector; Based on the cosine similarity between the perturbation feature vector and the perturbation prototype vector, similar perturbation prototype vectors are determined. Based on the disturbance category corresponding to the similar disturbance prototype vector, the current disturbance category of the power quality of the target distribution terminal is determined.

[0006] In one embodiment, the multimodal timing signal includes a voltage signal, a current signal, and a vibration signal, and the multimodal lexical vector includes a voltage lexical vector, a current lexical vector, and a vibration lexical vector; The steps of converting the multimodal time-series signal of the target power distribution terminal within the current time window into a multimodal word vector include: Based on a preset number, the normalized voltage signal, current signal, and vibration signal are divided into corresponding signal segments. Based on the mean, variance, and peak value of the signal sub-segment, the feature vector of the signal sub-segment is determined; Based on the mapping relationship between word vectors and feature vectors, the feature vectors of the signal sub-segments are mapped to the corresponding word vectors; Based on the word vectors corresponding to the signal segments of the voltage signal, the signal segments of the current signal, and the signal segments of the vibration signal, the initial voltage word vector, the initial current word vector, and the initial vibration word vector are determined respectively. Add corresponding modal recognition vectors and position encoding vectors to the initial voltage term vector, the initial current term vector, and the initial vibration term vector to obtain the voltage term vector, the current term vector, and the vibration term vector.

[0007] In one embodiment, the step of fusing the multimodal lexical vectors based on the gating weights corresponding to the multimodal lexical vectors to obtain fused lexical vectors includes: Based on the gating unit, corresponding gating weights are assigned to the multimodal word vectors; Calculate the signal quality index of the multimodal time-series signal corresponding to the multimodal word vector; Based on the signal quality index corresponding to the multimodal lexical vector, the gating weights of the multimodal lexical vector are corrected to obtain the target gating weights of the multimodal lexical vector; Based on the target gating weights of the multimodal lexical vectors, the multimodal lexical vectors are weighted and fused to obtain fused lexical vectors.

[0008] In one embodiment, the signal quality metric includes the signal-to-noise ratio (SNR), and the step of correcting the gating weights of the multimodal lexical vectors based on the signal quality metric corresponding to the multimodal lexical vectors to obtain the target gating weights of the multimodal lexical vectors includes: Obtain the first correspondence between the signal-to-noise ratio, the gating weight, and the target gating weight; Based on the signal-to-noise ratio corresponding to the multimodal lexical vector, the gating weight corresponding to the multimodal lexical vector, and the first correspondence, the target gating weight of the multimodal lexical vector is determined.

[0009] In one embodiment, the step of determining similar perturbation prototype vectors based on the cosine similarity between the perturbation feature vector and the perturbation prototype vector further includes: Obtain the prototype vector of the disturbance in the current time window and the current adjustment increment; Based on the current adjustment increment, the perturbation prototype vector is fine-tuned.

[0010] In one embodiment, after the step of determining the current disturbance category of the power quality of the target distribution terminal based on the disturbance category corresponding to the similar disturbance prototype vector, the method further includes: Calculate the quality assessment value between the perturbation feature vector and the perturbation prototype vector; Based on the quality assessment value, determine the classification confidence level of the current disturbance category; When the classification confidence score is greater than a preset confidence threshold, the perturbation feature vector and the perturbation prototype vector are smoothed based on the learning rate to obtain the perturbation prototype vector corresponding to the next time window.

[0011] In one embodiment, the step of calculating the quality assessment value between the perturbation feature vector and the perturbation prototype vector includes: Obtain the second correspondence between cosine similarity and quality assessment value; Based on the second correspondence and the cosine similarity between the perturbation feature vector and the perturbation prototype vector, a quality assessment value between the perturbation feature vector and the perturbation prototype vector is determined.

[0012] In one embodiment, after the step of determining the current disturbance category of the power quality of the target distribution terminal based on the disturbance category corresponding to the similar disturbance prototype vector, the method further includes: Based on the local topology matrix, the perturbation feature vector is mapped to a propagation vector; Based on the distance between the propagation vector and the reference fingerprint feature vector of the neighboring node, the perturbation index in the direction of the neighboring node is determined. The initial disturbance source direction is determined based on the disturbance index in the direction of the neighboring node; The initial disturbance source direction and the propagation vector are input into the power grid semantic knowledge graph for semantic reasoning to obtain the current disturbance source direction of the power quality of the target distribution terminal.

[0013] In one embodiment, the step of converting the multimodal timing signal of the target power distribution terminal within the current time window into a multimodal word vector further includes: Based on the lexical dimension and target recognition accuracy of multimodal lexical vectors, predictive inference recognition energy consumption; When the inference and identification energy consumption is less than the currently available energy, the step of converting the multimodal timing signal of the target power distribution terminal within the current time window into a multimodal word vector is performed.

[0014] In one embodiment, before the step of converting the multimodal time-series signal of the target power distribution terminal into a multimodal word vector within the current time window when the initial detection result of the target power distribution terminal indicates the presence of a disturbance anomaly, the method further includes: The multimodal time-series signal within the current time window is extracted from the target power distribution terminal. Based on the weight coefficients corresponding to the multimodal time-series signal, the multimodal time-series signal is weighted and fused to obtain a multimodal fused signal. Based on the target wavelet transform parameters, the multimodal fused signal is subjected to wavelet transform to determine the wavelet energy spectrum; Extract the time-domain features of the multimodal fused signal, and fuse the time-domain features with the wavelet energy spectrum to form a time-frequency joint vector; The time-frequency joint vector is weighted based on the multi-head self-attention matrix to obtain the primary perturbation vector; Anomaly identification is performed based on the primary disturbance vector to determine the primary detection result of the target power distribution terminal.

[0015] Furthermore, to achieve the above objectives, this application also proposes a power quality disturbance identification device for a power distribution terminal, which includes: The data acquisition module is used to convert the multimodal time-series signal of the target power distribution terminal within the current time window into a multimodal word vector when the initial detection result of the target power distribution terminal indicates the presence of a disturbance anomaly. The feature extraction module is used to fuse the multimodal word vectors based on the gating weights corresponding to the multimodal word vectors to obtain fused word vectors. The feature extraction module is further configured to extract perturbation feature vectors from the fused word vectors based on the multi-head self-attention matrix corresponding to the fused word vectors; The type identification module is used to determine similar perturbation prototype vectors based on the cosine similarity between the perturbation feature vector and the perturbation prototype vector; The type identification module is further configured to determine the current disturbance category of the power quality of the target distribution terminal based on the disturbance category corresponding to the similar disturbance prototype vector.

[0016] In addition, to achieve the above objectives, this application also proposes a power quality disturbance identification device for distribution terminals. The power quality disturbance identification device for distribution terminals includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program is configured to implement the steps of the power quality disturbance identification method for distribution terminals as described above.

[0017] In addition, to achieve the above objectives, the present invention also proposes a storage medium, which is a computer-readable storage medium, and stores a computer program on the storage medium. When the computer program is executed by a processor, it implements the steps of the power quality disturbance identification method for power distribution terminals as described above.

[0018] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the power quality disturbance identification method for power distribution terminals as described above.

[0019] This application provides a method for identifying power quality disturbances in a power distribution terminal. When the initial detection result of the target power distribution terminal indicates the presence of an abnormal disturbance, the multimodal time-series signal of the target power distribution terminal within the current time window is converted into a multimodal word vector. Based on the gating weights corresponding to the multimodal word vectors, the multimodal word vectors are fused to obtain a fused word vector. Based on the multi-head self-attention matrix corresponding to the fused word vector, a disturbance feature vector is extracted from the fused word vector. Based on the cosine similarity between the disturbance feature vector and the disturbance prototype vector, a similar disturbance prototype vector is determined. Based on the disturbance category corresponding to the similar disturbance prototype vector, the current disturbance category of the power quality of the target power distribution terminal is determined. This application eliminates the need to upload massive waveform data to a main station for processing, enabling local disturbance identification and ensuring real-time response. It utilizes a gated attention fusion mechanism to prioritize high-quality data, ensuring that the fused word vectors stably retain effective disturbance features. By mining the temporal dependencies of the fused word vectors through a multi-head self-attention matrix, it accurately captures the temporal feature differences of different disturbance categories. The pre-constructed disturbance prototype vectors perfectly match the physical disturbance feature distribution of the power distribution scenario, effectively avoiding overfitting and misjudgment in small-sample disturbance scenarios, thus improving recognition accuracy. This enhances both real-time performance and robustness while maintaining accuracy. Furthermore, the complete recognition process is only initiated when an anomaly is triggered by primary detection; during normal, disturbance-free periods, detailed feature extraction and deep analysis are unnecessary, reducing data transmission burden. This solves the technical problem of slow and accurate identification of power quality disturbances in large-scale power distribution terminals, resulting in poor real-time performance and accuracy. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0021] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart illustrating an embodiment of the power quality disturbance identification method for power distribution terminals in this application. Figure 2 This is a flowchart illustrating Embodiment 2 of the power quality disturbance identification method for distribution terminals in this application; Figure 3 This is a flowchart illustrating Embodiment 3 of the power quality disturbance identification method for distribution terminals in this application; Figure 4 This is a schematic diagram of the module structure of the power quality disturbance identification device for power distribution terminals according to an embodiment of this application; Figure 5 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the power quality disturbance identification method for power distribution terminals in the embodiments of this application.

[0023] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0024] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0025] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0026] The main solution of this application embodiment is as follows: when the initial detection result of the target power distribution terminal indicates the presence of a disturbance anomaly, the multimodal time-series signal of the target power distribution terminal within the current time window is converted into a multimodal word vector; based on the gating weights corresponding to the multimodal word vectors, the multimodal word vectors are fused to obtain a fused word vector; based on the multi-head self-attention matrix corresponding to the fused word vectors, a disturbance feature vector is extracted from the fused word vectors; based on the cosine similarity between the disturbance feature vector and the disturbance prototype vector, a similar disturbance prototype vector is determined; based on the disturbance category corresponding to the similar disturbance prototype vector, the current disturbance category of the power quality of the target power distribution terminal is determined.

[0027] This application provides a solution that eliminates the need to upload massive waveform data to a main station for processing, enabling local disturbance identification and ensuring real-time response. It utilizes a gated attention fusion mechanism to prioritize feature weights for high-quality data, ensuring that the fused word vectors stably retain effective disturbance features. By mining the temporal dependencies of the fused word vectors through a multi-head self-attention matrix, it accurately captures the temporal feature differences of different disturbance categories. The pre-constructed disturbance prototype vectors perfectly match the physical disturbance feature distribution of the power distribution scenario, effectively avoiding overfitting and misjudgment in small-sample disturbance scenarios, thus improving recognition accuracy. This enhances both real-time performance and robustness while maintaining accuracy. Furthermore, the complete recognition process is only initiated when an anomaly is triggered by primary detection; during normal, disturbance-free periods, detailed feature extraction and deep analysis are unnecessary, reducing data transmission burden. This solution addresses the technical problem of slow and accurate identification of power quality disturbances in large-scale power distribution terminals, resulting in poor real-time performance and accuracy.

[0028] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, such as a power distribution terminal power quality disturbance identification device. This embodiment does not specifically limit this. The following uses a power distribution terminal power quality disturbance identification device as an example to describe this embodiment and the following embodiments.

[0029] This application provides a method for identifying power quality disturbances in a power distribution terminal, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the power quality disturbance identification method for power distribution terminals in this application.

[0030] In this embodiment, the power quality disturbance identification method for distribution terminals includes steps S10 to S50: Step S10: When the initial detection result of the target power distribution terminal indicates the presence of a disturbance anomaly, the multimodal time-series signal of the target power distribution terminal within the current time window is converted into a multimodal word vector. It should be noted that the target distribution terminal is the distribution terminal that needs to be identified for power quality disturbances, and it is usually a large-scale distribution terminal.

[0031] Understandably, this embodiment employs a multi-level inference mechanism, setting up a primary running state (dormant state) and a full running state (wake-up state). The full running state is activated only when the primary detection result indicates an anomaly; otherwise, the primary running state is maintained to balance computing power consumption and recognition accuracy. Specifically, in the primary running state, a high-speed power-saving mode is used, performing only simple feature extraction and anomaly detection, making only a "qualitative" judgment—quickly determining whether an anomaly exists and outputting a preliminary anomaly detection result, i.e., the primary detection result. If the primary detection result indicates an anomaly exists, the system enters the full running state for refined feature extraction and in-depth analysis. Although this increases computational load and power consumption, it achieves extremely accurate anomaly identification, not only determining the specific type of anomaly but also providing a data foundation for subsequent tracing.

[0032] It should be understood that both the initial operating state and the complete operating state are based on feature extraction from the multimodal time-series signals of the target power distribution terminal within the current time window. The current time window is the data acquisition window determined according to a pre-set fixed length, typically 0.1s. The multimodal time-series signals are the acquired multimodal signals with time sequence, including voltage signals, current signals, and vibration signals. The vibration signal refers to the fiber optic vibration signal, i.e., the disturbance auxiliary signal caused by cable vibration captured by a distributed fiber optic vibration sensor. Voltage and current signals can be acquired using a high-frequency sampler, with the sampling frequency typically set to 10 kHz. This embodiment introduces vibration signals in addition to voltage and current signals, which improves feature resolution.

[0033] Understandably, to adapt to the Transformer architecture used for feature extraction, the multimodal time-series signal needs to be segmented into corresponding temporal tokens. The vector formed by the sequence of temporal tokens in the multimodal time-series signal is the multimodal token vector. According to different modalities, the multimodal token vector includes voltage token vectors, current token vectors, and vibration token vectors, corresponding to voltage signals, current signals, and vibration signals, respectively.

[0034] In one feasible implementation, the step of converting the multimodal time-series signal of the target power distribution terminal within the current time window into a multimodal term vector includes: dividing the normalized voltage signal, current signal, and vibration signal into corresponding signal segments based on a preset number; determining the feature vector of the signal segment based on the mean, variance, and peak value of the signal segment; mapping the feature vector of the signal segment to the corresponding term vector based on the mapping relationship between the term vector and the feature vector; determining the initial voltage term vector, initial current term vector, and initial vibration term vector based on the term vectors corresponding to the signal segments of the voltage signal, the signal segments of the current signal, and the signal segments of the vibration signal; and adding corresponding modal recognition vectors and position encoding vectors to the initial voltage term vector, the initial current term vector, and the initial vibration term vector to obtain the voltage term vector, the current term vector, and the vibration term vector.

[0035] It should be noted that, due to the potential asynchronous sampling errors in signals of different modes, before processing the multi-mode time-series signal, linear interpolation is used to align the timestamps, and the multi-mode time-series signal is then normalized online, as shown below:

[0036] In the formula, Represents a multimodal timing signal. This represents the normalized multimodal time-series signal. This represents the mean of a multimodal time-series signal. The standard deviation of a multimodal time-series signal is represented by a small constant, typically 10. -6 To prevent the molecule from being zero.

[0037] It is understandable that the preset quantity refers to the number of items to be divided in advance, such as 50, without any specific limitation. The preset quantity will be used as the basis for the division. The normalized voltage signals are respectively Current signal and vibration signals Divided into There are 1 signal sub-segments, and the length of each signal sub-segment is... for , For the preset quantity, Sampling frequency, This represents the length of the current time window. Statistical features (mean, variance, peak value) of each signal segment are extracted as feature vectors and mapped to high-dimensional words, i.e., word vectors, through a linear embedding layer. The mapping relationship between word vectors and feature vectors is shown below:

[0038] In the formula, Indicates the first The word vectors corresponding to each signal segment Indicates the first One signal segment, This represents the weight matrix of the linear embedding layer. This represents the bias vector of the linear embedding layer. The sequence of word vectors corresponding to the signal segments of the voltage signal is used as the initial voltage word vector; the sequence of word vectors corresponding to the signal segments of the current signal is used as the initial current word vector; and the sequence of word vectors corresponding to the signal segments of the vibration signal is used as the initial vibration word vector.

[0039] It should be understood that, in order to distinguish modes, a modal embedding vector is added to the initial voltage term vector, initial current term vector, and initial vibration term vector, and a positional encoding vector is also added to obtain the final voltage term vector, current term vector, and vibration term vector, as shown below:

[0040] In the formula, Represents multimodal word vectors. Represents mode, , , , These are voltage term vectors, current term vectors, and vibration term vectors, respectively. This represents the sequence of word vectors corresponding to the signal segments. This is the initial voltage term vector. For the initial current term vector, For the initial vibrational word vector, This represents the mode identifier vector, and this represents the location encoding vector. Different modes typically use different mode identifier vectors, and there is no specific limitation on this. The location encoding vector is usually used to characterize the node where the target distribution terminal is located in the power grid.

[0041] In one feasible implementation, before the step of converting the multimodal time-series signal of the target power distribution terminal within the current time window into a multimodal lexical vector, the method further includes: predicting the inference recognition energy consumption based on the lexical dimension of the multimodal lexical vector and the target recognition accuracy; and when the inference recognition energy consumption is less than the currently available energy, performing the step of converting the multimodal time-series signal of the target power distribution terminal within the current time window into a multimodal lexical vector.

[0042] Understandably, before entering the full operational state, it's possible to predict the energy / computing power / resource overhead required for feature extraction and deep analysis in the full operational state, i.e., inference recognition energy consumption. Inference recognition energy consumption can be determined based on the lexical dimension of the multimodal lexical vectors and the target recognition accuracy (the required recognition accuracy). Since feature extraction and deep analysis in the full operational state uses a Transformer architecture, it can be considered as using a Multimodal Temporal Transform (MMTT) model to extract perturbation features and identify perturbation categories from multimodal temporal signals. The target recognition accuracy can be reflected in the number of network layers in the MMTT model, or in the computational complexity of feature extraction (e.g., the number of wavelet transform decomposition layers). In specific implementations, inference recognition energy consumption can be predicted based on the lexical dimension of the multimodal lexical vectors, the number of network layers, and the computational complexity of feature extraction, as shown below:

[0043] In the formula, Indicates the energy consumption for reasoning and recognition. Indicates the number of layers in the network. The lexical dimension represents the multimodal lexical vector. This represents the computational complexity of feature extraction. , , , This represents the regression coefficients of the MMTT model obtained through offline training.

[0044] It should be understood that currently available energy refers to the energy / computing power / resource overhead that can be provided at present. If the inference and recognition energy consumption is less than the currently available energy, it means that the model can handle feature extraction and deep analysis under full operational conditions and can normally enter the full operational state. If the inference and recognition energy consumption is greater than or equal to the currently available energy, it means that the model cannot currently handle feature extraction and deep analysis under full operational conditions. In this case, the MMTT model can be dynamically downgraded, for example, by reducing the number of network layers, in order to handle the full operational state.

[0045] Step S20: Based on the gating weights corresponding to the multimodal word vectors, the multimodal word vectors are fused to obtain fused word vectors; In one feasible implementation, step S20 may include steps S201 to S204: Step S201: Based on the gating unit, assign corresponding gating weights to the multimodal lexical vectors; It should be noted that a gate unit (Gating Unit) is a modular functional unit with dynamic information / signal modulation capabilities. This embodiment uses the cross-modal gate unit from the MMTT model. After inputting multimodal lexical vectors into the cross-modal gate unit, it can dynamically adjust the weights of different modal information flows, preventing one modal feature from strongly suppressing other modal information and achieving accurate cross-modal semantic alignment. The dynamic weights of the multimodal lexical vectors, i.e., the gate weights, are calculated using the cross-modal gate unit.

[0046] Understandably, the formula for calculating the gating weights is as follows:

[0047] In the formula, Indicates the gating weight, Represents mode, , Represents multimodal word vectors. , , These are voltage term vectors, current term vectors, and vibration term vectors, respectively. , , These are the gating weights for voltage term vectors, current term vectors, and vibration term vectors, respectively. This indicates the average pooling operation. , This represents the network parameters of the gating unit. This represents the Sigmoid activation function.

[0048] Step S202: Calculate the signal quality index of the multimodal time-series signal corresponding to the multimodal word vector; It should be noted that signal quality metrics are indicators that can reflect the quality / reliability of multimodal time-series signals, such as signal-to-noise ratio (SNR).

[0049] Step S203: Based on the signal quality index corresponding to the multimodal lexical vector, the gating weights of the multimodal lexical vector are corrected to obtain the target gating weights of the multimodal lexical vector; Understandably, the gating weights are further corrected using signal quality metrics, and the corrected gating weights are the target gating weights.

[0050] In one feasible implementation, the quality metric includes the signal-to-noise ratio (SNR), and step S203 includes: obtaining a first correspondence between the SNR, the gating weight, and the target gating weight; and determining the target gating weight of the multimodal lexical vector based on the SNR corresponding to the multimodal lexical vector, the gating weight corresponding to the multimodal lexical vector, and the first correspondence.

[0051] It is understandable that the first correspondence between signal-to-noise ratio, gating weight, and target gating weight refers to the calculation formula for the target gating weight, as shown below:

[0052] In the formula, Indicates the gating weight, Represents mode, , , , These are the gating weights for voltage term vectors, current term vectors, and vibration term vectors, respectively. Indicates the target gating weight. , , These are the target gating weights for voltage term vectors, current term vectors, and vibration term vectors, respectively. This represents the signal quality index corresponding to the multimodal word vector. , , These are the signal quality indices for voltage, current, and vibration term vectors, respectively. Substituting the signal-to-noise ratio (SNR) and gating weights corresponding to the multimodal term vectors into the first correspondence mentioned above, we obtain the target gating weights for the multimodal term vectors.

[0053] S204, based on the target gating weights of the multimodal lexical vectors, the multimodal lexical vectors are weighted and fused to obtain fused lexical vectors.

[0054] It is understandable that by using target gating weights, the multimodal word vectors are weighted and fused. The fused multimodal word vector is the fused word vector, and the calculation relationship is shown below:

[0055] In the formula, Represents the fused word vectors. Indicates the target gating weight. Represents mode, , , , These are the target gating weights for voltage term vectors, current term vectors, and vibration term vectors, respectively. Represents multimodal word vectors. , , These are voltage term vectors, current term vectors, and vibration term vectors, respectively.

[0056] Step S30: Based on the multi-head self-attention matrix corresponding to the fused word vector, extract the perturbation feature vector from the fused word vector; It should be noted that this embodiment uses a multi-head self-attention (MHSA) mechanism to process the fused word vector. Through multiple independent feature projections and parallel attention calculations, it can simultaneously capture the correlations of different dimensions and positions in the fused word vector from multiple different feature subspaces. Multiple heads work in parallel and independently, each focusing on different information dimensions, and finally fuse to obtain a more comprehensive global feature representation.

[0057] It's understandable that the multi-head self-attention matrix is ​​a collective term for all core matrices in the multi-head self-attention mechanism. It includes both the learnable parameter weight matrices from the training phase and the dynamically generated attention weight distribution matrix during forward inference. The learnable parameter weight matrices include the Q (query) / K (key) / V (value) projection weight matrices, the sub-projection matrix specific to each head, and the output projection matrix. The dynamically generated matrices include the attention weight matrix (attention distribution matrix) calculated independently by each head, and the multi-head stacked attention matrix obtained by stacking the attention weight matrices of all heads along a new dimension. The fused word vectors are then compared with the Q projection weight matrix. K-projection weight matrix V projection weight matrix Matrix multiplication is performed to transform the feature space, resulting in three tensors: Q, K, and V. These tensors are then split along the last dimension into h parts (the number of heads). Each head yields a sub-tensor (sub-projection matrix), namely the query matrix, key matrix, and value matrix. Based on the query and key matrices, each head independently computes its attention weight matrix. Each head then uses its own attention weight matrix to perform a weighted summation of the fused word vectors, obtaining the output features for that head, as shown below:

[0058] In the formula, Indicates the first Output features of the head, , , They represent the first The query matrix, key matrix, and value matrix of each size. Indicates the first Attention weight matrix for size, This represents the dimension of a single head. This represents attention operations. This represents the normalized exponential function. The output features of all heads are concatenated, along with the output projection matrix. Matrix multiplication yields the final multi-head attention output, i.e., the multi-head attention features. The entire process can be represented by the following computational formula:

[0059] In the formula, This indicates the characteristics of multi-head attention. Represents the fused word vectors. This indicates a multi-head self-attention mechanism. Indicates the first Output features of the head, Indicates the output projection matrix. Indicates the number of heads. This indicates a splicing operation.

[0060] It should be understood that after global pooling of the multi-head attention features, the input to the fully connected layer is the final output, which is the perturbation feature vector. The calculation relationship is shown below:

[0061] In the formula, This indicates the characteristics of multi-head attention. This represents the perturbation eigenvector. This indicates global pooling processing. This indicates the processing of the fully connected layer.

[0062] Step S40: Determine similar perturbation prototype vectors based on the cosine similarity between the perturbation feature vector and the perturbation prototype vector; Understandably, traditional zero-shot classification relies on predefined prototype vectors but lacks adaptability to the uniqueness of input samples. This embodiment introduces a dynamic prototype adjustment mechanism, enabling the perturbation prototype vector to be fine-tuned in real time according to the input features, thereby enhancing its adaptability to the uniqueness of perturbation feature vectors. At the same time, it combines "cue engineering" to generate semantic labels, enhancing the flexibility and accuracy of classification.

[0063] In one feasible implementation, before step S40, the following steps may be included: obtaining the perturbation prototype vector of the current time window and the current adjustment increment; fine-tuning the perturbation prototype vector based on the current adjustment increment; and determining similar perturbation prototype vectors based on the cosine similarity between the perturbation feature vector and the perturbation prototype vector based on the fine-tuned perturbation prototype vector.

[0064] It should be noted that for each input perturbation feature vector, a lightweight dynamically adjusted network D is used to individually adjust the pre-trained perturbation prototype vectors (corresponding to voltage sags, swells, harmonics, etc.). This dynamically adjusted network D is a lightweight neural network optimized for edge devices (DTUs), requiring minimal computational resources to operate. The input consists of two parts: the "perturbation feature vector" and the perturbation feature vector. "and the corresponding "perturbation prototype vector" "Dynamically adjust network D based on internal parameters" Perform mapping calculations and output a dynamic adjustment increment, i.e., the current adjustment increment. Utilizing dynamic adjustment increments For the original perturbation prototype vector Make fine adjustments as follows:

[0065] In the formula, Indicates the number after fine-tuning The perturbation prototype vector of the category. Represents the original first The perturbation prototype vector of the category. Indicates the first The current adjustment increment for the category.

[0066] Understandably, a corresponding perturbation prototype vector is set for each perturbation category. The initial values ​​of the perturbation prototype vectors are obtained in advance through offline training based on historical power quality data. The perturbation prototype vectors can be acquired and maintained through a dynamic closed-loop mechanism of offline pre-setting and online evolution.

[0067] It should be understood that this embodiment uses cosine similarity as the matching degree / similarity between the perturbation feature vector and the perturbation prototype vector, as shown below:

[0068] In the formula, Indicates the first Cosine similarity of categories This represents the perturbation eigenvector. Indicates the number after fine-tuning The perturbation prototype vector of the category. This represents the vector norm. The perturbation prototype vector with the highest cosine similarity is the similarity perturbation prototype vector.

[0069] Step S50: Based on the disturbance category corresponding to the similar disturbance prototype vector, determine the current disturbance category of the power quality of the target distribution terminal.

[0070] It should be noted that, combining the prompting engineering concept from Natural Language Processing (NLP), a set of semantic description templates is predefined (e.g., "voltage sag event, amplitude decreases by X%, duration Y milliseconds"). Based on the dynamic prototype with the highest similarity (similar perturbation prototype vector), recognition labels are generated, as shown below:

[0071] In the formula, Indicates identification label, This represents the cosine similarity corresponding to the prototype vectors of similar disturbances. The category corresponding to the identification label is the disturbance category corresponding to the prototype vector of similar disturbances, which is the current disturbance category of the target power distribution terminal power quality finally identified.

[0072] In one feasible implementation, step S50 may include: calculating a quality assessment value between the perturbation feature vector and the perturbation prototype vector; determining the classification confidence of the current perturbation category based on the quality assessment value; and when the classification confidence is greater than a preset confidence threshold, smoothing the perturbation feature vector and the perturbation prototype vector based on the learning rate to obtain the perturbation prototype vector corresponding to the next time window.

[0073] It should be noted that the quality assessment value is an indicator used to evaluate the similarity analysis results.

[0074] In one feasible implementation, the step of calculating the quality assessment value between the perturbation feature vector and the perturbation prototype vector includes: obtaining a second correspondence between cosine similarity and quality assessment value; and determining the quality assessment value between the perturbation feature vector and the perturbation prototype vector based on the second correspondence and the cosine similarity between the perturbation feature vector and the perturbation prototype vector.

[0075] Understandably, the second correspondence between cosine similarity and quality assessment value, i.e., the formula for calculating the quality assessment value, is as follows:

[0076] In the formula, Indicates the first Category quality assessment value, Indicates the first Cosine similarity of categories This represents the total number of perturbation categories. Substituting the cosine similarity of each category into the second correspondence mentioned above, we can calculate the quality assessment value for each category. Based on the quality assessment value, the classification confidence score can be calculated as follows:

[0077] In the formula, This represents the classification confidence level, with a value range of [0,1]. Indicates the first Category quality assessment value, Indicates the first The category weights can be updated online using historical data, and the initial values ​​are usually uniformly distributed. This indicates the total number of disturbance categories.

[0078] Understandably, the preset confidence threshold is the pre-defined threshold for classification confidence. If the classification confidence exceeds the preset confidence threshold, the perturbation prototype vector undergoes in-situ incremental evolution, as shown below:

[0079] In the formula, Indicates the next time window corresponding to the first The perturbation prototype vector of the category. Indicates the number corresponding to the current time window The perturbation prototype vector of the category. This represents the perturbation eigenvector. This represents the learning rate, used to control the update magnitude.

[0080] Furthermore, when the adaptive learning module in the MMTT model receives correction feedback from the main station, it will also... The perturbation prototype vector is revised again to achieve long-term online evolution of the perturbation prototype vector.

[0081] This embodiment provides a method for identifying power quality disturbances in a power distribution terminal. When the initial detection result of the target power distribution terminal indicates the presence of a disturbance anomaly, the multimodal time-series signal of the target power distribution terminal within the current time window is converted into a multimodal word vector. Based on the gating weights corresponding to the multimodal word vectors, the multimodal word vectors are fused to obtain a fused word vector. Based on the multi-head self-attention matrix corresponding to the fused word vector, a disturbance feature vector is extracted from the fused word vector. Based on the cosine similarity between the disturbance feature vector and the disturbance prototype vector, a similar disturbance prototype vector is determined. Based on the disturbance category corresponding to the similar disturbance prototype vector, the current disturbance category of the power quality of the target power distribution terminal is determined. This embodiment eliminates the need to upload massive waveform data to the main station for processing, enabling local disturbance identification and ensuring real-time response. It utilizes a gated attention fusion mechanism to prioritize feature weights for high-quality data, ensuring that the fused word vectors stably retain effective disturbance features. By mining the temporal dependencies of the fused word vectors through a multi-head self-attention matrix, it accurately captures the temporal feature differences of different disturbance categories. The pre-constructed disturbance prototype vectors perfectly match the physical disturbance feature distribution of the power distribution scenario, effectively avoiding overfitting and misjudgment in small-sample disturbance scenarios, thus improving recognition accuracy. This allows for improved real-time performance and robustness of the identification while maintaining accuracy.

[0082] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S50 may be followed by steps S601 to S604: Step S601: Based on the local topology matrix, map the disturbance feature vector to a propagation vector; It should be noted that traditional perturbation source tracing relies on global data analysis, which is difficult to implement on edge devices. This embodiment uses a local topology matrix and multi-agent collaboration for perturbation source tracing, and combines the semantic reasoning capabilities of knowledge graphs to enhance the accuracy and interpretability of direction estimation.

[0083] Understandably, by using the local topology matrix to map the disturbance eigenvectors to propagation vectors, the propagation characteristics of disturbances in the power grid topology can be captured, as shown below:

[0084] In the formula, This represents the propagation vector, used to characterize the intensity of the disturbance's impact on neighboring nodes. This represents the perturbation eigenvector. This represents the local topology matrix, constructed based on the physical connections of the power grid and historical data. This represents the bias vector, used to correct mapping deviations.

[0085] Step S602: Based on the distance between the propagation vector and the reference fingerprint feature vector of the neighboring node, determine the perturbation index in the direction of the neighboring node; It should be noted that neighboring nodes are the nodes adjacent to the node where the target power distribution terminal is located. Each neighboring node is regarded as an agent, and each agent has a local model. ( (Index representing neighboring nodes). Local model The model is trained based on historical disturbance data of neighboring nodes. During offline training, the local model is input with historical disturbance data and outputs a fingerprint vector that represents the standard fault characteristics of the neighboring node, i.e., the baseline fingerprint feature vector.

[0086] Understandably, upon receiving the propagation vector from the local topology mapping, each agent calculates the distance between the propagation vector and its own local model in parallel to assess the suspicion of perturbation propagating in the direction of its corresponding neighboring node, i.e., the perturbation index in the direction of the neighboring node. The distance between the propagation vector and the local model refers to the distance between the propagation vector and the reference fingerprint feature vector of the neighboring node output by the local model, typically using Euclidean distance. In this embodiment, the distance between the propagation vector and the reference fingerprint feature vector of the neighboring node is used as the perturbation index in the direction of that neighboring node.

[0087] Step S603: Determine the initial disturbance source direction based on the disturbance index in the direction of the neighboring node; It should be understood that the direction of the neighboring node with the smallest disturbance index is taken as the initial disturbance source direction. This utilizes local edge information to initially locate the source, avoiding reliance on network-wide data and improving source tracing efficiency.

[0088] Step S604: The initial disturbance source direction and the propagation vector are input into the power grid semantic knowledge graph for semantic reasoning to obtain the current disturbance source direction of the power quality of the target distribution terminal.

[0089] It should be noted that this embodiment constructs a lightweight power grid semantic graph. ,in For nodes (equipment, lines). This represents an edge (connection relationship). For relational attributes (such as impedance, load type).

[0090] Understandably, by combining a lightweight power grid knowledge graph with a pre-set set of physical rules (e.g., high-impedance lines are more likely to be disturbance sources) for semantic reasoning and logical correction, the initial disturbance source direction can be corrected, thereby quickly and intelligently outputting the final disturbance source location result at the edge, i.e., the current disturbance source direction.

[0091] It should be understood that the propagation vector and the initial disturbance source direction are jointly input into a lightweight power grid semantic graph. In the semantic map of the power grid The topological connections of the power grid, as well as actual physical properties such as line impedance and load type, are clearly recorded, along with the inference function. It will combine a preset set of physical rules to perform common sense review and logical verification on the initial disturbance source direction. If it finds that the simple mathematical calculation result violates the actual physical propagation law of the power grid, it will automatically perform logical correction and weight adjustment, and finally output the current disturbance source direction with both data support and physical interpretability. .

[0092] Furthermore, based on the current direction of the disturbance source, the direction index is determined. That is, the upstream value is 1, and the downstream value is -1. Based on classification confidence level... With direction index Calculate the source score ,Right now Based on the source score and classification confidence Calculate the value of data ,Right now ,like If the value exceeds a set threshold (e.g., 0.7), a data packet is generated. , will data packet Uploaded to the main site. This allows filtering of low-value data, uploading only high-value data and reducing bandwidth consumption. Additionally, data packets... Compression can be performed before uploading, but this embodiment does not specifically limit this.

[0093] This embodiment provides a method for identifying power quality disturbances in distribution terminals. Based on the local topology matrix, disturbance feature vectors are mapped to propagation vectors. The disturbance index in the direction of the neighboring node is determined based on the distance between the propagation vector and the reference fingerprint feature vectors of neighboring nodes. The initial disturbance source direction is determined based on the disturbance index in the direction of the neighboring node. The initial disturbance source direction and the propagation vector are input into a power grid semantic knowledge graph for semantic reasoning to obtain the current disturbance source direction of the target distribution terminal's power quality. By combining multi-agent and knowledge graph semantic reasoning, the accuracy of disturbance tracing is improved, enabling accurate location of disturbance propagation paths and source nodes.

[0094] Based on the above embodiments of this application, in the third embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Steps S01 to S05 may be included before step S10: Step S01: Extract the multimodal time-series signal within the current time window from the target power distribution terminal; and perform weighted fusion on the multimodal time-series signal based on the weight coefficients corresponding to the multimodal time-series signal to obtain the multimodal fused signal. It should be noted that the current time window is the data acquisition window determined according to a pre-set fixed length, which can typically be set to 0.1s. Multimodal time-series signals are the acquired multimodal signals with time sequence, including voltage signals, current signals, and vibration signals. The vibration signal refers to the fiber optic vibration signal, that is, the disturbance auxiliary signal caused by cable vibration captured by a distributed fiber optic vibration sensor. Voltage and current signals can be acquired using a high-frequency sampler, with the sampling frequency typically set to 10 kHz.

[0095] Understandably, appropriate weighting coefficients are assigned to the voltage signal, current signal, and vibration signal respectively. For example, the weighting coefficient for the voltage signal is set to 0.4, the weighting coefficient for the current signal is set to 0.4, and the weighting coefficient for the vibration signal is set to 0.2. Using these weighting coefficients, the voltage signal, current signal, and vibration signal are weighted and fused. The resulting fused signal data is the multimodal fused signal, as shown below:

[0096] In the formula, Indicates a multimodal fused signal. , , These represent voltage signal, current signal, and vibration signal, respectively. , , These represent the weighting coefficients for voltage, current, and vibration signals, respectively. For timestamps.

[0097] Step S02: Based on the target wavelet transform parameters, perform wavelet transform on the multimodal fused signal to determine the wavelet energy spectrum; It should be noted that the target wavelet transform parameters are the optimal wavelet transform parameters, such as the optimal number of decomposition levels and the optimal basis functions. The optimal number of decomposition levels is selected based on the information entropy-based scale selection mechanism. and optimal basis functions To maximize the information content of the energy spectrum, as shown below:

[0098] In the formula, , Let represent the optimal number of decomposition layers and the optimal basis functions, respectively. Indicates the first Energy of layer detail factor , Indicates the first Layer approximation coefficients Indicates the first Number of layer detail coefficients Represents the probability of energy distribution. This represents the complexity penalty coefficient (default 0.1). , These represent the number of decomposition levels and the basis functions, respectively. This is achieved by balancing information entropy (reflecting the diversity of energy distribution) and computational complexity (number of decomposition levels). (the reciprocal of the transform), dynamically selecting the optimal wavelet transform parameters, suitable for resource-constrained power distribution terminals.

[0099] Understandably, the multimodal fused signal is subjected to wavelet transform according to the target wavelet transform parameters, and the wavelet energy spectrum is calculated, as shown below:

[0100] In the formula, Represents the wavelet energy spectrum. Describes the wavelet transform function. Indicates scale. This represents a multimodal fusion signal.

[0101] Step S03: Extract the time-domain features of the multimodal fusion signal, and fuse the time-domain features with the wavelet energy spectrum into a time-frequency joint vector; It should be noted that time-domain characteristics refer to the mean. and variance Combining time-domain features with wavelet energy spectrum ( ) fused into a time-frequency joint vector , , This is the scale number (the default value is 5).

[0102] Step S04: The time-frequency joint vector is weighted based on the multi-head self-attention matrix to obtain the primary perturbation vector; It is understandable that by using a multi-head self-attention matrix to weight the time-frequency joint vector, the resulting vector data is the primary perturbation vector.

[0103] Step S05: Based on the primary disturbance vector, perform anomaly identification to determine the primary detection result of the target power distribution terminal.

[0104] Understandably, using a lightweight recognition model to identify anomalies in the initial perturbation vector results in the initial detection result. This initial detection result includes both cases where a perturbation anomaly exists and cases where no perturbation anomaly exists.

[0105] This embodiment provides a method for identifying power quality disturbances in distribution terminals. It extracts multimodal time-series signals within the current time window from the target distribution terminal. Based on the weighting coefficients corresponding to the multimodal time-series signals, it performs weighted fusion of the signals to obtain a multimodal fused signal. Based on the target wavelet transform parameters, it performs wavelet transform on the multimodal fused signal to determine the wavelet energy spectrum. It extracts the time-domain features of the multimodal fused signal and fuses these features with the wavelet energy spectrum to form a time-frequency joint vector. Based on a multi-head self-attention matrix, it performs weighted processing on the time-frequency joint vector to obtain a primary disturbance vector. Based on the primary disturbance vector, it performs anomaly identification to determine the primary detection result of the target distribution terminal. The complete identification process is only initiated when an anomaly is triggered by the primary detection; during normal, disturbance-free periods, there is no need to run detailed feature extraction and deep analysis, reducing the data transmission burden.

[0106] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the power quality disturbance identification method for power distribution terminals in this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0107] This application also provides a power quality disturbance identification device for power distribution terminals. Please refer to [reference needed]. Figure 4 The power quality disturbance identification device for distribution terminals includes: The data acquisition module 10 is used to convert the multimodal time-series signal of the target power distribution terminal within the current time window into a multimodal word vector when the initial detection result of the target power distribution terminal indicates the presence of a disturbance anomaly. The feature extraction module 20 is used to fuse the multimodal word vectors based on the gating weights corresponding to the multimodal word vectors to obtain fused word vectors. The feature extraction module 20 is further configured to extract a perturbation feature vector from the fused word vector based on the multi-head self-attention matrix corresponding to the fused word vector; The type identification module 30 is used to determine similar perturbation prototype vectors based on the cosine similarity between the perturbation feature vector and the perturbation prototype vector; The type identification module 30 is further configured to determine the current disturbance category of the power quality of the target power distribution terminal based on the disturbance category corresponding to the similar disturbance prototype vector.

[0108] In one feasible implementation, the multimodal time-series signal includes a voltage signal, a current signal, and a vibration signal, and the multimodal term vector includes a voltage term vector, a current term vector, and a vibration term vector. The data acquisition module 10 is also used to divide the normalized voltage signal, current signal, and vibration signal into corresponding signal segments based on a preset number. Based on the mean, variance, and peak value of the signal sub-segment, the feature vector of the signal sub-segment is determined; Based on the mapping relationship between word vectors and feature vectors, the feature vectors of the signal sub-segments are mapped to the corresponding word vectors; Based on the word vectors corresponding to the signal segments of the voltage signal, the signal segments of the current signal, and the signal segments of the vibration signal, the initial voltage word vector, the initial current word vector, and the initial vibration word vector are determined respectively. Add corresponding modal recognition vectors and position encoding vectors to the initial voltage term vector, the initial current term vector, and the initial vibration term vector to obtain the voltage term vector, the current term vector, and the vibration term vector.

[0109] In one feasible implementation, the feature extraction module 20 is further configured to assign corresponding gating weights to the multimodal lexical vectors based on the gating unit; Calculate the signal quality index of the multimodal time-series signal corresponding to the multimodal word vector; Based on the signal quality index corresponding to the multimodal lexical vector, the gating weights of the multimodal lexical vector are corrected to obtain the target gating weights of the multimodal lexical vector; Based on the target gating weights of the multimodal lexical vectors, the multimodal lexical vectors are weighted and fused to obtain fused lexical vectors.

[0110] In one feasible implementation, the signal quality index includes the signal-to-noise ratio (SNR), and the feature extraction module 20 is further configured to obtain a first correspondence between the SNR, the gate weight, and the target gate weight. Based on the signal-to-noise ratio corresponding to the multimodal lexical vector, the gating weight corresponding to the multimodal lexical vector, and the first correspondence, the target gating weight of the multimodal lexical vector is determined.

[0111] In one feasible implementation, the feature extraction module 20 is further configured to obtain the perturbation prototype vector of the current time window and the current adjustment increment; Based on the current adjustment increment, the perturbation prototype vector is fine-tuned.

[0112] In one feasible implementation, the type identification module 30 is further configured to calculate a quality assessment value between the perturbation feature vector and the perturbation prototype vector; Based on the quality assessment value, determine the classification confidence level of the current disturbance category; When the classification confidence score is greater than a preset confidence threshold, the perturbation feature vector and the perturbation prototype vector are smoothed based on the learning rate to obtain the perturbation prototype vector corresponding to the next time window.

[0113] In one feasible implementation, the type recognition module 30 is further configured to obtain a second correspondence between cosine similarity and quality assessment value; Based on the second correspondence and the cosine similarity between the perturbation feature vector and the perturbation prototype vector, a quality assessment value between the perturbation feature vector and the perturbation prototype vector is determined.

[0114] In one feasible implementation, the type identification module 30 is further configured to map the disturbance feature vector into a propagation vector based on the local topology matrix; Based on the distance between the propagation vector and the reference fingerprint feature vector of the neighboring node, the perturbation index in the direction of the neighboring node is determined. The initial disturbance source direction is determined based on the disturbance index in the direction of the neighboring node; The initial disturbance source direction and the propagation vector are input into the power grid semantic knowledge graph for semantic reasoning to obtain the current disturbance source direction of the power quality of the target distribution terminal.

[0115] In one feasible implementation, the data acquisition module 10 is also used to predict and infer recognition energy consumption based on the lexical dimension of the multimodal lexical vector and the target recognition accuracy. When the inference and identification energy consumption is less than the currently available energy, the step of converting the multimodal time-series signal of the target power distribution terminal within the current time window into a multimodal word vector is performed.

[0116] In one feasible implementation, the data acquisition module 10 is further configured to extract the multimodal time-series signal within the current time window from the target power distribution terminal, and perform weighted fusion on the multimodal time-series signal based on the weight coefficients corresponding to the multimodal time-series signal to obtain a multimodal fused signal; Based on the target wavelet transform parameters, the multimodal fused signal is subjected to wavelet transform to determine the wavelet energy spectrum; Extract the time-domain features of the multimodal fused signal, and fuse the time-domain features with the wavelet energy spectrum to form a time-frequency joint vector; The time-frequency joint vector is weighted based on the multi-head self-attention matrix to obtain the primary perturbation vector; Anomaly identification is performed based on the primary disturbance vector to determine the primary detection result of the target power distribution terminal.

[0117] The power quality disturbance identification device for distribution terminals provided in this application adopts the power quality disturbance identification method for distribution terminals in the above embodiments, which can solve the technical problem that it is difficult to quickly and accurately identify power quality disturbances in large-scale distribution terminals, and the real-time performance and accuracy are poor. Compared with the prior art, the beneficial effects of the power quality disturbance identification device for distribution terminals provided in this application are the same as those of the power quality disturbance identification method for distribution terminals provided in the above embodiments, and other technical features in the power quality disturbance identification device for distribution terminals are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0118] This application provides a power quality disturbance identification device for a power distribution terminal. The power quality disturbance identification device for a power distribution terminal includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the power quality disturbance identification method for a power distribution terminal in the above embodiment 1.

[0119] The following is for reference. Figure 5 This document illustrates a structural schematic diagram of a power quality disturbance identification device suitable for implementing embodiments of this application. The power quality disturbance identification device for a power distribution terminal in this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The power quality disturbance identification device for distribution terminals shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0120] like Figure 5As shown, the power quality disturbance identification device for a distribution terminal may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the power quality disturbance identification device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the power distribution terminal power quality disturbance identification device to communicate wirelessly or wiredly with other devices to exchange data. Although power distribution terminal power quality disturbance identification devices with various systems are shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.

[0121] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0122] The power quality disturbance identification device for distribution terminals provided in this application, employing the power quality disturbance identification method for distribution terminals in the above embodiments, can solve the technical problem of difficulty in quickly and accurately identifying power quality disturbances in large-scale distribution terminals, resulting in poor real-time performance and accuracy. Compared with the prior art, the beneficial effects of the power quality disturbance identification device for distribution terminals provided in this application are the same as those of the power quality disturbance identification method for distribution terminals provided in the above embodiments, and other technical features in this power quality disturbance identification device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0123] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0124] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0125] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the power quality disturbance identification method for power distribution terminals in the above embodiments.

[0126] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0127] The aforementioned computer-readable storage medium may be included in the power quality disturbance identification device for the power distribution terminal; or it may exist independently and not be assembled into the power quality disturbance identification device for the power distribution terminal.

[0128] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the power distribution terminal power quality disturbance identification device, the power distribution terminal power quality disturbance identification device performs the following actions: when the initial detection result of the target power distribution terminal indicates the presence of a disturbance anomaly, it converts the multimodal time-series signal of the target power distribution terminal within the current time window into a multimodal word vector; based on the gating weights corresponding to the multimodal word vectors, it fuses the multimodal word vectors to obtain a fused word vector; based on the multi-head self-attention matrix corresponding to the fused word vector, it extracts a disturbance feature vector from the fused word vector; based on the cosine similarity between the disturbance feature vector and the disturbance prototype vector, it determines a similar disturbance prototype vector; and based on the disturbance category corresponding to the similar disturbance prototype vector, it determines the current disturbance category of the power quality of the target power distribution terminal.

[0129] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0130] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0131] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0132] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described power quality disturbance identification method for distribution terminals. This solves the technical problem of poor real-time performance and accuracy in quickly and accurately identifying power quality disturbances in large-scale distribution terminals. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the power quality disturbance identification method for distribution terminals provided in the above embodiments, and will not be repeated here.

[0133] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the power quality disturbance identification method for power distribution terminals as described above.

[0134] The computer program product provided in this application can solve the technical problem of difficulty in quickly and accurately identifying power quality disturbances in large-scale power distribution terminals, resulting in poor real-time performance and accuracy. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the power quality disturbance identification method for power distribution terminals provided in the above embodiments, and will not be repeated here.

[0135] The above are only some embodiments of this application and do not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for identifying power quality disturbances in a power distribution terminal, characterized in that, The method includes: When the initial detection result of the target power distribution terminal indicates the presence of a disturbance anomaly, the multimodal time-series signal of the target power distribution terminal within the current time window is converted into a multimodal word vector; Based on the gating weights corresponding to the multimodal word vectors, the multimodal word vectors are fused to obtain fused word vectors; Based on the multi-head self-attention matrix corresponding to the fused word vector, a perturbation feature vector is extracted from the fused word vector; Based on the cosine similarity between the perturbation feature vector and the perturbation prototype vector, similar perturbation prototype vectors are determined. Based on the disturbance category corresponding to the similar disturbance prototype vector, the current disturbance category of the power quality of the target distribution terminal is determined.

2. The method as described in claim 1, characterized in that, The multimodal time-series signal includes voltage signal, current signal and vibration signal, and the multimodal word vector includes voltage word vector, current word vector and vibration word vector; The steps of converting the multimodal time-series signal of the target power distribution terminal within the current time window into a multimodal word vector include: Based on a preset number, the normalized voltage signal, current signal, and vibration signal are divided into corresponding signal segments. Based on the mean, variance, and peak value of the signal sub-segment, the feature vector of the signal sub-segment is determined; Based on the mapping relationship between word vectors and feature vectors, the feature vectors of the signal sub-segments are mapped to the corresponding word vectors; Based on the word vectors corresponding to the signal segments of the voltage signal, the signal segments of the current signal, and the signal segments of the vibration signal, the initial voltage word vector, the initial current word vector, and the initial vibration word vector are determined respectively. Add corresponding modal recognition vectors and position encoding vectors to the initial voltage term vector, the initial current term vector, and the initial vibration term vector to obtain the voltage term vector, the current term vector, and the vibration term vector.

3. The method as described in claim 1, characterized in that, The step of fusing the multimodal lexical vectors based on the gating weights corresponding to the multimodal lexical vectors to obtain fused lexical vectors includes: Based on the gating unit, corresponding gating weights are assigned to the multimodal word vectors; Calculate the signal quality index of the multimodal time-series signal corresponding to the multimodal word vector; Based on the signal quality index corresponding to the multimodal lexical vector, the gating weights of the multimodal lexical vector are corrected to obtain the target gating weights of the multimodal lexical vector; Based on the target gating weights of the multimodal lexical vectors, the multimodal lexical vectors are weighted and fused to obtain fused lexical vectors.

4. The method as described in claim 3, characterized in that, The signal quality metric includes the signal-to-noise ratio (SNR). The step of correcting the gating weights of the multimodal word vectors based on the signal quality metric corresponding to the multimodal word vectors to obtain the target gating weights of the multimodal word vectors includes: Obtain the first correspondence between the signal-to-noise ratio, the gating weight, and the target gating weight; Based on the signal-to-noise ratio corresponding to the multimodal lexical vector, the gating weight corresponding to the multimodal lexical vector, and the first correspondence, the target gating weight of the multimodal lexical vector is determined.

5. The method as described in claim 1, characterized in that, Before the step of determining similar perturbation prototype vectors based on the cosine similarity between the perturbation feature vector and the perturbation prototype vector, the method further includes: Obtain the prototype vector of the disturbance in the current time window and the current adjustment increment; Based on the current adjustment increment, the perturbation prototype vector is fine-tuned.

6. The method as described in claim 1, characterized in that, Following the step of determining the current disturbance category of the power quality of the target distribution terminal based on the disturbance category corresponding to the similar disturbance prototype vector, the method further includes: Calculate the quality assessment value between the perturbation feature vector and the perturbation prototype vector; Based on the quality assessment value, determine the classification confidence level of the current disturbance category; When the classification confidence score is greater than a preset confidence threshold, the perturbation feature vector and the perturbation prototype vector are smoothed based on the learning rate to obtain the perturbation prototype vector corresponding to the next time window.

7. The method as described in claim 6, characterized in that, The step of calculating the quality assessment value between the perturbation feature vector and the perturbation prototype vector includes: Obtain the second correspondence between cosine similarity and quality assessment value; Based on the second correspondence and the cosine similarity between the perturbation feature vector and the perturbation prototype vector, a quality assessment value between the perturbation feature vector and the perturbation prototype vector is determined.

8. The method as described in claim 1, characterized in that, Following the step of determining the current disturbance category of the power quality of the target distribution terminal based on the disturbance category corresponding to the similar disturbance prototype vector, the method further includes: Based on the local topology matrix, the perturbation feature vector is mapped to a propagation vector; Based on the distance between the propagation vector and the reference fingerprint feature vector of the neighboring node, the perturbation index in the direction of the neighboring node is determined. The initial disturbance source direction is determined based on the disturbance index in the direction of the neighboring node; The initial disturbance source direction and the propagation vector are input into the power grid semantic knowledge graph for semantic reasoning to obtain the current disturbance source direction of the power quality of the target distribution terminal.

9. The method according to any one of claims 1 to 8, characterized in that, Before the step of converting the multimodal time-series signal of the target power distribution terminal into a multimodal word vector within the current time window when the initial detection result of the target power distribution terminal indicates the presence of a disturbance anomaly, the method further includes: The multimodal time-series signal within the current time window is extracted from the target power distribution terminal. Based on the weight coefficients corresponding to the multimodal time-series signal, the multimodal time-series signal is weighted and fused to obtain a multimodal fused signal. Based on the target wavelet transform parameters, the multimodal fused signal is subjected to wavelet transform to determine the wavelet energy spectrum; Extract the time-domain features of the multimodal fused signal, and fuse the time-domain features with the wavelet energy spectrum to form a time-frequency joint vector; The time-frequency joint vector is weighted based on the multi-head self-attention matrix to obtain the primary perturbation vector; Anomaly identification is performed based on the primary disturbance vector to determine the primary detection result of the target power distribution terminal.

10. A power quality disturbance identification device for a power distribution terminal, characterized in that, The device includes: The data acquisition module is used to convert the multimodal time-series signal of the target power distribution terminal within the current time window into a multimodal word vector when the initial detection result of the target power distribution terminal indicates the presence of a disturbance anomaly. The feature extraction module is used to fuse the multimodal word vectors based on the gating weights corresponding to the multimodal word vectors to obtain fused word vectors. The feature extraction module is further configured to extract perturbation feature vectors from the fused word vectors based on the multi-head self-attention matrix corresponding to the fused word vectors; The type identification module is used to determine similar perturbation prototype vectors based on the cosine similarity between the perturbation feature vector and the perturbation prototype vector; The type identification module is further configured to determine the current disturbance category of the power quality of the target distribution terminal based on the disturbance category corresponding to the similar disturbance prototype vector.