Data acquisition method and system for electrical cabinet

By dynamically updating the fitting function and marking abnormal data, the problems of decreased detection accuracy and resource waste of electrical cabinets are solved, and efficient monitoring and storage optimization of the operating status of electrical cabinets are achieved.

CN120408220BActive Publication Date: 2025-09-09REITER ELECTRIC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510898406.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-09-09
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

Traditional electrical cabinet detection methods suffer from decreasing detection accuracy and low resource efficiency. Especially when the electrical cabinet ages or the environment changes, the static least squares fitting function cannot accurately reflect the data change trend, resulting in misjudgment and waste of resources.

Method used

By constructing a function reference sequence, dynamically updating the fitting function, monitoring the error accumulation and abnormality in real time, re-acquiring the fitting function to maintain accuracy, marking and cleaning abnormal data, and optimizing storage space.

Benefits of technology

It improves the accuracy of electrical cabinet operation status monitoring, reduces misjudgment, optimizes storage resource utilization, and maintains the real-time and accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408220B_ABST
    Figure CN120408220B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and more particularly to a data acquisition method and system for an electrical cabinet. The method comprises the following steps: constructing a function reference sequence based on the operating data of the electrical cabinet and obtaining a fitting function for the data in the function reference sequence; constructing a neighboring reference sequence of the data acquired in real time and obtaining an error accumulation degree based on the difference between the measured value of the data in the reference sequence and the predicted value of the fitting function; and, in response to the error accumulation degree being greater than a preset deviation threshold, re-obtaining the fitting function based on the latest data. The present application has the effect of improving the accuracy of abnormality detection in the electrical cabinet.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data acquisition method and system for an electrical cabinet. Background Art

[0002] An electrical cabinet is a device that integrates multiple electrical components. Its primary function is to monitor and control the power system, serving as the system's core control unit. Therefore, the proper operation of the electrical cabinet plays a crucial role in the power system. The most traditional methods for monitoring electrical cabinets rely on manual inspections and threshold alarms. Manual inspections suffer from poor real-time performance and are not conducive to reducing the workload of personnel. While threshold alarms have replaced manual inspections, reducing the workload and improving real-time detection to a certain extent, these methods are only highly accurate for data with stable long-term distributions. Their accuracy is lower for data with certain fluctuations. The least squares method is a mathematical optimization technique that finds the best matching function for data by minimizing the sum of squared errors. This fitted function can be used to predict device operating data. By analyzing the discrepancy between the predicted data and the actual collected data, the operating status of the electrical cabinet can be monitored. The curve fitted using the least squares method can reflect the overall trend of the data and is more accurate than traditional threshold detection.

[0003] However, the least squares fitting curve is a static model based on historical data. As the electrical cabinet ages or experiences slow changes in the external environment, the overall trend of the cabinet's operating data is not fixed. Therefore, the accuracy of traditional least squares fitting function detection methods decreases over time, leading to misjudgments. Furthermore, the data collected during the detection process must be fully stored, which consumes significant computing and storage resources and results in low resource efficiency. Summary of the Invention

[0004] In order to solve the problems of decreasing detection accuracy and low resource efficiency in traditional detection methods, the present application provides a data collection method and system for an electrical cabinet.

[0005] In a first aspect, the present application provides a data collection method for an electrical cabinet, which adopts the following technical solution:

[0006] A data acquisition method for an electrical cabinet comprises the following steps: constructing a function reference sequence based on operating data of the electrical cabinet, and obtaining a fitting function for the data in the function reference sequence; constructing a neighboring reference sequence of the data acquired in real time, and obtaining an error accumulation degree of error accumulation based on a difference between a measured value of the data in the reference sequence and a predicted value of the fitting function; in response to the error accumulation degree being greater than a preset deviation threshold, re-obtaining the fitting function based on the latest data, and defining the latest acquired fitting function as a real-time function, and the fitting function before the real-time function as a historical function;

