Fusion method based on power distribution transformer load time sequence data and meteorological time sequence data

By acquiring and preprocessing temperature and load data, a standardized data set is generated, which solves the problem of low load prediction accuracy and improves prediction accuracy and data quality.

CN119106390APending Publication Date: 2024-12-10SOUTHERN POWER GRID DIGITAL GRID RESEARCH INSTITUTE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411009626.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

In the prior art, the accuracy of load prediction is low, and is affected by complex timing characteristics such as temperature, precipitation, wind speed and light intensity, resulting in increased prediction difficulty.

Method used

By obtaining target temperature data and target load data, pre-processing and fusion processing are performed, standardized temperature data and target timing data set information are generated, ensuring the consistency of time resolution of meteorological data and transformer data, and reducing the adverse effects of timing characteristics on load prediction.

Benefits of technology

It improves the accuracy of load prediction, avoids low data quality caused by noise and missing values, realizes the effective fusion of meteorological data and transformer data, and enhances the reliability of prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119106390A_ABST
    Figure CN119106390A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of data processing, and provides a power distribution transformer load time sequence data and meteorological time sequence data-based fusion method, which comprises the following steps of: firstly obtaining target air temperature data and target load data, then preprocessing the target air temperature data to generate normalized air temperature data, and finally obtaining the normalized air temperature data; and finally, performing fusion processing on the target load data and the standardized air temperature data to generate target time sequence data set information. According to the method, the time resolution of the meteorological data and the time resolution of the transformer data can be successfully kept consistent, the adverse effect on the power load prediction accuracy caused by the time sequence characteristics is effectively reduced, and the power load prediction accuracy is remarkably improved; the method has the advantages that the method is high in robustness and adaptability, high-efficiency performance can be kept in different data environments and application scenes, and intelligentization of the power industry and progress of data-driven decision making are further promoted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data processing, and in particular to a method for fusing time series data of power distribution and transformation loads with time series data of meteorological data. Background Art

[0002] At present, the power system based on artificial intelligence technology has initially acquired the ability to forecast short-term loads, gradually replacing traditional manual forecasting methods and becoming the main forecasting tool. However, since the accuracy of load forecasting is still affected by a variety of time series characteristics, such as temperature, precipitation, wind speed and light intensity, these complex variables increase the difficulty of forecasting, and there is a problem of low load forecasting accuracy, which needs further improvement. Summary of the invention

[0003] Based on this, an embodiment of the present application provides a method for fusing power distribution transformer load time series data with meteorological time series data to solve the problem of low load forecasting accuracy in the prior art.

[0004] In a first aspect, an embodiment of the present application provides a method for fusing time series data of power distribution and transformation loads with time series data of meteorological data, the method comprising:

[0005] Obtain target temperature data and target load data;

[0006] Preprocessing the target temperature data to generate normalized temperature data;

[0007] The target load data and the normalized temperature data are fused to generate target time series data set information.

[0008] Compared with the prior art, the beneficial effect is as follows: the embodiment of the present application provides a fusion method based on power distribution transformer load time series data and meteorological time series data, and the terminal device can first obtain the target temperature data and the target load data, and then pre-process the target temperature data to quickly generate normalized temperature data, and finally fuse the target load data and the normalized temperature data to effectively generate the target time series data set information, thereby avoiding the situation where the data quality is low due to direct fusion in the presence of noise and missing values, making the time resolution of meteorological data and transformer data consistent, reducing the adverse effects of time series characteristics on load prediction accuracy, effectively improving the load prediction accuracy, and to a certain extent solving the current problem of low load prediction accuracy.

[0009] In a second aspect, an embodiment of the present application provides a fusion system based on power distribution and transformation load time series data and meteorological time series data, the system comprising:

[0010] Data acquisition module: used to obtain target temperature data and target load data;

[0011] Normalized temperature data generation module: used to pre-process the target temperature data to generate normalized temperature data;

[0012] Target time series data set information generation module: used to fuse the target load data and the normalized temperature data to generate target time series data set information.

[0013] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of the first aspect described above when executing the computer program.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method of the first aspect described above are implemented.

[0015] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art.

[0017] Figure 1 It is a flowchart of a fusion method provided in an embodiment of the present application;

[0018] Figure 2 It is a schematic diagram of the process before step S100 in the fusion method provided in one embodiment of the present application;

