A Lightweight Model-Based Method and System for Predicting the State Variables of Fiber Optic Current Transformers

CN122571027APending Publication Date: 2026-08-14STATE GRID JIANGXI ELECTRIC POWER CO LTD RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

然而,光纤电流互感器长期在复杂工况下运行,受温度波动、振动干扰、器件老化等多重因素影响,其内部状态参量(如光源光功率、调制器半波电压、光电探测器响应度等)易发生明显波动,进而导致电流测量误差增大,影响测量准确度与运行稳定性

Benefits of technology

[0023]通过构建秒、分钟、小时、天、周、月、年七个时间尺度的多周期样本集,并基于变化率自适应分类状态量变化类型,实现了对光纤电流互感器状态量多尺度特征的精细刻画,为差异化建模奠定数据基础;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122571027A_ABST
    Figure CN122571027A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for predicting the state variables of fiber optic current transformers based on a lightweight model. The method includes: collecting state variable data and performing normalization and outlier removal; constructing a multi-period sample set according to seven time scales: second, minute, hour, day, week, month, and year; calculating the rate of change of adjacent periods and comparing it with a threshold to classify state variables into invariant variables, instantaneous variables, short-term variables, and long-term variables; using a lightweight gradient booster to predict instantaneous variables, a gated cyclic unit to predict short-term variables, and a patched time series transformer to predict long-term variables; when the prediction errors of the latter two levels are both ≥ exceeding the limit, weighted fusion is performed at the time intersection; if the error still exceeds the limit, the weights are redistributed according to the inverse of the root mean square error of each model on the validation set, and the final predicted value is output. This method achieves multi-scale differentiated prediction, hierarchical compensation, and weight redistribution, improving prediction accuracy and real-time performance, and can be deployed on edge computing platforms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power equipment condition monitoring technology, and particularly relates to a method and system for predicting the state variables of fiber optic current transformers based on a lightweight model. Background Technology

[0002] Fiber optic current transformers (FOCTs) achieve non-contact current detection based on the Faraday magneto-optical effect. With their outstanding characteristics such as excellent insulation performance, fast response speed, no magnetic saturation, and high measurement accuracy, they have been widely used in smart grids, rail transportation, and new energy power. However, FOCTs operate under complex conditions for extended periods, and are affected by multiple factors such as temperature fluctuations, vibration interference, and device aging. This causes significant fluctuations in their internal state parameters (such as light source power, modulator half-wave voltage, and photodetector responsivity), leading to increased current measurement errors and affecting measurement accuracy and operational stability.

[0003] Currently, most methods for predicting the state variables of fiber optic current transformers employ a single algorithm or a fixed empirical model, which suffers from the following technical shortcomings: First, traditional machine learning models (such as support vector regression and BP neural networks) lack the ability to dynamically fit time-series data, making it difficult to capture instantaneous state changes at the second and minute levels. Second, while conventional time-series cyclic models (such as LSTM and GRU) can handle time dependencies, they have a large number of parameters and high computational costs, making them difficult to deploy in real time on embedded terminals or edge computing platforms. Third, standard Transformer models have complex structures, a large number of parameters, and high inference latency, resulting in unsatisfactory prediction accuracy for long-term aging drift errors of equipment. Fourth, existing methods fail to fully utilize the changing characteristics of state variables at different time scales (seconds, minutes, hours, days, weeks, months, years), making it impossible to achieve differentiated modeling and prediction for different rates of change.

[0004] Therefore, there is an urgent need for a method for predicting the state variables of fiber optic current transformers that can take into account feature extraction at multiple time scales, lightweight model design, and high-precision error compensation. Summary of the Invention

[0005] The present invention aims to overcome the above-mentioned shortcomings of the prior art and provide a method and system for predicting the state variables of fiber optic current transformers based on a lightweight model. Through multi-scale sample construction, adaptive classification of state variables, three-level joint prediction model and hierarchical compensation mechanism, it achieves high-precision and low-delay prediction of the state variables of fiber optic current transformers.

[0006] In a first aspect, the present invention provides a method for predicting the state variables of an optical fiber current transformer based on a lightweight model, comprising:

[0007] The state quantity data of each device in the fiber optic current transformer are collected, and the collected state quantity data are normalized and outlier removal is performed to obtain a standardized state quantity sequence. Each state quantity in the standardized state quantity sequence is a state quantity sample.

