Electric energy information acquisition and management method based on artificial intelligence algorithm

By adopting artificial intelligence algorithm-based methods in the collection and management of electricity information, including data cleaning, feature engineering and multi-module combination, the problems of insufficient model generalization capabilities and insufficient system integration in the prior art are solved, and higher prediction accuracy and stability are achieved.

CN119598250APending Publication Date: 2025-03-11THREE GORGES JINSHAJIANG CHUANYUN HYDROPOWER DEV CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411633646.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the collection and management of electricity information, the existing technology has problems such as insufficient model generalization capabilities, insufficient algorithm selection, insufficient experimental verification, and insufficient consideration of system integration and application scenarios.

Method used

An electrical energy information acquisition and management method based on artificial intelligence algorithm is adopted, including data cleaning, feature engineering, the combination of CNN-SVM module and LSTM-Attention module, and the integration of multi-layer perceptrons to improve the prediction accuracy and stability of the model.

Benefits of technology

By improving the accuracy of data and the prediction accuracy and stability of the model, the intelligence and efficiency of power information collection and management are enhanced, and the problem of significantly degradation of the model's effect in the face of new data or complex environments is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598250A_ABST
    Figure CN119598250A_ABST
Patent Text Reader

Abstract

The invention discloses an electric energy information acquisition and management method based on an artificial intelligence algorithm. The method is based on an improved convolutional neural network, a support vector machine, a long short-term memory network and an attention mechanism. The method comprises the following steps: firstly, combining a convolutional neural network with a support vector machine to enhance the processing capability of spatial features of electric energy data; then, an attention mechanism is introduced into the LSTM, and key features influencing electric energy information data are highlighted; then, a CNN-SVM module and an LSTM-Attention module respectively perform feature extraction on the structured data and the time sequence data, and splice and fuse the structured data and the time sequence data into fusion features; and finally, a multi-layer sensor is selected to integrate a CNN-SVM module and an LSTM-Attention module, and model training and optimization are completed. According to the method, after data cleaning, abnormal value removal, missing value filling and data standardization processing are carried out on electric energy original data, time sequence data, frequency domain data, statistical feature data and spatial feature data are extracted to serve as input data of all models in subsequent modules, and the accuracy and stability of model prediction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electric energy information management, and specifically relates to an electric energy information collection and management method based on an artificial intelligence algorithm. Background Art

[0002] Electric energy information collection and management involves multiple aspects such as electric energy information data collection, storage, processing, analysis, management, monitoring and prediction. Effectively collecting, analyzing and managing electric energy data is of great significance for optimizing energy utilization, improving energy efficiency and realizing smart grids. Electric energy information data has characteristics such as time series, multivariate, periodicity, nonlinearity, noise and missing values, which brings challenges to artificial intelligence algorithm modeling. Specifically, the time series and periodic characteristics require the model to consider the time dependence of electric energy data, and it is necessary to select a suitable time series model to capture these characteristics; multivariate means that the model needs to deal with the complex relationship between multiple related variables, and it is necessary to find appropriate methods to reduce the dimension and improve the interpretability; nonlinear characteristics increase the complexity and challenge of modeling, and it is necessary to select appropriate nonlinear models to capture these relationships; noise and missing values ​​in the data will affect the accuracy and robustness of the model, and it is necessary to select appropriate noise processing methods and missing value processing methods to ensure the robustness of the model.

[0003] Existing research has tried to apply a variety of artificial intelligence algorithms in power information modeling, including machine learning algorithms such as support vector machines and decision trees (DT), deep learning algorithms such as artificial neural networks (ANN) and recurrent neural networks (RNN), and evolutionary algorithms such as genetic algorithms (GA) and particle swarm optimization (PSO). These algorithms and their integration and optimization have constructed a series of power information models, provided ideas and methods for power information management, and achieved monitoring, prediction and optimization of power usage to a certain extent.

[0004] Although previous studies have made important progress in the modeling of power information collection and management, there are still some significant shortcomings. First, the poor generalization ability of the model is a common problem. Many algorithms can achieve high accuracy in specific data sets or experimental conditions, but they are unstable in different data sets or actual application scenarios, resulting in a significant decrease in the effectiveness of the model when facing new data or complex environments. This lack of generalization ability limits the application of the model in actual power management systems and affects its promotion and long-term stability. In addition, due to the lack of systematic research on algorithm selection and comparison, only a single or limited number of algorithms are often used in research, and the applicability and relative advantages of different algorithms are not fully explored. As a result, under the changing characteristics of power information, the model fails to achieve the best efficiency and accuracy. Such research limitations hinder the comprehensive analysis and modeling of more complex power data characteristics, resulting in a lack of clear comparison and summary of the performance of different algorithms in various scenarios, affecting the effectiveness of model design. Insufficient experimental verification is also a key issue. In many studies, the scale and representativeness of the verification data set are insufficient during the experiment, and they fail to cover different usage scenarios and conditions, which limits the wide applicability of the experimental results. Such limitations may cause the model to face unknown problems in actual deployment, affecting its reliability and performance. Finally, the consideration of systematic integration and application scenarios is often not in-depth enough. Existing research focuses more on the experimental verification of single algorithms or combined models, but lacks detailed design and practical verification on how to effectively integrate these models into the power management system or how to apply them to real power information collection and management scenarios. This makes the model face difficulties in integration and deployment in actual applications, limiting its practical application value and potential. Summary of the invention

[0005] In order to solve the above problems existing in the prior art, the present invention is implemented by the following technical solutions:

[0006] The present invention provides an electric energy information collection and management method based on artificial intelligence algorithm, comprising:

[0007] S20, collecting electric energy information data, performing data cleaning, removing outliers, filling missing values, and data standardization on the electric energy information data to obtain electric energy standardized data, and performing feature engineering based on the electric energy standardized data to extract time series data, frequency domain data, statistical features, and spatial feature data, wherein the time series data is data that can reflect the dynamic characteristics of electric energy use over time, the frequency domain data is data formed by identifying frequency components and periodic changes based on the time series data, the statistical features include at least one of the mean, variance, maximum value, minimum value, kurtosis, and skewness of the electric energy standardized data, and the spatial feature data is the characteristics of the spatial differences and distribution of electric energy consumption behaviors;

[0008] S60, CNN-SVM module obtains the classification or regression result Z of the spatial characteristics of the power information data based on the input data matrix X CNN-SVM , the input data matrix X includes the spatial feature data, static power attributes, the statistical features and the frequency domain data, the static power attributes include at least one of device category data, device identification data and user category data, and the CNN-SVM module is formed by combining a CNN model and an SVM model;

[0009] S80, train time series data based on LSTM-Attention module to obtain time series data feature Z LSTM-Attention , LSTM-Attention module is formed by introducing the attention mechanism into the long short-term memory network (LSTM);

[0010] S100, fuse the CNN-SVM module with the LSTM-Attention module to obtain the fusion feature Z combined ;

[0011] S120, using a multilayer perceptron to integrate the CNN-SVM module and the LSTM-Attention module to form a system model, and the multilayer perceptron is based on the fusion feature Z combined Perform classification or regression;

[0012] S140: Perform power information management based on the system model.

[0013] In one embodiment of the present invention, feature engineering is performed to extract time series data, including:

[0014] After the electric energy information data is cleaned, outliers are removed, missing values ​​are filled, and data is standardized, time series data is extracted. Methods for extracting time series data include sliding window statistics and time period feature methods. Sliding window statistics include defining a sliding window and calculating statistical features within each window. The time period feature method includes extracting periodic features from time series data.

[0015] In one embodiment of the present invention, feature engineering is performed to extract frequency domain data, including extracting frequency domain data based on time series data according to a Fourier transform method and / or power spectral density.

[0016] In one embodiment of the present invention, feature engineering to extract spatial feature data includes direct acquisition and feature engineering extraction. Direct acquisition refers to directly acquiring from equipment and regional information in the power system. Feature engineering to extract spatial feature data refers to extracting spatial feature data from electric energy information data through feature engineering, including regional aggregation features, neighborhood features and spatial statistical features. Among them, regional aggregation features refer to aggregating electric energy information data of multiple meters or equipment in a certain area to generate the total electricity consumption or average electricity consumption of the area, neighborhood features refer to calculating the difference in electricity consumption between adjacent areas or adjacent equipment, and spatial statistical features refer to calculating some spatially related statistical features at different areas or equipment locations.

[0017] In one embodiment of the present invention, the CNN-SVM module obtains the classification or regression result Z of the spatial features of the electric energy information data based on the input data matrix X. CNN-SVM ,include:

[0018] S602, the CNN model extracts global spatial features Z based on the input data matrix X. The CNN model includes an input layer, two convolutional layers, two pooling layers and a fully connected layer. The two pooling layers are respectively located after the two convolutional layers. The last pooling layer is connected to the fully connected layer. The input data matrix X is expressed as: X∈R n×m , where m represents the number of different features in the input data matrix X, and n represents the total number of preset collection cycles counted within a preset period, and the preset collection cycle represents a preset time interval for collecting electric energy information data;

[0019] S606, CNN and SVM are connected through a fully connected layer to form a CNN-SVM module, and the global spatial feature Z extracted by CNN is input into SVM to obtain the classification or regression result Z CNN-SVM .

[0020] In one embodiment of the present invention, the global spatial feature Z extracted by CNN is input into SVM to obtain the classification or regression result Z CNN-SVM ,include:

[0021] Z∈R p , p is the vector dimension, and the SVM optimization problem is defined as:

[0022]

[0023] Constraints i (wZ i +b)≥1-ξ i ,ξ i≥0, where i represents the index variable, which is used to represent the number of samples in the input data set, N represents the last sample number in the input data set of SVM, w is the weight vector, b is the bias, and y is the weight vector. i is the sample label, ξ i is a slack variable used to handle nonlinear separability. C is a penalty parameter that controls the tolerance for misclassified samples. The value range of the penalty parameter C is set to 1 to 100.