[0019] Figure 3 is a flow chart of step S100 in the fusion method provided in one embodiment of the present application;

[0020] Figure 4 is a flowchart of step S200 in the fusion method provided in an embodiment of the present application;

[0021] Figure 5 is a flowchart of step S300 in the fusion method provided in an embodiment of the present application;

[0022] Figure 6 is a schematic diagram of target time series data set information provided by an embodiment of the present application, wherein: Figure 6 (a) in the figure is the target time series data set information before fusion. Figure 6 (b) is the information of the target time series dataset after fusion

[0023] Figure 7 It is a module block diagram of a fusion method provided in an embodiment of the present application;

[0024] Figure 8 It is a schematic diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0025] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0026] In the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0027] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0028] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0029] See also Figure 1 , Figure 1It is a flow chart of the fusion method based on the time series data of the load of the power distribution transformer and the meteorological time series data provided in the embodiment of the present application. In this embodiment, the execution subject of the fusion method is a terminal device. It is understandable that the types of terminal devices include but are not limited to mobile phones, tablet computers, laptop computers, ultra-mobile personal computers (Ultra-Mobile Personal Computer, UMPC), netbooks, personal digital assistants (Personal Digital Assistant, PDA), etc. The embodiment of the present application does not impose any restrictions on the specific types of terminal devices.

[0030] See also Figure 1 The fusion method provided in the embodiment of the present application includes but is not limited to the following steps:

[0031] In S100 , target air temperature data is acquired, and target load data is acquired.

[0032] Specifically, the terminal device can first obtain the target temperature data, and at the same time obtain the target load data, wherein the target temperature data is used to describe the meteorological parameter data recorded in chronological order, and the target temperature data can be named as meteorological time series data; exemplarily, the target temperature data can be meteorological parameter data such as temperature, humidity, wind speed and precipitation, and the target temperature data can be recorded as a time series data point at an hourly or longer time interval. The target load data is used to describe the real-time data recorded by the distribution transformer in the power system at a fixed time interval, and the target load data can be named as distribution transformer load time series data; exemplarily, the target load data can be real-time data such as current, voltage and operating load recorded every 15 minutes.

[0033] In some possible implementations, to meet the needs of the business layer, see Figure 2 Before step S100, the method further includes but is not limited to the following steps:

[0034] In S101, real-time generated data is obtained based on a streaming computing framework.

[0035] Specifically, terminal devices can obtain real-time generated data in real time based on the streaming computing framework.

[0036] Without loss of generality, in a stream computing scenario based on a designated data center and big data platform business, the front end is more likely to be an OLTP-type database, which outputs data logs with two different types of operations, "delete" and "modify", to the downstream through the Change Data Capture (CDC) component. However, these logs do not have a very good technology stack to handle them under the traditional architecture. For the downstream, different data storages will be derived to store and respond to these different data requests according to different business needs. Therefore, whether it is from the data link layer or to the entire downstream load, there is currently a lack of mature solutions to deal with it. Therefore, the technical solution that combines the distributed database with the stream computing technology architecture stack can meet the needs of the business layer.

[0037] For example, the terminal device can merge the collected data into the Kafka message queue through the CDC component, and then process it through Flink according to the hierarchical structure of the real-time data warehouse. During the data processing, the dimension table is obtained from the distributed database and associated with the streaming data. Finally, the final result is stored in the distributed database according to the subject domain to provide it to the upper-level application for query.

[0038] Without loss of generality, stream computing represents a data processing mode for real-time processing of continuous streaming data. It is an asynchronous, one-by-one way of processing data, which can be processed immediately when the data arrives without waiting for all the data to arrive. In stream computing, data arrives continuously in the form of streams in a certain time order, and is usually processed in units of events. Data can come from various sources, such as sensors, logs, and message queues. Stream computing can process and analyze data in real time and with low latency, so as to obtain valuable information in a timely manner and respond accordingly. Therefore, stream computing has the characteristics of real-time, high throughput and low latency, and is suitable for scenarios that require rapid response and analysis of continuously generated data. At the same time, in the stream computing framework, writing data to a distributed database can be implemented using the database API or adapter. For example, the terminal device can use Kafka Connect to stream data into Apache Cassa data: In the stream computing framework, the terminal device can write data to a distributed database, and the processing process can be implemented using the database API or adapter. Exemplarily, the terminal device can use Kafka Connect to write data streams into a distributed database such as Apache Cassandra, Apache Hbase, ndra, or Apache HBase.