[0008] Multi-period sample sets are constructed according to the time scales of seconds, minutes, hours, days, weeks, months, and years. Each sample set contains the standardized state quantity sequence within the corresponding time window and the time index of each standardized state quantity sequence. The standardized state quantity sequence within each time window is regarded as a state quantity sequence to be classified.

[0009] Calculate the rate of change of state quantity samples in adjacent periods at each time scale. Based on the comparison between the rate of change and a preset threshold, classify each state quantity sample into one of the following: constant quantity, instantaneous change quantity, short-term change quantity, and long-term change quantity.

[0010] A three-level joint prediction model is adopted, specifically: the first-level prediction model uses a lightweight gradient booster algorithm to predict instantaneous changes, the second-level prediction model uses a gated cyclic unit algorithm to predict short-term changes, and the third-level prediction model uses a patch time series transformer algorithm to predict long-term changes. Each prediction model calls the current period sample set of the corresponding time scale and outputs the predicted value of the state quantity of the next period.

[0011] When the relative errors between the predicted values ​​of the second-level prediction model and the theoretical monitoring values, as well as the relative errors between the predicted values ​​of the third-level prediction model and the theoretical monitoring values, exceed the preset error thresholds, hierarchical compensation is initiated at the intersection of the time indices of the time windows of the second-level prediction model and the third-level prediction model. The prediction results of the second-level prediction model and the prediction results of the third-level prediction model are weighted and fused to obtain the compensated prediction value.

[0012] If the relative error of the compensated predicted value still exceeds the preset error threshold, the weights are redistributed according to the prediction accuracy of each prediction model on the validation set to obtain the final predicted value.

[0013] Secondly, the present invention provides a fiber optic current transformer state quantity prediction system based on a lightweight model, comprising:

[0014] The acquisition module is configured to acquire state data of each device in the fiber optic current transformer, normalize the acquired state data and remove outliers to obtain a standardized state sequence, wherein each state variable in the standardized state sequence is a state sample.

[0015] The partitioning module is configured to construct multi-period sample sets according to the time scales of seconds, minutes, hours, days, weeks, months, and years. Each sample set contains the standardized state quantity sequence within the corresponding time window and the time index of each standardized state quantity sequence. The standardized state quantity sequence within each time window is regarded as a state quantity sequence to be classified.

[0016] The calculation module is configured to calculate the rate of change of adjacent periodic state quantity samples at each time scale, and based on the comparison result of the rate of change with a preset threshold, classify each state quantity sample into one of the following: unchanged quantity, instantaneous change quantity, short-term change quantity, and long-term change quantity.

[0017] The prediction module is configured to enable a three-level joint prediction model. Specifically, the first-level prediction model uses a lightweight gradient booster algorithm to predict instantaneous changes, the second-level prediction model uses a gated cyclic unit algorithm to predict short-term changes, and the third-level prediction model uses a patch time series transformer algorithm to predict long-term changes. Each prediction model calls the current period sample set of the corresponding time scale and outputs the predicted value of the state quantity for the next period.

[0018] The compensation module is configured to initiate hierarchical compensation at the intersection of the time indices of the time windows of the second-level prediction model and the third-level prediction model when the relative errors between the predicted values ​​of the second-level prediction model and the theoretical monitoring values ​​of the third-level prediction model both exceed the preset error threshold. The module then performs weighted fusion of the prediction results of the second-level prediction model and the prediction results of the third-level prediction model to obtain the compensated prediction value.

[0019] The correction module is configured to, if the relative error of the compensated prediction value still exceeds the preset error threshold, reallocate the weights according to the prediction accuracy of each prediction model on the validation set to obtain the final prediction value.

[0020] Thirdly, an electronic device is provided, comprising: 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, the instructions being executed by the at least one processor to enable the at least one processor to perform the steps of the fiber optic current transformer state quantity prediction method based on a lightweight model according to any embodiment of the present invention.

[0021] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the steps of the fiber optic current transformer state quantity prediction method based on a lightweight model according to any embodiment of the present invention.

[0022] The fiber optic current transformer state quantity prediction method and system based on a lightweight model presented in this application have the following advantages:

[0023] By constructing a multi-period sample set with seven time scales (second, minute, hour, day, week, month, year) and adaptively classifying the state variable change type based on the rate of change, a fine characterization of the multi-scale features of the state variables of the fiber optic current transformer was achieved, laying a data foundation for differentiated modeling.