[0007] Obtain the degree of abnormality of the real-time function; in response to the degree of abnormality of the real-time function being greater than a preset abnormality threshold, mark the data used in the real-time function fitting process, the data used in the real-time function constitute a data set, determine that the data set is abnormal, and use the data in the collected abnormal set as the original data for abnormality detection.

[0008] The beneficial effects are as follows: a function reference sequence is constructed based on the operating data of the electrical cabinet, and the function reference sequence is used to obtain a fitting function. After function fitting is completed, the error accumulation of the fitting function at the current moment is calculated as real-time data is continuously collected. When the error accumulation of the fitting function reaches a certain level, it indicates that the overall operating data of the electrical cabinet has changed due to factors such as the aging of the electrical cabinet and changes in the working environment. The fitting function is no longer able to accurately predict the operating data of the electrical cabinet, which may lead to a decrease in the accuracy of subsequent anomaly detection. Therefore, in this method, when the error accumulation exceeds a preset threshold, the function reference sequence is reconstructed and a fitting function is obtained to maintain the accuracy of the fitting function prediction and thus ensure the accuracy of subsequent anomaly detection. After obtaining the new fitting function, the degree of anomaly of the real-time function is analyzed. If the real-time function is abnormal, it indicates that the data in the function reference sequence used in the real-time function fitting process is abnormal. The data in the function reference sequence can then be marked as an abnormal data set, and the data in the abnormal data set can be used as the raw data for anomaly detection, thereby further improving the accuracy of anomaly detection. Moreover, after this data is marked, normal data can be cleaned up to optimize storage space.

[0009] Optionally, construct a function with length of The time window is used to obtain all the data in the time window to form a function reference sequence.

[0010] The beneficial effect is that for any moment of collection, a time window is set according to the data before the moment, and the data in the time window is obtained to complete the construction of the function reference sequence.

[0011] Optionally, the step of constructing a neighboring reference sequence of the real-time collected data includes: determining the reference sequence length For real-time collected data, the sampling time corresponding to the data is used as the benchmark to obtain the data, the moment and the data before that moment data points as adjacent reference sequences.

[0012] The beneficial effect is that for any moment in the real-time collected data, multiple adjacent data before the moment are used as adjacent reference sequences, and these data reflect the error accumulation within a certain period of time.

[0013] Optionally, use the least squares method to obtain the fitting function corresponding to the data in the function reference sequence.

[0014] Optionally, the step of calculating the error accumulation degree includes: for each moment in the adjacent reference sequence, calculating the local error based on the difference between the predicted value and the measured value of the fitting function at the same moment, and taking the ratio of the local error to the mean square error of the fitting function as the local error degree; taking the square root of the mean of the local error degrees corresponding to each moment as the error accumulation degree.

[0015] The beneficial effect is that the difference between the fitting function's predicted and measured values ​​indicates the accuracy of the fitting function's prediction of the equipment's operating data. If the difference is too large, it indicates a significant deviation between the fitting function's prediction and the measured value, and the changes in the fitting function can no longer accurately represent the trend of the electrical cabinet's actual data changes. The local error corresponding to each moment in the adjacent reference sequence is accumulated to obtain the overall accumulated error. To control the final value range, the square root operation is performed on the final calculation result.

[0016] Optionally, the step of obtaining the abnormality degree of the real-time function includes: obtaining the trend difference between the real-time function and each historical function, obtaining the fitting frequency of the real-time function, and taking the product of the trend difference and the fitting frequency as the abnormality degree of the real-time function.

[0017] The beneficial effect is that after re-acquiring the fitting function based on a new function reference sequence, if the trend of change between the real-time function and the historical fitting function is too large, it indicates that the real-time function is changing abnormally. At the same time, if the fitting cycle of the real-time function is too short, that is, refitting is required within a short period of time, this also indicates that the data is abnormal. Irregular changes in the data lead to frequent fitting of the real-time function. Based on the synergistic effect of trend differences and fitting frequency on the degree of anomaly of the real-time function, the accuracy of the calculation of the degree of anomaly of the real-time function is improved.