[0024] Using the kernel function K(Z i , Z j ) maps the input features to a high-dimensional space so that a linearly separable hyperplane can be found in the originally nonlinearly separable data. The originally nonlinearly separable data are data patterns or feature distributions that exist in the electric energy information data and cannot be effectively distinguished by linear boundaries.

[0025] In one embodiment of the present invention, the kernel function K(Z i , Z j ) maps the input features into a high-dimensional space, including:

[0026] Calculated using radial basis function kernel:

[0027]

[0028] Among them, σ is the width parameter of the kernel function.

[0029] In one embodiment of the present invention, the time series data is trained based on the LSTM-Attention module to obtain the time series data feature Z LSTM-Attention ,include:

[0030] S802. Based on the input sequence X', LSTM outputs the hidden state h at each time step t t, , where t∈{1, 2, 3, …, T}, T represents the last time step of the input sequence X';

[0031] S804, calculate the attention weight α for each time step t t ;

[0032] S806, attention weight α obtained by S804 t The value vector v for LSTM t Perform weighted summation to form a context vector c, which is combined with the final output h of LSTM T As time series data feature Z LSTM-Attention .

[0033] In one embodiment of the present invention, S802, based on the input sequence X', LSTM outputs a hidden state h at each time step tt ,include:

[0034] Based on the input sequence X', LSTM outputs a hidden state h at each time step t t , the calculation process is as follows:

[0035] h t =LSTM(x t ,h t-1 ) (6)

[0036] Where t∈{1, 2, 3, …, T}.

[0037] In one embodiment of the present invention, the attention weight α t The calculation formula is:

[0038]

[0039] Among them, j∈{1, 2, 3, ..., T}, t∈{1, 2, 3, ..., T}, j can be used to traverse all time steps of the entire input sequence X', score(q, k t ) is used to measure the query vector q and the key vector k t A scoring function for the correlation between , wherein the scoring function is a dot product.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] 1. The electric energy information collection and management method provided by the present invention performs data cleaning, outlier removal, missing value filling and data standardization on the original electric energy data, and then extracts time series data, frequency domain data, statistical features and spatial feature data as input data for each model in subsequent modules, thereby improving the accuracy of data from the source of the data, and passing the time series data, frequency domain data, statistical features and spatial feature data to subsequent model classification and regression, thereby improving the accuracy and stability of model prediction.

[0042] 2. The electric energy information collection and management method provided by the present invention combines the support vector machine with the convolutional neural network to enhance the processing capability of the spatial features of the electric energy information data; then, the attention mechanism is introduced into the long short-term memory network, that is, the attention layer is added after the LSTM layer, so that the input of the attention layer is the feature vector output by the LSTM layer, so as to highlight the key features that affect the electric energy information in the output result; then, CNN-SVM and LSTM-Attention are used to extract features of structured data and time series data respectively, and splice and fuse them into a comprehensive feature vector; finally, a multilayer perceptron is selected as the integrated model, and the model is trained and optimized. The electric energy information collection and management method provided by the present invention makes further optimization in the model construction method, strengthens the system integration and scenario application research, enables the model to be effectively integrated into the actual electric energy management system, and improves the intelligence and efficiency of electric energy information collection and management.

[0043] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a flowchart of an electric energy information collection and management method based on an artificial intelligence algorithm provided by an embodiment of the present invention;

[0045] Figure 2 It is a structural diagram of CNN in a method for collecting and managing electric energy information based on an artificial intelligence algorithm provided in an embodiment of the present invention;

[0046] Figure 3 It is a structural diagram of the LSTM-Attention module in the electric energy information collection and management method based on the artificial intelligence algorithm provided in an embodiment of the present invention;

[0047] Figure 4 It is a schematic diagram of the integration of the CNN-SVM module and the LSTM-Attention module in the electric energy information collection and management method based on the artificial intelligence algorithm provided in an embodiment of the present invention;

[0048] Figure 5 (a) is a schematic diagram showing the comparison of the MAPE values ​​of the collected real-time electric energy data analysis results by the existing method and the electric energy information collection and management method provided by this embodiment; Figure 5 (b) is a schematic diagram showing the comparison results of the RMSE values ​​of the collected real-time electric energy data analysis results by the existing method and the electric energy information collection and management method provided by this embodiment;

[0049] Figure 6(a) is a schematic diagram showing the comparison of the MAE values ​​of the collected real-time electric energy data analysis results by the existing method and the electric energy information collection and management method provided by this embodiment; Figure 6 (b) is a schematic diagram showing the comparison results of the MSE values ​​of the collected real-time electric energy data analysis results by the existing method and the electric energy information collection and management method provided by this embodiment. DETAILED DESCRIPTION

[0050] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the scheme according to the present invention is described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0051] The above and other technical contents, features and effects of the present invention are clearly presented in the following detailed description of the specific implementation modes in conjunction with the accompanying drawings. Through the description of the specific implementation modes, the technical means and effects adopted by the present invention to achieve the predetermined purpose can be more deeply and specifically understood. However, the attached drawings are only for reference and explanation purposes and are not used to limit the technical solutions of the present invention.

[0052] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant is intended to cover non-exclusive inclusion, so that the article or equipment including a series of elements not only includes those elements, but also includes other elements that are not clearly listed. In the absence of more restrictions, the elements defined by the sentence "comprise one..." do not exclude the existence of other identical elements in the article or equipment including the elements. The term "and / or" is used to describe the association relationship of associated objects in this article, for example, it means that there can be three kinds of relationships between the front and back associated objects, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally represents that the front and back associated objects are in an "or" relationship.

[0053] Please refer to Figure 1 , Figure 1 The present invention provides a flow chart of an electric energy information collection and management method based on an artificial intelligence algorithm, which includes the following steps:

[0054] S20, collecting electric energy information data, performing data cleaning, removing outliers, filling missing values, and data standardization on the electric energy information data to obtain electric energy standardized data, and performing feature engineering based on the electric energy standardized data to extract time series data, statistical features, frequency domain data, and spatial feature data;

[0055] The power information data comes from the power grid, smart meters, energy management systems and other power monitoring equipment. The power information data specifically includes residential power consumption, industrial power consumption and commercial power consumption data. The time span of the data covers different power consumption modes, such as power consumption characteristics during the day, night, weekdays and weekends. In this embodiment, the power information data comes from smart meters (Smart Meters), which are real-time power consumption data obtained from smart meters installed by home or industrial users. These devices can record power usage at fixed time intervals, such as every minute or every hour, and generate detailed time series data. The power information data also comes from power monitoring systems (Power Monitoring Systems), including data collected from monitoring equipment in substations or distribution networks, such as voltage and frequency changes. This type of data can reflect the overall operating status and fluctuation characteristics of the power system. The power information data also comes from sensor networks (SensorNetworks). In industrial environments, data collected from distributed sensor networks, such as power consumption, current and temperature characteristics of specific equipment. Electric energy information data also comes from historical electricity usage records (Historical Energy Usage Records). Historical electricity usage records can be used to train historical electricity usage data for models, which may come from power companies or energy management systems and include past load curves and electricity usage patterns.

[0056] The electric energy information data includes information such as electricity consumption time, electric energy consumption power (unit: kW), electric energy consumption (unit: kWh), voltage (unit: V), current (unit: A) and load curve. The collected data is stored in the form of time series tables or databases. The collected data includes timestamps, device IDs, collected electric energy information data, etc. In addition to time series data, the types of electric energy information data also include structured data, event data, classified data, text data, and image data. Specifically, structured data is the description of background information related to electric energy use, such as user information (for example, user category: residential, industrial or commercial), equipment information (such as equipment type, installation location, rated power, etc.), geographic location data (such as the geographic coordinates of users or equipment), etc. These data are usually stored in a table form to facilitate the analysis of electricity consumption characteristics of different categories or locations. Event data is a record of events that occur at a specific time, such as equipment failure, power outage, maintenance activities, load transfer, etc. These data are usually non-continuous and record the special behavior of electric equipment or systems at a specific moment. Categorical data is used to describe the category or status of electricity use, such as load classification (high load, medium load, low load), seasonal classification (summer, winter) or user category classification (residential, commercial, industrial). Text data refers to some unstructured data related to electricity use, such as maintenance reports, user feedback, equipment manuals, etc. These data can provide auxiliary information for analyzing electricity use and management, but natural language processing technology is required for processing. Image data refers to thermal imaging data or equipment monitoring images that may be involved in some scenarios. These different types of electricity information data provide richer information for comprehensive analysis and management of electricity use.

[0057] Electric energy information data is usually collected at a certain time interval, which can be every hour, every minute, or even every second. The choice of time interval depends on the specific needs of the research. For example, in load forecasting, data points per hour can accurately capture the overall trend of electricity use, while in some scenarios that require high-precision monitoring, sampling may be required at intervals of every minute or every second. Therefore, it is necessary to collect the original electric energy data of electricity usage according to the preset collection cycle, that is, the electric energy information data, that is, the preset collection cycle represents the preset time interval for collecting electric energy information data. In this embodiment, the preset collection cycle is one hour, that is, the electric energy information data is collected once every hour to provide sufficient time resolution to capture the power consumption pattern.

[0058] The preprocessing of power information data includes: performing data cleaning, removing outliers, filling in missing values, and data standardization on the power information data to obtain standardized power data, and then performing feature engineering based on the standardized power data to extract time series data, statistical features, frequency domain data, and spatial feature data.

[0059] Furthermore, data cleaning is an important step in removing invalid data and outliers. The collected power information data may contain some abnormal data points caused by sensor failures, communication problems, or human errors. Statistical methods such as the standard deviation method or the box plot method can detect and remove these outliers.