[0024] A three-level joint prediction model architecture is adopted, and LightGBM, GRU and PatchTST algorithms are selected for instantaneous change, short-term change and long-term change respectively. Each model calls the sample set of the corresponding scale, which realizes accurate prediction of state variables with different rates of change, and avoids the defect that a single model is difficult to fit multi-scale features at the same time.

[0025] A hierarchical compensation and weight redistribution mechanism was designed. When the prediction errors of GRU and PatchTST exceed the standard, weighted fusion is initiated. If the error still exceeds the standard after compensation, the weights are redistributed according to the inverse of the root mean square error of each model on the validation set. This achieves dynamic correction of prediction error and significantly improves prediction accuracy.

[0026] The three prediction models employ lightweight strategies such as structured pruning, reducing the number of decision trees, compressing the hidden layer dimension, and reducing the number of encoder layers, resulting in a significant reduction in the number of parameters and a significant improvement in inference speed. They can be deployed on embedded or edge computing platforms to meet real-time prediction requirements. Attached Figure Description

[0027] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 A flowchart illustrating a method for predicting the state variables of an optical fiber current transformer based on a lightweight model, provided in an embodiment of the present invention;

[0029] Figure 2 A structural block diagram of a fiber optic current transformer state quantity prediction system based on a lightweight model is provided in an embodiment of the present invention.

[0030] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] Please see Figure 1 The diagram shows a flowchart of a fiber optic current transformer state quantity prediction method based on a lightweight model, as presented in this application.

[0033] like Figure 1 As shown, the method for predicting the state variables of fiber optic current transformers based on a lightweight model specifically includes the following steps:

[0034] Step S101: Collect the state quantity data of each device in the fiber optic current transformer, normalize the collected state quantity data and remove outliers to obtain a standardized state quantity sequence, wherein each state quantity in the standardized state quantity sequence is a state quantity sample.

[0035] In this step, the normalization adopts the minimum-max normalization method, and the expression is:

[0036] ,

[0037] In the formula, This represents the i-th processed state variable of the A-th device of the fiber optic current transformer at the t-th second after normalization. This represents the original monitored value of the i-th state variable of the A-th device of the fiber optic current transformer at second t. For the first The minimum value in a periodic sample set. For the first The maximum value in a periodic sample set;

[0038] The outlier removal is achieved by determining whether the absolute value of the difference between adjacent second-level processing status variables is greater than 0.1, specifically:

[0039] like When that happens, discard it. And continue to iterate and verify;

[0040] like When, then retain And calculate Continue verification, among which, This represents the i-th processed state variable of the A-th device of the fiber optic current transformer at the (t+1)-th second after normalization. This is the i-th processing state variable of the A-th device of the fiber optic current transformer at the (t+2)-th second after normalization.

[0041] Step S102: Construct multi-period sample sets according to second time scale, minute time scale, hour time scale, day time scale, week time scale, month time scale, and year time scale. Each sample set contains the standardized state quantity sequence within the corresponding time window and the time index of each standardized state quantity sequence. Treat the standardized state quantity sequence within each time window as a state quantity sequence to be classified.

[0042] Step S103: Calculate the rate of change of adjacent periodic state quantity samples at each time scale. Based on the comparison result of the rate of change with the preset threshold, classify each state quantity sample into one of the following: constant quantity, instantaneous change quantity, short-term change quantity, and long-term change quantity.

[0043] In this step, the preset threshold is... The specific rules for dividing the state variables are as follows:

[0044] For state quantity samples within a second-scale time window, calculate the rate of change between adjacent second-scale periods. And for state quantity samples within a minute-scale time window, calculate the rate of change of state quantities between adjacent minutes-scale periods. ,in, The expressions for the rate of change of state quantities in adjacent periods at the minute scale are the same as those for the rate of change in adjacent periods at the second scale.

[0045] like or When, the rate of change of adjacent periods on a second scale. The corresponding state quantity sample or the rate of change of state quantity in adjacent periods on a minute scale The corresponding state quantity samples are determined to be instantaneous changes;

[0046] For state quantity samples within an hourly time window, calculate the rate of change between adjacent hourly periods. Furthermore, for state quantity samples within a celestial time window, calculate the rate of change of state quantities between adjacent celestial periods. ;

[0047] like or Then, the rate of change of adjacent periods on the hourly scale will be... The corresponding state quantity samples or the rate of change of state quantities in adjacent periods on a daily scale. The corresponding state quantity samples are identified as short-term changes.

