A CVT error prediction method based on multi-level feature extraction and a storage medium

By employing a multi-level feature extraction method, combined with CVT error data and environmental parameters, and using sparse downsampling and attention mechanisms, the accuracy and real-time performance issues of voltage transformer error prediction were resolved, thereby improving the efficiency and accuracy of the prediction model.

CN119575281BActive Publication Date: 2026-06-30STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED
Filing Date
2024-11-14
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In existing technologies, voltage transformers are prone to errors that exceed the limits during operation, making them difficult to predict effectively and resulting in an inability to provide early warnings of potential fault risks.

Method used

A multi-level feature extraction method is adopted. By collecting CVT error data and environmental parameter data, multi-granular uniform segmentation and sparse downsampling are performed. Combined with periodic and local information extraction modules, attention mechanism and MLP network are used for prediction.

Benefits of technology

It achieves accurate prediction of CVT error, improves the computational efficiency and prediction accuracy of the model, and has real-time performance and wide applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119575281B_ABST
    Figure CN119575281B_ABST
Patent Text Reader

Abstract

This invention discloses a CVT error prediction method and storage medium based on multi-level feature extraction. The method includes: Step S100: Collecting CVT error data and environmental parameter data over a period of time, performing multi-granularity uniform segmentation on the error data, and sparsely downsampling the segmented data; Step S200: Sequentially inputting the multi-granularity segmented and sparsely downsampled error data and weighted environmental parameter data into k periodicity and local information extraction modules for feature extraction; Step S300: Inputting the outputs of each periodicity and local information extraction module into a feedforward layer and a normalization layer, and then applying an attention mechanism according to the feature category; Step S400: Inputting the output of the attention mechanism according to the feature category into an MLP network to obtain the final prediction result. The storage medium is used to store the computer program used to execute the above method. This invention has the advantages of simple principle, good real-time performance, wide applicability, and high reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention mainly relates to the field of online power metering and monitoring technology, specifically a CVT error prediction method and storage medium based on multi-level feature extraction. Background Technology

[0002] Voltage transformers, as common power measuring instruments, are widely used in power systems and serve multiple functions. Various instruments and equipment in power systems require accurate voltage measurement to ensure stable operation. Voltage transformers convert high-voltage signals into low-voltage signals, enabling the measuring equipment to function properly. Power systems also experience various faults and abnormal conditions, such as overvoltage and short circuits. Protection devices can take corresponding protective actions based on the low-voltage signal converted by the voltage transformer, preventing the fault from escalating and damaging equipment. Simultaneously, various control devices in power systems need to control and regulate voltage to meet the operational requirements of the power system. These control devices can also perform corresponding control and regulation based on the low-voltage signal converted by the voltage transformer.

[0003] However, in the actual operation of voltage transformers, the transformer error is affected by factors such as the acquisition principle and harsh environment, and the measurement deviation will exceed the limit within its working life. Therefore, how to predict the error value of voltage transformers and give early warning of possible risks based on the error value is a technical challenge. Summary of the Invention

[0004] The technical problem to be solved by this invention is: in view of the technical problems existing in the prior art, this invention provides a CVT error prediction method and storage medium based on multi-level feature extraction that is simple in principle, has good real-time performance, wide applicability and high reliability.

[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0006] A CVT error prediction method based on multi-level feature extraction, comprising:

[0007] Step S100: Collect CVT error data and environmental parameter data over a period of time, perform multi-granularity uniform segmentation on the error data, and perform sparse downsampling on the segmented data;

[0008] Step S200: Input the error data after multi-granularity segmentation and sparse downsampling and the weighted environmental parameter data into k periodicity and local information extraction modules in sequence for feature extraction;

[0009] Step S300: Input the outputs of each periodic and local information extraction module into the feedforward layer and the normalization layer, and then apply the attention mechanism to them according to the feature category;

[0010] Step S400: Input the output of the attention mechanism according to the feature category into the MLP network to obtain the final prediction result.

[0011] As a further improvement of the present invention: the environmental parameter data in step S100 includes temperature and secondary load.

[0012] As a further improvement of the present invention: step S100 includes:

[0013] Step S101: Collect CVT error data E={e1,e2,…,e1} over a period of time. n Temperature data T = {t1, t2, ..., t n Secondary load data P = {p1, p2, ..., p n};

[0014] Step S102: Perform multi-granularity uniform segmentation on the error data to obtain the data:

[0015]

[0016] in For l i A length equal to N i A collection of data fragments, i = 1, 2, ..., k, n = N i ×l i ;

[0017] Step S103: Data Each data segment in the data is sparsely downsampled to obtain The sampling method is as follows:

[0018]

[0019] in, The elements in num are all taken from elements in E, where num = 1, 2, ..., l i j = 4, [N i -1 / 4]、[N i -3 / 4] respectively represent the values ​​of N i -1, N i The integer part of the result when -3 is divided by 2 is taken, and [i / 2] means the integer part of the result when i is divided by 2 is taken.

[0020] As a further improvement of the present invention: step S200 includes:

[0021] Step S201: Divide the segmented error data Error data after segmentation and downsampling Temperature data T and secondary load data P are input into the first periodic and local information extraction module;

[0022] Step S202: In the periodicity and local information extraction module, the error data is processed. After linear embedding of the data segments, an inter-segment self-attention mechanism is implemented to obtain the feature f1. global In order to extract the periodic information contained in the error data itself;

[0023] Step S203: For Each data segment after downsampling The feature f1 is obtained by implementing the intra-segment self-attention mechanism. local To extract local information from error data;

[0024] Step S204: Calculate the Pearson correlation coefficient between the environmental parameter data T and P and the error data, as follows:

[0025]

[0026] Where r1 and r2 are the correlation coefficient values; e s t s p s These are elements from the error data E, temperature data T, and secondary load data P, respectively. The average values ​​of error data E, temperature data T, and secondary load data P, respectively, are r. t r p This is the weight value.

[0027] r t r p The feature F is obtained by multiplying the feature by the error data E and the temperature data T respectively, and then inputting the feature F into the linear embedding layer. T F P and feature f1 global Features are obtained after inputting into a feedforward layer and a normalization layer. as follows:

[0028] F T =Embedding(r t *T)

[0029] F P =Embedding(r P *P)

[0030]

[0031] Where FC(·) is the feedforward layer operation and Norm(·) is the normalization layer operation, for feature F T F P and characteristics The feature f1 is obtained by performing cross-attention mechanism operation. cross To extract information on the impact of environmental parameter data on error data, the specific steps are as follows:

[0032]

[0033] Q T Q P To determine the query volume, by analyzing F T F P Obtained by performing a linear transformation; As a key, through the Obtained by performing a linear transformation; For value, through the It is obtained by performing a linear transformation.

[0034] As a further improvement of the present invention, the specific operation of step S202 is as follows:

[0035]

[0036] Where Embedding(·) represents the embedding layer operation, softmax is the activation function, and Q, K, and V are the data... The query volume, keys, and values, through data analysis. We obtain W by performing a linear transformation. Q W K W V Let Q, K, and V be the linear transformation matrices, respectively. Let K be the dimension, (·) T This indicates transpose.

[0037]

[0038] As a further improvement of the present invention, the specific operation of step S203 is as follows:

[0039]

[0040] in for The query volume linear transformation matrix, for The key transformation matrix, For the linear transformation matrix, for The dimension of i, i = 1, 2, ..., l1.

[0041] As a further improvement of the present invention: the operations in the second periodicity and local information extraction module to the kth periodicity and local information extraction module are exactly the same as the operations in the first periodicity and local information extraction module.

[0042] As a further improvement of the present invention: step S300 includes:

[0043] Step S301: The output f1 of the first periodicity and local information extraction module global f1 local f1 cross Features are obtained by inputting them into the feedforward layer and the normalization layer respectively.

[0044] Similarly, the output of the second periodicity and local information extraction module is input into the feedforward layer and the normalization layer to obtain features. The output of the kth periodicity and local information extraction module is input into the feedforward layer and the normalization layer to obtain features.

[0045] Step S302: Combine the output features of the second feedforward layer and the unified layer. The attention mechanism is used to obtain features f according to their respective categories. global f local f local ;

[0046] The details are as follows:

[0047]

[0048] Q gloabl Q local Q cross To determine the query volume, by... K is obtained by performing different linear transformations respectively. global K local K cross As a key, through the V is obtained by performing different linear transformations respectively. global V local V cross For value, through the Different linear transformations were performed to obtain them.

[0049] As a further improvement of the present invention: in step S400, feature f global f local f cross The input is fed into an MLP network for final feature extraction to obtain the final prediction result.

[0050] The present invention further provides a storage medium that can be read by a computer or processor, wherein the storage medium stores a computer program for performing any of the above methods.

[0051] Compared with the prior art, the advantages of the present invention are as follows:

[0052] 1. The CVT error prediction method and storage medium based on multi-level feature extraction of the present invention are simple in principle, have good real-time performance, wide applicability and high reliability. The present invention adopts a sparse downsampling strategy for error data, which extracts local information while reducing computational overhead, and can significantly improve the computational efficiency of the model.

[0053] 2. The CVT error prediction method and storage medium based on multi-level feature extraction of the present invention employs multiple periodic and local feature extraction modules to weight environmental parameters, extract the influencing factors of environmental parameters on error data, as well as periodic and local features in error data, which can greatly improve the prediction accuracy of the model. Attached Figure Description

[0054] Figure 1 This is a schematic diagram of the overall process of the method of the present invention in a specific embodiment.

[0055] Figure 2 This is a schematic diagram of the data processing process in a specific embodiment of the method of the present invention.

[0056] Figure 3 This is a schematic diagram comparing the results of the method of the present invention in a specific embodiment. Detailed Implementation

[0057] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0058] like Figure 1 and Figure 2 As shown, this invention provides a CVT error prediction method based on multi-level feature extraction, which includes:

[0059] S100: Collects CVT error data and environmental parameter data (temperature, secondary load) over a period of time, performs multi-granularity uniform segmentation on the error data, and performs sparse downsampling on the segmented data;

[0060] S200: The error data after multi-granularity segmentation and sparse downsampling, and the weighted environmental parameter data are sequentially input into k periodicity and local information extraction modules for feature extraction;

[0061] S300: The outputs of each periodic and local information extraction module are input into the feedforward layer and the normalization layer, and then attention mechanism is applied to them according to the feature category;

[0062] S400: The output of the attention mechanism, according to the feature category, is input into the MLP network to obtain the final prediction result.

[0063] In a specific application example, step S100 includes:

[0064] Step S101: Collect CVT error data E={e1,e2,…,e1} over a period of time. n Temperature data T = {t1, t2, ..., t n Secondary load data P = {p1, p2, ..., p n};

[0065] Step S102: The present invention performs multi-granularity uniform segmentation on the error data to obtain the data:

[0066]

[0067] in For l i A length equal to N i A collection of data fragments, i = 1, 2, ..., k, n = N i ×l i .

[0068] Step S103: Data Each data segment in the data is sparsely downsampled to obtain The sampling method is as follows:

[0069]

[0070] in, The elements in num are all taken from elements in E, where num = 1, 2, ..., l i j = 4, [N i -1 / 4]、[N i -3 / 4] respectively represent the values ​​of N i -1, N i The integer part of the result when -3 is divided by 2 is taken, and [i / 2] means the integer part of the result when i is divided by 2 is taken.

[0071] In a specific application example, step S200 includes:

[0072] Step S201: Divide the segmented error data Error data after segmentation and downsampling Temperature data T and secondary load data P are input into the first periodic and local information extraction module;

[0073] Step S202: In the periodicity and local information extraction module, the error data is processed. After linear embedding of the data segments, an inter-segment self-attention mechanism is implemented to obtain the feature f1. globalIn order to extract the periodic information contained in the error data itself;

[0074] In this example, the specific operations are as follows:

[0075]

[0076] Where Embedding(·) represents the embedding layer operation, softmax is the activation function, and Q, K, and V are the data... The query volume, keys, and values, through data analysis. We obtain W by performing a linear transformation. Q W K W V Let Q, K, and V be the linear transformation matrices, respectively. Let K be the dimension, (·) T This indicates transpose.

[0077] Step S203: For Each data segment after downsampling The feature f1 is obtained by implementing the intra-segment self-attention mechanism. local To extract local information from error data;

[0078] In this example, the specific operations are as follows:

[0079]

[0080] in for The query volume linear transformation matrix, for The key transformation matrix, For the linear transformation matrix, for The dimension of i, i = 1, 2, ..., l1.

[0081] Step S204: Calculate the Pearson correlation coefficient between the environmental parameter data T and P and the error data, as follows:

[0082]

[0083] Where r1 and r2 are the correlation coefficient values; e s t s p s These are elements from the error data E, temperature data T, and secondary load data P, respectively. The average values ​​of error data E, temperature data T, and secondary load data P, respectively, are r. t r p This is the weight value.

[0084] r t r p The feature F is obtained by multiplying the feature by the error data E and the temperature data T respectively, and then inputting the feature F into the linear embedding layer. T F P and feature f1 global Features are obtained after inputting into a feedforward layer and a normalization layer. as follows:

[0085] F T =Embedding(r t *T)

[0086] F P =Embedding(r P *P)

[0087]

[0088] Where FC(·) is the feedforward layer operation and Norm(·) is the normalization layer operation, for feature F T F P and characteristics The feature f1 is obtained by performing cross-attention mechanism operation. cross To extract information on the impact of environmental parameter data on error data, the specific steps are as follows:

[0089]

[0090] Q T Q P To determine the query volume, by analyzing F T F P Obtained by performing a linear transformation; As a key, through the Obtained by performing a linear transformation; For value, through the It is obtained by performing a linear transformation.

[0091] Furthermore, in a specific application of the present invention, the operations in the second periodicity and local information extraction module to the kth periodicity and local information extraction module are exactly the same as the operations in the first periodicity and local information extraction module.

[0092] In a specific application example, step S300 includes:

[0093] Step S301: The output f1 of the first periodicity and local information extraction module global f1 local f1 cross Features are obtained by inputting them into the feedforward layer and the normalization layer respectively.

[0094] Similarly, the output of the second periodicity and local information extraction module is input into the feedforward layer and the normalization layer to obtain features. The output of the kth periodicity and local information extraction module is input into the feedforward layer and the normalization layer to obtain features.

[0095] Step S302: Combine the output features of the second feedforward layer and the unified layer. The attention mechanism is used to obtain features f according to their respective categories. global f local f local ;

[0096] The details are as follows:

[0097]

[0098] Q gloabl Q local Q cross To determine the query volume, by... K is obtained by performing different linear transformations respectively. global K local K cross As a key, through the V is obtained by performing different linear transformations respectively. global V local V cross For value, through the Different linear transformations were performed to obtain them.

[0099] In a specific application example, in step S400, feature f is... global f local f cross The input is fed into an MLP network for final feature extraction to obtain the final prediction result.

[0100] This invention presents a CVT error prediction method based on multi-level feature extraction, enabling accurate assessment of the error state of distribution network voltage transformers. Experimental results of CVTs based on this invention are shown in Table 1 below. Figure 3 As shown, the experimental data were collected from an operating CVT at a 220kV substation, and data from 80 days of operation were selected for verification. The actual error value obtained by the offline verification method was compared with the predicted error value obtained by the method provided in this invention. The mean absolute error (MAE), mean absolute percentage error (MAPE), and mean square error (MSE) were selected as evaluation indicators, and the comparison item was the CVT ratio difference.

[0101] Table 1

[0102] Evaluation indicators MAE MAPE MSE numerical values 0.00383 0.15178 0.06734

[0103] The present invention further provides a storage medium that can be read by a computer or processor, wherein the storage medium stores a computer program for performing the above-described method.

[0104] Those skilled in the art will understand that the above embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create an implementation for the process. Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0105] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.