[0060] Furthermore, removing outliers includes using an outlier detection formula to detect outliers. The outlier detection formula for detecting outliers includes: when the data point x in the power information data satisfies x > Q3 + 1.5 × IQR or x < Q1 - 1.5 × IQR, then the data point x is regarded as an outlier, where Q1 and Q3 are the first and third quartiles of the power information data respectively, and IQR is the interquartile range.

[0061] Furthermore, due to equipment failures or data transmission interruptions, there may be missing values in the power information data. Therefore, it is necessary to fill in the missing values in the power information data. In one embodiment of the present invention, the mean filling method is used to fill in the missing values in the power information data. The mean filling method is to use the average value of the feature to fill in the missing data. In another embodiment of the present invention, the interpolation method is used to fill in the missing data. The interpolation method is to use linear interpolation or time series interpolation to complete the missing values, so as to maintain the time continuity of the data.

[0062] Furthermore, to ensure the rapid convergence and stability of the model, it is necessary to standardize the power information data. In one embodiment of the present invention, the Z-score is used to standardize the power information data. Using the Z-score can standardize each feature so that its mean is 0 and the standard deviation is 1. In another embodiment of the present invention, the Min-Max method is used to standardize the power information data. Min-Max scaling can linearly transform the power information data into the interval [0, 1].

[0063] Feature engineering is performed to extract time series data, frequency domain data, statistical features, and spatial feature data. Time series data is data that can reflect the dynamic characteristics of electricity use over time, that is, time series data is a time domain feature. After the electric energy information data is cleaned, outliers are removed, missing values ​​are filled, and data is standardized, the periodic features of the day, week, and month in the electric energy standardized data are extracted as time series data to capture periodic electricity consumption patterns. The methods for extracting time series data include sliding window statistics and time period feature methods. Sliding window statistics specifically include defining sliding windows (such as 1 hour, 1 day, etc.) and calculating statistical features such as mean, variance, maximum, and minimum in each window to capture local electricity consumption patterns. The time period feature method includes extracting periodic features in time series data, such as day, week, month, etc., to identify electricity consumption patterns in different time periods. By adding timestamp features, the model can understand the differences in electricity consumption between weekdays and weekends, daytime and nighttime, etc. Time series data contains the characteristics of power usage (such as power consumption, voltage level, load, etc.) collected continuously at fixed time intervals. This data form makes it possible to analyze and predict the changing trends, periodic patterns, and short-term and long-term dependencies of power usage. Time series data can be used to capture and analyze the key data types of power usage trends and patterns. Time series data includes time series of power consumption, time series data such as voltage and current, load curves, and time tags such as daytime and nighttime. The time series of power consumption refers to the recording of power consumption at different times (such as power consumption per hour or per minute), which is used to capture short-term and long-term power consumption trends; time series data such as voltage and current, including recording voltage or current values ​​that change over time, can reflect the stability and load of the power system; load curves refer to the description of the change of load over time, which helps to identify information such as peak and valley values ​​of load; time tags such as daytime and nighttime refer to the fact that time tags are sometimes added to help the model identify power consumption behaviors in different time periods, such as the difference in power consumption between weekdays and weekends, and daytime and nighttime. Time series data is usually input into LSTM in the form of a three-dimensional tensor in the format of (batch size, sequence length, feature dimension), where batch size represents the number of data samples input each time; sequence length represents the length of the time series, that is, the number of time steps for each sample; feature dimension represents the data dimension of each time step (e.g., multiple features).

[0064] Frequency domain data is data formed by identifying frequency components and periodic changes based on time series data. It can describe the energy distribution of pre-processed data at different frequencies, reveal the regular patterns and change trends hidden in the time series data, and can be used to analyze the periodicity and frequency components of pre-processed data. Frequency domain data can provide additional and useful information for the model using it. Frequency domain data is integrated into the model and combined with time domain features to help the model better capture the complex relationships and change trends in the pre-processed data, thereby improving the accuracy and efficiency of electric energy information collection and management, thereby improving prediction accuracy and model performance. Further, after the electric energy information data is cleaned, outliers are removed, missing values ​​are filled, and data is standardized, frequency domain data is extracted based on the time series data according to the Fourier Transform method and / or Power Spectral Density (PSD). Specifically, the time series data is Fourier transformed to convert the time series data from the time domain to the frequency domain. Through Fourier transform, the time series can be represented as a superposition of a group of different frequency components, and the main frequency components and periodic changes in the time series data can be identified, thereby identifying the periodic laws in the power consumption. Frequency domain data can help the model identify the fluctuation patterns of different frequencies. Analyzing the power spectral density can reveal the energy distribution of different frequencies in the time series data. PSD is used to determine which frequency components play a major role in the change of power consumption, helping the model to identify the main frequency components and understand the periodic characteristics of the data. It is suitable for the detection of power load fluctuations and periodic behaviors, which is particularly important for identifying periodic characteristics and load fluctuation laws.

[0065] The extraction of statistical features is one of the key steps in feature engineering. After the electric energy information data is cleaned, outliers are removed, missing values ​​are filled, and data is standardized, at least one of the mean, variance, maximum, minimum, kurtosis, and skewness of the electric energy standardized data in the sliding window is calculated as a statistical feature to provide local statistical information of the preprocessed data. Specifically, the statistical features mainly include basic statistical features and time series interval statistics. Basic statistical features include mean, variance, skewness, kurtosis, etc., which are used to describe the central trend and fluctuation of electricity consumption data. Basic statistical features can provide the model with useful information about data distribution and help identify extreme electricity consumption behaviors or abnormal patterns. Time series interval statistics is to calculate the changes in different time intervals, such as the difference between adjacent time points, the ratio of maximum to minimum values, and provide information on the amplitude of electricity consumption fluctuations. For example, the time series data is divided into several windows of fixed length (such as hourly, daily or weekly), and the statistics are calculated in each window. This method can extract local statistical characteristics and provide useful information for feature extraction of subsequent CNN models. Statistical features can describe the local characteristics and overall distribution of data, provide additional information dimensions for the model, and the statistical features are passed to SVM, which can enhance the classification and regression effects of SVM. By using the descriptive information of statistical features, the SVM model can better distinguish different power consumption patterns or predict power consumption trends. Furthermore, the mean represents the average power usage within a window, which is used to capture the overall power consumption trend; the variance can measure the volatility of preprocessed data and can be used to identify the stability or degree of change of power consumption; the maximum and minimum values ​​can be used to identify the peak load and the lowest load within the window, providing information on extreme power consumption; the kurtosis and skewness can be used to describe the distribution of power usage data, such as whether the data deviates from symmetry or whether there are spikes. Statistical features provide rich information for the model that uses them for data processing, so that the model can better capture the short-term trend, fluctuation characteristics and abnormal conditions of power usage data, and reduce the error volatility in the prediction. By analyzing the mean, variance, maximum and minimum values, the model can identify changes in electricity consumption patterns, such as stable electricity consumption periods, peak electricity consumption periods and abnormal fluctuations. Since electricity demand is usually affected by time and external conditions such as weather and season, statistical characteristics are crucial in electricity forecasting. By analyzing the local statistical characteristics of electricity usage data, the model's understanding and prediction capabilities of electricity consumption patterns are enhanced.

[0066] Spatial feature data refers to features with spatial distribution significance in electric energy information data. In other words, spatial feature data are features that describe the spatial differences and distribution of electric energy consumption behavior. These features are related to the geographical location, equipment layout, or other spatially associated factors of electric energy use, and usually reflect the impact of factors such as different geographical locations, regional divisions, or equipment layouts on electric energy use. There may be significant differences in electric energy usage patterns in different regions or equipment locations, which will affect applications such as power distribution and load forecasting. Spatial feature data helps capture the impact patterns of different spatial locations on electric energy consumption and load. Feature engineering to extract spatial feature data includes direct acquisition and feature engineering extraction. Direct acquisition refers to obtaining directly from equipment and regional information in the power system. These features are usually static attributes related to electric energy use, including geographic location information, equipment location and type, and user type. Specifically, geographic location information includes geographic coordinates (longitude, latitude) or area codes of power-consuming devices or users. This information directly reflects the geographical location distribution and helps the model using it to identify the power usage patterns of different regions; equipment location and type include obtaining the installation locations of different equipment (such as industrial areas, commercial areas, residential areas, etc.) and equipment types (such as air conditioners, motors, lighting equipment, etc.), and can also provide spatial information. For example, the power consumption pattern of industrial equipment will be significantly different from that of residential equipment. This information is particularly important when analyzing spatial distribution characteristics; user types include type identifications of residential users, commercial users, and industrial users. These category information also have spatial characteristics because the power consumption needs and patterns of different types of users are usually affected by location. In addition to the features directly obtained, some spatial feature data can be extracted from the power information data through feature engineering. The goal of feature engineering is to use spatial information to generate spatially relevant information. The feature extraction of spatial feature data by feature engineering refers to the extraction of spatial feature data from power information data through feature engineering, including regional aggregation features, neighborhood features, and spatial statistical features. Regional aggregation features refer to the aggregation of power information data of multiple meters or devices in a certain area to generate the total power consumption or average power consumption of the area, such as summing or averaging. This aggregation feature can reflect the overall power consumption trend of a certain area. For example, the average power consumption of all meters in a commercial area is obtained to characterize the power consumption intensity of the commercial area. Neighborhood features refer to the calculation of power consumption differences between adjacent areas or adjacent devices to identify spatial dependencies between different areas or devices. This can be achieved by applying spatial weighting or sliding windows to the power information data of a region. For example, among other devices around device A, the average power consumption or fluctuation is calculated to reflect the spatial correlation of device A.Spatial statistical features refer to the calculation of some spatially related statistical features in different regions or equipment locations, such as the mean and variance of electricity consumption in each region, which can reflect the uneven spatial distribution of electricity consumption. For example, the standard deviation of electricity consumption in a certain area can be calculated to determine the fluctuation of electricity consumption in that area. As part of the CNN-SVM module input, it can enrich the model input and more effectively capture the spatial distribution pattern of electricity use, thereby improving the prediction accuracy and classification ability of the system model.