[0048] For state quantity samples within a periodic time window, calculate the rate of change between adjacent periodic periods. And for state quantity samples within a monthly time window, calculate the rate of change of state quantities between adjacent monthly periods. ;

[0049] like or Then, the rate of change of adjacent periods on the weekly scale will be... The corresponding state quantity samples or the rate of change of state quantities in adjacent monthly periods The corresponding state quantity samples are determined to be instantaneous changes;

[0050] For all time scales, if the rate of change of state variables in adjacent periods is no greater than 1%, the state variable sample corresponding to the rate of change of state variables in adjacent periods is determined to be an unchanged variable.

[0051] Step S104: Activate the three-level joint prediction model. Specifically, the first-level prediction model uses a lightweight gradient booster algorithm to predict instantaneous changes, the second-level prediction model uses a gated cyclic unit algorithm to predict short-term changes, and the third-level prediction model uses a patch time series transformer algorithm to predict long-term changes. Each prediction model calls the current period sample set of the corresponding time scale and outputs the predicted value of the state quantity for the next period.

[0052] In this step, the expression for the instantaneous change prediction using the lightweight gradient boosting machine algorithm in the first-level prediction model is as follows:

[0053] ,

[0054] In the formula, It is an instantaneous change. The mean of the training set labels. For learning rate, To regress the total number of decision trees, This is the output of the m-th regression decision tree. For the input sample set.

[0055] The second-level prediction model uses a gated cyclic unit algorithm to predict short-term changes. The calculation process of a single gated cyclic unit at the current time is as follows:

[0056] Confirm Reset Door The expression is:

[0057] ,

[0058] Confirm Update Gate The expression is:

[0059] ,

[0060] Determine the candidate hidden state The expression is:

[0061] ,

[0062] The final hidden state at the current moment is determined based on the output of the reset gate, the output of the update gate, and the candidate hidden state. The expression is:

[0063] ,

[0064] The output prediction value is determined based on the final hidden state at the current moment. The expression is:

[0065] ,

[0066] In the formula, It is the Sigmoid activation function. The hyperbolic tangent activation function is used. For element-wise multiplication, Input for the current timing step. The hidden state at time t-1 All are learnable weight matrices. All of these are learnable bias vectors.

[0067] The third-level prediction model uses the patch time series transformer algorithm to predict long-term changes. The prediction process is as follows:

[0068] The input sequence is divided into multiple patches, each patch having a length of [length missing]. The patch step size is Total number of patches ,in For the predicted quantity;

[0069] Each patch is embedded using a linear mapping. A 3D feature vector, superimposed with a learnable positional encoding, is input into a multi-layer Transformer encoder;

[0070] Single-head attention calculation is ,in, For the attention head dimension, For querying the matrix, The key matrix, For value matrices, For normalized exponential functions, This is the transpose symbol.

[0071] Step S105: When the relative error between the predicted value of the second-level prediction model and the theoretical monitoring value and the relative error between the predicted value of the third-level prediction model and the theoretical monitoring value both exceed the preset error threshold, hierarchical compensation is initiated at the intersection of the time indexes of the time windows of the second-level prediction model and the third-level prediction model. The prediction results of the second-level prediction model and the prediction results of the third-level prediction model are weighted and fused to obtain the compensated prediction value.

[0072] In this step, the weighted fusion expression for hierarchical compensation is:

[0073] ,

[0074] In the formula, The predicted value after compensation, The prediction results are from the second-level prediction model. This represents the prediction results from the third-level prediction model.

[0075] The intersection of the time indices is defined as the point in time when the time window used by the gated cyclic unit algorithm for prediction and the time window used by the patch time series converter algorithm for prediction overlap on the time axis.

[0076] Step S106: If the relative error of the compensated predicted value still exceeds the preset error threshold, the weights are redistributed according to the prediction accuracy of each prediction model on the validation set to obtain the final predicted value.

[0077] In this step, the expression for redistributing weights is:

[0078] ,

[0079] ,

[0080] In the formula, This is the final predicted value. Let be the root mean square error of the m-th level prediction model on the validation set. Let be the root mean square error of the k-th level prediction model on the validation set. This represents the predicted value of the m-th level prediction model.

