Power engineering budget data anomaly detection method and system based on big data
By leveraging big data analytics and deep learning technologies, and utilizing the TCN-VAE model and Bayesian inference methods, the anomaly detection threshold is dynamically adjusted, solving the accuracy problem of anomaly detection in power engineering budget data and enabling efficient identification and risk warning of complex and dynamic budget data.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2026-03-20
AI Technical Summary
Existing rule-based methods for detecting anomalies in power engineering budget data have high false alarm or false negative rates and are difficult to adapt to complex and dynamically changing budget data, making it difficult to accurately identify project financial risks.
By employing the TCN-VAE model based on big data and Bayesian inference methods, and through time-series feature extraction and reconstruction error analysis of cross-system budget data, the anomaly detection threshold is dynamically adjusted and anomaly data is labeled.
It improves the accuracy and flexibility of detecting anomalies in power engineering budget data, reduces false alarm and false negative rates, and can promptly identify potential financial risks, thereby reducing the risk of project overruns or delays.
Smart Images

Figure CN119918798B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data analysis, and particularly relates to a power engineering budget data anomaly detection method and system based on big data. BACKGROUND
[0002] As a major infrastructure project, power engineering projects involve a wide variety of budget data, including but not limited to equipment procurement costs, construction costs, labor costs, material costs, transportation costs, etc. These budget data often come from different departments and systems, and are dynamically adjusted during the project implementation process. For example, there may be a large difference between the initial budget and the later budget, and the adjustment reasons may be due to market changes, construction schedule delays, labor cost fluctuations, and other factors. Since these budget data are closely related to project progress, any abnormal data fluctuation may reflect potential financial risks, and even lead to project overspending or delay.
[0003] Currently, the anomaly detection of power engineering budget data mainly relies on traditional manual rule setting and rule-based detection methods. Rule-based detection methods rely on manual experience and historical data to set threshold rules, but the scope of these rules is usually limited, and it is difficult to cover all potential abnormal patterns in the budget data. When the budget data is complex or dynamically changes, the rules may not accurately detect anomalies, resulting in high false positive or false negative rates.
[0004] In view of the above problems, the industry has not yet proposed a better technical solution. SUMMARY
[0005] The present application provides a power engineering budget data anomaly detection method and system based on big data, a storage medium, a computer program product and an electronic device, which at least solves the problem of high false positive or false negative rate caused by the rule-based anomaly detection method in the related art, and can efficiently and accurately identify abnormal risks in complex power engineering budget data.
[0006] In a first aspect, an embodiment of the present application provides a power engineering budget data anomaly detection method based on big data, comprising: obtaining cross-system budget data, wherein the cross-system budget data comprises budget data of a plurality of department information systems; the department information system comprises at least one of the following: a procurement information system, a construction information system, a financial information system, and a labor management information system; extracting cross-system budget time sequence features corresponding to the cross-system budget data; processing the cross-system budget time sequence features based on an anomaly detection model to calculate a reconstruction error of each time step; the anomaly detection model adopts a TCN-VAE model; modeling and analyzing the reconstruction error of each time step based on Bayesian inference to determine a reconstruction error distribution, and determining an anomaly detection threshold according to the reconstruction error distribution; in a case where it is detected that the reconstruction error corresponding to a first time step exceeds the anomaly detection threshold, marking a data field corresponding to the first time step in the cross-system budget data as abnormal data.
[0007] In a second aspect, an embodiment of the present application provides a power engineering budget data anomaly detection system based on big data, comprising: a data acquisition unit configured to obtain cross-system budget data, wherein the cross-system budget data comprises budget data of a plurality of department information systems; the department information system comprises at least one of the following: a procurement information system, a construction information system, a financial information system, and a labor management information system; a feature extraction unit configured to extract cross-system budget time sequence features corresponding to the cross-system budget data; a reconstruction error calculation unit configured to process the cross-system budget time sequence features based on an anomaly detection model to calculate a reconstruction error of each time step; the anomaly detection model adopts a TCN-VAE model; a threshold determination unit configured to model and analyze the reconstruction error of each time step based on Bayesian inference to determine a reconstruction error distribution, and determine an anomaly detection threshold according to the reconstruction error distribution; and an abnormal data marking unit configured to, in a case where it is detected that the reconstruction error corresponding to a first time step exceeds the anomaly detection threshold, mark a data field corresponding to the first time step in the cross-system budget data as abnormal data.
[0008] In a third aspect, an electronic device is provided, comprising: at least one processor, and a memory connected to the at least one processor in communication, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform steps of the power engineering budget data anomaly detection method based on big data of any embodiment of the present application.
[0009] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement steps of the power engineering budget data anomaly detection method based on big data of any embodiment of the present application.
[0010] In a fifth aspect, an embodiment of the present application provides a computer program product, comprising computer programs / instructions, which, when executed by a processor, implement the steps of the power engineering budget data anomaly detection method based on big data according to any of the embodiments of the present application.
[0011] The power engineering budget data anomaly detection method and system based on big data provided by the present application can at least produce the following technical effects:
[0012] (1) By collecting budget data of each information system of the power engineering, and calling a TCN-VAE (Temporal Convolutional Network-Variational Auto Encoder) model to perform error reconstruction and anomaly detection on the corresponding time sequence characteristics of the cross-system budget data, compared with the traditional rule-based method, the TCN-VAE model can automatically learn the time sequence rules and potential characteristics of the data, and in the case of complex, variable and influenced by multiple factors, it can effectively capture the dynamic fluctuations of the budget data, identify the abnormal patterns that may be missed or misdetected by the traditional method, and significantly improve the accuracy of anomaly detection.
[0013] (2) By integrating cross-system data, covering information systems of multiple departments (such as procurement, construction, finance, labor management, etc.), more rich background information is provided for anomaly detection, which can comprehensively consider the mutual influence between departments, form a multi-dimensional data perspective, help to mine the potential abnormal relationship between different departments' budgets through big data analysis, and thus improve the accuracy of the budget anomaly detection result.
[0014] (3) The anomaly detection threshold determination method based on Bayesian inference can dynamically adjust the detection threshold according to the distribution characteristics of the actual data by modeling and analyzing the reconstruction error of each time step, which can effectively reduce the false positive rate and false negative rate caused by the fixed threshold setting that cannot match each stage of the power engineering, and improve the effectiveness and reliability of the detection system.
[0015] Through the technical solution, by introducing the time sequence anomaly detection method based on big data and deep learning, and with the real-time processing capability of the TCN-VAE model and the modeling of error distribution based on Bayesian inference, when the budget data of the power engineering project appears abnormal fluctuations, the monitoring and detection results can be used for early warning, which can provide early warning information for project managers, take measures in advance, and reduce the risk of project overruns or delays. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the accompanying drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0017] Figure 1 A flow chart of an example of a power engineering budget data anomaly detection method based on big data according to an embodiment of the present application is shown;
[0018] Figure 2 An operation flow chart of an example for determining an anomaly detection threshold according to an embodiment of the present application is shown;
[0019] Figure 3 A structural connection schematic diagram of an example of a TCN-VAE model according to an embodiment of the present application is shown;
[0020] Figure 4 A structural block diagram of an example of a power engineering budget data anomaly detection system based on big data according to an embodiment of the present application is shown;
[0021] Figure 5 A structural schematic diagram of an embodiment of an electronic device of the present application. DETAILED DESCRIPTION
[0022] In order to make the purposes, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be described clearly and completely below with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0023] In the technical solutions of the present application, the collection, storage, use, processing, transmission, provision and disclosure of user personal information, etc. comply with relevant laws and regulations and do not violate public order and good customs.
[0024] It should be noted that the data sources involved in the power engineering project are numerous and have different structures, such as data from procurement systems, data from construction progress systems, data from financial systems, etc. These data differ in format, granularity and content, and traditional methods cannot effectively integrate different types of data for joint analysis. In addition, power engineering projects usually take a long time to complete, and the timing changes of budget data in the project cycle are also very obvious. The existing methods have weak processing ability for time-series data and cannot effectively capture potential anomalies in data changes.
[0025] The amount of data involved in power engineering project management is extremely large, and the data dimension and time span are more complex, which not only comes from multiple business systems internally, but also may involve the influence of external market, environment, policy and other factors. In order to identify the abnormality in the massive data, the traditional rule engine and static data analysis method has been difficult to meet the demand.
[0026] In view of this, Figure 1 A flowchart of an example of a power engineering budget data anomaly detection method based on big data according to an embodiment of the application is shown.
[0027] Regarding the execution subject of the method of the embodiment of the application, it can be any controller or processor with computing or processing capability. Specifically, it can be implemented by a power engineering budget management cloud platform. By statistically analyzing data from different information systems, a multi-dimensional budget perspective of the project is constructed, and by using big data analysis and deep learning technology, the accuracy, real-time performance and flexibility of anomaly detection are significantly improved, the cost of manual intervention is reduced, the risk warning and project management capabilities are enhanced, and intelligent power engineering project budget management is realized.
[0028] In some examples, it can be integrated and configured in an electronic device or terminal in the form of software, hardware or a combination of software and hardware, and the type of terminal or electronic device can be diversified, such as mobile phones, tablet computers or desktop computers, etc.
[0029] As Figure 1 shown, in step S110, cross-system budget data is obtained, which contains budget data of multiple department information systems.
[0030] Here, the department information system contains at least one of the following: procurement information system, construction information system, financial information system and labor management information system.
[0031] In some embodiments, the corresponding business data is collected from multiple department information systems (such as procurement information system, construction information system, financial information system, labor management information system) through an interface or API.
[0032] For example, business data including material procurement list, supplier information, procurement order record, procurement amount, arrival time, etc. is collected from the procurement information system. Budget data covering construction process, such as construction hours, progress, site management costs, etc. is collected from the construction information system. The inflow and outflow information of funds, including payment, fund allocation, cash flow, etc. is collected from the financial information system. Labor cost, worker salary, social insurance and other related expenses are collected from the labor management information system.
[0033] Further, all collected data is stored in a unified database to form a cross-department and cross-system data warehouse, realizing multi-department and multi-system budget data integration and providing comprehensive and real-time data support for subsequent analysis. Then, data cleaning and standardization techniques are used to ensure consistency of data formats in different systems, especially uniformity of field names, units, and timestamps. Thus, through standardized data processing, problems caused by data source differences are eliminated, making subsequent anomaly detection more accurate and reliable.
[0034] In step S120, cross-system budget time sequence features corresponding to the cross-system budget data are extracted.
[0035] In some embodiments, time sequence modeling is performed based on the obtained historical budget data (including but not limited to historical records of each budget item), for example, first performing time series processing on the cross-department budget data, and then extracting time-related key features.
[0036] Specifically, the cross-department budget data is arranged according to the time dimension to construct unified time series data, and the data at each time point will include the expense information of multiple department budgets. For the data at each time step, its related time sequence features are extracted, including the change rate of the budget amount, the deviation between the budget and the actual expense, the fluctuation of various expense items, etc., which will help subsequent anomaly detection and capture the dynamic change pattern of the budget data.
[0037] Thus, through time sequence feature extraction, complex cross-department budget data can be converted into a feature set with time sequence characteristics, which can reflect the change trend of the budget data among departments and reveal the rules and fluctuation patterns of budget execution, enhancing the sensitivity to data fluctuations and potential anomalies.
[0038] In step S130, the cross-system budget time sequence features are processed based on an anomaly detection model to calculate the reconstruction error of each time step, and the anomaly detection model uses a TCN-VAE model.
[0039] Here, a TCN-VAE (Temporal Convolutional Network-Variational Autoencoder) model is used for anomaly detection, which performs time sequence analysis and processing through TCN (Temporal Convolutional Network) and performs anomaly detection through VAE (Variational Autoencoder), which can improve the modeling capability of time sequence data and the accuracy of anomaly detection. The TCN-VAE can be trained based on a data sample set constructed from historical budget data, so that the TCN-VAE model can adaptively learn the normal or abnormal patterns of the budget data.
[0040] In an example of the embodiment of the present application, TCN is used to extract features of budget time series data, learn the spatio-temporal dependency of time series, and gradually capture the long-term dependency of time series data through convolutional layers to ensure that long-term trends in data can be identified. The extracted time series features are input into the VAE model, and the original data is reconstructed through the encoder-decoder structure of the VAE. The reconstruction error is the difference between the input data and the reconstructed data, which reflects the part that the model cannot accurately reconstruct, i.e., the potential anomaly. In another example of the embodiment of the present application, TCN is directly integrated into the encoder-decoder structure of VAE, for example, TCN is used to build the encoder of VAE to achieve more closely feature extraction and anomaly pattern analysis. More details will be described below in combination with other examples.
[0041] In step S140, the reconstruction error of each time step is modeled and analyzed based on Bayesian inference to determine the reconstruction error distribution, and an anomaly detection threshold is determined according to the reconstruction error distribution.
[0042] It should be noted that through Bayesian inference, the distribution of the reconstruction error, i.e., the reconstruction error of each time step, can be obtained by combining prior knowledge and actual observation data. This dynamically updated distribution estimation is more accurate than a method based solely on experience or data fitting, and can adapt to data changes and uncertainties.
[0043] It should be noted that various non-limiting probability distribution models can be used to model the distribution of the reconstruction error, such as Gaussian distribution model, Gamma distribution, normal distribution, Student's t distribution, etc., and an appropriate distribution can be selected according to the actual situation of the data. Furthermore, the anomaly detection threshold is dynamically adjusted according to the Bayesian inference result to adapt to budget fluctuations in different project stages, thereby enhancing the flexibility and adaptability of the anomaly detection system.
[0044] In step S150, in the case where it is detected that the reconstruction error corresponding to the first time step exceeds the anomaly detection threshold, the data field corresponding to the first time step in the cross-system budget data is labeled as abnormal data.
[0045] In some embodiments, the reconstruction error of each time step is compared with the corresponding anomaly detection threshold, and the detected abnormal data field is labeled according to the comparison result. For example, if the budget data of the first time step deviates significantly in the items of procurement cost, construction cost, etc., the corresponding field will be marked as "abnormal". Then, the budget management platform can generate an alarm or a report according to the labeled abnormal data for further review and adjustment by the project manager. In this way, by automatically labeling abnormal data, the response speed and accuracy of anomaly detection are greatly improved, so that the project manager can quickly identify and handle potential financial risks, effectively avoiding the problem of project overruns or delays caused by abnormal budget data.
[0046] Through the embodiments of the present application, by introducing the TCN-VAE model and the Bayesian inference method, the data of multi-department cross-system fusion is processed, the complex time series data and dynamic changes are learned, and efficient and accurate anomaly detection of the power engineering project budget data is realized, which has strong adaptability and can help project managers make more scientific decisions and adjustments.
[0047] Figure 2 An operation flowchart showing an example of determining an anomaly detection threshold according to an embodiment of the present application is shown.
[0048] As shown in Figure 2 , in step S210, the mean and standard deviation corresponding to the reconstruction error of each time step are calculated to model the reconstruction error by a normal probability distribution model.
[0049] , Equation (1)
[0050] , Equation (2)
[0051] In the formula, is the reconstruction error at time step , which reflects the fitting degree of the anomaly detection model to the budget data at this time step; represents the mean of the reconstruction error, which reflects the overall trend of the historical reconstruction error; represents the standard deviation of the reconstruction error, which reflects the fluctuation range of the reconstruction error; is the total number of historical time steps covered by the cross-system budget data.
[0052] In step S220, based on the mean and standard deviation of the reconstruction error, the initial anomaly detection threshold is calculated.
[0053] , Equation (3)
[0054] In the formula, represents the initial anomaly detection threshold at time step , and represents the adjustment factor of the standard deviation.
[0055] In the embodiments of the present application, by calculating the reconstruction error and assuming that it conforms to the normal distribution, the mean and standard deviation of the error are further calculated, which provides data support for the dynamic threshold . The adjustment factor The influence of the standard deviation on the threshold is controlled to achieve flexible adjustment of the sensitivity of anomaly detection.
[0056] Through the embodiments of the present application, the mean and the standard deviation are dynamically calculated, and the detection threshold is adjusted in real time based thereon, so that the threshold can adapt to the fluctuation characteristics of the budget data. When the budget data fluctuates greatly, the standard deviation increases, causing the threshold range to expand accordingly and reducing false positives caused by fluctuations. When the budget data fluctuates slightly, the standard deviation narrows, and the threshold range tightens accordingly, enhancing the detection capability for small anomalies. Thus, based on the statistical method, the distribution modeling of the reconstruction error is reconstructed, the mean and the standard deviation are automatically calculated, and the threshold is dynamically adjusted , without the need for manual setting of a fixed threshold, achieving automation of threshold calculation and reducing the subjectivity and workload of traditional manual threshold setting.
[0057] It should be noted that the adjustment factor is an important parameter of the dynamic threshold calculation formula, which can control the detection sensitivity, and can be a preset or dynamically adjusted value. Preferably, by dynamically adjusting , the threshold sensitivity is improved and the false positive probability is reduced in a stage with greater budget volatility (such as the procurement stage); and the threshold range is tightened and the abnormal points are accurately captured in a stage with higher budget stability (such as the acceptance stage).
[0058] In some examples of the embodiments of the present application, the power engineering includes a plurality of engineering stages, each of which is respectively pre-provided with a corresponding adjustment factor of the standard deviation, and the plurality of engineering stages include an engineering procurement stage, an engineering construction stage, and an engineering acceptance stage. , wherein , and respectively represent the adjustment factors of the standard deviation corresponding to the engineering procurement stage, the engineering construction stage, and the engineering acceptance stage.
[0059] In the embodiments of the present application, according to the multi-stage characteristics of the power engineering, the adjustment factors of the standard deviation that are suitable for the characteristics of the stages are respectively set for the procurement stage, the construction stage, and the settlement stage of the acceptance, and the sensitivity and the fault tolerance of the anomaly detection in each stage are flexibly adjusted by the size change of the adjustment factor.
[0060] Specifically, in the procurement stage, since the budget fluctuates greatly, a higher is set to expand the detection threshold range and reduce false positives caused by normal budget fluctuations. In the construction stage, the budget fluctuates between the procurement and settlement stages, and the adjustment factor Moderate, so that the detection sensitivity adapts to the budget changes caused by the construction progress. In the acceptance settlement stage, the budget fluctuation is the lowest, and a smaller , tighten the detection threshold range, ensure that every abnormal point is captured, and improve the sensitivity of anomaly detection. Thus, for the budget fluctuation characteristics of different stages such as procurement, construction and acceptance settlement, the detection system can automatically adjust the threshold range to improve the adaptability of the anomaly pattern of the budget data.
[0061] Through the embodiments of the present application, by setting different standard deviation adjustment factors for different engineering stages, combined with the above calculation formula of the anomaly detection threshold, the detection threshold is dynamically adjusted, so that the anomaly detection model can adapt to the budget fluctuation characteristics of each stage. In the stage with larger budget fluctuation (such as the procurement stage), by increasing the tolerance of the model to fluctuations; in the stage with smaller fluctuation (such as the acceptance settlement stage), by reducing the detection sensitivity to ensure the adaptability of the budget management cloud platform to the data of each stage.
[0062] Regarding the feature extraction details of the cross-system budget time sequence characteristics, in some embodiments, cross-system correlation features and local fluctuation statistical features are extracted from the cross-system budget data based on a sliding time window. The cross-system correlation features include inter-system budget correlation coefficients and budget proportion features, and the local fluctuation statistical features include local mean, local standard deviation and local kurtosis.
[0063] Here, through the inter-system budget correlation coefficient, the statistical correlation of the budget data between different information systems (such as procurement and finance, construction and labor management, etc.) can be reflected. Through the budget proportion feature, the proportion feature of the budget of different systems to the total budget is calculated, reflecting the budget distribution of each information system. Through the cross-system correlation feature, the potential cooperative relationship between information systems under the abnormal pattern of budget data is revealed, providing more comprehensive context support for anomaly detection.
[0064] The local fluctuation statistical feature is used to capture the fluctuation and change trend of the budget data within a fixed time window, reflecting the short-term dynamic characteristics of the budget data, and providing key numerical features for anomaly detection. Specifically, through the local mean, the average value of the budget data within a fixed time window is expressed. Through the local standard deviation, the fluctuation amplitude of the budget data within a fixed time window is expressed. Through the local kurtosis, the peak feature of the distribution of the budget data within the time window is described, and a higher kurtosis indicates that there are more extreme values in the distribution. Thus, the dynamic change and distribution characteristics of the budget data can be captured.
[0065] More specifically, the extraction formula of the inter-system budget correlation coefficient is:
[0066] , Equation (4)
[0067] wherein, is the budget time series of the system and is the correlation coefficient of the budget time series of the system and is the covariance of the budget time series of the system and is the standard deviation of the budget time series of the system and is the standard deviation of the budget time series of the system .
[0068] Here, the inter-system budget correlation coefficient provides information on the linkage between multiple systems, supports the detection of cross-system anomalies, and helps to identify potential budget imbalance issues between systems, such as inconsistencies between procurement plans and funding approvals.
[0069] The extraction formula for the budget proportion feature is:
[0070] , Equation (5)
[0071] wherein, represents the budget proportion feature of the corresponding system , represents the budget amount of the system , represents the total budget amount of the power engineering.
[0072] Here, the budget proportion feature quantitatively characterizes the rationality of the budget distribution of each department, facilitating the rapid discovery of abnormal phenomena such as excessively high or low budget proportion of individual systems.
[0073] The extraction formula for the local mean is:
[0074] , Equation (6)
[0075] wherein, is the budget local mean in the sliding time window, representing the average value of the budget data within the sliding time window; represents the window size of the sliding time window, represents the budget data at the th time point.
[0076] The extraction formula for the local standard deviation is:
[0077] , Equation (7)
[0078] wherein, represents the local standard deviation of the budget within the sliding time window, which is used to measure the fluctuation amplitude of the budget data within the sliding time window.
[0079] Local mean and local standard deviation Reflects the short-term trend and fluctuation amplitude of the budget, and supplements the time dynamic characteristics. Local mean Can reveal the short-term trend of the budget, such as abnormality that is continuously higher or lower than the historical mean. Local standard deviation Can capture short-term fluctuation amplitude anomalies, such as phenomena where the budget fluctuates abnormally violently.
[0080] The extraction formula of local kurtosis is:
[0081] , Equation (8)
[0082] In the formula, represents the kurtosis of the distribution of the budget data within the sliding time window.
[0083] Local kurtosis Focuses on capturing abnormal extreme values, emphasizes extreme points in the budget distribution, enhances the sensitivity to sudden budget abnormal points, and can effectively detect occasional large budget expenditures.
[0084] It should be noted that the combination of cross-system correlation features and local statistical features with the sliding time window mechanism extraction makes the anomaly detection model dynamically adapt to the real-time changes of the budget data, improves the sensitivity to subtle anomalies and local fluctuations. In addition, by combining multiple feature types, it can effectively capture various abnormal phenomena in the power engineering budget data, and automatically extract based on the above method without manual intervention, which improves the efficiency of the system in processing large-scale budget data.
[0085] Figure 3 Fig. 1 shows a structural connection diagram of an example of a TCN-VAE model according to an embodiment of the present application.
[0086] As Figure 3 shown, the TCN-VAE model 300 includes an input layer 310, an encoder 320, a reparameterization layer 330, a decoder 340, and an output layer 350.
[0087] The input layer 310 is used to receive the cross-system budget time series features and construct the input budget time series features corresponding to the fixed window length , wherein, is the fixed window length, is the feature dimension of each time step.
[0088] Here, the cross-system budget time series features are divided into fixed window length subsequences by the input layer, each window containing a certain number of time step data. Through time windowing processing, structured data input is provided, ensuring the comparability and consistency of cross-system budget data.
[0089] The encoder 320 employs a temporal convolutional network (TCN) to extract time-dependent features of the input budget time series data and generate distribution parameters of latent variables.
[0090] Here, the encoder 320 employs a temporal convolutional network to model the input data in time series through convolutional layers. Compared with traditional recurrent neural networks (RNN) and long short-term memory (LSTM), TCN has stronger parallel computing capability and can effectively capture long-term dependencies. In some embodiments, TCN can employ a multi-layer structure and can employ causal convolution to learn dependencies at different time scales layer by layer.
[0091] It should be understood that the appropriate convolution kernel size and filter number can be selected according to the feature dimension and time step length of the input budget data, so as to better capture various fluctuations and trends in the model. The multi-layer convolution design and extended receptive field of TCN enable the model to capture different anomaly characteristics from short-term local fluctuations to long-term trend changes.
[0092] By employing TCN as the encoder of VAE, the model can efficiently extract long-time dependency features in time series data. Through convolution operation, TCN can discover potential time-dependent patterns in budget data, such as periodic fluctuations, sudden changes, etc., which helps to accurately predict and detect potential anomalies.
[0093] The reparameterization layer 330 is used to generate latent variables by reparameterizing the distribution parameters of latent variables.
[0094] It should be noted that the key idea of VAE is to optimize the probability distribution of the latent space so that the generative model can sample from the latent space to generate new data. The reparameterization mechanism ensures the stability and reliability of the sampling process of the latent distribution, making the anomaly detection result more robust.
[0095] In some embodiments, the latent variables are generated by sampling from the standard normal distribution through the reparameterization operation, ensuring that the model can generate new data features through the latent space, so that the model can retain the diversity of data during inference and at the same time reduce overfitting phenomenon.
[0096] The decoder 340 is used to map the latent variables back to the original feature space to generate reconstructed budget features.
[0097] Here, the decoder recovers the original budget features through the reverse neural network structure, and strives to make the reconstructed features as close to the real budget data as possible.
[0098] In some embodiments, the decoder can be composed of multiple fully connected layers and ReLU activation functions, gradually mapping the low-dimensional information in the latent space back to the high-dimensional feature space through a hierarchical structure, generating reconstructed data with the same dimension as the input feature space. In turn, the reconstructed budget features are generated at each time step.
[0099] In this way, the role of the decoder is to regenerate the original budget features through compressed representations in the latent space, which not only contains important information in the original data, but also retains the timing and dynamic characteristics, providing a basis for subsequent anomaly detection.
[0100] The output layer 350 is used to calculate the reconstruction error at each time step according to the input budget features and the reconstructed budget features at each time step.
[0101] In some embodiments, the output layer calculates the reconstruction error according to the input budget features at each time step and the reconstructed budget features generated by the decoder, which can reflect the deviation of the model when reconstructing the input data. Time steps with larger reconstruction errors often represent abnormal fluctuations in budget data, which may be related to market changes, construction delays, etc. By identifying these abnormal time steps, the platform can detect potential budget risks or overruns in real time.
[0102] By integrating TCN into the encoder of VAE, combining the advantages of time convolution network and variational autoencoder, and using TCN to effectively capture the time dependence of cross-system budget time series data, the latent space compression mechanism of VAE captures the global distribution characteristics of budget data, and combines the results of time dependence and latent distribution modeling, so that the calculated reconstruction error can directly reflect the deviation degree of abnormal points, and can accurately identify abnormal points in budget data.
[0103] It should be noted that in power engineering budget anomaly detection, each budget item (such as procurement, construction, and finance) is not only related to the current time, but also affected by the budget distribution of previous time steps, for example, the abnormality of construction cost may be related to the overruns of previous procurement costs. In addition, there is a strong correlation between different time steps, for example, budget overruns in a quarter may be related to insufficient budget execution in previous months. However, the traditional TCN structure can only capture local convolution characteristics.
[0104] As a preferred embodiment of the present application, the encoder 320 can use TCN that combines local convolution and global attention, dynamically adjusts the importance between time steps through a hybrid attention mechanism, and generates parameters of the latent distribution.
[0105] Here, by extracting time-dependent features from cross-system budget time-series features, a hybrid attention mechanism combining local convolution and global attention is used to dynamically adjust the importance between time steps, generating parameters of the latent distribution. The combination of local convolution (capturing short-term features) and global attention (modeling long-term correlations) enables the encoder to better adapt to multi-time-scale dependencies in budget data.
[0106] Specifically, the formula for local convolution modeling is:
[0107] Equation (9)
[0108] In the formula, Indicates the first Layer TCN at time step The output characteristics, This indicates the total number of layers in the TCN. Indicates the first Layer TCN at time step The output characteristics, The kernel size is [size]. k For convolution kernel index; This is the expansion factor, used to control the size of the convolutional receptive field; No. In the TCN layer k The weights of each convolutional kernel, Indicates the first Bias terms for layer TCN.
[0109] The formula for global attention modeling is:
[0110] Equation (10)
[0111] In the formula, This refers to the historical time step where an anomaly in the budget is confirmed. Indicates time step The attention weight is determined by combining historical anomalous time steps. Features of time step The impact is modeled and calculated. These represent the linear transformation matrices of the query vector and the key vector, respectively; This represents the set of historical anomalous time steps, containing all time steps where budget anomalies have been confirmed. This is a normalization term to ensure attention weights. The value of is between [0, 1]. and These represent the first and second generations after passing through the TCN encoder. Extracted from the layer and the hidden feature vector of the current time step represents an anomaly enhancement coefficient, which is used to amplify the attention weight of the historical anomaly time step.
[0112] It should be noted that in the denominator, the correlation of all anomaly time steps is compared to ensure that the model only focuses on the anomaly time step that has the greatest influence on the current time step. In addition, by limiting the calculation range of attention , the model only focuses on the historical anomaly time step and filters out the interference of other time steps. The high and low of the attention weight can reflect the potential influence of the historical anomaly on the current budget time step, for example, if the procurement cost of the last quarter directly affects the construction cost of the current quarter, it will be given a higher weight. Thus, by focusing on the comparative analysis of the corresponding historical anomaly time step, the model can more accurately capture the transmission rule and recurrence characteristics of the anomaly, thereby improving the accuracy of anomaly detection at the current time step.
[0113] In the embodiments of the present application, the features of the historical anomaly time step are weighted and introduced into the current time step through the global attention mechanism, which can focus on the influence of the anomaly time step on the current budget, for example, an abnormal purchase may cause pressure on the subsequent construction budget, and the global attention mechanism captures this correlation through a high weight. In addition, by using the anomaly enhancement coefficient , the weight of the historical anomaly time step is further amplified, so that the model can more sensitively capture the rules of anomaly transmission and anomaly recurrence.
[0114] Fuse local features and global features:
[0115] Equation (11)
[0116] In the equation, represents the fusion hidden state at time step , which fuses global features and local features.
[0117] Here, the local convolution feature is added to the global attention feature, so that the hidden state can reflect both short-term fluctuations and capture long-term trends, for example, an anomaly point in the construction budget may be associated with both recent procurement costs and previous financial allocation trends.
[0118] Generate distribution parameters of latent variables:
[0119] Equation (12)
[0120] wherein, and respectively represent the mean and standard deviation of the latent variable distribution, and respectively represent the weights for generating the mean and standard deviation of the latent distribution, and respectively represent the bias terms for generating the mean and standard deviation of the latent distribution.
[0121] In this way, the enhanced hidden state is used to generate the latent distribution parameters, ensuring that the budget features are accurately characterized in the latent space, providing higher quality inputs for subsequent reparameterization layers and decoders.
[0122] In some examples of the embodiments of the present application, the reparameterization layer 330 is used to generate latent variables by reparameterization techniques, representing compact features of the budget data in the latent space while ensuring that the sampling process is differentiable:
[0123] , Equation (13)
[0124] wherein, is a latent variable, representing a variable of the latent space; is the dimension of the latent space, representing the feature dimension of the latent variable; represents random noise sampled from a standard normal distribution, represents element-wise multiplication.
[0125] Here, the random noise is introduced in the latent variable generation process by the reparameterization layer 330 , enhancing the generalization ability of the model, improving the adaptability of the model when the distribution of the budget data changes, and reducing the dependence on specific data patterns.
[0126] The decoder 340 is used to decode the budget features by combining the latent variables with the time embedding, to enhance the model's ability to perceive periodic patterns in the budget data:
[0127] , Equation (14)
[0128] , Equation (15)
[0129] , Equation (16)
[0130] , Equation (17)
[0131] wherein, is the time embedding feature of the time step , M represents a hyperparameter of the time embedding, denotes the time step In the first dimensional time embedding value, for the time step is expressed as a periodic high-dimensional vector; denotes the enhanced latent variable, which contains time embedding information; denotes the decoded hidden feature representation at time step , and denote the first fully connected layer and the second fully connected layer for decoding the latent variable, respectively, denotes the RELU activation function, denotes the reconstructed budget feature at time step , and denote the weight matrix and the bias term of the decoding output layer, respectively.
[0132] Here, the goal of the decoder is to reconstruct the budget feature from the latent variable, and by introducing a time embedding mechanism, a time embedding is introduced for each time step , which is a high-dimensional vector containing the periodic and phased characteristics of the time step to model the periodicity of the budget data. Specifically, after combining the latent variable with the time embedding , the decoder can generate the reconstructed budget feature according to the periodic and phased characteristics of the time step , which helps to improve the accuracy of the model in detecting budget periodicity anomalies (such as abnormal fluctuations that do not conform to the periodicity).
[0133] The output layer 350 is used to compare the input budget feature and the reconstructed budget feature, and calculate the reconstruction error of each time step:
[0134] , Equation (18)
[0135] where denotes the input budget feature at time step , denotes the reconstruction error at time step .
[0136] Here, the mean squared error (MSE) is used to quantify the difference between the budget data and its reconstructed value at each time step, serving as the core indicator for anomaly detection. A large reconstructed error may indicate abnormal fluctuations in the budget data at that time step. By identifying these anomalous time steps, the system can detect potential budget risks or cost overruns in real time, facilitating intelligent monitoring and risk warning of budgets in power engineering projects.
[0137] In some examples of embodiments of this application, the loss function of the TCN-VAE model is:
[0138] Equation (19)
[0139] In the formula, This represents the loss function of the TCN-VAE model. The total number of samples in the data sample set. , , and They represent the first The reconstruction loss, KL divergence loss, periodic constraint loss, and volatility consistency constraint loss for each sample; These represent the hyperparameters for adjusting the loss term. Weights are used to control the KL divergence to balance the constraints of the latent spatial distribution. To control the weight of time-dependent regularization terms, To control the weight of the periodic constraint loss, Weights are used to control the consistency constraint loss of volatility.
[0140] Equation (20)
[0141] In the formula, For the first Each sample at time step The input budget feature represents the actual budget value in the power engineering budget data; For the first Each sample at time step The reconstructed budget features represent the budget values predicted by the model; The squared Euclidean distance between the input budget features and the reconstructed budget features quantifies the time step. Reconstruction error; For the first The number of time steps for each sample, which represents the length of the budgeted time series; For time step Dynamic weights. For example, It can be used to adjust the importance of the budgeting stage, such as the procurement stage. The corresponding weight is low, while the weight in the construction phase and the acceptance phase is high. The corresponding weight is high.
[0142] Here, the reconstruction loss measures the difference between the input budget feature and the model reconstructed budget feature , ensuring that the model can accurately reconstruct the budget feature. The reconstruction loss quantifies the reconstruction ability of the model at time step , and the smaller the difference, the better the model fits the budget law.
[0143] , equation (21)
[0144] In the formula, and respectively represent the mean and standard deviation of the latent distribution corresponding to the th sample; is the dimension of the latent space, representing the feature dimension of the latent variable.
[0145] Here, the KL loss term constrains the distribution of the latent variable generated by the encoder to be close to the standard normal distribution , ensuring the smoothness and stability of the latent space. The KL divergence ensures that the latent variable distribution has good normality and interpretability by measuring the difference between the latent distribution and the prior distribution. The KL divergence loss also improves the generalization ability of the model, making it better adapt to new budget data.
[0146] , equation (22)
[0147] In the formula, represents the latent variable representation of the th sample at time step ; represents the period length hyperparameter, used to model the periodicity of the budget data; represents the latent variable representation of the th sample at periodic time step ; is the distance between the latent variables of the periodic time steps, reflecting the periodic changes of the budget data. Here, the length of can be set or adjusted according to actual business needs, for example, it can be set to 3 months.
[0148] Here, the periodic constraint term constrains the latent variables and at periodic time steps the periodicity of the budget data. In power engineering budget, periodicity is a common feature, such as the fluctuation of procurement budget every quarter or every year, the peak and trough of construction budget in each phase, and so on. By limiting the consistency of latent variables between periodic time steps, the model can learn the periodic characteristics of the budget.
[0149] , Equation (23)
[0150] In the formula, is the change rate of latent variables between adjacent time steps, representing the dynamic change of budget data in latent space; is the change rate of input budget features between adjacent time steps, representing the actual fluctuation of budget data.
[0151] Here, through the fluctuation consistency constraint term, the change rate of latent variables is ensured to be consistent with the change rate of input budget features, capturing the fluctuation rule of budget data. It should be noted that the fluctuation of budget data reflects the dynamic change of the project, such as a sudden increase or saving of procurement cost in the short term, or a large fluctuation of labor cost in the construction phase. By limiting the change pattern of latent variables to be consistent with the input features, the sensitivity of the model to abnormal fluctuations of budget data is improved.
[0152] Through the embodiments of the present application, the modeling capabilities of reconstruction error, latent distribution consistency, periodicity rule and fluctuation rule are integrated. Based on the reconstruction loss, the model can accurately reconstruct the budget features and capture regular and abnormal features. Based on the KL divergence loss, the stability and generalization ability of the latent variable distribution are ensured. Based on the periodicity constraint, the periodicity rule of the budget is captured, and the periodicity anomaly is detected. Based on the fluctuation consistency constraint, the fluctuation characteristics of the budget are captured, and the detection ability of short-term anomalies is improved. Thus, the performance of the anomaly detection model is optimized from multiple targets.
[0153] It should be noted that for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of actions, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, certain steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application. In the above embodiments, the description of each embodiment is focused on, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0154] Figure 4 Fig. 1 shows a structural block diagram of an example of a power engineering budget data anomaly detection system based on big data according to an embodiment of the present application.
[0155] As Figure 4 shown, the big data-based power engineering budget data anomaly detection system 400 includes a data acquisition unit 410, a feature extraction unit 420, a reconstruction error calculation unit 430, a threshold determination unit 440, and an abnormal data marking unit 450.
[0156] The data acquisition unit 410 is configured to acquire cross-system budget data, the cross-system budget data including budget data of a plurality of department information systems; the department information systems including at least one of a procurement information system, a construction information system, a financial information system, and a labor management information system.
[0157] The feature extraction unit 420 is configured to extract cross-system budget time series features corresponding to the cross-system budget data.
[0158] The reconstruction error calculation unit 430 is configured to process the cross-system budget time series features based on an anomaly detection model to calculate reconstruction errors of each time step; the anomaly detection model adopts a TCN-VAE model.
[0159] The threshold determination unit 440 is configured to model and analyze the reconstruction errors of each time step based on Bayesian inference to determine a reconstruction error distribution, and determine an anomaly detection threshold according to the reconstruction error distribution.
[0160] The abnormal data marking unit 450 is configured to mark a data field corresponding to a first time step in the cross-system budget data as abnormal data if it is detected that the reconstruction error corresponding to the first time step exceeds the anomaly detection threshold.
[0161] In some embodiments, the embodiments of the present application provide a non-volatile computer readable storage medium, the storage medium storing one or more programs including execution instructions, the execution instructions being readable and executable by an electronic device (including but not limited to a computer, a server, or a network device, etc.) to perform the steps of any of the above power engineering budget data anomaly detection methods based on big data.
[0162] In some embodiments, the embodiments of the present application also provide a computer program product, the computer program product including a computer program stored on a non-volatile computer readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, causing the computer to perform the steps of any of the above power engineering budget data anomaly detection methods based on big data.
[0163] In some embodiments, the application also provides an electronic device, comprising: at least one processor, and a memory connected to the at least one processor in communication, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the big data-based power engineering budget data anomaly detection method.
[0164] Figure 5 is a hardware structure schematic diagram of an electronic device for performing the big data-based power engineering budget data anomaly detection method provided by another embodiment of the application, as shown in Figure 5 , the device comprises:
[0165] one or more processors 510 and a memory 520, Figure 5 In an example, the processor 510 is taken as an example.
[0166] The device for performing the big data-based power engineering budget data anomaly detection method can further comprise: an input device 530 and an output device 540.
[0167] The processor 510, the memory 520, the input device 530 and the output device 540 can be connected through a bus or other means, Figure 5 In an example, the connection through the bus is taken as an example.
[0168] The memory 520 is a non-volatile computer readable storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the big data-based power engineering budget data anomaly detection method in the embodiments of the application. The processor 510 performs various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 520, that is, implements the big data-based power engineering budget data anomaly detection method of the above method embodiments.
[0169] The memory 520 can include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required by a function; the data storage area can store data created according to the use of the electronic device, etc. In addition, the memory 520 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 520 can optionally include a memory remotely arranged relative to the processor 510, and these remote memories can be connected to the electronic device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0170] The input device 530 can receive input digital or character information, and generate a signal corresponding to a user's setting or function control of the electronic device. The output device 540 can include a display device such as a display screen.
[0171] The one or more modules are stored in the memory 520 and, when executed by the one or more processors 510, perform the power engineering budget data anomaly detection method based on big data in any of the method embodiments described above.
[0172] The product described above can perform the method provided in the embodiments of the present application, has the corresponding function modules and beneficial effects of performing the method. Technical details not described in detail in the embodiments can be referred to the method provided in the embodiments of the present application.
[0173] The electronic device of the embodiments of the present application exists in various forms, including but not limited to:
[0174] (1) Mobile communication device: This kind of device is characterized by having mobile communication function, and providing voice and data communication as the main target. This kind of terminal includes: smart phone, multimedia phone, functional phone, and low-end phone, etc.
[0175] (2) Ultra-mobile personal computer device: This kind of device belongs to the category of personal computer, has computing and processing functions, and generally also has mobile Internet characteristics. This kind of terminal includes: PDA, MID and UMPC device, etc.
[0176] (3) Portable entertainment device: This kind of device can display and play multimedia content. This kind of device includes: audio and video player, handheld game machine, electronic book, and smart toy and portable car navigation device.
[0177] (4) Other onboard electronic devices with data interaction function, such as car machine device installed on vehicle.
[0178] The device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e. they can be located in one place, or distributed on multiple network units. According to actual needs, part or all of the modules can be selected to achieve the purpose of the embodiments of the present application.
[0179] Those skilled in the art can clearly understand the implementation of the various embodiments by means of software plus a general hardware platform from the above description of the embodiments, and of course, the various embodiments can also be implemented by hardware. Based on such an understanding, the above technical solutions, essentially or in other words, the part that contributes to the related art, can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a plurality of instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0180] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.
Claims
1. A method for detecting anomalies in power engineering budget data based on big data, comprising: Acquire cross-system budget data, which includes budget data from multiple departmental information systems; The departmental information system includes at least one of the following: a procurement information system, a construction information system, a financial information system, and a labor management information system; Based on a sliding time window, cross-system correlation features and local fluctuation statistical features are extracted from the cross-system budget data; wherein, the cross-system correlation features include inter-system budget correlation coefficients and budget proportion features; the local fluctuation statistical features include local mean, local standard deviation, and local kurtosis; The cross-system budget time-series features are processed based on an anomaly detection model to calculate the reconstruction error at each time step; the anomaly detection model adopts the TCN-VAE model, which includes an input layer, an encoder, a reparameterization layer, a decoder, and an output layer; The input layer is used to receive cross-system budget time-series features and construct input budget time-series features with a corresponding fixed window length. ,in, For fixed window length, The feature dimension for each time step; The encoder uses a temporal convolutional network (TCN) that combines local convolution and global attention to extract the temporal dependency features of the input budget time series data. It dynamically adjusts the importance between time steps through a hybrid attention mechanism to generate the distribution parameters of the latent variables. The reparameterization layer is used to generate latent variables by reparameterizing the distribution parameters of the latent variables; The decoder is used to map latent variables back to the original feature space to generate reconstructed budget features; The output layer is used to calculate the reconstruction error for each time step based on the input budget features and reconstruction budget features for each time step. The reconstruction error at each time step is modeled and analyzed based on Bayesian inference to determine the reconstruction error distribution, and an anomaly detection threshold is determined based on the reconstruction error distribution, including: Calculate the mean and standard deviation of the reconstruction error at each time step to model the reconstruction error using a normal probability distribution model: , , In the formula, In time step The reconstruction error represents the degree of fit of the anomaly detection model to the budget data at that time step. This represents the mean of the reconstruction error, which reflects the overall trend of historical reconstruction errors. The standard deviation of the reconstruction error reflects the range of fluctuation in the reconstruction error. The total number of historical time steps covered by cross-system budget data; The initial anomaly detection threshold is calculated based on the mean and standard deviation of the reconstruction error: , In the formula, Indicates at time step The initial anomaly detection threshold, The adjustment factor representing the standard deviation. ; If the reconstruction error at the corresponding first time step is detected to exceed the anomaly detection threshold, the data field at the corresponding first time step in the cross-system budget data will be marked as anomaly data.
2. The method according to claim 1, wherein, The power engineering project comprises multiple engineering phases, each of which is pre-set with a corresponding standard deviation adjustment factor; the multiple engineering phases include the engineering procurement phase, the engineering construction phase, and the engineering acceptance phase; in, ,in , and These represent the adjustment factors for the standard deviations corresponding to the project procurement stage, the project construction stage, and the project acceptance stage, respectively.
3. The method according to claim 1, wherein, The formula for local convolution modeling is: , In the formula, Indicates the first Layer TCN at time step The output characteristics, This indicates the total number of layers in the TCN. Indicates the first Layer TCN at time step The output characteristics, The kernel size is [size]. k For convolution kernel index; This is the expansion factor, used to control the size of the convolutional receptive field; No. In the TCN layer k The weights of each convolutional kernel, Indicates the first Bias terms of layer TCN; The formula for global attention modeling is: , In the formula, This refers to the historical time step where an anomaly in the budget is confirmed. Indicates time step The attention weight is determined by combining historical anomalous time steps. Features of time step The impact is modeled and calculated. These represent the linear transformation matrices of the query vector and the key vector, respectively; This represents the set of historical anomalous time steps, containing all time steps where budget anomalies have been confirmed. This is a normalization term to ensure attention weights. The value of is between [0, 1]. and These represent the first and second generations after passing through the TCN encoder. Extracted from the layer and The hidden feature vector; This represents the anomaly enhancement coefficient, used to amplify the attention weights at historical anomaly time steps; Fusion of local and global features: , In the formula, Indicates at time step The fused hidden state combines global and local features; Distribution parameters for generating latent variables: , In the formula, and Let represent the mean and standard deviation of the latent variable distribution, respectively. and These represent the weights used to generate the mean and standard deviation of the latent distribution, respectively. and These represent the bias terms used to generate the mean and standard deviation of the potential distribution, respectively.
4. The method according to claim 3, wherein, The reparameterization layer is used to generate latent variables through reparameterization techniques, representing compact features of the budget data in the latent space, while ensuring the differentiability of the sampling process: , In the formula, These are latent variables, representing variables in the latent space; Let be the dimension of the latent space, which represents the feature dimension of the latent variables; This represents random noise sampled from a standard normal distribution. This indicates element-wise multiplication; The decoder is used to enhance the model's ability to perceive the periodic patterns in budget data by combining latent variables with temporal embeddings. , , , , In the formula, For time steps Temporal embedding features, M Hyperparameters representing temporal embedding. Indicates time step In the The time embedding value of the dimension is used to divide the time step It can be represented as a periodic high-dimensional vector; This represents the enhanced latent variable, which includes temporal embedding information; This indicates the decoded value at time step. The hidden feature representation, and These represent the first fully connected layer and the second fully connected layer used for decoding latent variables, respectively. Represents the ReLU activation function. This indicates the time step of the reconstruction. Budgetary characteristics, and These represent the weight matrix and bias term of the decoded output layer, respectively; The output layer is used to compare the input budget features and the reconstructed budget features, and calculate the reconstruction error at each time step: , In the formula, express At time step Input budget characteristics, Indicates at time step The reconstruction error.
5. The method according to claim 1, wherein, The loss function of the TCN-VAE model is: , In the formula, This represents the loss function of the TCN-VAE model. The total number of samples in the data sample set. , , and They represent the first The reconstruction loss, KL divergence loss, periodic constraint loss, and volatility consistency constraint loss for each sample; These represent the hyperparameters for adjusting the loss term. Weights are used to control the KL divergence to balance the constraints of the latent spatial distribution. To control the weight of time-dependent regularization terms, To control the weight of the periodic constraint loss, The weights are used to control the consistency constraint loss of volatility; , In the formula, For the first Each sample at time step The input budget feature represents the actual budget value in the power engineering budget data; For the first Each sample at time step The reconstructed budget features represent the budget values predicted by the model; The squared Euclidean distance between the input budget features and the reconstructed budget features quantifies the time step. Reconstruction error; For the first The number of time steps for each sample, which represents the length of the budgeted time series; For time steps Dynamic weights; , In the formula, and They represent the first The mean and standard deviation of the latent distribution corresponding to each sample; Let be the dimension of the latent space, representing the feature dimension of the latent variables; , In the formula, Indicates the first Each sample at time step The latent variable representation, This represents the period length hyperparameter, used to model the periodic patterns of budget data; Indicates the first Each sample at periodic time steps The latent variable representation; The distance between latent variables in the periodic time steps reflects the periodic changes in budget data; , In the formula, The rate of change of the latent variable between adjacent time steps represents the dynamic change of budget data in the latent space; The rate of change of the input budget feature between adjacent time steps represents the actual fluctuation of the budget data.
6. A big data-based power engineering budget data anomaly detection system, used to implement the method as described in any one of claims 1-5; the system comprises: The data acquisition unit is used to acquire cross-system budget data, which includes budget data from multiple departmental information systems; the departmental information systems include at least one of the following: a procurement information system, a construction information system, a financial information system, and a labor management information system. The feature extraction unit is used to extract the cross-system budget time-series features corresponding to the cross-system budget data; The reconstruction error calculation unit is used to process the cross-system budget time series features based on the anomaly detection model to calculate the reconstruction error at each time step; the anomaly detection model adopts the TCN-VAE model. The threshold determination unit is used to model and analyze the reconstruction error at each time step based on Bayesian inference to determine the reconstruction error distribution, and to determine the anomaly detection threshold based on the reconstruction error distribution. An abnormal data marking unit is used to mark the data field in the cross-system budget data corresponding to the first time step as abnormal data when the reconstruction error of the corresponding first time step is detected to exceed the abnormal detection threshold.
Citation Information
Patent Citations
KPI anomaly detection method fusing Bi-TCN and resisting VAE
CN116522264A
Cable cover plate anomaly detection method and system based on variational auto-encoder
CN119089363A