[0067] Feature engineering to extract time series data, statistical features, frequency domain data, and spatial feature data plays an important role in the construction of electric energy information collection and management models. On the one hand, by extracting key features that help identify power usage patterns, periodic laws, and load changes, feature engineering can help the model better learn the potential patterns and laws in the data and improve prediction accuracy; on the other hand, by reducing redundant information and unnecessary features, feature engineering can reduce the dimension of the data, thereby speeding up the training of the model and reducing the consumption of computing resources. Feature engineering can also reduce the dimension or complexity of the data, remove noise information, optimize computing efficiency, and achieve the purpose of speeding up the training process of the model; in addition, feature engineering to extract time series data, statistical features, frequency domain data, and spatial feature data can enhance the model's ability to understand the time series and frequency domain characteristics of electric energy information data, and help the model better capture long-term dependencies and complex nonlinear relationships.

[0068] The electric energy information collection and management method based on artificial intelligence algorithm provided in this embodiment performs data cleaning, outlier removal, missing value filling and data standardization on the original electric energy data, and then extracts time series data, frequency domain data, statistical features and spatial feature data as input data for each model in subsequent modules, thereby improving the accuracy of data from the source of the data, and passing the time series data, frequency domain data, statistical features and spatial feature data to subsequent model classification and regression, thereby improving the accuracy and stability of model prediction.

[0069] S40, dividing the preprocessed data into a training set, a validation set and a test set;

[0070] The data obtained after preprocessing is divided into a training set, a validation set and a test set. In this embodiment, 70% of the electric energy information data is used as the training set data, 15% of the electric energy information data is used as the validation set data, and 15% of the electric energy information data is used as the test set data, so that the model can be tuned during the training process and effectively evaluated in the test stage.

[0071] In this embodiment, the pre-processed data is divided into a training set, a validation set and a test set, and the training set, the validation set and the test set are successively input into the system model for data training. The system model includes a CNN-SVM module, an LSTM-Attention module and a multilayer perceptron (Multilayer Perceptron, MLP). The CNN-SVM module includes two sub-models, CNN and SVM. The LSTM-Attention module includes a sub-model for training a long short-term memory network based on the Attention mechanism. The training set is used for learning the parameters of all modules, that is, the training set is used for learning the parameters of all sub-models, the validation set is used for tuning the hyperparameters of all modules and preventing overfitting, that is, the validation set is used for tuning the hyperparameters of all sub-models and preventing overfitting, and the test set is used for the final performance evaluation of the system model to measure the generalization ability and actual application effect of the model. Dividing the data into a training set, a validation set and a test set, and using them specifically in different modules can ensure the robustness and generalization ability of the model in the task of electric energy information collection and management, thereby building an artificial intelligence model that performs well in complex electric energy information data.

[0072] S60, CNN-SVM module obtains the classification or regression result Z of the spatial characteristics of the power information data based on the input data matrix X CNN-SVM , the input data matrix X includes spatial feature data, static power attributes, statistical features and frequency domain data, the static power attributes include at least one of device category data, device identification data and user category data, and the CNN-SVM module is formed by combining the CNN model and the SVM model;

[0073] The input data matrix X is represented as: X∈R n×mSpecifically, the data source of the input data matrix X is structured data. Structured data includes static information related to electric energy or information with spatial distribution characteristics. This information does not need to consider time dependencies. Structured data is usually input in the form of a fixed two-dimensional matrix, where each row represents a sample and each column represents a feature. Specifically, the structured data specifically includes spatial feature data, such as the geographical location information of different power sensors or meters. These location features can help the model identify the power consumption patterns in different regions. The data source of the input data matrix X also includes static power attributes, for example, at least one of the device category, device identification, and user category (such as residential, commercial, and industrial). The static power attribute information can provide additional context information for the model to help classify different power consumption patterns. The data source of the input data matrix X also includes statistical features, which are statistical features that can be extracted from the power information data through sliding windows or other methods (such as mean, variance, maximum value, and minimum value). Statistical features can describe the distribution and fluctuation trend of power data. The data source of the input data matrix X also includes frequency domain data, such as frequency components and power spectrum density obtained by Fourier transform. These frequency domain data help identify periodic patterns and oscillation behaviors in power data. m represents the number of different features in the input data matrix X, such as voltage (Voltage), power (Power), current (Current), frequency (Frequency), etc. In the input data matrix X∈R n×mIn , each time step contains these m different features, describing the power usage at that time point. n represents the time dimension, that is, the time dimension n. The time dimension n specifically refers to the number of discrete sampling points of the power information data in the preset period. In other words, the time dimension n represents the total number of the preset collection period in which the data is counted within the preset period. The time dimension n is usually used to describe the continuous observation of the power information data over a period of time. For example, if the power usage of a family is monitored, the preset period is one week, and the preset collection period is one hour, that is, the data of one week is sampled per hour, then n represents the number of all sampling points in one week. Assuming that there are 7 days in a week and 24 hours a day, then n = 7 × 24 = 168. Through the time dimension n, CNN can extract features from the power information data, capture the dynamic changes and patterns of time series data, and thus provide strong support for the collection and management of power information. The time dimension n enables the power information data to have the properties of a time series and can show the dynamic pattern of power usage changing over time. For example, in an electric energy management system, by analyzing hourly power consumption data, the difference in electricity consumption during the day and night, as well as the peak and valley values ​​of load in specific time periods can be observed. This time dependency is crucial in modeling because the use of electric energy usually changes periodically or non-periodically over time. In this embodiment, n is an hourly data point, and m represents different characteristics, such as voltage, power consumption, etc. In another embodiment of the present invention, the preset collection period is every hour, and data for one month (30 days) is collected at intervals of every hour, that is, the preset period is one month, then the time dimension n can be calculated as: n = 30 × 24 = 720, where the 720 data points represent the hourly electricity consumption records during the entire observation period. As time goes by, the data at each time point contains different characteristics such as voltage and power, which are used to analyze the use of electric energy.

[0074] The CNN-SVM module extracts the global spatial feature Z of the electric energy information data based on the CNN model to distinguish different electric energy usage patterns or states. The global spatial feature Z is the spatial feature of the electric energy information data. Spatial features refer to a series of features with spatial relationships or mutual correlations in the electric energy information data. These features can help identify different power usage patterns, changing trends, and local patterns. In other words, spatial features mainly include features that can characterize local patterns, structural characteristics, and spatial correlations of electric energy information data. The global spatial feature Z can reflect the complex relationships and pattern changes of electric energy information data. The global spatial feature Z mainly includes electric energy usage pattern features, multidimensional feature associations, electric energy equipment status features, load fluctuation features, and frequency domain features. Furthermore, the characteristics of the power usage pattern include local power consumption changes, and the characteristics of the power usage pattern also include peak and valley characteristics. The power information data usually contains multiple related indicators, such as voltage, power, current, etc. These indicators may have local correlations and patterns in a specific time period. CNN can identify and extract these local patterns as local power consumption changes. Local power consumption changes include, for example, high-energy consumption or low-energy consumption power consumption behaviors; the spatial characteristics of the power information data also include the peaks and valleys of the load curve. CNN can capture these features as peak and valley characteristics to help the model understand when the peak or valley of power consumption occurs; multi-dimensional feature association means that power data is often composed of features of multiple dimensions, such as voltage, power, frequency, etc. These features may have certain correlations or spatial feature data at the same time point. CNN can capture the correlations between these multi-dimensional features through convolution operations, such as the relationship between voltage and current, and the pattern in which they jointly affect power consumption; the power equipment status feature means that the power information data may come from multiple devices, and CNN can identify the operating modes of different devices from the spatial features.For example, when multiple devices are running at the same time, CNN can detect the contribution of each device to the total power consumption and extract it as an important spatial feature. This ability is very useful for identifying the working status of the device, such as starting, stopping or load changes. Load fluctuation characteristics are the characteristics of load fluctuations, such as the amplitude and frequency of changes in the electric energy load within a specific time period. CNN can identify the laws of power fluctuations by learning these characteristics, such as the performance of certain devices in periodic load changes. CNN can also extract frequency domain data to form frequency domain features. The use of frequency domain features is mainly reflected in the analysis of the periodicity and frequency components of electric energy information data. By extracting frequency domain data The global spatial feature Z of the multi-dimensional information of the time series data is obtained and passed to the SVM for further classification or regression tasks, so that the SVM model can better identify the periodic patterns in the use of electricity (such as daily peak electricity consumption, weekend electricity consumption changes, etc.), thereby improving the accuracy of the prediction of future electricity consumption. The frequency domain features can also be input into the LSTM model and multi-layer perceptron as additional features to help the LSTM model and multi-layer perceptron to more effectively capture the hidden patterns in the power information data. Especially in long time series data, the frequency domain features can provide information that the time domain features cannot capture, so that short-term fluctuations and long-term trends can be comprehensively analyzed. These features describe the energy distribution of the power signal at different frequencies, helping the model to identify the power consumption change pattern of a specific frequency, such as the harmonic characteristics in the power signal.

[0075] The CNN-SVM module obtains the classification or regression result Z of the spatial characteristics of the power information data based on the input data matrix X. CNN-SVM , specifically including the following steps:

[0076] S602, the CNN model extracts global spatial features Z based on the input data matrix X;

[0077] Please refer to Figure 2 , Figure 2 It is a structural diagram of CNN in an electric energy information collection and management method based on an artificial intelligence algorithm provided by an embodiment of the present invention. The CNN model includes an input layer, two convolutional layers, two pooling layers and a fully connected layer (FC). The input layer can receive the input data matrix X and perform a convolution operation using a convolution kernel to extract local features. The two pooling layers are respectively located after the two convolutional layers, and the last pooling layer is connected to the fully connected layer.