[0081] In summary, the method in this application collects state quantity data and performs normalization and outlier removal; constructs a multi-period sample set according to seven time scales: second, minute, hour, day, week, month, and year; calculates the rate of change between adjacent periods and compares it with a 1% threshold to classify state quantities into constant quantities, instantaneous quantities, short-term quantities, and long-term quantities; employs a lightweight gradient booster to predict instantaneous quantities, a gated recurrent unit to predict short-term quantities, and a patched time series transformer to predict long-term quantities; when the prediction errors of the latter two levels are both ≥0.2%, they are weighted and fused at the time intersection; if the error still exceeds the limit, the weights are redistributed according to the inverse of the root mean square error of each model on the validation set, and the final predicted value is output and closed-loop control is implemented; this method achieves multi-scale differentiated prediction, hierarchical compensation, and weight redistribution, improving prediction accuracy and real-time performance, and can be deployed on edge computing platforms.

[0082] Please see Figure 2 The diagram shows a structural block diagram of a fiber optic current transformer state prediction system based on a lightweight model, according to this application.

[0083] like Figure 2 As shown, the fiber optic current transformer state quantity prediction system 200 includes an acquisition module 210, a division module 220, a calculation module 230, a prediction module 240, a compensation module 250, and a correction module 260.

[0084] The system includes: a data acquisition module 210, configured to acquire state quantity data of each device in the fiber optic current transformer; normalizing and removing outliers from the acquired state quantity data to obtain a standardized state quantity sequence, where each state quantity in the standardized state quantity sequence is a state quantity sample; a classification module 220, configured to construct multi-period sample sets according to second, minute, hour, day, week, month, and year time scales, where each sample set contains a standardized state quantity sequence within a corresponding time window and a time index for each standardized state quantity sequence, and treating each standardized state quantity sequence within a time window as a state quantity sequence to be classified; a calculation module 230, configured to calculate the rate of change of state quantity samples in adjacent periods at each time scale, and classifying each state quantity sample into one of the following categories based on the comparison result of the rate of change with a preset threshold: constant, instantaneous, short-term, or long-term; and a prediction module 240, configured to enable a three-level joint prediction model. Specifically: the first-level prediction model uses a lightweight gradient booster algorithm to predict instantaneous changes; the second-level prediction model uses a gated recurrent unit algorithm to predict short-term changes; and the third-level prediction model uses a patch time series transformer algorithm to predict long-term changes. Each prediction model calls the current period sample set of the corresponding time scale and outputs the predicted value of the state quantity for the next period. The compensation module 250 is configured to start hierarchical compensation at the intersection of the time indexes of the time windows of the second-level prediction model and the third-level prediction model when the relative errors of the predicted values ​​of the second-level prediction model and the theoretical monitoring values ​​of the third-level prediction model both exceed a preset error threshold. The prediction results of the second-level prediction model and the third-level prediction model are weighted and fused to obtain the compensated prediction value. The correction module 260 is configured to reallocate the weights according to the prediction accuracy of each prediction model on the validation set if the relative error of the compensated prediction value still exceeds the preset error threshold, so as to obtain the final prediction value.

[0085] It should be understood that Figure 2 The modules and references described in the document Figure 1 The steps described in the text correspond to those in the method described above. Therefore, the operations, features, and corresponding technical effects described above also apply to the method described in the text. Figure 2 The various modules in the document will not be described in detail here.

[0086] In other embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor performs the fiber optic current transformer state quantity prediction method based on a lightweight model in any of the above method embodiments.

[0087] In one embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions, which are configured as follows:

[0088] The state quantity data of each device in the fiber optic current transformer are collected, and the collected state quantity data are normalized and outlier removal is performed to obtain a standardized state quantity sequence. Each state quantity in the standardized state quantity sequence is a state quantity sample.

[0089] Multi-period sample sets are constructed according to the time scales of seconds, minutes, hours, days, weeks, months, and years. Each sample set contains the standardized state quantity sequence within the corresponding time window and the time index of each standardized state quantity sequence. The standardized state quantity sequence within each time window is regarded as a state quantity sequence to be classified.

[0090] Calculate the rate of change of state quantity samples in adjacent periods at each time scale. Based on the comparison between the rate of change and a preset threshold, classify each state quantity sample into one of the following: constant quantity, instantaneous change quantity, short-term change quantity, and long-term change quantity.