[0039] In S102, the real-time generated data is stored in a preset distributed database.

[0040] Specifically, after the terminal device acquires the real-time generated data, the terminal device may store the real-time generated data in a preset distributed database.

[0041] Accordingly, the above step S100 includes but is not limited to the following steps:

[0042] In S110, target temperature data and target load data are obtained based on a distributed database.

[0043] Specifically, the terminal device can obtain target temperature data in the distributed database based on the distributed database, and simultaneously obtain target load data in the distributed database.

[0044] In some possible implementations, in order to effectively obtain target temperature data and target load data, please refer to Figure 3 Step S100 includes but is not limited to the following steps:

[0045] In S110, target load data is obtained, and a temperature actual column data set is obtained.

[0046] Specifically, the terminal device may first obtain the target load data, and simultaneously obtain the temperature actual column data set, wherein the temperature actual column data set includes a plurality of characteristic data to be evaluated, and the characteristic data to be evaluated is used to describe the temperature characteristic data to be evaluated.

[0047] In S120, evaluation index score information corresponding to each feature data to be evaluated is generated according to the temperature actual column data set and a preset feature verification algorithm.

[0048] Specifically, after the terminal device obtains the temperature data set, the terminal device can use a preset feature verification algorithm to generate evaluation index score information corresponding to each feature data to be evaluated according to the temperature data set. In a possible implementation, the feature verification algorithm includes a chi-square test algorithm or an F-value test algorithm.

[0049] In S130, the score information of each evaluation index is sorted to generate index score sequence information.

[0050] Specifically, after the terminal device generates multiple evaluation index score information, the terminal device can sort each evaluation index score information to generate index score sequence information, wherein the index score sequence information is used to describe multiple evaluation index score information arranged in order from high to low.

[0051] In S140, based on the indicator score sequence information, a specified number of evaluation indicator score information is selected in sequence as the temperature optimization data set.

[0052] Specifically, after the terminal device generates the indicator score sequence information, the terminal device can select a specified number of evaluation indicator score information as the temperature preferred data set in order from high to low based on the indicator score sequence information, where the specific number of selections can be five.

[0053] In S150, the preferred temperature data set is determined as the target temperature data.

[0054] Specifically, after the terminal device determines the preferred temperature data set, the terminal device may determine the entire preferred temperature data set as the target temperature data.

[0055] In one possible implementation, the terminal device may first perform a correlation analysis, that is, first analyze the correlation between the features, and select features with higher correlation for training, and then perform a variance analysis, that is, analyze the variance of each feature, and select features with larger variance for training, and then perform a principal component analysis, that is, use the PCA method to reduce the dimension, retain the main features, and reduce the number of features, and then perform a feature importance analysis, that is, use methods such as random forests to analyze the importance of each feature, and select features with higher importance for training.

[0056] In a possible implementation, the terminal device may use the following code to implement feature selection:

[0057] import numpy as np

[0058] import pandas as pd

[0059] from sklearn.datasets import load_bos ton

[0060] from sklearn.feature_select ion import electKBest,f_regress ionfromsklearn.model_select ion import train_test_spl it

[0061] from sklearn.l inear_model import LinearRegress ion

[0062] boston=load_boston()

[0063] df=pd.DataFrame(boston.data,columns=boston.feature_names)

[0064] df['target'] = boss ton.target

[0065] X_train,

[0066] k=5

[0067] selector=SelectKBest(f_regression,k=k)

[0068] selector.fi t(X_train,y_train)

[0069] selected_features=X_tra in.columns[selector.get_support()]

[0070] print("Selected features:",selected_features)

[0071] lr=LinearRegression()

[0072] lr.fi t(X_train[selected_features],y_train)

[0073] test_score=lr.score(X_test[selected_features],y_test)

[0074] print("Test score:",test_score);

[0075] This code can be used to predict the temperature in a data set containing multiple features (such as temperature, humidity, and atmospheric pressure). It also retains the features most relevant to the temperature and removes useless features to improve the accuracy of the temperature resolution.