Claims

1. A CVT error prediction method based on multi-level feature extraction, characterized in that, include: Step S100: Collect CVT error data and environmental parameter data over a period of time, perform multi-granularity uniform segmentation on the error data, and perform sparse downsampling on the segmented data; Step S200: input the error data and the weighted environmental parameter data after the multi-granularity segmentation and sparse down-sampling into a periodic and local information extraction module for feature extraction. a periodic and local information extraction module for feature extraction; Step S300: Input the outputs of each periodic and local information extraction module into the feedforward layer and the normalization layer, and then apply the attention mechanism to them according to the feature category; Step S400: Input the output of the attention mechanism according to the feature category into the MLP network to obtain the final prediction result.

2. The CVT error prediction method based on multi-level feature extraction according to claim 1, characterized in that, The environmental parameter data in step S100 include temperature and secondary load.

3. The CVT error prediction method based on multi-level feature extraction according to claim 2, characterized in that, Step S100 includes: Step S101: Collect CVT error data over a period of time. Temperature data Secondary load data ; Step S102: Perform multi-granularity uniform segmentation on the error data to obtain the data: in for A length equal to A collection of data fragments, , , ; Step S103: Data Each data segment in the data is sparsely downsampled to obtain The sampling method is as follows: in, The elements in are all taken from The elements in , , , They represent respectively to , The integer part of the result when the value is divided by 2 is taken. Indicates to Take the integer part of the result after dividing by 2.