[0091] A three-level joint prediction model is adopted, specifically: the first-level prediction model uses a lightweight gradient booster algorithm to predict instantaneous changes, the second-level prediction model uses a gated cyclic unit algorithm to predict short-term changes, and the third-level prediction model uses a patch time series transformer algorithm to predict long-term changes. Each prediction model calls the current period sample set of the corresponding time scale and outputs the predicted value of the state quantity of the next period.

[0092] When the relative errors between the predicted values ​​of the second-level prediction model and the theoretical monitoring values, as well as the relative errors between the predicted values ​​of the third-level prediction model and the theoretical monitoring values, exceed the preset error thresholds, hierarchical compensation is initiated at the intersection of the time indices of the time windows of the second-level prediction model and the third-level prediction model. The prediction results of the second-level prediction model and the prediction results of the third-level prediction model are weighted and fused to obtain the compensated prediction value.

[0093] If the relative error of the compensated predicted value still exceeds the preset error threshold, the weights are redistributed according to the prediction accuracy of each prediction model on the validation set to obtain the final predicted value.

[0094] Computer-readable storage media may include a stored program area and a stored data area, wherein the stored program area may store an operating system and an application program required for at least one function; the stored data area may store data created based on the use of the lightweight model-based fiber optic current transformer state prediction system, etc. Furthermore, the computer-readable storage medium may include high-speed random access memory, and may also include memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include memory remotely configured relative to a processor, which can be connected to the lightweight model-based fiber optic current transformer state prediction system via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0095] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiment of the present invention, such as... Figure 3 As shown, the device includes a processor 310 and a memory 320. The electronic device may also include an input device 330 and an output device 340. The processor 310, memory 320, input device 330, and output device 340 can be connected via a bus or other means. Figure 3 Taking a bus connection as an example, the memory 320 is the computer-readable storage medium described above. The processor 310 executes various server functions and data processing by running non-volatile software programs, instructions, and modules stored in the memory 320, thereby implementing the fiber optic current transformer state prediction method based on a lightweight model as described in the above method embodiment. The input device 330 can receive input digital or character information and generate key signal inputs related to user settings and function control of the fiber optic current transformer state prediction system based on a lightweight model. The output device 340 may include a display screen or other display device.

[0096] The aforementioned electronic device can execute the method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. Technical details not described in detail in this embodiment can be found in the method provided in the embodiments of the present invention.

[0097] In one implementation, the above-described electronic device is applied to a fiber optic current transformer state prediction system based on a lightweight model, serving as a client, and includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:

[0098] The state quantity data of each device in the fiber optic current transformer are collected, and the collected state quantity data are normalized and outlier removal is performed to obtain a standardized state quantity sequence. Each state quantity in the standardized state quantity sequence is a state quantity sample.

[0099] Multi-period sample sets are constructed according to the time scales of seconds, minutes, hours, days, weeks, months, and years. Each sample set contains the standardized state quantity sequence within the corresponding time window and the time index of each standardized state quantity sequence. The standardized state quantity sequence within each time window is regarded as a state quantity sequence to be classified.

[0100] Calculate the rate of change of state quantity samples in adjacent periods at each time scale. Based on the comparison between the rate of change and a preset threshold, classify each state quantity sample into one of the following: constant quantity, instantaneous change quantity, short-term change quantity, and long-term change quantity.

[0101] A three-level joint prediction model is adopted, specifically: the first-level prediction model uses a lightweight gradient booster algorithm to predict instantaneous changes, the second-level prediction model uses a gated cyclic unit algorithm to predict short-term changes, and the third-level prediction model uses a patch time series transformer algorithm to predict long-term changes. Each prediction model calls the current period sample set of the corresponding time scale and outputs the predicted value of the state quantity of the next period.

[0102] When the relative errors between the predicted values ​​of the second-level prediction model and the theoretical monitoring values, as well as the relative errors between the predicted values ​​of the third-level prediction model and the theoretical monitoring values, exceed the preset error thresholds, hierarchical compensation is initiated at the intersection of the time indices of the time windows of the second-level prediction model and the third-level prediction model. The prediction results of the second-level prediction model and the prediction results of the third-level prediction model are weighted and fused to obtain the compensated prediction value.

[0103] If the relative error of the compensated predicted value still exceeds the preset error threshold, the weights are redistributed according to the prediction accuracy of each prediction model on the validation set to obtain the final predicted value.