[0076] Without loss of generality, the terminal device can use SelectKBest to select the top k features most relevant to the target variable, such as the top 5 features, and then the terminal device can use LinearRegression to train a linear regression model and evaluate the performance of the model on the test set; it should be noted that the feature selection process can be performed before any model is established to reduce the size of the feature space, and the feature selection process can also be performed after the model is established to improve the interpretability or performance of the model. Among them, SelectKBest is a feature selection method in sklearn, which converts the data set into a new data set by selecting the k best features, thereby achieving the purpose of dimensionality reduction. During the feature selection process, the terminal device can use various statistical methods to evaluate the correlation between the features and the target variable, such as the chi-square test and the F-value test.

[0077] In a possible implementation, the terminal device may use the following code to implement the SelectKBest workflow:

[0078] from sklearn.feature_select ion import SelectKBest

[0079] from sklearn.feature_select ion import chi2

[0080] from sklearn.datasets import load_iris

[0081] iris = load_iris()

[0082] X,y=iris.data,iris.target

[0083] selector=SelectKBest(score_func=chi2,k=2)

[0084] X_new=selector.fit_transform(X,y);

[0085] Through this code, the terminal device can introduce the SelectKBest class and the corresponding evaluation index method, such as the chi-square test chi2 or the F-value test f_class if, and then instantiate a SelectKBest object, and use the .fit() method to fit the data set including the features and the target variable to the object. Finally, the terminal device can use the .transform() method to convert the data set into a new data set, so that only the selected k best features are retained. Exemplarily, the terminal device uses the chi2 chi-square test method to evaluate the four features in the iris data set through the above code, and then selects the two features with the highest scores, and converts the data set into a new data set containing only these two features.

[0086] In S200, the target temperature data is preprocessed to generate normalized temperature data.

[0087] Specifically, the terminal device can preprocess the target temperature data to generate normalized temperature data, wherein the normalized temperature data is used to describe the target temperature data after data normalization.

[0088] In some possible implementations, to generate normalized temperature data, see Figure 4 Step S200 includes but is not limited to the following steps:

[0089] In S210, Z-score normalization processing is performed on the target temperature data to generate first pre-processed temperature data.

[0090] Specifically, the terminal device can perform Z-score normalization processing on the target temperature data to generate first pre-processed temperature data, wherein the first pre-processed temperature data is used to describe the target temperature data after the Z-score normalization processing.

[0091] For example, when the terminal device needs to process two features, and the value of one feature is between 0 and 1, and the value of the other feature is between 0 and 1000, if the features are not scaled, the impact of the other feature on the model may be greater than that of the one feature. Therefore, the terminal device can use the following code to implement feature scaling of temperature data:

[0092] import pandas as pd

[0093] from sklearn.preprocessing import StandardScaler

[0094] df = pd.read_csv('data.csv')

[0095] scale_columns=['feature1','feature2']

[0096] scaler = StandardScaler()

[0097] df[scale_columns]=scaler.fit_transform(df[scale_columns])

[0098] scaler = Normalizer()

[0099] X_scaled=scaler.fi t_transform(X);

[0100] With this code, the terminal device can use Sciki t-learn to perform Z-score normalization on the target temperature data.

[0101] In S220, feature conversion processing is performed on the first preprocessed temperature data to generate second preprocessed temperature data.

[0102] Specifically, the terminal device can perform feature conversion processing on the first preprocessed temperature data to generate second preprocessed temperature data, wherein the second preprocessed temperature data is used to describe the first preprocessed temperature data represented in the form of a bag-of-words vector.

[0103] Without loss of generality, when the terminal device processes data, processing and converting the original features can help extract more representative features. Optional feature conversion methods include bag-of-words representation for text data, discretization of numerical data, and sliding window representation for time series data.

[0104] Exemplarily, the terminal device may use the following code to implement the specific feature conversion process:

[0105] texts=['I love playing basketball l','Playing football l is fun','Ihate exams']

[0106] from sklearn.feature_extract ion.text import CountVector izer

[0107] vectorizer=CountVectorizer()

[0108] X=vectorizer.fi t_transform(texts)

[0109] array([[1,0,0,1,1,0,1,0],

[0110] [0,1,1,0,1,1,0,0],

[0111] [1,0,0,0,0,0,0,1]],dtype=int64);