4. The CVT error prediction method based on multi-level feature extraction according to claim 3, characterized in that, Step S200 includes: Step S201: Divide the segmented error data Error data after segmentation and sparse downsampling Temperature data Secondary load data The input is fed into the first periodicity and local information extraction module; Step S202: In the periodicity and local information extraction module, the error data is processed. After linear embedding of the data segments, an inter-segment self-attention mechanism is implemented to obtain features. In order to extract the periodic information contained in the error data itself; Step S203: For Each data segment after downsampling Features were obtained by implementing intra-segment self-attention mechanism operations. To extract local information from error data; Step S204: Transfer environmental parameter data , The Pearson correlation coefficient was calculated with the error data as follows: in, , This refers to the correlation coefficient value. , , Error data Temperature data Secondary load data Elements in; , , Error data Temperature data Secondary load data The average value, , These are weight values; Will , Compared with error data respectively Temperature data The multiplication is then fed into a linear embedding layer to obtain the features. , and features Features are obtained after inputting into a feedforward layer and a normalization layer. ,as follows: in, For feedforward layer operations, For the function of reducing to one layer, the features , and characteristics Features obtained by implementing cross-attention mechanism operation To extract information on the impact of environmental parameter data on error data, the specific steps are as follows: in , To determine the query volume, by... , Obtained by performing a linear transformation; , As a key, through the Obtained by performing a linear transformation; , For value, through the It is obtained by performing a linear transformation.

5. The CVT error prediction method based on multi-level feature extraction according to claim 4, characterized in that, The specific operation of step S202 is as follows: in Indicates embedding layer operation, For activation function, , , Data respectively The query volume, keys, and values, through data analysis. Obtained by performing a linear transformation, , , They are respectively , , The linear transformation matrix, for Dimensions Indicates transpose. , , .

6. The CVT error prediction method based on multi-level feature extraction according to claim 4, characterized in that, The specific operation of step S203 is as follows: in for The query volume linear transformation matrix, for The key linear transformation matrix, for The value of the linear transformation matrix, for Dimensions .

7. The CVT error prediction method based on multi-level feature extraction according to claim 4, characterized in that, The second periodicity and local information extraction module up to the first The operations in the periodic and local information extraction modules are exactly the same as those in the first periodic and local information extraction module.

8. The CVT error prediction method based on multi-level feature extraction according to claim 4, characterized in that, Step S300 includes: Step S301: The output of the first periodicity and local information extraction module , , Features are obtained by inputting them into the feedforward layer and the normalization layer respectively. , , ; Similarly, the output of the second periodicity and local information extraction module is input into the feedforward layer and the normalization layer to obtain features. , , , No. The outputs of the periodicity and local information extraction modules are input into the feedforward layer and the normalization layer to obtain the features. , , ; Step S302: Combine the output features of the second feedforward layer and the unified layer. , , Features are obtained by applying attention mechanisms according to their respective categories. , , ; The details are as follows: in , , To determine the query volume, by... , , Obtained by performing different linear transformations; , , As a key, through the , , Obtained by performing different linear transformations; , , For value, through the , , Different linear transformations were performed to obtain them.

9. The CVT error prediction method based on multi-level feature extraction according to claim 8, characterized in that, In step S400, the features , and The input is fed into an MLP network for final feature extraction to obtain the final prediction result.

10. A storage medium capable of being read by a computer or processor, characterized in that, The storage medium stores a computer program for performing any one of the methods of claims 1-9.