[0104] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting the state variables of an optical fiber current transformer based on a lightweight model, characterized in that, include: The state quantity data of each device in the fiber optic current transformer are collected, and the collected state quantity data are normalized and outlier removal is performed to obtain a standardized state quantity sequence. Each state quantity in the standardized state quantity sequence is a state quantity sample. Multi-period sample sets are constructed according to the time scales of seconds, minutes, hours, days, weeks, months, and years. Each sample set contains the standardized state quantity sequence within the corresponding time window and the time index of each standardized state quantity sequence. The standardized state quantity sequence within each time window is regarded as a state quantity sequence to be classified. Calculate the rate of change of state quantity samples in adjacent periods at each time scale. Based on the comparison between the rate of change and a preset threshold, classify each state quantity sample into one of the following: constant quantity, instantaneous change quantity, short-term change quantity, and long-term change quantity. A three-level joint prediction model is adopted, specifically: the first-level prediction model uses a lightweight gradient booster algorithm to predict instantaneous changes, the second-level prediction model uses a gated cyclic unit algorithm to predict short-term changes, and the third-level prediction model uses a patch time series transformer algorithm to predict long-term changes. Each prediction model calls the current period sample set of the corresponding time scale and outputs the predicted value of the state quantity of the next period. When the relative errors between the predicted values ​​of the second-level prediction model and the theoretical monitoring values, as well as the relative errors between the predicted values ​​of the third-level prediction model and the theoretical monitoring values, exceed the preset error thresholds, hierarchical compensation is initiated at the intersection of the time indices of the time windows of the second-level prediction model and the third-level prediction model. The prediction results of the second-level prediction model and the prediction results of the third-level prediction model are weighted and fused to obtain the compensated prediction value. If the relative error of the compensated predicted value still exceeds the preset error threshold, the weights are redistributed according to the prediction accuracy of each prediction model on the validation set to obtain the final predicted value.

2. The method for predicting the state variables of an optical fiber current transformer based on a lightweight model according to claim 1, characterized in that, The normalization method uses the minimum-max normalization method, and the expression is: , In the formula, This represents the i-th processed state variable of the A-th device of the fiber optic current transformer at the t-th second after normalization. This represents the original monitored value of the i-th state variable of the A-th device of the fiber optic current transformer at second t. For the first The minimum value in a periodic sample set. For the first The maximum value in a periodic sample set; The outlier removal is achieved by determining whether the absolute value of the difference between adjacent second-level processing status variables is greater than 0.1, specifically: like When that happens, discard it. And continue to iterate and verify; like When, then retain And calculate Continue verification, among which, This represents the i-th processed state variable of the A-th device of the fiber optic current transformer at the (t+1)-th second after normalization. This is the i-th processing state variable of the A-th device of the fiber optic current transformer at the (t+2)-th second after normalization.

3. The method for predicting the state variables of an optical fiber current transformer based on a lightweight model according to claim 1, characterized in that, The preset threshold is The specific rules for dividing the state variables are as follows: For state quantity samples within a second-scale time window, calculate the rate of change between adjacent second-scale periods. And for state quantity samples within a minute-scale time window, calculate the rate of change of state quantities between adjacent minutes-scale periods. ; like or When, the rate of change of adjacent periods on a second scale. The corresponding state quantity sample or the rate of change of state quantity in adjacent periods on a minute scale The corresponding state quantity samples are determined to be instantaneous changes; For state quantity samples within an hourly time window, calculate the rate of change between adjacent hourly periods. Furthermore, for state quantity samples within a celestial time window, calculate the rate of change of state quantities between adjacent celestial periods. ; like or Then, the rate of change of adjacent periods on the hourly scale will be... The corresponding state quantity samples or the rate of change of state quantities in adjacent periods on a daily scale. The corresponding state quantity samples are identified as short-term changes. For state quantity samples within a periodic time window, calculate the rate of change between adjacent periodic periods. And for state quantity samples within a monthly time window, calculate the rate of change of state quantities between adjacent monthly periods. ; like or Then, the rate of change of adjacent periods on the weekly scale will be... The corresponding state quantity samples or the rate of change of state quantities in adjacent monthly periods The corresponding state quantity samples are determined to be instantaneous changes; For all time scales, if the rate of change of state variables in adjacent periods is no greater than 1%, the state variable sample corresponding to the rate of change of state variables in adjacent periods is determined to be an unchanged variable.