[0018] Optionally, the real-time fitting period of the real-time function is obtained, and the ratio of the average of the historical fitting periods of all historical functions to the real-time fitting period is used as the fitting frequency.

[0019] The beneficial effect is that during the operation of the electrical cabinet, if the overall data changes are relatively slow due to aging or environmental changes, the fitting cycle of the real-time function should be relatively uniform and long. If the fitting cycle of the real-time function is significantly shortened compared to the previous fitting cycle, it means that the data used for real-time function fitting has experienced large fluctuations. Therefore, the ratio of the mean of the historical fitting cycles of all historical functions to the real-time fitting cycle is used as the fitting frequency. When the fitting cycle of the real-time function is shortened, the fitting frequency increases.

[0020] Optionally, the step of obtaining the trend difference between the real-time function and each historical function includes: obtaining the function difference between each historical function and the real-time function, obtaining the abnormality degree based on each function difference, and the degree of difference is positively correlated with the function difference and the degree of difference; performing weighted summation of each degree of difference based on the time interval between the historical function and the real-time function to obtain the total difference, and using the normalized result of the total difference as the trend difference.

[0021] The beneficial effect is: in some cases, there may be multiple historical functions before the real-time function, so the trend difference between the real-time function and the historical function is reflected based on the function difference between the multiple historical functions and the real-time function, thereby improving the accuracy of the real-time function trend difference calculation.

[0022] Optionally, for any historical function, the step of obtaining the function difference between it and the real-time function includes: obtaining the absolute difference between the function values ​​of the historical function and the real-time function at the same moment, and taking the accumulated result of multiple absolute differences as the function difference.

[0023] The beneficial effect is that: for a real-time function and a historical function, the difference between the two functions is determined according to their corresponding function values, thereby reflecting the difference in the change trend of the real-time function and the historical function.

[0024] In a second aspect, the present application provides a data acquisition system for an electrical cabinet, which adopts the following technical solution:

[0025] A data acquisition system for an electrical cabinet comprises a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, the above-mentioned data acquisition method for an electrical cabinet is implemented.

[0026] The beneficial effect is that the above-mentioned data collection method for an electrical cabinet is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a system based on the memory and the processor for easy use.

[0027] This application has the following technical effects: In this application, a new fitting function, i.e., a real-time function, is dynamically acquired multiple times based on the error accumulation of the fitting function during the operation of the electrical cabinet. The real-time function is fitted based on the recent data of the electrical cabinet and is more consistent with the current state and aging of the electrical cabinet. At the same time, data is labeled and classified based on the degree of anomaly of the real-time function, and normal data can be cleaned up to optimize storage. Furthermore, this application uses anomaly detection based on labeled data to improve the accuracy of electrical cabinet monitoring and maintain the stability of the accuracy of electrical cabinet operation monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 This is a method flow chart of a data collection method for an electrical cabinet according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] The present invention discloses a data acquisition method for an electrical cabinet. This method constructs a function reference sequence and constructs a fitting function based on the data in the function reference sequence. The fitting function predicts future data for the electrical cabinet. A certain error exists between the predicted value and the measured value. Based on this error, the error accumulation degree of the real-time data is obtained to determine whether the fitting function is inaccurate. When the error accumulation degree of the fitting function exceeds a preset deviation threshold, the fitting function is reconstructed, and the anomaly degree of the latest fitting function (the real-time function) is obtained. Based on the anomaly degree, whether the function reference sequence corresponding to the real-time function is abnormal is determined, completing the initial classification and data acquisition. Subsequently, anomaly detection is performed on the abnormal data to accurately determine the operating status of the equipment. This method dynamically constructs the fitting function based on the error accumulation degree, and the real-time function is dynamically updated based on data updates. This avoids the situation where traditional static models lose sensitivity to abnormal data over time, resulting in reduced monitoring accuracy. Furthermore, by obtaining the anomaly degree of the real-time function, data can be classified, focusing on abnormal data sets while cleaning up normal data to optimize storage space.