[0078] The convolutional layer of CNN operates through a sliding window, and both convolutional layers use the convolution kernel W∈R k×mConvolution calculation is performed to extract local pattern features, where k is the width of the convolution kernel, that is, the width of the convolution kernel k. The width of the convolution kernel k is the length of the convolution kernel in the time dimension. The time dimension n and the feature dimension m together constitute the input data matrix X. CNN will perform convolution operations on the time dimension to capture the correlation and patterns between different time points, which helps the CNN model to identify local features of electricity consumption data, such as peak power consumption periods and temporal trends. The width of the convolution kernel k and the feature dimension m cover all features of the input data matrix X. The convolution kernel performs dot product calculations on the input data matrix X through a sliding window operation to extract local spatial features, helping the model to better understand and predict complex patterns and changing trends in electric energy information data.

[0079] The two convolutional layers are the first convolutional layer and the second convolutional layer. The length of the convolution kernel of the first convolutional layer is 3 and the width is m (equal to the number of features of the input data), that is, it covers the entire feature width but only slides in the time dimension. The number of convolution kernels is 32.

[0080] Based on the convolution operation theory, the convolution operation of the first convolution layer and the second convolution layer is expressed as:

[0081]

[0082] Specifically, Y represents the output feature map of the convolution layer, i is the vertical index of the output feature map Y, j is the horizontal index of the output feature map Y, u is the vertical index of the convolution kernel, u∈{0,1,…,k-1}, v is the horizontal index of the convolution kernel, v∈{0,1,…,m-1}, and b is the bias term.

[0083] After the convolution operation, the first convolution layer introduces the nonlinear feature Y'(i, j) through the activation function. In this embodiment, the activation function is a linear rectified unit (ReLU). The nonlinear feature Y'(i, j) is expressed as follows through the activation function:

[0084] Y'(i,j)=ReLU[Y(i,j)] (2)

[0085] ReLU(x)=max(0,x) (3)

[0086] Among them, ReLU(x) represents the linear rectification function, x represents the input of the linear rectification function, and max() is the maximum value function.

[0087] Then, a maximum pooling operation is performed, and the pooling window size is 2×1 to reduce the feature map dimension and computational complexity. In this embodiment, the two pooling layers have the same structure, and the length of the pooling window in the pooling layer is 2 and the width is 1.

[0088] The length of the convolution kernel of the second convolution layer is 3, the width is m, and the number is 64. The second convolution layer also uses the ReLU activation function to introduce nonlinear characteristics.

[0089] In this embodiment, CNN is designed as a two-layer convolution-pooling combination, with 32 convolution kernels in the first layer and 64 in the second layer, so as to gradually extract deeper features.

[0090] The output feature map of the convolutional layer is further reduced in dimension by the pooling layer, which reduces the computational complexity and improves the robustness of the model.

[0091] The output feature vector after pooling is flattened and extracted by the fully connected layer to obtain the global spatial feature Z, which is passed to the subsequent module. Specifically, the output of the last pooling layer is flattened and passed to the fully connected layer. The number of nodes in the fully connected layer is 128. The ReLU activation function is used to further extract the global features to obtain the global spatial feature Z. The output of the pooling layer mainly captures the local features of the input data matrix X, reflecting the significant patterns of the local areas in the input data. Although these features are simplified by the pooling operation, they still retain the local information of the spatial position. For example, in the electric energy information data, the output of the pooling layer may reflect the local peak or valley of electricity consumption in a specific time period. The fully connected layer integrates these local features to generate a more advanced feature expression, which can capture the global pattern and relationship of the input data. Therefore, the global spatial feature Z is a further refinement and integration of the output of the pooling layer, providing a more holistic and comprehensive feature expression. For example, the global spatial feature Z can describe the overall change trend or comprehensive power consumption pattern of the electric energy information data within the entire input time range, rather than just the characteristics within a local time period. This global feature is crucial for subsequent classification or regression tasks, improving the model's understanding and prediction capabilities and making it more suitable for processing complex data structures, such as the overall power consumption pattern analysis in electric energy information.

[0092] The output layer of CNN is the input layer of SVM, and the input layer of SVM receives the global spatial feature Z from the fully connected layer of CNN.

[0093] S604, training CNN: using Adam optimizer to train CNN model weights until preset optimization conditions are met;

[0094] Specifically, the initial learning rate of the Adam optimizer was set to 0.001, CNN was trained based on the above training set, and CNN was frozen after the training was completed and used as a feature extractor.

[0095] S606, feature transfer and SVM training: CNN and support vector machine (SVM) are connected through a fully connected layer to form a CNN-SVM module, and the global spatial feature Z extracted by CNN is input into SVM to obtain the classification or regression result Z CNN-SVM , the classification or regression result Z CNN-SVM Ability to distinguish different power usage modes or states.

[0096] Specifically, according to different application scenarios, the global spatial feature Z extracted by CNN is input into SVM to distinguish different power usage modes or states, including that SVM implements classification tasks and / or regression tasks based on the global spatial feature Z. Based on the global spatial feature Z, SVM classification specifically refers to classifying the power information data into different power usage modes or states to achieve abnormal detection or equipment state recognition. SVM mainly classifies according to power usage mode characteristics, load curve characteristics and equipment operation state characteristics. Specifically, the power usage mode characteristics can reflect the patterns of different power usage behaviors, such as high energy consumption periods, low energy consumption periods or abnormal power consumption behaviors. By analyzing these patterns, SVM can classify data into different categories, such as "normal power consumption" and "abnormal power consumption" or "high energy consumption equipment operation" and "low energy consumption equipment operation". If the power information data contains load curve information, such as a power change curve over time, CNN can capture the change characteristics in the load curve as load curve characteristics. The load curve characteristics include peak load, valley load, and the frequency and amplitude of load changes. SVM can classify based on these characteristics and classify different load modes into corresponding categories. In the collection and management of power information, data may come from a variety of devices, such as air conditioners, lighting, production equipment, etc. The characteristics of the equipment operation status can reflect the operation status or category of the equipment, thereby helping SVM to classify different devices or operation status. Specifically, the classification tasks include power anomaly detection, power mode classification, and equipment identification. Power anomaly detection means that in the management of power information data, the classification task may be used to detect abnormal power consumption behavior. For example, SVM can classify the power usage into "normal power mode" and "abnormal power mode" categories based on the global spatial feature Z extracted by CNN, thereby detecting possible equipment failures or abnormal power consumption behaviors, and helping to identify potential equipment failures or power anomalies in a timely manner. Power mode classification refers to the classification of power information data into different power mode differences, and classifying power information data into categories such as "peak hour power consumption", "off-peak hour power consumption" or "power consumption characteristics when equipment starts", etc., to help identify power consumption characteristics in a specific time period. Device identification means that when the power data contains information about multiple devices, SVM can classify the data into different device categories based on the features extracted by CNN, thereby realizing the identification and monitoring of the device operating status. When the power information data includes the status information of multiple devices, SVM can classify the operating status of the device according to the global spatial feature Z, such as "device on" and "device off".

[0097] SVM regression is based on these features to make numerical predictions of future power consumption or load levels, providing data support for power management. For example, the classification task may involve classifying the input power data into "normal power consumption" and "abnormal power consumption" categories, or classifying the data into multiple categories (such as "high energy consumption equipment operation" and "low energy consumption equipment operation") according to the power characteristics of different devices. SVM can also be used to perform regression analysis on the global spatial feature Z to predict future power consumption or load levels. At this time, SVM is configured as support vector regression (SVR), and the goal is to predict continuous values ​​based on the input features. Specifically, the regression tasks include power load prediction and power change trend prediction. Power load prediction means that SVM regression can be used to predict power consumption at a certain point in the future, helping to achieve accurate power management and load regulation. For example, based on historical data and current features, future load demand can be predicted to optimize power distribution. Power change trend prediction means that SVM can predict future power change trends based on past power consumption characteristics, providing reference information for power scheduling. The specific choice of classification or regression depends on the application requirements of the model and the goals of power information collection and management. For example, if the goal is to detect and distinguish power usage states or patterns, a classification task is used; if the goal is to predict future power usage or load levels, a regression task is used.

[0098] The feature vector Z extracted by CNN is input into SVM for classification or regression to obtain the classification or regression result Z of the spatial feature of the power information data CNN-SVM , SVM can optimize the classification hyperplane to ensure that the interval between data points of different categories is maximized to improve the accuracy and robustness of classification; SVM regression will optimize a regression hyperplane or regression boundary to minimize the prediction error within a certain tolerance range and provide accurate numerical predictions.

[0099] Specifically, the goal of SVM is to find an optimal hyperplane that maximizes the interval between samples of different categories. Assume that the input of SVM is the global spatial feature Z, Z∈R p , p is the vector dimension, and the SVM output is the category label or continuous value prediction, that is, the SVM optimization problem is defined as:

[0100]

[0101] Constraints i (wZ i +b)≥1-ξ i ,ξ i ≥0, where i represents the index variable, which is used to represent the number of the i-th sample in the input data set of the SVM, N represents the last sample number in the input data set of the SVM, w is the weight vector, b is the bias, and y is the weight vector. iis the sample label, ξ i It is a slack variable used to deal with nonlinear separable situations. C is a penalty parameter that controls the tolerance for misclassified samples. The value range of the penalty parameter C is set to 1 to 100 and is adjusted through the validation set.

[0102] In order to improve the nonlinear classification ability of SVM, the kernel function K(Z i , Z j ) maps the global spatial feature Z to a high-dimensional space, Z i Represents the feature vector of the i-th data sample of the SVM input data set, Z j Represents the feature vector of the jth data sample in the input data set of the SVM, where i and j can be the same or different. i and Z j Mapping from the original low-dimensional space to a higher-dimensional feature space, in this high-dimensional space, these nonlinearly distributed data points may be linearly separated. SVM can find an optimal linear hyperplane to achieve better classification or regression performance, so that a linearly separable hyperplane can be found in the originally nonlinearly separable data, thereby enhancing the model's ability to process complex data patterns.