4. The method for predicting the state variables of an optical fiber current transformer based on a lightweight model according to claim 1, characterized in that, The expression for the instantaneous change prediction using the lightweight gradient boosting machine algorithm in the first-level prediction model is as follows: , In the formula, It is an instantaneous change. The mean of the training set labels. For learning rate, To regress the total number of decision trees, This is the output of the m-th regression decision tree. For the input sample set.

5. The method for predicting the state variables of an optical fiber current transformer based on a lightweight model according to claim 1, characterized in that, The second-level prediction model uses a gated cyclic unit algorithm to predict short-term changes. The calculation process of a single gated cyclic unit at the current time is as follows: Confirm Reset Door The expression is: , Confirm Update Gate The expression is: , Determine the candidate hidden state The expression is: , The final hidden state at the current moment is determined based on the output of the reset gate, the output of the update gate, and the candidate hidden state. The expression is: , The output prediction value is determined based on the final hidden state at the current moment. The expression is: , In the formula, It is the Sigmoid activation function. The hyperbolic tangent activation function is used. For element-wise multiplication, Input for the current timing step. The hidden state at time t-1 All are learnable weight matrices. All of these are learnable bias vectors.

6. The method for predicting the state variables of an optical fiber current transformer based on a lightweight model according to claim 1, characterized in that, The third-level prediction model uses a patch time series transformer algorithm to predict long-term changes. The prediction process is as follows: The input sequence is divided into multiple patches, each patch having a length of [length missing]. The patch step size is Total number of patches ,in For the predicted quantity; Each patch is embedded using a linear mapping. A 3D feature vector, superimposed with a learnable positional encoding, is input into a multi-layer Transformer encoder; Single-head attention calculation is ,in, For the attention head dimension, For querying the matrix, The key matrix, For value matrices, For normalized exponential functions, This is the transpose symbol.

7. The method for predicting the state variables of an optical fiber current transformer based on a lightweight model according to claim 1, characterized in that, The weighted fusion expression for the hierarchical compensation is: , In the formula, The predicted value after compensation, The prediction results are from the second-level prediction model. This represents the prediction results from the third-level prediction model. The intersection of the time indices is defined as the point in time when the time window used by the gated cyclic unit algorithm for prediction and the time window used by the patch time series converter algorithm for prediction overlap on the time axis.

8. The method for predicting the state variables of an optical fiber current transformer based on a lightweight model according to claim 1, characterized in that, The expression for the weight reallocation is: , , In the formula, This is the final predicted value. Let be the root mean square error of the m-th level prediction model on the validation set. Let be the root mean square error of the k-th level prediction model on the validation set. This represents the predicted value of the m-th level prediction model.

9. A fiber optic current transformer state prediction system based on a lightweight model, characterized in that, include: The acquisition module is configured to acquire state data of each device in the fiber optic current transformer, normalize the acquired state data and remove outliers to obtain a standardized state sequence, wherein each state variable in the standardized state sequence is a state sample. The partitioning module is configured to construct multi-period sample sets according to the time scales of seconds, minutes, hours, days, weeks, months, and years. Each sample set contains the standardized state quantity sequence within the corresponding time window and the time index of each standardized state quantity sequence. The standardized state quantity sequence within each time window is regarded as a state quantity sequence to be classified. The calculation module is configured to calculate the rate of change of adjacent periodic state quantity samples at each time scale, and based on the comparison result of the rate of change with a preset threshold, classify each state quantity sample into one of the following: unchanged quantity, instantaneous change quantity, short-term change quantity, and long-term change quantity. The prediction module is configured to enable a three-level joint prediction model. Specifically, the first-level prediction model uses a lightweight gradient booster algorithm to predict instantaneous changes, the second-level prediction model uses a gated cyclic unit algorithm to predict short-term changes, and the third-level prediction model uses a patch time series transformer algorithm to predict long-term changes. Each prediction model calls the current period sample set of the corresponding time scale and outputs the predicted value of the state quantity for the next period. The compensation module is configured to initiate hierarchical compensation at the intersection of the time indices of the time windows of the second-level prediction model and the third-level prediction model when the relative errors between the predicted values ​​of the second-level prediction model and the theoretical monitoring values ​​of the third-level prediction model both exceed the preset error threshold. The module then performs weighted fusion of the prediction results of the second-level prediction model and the prediction results of the third-level prediction model to obtain the compensated prediction value. The correction module is configured to, if the relative error of the compensated prediction value still exceeds the preset error threshold, reallocate the weights according to the prediction accuracy of each prediction model on the validation set to obtain the final prediction value.