[0030] Reference Figure 1 , a data collection method for an electrical cabinet includes steps S1 to S5.

[0031] S1: Construct a function reference sequence based on the operating data of the electrical cabinet, and obtain a fitting function for the data in the function reference sequence.

[0032] During the operation of the electrical cabinet, operating data of the electrical cabinet is collected, and the operating data may include voltage, current, power, temperature, etc. In this embodiment, the frequency of data collection is 30 minutes per time.

[0033] When the electrical cabinet begins operating, operational data is collected at a specific frequency. Initially, the amount of data generated is relatively small, so no fitting is performed. As data continues to be collected, a function reference sequence is constructed based on the accumulated data. In this embodiment, the function reference sequence length is 30. Therefore, once the accumulated data reaches 30, the first fitting can be performed to obtain the fitted function. The fitting function is obtained using the least squares method. In other embodiments, other fitting methods, such as maximum likelihood estimation, can also be used.

[0034] S2: Construct a neighboring reference sequence of the data collected in real time, and obtain an error accumulation degree of error accumulation based on the difference between the measured value of the data in the reference sequence and the predicted value of the fitting function.

[0035] Data is collected in real time, and a neighboring reference sequence is constructed based on the real-time data. The magnitude of the accumulated error in the current state is calculated. If the error is too large, it means that there is a large deviation between the predicted results of the current fitting function and the measured values, and it is necessary to obtain the fitting function again based on the actual data.

[0036] In order to more accurately obtain the degree of deviation between the predicted results of the current fitting function and the measured values, a neighboring reference sequence is constructed based on the adjacent data of the real-time data. The differences between the predicted values ​​and the measured values ​​at multiple moments in the neighboring reference sequence are used as a reference to improve the robustness and accuracy of the final error accumulation calculation.

[0037] Specifically, the steps for calculating the error accumulation degree include: for each moment in the adjacent reference sequence, calculating the local error based on the difference between the predicted value and the measured value of the fitting function at the same moment, and taking the ratio of the local error to the mean square error of the fitting function as the local error degree; taking the square root of the mean of the local error degrees corresponding to each moment as the error accumulation degree.

[0038] For the predicted value and the measured value corresponding to each moment in the adjacent reference sequence, the difference between the predicted value and the measured value is obtained. In order to prevent the difference from being a negative number and to unify the dimensions, the difference is squared and the square of the difference is used as the local error.

[0039] The ratio of the local error to the mean square error of the fitting function is used as the local error measure. The mean square error can be directly obtained in the process of least square fitting, which will not be described here.

[0040] The closer the local error calculated in the adjacent reference sequence is to the mean squared error during the function fitting process, the smaller the local error at the current moment. By summing the multiple local errors corresponding to the data in the adjacent reference sequence and calculating the average, we can reflect the overall error of the data in that adjacent reference sequence, that is, the error accumulation degree of the accumulated error at the current moment. To avoid excessively large values, we perform a square root operation on the overall error, and use the result of the square root of the overall error as the error accumulation degree.

[0041] The specific calculation formula for error accumulation can be expressed as:

[0042] Where, Indicates the The error accumulation degree at the moment corresponding to each data; Indicates the number of data in the adjacent reference sequence; Indicates the first The function value corresponding to the data on the latest fitting function, Indicates the first individual data; Represents the mean square error of the fitted function.

[0043] In the process of error calculation This represents the error between the predicted value of the real-time function and the measured value at the same moment. This error is squared to align with the mean square error. Finally, a square root is taken to control the final value range.

[0044] S3: In response to the error accumulation being greater than a preset deviation threshold, re-obtaining the fitting function based on the latest data, and defining the latest acquired fitting function as the real-time function and the fitting function before the real-time function as the historical function.

[0045] In this embodiment, the deviation threshold is 1.1. When the final calculated error accumulation exceeds the deviation threshold, the function reference sequence is reconstructed based on the current data to obtain the latest fitted function. For ease of description, the most recently acquired fitted function is defined as the real-time function, while the fitted functions before the real-time function are referred to as the historical function. It should be noted that during the actual operation of the electrical cabinet, the real-time function changes dynamically as data accumulates; it is not a fixed function.