[0103] Specifically, the originally nonlinearly separable data refers to the complex power consumption patterns, nonlinear feature interactions, and changes in equipment operating status in the power information data. These patterns may come from the multidimensional characteristics and complex time dependencies of power use, that is, those complex data patterns or feature distributions in the power information data that cannot be effectively distinguished by simple linear boundaries. The originally nonlinearly separable data is difficult to be separated by linear hyperplanes in the original feature space, so it is necessary to use kernel functions to map it to a high-dimensional space to improve the classification and regression capabilities of SVM, so as to better cope with complex power information data.

[0104] Furthermore, the data that was originally nonlinearly separable includes nonlinear power consumption patterns, multi-dimensional feature interactions, and changes in equipment operating status. Nonlinear power consumption patterns refer to the complex power consumption patterns that may exist in power usage data. For example, power consumption shows nonlinear changes under specific conditions, such as different time periods, weather changes, or equipment load changes. These changes make it impossible for simple linear classification methods to separate different power consumption states or patterns with a linear hyperplane in the feature space. For example, the power load curve usually shows nonlinear fluctuations, peak power consumption and trough power consumption may appear alternately, and its changes are affected by many external factors, such as the difference in power consumption between weekdays and weekends, and mutations caused by equipment turning on or off; multi-dimensional feature interaction means that power information data is usually composed of multiple features, such as voltage, power, frequency, etc., and there may be complex nonlinear relationships between these features. For example, the relationship between voltage and power may not show simple linear changes under different load conditions, but show nonlinear patterns. This feature interactivity makes it impossible for the data to be separated by linear hyperplanes in the original space. Changes in the operating status of equipment refer to the fact that the power characteristics of different power equipment may show highly nonlinear changes when they are in operation. For example, when multiple devices are running at the same time, power consumption may produce a complex superposition effect, making the power consumption status and characteristics show a nonlinear relationship. In this case, the data distribution used to identify or classify the operating status of the equipment may show a complex nonlinear distribution.

[0105] This embodiment adopts the radial basis function (RBF), and its formula is as follows:

[0106]

[0107] Specifically, σ is the width parameter of the kernel function, and cross-validation is used to select the best value of σ, such as 0.1, 1, and 10. The Gaussian kernel can map the complex annular distribution into a linear distribution in a high-dimensional space, so that the SVM can find a suitable hyperplane for segmentation or prediction. Through this mapping, the SVM acquires the ability to process complex patterns and nonlinear relationships, and can more accurately capture the changing laws in the power information data.

[0108] In another embodiment of the present invention, a polynomial kernel is used to effectively transform the nonlinear relationship of originally nonlinearly separable data into a linearly separable relationship.

[0109] The electric energy information collection and management method based on artificial intelligence algorithm provided in this embodiment extracts the spatial features of electric energy information data through CNN, uses convolution kernel to scan the local area of ​​the data, finds the spatial pattern in the data, and then passes the extracted global spatial feature Z to SVM for classification or regression tasks. This combination can make full use of the feature extraction capability of CNN and the generalization advantage of SVM, enhances the model's ability to process spatial features, and achieves more accurate modeling and processing of complex patterns of electric energy data. In order to improve the overall performance of the model, the hyperparameters such as the penalty parameter C and the kernel parameter σ of SVM are cross-validated and tuned during the training process to ensure that the model achieves the best results on the training set and the validation set, thereby effectively capturing the spatial relationship and pattern of the electric energy information data.

[0110] S80, train time series data based on LSTM-Attention module to obtain time series data feature Z LSTM-Attention , time series data feature Z LSTM-Attention To characterize the time series data in the electric energy information data, the LSTM-Attention module is formed by introducing the attention mechanism into the Long Short-Term Memory (LSTM) network;

[0111] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of the LSTM-Attention module in the electric energy information collection and management method based on artificial intelligence algorithm provided by an embodiment of the present invention. The attention mechanism is introduced into LSTM to construct the LSTM-Attention module. LSTM is a recursive neural network structure that can capture long-term dependencies in time series. LSTM is used to control the flow and update of information.

[0112] The input of the LSTM network is the input sequence X', X = [x1, x2, ..., x T ], T represents the last time step of the input sequence X', x TRepresents the last time series data in the input sequence X', which is the time series data of the electric energy information data, that is, the input sequence X' comes from the time series data. The input sequence X' includes the following data sequences. Specifically, the input sequence X' includes power consumption (Power Consumption), which refers to the amount of electric energy consumed at each time step, usually in kilowatt-hours (kWh), which is a key feature used to analyze the overall trend of electric energy use; it also includes voltage, which describes the voltage level at each time step and can reflect the voltage stability and fluctuation of the power system; it also includes current, which describes the amount of current at each time step, which is usually associated with power and voltage; it also includes frequency, which records the frequency of the power system at each time step and can be used to monitor system stability; it also includes load data (Load Data), which shows the load level of the system or equipment at each time step, which can help identify high-load and low-load periods. The source of these data provides a basis for the LSTM model, enabling it to effectively collect and manage electric energy information. The input sequence X' can be used to capture the time dependency and trend of energy usage. These data sequences usually include various energy-related features and are arranged in the form of time steps. The LSTM unit outputs a hidden state h at each time step t. t and cell state c t .

[0113] In this embodiment, a single-layer LSTM is used to improve computational efficiency. The LSTM includes an input layer, a hidden layer, an output layer, an activation function, and a loss function. The hidden layer includes one or more LSTM layers, each of which contains multiple LSTM units, also known as LSTM Cells. The internal structure of the LSTM unit includes an input gate, a forget gate, an output gate, and a cell state. These gating mechanisms work together to control the flow, retention, and update of information between time steps, thereby capturing long-term dependencies in the time series. Assuming that the input feature dimension of the LSTM-Attention module is m, the input x of each time step is t ∈R m , x t represents the time series data corresponding to time step t, and the hidden layer dimension is set to 128, that is, h t ∈R 128 , in order to balance computational complexity and model performance, the default tanh function is used as the activation function, combined with the sigmoid function for the gating mechanism.

[0114] The attention mechanism generates a context vector c that focuses on important information by weighted summing the time steps of LSTM outputs. Important information refers to the features in the key time steps that have a significant impact on the power management task. That is, the attention mechanism generates a context vector c that focuses on the key time steps by weighted summing the time steps of LSTM outputs. This information may contain features in time series data that help accurately predict or analyze power usage patterns, such as sudden load changes, peak power consumption periods, power fluctuations when equipment starts or shuts down, etc. Specifically, it may include peak and trough characteristics of power consumption, mutation points or abnormal power consumption behavior, periodic or seasonal patterns, equipment operating status characteristics, and load change trends. These features play a vital role in the prediction accuracy and management decisions of the model, so they are given higher weights to enhance the model's understanding and processing capabilities of complex power data.

[0115] Introducing the Attention mechanism into LSTM to build the LSTM-Attention module includes the following steps:

[0116] S802. Based on the input sequence X', LSTM outputs the hidden state h at each time step t t ;

[0117] Based on the input sequence X', LSTM outputs a hidden state h at each time step t t , the calculation process is as follows:

[0118] h t =LSTM(x t ,h t-1 ) (6)

[0119] t∈{1, 2, 3, …, T}, an attention mechanism is introduced into LSTM. Preferably, a single-head attention mechanism is adopted to keep the computational complexity low.

[0120] S804, calculate the attention weight α for each time step t t ;

[0121] The main structure of the Attention mechanism includes the query vector q and the key vector k t Sum value vector v t Specifically, the query vector q is defined as the final hidden state h of the LSTM T , key vector k t Sum value vector v t For each time step, the hidden state h t , attention weight α t Can be used to measure the relative importance of each time step, the key vector k tIt is a core vector in the attention mechanism, which, together with the query vector and the value vector, helps determine how to allocate attention weights. t The calculation formula is:

[0122]

[0123] Where j represents the index variable, j∈{1, 2, 3, ..., T}, j can be used to traverse all time steps of the entire input sequence X', t∈{1, 2, 3, ..., T}, score(q, k t ) is used to measure the query vector q and the key vector k t In this embodiment, the scoring function is the dot product:

[0124] score(q,k t )=q·k t (8)

[0125] Each time step t has a corresponding key vector k t , key vector k t It is the vector representation used in the attention mechanism to represent the features of each time step t in the input sequence. It performs a dot product operation with the query vector q to calculate the similarity or correlation between the current time step t and other time steps. The key vector k t It can help the attention mechanism model compare and measure the relationship between different time steps. By calculating the similarity between the query vector and the key vector, the attention mechanism model can determine which time steps are more important in the overall input sequence, thereby assigning higher attention weights to these time steps, thereby highlighting the time steps that have an important impact on the output of the LSTM model. Through this mechanism, the LSTM model can more accurately capture the key information in the time series data. The key vector is usually obtained by calculating the hidden state h. t After linear transformation, this transformation can be expressed as: t =W k ·h t, Among them, W k is a trainable weight matrix that transforms the hidden state h t Mapped to key vector k t When calculating the attention weights, a softmax function is used to ensure the normalization of the weights.

[0126] S806, attention weight α obtained by S804 t The value vector v for LSTM t Perform weighted summation to form the context vector c:

[0127]

[0128] The context vector c is combined with the final output h of the LSTM T As the output time series data feature Z of the LSTM-Attention module LSTM-Attention ,The Attention mechanism is introduced after LSTM output to dynamically assign the importance weights of different time steps. ,Introducing the attention mechanism in LSTM significantly enhances the attention to important time steps in time series data, so that the features most relevant to prediction can be more ,accurately extracted. The dimension of the context vector c is set to be consistent with the ,hidden layer dimension, i.e., 128.

