A method and device for diagnosing electric meter faults based on stacked recurrent neural networks
Through the stacked recurrent neural network model, the dynamic characteristics of the current timing data of the meter are automatically extracted, which solves the problem of time-consuming and insufficient timing correlation of feature design in traditional meter fault diagnosis, and achieves efficient fault diagnosis and universal improvement.
Patent Information
- Application Number
- CN202111060037.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-10
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2041-09-10
AI Technical Summary
Traditional meter fault diagnosis methods require a lot of time to design model characteristics, and lack timing correlation, which reduces the model's ability to characterize faults.
The stacked recurrent neural network model is adopted. By acquiring and preprocessing current timing data, the trained stacked recurrent neural network model is input to automatically extract dynamic timing features and determine the diagnostic category of the electricity meter, avoiding the need for artificial design model features.
Automatic diagnosis of meter faults is realized, the model's characterization ability and versatility of fault types is improved, and the processing time for new fault types is reduced.
Smart Images

Figure CN113608163B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric meter fault diagnosis, and in particular to an electric meter fault diagnosis method and device using a stacked recurrent neural network. Background Art
[0002] As the State Grid comprehensively promotes the intelligent transformation of electricity meters, hundreds of millions of smart meters have been deployed across the country. Among them, the effective diagnosis of electricity meter faults is an important task in the daily operation and maintenance of smart meters. The traditional diagnosis method is to perform re-diagnosis by sampling and rotating the meters, but this will consume a lot of manpower and time. With the popularization of smart meters, this method is increasingly difficult to meet the needs. Therefore, based on the massive amount of smart meter usage data (that is, the data of the electricity information collection system), building a computer automatic discrimination model has become an effective solution to the current situation.
[0003] The traditional diagnostic methods are as follows: 1) Patent CN110794360A-A method and system for predicting smart energy meter faults based on machine learning, proposes a method and system for predicting smart energy meter faults based on machine learning, and analyzes the fault data of smart energy meters to effectively predict the fault type of smart energy meters; 2) Patent CN106154209A-A method for predicting energy meter faults based on decision tree algorithm, proposes an energy meter fault prediction algorithm based on decision tree algorithm, collects relevant data of users through the collection device, and uses the decision tree algorithm to resume the energy meter fault prediction model. 3) Patent CN108732528A-A method for diagnosing digital energy meter faults based on deep belief networks, proposes a method based on deep belief network models to automatically learn the changing characteristics of each collected data under various faults, and realize the diagnosis of digital energy meter faults.
[0004] However, patent CN106154209A-A method for predicting faults of electric energy meters based on decision tree algorithm and patent CN106154209A-A method for predicting faults of electric energy meters based on decision tree algorithm use machine learning models, and need to manually set model features according to different fault types and related fault types. In the early stage of model construction, a lot of time is needed to design model features. If there are new fault types, the model features need to be manually designed and retrained, and the scalability is low; patent CN108732528A-A digital electric energy meter fault diagnosis method based on deep belief network constructs a deep belief network model, which can realize automatic feature extraction based on the original sampled data, but the original data used is essentially static and has no time series correlation. At the same time, the designed network structure itself cannot extract time series information, which reduces the model's ability to characterize faults. Summary of the invention
[0005] In view of the above technical problems, the purpose of the present invention is to provide an electric meter fault diagnosis method and device based on a stacked recurrent neural network to solve the problem that traditional electric meter fault diagnosis methods require a lot of time to design model features or have no time series correlation.
[0006] The present invention adopts the following technical solutions:
[0007] A method for diagnosing electric meter faults using a stacked recurrent neural network comprises the following steps:
[0008] Acquire the current time series data associated with the electric meter to be diagnosed, and preprocess the current time series data to obtain the preprocessed current time series data; the preprocessed current time series data is I = (I1, I2, ... I a ,...In), where I1 is the current time series data of the first day, I a is the current time series data of day a, I n is the current time series data of the nth day; where a and n are both natural numbers;
[0009] The preprocessed current time series data is input into the trained stacked recurrent neural network model to obtain the output corresponding to the current time series data. Among them, the is an L-dimensional vector, where L is equal to the total number of fault categories that the model needs to distinguish; the stacked recurrent neural network model includes a first recurrent neural network and a second recurrent neural network; the input of the first recurrent neural network on the ath day is the row vector H generated on the ath day a and the intermediate state output S of the recurrent neural network unit on day a-1 a-1 ; The output The intermediate state Sn of the first recurrent neural network is obtained by affine transformation and nonlinear activation; the row vector H generated on the ath day a The hidden vector of the second recurrent neural network is obtained through affine transformation and nonlinear activation;
[0010] The output corresponding to the current timing data Determine the diagnostic category of the meter to be diagnosed.
[0011] Optionally, daily current time series data can be obtained by:
[0012] The 24 hours of each day are divided into m time points at equal time intervals, and the current data at each time point is obtained respectively. The current time series data of each day includes the current data at each time point.
[0013] Optionally, the time interval is 1 hour, and the current time series data of each day includes the current data of 24 time points. or Among them, [i1 A ,i1 C ] is the current collected in the first hour when the meter to be diagnosed is a three-phase three-wire meter, [i 24 A ,i 24 C ] is the current collected in the 24th hour when the meter to be diagnosed is a three-phase three-wire meter; [i1 A ,i1 B ,i1 C ] is the current collected in the first hour when the meter to be diagnosed is a three-phase three-wire meter, [i 24 A ,i 24 B ,i 24 C ][i 24 A ,i 24 C ] is the current collected in the 24th hour when the meter to be diagnosed is a three-phase three-wire meter.
[0014] Optionally, the parameters of the second recurrent neural network satisfy the following formula:
[0015] f k =σ(x k U f +h k-1 W f +b f );
[0016] g k =σ(x k U g +h k-1 W g +b g );
[0017] o k =σ(x k U o +h k-1 W o +b o );
[0018]
[0019] Among them, x k represents the current data of the kth hour, c k and h k Respectively represent the state vector and hidden vector inside the second recurrent neural network; f k , g k and kThey represent the weight vector of the forget gate, the weight vector of the input gate, and the weight vector of the output gate in the second recurrent neural network respectively; U f , U g , U o , U are affine weight matrices, W f , W g , W o and W are affine weight matrices, b f 、b g 、b o and b are bias row vectors; σ represents the sigmoid activation function, and tanh represents the hyperbolic tangent activation function.
[0020] Optionally, the row vector H generated on the ath day a Satisfies the following formula:
[0021] H a =tanh ( h m V+d);
[0022] Among them, H a is a row vector of dimension b, h m is an a-dimensional row vector, V is an a-row and b-column affine weight matrix, d is a b-dimensional row vector, b is a natural number, tanh represents the hyperbolic tangent activation function, h m is the hidden vector of the second recurrent neural network at the mth time point.
[0023] Optionally, the output corresponding to the current timing data Determine the diagnostic category of the meter to be diagnosed, including:
[0024] The output Each element in the L-dimensional vector represents a fault analogy, and the fault analogy represented by the element with the largest value in the L-dimensional vector is used as the fault category of the electric meter to be diagnosed.
[0025] Optionally, the method of the present invention further comprises the following steps:
[0026] A loss function is constructed, and the stacked recurrent neural network is updated based on the loss function.
[0027] An electric meter fault diagnosis device using a stacked recurrent neural network, comprising:
[0028] The processing unit is used to obtain the current time series data associated with the electric meter to be diagnosed, and preprocess the current time series data to obtain the preprocessed current time series data; the preprocessed current time series data is I = (I1, I2, ... I a ,...In), where I ais the current time series data of the kth day; where a and n are both natural numbers;
[0029] The output unit is used to input the preprocessed current time series data into the trained stacked recurrent neural network model to obtain the output corresponding to the current time series data. Among them, the is an L-dimensional vector, where L is equal to the total number of fault categories that the model needs to distinguish; the stacked recurrent neural network model includes a first recurrent neural network and a second recurrent neural network; the input of the first recurrent neural network on the ath day is the row vector H generated on the ath day a and the intermediate state output S of the recurrent neural network unit on day a-1 a-1 ; The output The intermediate state Sn of the first recurrent neural network is obtained by affine transformation and nonlinear activation; the row vector H generated on the ath day a The hidden vector of the second recurrent neural network is obtained through affine transformation and nonlinear activation;
[0030] A determination unit is used to output the current timing data according to the corresponding Determine the diagnostic category of the meter to be diagnosed.
[0031] An electronic device comprises: 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 so that the at least one processor can execute the electric meter fault diagnosis method of the stacked recurrent neural network.
[0032] A computer storage medium stores a computer program, which, when executed by a processor, implements the electric meter fault diagnosis method of the stacked recurrent neural network.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] The present invention inputs the current time series data associated with the electric meter to be diagnosed into a trained stacked recurrent neural network model to obtain the output corresponding to the current time series data. The output corresponding to the current timing data To determine the diagnostic category of the meter to be diagnosed, there is no need to spend a lot of time on model feature design. When a new fault type is added, there is no need to manually redesign the model features. Different types of meter faults can be effectively characterized to achieve automatic diagnosis of meter faults. Moreover, the input of the stacked recurrent neural network model is current time series data, which can effectively extract dynamic time series features rather than independent static features, thereby improving the model's ability to characterize fault types and its versatility. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A schematic flow chart of a method for diagnosing electric meter faults using a stacked recurrent neural network provided by one embodiment of the present invention;
[0036] Figure 2 A schematic diagram of the structure of a stacked recurrent neural network provided by one embodiment of the present invention;
[0037] Figure 3 A schematic diagram of the structure of a second recurrent neural network provided by an embodiment of the present invention;
[0038] Figure 4 A schematic diagram of an electric meter fault diagnosis device of a stacked recurrent neural network provided by an embodiment of the present invention;
[0039] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, under the premise of no conflict, the embodiments or technical features described below can be arbitrarily combined to form a new embodiment:
[0041] Embodiment 1:
[0042] Please refer to Figure 1-5 As shown, Figure 1 A method for diagnosing electric meter faults using a stacked recurrent neural network of the present invention is shown, comprising the following steps:
[0043] Step S1: Acquire the current time series data associated with the electric meter to be diagnosed, and preprocess the current time series data to obtain the preprocessed current time series data; the preprocessed current time series data is I = (I1, I2, ... I a ,...In), where I a is the current time series data of day a; where a and n are both natural numbers;
[0044] In the specific implementation, the current time series data of the dedicated transformer users or low-voltage non-residential users can be collected. According to the type of electric meter, the current time series data can be divided into three-phase three-wire current time series data and three-phase four-wire current time series data.
[0045] Among them, the three-phase three-wire current time series data only records the current data of the two phases A and C, while the three-phase four-wire current data records the current data of the three phases A, B and C.
[0046] Optionally, daily current time series data can be obtained by:
[0047] The 24 hours of each day are divided into m time points at equal time intervals, and the current data at each time point is obtained respectively. The current time series data of each day includes the current data at each time point.
[0048] Specifically, the time interval is 1 hour, and the current time series data of each day includes the current data of 24 time points. or Among them, [i1 A ,i1 C ] is the current collected in the first hour when the meter to be diagnosed is a three-phase three-wire meter, [i 24 A ,i 24 C ] is the current collected in the 24th hour when the meter to be diagnosed is a three-phase three-wire meter; [i1 A ,i1 B ,i1 C ] is the current collected in the first hour when the meter to be diagnosed is a three-phase three-wire meter, [i 24 A ,i 24 B ,i 24 C ][i 24 A ,i 24 C ] is the current collected in the 24th hour when the meter to be diagnosed is a three-phase three-wire meter.
[0049] In a specific implementation, for each phase current, current data can be collected at equal time intervals every day. The more commonly used time interval parameters are 15 minutes / 30 minutes / 60 minutes, and the corresponding number of current points collected every day (current points = 24 hours / time interval) is 96 points / 48 points / 24 points.
[0050] As a specific embodiment, the current can be collected at 24 points every day with a time interval of 60 minutes. Therefore, for a three-phase three-wire type, the current time series data of each day can be expressed as:
[0051]
[0052] where i1 A 、i1 C They represent the current recorded in the first hour of phase A and phase C respectively, and so on. 24 A 、i 24 C Respectively represent the current recorded in the 24th hour of the A and C phase currents;
[0053] For a three-phase four-wire type, the daily current time series data can be expressed as:
[0054]
[0055] where i1 A 、i1 B 、i1 C Respectively represent the current recorded in the first hour of phase A, B, and C, and so on. 24 A 、i1 B 、i 24 C Respectively represent the current recorded in the 24th hour of the A, B, and C phase currents;
[0056] Since there is a possibility of data collection failure, the current corresponding to a certain current at a certain time is missing, and the missing current point data needs to be filled with missing values. The filling method can be but is not limited to polynomial fitting, for example, neighbor point data filling, mean filling, mode filling and other preprocessing methods.
[0057] For example, using neighbor point data filling for preprocessing, assuming that the data i2 of the second hour of the B phase current B If it is missing, the data of the first hour of phase B current i1 can be used B Or the third hour data of phase B current i3 B Fill it.
[0058] Step S2: Input the preprocessed current time series data into the trained stacked recurrent neural network model to obtain the output corresponding to the current time series data Among them, the is an L-dimensional vector, where L is equal to the total number of fault categories that the model needs to distinguish; the stacked recurrent neural network model includes a first recurrent neural network and a second recurrent neural network; the input of the first recurrent neural network on the ath day is the row vector H generated on the ath day a and the intermediate state output S of the recurrent neural network unit on day a-1 a-1 ; The output The intermediate state Sn of the first recurrent neural network is obtained by affine transformation and nonlinear activation; the row vector H generated on the ath day a The hidden vector of the second recurrent neural network is obtained through affine transformation and nonlinear activation;
[0059] It should be noted that stacked recurrent neural networks, also called deep recurrent neural networks, are simply multiple recurrent neural networks stacked together.
[0060] A typical recurrent neural network is RNN (Recurrent Neural Network, RNN for short), which can process time series data of any length by using neurons with self-feedback.
[0061] In this embodiment, the basic structure of the stacked recurrent neural network model can be as follows: Figure 2 As shown, Figure 2 The basic structure of a stacked recurrent neural network model of the present invention is shown;
[0062] As a specific embodiment, n is set to 10, and the pre-processed current time series data is I=(I1, I2, ... I a ,...I 10 ), where I1, I2, ..., I 10 The current data of the first day, the second day to the tenth day are respectively represented. The current data of the ath day is transformed by the trans module (i.e., the second recurrent neural network) to obtain an m-dimensional (e.g., m=5) row vector H a , and then the row vector H generated on day a a , the intermediate state output S of the recurrent neural network unit on the k-1th day a-1 , as the input of the recurrent neural network unit on the ath day, so that from the first day to the tenth day, it iterates in sequence, and on the tenth day, the intermediate state S output by the recurrent neural network unit is 10 , through affine transformation and nonlinear activation, the final output result is obtained in It is an L-dimensional vector, where L is equal to the total number of fault categories that the model needs to distinguish.
[0063] For example, if the model needs to distinguish three types of faults, then the total number of categories L = 4, one of which is a no-fault category.
[0064] It should be noted that Figure 2 The single-layer LSTM unit is only a special case of the first recurrent neural network. Both the first recurrent neural network and the second recurrent neural network units can be but are not limited to single-layer or multi-layer LSTM units, GRU or corresponding variants.
[0065] It should be noted that Long short-term memory (LSTM) is a special RNN (Recurrent Neural Network, RNN for short), which is mainly used to solve the problems of gradient vanishing and gradient exploding in the process of long sequence training. In simple terms, compared with ordinary RNN, LSTM can perform better in longer sequences.
[0066] Optionally, the parameters of the second recurrent neural network satisfy the following formula:
[0067] f k =σ(x k U f +h k-1 W f +b f );
[0068] g k =σ(x k U g +h k-1 W g +b g );
[0069] o k =σ(x k U o +h k-1 W o +b o );
[0070]
[0071] Among them, x k represents the current data of the kth hour, c k and h k Respectively represent the state vector and hidden vector inside the second recurrent neural network; f k , g k and k They represent the weight vector of the forget gate, the weight vector of the input gate, and the weight vector of the output gate in the second recurrent neural network respectively; U f , U g , U o , U are affine weight matrices, W f , W g , W o and W are affine weight matrices, bf, bg, bo and b are bias row vectors; σ represents the sigmoid activation function, and tanh represents the hyperbolic tangent activation function.
[0072] Specifically, the row vector H generated on the ath day a Satisfies the following formula:
[0073] H a =tanh ( h m V+d);
[0074] Among them, H a is a row vector of dimension b, h mis an a-dimensional row vector, V is an a-row and b-column affine weight matrix, d is a b-dimensional row vector, b is a natural number, tanh represents the hyperbolic tangent activation function, h m is the hidden vector of the second recurrent neural network at the mth time point.
[0075] As a specific example, assuming that the data collected is a three-phase three-wire meter, the current time series data of the meter to be diagnosed every day is If the data is collected by a three-phase four-wire meter, it is only necessary to set the two-phase current points [i k A ,i k C ] is modified to three-phase current point [i k A ,i k B ,i k C ] The following is an example of a specific implementation method for collecting data from a three-phase three-wire meter with a daily collection interval of 1 hour:
[0076] Please refer to Figure 3 As shown, Figure 3 The schematic diagram of the structure of the second recurrent neural network of the present invention is shown. Take the current collection point of the kth hour in the current data of the ath day as [i k A ,i k C ] and the intermediate state output s of the k-1 hour recurrent neural network unit k-1 , as the input of the second recurrent neural network at the kth hour, so that from the first hour to the twenty-fourth hour, it iterates in sequence, and the second recurrent neural network unit outputs the intermediate state s at the twenty-fourth hour 24 , will s 24 Through affine transformation and nonlinear activation, we get the row vector H a .
[0077] exist Figure 3 In the calculation process of each loop iteration, the calculation process is as follows:
[0078] f k =σ(x k U f +h k-1 W f +b f ) (3)
[0079] g k =σ(x k U g +h k-1 W g +b g) (4)
[0080] o k =σ(x k U o +h k-1 W o +b o ) (5)
[0081]
[0082]
[0083] Among them, x k =[i k A ,i k C ], represents the two-phase current data at the kth hour, Figure 3 The output s of the recurrent neural network unit in the kth hour k Split into c k and h k Two independent row vectors of the same dimension, assuming s k is a 20-dimensional row vector, then c k and h k are all 10-dimensional row vectors, representing the state vector and hidden vector inside LSTM respectively. k , g k , o k They represent the weight vectors of the forget gate, input gate, and output gate inside the LSTM. In formulas (3) to (6), U f , U g , U o and U is a 2-row 10-column affine weight matrix, W f , W g , W o , W is an affine weight matrix with 10 rows and 10 columns, b f 、b g 、b o , b are 10-dimensional bias row vectors. The specific values of these affine weight matrices and bias row vectors need to be determined by model training. The symbol σ represents the sigmoid activation function, and tanh represents the hyperbolic tangent activation function. Therefore, taking the current data x of the kth hour as k , and c at the k-1th hour k-1 and h k-1 (The two are spliced in rows, that is, s k-1 ) as input, and then the c at the kth hour can be calculated by formulas (3)-(7): k and h k (The two are spliced in rows, that is, s k). The row vector Ha corresponding to the current time series data of the last day a can be obtained through the hidden vector h output by the LSTM unit of the 24th hour. 24 Through affine transformation and hyperbolic tangent activation, we get:
[0084] H a =tanh ( h 24 V+d); (8)
[0085] In formula (8), assuming that Ha is a 5-dimensional row vector, then V is an affine weight matrix with 10 rows and 5 columns, and d is a 5-dimensional row vector. The specific values of V and d need to be determined through model training.
[0086] Step S3: Output corresponding to the current timing data Determine the diagnostic category of the meter to be diagnosed.
[0087] Specifically, step S3 includes:
[0088] The output Each element in the L-dimensional vector represents a fault analogy, and the fault analogy represented by the element with the largest value in the L-dimensional vector is used as the fault category of the electric meter to be diagnosed.
[0089] In this embodiment, the current time series data is input into the trained stacked neural network model to obtain a final output result vector, and the fault category corresponding to the element with the largest value in the result vector is output as the final fault category.
[0090] For example, the total number of fault categories that the model needs to distinguish is L = 4. Assume that a test sample passes Figure 2 The calculation of the stacked recurrent neural network model obtains a four-dimensional row vector Among them, elements 0.7, 0.1, 0.1 and 0.1 represent four categories respectively, namely transformer fault, connector disconnection, connector shunt fault and no fault. Then the largest element of the row vector is the element 0.7 in the first position. Then the predicted category of this test sample is the fault category represented by element 0.7, that is, transformer fault.
[0091] In the above implementation process, the present invention inputs the current time series data associated with the electric meter to be diagnosed into the trained stacked recurrent neural network model to obtain the output corresponding to the current time series data. The output corresponding to the current timing data To determine the diagnostic category of the meter to be diagnosed, there is no need to spend a lot of time on model feature design. When a new fault type is added, there is no need to manually redesign the model features. Different types of meter faults can be effectively characterized to achieve automatic diagnosis of meter faults. Moreover, the input of the stacked recurrent neural network model is current time series data, which can effectively extract dynamic time series features rather than independent static features, thereby improving the model's ability to characterize fault types and its versatility.
[0092] As another embodiment, the method of the present invention further comprises the following steps:
[0093] Step S4: construct a loss function, and update the stacked recurrent neural network based on the loss function.
[0094] Specifically, the following assumes that the total number of categories that the model needs to distinguish is L=4, and the total number of training samples is N. The loss function is constructed by cross entropy as follows:
[0095]
[0096] Y in formula (9) ij Indicates the value of the i-th training sample corresponding to the j-th category. If the i-th training sample belongs to the j-th category, the value is 1, otherwise it is 0; Indicates that the i-th training sample passes Figure 2 The output of the stacked recurrent neural network is calculated as The score corresponding to the j-th category.
[0097] If the model is optimized and the standard gradient descent method is used to train the neural network parameters, the neural network parameters are updated as follows:
[0098]
[0099] Where α is a positive constant, for example, α = 0.1. W is the parameter to be optimized in the stacked recurrent neural network, such as U in formulas (3)-(8) f , U g , U o , U, W f , W g , W o , W, b f 、b g 、b o , b, V and d can be optimized through the iterative update strategy of formula (10).
[0100] When training the neural network parameters, we first label the training sample set according to the meter fault category that needs to be determined. For example, if we need to determine three types of faults, namely transformer fault, connector disconnection, and connector shunt, we need to construct training samples containing four types of labels. This is because in addition to the above three fault categories, we also need to consider samples without faults as a category.
[0101] The specific source of training samples can be to collate the corresponding category of faulty electric meter data from the work order data of historical on-site inspections. For example, the current data ten days before the work order date is obtained from the electricity consumption collection database to construct training samples.
[0102] In order to ensure the generalization of the training model, the number of sample annotations for each category must be ≥ 5000. Figure 2 The stacked recurrent neural network shown in the figure obtains the output result, and further constructs the loss function through the softmax activation function and the onehot encoding corresponding to the actual sample label (for samples with four categories of labels, the onehot encoding is a four-dimensional 01 vector, the elements corresponding to the category are 1, and the remaining elements are 0).
[0103] It should be understood that the specific form of the loss function can be but is not limited to the cross entropy loss function. Then, gradient back propagation is used to train the neural network parameters; the specific optimization algorithm can be but is not limited to the standard stochastic gradient descent method or related variants.
[0104] Embodiment 2:
[0105] Please refer to Figure 4 As shown, Figure 4 The present invention shows an electric meter fault diagnosis device of a stacked recurrent neural network, comprising:
[0106] The processing unit 10 is used to obtain the current time series data associated with the electric meter to be diagnosed, and preprocess the current time series data to obtain the preprocessed current time series data; the preprocessed current time series data is I = (I1, I2, ... I a ,...In), where I a is the current time series data of the kth day; where a and n are both natural numbers;
[0107] The output unit 20 is used to input the preprocessed current time series data into the trained stacked recurrent neural network model to obtain the output corresponding to the current time series data. Among them, the is an L-dimensional vector, where L is equal to the total number of fault categories that the model needs to distinguish; the stacked recurrent neural network model includes a first recurrent neural network and a second recurrent neural network; the input of the first recurrent neural network on the ath day is the row vector H generated on the ath daya and the intermediate state output S of the recurrent neural network unit on day a-1 a-1 ; The output The intermediate state Sn of the first recurrent neural network is obtained by affine transformation and nonlinear activation; the row vector H generated on the ath day a The hidden vector of the second recurrent neural network is obtained through affine transformation and nonlinear activation;
[0108] The determination unit 30 is used to output the current time series data according to the output Determine the diagnostic category of the meter to be diagnosed.
[0109] In the implementation process, a stacked recurrent neural network electric meter fault diagnosis device of the present invention proposes a stacked recurrent neural network electric meter fault diagnosis model, which includes three parts, namely, a processing unit 10 is used for current time series data preprocessing, and the original current time series data is preprocessed as the input of the subsequent stacked recurrent neural network model; the output unit 20 is used to obtain the classification result of the stacked recurrent neural network model, and the determination unit 30 is used to determine the final electric meter fault diagnosis output, which can effectively characterize different types of electric meter faults and realize automatic diagnosis of electric meter faults.
[0110] Embodiment three:
[0111] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, which can be used in the present application Figure 5 The schematic diagram shown is used to describe an electronic device 100 for implementing an electric meter fault diagnosis method of a stacked recurrent neural network according to an embodiment of the present application.
[0112] like Figure 5 The electronic device 100 includes one or more processors 102 and one or more storage devices 104. These components are interconnected via a bus system and / or other forms of connection mechanisms (not shown). It should be noted that Figure 5 The components and structure of the electronic device 100 shown are only exemplary and not restrictive. The electronic device may have Figure 5 Some of the components shown may also have Figure 5 Other components and structures are not shown.
[0113] The processor 102 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 100 to perform desired functions.
[0114] The storage device 104 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 102 may run the program instructions to implement the functions (implemented by the processor) in the embodiments of the present application described below and / or other desired functions. Various applications and various data may also be stored in the computer-readable storage medium, such as various data used and / or generated by the application, etc.
[0115] The present invention also provides a computer storage medium on which a computer program is stored. If the method of the present invention is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the computer storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by a processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer storage media does not include electrical carrier signals and telecommunication signals.
[0116] For those skilled in the art, various other corresponding changes and deformations can be made according to the technical solutions and concepts described above, and all of these changes and deformations should fall within the protection scope of the claims of the present invention.
Claims
1. A method for diagnosing electric meter faults using a stacked recurrent neural network, characterized in that: The following steps are involved: Acquire the current time series data associated with the electric meter to be diagnosed, and preprocess the current time series data to obtain the preprocessed current time series data; the preprocessed current time series data is I = (I1, I2, ... I a ,...In), where I1 is the current time series data of the first day, I a is the current time series data of day a, I n is the current time series data of the nth day; wherein a and n are both natural numbers; the current time series data of each day is obtained by the following method: the 24 hours of each day are divided into m time points at equal time intervals, and the current data of each time point is obtained respectively, and the current time series data of each day includes the current data of each time point; the time interval is 1 hour, and the current time series data of each day includes the current data of 24 time points, and the current time series data of each day or Among them, [i1 A ,i1 C ] is the current collected in the first hour when the meter to be diagnosed is a three-phase three-wire meter, [i2 A ,i2 C ] is the current collected in the second hour when the meter to be diagnosed is a three-phase three-wire meter, [i 24 A ,i 24 C ] is the current collected in the 24th hour when the meter to be diagnosed is a three-phase three-wire meter; [i1 A ,i1 B ,i1 C ] is the current collected in the first hour when the meter to be diagnosed is a three-phase four-wire meter, [i2 A ,i2 B ,i2 C ] is the current collected in the second hour when the meter to be diagnosed is a three-phase four-wire meter, [i 24 A ,i 24 B ,i 24 C ] is the current collected in the 24th hour when the meter to be diagnosed is a three-phase four-wire meter; The preprocessed current time series data is input into the trained stacked recurrent neural network model to obtain the output corresponding to the current time series data. Among them, the is an L-dimensional vector, where L is equal to the total number of fault categories that the model needs to distinguish; the stacked recurrent neural network model includes a first recurrent neural network and a second recurrent neural network; The parameters of the second recurrent neural network satisfy the following formula: f k =σ(x k U f +h k-1 W f +b f );g k =σ(x k U g +h k-1 W g +b g ); the k =σ(x k U o +h k-1 W o +b o ); Among them, x k represents the current data of the kth hour, c k and h k Respectively represent the state vector and hidden vector inside the second recurrent neural network; f k , g k and k They represent the weight vector of the forget gate, the weight vector of the input gate, and the weight vector of the output gate in the second recurrent neural network respectively; U f , U g , U o , U are affine weight matrices, W f , W g , W o and W are affine weight matrices, b f , b g , b o and b are bias row vectors; σ represents the sigmoid activation function, and tanh represents the hyperbolic tangent activation function; The input of the first recurrent neural network on day a is the row vector H generated on day a. a and the intermediate state output S of the recurrent neural network unit on day a-1 a-1 ; The output The intermediate state Sn of the first recurrent neural network is obtained by affine transformation and nonlinear activation; the row vector H generated on the ath day a The hidden vector of the second recurrent neural network is obtained through affine transformation and nonlinear activation; the current data x at the kth hour k , and c at the k-1th hour k-1 and h k-1 , as input, and then iteratively calculate the c at the kth hour k and h k , the row vector Ha corresponding to the current time series data of the last day a is obtained by the hidden vector h24 output by the LSTM unit at the 24th hour through affine transformation and hyperbolic tangent activation; The output corresponding to the current timing data Determine the diagnostic category of the electric meter to be diagnosed; each element in the output L-dimensional vector represents a fault category, and the fault category represented by the element with the largest value in the L-dimensional vector is used as the fault category of the electric meter to be diagnosed.
2. The electric meter fault diagnosis method of stacked recurrent neural network according to claim 1 is characterized in that: The row vector Ha generated on the ath day satisfies the following formula: Ha = tanh(hmV+d); Among them, Ha is a b-dimensional row vector, hm is an a-dimensional row vector, V is an affine weight matrix with a rows and b columns, d is a b-dimensional row vector, b is a natural number, tanh represents the hyperbolic tangent activation function, and hm is the hidden vector of the second recurrent neural network at the m-th time point.
3. The electric meter fault diagnosis method of stacked recurrent neural network according to claim 1, characterized in that: The following steps are also included: A loss function is constructed, and the stacked recurrent neural network is updated based on the loss function.
4. An electric meter fault diagnosis device based on a stacked recurrent neural network, characterized in that: include: A processing unit, used for acquiring current time series data associated with the electric meter to be diagnosed, and preprocessing the current time series data to obtain preprocessed current time series data; The pre-processed current time series data is I= (I1,I2,...I a ,...In), where I a is the current time series data of the kth day; wherein a and n are both natural numbers; the current time series data of each day is obtained by the following method: the 24 hours of each day are divided into m time points at equal time intervals, and the current data of each time point is obtained respectively, and the current time series data of each day includes the current data of each time point; the time interval is 1 hour, and the current time series data of each day includes the current data of 24 time points, and the current time series data of each day or Among them, [i1 A ,i1 C ] is the current collected in the first hour when the meter to be diagnosed is a three-phase three-wire meter, [i2 A ,i2 C ] is the current collected in the second hour when the meter to be diagnosed is a three-phase three-wire meter, [i 24 A ,i 24 C ] is the current collected in the 24th hour when the meter to be diagnosed is a three-phase three-wire meter; [i1 A ,i1 B ,i1 C ] is the current collected in the first hour when the meter to be diagnosed is a three-phase four-wire meter, [i2 A ,i2 B ,i2 C ] is the current collected in the second hour when the meter to be diagnosed is a three-phase four-wire meter, [i 24 A ,i 24 B ,i 24 C ] is the current collected in the 24th hour when the meter to be diagnosed is a three-phase four-wire meter; The output unit is used to input the preprocessed current time series data into the trained stacked recurrent neural network model to obtain the output corresponding to the current time series data. Among them, the is an L-dimensional vector, where L is equal to the total number of fault categories that the model needs to distinguish; the stacked recurrent neural network model includes a first recurrent neural network and a second recurrent neural network; the parameters of the second recurrent neural network satisfy the following formula: f k =σ(x k U f +h k-1 W f +b f );g k =σ(x k U g +h k-1 W g +b g ); the k =σ(x k U o +h k-1 W o +b o ); Among them, x k represents the current data of the kth hour, c k and h k Respectively represent the state vector and hidden vector inside the second recurrent neural network; f k , g k and k They represent the weight vector of the forget gate, the weight vector of the input gate, and the weight vector of the output gate in the second recurrent neural network respectively; U f , U g , U o , U are affine weight matrices, W f , W g , W o and W are affine weight matrices, b f , b g , b o and b are bias row vectors; σ represents the sigmoid activation function, and tanh represents the hyperbolic tangent activation function; the input of the first recurrent neural network on day a is the row vector H generated on day a a and the intermediate state output S of the recurrent neural network unit on day a-1 a-1 ; The output The intermediate state Sn of the first recurrent neural network is obtained by affine transformation and nonlinear activation; the row vector H generated on the ath day a The hidden vector of the second recurrent neural network is obtained through affine transformation and nonlinear activation; the current data x at the kth hour k , and c at the k-1th hour k-1 and h k-1 , as input, and then iteratively calculate the c at the kth hour k and h k , the row vector Ha corresponding to the last a-day current time series data, and the hidden vector h output by the LSTM unit at the 24th hour 24 Obtained through affine transformation and hyperbolic tangent activation; A determination unit is used to output the current timing data according to the corresponding Determine the diagnostic category of the electric meter to be diagnosed; each element in the output L-dimensional vector represents a fault category, and the fault category represented by the element with the largest value in the L-dimensional vector is used as the fault category of the electric meter to be diagnosed.
5. An electronic device, characterized in that: include: 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 so that the at least one processor can execute the electric meter fault diagnosis method of the stacked recurrent neural network as described in any one of claims 1-3.
6. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it can implement the electric meter fault diagnosis method of the stacked recurrent neural network as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Electric energy meter fault prediction method based on decision tree algorithm
CN106154209A
Digital electric energy meter fault diagnosis method based on the depth confidence network
CN108732528A
Method and system for predicting fault of intelligent electric energy meter based on machine learning
CN110794360A
Electric energy metering device abnormality detecting method based on long and short term memory model
CN108761377A
Information processing method and device, computer equipment, and storage medium
CN108776832A