[0046] S4: Obtain the abnormality level of the real-time function.

[0047] Get the trend difference between the real-time function and each historical function.

[0048] Get the absolute difference between the function value at the same moment in the historical function and the real-time function, and accumulate multiple absolute differences as the function difference.

[0049] For a real-time function, it corresponds to a function reference sequence; for any historical function, it also corresponds to a function reference sequence.

[0050] Specifically, the calculation formula of function difference can be expressed as: Where, Indicates the Function difference between historical function and real-time function; Indicates the The first of the function reference sequence corresponding to the history function The function value corresponding to the data; Indicates the first function in the function reference sequence corresponding to the real-time function. The function value corresponding to the data; Indicates the length of the function reference sequence.

[0051] The abnormality degree is obtained based on the difference of each function, and the function difference is positively correlated with the abnormality degree; the total difference is obtained by weighted summing of the difference degrees based on the time interval between the historical function and the real-time function.

[0052] Specifically, the total difference is calculated as Where, Represents the total difference between the historical function and the real-time function; Indicates the total number of history functions; Indicates the The function difference between the historical function and the real-time function, Indicates the The time interval between the historical function and the real-time function; For An exponential function with base .

[0053] The step of obtaining the time interval in this embodiment includes: obtaining the data of the same sequence in the function reference sequence corresponding to the real-time function and the function reference sequence corresponding to the historical function, obtaining their index values, and using the absolute difference between their index values ​​as the time interval between the historical function and the real-time function, that is, .

[0054] Indicates the degree of difference between the historical function and the real-time function. The greater the function difference, the smaller the denominator, and thus the greater the anomaly, achieving a positive correlation between function difference and anomaly.

[0055] is the weight part of the difference degree; middle The larger the value, the greater the distance between the historical function and the real-time function. Therefore, the mutual influence between the two functions is smaller, which can reduce the weight of the difference between the historical function and the real-time function.

[0056] The normalized result of the total difference was taken as the trend difference.

[0057] Specifically, the formula for normalizing the total difference can be expressed as: Where, Represents the total difference between the historical function and the real-time function; Indicates the trend difference between real-time function and historical function; Indicates the total number of history functions; Indicates the The time interval between the historical function and the real-time function.

[0058] Get the fitting frequency of the real-time function, and use the product of the trend difference and the fitting frequency as the abnormality degree of the real-time function.

[0059] Get the real-time fitting period of the real-time function, and use the ratio of the average of the historical fitting periods of all historical functions to the real-time fitting period as the fitting frequency.

[0060] The real-time fitting period refers to the time interval between the fitting of a real-time function and an adjacent historical function. Here, the time interval is also the absolute difference in the index values ​​of the data of the same sequence in the function reference sequence corresponding to the two functions.

[0061] The history fitting cycle is the time interval between two consecutive historical function fits. The average of all historical function fit cycles indicates the frequency of obtaining fitted functions under the condition of electrical cabinet aging. By comparing the real-time fitting cycle with the historical fitting cycle, it is possible to determine whether the real-time function is fitting too quickly.

[0062] S5: In response to the abnormality degree of the real-time function being greater than a preset abnormality threshold, the data used in the real-time function fitting process is marked, the data used in the real-time function constitutes a data set, the data set is determined to be abnormal, and the data in the collected abnormal data set is used as the original data for anomaly detection.

[0063] In this embodiment, the abnormality threshold is set to 0.77; in other embodiments, this threshold can be determined based on actual conditions. When the degree of abnormality of the real-time function exceeds the abnormality threshold, it indicates that the data fitting the real-time function is abnormal. The data set used to fit the real-time function is used as the abnormal data set; this abnormal data set is used as the raw data for abnormality detection to complete abnormality detection of the electrical cabinet operation. This is mainly used to obtain a data set containing abnormal data. The abnormality detection method can be, for example, the LOF abnormality detection algorithm. This abnormality detection algorithm is a conventional technical means in the field and will not be described in detail here.