[0112] Among them, array represents the result after conversion. Each row in the result after conversion represents a bag-of-words vector of a text. Each dimension in the vector represents a word, and the value of the vector represents the number of times the word appears in the text. It should be noted that the terminal device can use the CountVectorizer class to convert these texts into bag-of-words vectors.

[0113] In a possible implementation, the terminal device may also use a discretized feature conversion method, that is, to divide the numerical feature into a plurality of discrete intervals. The terminal device may use the following code to implement another specific feature conversion process:

[0114] import pandas as pd

[0115] from sklearn.preprocessing import KBinsDiscretizer

[0116] df = pd.read_csv('data.csv')

[0117] discretize_columns=['column1','column2']

[0118] discretizer=KBinsDiscretizer(n_bins=5,encode='ordinal', strategy='uniform')

[0119] df[discretize_columns]=discretizer.fit_transform(df[discretize_columns]);

[0120] Through this code, the terminal device can discretize column1 and column2 in the data set to divide the data in each column into 5 intervals of equal width, and save the discretized results in the original data set.

[0121] In a possible implementation, the terminal device may also use time series data processing as a feature conversion method, that is, extracting features from time series data through sliding windows or differences, etc. The specific processing method may be selected and adjusted according to the specific situation.

[0122] In S230, the second pre-processed temperature data is format converted to generate normalized temperature data.

[0123] Specifically, after the terminal device generates the second preprocessed temperature data, the terminal device can perform format conversion processing on the second preprocessed temperature data to generate normalized temperature data, wherein the normalized temperature data is used to describe the second preprocessed temperature data after the format conversion processing.

[0124] In a possible implementation, the terminal device may use the following code to implement the format conversion process:

[0125] import pandas as pd

[0126] data=pd.read_csv('data.csv')

[0127] data=data.rename(columns={'old_column_name':'new_column_name'})

[0128] data['column_name']=data['column_name'].astype('float');

[0129] Through this code, the terminal device can rename the column named "old_column_name" to "new_column_name" and convert the data type of the column to a numeric type. The data type conversion can be implemented through the as type method in the pandas library. It should be noted that the format conversion can be processed according to the actual situation of the data set.

[0130] In S300, the target load data and the normalized temperature data are fused to generate target time series data set information.

[0131] Specifically, the terminal device can fuse the target load data and the normalized temperature data to effectively generate target time series data set information, wherein the target time series data set information is used to describe the target load data and normalized temperature data after fusion processing.

[0132] In some possible implementations, to generate target time series dataset information, see Figure 5 Step S300 includes but is not limited to the following steps:

[0133] In S310, based on the normalized temperature data, the target load data is renamed to generate the renamed load data.

[0134] Specifically, the terminal device can rename the target load data based on the normalized temperature data and quickly generate the renamed load data.

[0135] In S320, based on the target column data, the renamed load data and the normalized temperature data are fused to generate target time series data set information.

[0136] Specifically, after the terminal device generates the renamed load data, the terminal device can fuse the renamed load data and the normalized temperature data based on the target column data to efficiently generate the target time series data set information, wherein the target column data is used to describe the common columns between the target load data and the normalized temperature data.

[0137] In a possible implementation, the terminal device may use the following code to implement the fusion processing:

[0138] data1=pd.read_csv('data1.csv')

[0139] data2=pd.read_excel('data2.xlsx')

[0140] data2=data2.rename(columns={'old_column_name':'new_column_na me'})

[0141] merged_data=pd.merge(data1,data2,on='key_column');

[0142] Through this code, the terminal device can ensure that they have the same column name and number of columns, and then merge data sets of different formats; it should be noted that if the column names of the two data sets are different, the terminal device can use the rename method in the pandas library to rename them to the same column name; if the number of columns of the two data sets is different, the terminal device can use the merge method in the pandas library to merge them according to the same key.

[0143] In a possible implementation, after processing missing values ​​and outliers, the terminal device can not only merge the data, but also split the data to meet more different needs. For example, the terminal device can use the following code to implement data merging and splitting:

[0144] import pandas as pd

[0145] df1=pd.DataFrame({'A':[1,2,3],'B':[4,5,6]})

[0146] df2=pd.DataFrame({'C':[7,8,9],'D':[10,11,12]})

[0147] df_combined=pd.concat([df1,df2],axis=1)