[0129] In this embodiment, the Adam optimizer is used, and the initial learning rate of the Adam optimizer is set to 0.001. Dropout regularization is used during training, and the dropout rate is set to 0.2 to prevent overfitting.

[0130] The attention mechanism introduced in this embodiment enables LSTM to dynamically adjust the weight allocation for different time steps, and is no longer restricted by fixed windows or equal weights. This is extremely useful for the importance of time-varying features in power information data, for example, it has significant advantages in capturing changes in day and night cycles or special peak power consumption periods. The Attention mechanism is introduced in the LSTM model, giving the LSTM model the ability to automatically allocate weights according to different time steps in the input sequence to highlight key features that have a greater impact on the final output, enhance the performance of the LSTM model in processing complex power data, capture the time dependency and trend of power use, and improve the ability to capture key features when processing time series data.

[0131] S100, fuse the CNN-SVM module with the LSTM-Attention module to obtain the fusion feature Z combined ;

[0132] The fusion of CNN-SVM module and LSTM-Attention module includes the following steps:

[0133] Step 1: The CNN-SVM module processes structured data, and the LSTM-Attention module processes time series data;

[0134] The CNN-SVM module processes structured data, such as real-time monitoring data of various electric energy equipment. Specifically, the CNN-SVM module is used to process spatial features in electric energy data, especially structured data, such as static electric energy information such as voltage, power and current. The module extracts local spatial features through CNN and then uses SVM for classification or regression tasks.

[0135] The features output by the CNN-SVM module are represented as classification or regression results ZCNN-SVM , Z CNN-SVM ∈R d1 , d1 is the feature dimension, classification or regression result Z CNN-SVM It represents the high-dimensional features extracted by convolutional neural network and obtained by SVM classifier, which captures the spatial characteristics of structured data.

[0136] The LSTM-Attention module processes time series data in power information data, such as historical power consumption data, load fluctuations, etc. The LSTM-Attention module combines the time series modeling capability of LSTM and the feature weighting capability of the attention mechanism, which can capture the long-term dependencies of time series data and highlight the key features that affect the results.

[0137] The feature output of the LSTM-Attention module is represented as the time series data feature Z LSTM-Attention ; Z LSTM-Attention ∈R d2 , d2 is the feature dimension, which represents the time series features extracted by the LSTM network and is weighted by the attention mechanism to highlight the key time step information in the time series data.

[0138] Step 2: Classification or regression result Z CNN-SVM and time series data feature Z LSTM-Attention Splicing according to feature dimensions;

[0139] The classification or regression result Z CNN-SVM and time series data feature Z LSTM-Attention According to the feature dimension, the fusion feature Z is obtained by splicing combined , the splicing process is shown as follows:

[0140] Z combined =[Z CNN-SVM ,Z LSTM-Attention ]

[0141] In the formula, the fusion feature Z combined is the classification or regression result Z CNN-SVM and time series data feature Z LSTM-Attention The concatenated comprehensive feature vector has a dimension of d1+d2 and contains the common information of structured data and time series data.

[0142] In this embodiment, the splicing method is simple column-by-column splicing, that is, vertical splicing, and the size of each feature space is guaranteed to be consistent. The key to this process is to ensure that the outputs of the two modules can be fused into a comprehensive feature, thereby containing both spatial and temporal information, providing richer input features for the subsequent MLP model.

[0143] The CNN-SVM module and the LSTM-Attention module are fused. The fusion process aims to fully combine the respective advantages of CNN, SVM and Attention-based LSTM to better process the temporal and spatial characteristics of power information data and enhance the learning and generalization capabilities of the model.

[0144] S120, using multi-layer perceptron to integrate CNN-SVM module and LSTM-Attention module to form a system model, and multi-layer perceptron based on fusion feature Z combined Perform classification or regression.

[0145] Please refer to Figure 4 , Figure 4 : is a schematic diagram of the integration of the CNN-SVM module and the LSTM-Attention module in the electric energy information collection and management method based on the artificial intelligence algorithm provided by the embodiment of the present invention. MLP is the core of the integrated model and is used to integrate the fusion feature Z from the CNN-SVM module and the LSTM-Attention module. combined , and perform the final prediction task. The structure and training process of MLP involves the following aspects:

[0146] MLP is a feedforward neural network that includes an input layer, multiple hidden layers, and an output layer. The connections between each layer are fully connected. The specific structure design is as follows:

[0147] Specifically, the number of nodes in the input layer is equal to the concatenated fusion feature Z combined In this embodiment, the number of nodes in the input layer is d1+d2, that is, the fusion feature Z combined Dimension.

[0148] MLP usually includes multiple hidden layers, each hidden layer contains several neurons. During design, two hidden layers are set, where the first hidden layer contains 64 neurons and the second hidden layer contains 32 neurons. The neurons in each layer use the ReLU activation function to enhance the nonlinear modeling capability.

[0149] Depending on the task, the design of the output layer will be different. Specifically, for regression tasks, the output layer has only one node, which represents the prediction of the target value, and no activation function is used. For regression tasks, the mean square error (MSE) is selected as the loss function, and the goal is to minimize the square error between the predicted value and the actual value; for classification tasks, the number of nodes in the output layer is equal to the number of categories, and the Softmax activation function is used to convert the output into a probability distribution. For classification tasks, the Softmax activation function is used, and the cross entropy loss function is used, so as to maximize the similarity between the probability of the predicted category and the true category.

[0150] Based on the fusion feature Z combined The MLP is trained by the back-propagation algorithm. Specifically, in each training iteration, the fusion feature Z combined The network is forward propagated, and the predicted result is compared with the true label to calculate the loss value. Then, the gradient of the loss to the network parameters is calculated through the back-propagation algorithm, and the network weights are updated using the Adam optimizer.

[0151] Preferably, during the training process, early stopping is used to avoid overfitting, the performance of the MLP is monitored on the validation set, and training is stopped when the validation error no longer improves.

[0152] S140, performing power information management based on a system model formed by integrating a CNN-SVM module and an LSTM-Attention module based on MLP.

[0153] MLP is used to integrate the CNN-SVM module and the LSTM-Attention module to form a system model. After training, verification and testing, power information management can be performed based on the system model.

[0154] The electric energy information collection and management method based on artificial intelligence algorithm provided in this embodiment processes structured data and time series data respectively through CNN-SVM module and LSTM-Attention module, extracts spatial features and temporal features, and finally splices and fuses them into a comprehensive feature vector and inputs them into the multi-layer perceptron for model integration, so as to improve the overall performance of the electric energy information management model.

[0155] Embodiment 2

[0156] The collected real-time electric energy data is analyzed based on the electric energy information collection and management method based on the artificial intelligence algorithm provided in this embodiment. Specifically, an Intel Core i7 processor, 32 GB memory, NVIDIA GeForce RTX 3080 graphics processor, Windows 10 operating system, Anaconda development environment, Python 3.8 programming language and library, and Conda virtual environment manager are used. For some parameters, see Table 1.

[0157] Table 1:

[0158] Environmental parameters describe processor Intel Core i7-10700K @ 3.80 GHz Graphics Processor NVIDIA GeForce RTX 3080 Memory 32GB operating system Windows 10 Virtual Environment Manager Conda programming language Python 3.8

[0159] The specific steps of the electric energy information collection and management method provided in the embodiment for collecting and analyzing the collected real-time electric energy data include:

[0160] The first step is to collect real-time data on power usage, including power consumption, power usage time, load curve and other information;

[0161] Specifically, the collected real-time electricity data is the original data, and its data source is the electricity usage of four households for a week. Each timestamp is one hour, and the electricity usage of each household is in kilowatt-hours (kWh). The original data includes information such as electricity consumption, electricity usage time, and load curve.

[0162] The second step is to pre-process the collected raw data, including data cleaning, removing outliers, and filling missing values;

[0163] The third step is to perform feature engineering processing to extract feature information related to power management, including time series data, frequency domain data, statistical features and spatial feature data;

[0164] Step 4: Divide the dataset after feature engineering into training set, validation set and test set for subsequent model training, validation and evaluation;

[0165] Step 5: Standardize the divided data set to eliminate the dimensional differences between different features.

[0166] This embodiment selects mean absolute percentage error (MAPE), root mean square error (RMSE), mean absolute error (MAE) and mean square error (MSE) to evaluate model performance, and compares the results of power data analysis using the CNN-SVM-LSTM-Attention model (CA for short) in the power energy information collection and management method provided in this embodiment with the SVM-PSO model (SP for short), Attention-LSTM (AL for short), ANN-PSO (AP for short), SVM-GA (SG for short) and other algorithms. For details, please refer to Figure 5 (a) and Figure 5 (b) Figure 5 (a) is a schematic diagram showing the comparison of the MAPE values ​​of the collected real-time electric energy data analysis results by the existing method and the electric energy information collection and management method provided by this embodiment, Figure 5 (b) is a schematic diagram showing the comparison of the RMSE values ​​of the collected real-time electric energy data analysis results by the existing method and the electric energy information collection and management method provided by this embodiment, Figure 5 (a) and Figure 5 In (b), the horizontal axes are the abbreviations of the above-mentioned different models, and the vertical axes are the MAPE values ​​and RMSE values ​​of the different models for the power data analysis results. The results show that Figure 5(a) indicates that the MAPE values ​​of the electric energy information collection and management method (CA), Attention-LSTM, SVM-PSO, ANN-PSO and SVM-GA in this embodiment are 5.34%, 7.16%, 10.24%, 12.55% and 15.68% respectively. Figure 5 (b) indicates that the RMSE values ​​of the electric energy information collection and management method (CA), Attention-LSTM, SVM-PSO, ANN-PSO and SVM-GA in this embodiment are 10.16 kWh, 12.44 kWh, 15.61 kWh, 18.37 kWh and 22.53 kWh respectively.

