Method, apparatus, and device for dimension reduction of electric energy meter features, medium
By constructing a digital twin simulation model of power distribution areas and using sparse coding technology, low-dimensional sparse feature vectors are generated, which solves the communication and storage pressure problem of high-dimensional data in smart grids and improves the accuracy of anomaly detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID SICHUAN ELECTRIC POWER CO MARKETING SERVICE CENT
- Filing Date
- 2026-04-14
- Publication Date
- 2026-07-03
Smart Images

Figure CN122332941A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart grid technology, and specifically to a method, apparatus, equipment, and medium for dimensionality reduction of electricity meter characteristics. Background Technology
[0002] Currently, with the deepening of smart grid construction, smart meters have achieved full coverage. These widely used smart meters can collect and record dozens of operating parameters in real time, including three-phase voltage RMS, three-phase current RMS, active power, reactive power, power factor, harmonic content, and frequency, at sampling frequencies of minutes or even seconds. This massive amount of high-dimensional data puts enormous pressure on communication network bandwidth and cloud storage resources. To alleviate this pressure, existing technologies typically analyze the raw high-dimensional data directly to identify faulty equipment. However, fault signals from faulty equipment are often masked by strong background signals, leading to technical problems such as low anomaly detection accuracy and high false alarm rate.
[0003] Therefore, in order to overcome the above-mentioned technical problems, the present invention provides a method, apparatus, device, and medium for dimensionality reduction of the characteristics of electricity meters. Summary of the Invention
[0004] The technical problem to be solved by the present invention is how to improve the accuracy of anomaly detection while compressing data. The purpose is to provide a method, device, equipment, and medium for reducing the dimensionality of electricity meter features, so as to improve the accuracy of anomaly detection while compressing data.
[0005] This invention is achieved through the following technical solution:
[0006] In a first aspect, a method for dimensionality reduction of electricity meter features includes: constructing a digital twin simulation model of a power distribution area where the target electricity meter is located; collecting real-time boundary load data of the power distribution area and inputting the boundary load data into the digital twin simulation model so that the digital twin simulation model can simulate the power distribution area based on the real-time boundary load data; in the digital twin simulation model, collecting theoretical operating parameter data of the node corresponding to the target electricity meter; simultaneously collecting measured operating parameter data of the target electricity meter; obtaining the residual vector corresponding to the theoretical operating parameter data and the measured operating parameter data; inputting the residual vector into a preset sparse coding model and outputting a low-dimensional sparse feature vector corresponding to the target electricity meter.
[0007] In some embodiments, constructing a digital twin simulation model of the power distribution area where the target electricity meter is located includes: acquiring power grid topology data and equipment parameter data of the power distribution area where the target electricity meter is located; and constructing the digital twin simulation model based on the power grid topology data and the equipment parameter data.
[0008] In some embodiments, the collection of real-time boundary load data of the power distribution area includes: collecting the effective values of the total incoming three-phase voltage, the effective values of the total incoming three-phase current, the total incoming active power, and the total incoming reactive power of the power distribution area at preset collection intervals; and determining one or more of the effective values of the total incoming three-phase voltage, the effective values of the total incoming three-phase current, the total incoming active power, and the total incoming reactive power as the feature vector of the real-time boundary load data.
[0009] In some embodiments, obtaining the residual vectors corresponding to the theoretical operating parameter data and the measured operating parameter data includes: constructing a theoretical expectation vector based on the theoretical operating parameter data according to a preset dimensional order; constructing a measured parameter vector based on the measured operating parameter data according to the dimensional order; calculating the absolute difference or relative deviation between the measured parameter vector and the theoretical expectation vector point by point to obtain the calculation result; and obtaining the residual vector based on the calculation result.
[0010] In some embodiments, the step of inputting the residual vector into a preset sparse coding model and outputting a low-dimensional sparse feature vector corresponding to the target energy meter includes: inputting the residual vector into a preset sparse coding model to perform sparse decomposition on the residual vector according to a preset overcomplete dictionary using the sparse coding model to obtain the decomposition coefficient vector corresponding to the residual vector; and determining the decomposition coefficient vector as the low-dimensional sparse feature vector.
[0011] In some embodiments, after outputting the low-dimensional sparse feature vector corresponding to the target energy meter, the method further includes: determining the position and magnitude of the non-zero elements in the low-dimensional sparse feature vector; determining the anomaly type corresponding to the target energy meter based on the position; and determining the severity of the anomaly based on the magnitude.
[0012] In some embodiments, after outputting the low-dimensional sparse feature vector corresponding to the target energy meter, the method further includes: calculating the data compression ratio and reconstruction error corresponding to the low-dimensional sparse feature vector; and evaluating the dimensionality reduction effect based on the data compression ratio and the reconstruction error.
[0013] Secondly, an apparatus for dimensionality reduction of electricity meter features includes: a construction module configured to construct a digital twin simulation model of a power distribution area where a target electricity meter is located; a simulation module configured to collect real-time boundary load data of the power distribution area and input the boundary load data into the digital twin simulation model so that the digital twin simulation model can simulate the power distribution area based on the real-time boundary load data; a collection module configured to collect theoretical operating parameter data of the node corresponding to the target electricity meter in the digital twin simulation model; and simultaneously collect measured operating parameter data of the target electricity meter; an acquisition module configured to acquire residual vectors corresponding to the theoretical operating parameter data and the measured operating parameter data; and an output module configured to input the residual vectors into a preset sparse coding model and output a low-dimensional sparse feature vector corresponding to the target electricity meter.
[0014] Thirdly, an electronic device includes a processor and a memory storing program instructions, the processor being configured to execute the above-described method for dimensionality reduction of electricity meter features when the program instructions are executed.
[0015] Fourthly, a storage medium stores program instructions that, when executed, perform the aforementioned method for dimensionality reduction of electricity meter features.
[0016] Compared with existing technologies, this invention constructs a digital twin simulation model of the power distribution area where the target electricity meter is located, then collects real-time boundary load data of the power distribution area and inputs the boundary load data into the digital twin simulation model. This allows the digital twin simulation model to simulate the power distribution area based on the real-time boundary load data. In the digital twin simulation model, theoretical operating parameter data of the node corresponding to the target electricity meter is collected. At the same time, measured operating parameter data of the target electricity meter is collected. Then, the residual vector corresponding to the theoretical operating parameter data and the measured operating parameter data is obtained, and the residual vector is input into a preset sparse coding model to output a low-dimensional sparse feature vector corresponding to the target electricity meter. In this way, by obtaining the residual vector of the theoretical operating parameter data corresponding to the digital twin simulation model and the measured operating parameter data of the target energy meter, the interference of normal background signals is eliminated, making the abnormal features more prominent in the residual. Then, a sparse coding model is introduced to reduce the dimensionality of the high-dimensional residual vector and generate a low-dimensional sparse feature vector, which greatly reduces the amount of data, alleviates the communication bandwidth and storage pressure, and retains the key structured information, making it easier to accurately detect anomalies from the low-dimensional sparse feature vector. Thus, the accuracy of anomaly detection can be improved while compressing the features of the energy meter. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:
[0018] Figure 1 This is a flowchart illustrating a method for dimensionality reduction of electricity meter features provided in an embodiment of this disclosure;
[0019] Figure 2 This is a schematic diagram of a device for dimensionality reduction of electricity meter features provided in an embodiment of this disclosure;
[0020] Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of this invention are only for explaining this invention and are not intended to limit this invention.
[0022] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0023] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0024] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0025] In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0026] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating a method for dimensionality reduction of electricity meter features, as shown in an exemplary embodiment of this application. Figure 1 As shown in the embodiments of this disclosure, a method for dimensionality reduction of electricity meter features is provided, the method comprising:
[0027] Step S101: Construct a digital twin simulation model of the power distribution area where the target electricity meter is located.
[0028] Step S102: Collect real-time boundary load data of the power distribution area and input the boundary load data into the digital twin simulation model so that the digital twin simulation model can simulate the power distribution area based on the real-time boundary load data.
[0029] Step S103: In the digital twin simulation model, theoretical operating parameter data of the node corresponding to the target energy meter are collected; at the same time, measured operating parameter data of the target energy meter are collected.
[0030] Step S104: Obtain the residual vectors corresponding to the theoretical operating parameter data and the measured operating parameter data.
[0031] Step S105: Input the residual vector into the preset sparse coding model and output the low-dimensional sparse feature vector corresponding to the target energy meter.
[0032] In this embodiment, a digital twin simulation model of the power distribution area where the target electricity meter is located is constructed. Then, real-time boundary load data of the power distribution area is collected and input into the digital twin simulation model so that the digital twin simulation model can simulate the power distribution area based on the real-time boundary load data. In the digital twin simulation model, theoretical operating parameter data of the node corresponding to the target electricity meter is collected. At the same time, measured operating parameter data of the target electricity meter is collected. Then, the residual vector corresponding to the theoretical operating parameter data and the measured operating parameter data is obtained, and the residual vector is input into a preset sparse coding model to output the low-dimensional sparse feature vector corresponding to the target electricity meter. In this way, by obtaining the residual vector of the theoretical operating parameter data corresponding to the digital twin simulation model and the measured operating parameter data of the target energy meter, the interference of normal background signals is eliminated, making the abnormal features more prominent in the residual. Then, a sparse coding model is introduced to reduce the dimensionality of the high-dimensional residual vector and generate a low-dimensional sparse feature vector, which greatly reduces the amount of data, alleviates the communication bandwidth and storage pressure, and retains the key structured information, making it easier to accurately detect anomalies from the low-dimensional sparse feature vector. Thus, the accuracy of anomaly detection can be improved while compressing the features of the energy meter.
[0033] It should be noted that this method does not depend on a specific transformer substation structure or equipment model, has good versatility, supports multiple electrical parameter inputs, and is easily extended to the operation status monitoring of other power equipment.
[0034] Furthermore, in step S101, a digital twin simulation model of the power distribution area where the target electricity meter is located is constructed, including: acquiring the power grid topology data and equipment parameter data of the power distribution area where the target electricity meter is located; and constructing a digital twin simulation model based on the power grid topology data and equipment parameter data.
[0035] In this way, by acquiring the power grid topology data and equipment parameter data of the power distribution area where the target electricity meter is located, and constructing a digital twin simulation model based on the power grid topology data and equipment parameter data, a deep integration of the physical entity and the virtual model can be achieved, which facilitates the accurate simulation of the power distribution area by the digital twin simulation model.
[0036] It should be noted that the power grid topology data and equipment parameter data of the power distribution area can be directly obtained from the distribution area management system. The distribution area management system is a comprehensive platform integrating hardware, software, and data analysis, designed to provide refined and intelligent monitoring and management of power distribution areas within the power system.
[0037] It should be noted that the power grid topology data includes the connection relationships of various electrical devices within the power distribution area. This data clarifies the connections between these devices, thereby determining the current flow paths.
[0038] The equipment parameter data includes: distribution transformer parameters, line parameters, and energy meter parameters for all energy meters within the power distribution area.
[0039] Specifically, distribution transformer parameters include: the distribution transformer model, rated capacity, and turns ratio. Line parameters include: the cable type, cable length, and line impedance parameters used for each line. Electricity meter parameters include: the electricity meter model, accuracy class, and sampling frequency.
[0040] In some embodiments, the distribution transformer is model S13-M-400 / 10; the rated capacity of the distribution transformer is 400kVA; the transformation ratio of the distribution transformer is 10 / 0.4kV; the cable model is YJV-0.6 / 1kV 4×240; the cable length includes 120m, 85m, 150m, etc.; the 68 electricity meters are all model DDZY102C, the accuracy class of the electricity meters is 1.0, and the sampling frequency of the electricity meters is every 15min / time.
[0041] Furthermore, a digital twin simulation model is constructed based on power grid topology data and equipment parameter data, including: modeling the electrical model using pre-set power system simulation software based on power grid topology data and equipment parameter data; setting variable loads at the nodes corresponding to each electricity meter to obtain a digital twin simulation model; the variable load can be the default typical residential load, or it can be set as other loads according to the actual load connected to the electricity meter.
[0042] It should be noted that the power system simulation software can be OpenDSS software.
[0043] Furthermore, in step S102, real-time boundary load data of the power distribution area is collected, including: at preset collection intervals, the effective values of the three-phase voltage, the three-phase current, the active power, and the reactive power of the total incoming line of the power distribution area are collected; one or more of the effective values of the three-phase voltage, the three-phase current, the active power, and the reactive power are determined as the feature vector of the real-time boundary load data.
[0044] This facilitates the use of the effective values of the three-phase voltage, three-phase current, active power, and reactive power of the total incoming line of the power distribution area, collected at preset collection intervals. One or more of these values can be used as real-time boundary load data, which can then be used as input boundary conditions for the digital twin simulation model, enabling accurate simulation of the power distribution area by the digital twin simulation model.
[0045] It should be noted that an intelligent monitoring terminal is installed at the incoming line of the transformer in the power distribution area. This intelligent monitoring terminal is used to collect real-time boundary load data.
[0046] It should be noted that the real-time boundary load data serves as the input boundary condition for the digital twin simulation model. After being input into the digital twin simulation model, the power distribution area can be simulated based on the model, and the theoretical operating parameters of the nodes corresponding to each energy meter in the power distribution area under this boundary condition can be obtained based on the preset power flow calculations. In some embodiments, at a certain moment, the real-time boundary load data includes the total incoming active power and the total incoming reactive power; wherein, the total incoming active power is 156kW; and the total incoming reactive power is 42kVar.
[0047] Furthermore, theoretical operating parameter data of the node corresponding to the target electricity meter is collected, including: collecting theoretical operating parameters of the node corresponding to the target electricity meter; and determining the theoretical operating parameters as theoretical operating parameter data.
[0048] It should be noted that the digital twin simulation model allows setting a simulation step size. This simulation step size defines the acquisition interval for theoretical operating parameters. This acquisition interval can be the same as the sampling frequency and acquisition duration, improving the synchronization and real-time performance of data acquisition.
[0049] It should be noted that theoretical operating parameters, theoretical operating parameter data, and measured operating parameter data all share the same operating parameter dimensions. Specifically, these may include one or more of the following dimensions: effective value of each phase voltage, effective value of each phase current, active power, reactive power, power factor, harmonic content, and frequency.
[0050] Furthermore, obtaining the residual vectors corresponding to the theoretical operating parameter data and the measured operating parameter data includes: constructing a theoretical expectation vector based on the theoretical operating parameter data according to a preset dimensional order; constructing a measured parameter vector based on the measured operating parameter data according to the dimensional order; calculating the absolute difference or relative deviation between the measured parameter vector and the theoretical expectation vector point by point to obtain the calculation results; and obtaining the residual vector based on the calculation results.
[0051] In this way, by obtaining the residual vector through the absolute difference or relative deviation between the theoretical expected vector and the measured parameter vector generated based on the digital twin model, the difference comparison between the theoretical expected vector and the measured parameter vector is realized, eliminating the interference of normal background signals, making the abnormal features more prominent in the residual vector, improving the sensitivity and accuracy of anomaly detection, and reducing the false alarm rate.
[0052] It should be noted that the theoretical operating parameter data and the measured operating parameter data are synchronized in time and have the same sampling frequency and data format.
[0053] It should be noted that the dimensional order defines the arrangement order of the data for each dimension of the operating parameters in the theoretical expectation vector and the measured parameter vector.
[0054] It should be noted that the absolute difference between the measured parameter vector and the theoretical expected vector is calculated point by point by calculating the difference between each data point in the theoretical expected vector and each data point in the measured parameter vector, thus obtaining several absolute differences.
[0055] It should be noted that the relative deviation between the measured parameter vector and the theoretical expected vector is calculated point by point as follows: the difference between each data point in the theoretical expected vector and each data point in the measured parameter vector is calculated to obtain several absolute differences; the ratio between each absolute difference and the corresponding data in the theoretical expected vector is obtained to obtain several relative deviations.
[0056] In some embodiments, for different dimensions, either relative deviations or absolute differences can be calculated, without limitation.
[0057] In some embodiments, the dimensions of the theoretical operating parameters and measured operating parameter data include: the effective value of phase A voltage, the effective value of phase B current, the active power dimension, the power factor dimension, and the third harmonic content and frequency dimension. The value of the third harmonic content dimension characterizes the third harmonic voltage content rate.
[0058] In the theoretical operating parameters, the effective value of phase A voltage is 220.3V; the effective value of phase B current is 3.2A; the active power is 2.16kW; the power factor is 0.96; the third harmonic voltage content is 1.8%; and the frequency is 50.01Hz. Therefore, the theoretical expected vector E = [220.3, 3.2, 2.16, 0.96, 1.8%, 50.01Hz].
[0059] In the measured operating parameter data, the effective value of phase A voltage is 219.8V; the effective value of phase B current is 3.5A; the active power is 2.38kW; the power factor is 0.94; the third harmonic voltage content is 2.5%; and the frequency is 50.02Hz. Therefore, the measured parameter vector E = [219.8, 3.5, 2.38, 0.94, 2.5%, 50.02Hz].
[0060] For each dimension of the parameter, calculate the relative deviation or absolute difference between the measured parameter vector and the theoretical expected vector. Then, the relative deviation of the A-phase voltage RMS value dimension is: Relative deviation in the dimension of the effective value of phase B current: Relative deviation of the active power dimension: The absolute difference in the power factor dimension: The absolute difference in the third harmonic content dimension: The absolute difference in the frequency dimension: Combine the calculation results of all dimensions to form the residual vector. .
[0061] Furthermore, the residual vector is input into a preset sparse coding model, and the low-dimensional sparse feature vector corresponding to the target energy meter is output. This includes: inputting the residual vector into a preset sparse coding model, so as to use the sparse coding model to perform sparse decomposition on the residual vector according to a preset overcomplete dictionary, and obtain the decomposition coefficient vector corresponding to the residual vector; and determining the decomposition coefficient vector as the low-dimensional sparse feature vector.
[0062] In this way, by inputting the residual vector into a preset sparse coding model, the sparse coding model performs sparse decomposition on the residual vector according to a preset overcomplete dictionary, obtaining the decomposition coefficient vector corresponding to the residual vector. Then, the decomposition coefficient vector is determined as a low-dimensional sparse feature vector. The sparse coding model is introduced to reduce the dimensionality of the high-dimensional residual vector and generate a low-dimensional sparse feature vector, which greatly reduces the amount of data, alleviates the communication bandwidth and storage pressure, and at the same time retains the key structured information, which facilitates the subsequent analysis and storage of data.
[0063] It should be noted that the low-dimensional sparse feature vector is a compressed representation of the operating status of the electricity meter, which can be uploaded to the cloud or stored locally.
[0064] Furthermore, the overcomplete dictionary is obtained as follows: obtain the historical residual vector; use the preset K-SVD (K-Singular Value Decomposition) algorithm to train the preset initial overcomplete dictionary using the historical residual vector as the training set to obtain the overcomplete dictionary.
[0065] It should be noted that the method for obtaining historical residual vectors is the same as that for obtaining residual vectors, and will not be repeated here. Historical residual vectors include residual vectors from normal operation or various abnormal conditions. This ensures the completeness of the overcomplete dictionary after training.
[0066] It should be noted that the number of atoms in an overcomplete dictionary is greater than the dimension of the residual vector; for example: an overcomplete dictionary , where n is the dimension of the residual vector; K is the number of atoms in the overcomplete dictionary. In some embodiments, n=1; K=50.
[0067] It should be noted that the iterative optimization objective of the K-SVD algorithm is: .in, The matrix formed by the training set; For the overcomplete dictionary obtained through training; The matrix formed by the decomposition coefficient vectors corresponding to the training set; The square of the Frobenius norm is used to measure... Distance between DX; For sparsity constraints, it represents the maximum number of non-zero elements allowed, i.e., the upper limit of sparsity; It is the L0 norm, used to count the number of non-zero elements in matrix X; sparse coefficient matrix The first in Each element.
[0068] It should be noted that each residual vector can be represented as a linear combination of several atoms in an overcomplete dictionary.
[0069] It should be noted that the sparse coding model is used to perform sparse decomposition on the residual vector according to the preset overcomplete dictionary to obtain the decomposition coefficient vector corresponding to the residual vector. That is, the sparse coding model is used to perform sparse decomposition on the residual vector according to the preset overcomplete dictionary through the orthogonal matching pursuit algorithm to obtain the decomposition coefficient vector corresponding to the residual vector.
[0070] It should be noted that sparse decomposition can be implemented using the orthogonal matching pursuit algorithm or the basis pursuit algorithm to ensure that the number of non-zero elements in the obtained sparse coefficients is minimized.
[0071] In some embodiments, the residual vector is sparsely decomposed using an orthogonal matching pursuit algorithm based on a preset overcomplete dictionary to obtain the decomposition coefficient vector corresponding to the residual vector. This includes: initializing the initial residual based on the residual vector; initializing the initial support set and the number of iterations; determining the k-th iteration number and searching for the atom index most relevant to the residual in the overcomplete dictionary at the k-th iteration number based on this iteration number; obtaining a reference support set based on this atom index and the initial support set; determining the linear coefficients corresponding to the reference support set using a preset least squares method; obtaining the reference residual based on the linear coefficients; determining whether the iteration termination condition is met based on the linear coefficients and the reference residual; if the iteration termination condition is not met, incrementing the current iteration number by 1, and then determining the reference support set at the k-th iteration number as the initial support set at the k+1-th iteration number; determining the reference residual at the k-th iteration number as the initial residual at the k+1-th iteration number; and performing the k+1-th iteration based on the initial support set at the k+1-th iteration number and the initial residual at the k+1-th iteration number. Under the condition that the iteration terminates, the decomposition coefficient vector is determined based on the linear coefficients.
[0072] It should be noted that the initial residual is initialized based on the residual vector, that is, the residual vector is determined as the current residual.
[0073] The initial support set and iteration count are initialized by setting the preset empty set as the current support set and setting 1 as the current iteration count.
[0074] Furthermore, based on this iteration number, the atom index most relevant to the residual at the k-th iteration number is found in the overcomplete dictionary. That is, for the k-th iteration, by calculating... Obtain the atom index at the k-th iteration; where, This refers to the atom index at the k-th iteration; For the transpose of the j-th atom in an overcomplete dictionary; This is the reference residual at the (k-1)th iteration, which is the initial residual at the kth iteration. After representing the traversal of index j, take the expression that makes the subsequent expression... The operation that yields the maximum value.
[0075] Furthermore, a reference support set is obtained based on this atomic index and the initial support set, including: by calculating Obtain the reference support set at the k-th iteration number; where, This is the reference support set for the k-th iteration. This is the reference support set at the k-th iteration, i.e., the initial support set at the k-th iteration.
[0076] Furthermore, the linear coefficients corresponding to the reference support set are determined using a pre-defined least squares method, including: by calculating... , obtain the linear coefficients corresponding to the reference support set; where, For reference support set The corresponding linear coefficients; Characterizing the linear coefficients Take the subsequent expression The operation that yields the minimum value; For an overcomplete dictionary supported by a reference set The corresponding sub-dictionary composed of atoms; represents the linear coefficients of the sparse decomposition.
[0077] Furthermore, obtaining the reference residual based on the linear coefficients includes: calculating... To obtain the reference residual; among which, This is the reference residual at the k-th iteration.
[0078] Furthermore, based on the linear coefficients and the reference residual, it is determined whether the iteration termination condition is met, including: obtaining... The corresponding reference sparsity and the residual norm corresponding to the reference residual; if the reference sparsity is less than or equal to the sparsity constraint, or the residual norm is less than or equal to the preset residual threshold, the iteration termination condition is determined to be met; otherwise, the iteration termination condition is determined not to be met.
[0079] It should be noted that the method of performing the (k+1)th iteration based on the initial support set and the initial residual at the (k+1)th iteration is the same as the method of the (k)th iteration, and will not be repeated here.
[0080] It should be noted that the decomposition coefficient vector is determined based on the linear coefficients, which is the vector used in the last iteration. It is determined to be the decomposition coefficient vector.
[0081] Furthermore, after outputting the low-dimensional sparse feature vector corresponding to the target energy meter, the process also includes: determining the position and magnitude of the non-zero elements in the low-dimensional sparse feature vector; determining the anomaly type corresponding to the target energy meter based on the position; and determining the severity of the anomaly based on the magnitude.
[0082] In this way, the anomaly type and severity of the target energy meter can be determined by the position and magnitude of the non-zero elements in the low-dimensional sparse feature vector. The method is simple, direct and accurate.
[0083] It should be noted that during dictionary learning, the overcomplete dictionary is trained using the K-SVD algorithm on historical residual vectors under normal and various abnormal operating conditions of the energy meter. During training, each atom in the dictionary adaptively learns and represents a common feature pattern in the residual vector. Different feature patterns correspond to residual features of different abnormal operating types of the energy meter. Therefore, each atom possesses a specific physical meaning, meaning that the abnormal type can be represented and extracted through atoms. Thus, a correspondence between atom indices and abnormal types can be established. The abnormal type can then be determined based on the position of the non-zero elements in the low-dimensional sparse feature vector. The severity of the abnormal type is determined by the magnitude of the non-zero elements.
[0084] Specifically, the abnormal types include: voltage sag, voltage swell, harmonic distortion, three-phase imbalance, metering deviation exceeding tolerance, and suspected electricity theft.
[0085] Furthermore, after determining the severity of the anomaly based on the amplitude, the method also includes issuing an alarm for anomaly types with a severity greater than or equal to a preset severity threshold. In some embodiments, the preset severity threshold can be 0.1, or it can be set to other parameters, which are not limited here.
[0086] In some embodiments, for atom index 5, the corresponding anomaly type is voltage sag, characterized by a large negative deviation in the voltage dimension of the residual; for atom index 12, the corresponding anomaly type is harmonic distortion, characterized by a large positive deviation in the harmonic content dimension; for atom index 23, the corresponding anomaly type is three-phase imbalance, characterized by large deviations in three-phase voltage / current; and for atom index 31, the corresponding anomaly type is suspected electricity theft, characterized by significantly low current and abnormal power factor. Therefore, for the sparse feature vector with non-zero elements at positions 5, 12, and 31, the amplitude of the element at position 5 is 0.75; the amplitude of the element at position 12 is 0.20; and the amplitude of the element at position 31 is 0.05. Thus, it is determined that voltage sag, with a severity of 0.75, harmonic distortion, with a severity of 0.20, and suspected electricity theft, with a severity of 0.05, occur simultaneously. Then, it can filter out abnormal types below a preset threshold of 0.1 and issue alarms for harmonic distortion and voltage sag.
[0087] Furthermore, after outputting the low-dimensional sparse feature vector corresponding to the target energy meter, the process also includes: calculating the data compression ratio and reconstruction error corresponding to the low-dimensional sparse feature vector; and evaluating the dimensionality reduction effect based on the data compression ratio and reconstruction error.
[0088] In this way, the dimensionality reduction effect can be evaluated by calculating the data compression ratio and reconstruction error corresponding to the low-dimensional sparse feature vectors. This enables a quantitative assessment of compression efficiency and information retention quality, which facilitates the optimization of the entire chain of power system data storage, transmission, and analysis, improves the level of intelligent decision-making, and is a key technical support for building an efficient, reliable, and intelligent power system.
[0089] It should be noted that the data compression ratio is calculated as follows: obtain the dimension of the residual vector and the number of non-zero elements in the low-dimensional sparse feature vector; determine the data compression ratio by the ratio between the dimension of the residual vector and the number of non-zero elements in the low-dimensional sparse feature vector.
[0090] In some embodiments, the residual vector has a dimension of 10; the number of non-zero elements in the low-dimensional sparse feature vector is 3; then the data compression ratio is 10 / 3 = 3.33. It should be noted that if the full sparse vector dimension is used, which contains a large number of zero elements, a sparse storage format can be used during storage, actually storing only the non-zero elements plus an index, resulting in a more significant compression effect.
[0091] It should be noted that the reconstruction error is calculated as follows: the product of the overcomplete dictionary and the low-dimensional sparse feature vector is used to determine the reconstruction vector; the reconstruction error is calculated... The reconstruction error is obtained; among which, This represents the reconstruction error; is the dimension of the residual vector; This is the i-th element in the residual vector; This is the i-th element in the reconstructed vector.
[0092] Furthermore, the dimensionality reduction effect is evaluated based on the data compression ratio and reconstruction error, including: if the data compression ratio is less than or equal to a preset compression threshold, or the reconstruction error is less than or equal to a preset reconstruction threshold, the dimensionality reduction effect is determined to be poor; otherwise, the dimensionality reduction effect is determined to be good.
[0093] It should be noted that if the RMSE is less than the preset reconstruction threshold, it indicates that the low-dimensional features have effectively preserved the original information.
[0094] If the dimensionality reduction effect is determined to be poor, it is necessary to retrain the overcomplete dictionary in order to adjust the size of the overcomplete dictionary D or the low-dimensional sparse feature vector.
[0095] In this embodiment, the method first acquires the power grid topology data and equipment parameter data of the power distribution area where the electricity meter is located, and constructs a digital twin simulation model that highly corresponds to the physical distribution area based on this data. By collecting real-time boundary load data of the distribution area and inputting it into the digital twin model, the model generates expected theoretical operating parameters for each electricity meter node within the distribution area through electrical calculations. These expected values include various electrical quantities such as the effective value of each phase voltage, the effective value of the current, active power, reactive power, power factor, harmonic content, and frequency, comprehensively covering the characterization of the electricity meter's operating status. Simultaneously, the method collects the same electrical parameters measured by the electricity meter during actual operation. The measured operational parameters of gas volume are analyzed, ensuring strict synchronization in time, consistent sampling frequency, and consistent data format to guarantee the accuracy of subsequent comparisons. The measured values at the same moment are compared point-by-point with the theoretical expected values. For each operational parameter dimension, the absolute difference or relative deviation is calculated, and the results of all dimensions are combined to form a residual vector. This residual vector removes the background signal under normal operating conditions, retaining only the deviation between actual operation and the ideal state, thus highlighting abnormal characteristics. Subsequently, the residual vector is input into a pre-trained sparse coding model, which is trained from a large number of historical residual samples using a dictionary learning algorithm. Each residual vector can be approximated by a linear combination of a few atoms in a complete dictionary. The residual vectors are sparsely decomposed using algorithms such as orthogonal matching pursuit or basis pursuit to obtain a set of sparse coefficients. The vast majority of these coefficients are zero, with only a few non-zero elements, forming a low-dimensional sparse feature vector, which is then output. This feature vector has a dimension far lower than the original residual vector, achieving efficient data compression and significantly reducing the demand for communication bandwidth and cloud storage resources. Furthermore, the positions of the non-zero elements in the sparse coefficients can be used to automatically identify the type of anomaly occurring in the energy meter, such as voltage dips or voltage sags, by referring to a pre-defined mapping table. The method identifies anomalies such as transient rise, harmonic distortion, three-phase imbalance, excessive metering deviation, and suspected electricity theft, and quantitatively assesses the severity of these anomalies based on the amplitude of non-zero elements, providing an intuitive basis for operation and maintenance decisions. Furthermore, the method includes a step for evaluating the dimensionality reduction effect, objectively assessing data compression efficiency and information retention by calculating the compression ratio and reconstruction error, facilitating model parameter optimization. The entire technical solution, through the organic combination of digital twin modeling and sparse coding, not only solves the engineering challenges of high-dimensional data processing but also endows the dimensionality reduction features with clear physical meaning and anomaly diagnostic capabilities, realizing an integrated process from data acquisition and feature extraction to intelligent analysis.
[0096] Combination Figure 2 As shown in the figure, this disclosure provides a device 200 for dimensionality reduction of electricity meter features. The device includes: a construction module 201, a simulation module 202, a data acquisition module 203, an acquisition module 204, and an output module 205.
[0097] Among them, the construction module 201 is configured to construct a digital twin simulation model of the power distribution area where the target electricity meter is located;
[0098] The simulation module 202 is configured to collect real-time boundary load data of the power distribution area and input the boundary load data into the digital twin simulation model so that the digital twin simulation model can simulate the power distribution area based on the real-time boundary load data.
[0099] The acquisition module 203 is configured to acquire theoretical operating parameter data of the node corresponding to the target energy meter in the digital twin simulation model; at the same time, it acquires measured operating parameter data of the target energy meter.
[0100] The acquisition module 204 is configured to acquire the residual vectors corresponding to the theoretical operating parameter data and the measured operating parameter data;
[0101] The output module 205 is configured to input the residual vector into a preset sparse coding model and output a low-dimensional sparse feature vector corresponding to the target energy meter.
[0102] The apparatus for dimensionality reduction of electricity meter features provided in this embodiment constructs a digital twin simulation model of the power distribution area where the target electricity meter is located. Real-time boundary load data of the power distribution area is then collected and input into the digital twin simulation model, allowing the model to simulate the power distribution area based on the real-time boundary load data. In the digital twin simulation model, theoretical operating parameter data of the node corresponding to the target electricity meter is collected. Simultaneously, measured operating parameter data of the target electricity meter is collected. The residual vectors corresponding to the theoretical and measured operating parameter data are then obtained, and the residual vectors are input into a preset sparse coding model to output a low-dimensional sparse feature vector corresponding to the target electricity meter. In this way, by obtaining the residual vector of the theoretical operating parameter data corresponding to the digital twin simulation model and the measured operating parameter data of the target energy meter, the interference of normal background signals is eliminated, making the abnormal features more prominent in the residual. Then, a sparse coding model is introduced to reduce the dimensionality of the high-dimensional residual vector and generate a low-dimensional sparse feature vector, which greatly reduces the amount of data, alleviates the communication bandwidth and storage pressure, and retains the key structured information, making it easier to accurately detect anomalies from the low-dimensional sparse feature vector. Thus, the accuracy of anomaly detection can be improved while compressing the features of the energy meter.
[0103] Furthermore, the construction module is configured to build a digital twin simulation model of the power distribution area where the target electricity meter is located by: acquiring the power grid topology data and equipment parameter data of the power distribution area where the target electricity meter is located; and building a digital twin simulation model based on the power grid topology data and equipment parameter data.
[0104] Furthermore, the simulation module is configured to collect real-time boundary load data of the power distribution area in the following manner: every preset collection time interval, it collects the effective value of the total incoming three-phase voltage, the effective value of the total incoming three-phase current, the total incoming active power, and the total incoming reactive power of the power distribution area; and determines one or more of the effective value of the total incoming three-phase voltage, the effective value of the total incoming three-phase current, the total incoming active power, and the total incoming reactive power as the feature vector of the real-time boundary load data.
[0105] Furthermore, the acquisition module is configured to acquire the residual vectors corresponding to the theoretical operating parameter data and the measured operating parameter data in the following manner: constructing a theoretical expectation vector based on the theoretical operating parameter data according to a preset dimensional order; constructing a measured parameter vector based on the measured operating parameter data according to the dimensional order; calculating the absolute difference or relative deviation between the measured parameter vector and the theoretical expectation vector point by point to obtain the calculation result; and acquiring the residual vector based on the calculation result.
[0106] Furthermore, the output module is configured to input the residual vector into a preset sparse coding model and output a low-dimensional sparse feature vector corresponding to the target energy meter in the following manner: inputting the residual vector into the preset sparse coding model, so as to use the sparse coding model to perform sparse decomposition on the residual vector according to the preset overcomplete dictionary, and obtain the decomposition coefficient vector corresponding to the residual vector; and determining the decomposition coefficient vector as the low-dimensional sparse feature vector.
[0107] Furthermore, the device for dimensionality reduction of electricity meter features also includes: an anomaly detection module; the anomaly detection module is configured to output a low-dimensional sparse feature vector corresponding to the target electricity meter, and then determine the position and magnitude of the non-zero elements in the low-dimensional sparse feature vector; determine the anomaly type corresponding to the target electricity meter based on the position; and determine the severity of the anomaly based on the magnitude.
[0108] Furthermore, the device for dimensionality reduction of electricity meter features also includes: an evaluation module; the evaluation module is configured to output a low-dimensional sparse feature vector corresponding to the target electricity meter, and then calculate the data compression ratio and reconstruction error corresponding to the low-dimensional sparse feature vector; the dimensionality reduction effect is evaluated based on the data compression ratio and reconstruction error.
[0109] Combination Figure 3As shown, this disclosure provides an electronic device 300, including a processor 301 and a memory 302. Optionally, the device may further include a communication interface 303 and a bus 304. The processor 301, communication interface 303, and memory 302 can communicate with each other via the bus 304. The communication interface 303 can be used for information transmission. The processor 301 can call logical instructions in the memory 302 to execute the method for dimensionality reduction of electricity meter features described in the above embodiment.
[0110] Furthermore, the logic instructions in the aforementioned memory 302 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0111] The memory 302, as a storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 301 executes functional applications and data processing by running the program instructions / modules stored in the memory 302, that is, it implements the method for dimensionality reduction of electricity meter features in the above embodiments.
[0112] The memory 302 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 302 may include high-speed random access memory and may also include non-volatile memory.
[0113] This disclosure provides a storage medium storing computer-executable instructions configured to execute the above-described method for dimensionality reduction of electricity meter features.
[0114] The aforementioned storage media can be either transient computer-readable storage media or non-transitory computer-readable storage media. Non-transitory storage media include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, and can also be transient storage media.
[0115] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the claims. As used in the description of embodiments and claims, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used in this application means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.
[0116] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0117] 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 embodiments of this disclosure. 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. In some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
Claims
1. A method for dimensionality reduction of features of electricity meters, characterized in that, include: Construct a digital twin simulation model of the power distribution area where the target electricity meter is located; Real-time boundary load data of the power distribution area is collected and input into the digital twin simulation model so that the digital twin simulation model can simulate the power distribution area based on the real-time boundary load data; In the digital twin simulation model, theoretical operating parameter data of the node corresponding to the target energy meter are collected; At the same time, the measured operating parameter data of the target electricity meter are collected; Obtain the residual vectors corresponding to the theoretical operating parameter data and the measured operating parameter data; The residual vector is input into a preset sparse coding model, and the low-dimensional sparse feature vector corresponding to the target energy meter is output.
2. The method according to claim 1, characterized in that, The construction of the digital twin simulation model of the power distribution area where the target electricity meter is located includes: Obtain the power grid topology data and equipment parameter data of the power distribution area where the target electricity meter is located; The digital twin simulation model is constructed based on the power grid topology data and the equipment parameter data.
3. The method according to claim 1, characterized in that, The collection of real-time boundary load data for the power distribution area includes: Every preset data collection interval, the effective values of the total incoming three-phase voltage, the effective values of the total incoming three-phase current, the total incoming active power, and the total incoming reactive power of the power distribution area are collected. One or more of the following are determined as the real-time boundary load data feature vector: the effective value of the three-phase voltage of the total incoming line, the effective value of the three-phase current of the total incoming line, the active power of the total incoming line, and the reactive power of the total incoming line.
4. The method according to claim 1, characterized in that, The step of obtaining the residual vectors corresponding to the theoretical operating parameter data and the measured operating parameter data includes: The theoretical expectation vector is constructed based on the theoretical operating parameter data according to the preset dimensional order; Construct a measured parameter vector based on the measured operational parameter data according to the dimensional order described above; The absolute difference or relative deviation between the measured parameter vector and the theoretical expected vector is calculated point by point to obtain the calculation result; The residual vector is obtained based on the calculation results.
5. The method according to claim 1, characterized in that, The step of inputting the residual vector into a preset sparse coding model and outputting a low-dimensional sparse feature vector corresponding to the target energy meter includes: The residual vector is input into a preset sparse coding model, and the sparse coding model is used to perform sparse decomposition on the residual vector according to a preset overcomplete dictionary to obtain the decomposition coefficient vector corresponding to the residual vector. The decomposition coefficient vector is determined as the low-dimensional sparse feature vector.
6. The method according to any one of claims 1 to 5, characterized in that, After outputting the low-dimensional sparse feature vector corresponding to the target energy meter, the method further includes: Determine the position and magnitude of the non-zero elements in the low-dimensional sparse feature vector; The anomaly type corresponding to the target electricity meter is determined based on the location; The severity of the anomaly is determined based on the magnitude of the amplitude.
7. The method according to any one of claims 1 to 5, characterized in that, After outputting the low-dimensional sparse feature vector corresponding to the target energy meter, the method further includes: Calculate the data compression ratio and reconstruction error corresponding to the low-dimensional sparse feature vector; The dimensionality reduction effect is evaluated based on the data compression ratio and the reconstruction error.
8. A device for dimensionality reduction of electricity meter features, characterized in that, include: The building module is configured to build a digital twin simulation model of the power distribution area where the target electricity meter is located; The simulation module is configured to collect real-time boundary load data of the power distribution area and input the boundary load data into the digital twin simulation model so that the digital twin simulation model can simulate the power distribution area based on the real-time boundary load data. The acquisition module is configured to acquire theoretical operating parameter data of the node corresponding to the target energy meter in the digital twin simulation model; At the same time, the measured operating parameter data of the target electricity meter are collected; The acquisition module is configured to acquire the residual vectors corresponding to the theoretical operating parameter data and the measured operating parameter data; The output module is configured to input the residual vector into a preset sparse coding model and output a low-dimensional sparse feature vector corresponding to the target energy meter.
9. An electronic device comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to, when running the program instructions, execute the method for dimensionality reduction of electricity meter features as described in any one of claims 1 to 7.
10. A storage medium storing program instructions, characterized in that, When the program instructions are executed, they perform the method for dimensionality reduction of the features of the electricity meter as described in any one of claims 1 to 7.