[0148] from sklearn.model_select ion import train_test_spl it

[0149] X_train,

[0150] Through this code, the terminal device can use the concat() function of the Pandas library to merge multiple DataFrames by columns or rows, and can use the train_test_spl it() function of the Sciki t-learn library to split the data into training and test sets, for example, splitting the data set into training and test sets in a 7:3 ratio; further, the terminal device can split the feature X and label y into training and test sets in a 7:3 ratio, and assign them to the X_train, X_test, y_train and y_test variables respectively, where X and y represent the feature and label respectively, test_size represents the size of the test set, and random_state represents a random seed to ensure that the result of each split is the same.

[0151] Without loss of generality, when the terminal device needs to perform cross-validation, the terminal device can use functions such as KFold or StratifiedKFold, through which the data set can be split into multiple training sets and test sets for cross-validation.

[0152] Exemplarily, the terminal device may implement cross-validation using the following code:

[0153] from sklearn.model_select ion import KFold

[0154] kf=KFold(n_spli ts=5, shuffle=True, random_state=42)

[0155] for train_index,test_index in kf.spl it(X):

[0156] X_train,X_test=X[train_index],X[test_index]

[0157] y_train,y_test=y[train_index],y[test_index];

[0158] Through this code, the terminal device can split the data set into 5 training sets and test sets for 5 cross-validations; in each iteration, the terminal device can use train_index and test_index to obtain the indexes of the current training set and test set respectively, and then retrieve the corresponding data from X and y according to the index for model training and evaluation.

[0159] It should be noted that cross-validation is a machine learning model evaluation method used to evaluate the generalization performance of the model. In cross-validation, the original data set is divided into two parts: a training set and a test set. The model is trained on the training set and then tested on the test set to obtain the performance evaluation index of the model. In order to reduce the randomness of the model performance evaluation, the original data set is usually divided into multiple subsets, one of which is used as the test set each time, and the remaining subsets are used as the training set. The test is repeated multiple times and the average value is taken as the final evaluation index.

[0160] Exemplarily, one of the optional cross-validation methods is K-Fold cross-validation. In K-Fold cross-validation, the terminal device can divide the original data set into K subsets, use one of the subsets as the test set each time, and use the remaining K-1 subsets as the training set for model training and testing. And repeat K times, each time select a different test set, and finally take the average of the K test results as the final evaluation indicator.

[0161] In a possible implementation, the terminal device can use the following code to implement K-Fold cross validation:

[0162] from sklearn.model_select ion import KFold

[0163] from sklearn.l inear_model import LinearRegress ion

[0164] from sklearn.datasets import load_boston

[0165] boston=load_boston()

[0166] model=LinearRegress ion()

[0167] kfold=KFold(n_spl its=5,shuffle=True,random_state=42)

[0168] scores=[]for train_idx,test_idx in kfold.spl it(boston.data,boston.target):

[0169] X_train,X_test=boston.data[train_idx],boston.data[test_idx]

[0170] y_train,y_test=boston.target[train_idx],boston.target[test_idx]

[0171] model.fit(X_train,y_train)

[0172] score=model.score(X_test,y_test)

[0173] scores.append(score)

[0174] print("Averagescore:{:.2f}".format(sum(scores) / len(scores)));

[0175] Through this code, the terminal device can use the scikit-learn library to perform K-Fold cross validation, loop through the training set and test set generated by the K-Fold cross validator, train the linear regression model and calculate the R2 score for each test, and finally output the average score.

[0176] For example, see Figure 6 (a) and Figure 6 In (b), the embodiment of the present application can achieve a high degree of fusion processing of the target load data and the normalized temperature data, and generate target time series data set information. The target time series data set information can better provide more comprehensive feature data for transformer heavy overload prediction, and can greatly improve the accuracy of heavy overload prediction results.

[0177] The implementation principle of the method for fusing power distribution transformer load time series data with meteorological time series data in the embodiment of the present application is as follows: the terminal device can first obtain the target temperature data and the target load data, and then pre-process the target temperature data to quickly generate normalized temperature data, and finally fuse the target load data and the normalized temperature data to effectively generate target time series data set information, thereby avoiding the situation in which low data quality is caused by direct fusion in the presence of noise and missing values, achieving consistency in the time resolution of meteorological data and transformer data, reducing the adverse effects of time series characteristics on load prediction accuracy, and effectively improving load prediction accuracy.