[0167] The power consumption is the training data. They need to search the relationship between the data through the search space of variables. The best mode of power signal prediction is obtained from the global optimal solution of the fitness function, and the range of parameters is determined by searching the accuracy value of the parameter relationship mode. Please refer to Figure 6 (a) and Figure 6 (b) Figure 6 (a) is a schematic diagram showing the comparison of the MAE values ​​of the collected real-time electric energy data analysis results by the existing method and the electric energy information collection and management method provided by this embodiment, Figure 6 (b) is a schematic diagram showing the comparison results of the MSE values ​​of the collected real-time electric energy data analysis results by the existing method and the electric energy information collection and management method provided by this embodiment. Figure 6 (a) and Figure 6 In (b), the horizontal axes are the abbreviations of the above-mentioned different models, and the vertical axes are the MAE and MSE values ​​of the power data analysis results of different models. Figure 6 (a) indicates that the MAE values ​​of the electric energy information collection and management method (CA), Attention-LSTM, SVM-PSO, ANN-PSO and SVM-GA in this embodiment are 8.14 kWh, 10.26 kWh, 12.12 kWh, 15.66 kWh and 18.35 kWh respectively; Figure 6 (b) indicates that the MSE values ​​of the electric energy information collection and management method (CA), Attention-LSTM, SVM-PSO, ANN-PSO and SVM-GA in this embodiment are 120.73kWh2, 155.49kWh2, 181.64kWh2, 225.92kWh2, and 265.02kWh2, respectively. The electric energy information collection and management method provided in this embodiment performs best in both MAE and MSE evaluation indicators. It effectively captures the time series characteristics and complex nonlinear relationships in the electric energy consumption data by combining the advantages of multiple models and the Attention mechanism, and significantly improves the prediction accuracy and stability.

[0168] The electric energy information collection and management method provided in this embodiment combines support vector machine with convolutional neural network to enhance the processing ability of spatial features of electric energy data; then, the attention mechanism is introduced in the long short-term memory network, that is, the attention layer is added after the LSTM layer, so that the input of the attention layer is the feature vector output by the LSTM layer, so as to highlight the key features affecting the electric energy information in the output result; then, CNN-SVM and LSTM-Attention are used to extract features of structured data and time series data respectively, and splice and fuse them into a comprehensive feature vector; finally, multilayer perceptron is selected as the integrated model, and model training and optimization are performed; the performance evaluation results show that the method proposed in the present invention effectively improves the processing ability and generalization ability of complex electric energy data while ensuring the stability of the model. The electric energy information collection and management method provided by the present invention further optimizes the model construction method, designs a more robust and flexible algorithm, and improves the reliability and applicability of the model through more extensive and in-depth experimental verification. At the same time, the system integration and scenario application research are strengthened, so that the model can be effectively integrated into the actual electric energy management system, realizing real intelligence and efficiency, and promoting the development of electric energy information collection and management research.

[0169] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A method for collecting and managing electric energy information based on artificial intelligence algorithm, characterized in that: include: S20, collecting electric energy information data, performing data cleaning, removing outliers, filling missing values, and data standardization on the electric energy information data to obtain electric energy standardized data, and performing feature engineering based on the electric energy standardized data to extract time series data, frequency domain data, statistical features, and spatial feature data, wherein the time series data is data that can reflect the dynamic characteristics of electric energy use over time, the frequency domain data is data formed by identifying frequency components and periodic changes based on the time series data, the statistical features include at least one of the mean, variance, maximum value, minimum value, kurtosis, and skewness of the electric energy standardized data, and the spatial feature data is the characteristics of the spatial differences and distribution of electric energy consumption behaviors; S60, CNN-SVM module obtains the classification or regression result Z of the spatial characteristics of the power information data based on the input data matrix X CNN-SVM , the input data matrix X includes the spatial feature data, static power attributes, the statistical features and the frequency domain data, the static power attributes include at least one of device category data, device identification data and user category data, and the CNN-SVM module is formed by combining a CNN model and an SVM model; S80, train time series data based on LSTM-Attention module to obtain time series data feature Z LSTM-Attention , LSTM-Attention module is formed by introducing the attention mechanism into the long short-term memory network (LSTM); S100, fuse the CNN-SVM module with the LSTM-Attention module to obtain the fusion feature Z combined ; S120, using a multilayer perceptron to integrate the CNN-SVM module and the LSTM-Attention module to form a system model, and the multilayer perceptron is based on the fusion feature Z combined Perform classification or regression; S140: Perform power information management based on the system model.

2. The electric energy information collection and management method based on artificial intelligence algorithm according to claim 1 is characterized in that: Perform feature engineering to extract time series data, including: After the electric energy information data is cleaned, outliers are removed, missing values ​​are filled, and data is standardized, time series data is extracted. Methods for extracting time series data include sliding window statistics and time period feature methods. Sliding window statistics include defining a sliding window and calculating statistical features within each window. The time period feature method includes extracting periodic features from time series data.

3. The electric energy information collection and management method based on artificial intelligence algorithm according to claim 1 is characterized in that: Feature engineering is performed to extract frequency domain data, including, based on time series data, extracting frequency domain data according to Fourier transform method and / or power spectral density.

4. The electric energy information collection and management method based on artificial intelligence algorithm according to claim 1 is characterized in that: Feature engineering is performed to extract spatial feature data, including direct acquisition and feature engineering extraction. Direct acquisition refers to directly acquiring from equipment and regional information in the power system. Feature engineering to extract spatial feature data refers to extracting spatial feature data from electric energy information data through feature engineering, including regional aggregation features, neighborhood features and spatial statistical features. Among them, regional aggregation features refer to aggregating electric energy information data of multiple meters or equipment in a certain area to generate the total electricity consumption or average electricity consumption of the area. Neighborhood features refer to calculating the difference in electricity consumption between adjacent areas or adjacent equipment. Spatial statistical features refer to calculating some spatially related statistical features at different areas or equipment locations.

5. The electric energy information collection and management method based on artificial intelligence algorithm according to claim 1 is characterized in that: The CNN-SVM module obtains the classification or regression result Z of the spatial characteristics of the power information data based on the input data matrix X. CNN-SVM ,include: S602, the CNN model extracts global spatial features Z based on the input data matrix X. The CNN model includes an input layer, two convolutional layers, two pooling layers and a fully connected layer. The two pooling layers are respectively located after the two convolutional layers. The last pooling layer is connected to the fully connected layer. The input data matrix X is expressed as: X∈R n×m , where m represents the number of different features in the input data matrix X, and n represents the total number of preset collection cycles counted within a preset period, and the preset collection cycle represents a preset time interval for collecting electric energy information data; S606, CNN and SVM are connected through a fully connected layer to form a CNN-SVM module, and the global spatial feature Z extracted by CNN is input into SVM to obtain the classification or regression result Z CNN-SVM .

6. The electric energy information collection and management method based on artificial intelligence algorithm according to claim 5 is characterized in that: The global spatial feature Z extracted by CNN is input into SVM to obtain the classification or regression result Z CNN-SVM ,include: Z∈R p , p is the vector dimension, and the SVM optimization problem is defined as: Constraints i (wZ i +b)≥1-ξ i ,ξ i ≥0, where i represents the index variable, which is used to represent the number of samples in the data set, N represents the last sample number in the input data set of the SVM, w is the weight vector, b is the bias, and y is the weight vector. i is the sample label, ξ i is a slack variable used to handle nonlinear separability. C is a penalty parameter that controls the tolerance for misclassified samples. The value range of the penalty parameter C is set to 1 to 100. Using the kernel function K(Z i , Z j ) maps the input features to a high-dimensional space so that a linearly separable hyperplane can be found in the originally nonlinearly separable data. The originally nonlinearly separable data are data patterns or feature distributions that exist in the electric energy information data and cannot be effectively distinguished by linear boundaries.

7. The electric energy information collection and management method based on artificial intelligence algorithm according to claim 6 is characterized in that: Using the kernel function K(Z i , Z j ) maps the input features into a high-dimensional space, including: Calculated using radial basis function kernel: Among them, σ is the width parameter of the kernel function.

8. The electric energy information collection and management method based on artificial intelligence algorithm according to claim 1 is characterized in that: Based on the LSTM-Attention module, we train the time series data to obtain the time series data feature Z LSTM-Attention ,include: S802. Based on the input sequence X', LSTM outputs the hidden state h at each time step t t, , where t∈{1, 2, 3, …, T}, T represents the last time step of the input sequence X'; S804, calculate the attention weight α for each time step t t ; S806, attention weight α obtained by S804 t The value vector v for LSTM t Perform weighted summation to form a context vector c, which is combined with the final output h of LSTM T As time series data feature Z LSTM-Attention .

9. The electric energy information collection and management method based on artificial intelligence algorithm according to claim 8 is characterized in that: S802. Based on the input sequence X', LSTM outputs the hidden state h at each time step t t ,include: Based on the input sequence X', LSTM outputs a hidden state h at each time step t t , the calculation process is as follows: h t =LSTM(x t ,h t-1 ) (6) Where t∈{1, 2, 3, …, T}.

10. The method for collecting and managing electric energy information based on artificial intelligence algorithm according to claim 8, characterized in that: Attention weight α t The calculation formula is: Among them, j∈{1, 2, 3, ..., T}, t∈{1, 2, 3, ..., T}, j can be used to traverse all time steps of the entire input sequence X', score(q, k t ) is a scoring function, which is a dot product.

Citation Information

Cited By

  • Intelligent target detection system based on multi-sensor data fusion

    CN120628304A

  • An intelligent target detection system based on multi-sensor data fusion

    CN120628304B

  • A static current detection method and system suitable for an electric energy meter

    CN122632175A

  • Apparatus and method for machine-learning model optimization for data attributes

    US20260148059A1