[0064] An embodiment of the present application further discloses a data acquisition system for an electrical cabinet, comprising a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a data acquisition method for an electrical cabinet according to the present application is implemented.

[0065] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.

[0066] The above are all preferred embodiments of the present application, and are not intended to limit the scope of protection of the present application. Therefore, any equivalent changes made based on the structure, shape, and principle of the present application should be included in the scope of protection of the present application.

Claims

1. A data acquisition method for an electrical cabinet, characterized in that: The method comprises the steps of: constructing a function reference sequence based on the operation data of the electrical cabinet, and obtaining a fitting function of the data in the function reference sequence; Constructing a neighboring reference sequence of data collected in real time, and obtaining an error accumulation degree of error accumulation based on a difference between a measured value of the data in the neighboring reference sequence and a predicted value of the fitting function; In response to the error accumulation being greater than a preset deviation threshold, re-obtaining a fitting function based on the latest data, and defining the latest obtained fitting function as a real-time function and the fitting function before the real-time function as a historical function; Get the abnormality level of real-time functions; In response to the abnormality degree of the real-time function being greater than a preset abnormality threshold, marking the data used in the real-time function fitting process, the data used in the real-time function constituting a data set, determining that the data set is abnormal, and using the data in the collected abnormal data set as raw data for anomaly detection; The step of obtaining the abnormality degree of the real-time function includes: obtaining the trend difference between the real-time function and each historical function, obtaining the fitting frequency of the real-time function, and taking the product of the trend difference and the fitting frequency as the abnormality degree of the real-time function.

2. The data acquisition method for an electrical cabinet according to claim 1, characterized in that: The steps of constructing a function reference sequence include: taking any moment as the right endpoint to construct a function reference sequence with a length of The time window is used to obtain all the data in the time window to form a function reference sequence.

3. The data acquisition method for an electrical cabinet according to claim 1, characterized in that: The steps of constructing a contiguous reference sequence of data collected in real time include: determining the length of the reference sequence For real-time collected data, the sampling time corresponding to the data is used as the benchmark to obtain the data, the moment and the data before that moment data points as adjacent reference sequences.

4. The data acquisition method for an electrical cabinet according to claim 1, characterized in that: Use the least squares method to obtain the fitted function corresponding to the data in the function reference sequence.

5. The data acquisition method for an electrical cabinet according to claim 1, characterized in that: The calculation steps of the error accumulation degree include: for each moment in the adjacent reference sequence, the local error is calculated based on the difference between the predicted value and the measured value of the fitting function at the same moment, and the ratio between the local error and the mean square error of the fitting function is used as the local error degree; the square root of the mean of the local error degrees corresponding to each moment is used as the error accumulation degree.

6. The data acquisition method for an electrical cabinet according to claim 1, characterized in that: Get the real-time fitting period of the real-time function, and use the ratio of the average of the historical fitting periods of all historical functions to the real-time fitting period as the fitting frequency.

7. The data acquisition method for an electrical cabinet according to claim 1, characterized in that: The steps of obtaining the trend difference between the real-time function and each historical function include: obtaining the function difference between each historical function and the real-time function, obtaining the abnormality based on each function difference, and the degree of difference is positively correlated with the function difference and the degree of difference; performing weighted summation of each difference degree based on the time interval between the historical function and the real-time function to obtain the total difference, and taking the normalized result of the total difference as the trend difference.

8. The data acquisition method for an electrical cabinet according to claim 7, characterized in that: For any historical function, the step of obtaining the function difference between it and the real-time function includes: obtaining the absolute difference between the function values ​​of the historical function and the real-time function at the same time, and taking the accumulation result of multiple absolute differences as the function difference.

9. A data acquisition system for an electrical cabinet, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a data collection method for an electrical cabinet according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Detection method and device, electronic equipment and storage medium

    CN114740300A

  • Tunnel health monitoring abnormal data dynamic early warning method based on ARIMA model

    CN116163807A