[0178] It should be noted that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0179] The embodiment of the present application also provides a fusion system based on power distribution and transformation load time series data and meteorological time series data. For ease of description, only the parts related to the present application are shown, such as Figure 7 As shown, the system 70 includes:

[0180] Data acquisition module 71: used to acquire target temperature data and target load data;

[0181] Normalized temperature data generating module 72: used for preprocessing target temperature data to generate normalized temperature data;

[0182] The target time series data set information generation module 73 is used to fuse the target load data and the normalized temperature data to generate the target time series data set information.

[0183] Optionally, the data acquisition module 71 includes:

[0184] The temperature actual column data set acquisition submodule is used to acquire the target load data and the temperature actual column data set, wherein the temperature actual column data set includes a plurality of characteristic data to be evaluated;

[0185] Evaluation index score information generation submodule: used to generate evaluation index score information corresponding to each feature data to be evaluated according to the temperature actual column data set and the preset feature test algorithm, wherein the feature test algorithm includes a chi-square test algorithm or an F value test algorithm;

[0186] The indicator score sequence information generation submodule is used to sort the evaluation indicator score information and generate the indicator score sequence information, wherein the indicator score sequence information is used to describe a plurality of evaluation indicator score information arranged in order from high to low according to the evaluation indicator score information;

[0187] Temperature optimal data set selection submodule: used to select a specified number of evaluation index score information as the temperature optimal data set based on the index score sequence information;

[0188] Target temperature data determination submodule: used to determine the temperature preferred data set as the target temperature data.

[0189] Optionally, the above-mentioned normalized temperature data generating module 72 includes:

[0190] Standardization processing submodule: used to perform Z-score standardization processing on the target temperature data to generate first pre-processed temperature data;

[0191] A second preprocessed temperature data generating submodule: used to perform feature conversion processing on the first preprocessed temperature data to generate second preprocessed temperature data, wherein the second preprocessed temperature data is used to describe the first preprocessed temperature data represented in the form of a bag-of-words vector;

[0192] Normalized temperature data generation submodule: used to perform format conversion processing on the second preprocessed temperature data to generate normalized temperature data.

[0193] Optionally, the target time series data set information generating module 73 includes:

[0194] Rename load data generation submodule: used to rename the target load data based on the normalized temperature data to generate the renamed load data;

[0195] Target time series data set information generation submodule: used to fuse the renamed load data and the normalized temperature data based on the target column data to generate the target time series data set information, wherein the target column data is used to describe the common columns between the target load data and the normalized temperature data.

[0196] Optionally, the system 70 further includes:

[0197] Real-time data acquisition module: used to acquire real-time data based on the streaming computing framework;

[0198] Real-time data storage module: used to store real-time data into a preset distributed database;

[0199] Accordingly, the data acquisition module 71 includes:

[0200] Target temperature data acquisition submodule: used to obtain target temperature data and target load data based on a distributed database.

[0201] It should be noted that the information interaction, execution process and other contents between the above-mentioned modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0202] The present application also provides a terminal device, such as Figure 8 As shown, the terminal device 80 of this embodiment includes: a processor 81, a memory 82, and a computer program 83 stored in the memory 82 and executable on the processor 81. When the processor 81 executes the computer program 83, the steps in the above-mentioned fusion method embodiment are implemented, for example Figure 1 Steps S100 to S300 shown; or, when the processor 81 executes the computer program 83, the functions of each module in the above device are realized, for example Figure 7 The functions of modules 71 to 73 are shown.

[0203] The terminal device 80 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server, and the terminal device 80 includes but is not limited to a processor 81 and a memory 82. Those skilled in the art will appreciate that Figure 8 It is only an example of the terminal device 80 and does not constitute a limitation of the terminal device 80. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device 80 may also include input and output devices, network access devices, buses, etc.

[0204] Among them, the processor 81 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.; the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0205] The memory 82 may be an internal storage unit of the terminal device 80, such as a hard disk or memory of the terminal device 80, or the memory 82 may be an external storage device of the terminal device 80, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device 80; further, the memory 82 may also include both an internal storage unit and an external storage device of the terminal device 80, and the memory 82 may also store a computer program 83 and other programs and data required by the terminal device 80, and the memory 82 may also be used to temporarily store data that has been output or is to be output.

[0206] One embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of each of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc.; the computer-readable medium may include: any entity or device that can carry computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0207] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, all equivalent changes made according to the methods, principles, and structures of the present application should be included in the protection scope of the present application.

Claims

1. A method for integrating power distribution and transformation load time series data with meteorological time series data, characterized in that: The method comprises: Obtain target temperature data and target load data; Preprocessing the target temperature data to generate normalized temperature data; The target load data and the normalized temperature data are fused to generate target time series data set information.

2. The method according to claim 1, characterized in that The step of obtaining target temperature data and target load data includes: Obtain target load data and obtain a temperature real column data set, wherein the temperature real column data set includes a plurality of characteristic data to be evaluated; Generate evaluation index score information corresponding to each of the characteristic data to be evaluated according to the temperature actual column data set and a preset characteristic verification algorithm, wherein the characteristic verification algorithm includes a chi-square test algorithm or an F-value test algorithm; Sorting each of the evaluation indicator score information to generate indicator score sequence information, wherein the indicator score sequence information is used to describe a plurality of the evaluation indicator score information arranged in order from high to low according to the evaluation indicator score information; Based on the indicator score sequence information, sequentially selecting a specified number of the evaluation indicator score information as the temperature optimization data set; The preferred temperature data set is determined as the target temperature data.

3. The method according to claim 2, characterized in that The preprocessing of the target temperature data to generate normalized temperature data includes: Performing Z-score standardization processing on the target temperature data to generate first preprocessed temperature data; Performing feature conversion processing on the first preprocessed temperature data to generate second preprocessed temperature data, wherein the second preprocessed temperature data is used to describe the first preprocessed temperature data represented in the form of a bag-of-words vector; The second preprocessed temperature data is format converted to generate the normalized temperature data.

4. The method according to claim 3, characterized in that The step of fusing the target load data and the normalized temperature data to generate target time series data set information includes: Based on the normalized temperature data, performing column renaming processing on the target load data to generate renamed load data; Based on the target column data, the renamed load data and the normalized temperature data are fused to generate target time series data set information, wherein the target column data is used to describe the common columns between the target load data and the normalized temperature data.

5. The method according to claim 1, characterized in that Before obtaining the target temperature data and the target load data, the method further includes: Based on the streaming computing framework, real-time data is obtained; Storing the real-time generated data in a preset distributed database; Accordingly, the step of obtaining target air temperature data and target load data includes: Based on the distributed database, target air temperature data and target load data are obtained.

6. A fusion system based on power distribution and transformation load time series data and meteorological time series data, characterized in that: The system comprises: Data acquisition module: used to obtain target temperature data and target load data; Normalized temperature data generation module: used to pre-process the target temperature data to generate normalized temperature data; Target time series data set information generation module: used to fuse the target load data and the normalized temperature data to generate target time series data set information.

7. The system according to claim 6, characterized in that The data acquisition module comprises: The temperature actual column data set acquisition submodule is used to acquire target load data and obtain a temperature actual column data set, wherein the temperature actual column data set includes a plurality of characteristic data to be evaluated; Evaluation index score information generation submodule: used to generate evaluation index score information corresponding to each of the characteristic data to be evaluated according to the temperature actual column data set and a preset characteristic verification algorithm, wherein the characteristic verification algorithm includes a chi-square test algorithm or an F value test algorithm; An indicator score sequence information generating submodule is used to sort each of the evaluation indicator score information to generate indicator score sequence information, wherein the indicator score sequence information is used to describe a plurality of the evaluation indicator score information arranged in order from high to low according to the evaluation indicator score information; The temperature preferred data set selection submodule is used to select a specified number of evaluation index score information in sequence as the temperature preferred data set based on the index score sequence information; Target air temperature data determination submodule: used to determine the preferred air temperature data set as the target air temperature data.

8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Power load prediction method and device based on power system and terminal equipment

    CN110826789A

  • Commercial building load prediction method and system based on Informer network

    CN116979503A

  • Method for detecting steady-state information transmission anomaly of power grid regulation and control system based on artificial intelligence technology

    CN117639267A

  • Day-ahead load prediction method and device and load prediction system

    CN117895480A

  • Power system load prediction method and device, computer equipment and storage medium

    CN118195353A