CN114638405A - Energy demand forecasting method, device and computer equipment - Google Patents

Energy demand forecasting method, device and computer equipment Download PDF

Info

Publication number
CN114638405A
CN114638405A CN202210186735.2A CN202210186735A CN114638405A CN 114638405 A CN114638405 A CN 114638405A CN 202210186735 A CN202210186735 A CN 202210186735A CN 114638405 A CN114638405 A CN 114638405A
Authority
CN
China
Prior art keywords
matrix
independent variable
energy demand
eigenvalues
original
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210186735.2A
Other languages
Chinese (zh)
Inventor
王坤
陈沁语
兰州
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Economic and Technological Research Institute of State Grid Zhejiang Electric Power Co Ltd
Original Assignee
Economic and Technological Research Institute of State Grid Zhejiang Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Economic and Technological Research Institute of State Grid Zhejiang Electric Power Co Ltd filed Critical Economic and Technological Research Institute of State Grid Zhejiang Electric Power Co Ltd
Priority to CN202210186735.2A priority Critical patent/CN114638405A/en
Publication of CN114638405A publication Critical patent/CN114638405A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Marketing (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to an energy demand prediction method, an energy demand prediction device and computer equipment. The invention provides an energy demand prediction model based on principal component analysis and multiple linear regression analysis, and compared with a method for predicting future energy demand according to historical energy demand change narrative, the model provided by the invention is more in line with energy demand prediction influenced by actual policies and economy.

Description

能源需求预测方法、装置及计算机设备Energy demand forecasting method, device and computer equipment

技术领域technical field

本发明属于电力市场技术领域,具体涉及一种能源需求预测方法、装置及计算机设备。The invention belongs to the technical field of electricity market, and in particular relates to a method, device and computer equipment for predicting energy demand.

背景技术Background technique

随着资源行业的发展,能源消费中新能源占比将不断提升,能源需求将由单一向多元化转变。准确有效的能源需求预测可以更好的研判能源需求结构和各阶段能源需求水平,对能源的使用和发展进行有效管理。目前缺乏精准有效的能源需求预测方法,导致无法对现有的能源发展路线进行针对性的调整和布局。能源需求预测存在影响因素多、模型复杂等问题。With the development of the resource industry, the proportion of new energy in energy consumption will continue to increase, and energy demand will change from single to diversified. Accurate and effective energy demand forecast can better study and judge the energy demand structure and energy demand level at each stage, and effectively manage the use and development of energy. At present, there is a lack of accurate and effective energy demand forecasting methods, which makes it impossible to make targeted adjustments and layouts to the existing energy development routes. There are many influencing factors and complex models in energy demand forecasting.

相关技术中,能源预测方法主要有基于BP神经网络模型、基于自回归移动平均模型(ARIMA)和基于灰色预测模型的能源需求预测,其基本原理主要是通过历史趋势推测未来能源需求,但能源需求受多种因素共同影响,其中经济增长是影响中国能源消费增长变化的重要因素之一;此外,产业结构也是影响我国能源需求的重要因素,第二产业是中国能源消费增长的主要动力;而人口数量和结构也会直接影响能源消费总量,城镇化进程对能源消费具有重大影响,城镇化率与能源消费之间存在正相关。因此,在对未来能源需求进行预测时不仅要考虑能源消费自身的历史发展趋势,也要考虑经济增长、产业结构转型与社会发展等因素与能源需求的耦合关系。Among the related technologies, energy forecasting methods mainly include energy demand forecasting based on BP neural network model, autoregressive moving average model (ARIMA) and grey forecasting model. Affected by a variety of factors, economic growth is one of the important factors affecting the growth of China's energy consumption; in addition, the industrial structure is also an important factor affecting my country's energy demand, and the secondary industry is the main driving force for China's energy consumption growth; while the population The quantity and structure will also directly affect the total energy consumption. The urbanization process has a significant impact on energy consumption, and there is a positive correlation between the urbanization rate and energy consumption. Therefore, when forecasting future energy demand, not only the historical development trend of energy consumption itself, but also the coupling relationship between factors such as economic growth, industrial structure transformation and social development, and energy demand should be considered.

现有基于ARIMA模型的能源需求预测方法要求所给时序数据是稳定的,否则无法捕捉到能源需求变化规律。此外,自回归模型描述的是当前值和历史值之间关系,即是基于时间角度的预测模型,无法反映我国能源需求受经济、政策等影响因素的关系。另外,灰色预测模型使用的不是原始数据序列,而是生成的数据序列,导致其更适用于中短期预测和指数型增长的预测,不适用于预测双碳目标下时间跨度较大的能源需求,且现有的能源需求预测无法考虑未来的环境政策以及经济发展规划等。The existing energy demand forecasting method based on ARIMA model requires the given time series data to be stable, otherwise it cannot capture the changing law of energy demand. In addition, the autoregressive model describes the relationship between the current value and the historical value, that is, a prediction model based on a time perspective, which cannot reflect the relationship between my country's energy demand and economic, policy and other factors. In addition, the gray forecasting model does not use the original data series, but the generated data series, which makes it more suitable for medium and short-term forecasting and forecasting of exponential growth, and is not suitable for forecasting energy demand with a large time span under the dual-carbon target. Moreover, the existing energy demand forecast cannot take into account future environmental policies and economic development plans.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的目的在于克服现有技术的不足,提供一种能源需求预测方法、装置及计算机设备,以解决现有技术中现有的能源需求预测无法不适用于预测双碳目标下时间跨度较大的能源需求的问题。In view of this, the purpose of the present invention is to overcome the deficiencies of the prior art, and to provide an energy demand forecasting method, device and computer equipment, so as to solve the problem that the existing energy demand forecasting in the prior art cannot be suitable for forecasting under the dual carbon target. The problem of energy demand over a large time span.

为实现以上目的,本发明采用如下技术方案:一种能源需求预测方法,包括:To achieve the above purpose, the present invention adopts the following technical solutions: a method for predicting energy demand, comprising:

获取原始自变量数据,根据所述原始自变量数据建立原始自变量矩阵并进行标准化处理,得到标准化矩阵;其中,所述原始自变量数据包括电力行业与经济发展相关的多个类别的指标,所述指标包括工业增加值、产量和价格指数;Obtain original independent variable data, establish an original independent variable matrix according to the original independent variable data and perform standardization processing to obtain a standardized matrix; wherein, the original independent variable data includes multiple categories of indicators related to the power industry and economic development, so The above indicators include industrial added value, output and price index;

根据所述标准化矩阵,得到相关系数矩阵并获取所述相关系数矩阵的特征值,根据所述特征值计算相应的特征向量,根据所述特征向量构造自变量矩阵;According to the standardized matrix, a correlation coefficient matrix is obtained and the eigenvalues of the correlation coefficient matrix are obtained, corresponding eigenvectors are calculated according to the eigenvalues, and an independent variable matrix is constructed according to the eigenvectors;

根据所述特征值确定合成主成分的贡献度,根据所述贡献度对所述自变量矩阵进行筛选,确定预设个数的各主成分,根据所述预设个数的各主成分构建预测矩阵;Determine the contribution degree of the synthesized principal components according to the eigenvalues, screen the independent variable matrix according to the contribution degree, determine a preset number of principal components, and construct a prediction based on the preset number of principal components matrix;

获取因变量数据,根据所述因变量数据建立因变量矩阵;其中,所述因变量数据包括能源需求历史数据;Obtaining dependent variable data, and establishing a dependent variable matrix according to the dependent variable data; wherein, the dependent variable data includes historical energy demand data;

根据所述预测矩阵和所述因变量矩阵构建能源需求预测模型,所述能源需求预测模型用于计算未来能源需求。An energy demand prediction model is constructed according to the prediction matrix and the dependent variable matrix, and the energy demand prediction model is used to calculate future energy demand.

进一步的,所述根据所述原始自变量数据建立原始自变量矩阵并进行标准化处理,得到标准化矩阵,包括:Further, establishing an original independent variable matrix according to the original independent variable data and performing standardization processing to obtain a standardized matrix, including:

假设某行业第j类指标在历史时段n的实际结果为Xj=[x1j,x2j,…,xnj]T,则历史时段n内该行业的宏观经济的原始自变量矩阵为:Assuming that the actual result of the j-th indicator of a certain industry in the historical period n is X j =[x 1j ,x 2j ,...,x nj ] T , the original independent variable matrix of the macro economy of the industry in the historical period n is:

Figure BDA0003523014310000031
Figure BDA0003523014310000031

对所述原始自变量矩阵进行标准化,得到第i行第j列标准化后的数据xijStandardize the original independent variable matrix to obtain the standardized data x ij in the i-th row and the j-th column;

Figure BDA0003523014310000032
Figure BDA0003523014310000032

其中,

Figure BDA0003523014310000033
表示历史时段内针对该行业的第j项指标的平均值,即
Figure BDA0003523014310000034
var(xij)表示第j类指标的标准差,即
Figure BDA0003523014310000035
(j=1,2,…,k)。in,
Figure BDA0003523014310000033
Represents the average value of the jth indicator for the industry in the historical period, namely
Figure BDA0003523014310000034
var(x ij ) represents the standard deviation of the jth index, namely
Figure BDA0003523014310000035
(j=1,2,...,k).

进一步的,获取所述相关系数矩阵的特征值,根据所述特征值计算相应的特征向量,包括:Further, obtain the eigenvalues of the correlation coefficient matrix, and calculate the corresponding eigenvectors according to the eigenvalues, including:

所述相关系数矩阵为:The correlation coefficient matrix is:

Figure BDA0003523014310000036
Figure BDA0003523014310000036

根据所述相关系数矩阵计算得到所述相关系数矩阵的特征值λ1,λ2,…,λkCalculate the eigenvalues λ 1 , λ 2 , . . . , λ k of the correlation coefficient matrix according to the correlation coefficient matrix;

根据所述特征值采用如下方式计算所述特征值对应的特征向量;According to the eigenvalues, the eigenvectors corresponding to the eigenvalues are calculated in the following manner;

ATRA=diag(λ12,…,λk)A T RA=diag(λ 12 ,...,λ k )

其中,XT为原始自变量矩阵X的倒置矩阵,A=(aij)k×k表示特征值对应的规范正交特征向量,aij表示特征向量A中第i列第j行元素。Among them, X T is the inverted matrix of the original independent variable matrix X, A=(a ij ) k×k represents the canonical orthogonal eigenvector corresponding to the eigenvalue, and a ij represents the element in the ith column and the jth row of the eigenvector A.

进一步的,所述根据所述特征向量构造自变量矩阵,包括:Further, the constructing an independent variable matrix according to the eigenvectors includes:

根据原始自变量矩阵和特征向量采用如下方式计算自变量矩阵;According to the original independent variable matrix and eigenvectors, the independent variable matrix is calculated as follows;

Y=ATXY=A T X

Figure BDA0003523014310000041
Figure BDA0003523014310000041

进一步的,所述根据所述特征值确定合成主成分的贡献度,根据所述贡献度对所述自变量矩阵进行筛选,确定预设个数的各主成分,根据所述预设个数的各主成分构建预测矩阵,包括:Further, determining the contribution degree of the synthetic principal component according to the eigenvalue, screening the independent variable matrix according to the contribution degree, and determining a preset number of principal components, according to the preset number of principal components. Each principal component constructs a prediction matrix, including:

特征值λ1,λ2,…,λk表示合成主成分的贡献率,将各主成分的特征向量进行降序排列,若假定前p个特征值的累积值趋近1,其中p<k,表示上述p个主成分对原始指标集合的信息保留度高,则将其定义为主成分的累计贡献度为

Figure BDA0003523014310000042
并根据预设范围进行取值,以筛选各主成分,得到的k项经济运行指标合成的主成分为:The eigenvalues λ 1 , λ 2 , ..., λ k represent the contribution rate of the synthetic principal components, and the eigenvectors of each principal component are arranged in descending order. If it is assumed that the cumulative value of the first p eigenvalues is close to 1, where p<k, Indicates that the above p principal components have a high degree of information retention to the original index set, then the cumulative contribution of the principal components is defined as
Figure BDA0003523014310000042
And select the value according to the preset range to filter the principal components, and the obtained principal components of the k-item economic operation indicators are as follows:

Figure BDA0003523014310000043
Figure BDA0003523014310000043

进一步的,针对合成后的各个主成分,做协方差计算后得到:Further, for each principal component after synthesis, the covariance calculation is performed to obtain:

Figure BDA0003523014310000044
Figure BDA0003523014310000044

主成分yj的方差等于其对应的特征值λi,任意两个不同主成分之间的协方差为0,即各个主成分之间不相关。The variance of the principal component y j is equal to its corresponding eigenvalue λ i , and the covariance between any two different principal components is 0, that is, there is no correlation between the principal components.

进一步的,所述能源需求预测模型为多元线性回归分析模型,包括:Further, the energy demand forecasting model is a multiple linear regression analysis model, including:

Z=β01Y′12Y′2+…+βkY′k (8)Z=β 01 Y′ 12 Y′ 2 +…+β k Y′ k (8)

其中,假设被解释变量Z与多个解释变量Y′,Y′2,…Y′k之间具有线性关系,是解释变量的多元线性函数,β0,β1,…,βk是回归系数,解释变量Z即能源需求,解释变量Y即经济发展规划、环境政策目标、产业结构等因素经处理所构成的预测矩阵。Among them, it is assumed that there is a linear relationship between the explained variable Z and multiple explanatory variables Y′, Y′ 2 ,…Y′ k , which are multivariate linear functions of the explanatory variables, β 0 , β 1 , …, β k are regression coefficients , the explanatory variable Z is the energy demand, and the explanatory variable Y is the prediction matrix formed by the processing of economic development planning, environmental policy objectives, industrial structure and other factors.

进一步的,所述预设范围为85%至95%。Further, the preset range is 85% to 95%.

本申请实施例提供一种能源需求预测装置,包括:The embodiment of the present application provides an energy demand forecasting device, including:

获取模块,用于获取原始自变量数据,根据所述原始自变量数据建立原始自变量矩阵并进行标准化处理,得到标准化矩阵;其中,所述原始自变量数据包括电力行业与经济发展相关的多个类别的指标,所述指标包括工业增加值、产量和价格指数;The acquisition module is used for acquiring original independent variable data, establishing an original independent variable matrix according to the original independent variable data and performing standardization processing to obtain a standardized matrix; wherein, the original independent variable data includes a plurality of power industry and economic development related categories of indicators including industrial value added, production and price indices;

构造模块,用于根据所述标准化矩阵,得到相关系数矩阵并获取所述相关系数矩阵的特征值,根据所述特征值计算相应的特征向量,根据所述特征向量构造自变量矩阵;a construction module, configured to obtain a correlation coefficient matrix and obtain eigenvalues of the correlation coefficient matrix according to the standardized matrix, calculate corresponding eigenvectors according to the eigenvalues, and construct an independent variable matrix according to the eigenvectors;

确定模块,用于根据所述特征值确定合成主成分的贡献度,根据所述贡献度对所述自变量矩阵进行筛选,确定预设个数的各主成分,根据所述预设个数的各主成分构建预测矩阵;The determining module is configured to determine the contribution degree of the synthetic principal component according to the eigenvalue, screen the independent variable matrix according to the contribution degree, and determine a preset number of each principal component, according to the preset number of Each principal component constructs a prediction matrix;

建立模块,用于获取因变量数据,根据所述因变量数据建立因变量矩阵;其中,所述因变量数据包括能源需求历史数据;a building module for acquiring dependent variable data, and establishing a dependent variable matrix according to the dependent variable data; wherein the dependent variable data includes historical energy demand data;

构建模块,用于根据所述预测矩阵和所述因变量矩阵构建能源需求预测模型。a building module for building an energy demand forecasting model according to the forecasting matrix and the dependent variable matrix.

本申请实施例提供一种计算机设备,包括:存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行上述任一项能源需求预测方法的步骤。An embodiment of the present application provides a computer device, including: a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform any one of the foregoing energy demand predictions steps of the method.

本申请实施例还提供一种计算机存储介质,存储有计算机程序,所述计算机程序被处理器执行时,使得所述处理器执行上述任一项能源需求预测方法的步骤。Embodiments of the present application further provide a computer storage medium, which stores a computer program, and when the computer program is executed by a processor, causes the processor to execute any of the steps of the above-mentioned energy demand forecasting method.

本发明采用以上技术方案,能够达到的有益效果包括:The present invention adopts the above technical solutions, and the beneficial effects that can be achieved include:

本发明提供一种能源需求预测方法、装置及计算机设备,本发明在考虑影响能源需求的经济增长进行预测的同时,还考虑到由于经济发展的相关指标如产值、价格指数等具有较强相关性,可能会导致多元线性回归模型中的“伪回归”问题。对此,本方法采用主成分分析法对自变量矩阵进行处理,得到新的自变量矩阵中的因素互不相关,避免了多元回归模型预测中因为变量自相关性过大导致的“伪回归”问题。The present invention provides an energy demand forecasting method, device and computer equipment. The present invention takes into account the economic growth that affects energy demand for forecasting, and also considers that the relevant indicators of economic development, such as output value, price index, etc., have strong correlation. , which can lead to "pseudo-regression" problems in multiple linear regression models. In this regard, this method uses the principal component analysis method to process the independent variable matrix, and obtains the factors in the new independent variable matrix that are not correlated with each other, which avoids the "pseudo regression" caused by excessive variable autocorrelation in the prediction of the multiple regression model. question.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1为本发明能源需求预测方法的步骤示意图;1 is a schematic diagram of the steps of the energy demand forecasting method of the present invention;

图2为本发明能源需求预测方法的流程示意图;Fig. 2 is the schematic flow chart of the energy demand forecasting method of the present invention;

图3为本发明能源需求预测装置的结构示意图;3 is a schematic structural diagram of an energy demand forecasting device of the present invention;

图4为本发明能源需求预测方法具体实施的硬件结构示意图。FIG. 4 is a schematic diagram of the hardware structure of the specific implementation of the energy demand forecasting method of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将对本发明的技术方案进行详细的描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所得到的所有其它实施方式,都属于本发明所保护的范围。In order to make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be described in detail below. Obviously, the described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other implementations obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.

下面结合附图介绍本申请实施例中提供的一个具体的能源需求预测方法、装置及计算机设备。A specific energy demand forecasting method, apparatus, and computer equipment provided in the embodiments of the present application will be described below with reference to the accompanying drawings.

如图1所示,本申请实施例中提供的能源需求预测方法包括:As shown in FIG. 1 , the energy demand forecasting method provided in the embodiment of the present application includes:

S101,获取原始自变量数据,根据所述原始自变量数据建立原始自变量矩阵并进行标准化处理,得到标准化矩阵;其中,所述原始自变量数据包括电力行业与经济发展相关的多个类别的指标,所述指标包括工业增加值、产量和价格指数;S101: Obtain original independent variable data, establish an original independent variable matrix according to the original independent variable data, and perform standardization processing to obtain a standardized matrix; wherein, the original independent variable data includes multiple categories of indicators related to the power industry and economic development , the indicators include industrial value added, output and price indices;

如图2所示,本发明需要获取的原始自变量数据包括与该行业或区域的与国家发展有关的指标,如工业增加值、产量、价格指数,因变量数据包括能源需求历史数据。可以理解的是,原始自变量数据还可以包括其他维度的数据,因变量数据还可以包括其他维度的数据,本申请在此不做限定。As shown in FIG. 2 , the original independent variable data to be acquired in the present invention includes indicators related to national development of the industry or region, such as industrial added value, output, and price index, and the dependent variable data includes historical energy demand data. It can be understood that the original independent variable data may also include data of other dimensions, and the dependent variable data may also include data of other dimensions, which is not limited in this application.

在获取到原始自变量数据后,建立原始自变量矩阵X,具体如下:After obtaining the original independent variable data, establish the original independent variable matrix X, as follows:

假设某行业第j类相关指标在历史时段n的实际结果为Xj=[x1j,x2j,…,xnj]T,历史时段n内行业的宏观经济的原始自变量矩阵可表示为:Assuming that the actual result of the j-th related indicators of a certain industry in the historical period n is X j =[x 1j ,x 2j ,...,x nj ] T , the original macroeconomic matrix of the industry in the historical period n can be expressed as:

Figure BDA0003523014310000071
Figure BDA0003523014310000071

然后,对原始自变量矩阵进行标准化,得到第i行第j列标准化后的数据xij;如下:Then, standardize the original independent variable matrix to obtain the standardized data x ij in the i-th row and the j-th column; as follows:

Figure BDA0003523014310000072
Figure BDA0003523014310000072

需要说明的是,由于各项指标的性质、量纲、数量级等方面存在差异,需要对其进行标准化处理,本申请中对原始自变量矩阵的标准化处理具体可采用Z-score法、标准差处理等方法。It should be noted that due to the differences in the nature, dimension, order of magnitude, etc. of each index, it needs to be standardized. In this application, the standardization of the original independent variable matrix can be specifically processed by Z-score method and standard deviation. and other methods.

式中,

Figure BDA0003523014310000073
表示历史时段内针对该行业的第j项指标的平均值,即
Figure BDA0003523014310000074
var(xij)表示第j类指标的标准差,即
Figure BDA0003523014310000075
(j=1,2,…,k)。In the formula,
Figure BDA0003523014310000073
Represents the average value of the jth indicator for the industry in the historical period, namely
Figure BDA0003523014310000074
var(x ij ) represents the standard deviation of the jth index, namely
Figure BDA0003523014310000075
(j=1,2,...,k).

S102,根据所述标准化矩阵,得到相关系数矩阵并获取所述相关系数矩阵的特征值,根据所述特征值计算相应的特征向量,根据所述特征向量构造自变量矩阵;S102, according to the standardized matrix, obtain a correlation coefficient matrix and obtain eigenvalues of the correlation coefficient matrix, calculate corresponding eigenvectors according to the eigenvalues, and construct an independent variable matrix according to the eigenvectors;

具体的,通过标准化处理后的各项宏观经济指标j具有同质化处理的条件。针对时间跨度n内的各项宏观经济指标,可以求得其相关系数矩阵:Specifically, each macroeconomic index j after standardized processing has the conditions for homogenization processing. For various macroeconomic indicators within the time span n, the correlation coefficient matrix can be obtained:

Figure BDA0003523014310000081
Figure BDA0003523014310000081

然后根据所述相关系数矩阵计算得到所述相关系数矩阵的特征值λ1,λ2,…,λk。特征值λ1,λ2,…,λk具有分别对应的特征向量,计算方式如下:Then, the eigenvalues λ 1 , λ 2 , . . . , λ k of the correlation coefficient matrix are obtained by calculating according to the correlation coefficient matrix. The eigenvalues λ 1 , λ 2 , ..., λ k have corresponding eigenvectors respectively, and the calculation methods are as follows:

ATRA=diag(λ12,…,λk) (5)A T RA=diag(λ 12 ,...,λ k ) (5)

其中,XT为原始自变量矩阵X的倒置矩阵,A=(aij)k×k表示特征值对应的规范正交特征向量,aij表示特征向量A中第i列第j行元素。Among them, X T is the inverted matrix of the original independent variable matrix X, A=(a ij ) k×k represents the canonical orthogonal eigenvector corresponding to the eigenvalue, and a ij represents the element in the ith column and the jth row of the eigenvector A.

S103,根据所述特征值确定合成主成分的贡献度,根据所述贡献度对所述自变量矩阵进行筛选,确定预设个数的各主成分,根据所述预设个数的各主成分构建预测矩阵;S103: Determine the contribution degree of the synthetic principal component according to the eigenvalue, screen the independent variable matrix according to the contribution degree, determine each principal component of a preset number, and determine each principal component according to the preset number of principal components Build a prediction matrix;

区别于原始自变量矩阵X,将针对行业历史时段n内的各项结果,构造自变量矩阵:Y=ATX。得到Different from the original independent variable matrix X, the independent variable matrix will be constructed according to the results in the historical period n of the industry: Y=A T X. get

Figure BDA0003523014310000082
Figure BDA0003523014310000082

然后对自变量矩阵Y进行筛选,得到用于预测因变量的矩阵Y′,具体过程为:Then, the independent variable matrix Y is screened to obtain the matrix Y' used to predict the dependent variable. The specific process is:

特征值λ1,λ2,…,λk表达合成主成分的贡献率,将各主成分的特征向量是降序排列,若假定前p个(p<k)特征值的累积值十分接近于1,表示上述p个主成分对原始指标集合的信息保留度十分高,将其定义为主成分的累计贡献度

Figure BDA0003523014310000083
可根据实际情况取值(一般为85%至95%之间),由此筛选各主成分。得到的k项经济运行指标合成的主成分为:The eigenvalues λ 1 , λ 2 , ..., λ k express the contribution rate of the synthetic principal components, and the eigenvectors of each principal component are arranged in descending order. If it is assumed that the cumulative value of the first p (p<k) eigenvalues is very close to 1 , indicating that the above p principal components have a very high degree of information retention to the original index set, which is defined as the cumulative contribution of the principal components
Figure BDA0003523014310000083
The value can be selected according to the actual situation (usually between 85% and 95%), so as to screen each principal component. The principal components of the obtained k-item economic operation index synthesis are:

Figure BDA0003523014310000091
Figure BDA0003523014310000091

经过主成分分析法后得到的自变量Y矩阵互相之间不相关,因此不会存在伪回归的问题;The independent variable Y matrices obtained after the principal component analysis method are not correlated with each other, so there will be no problem of pseudo-regression;

从数学原理上分析,针对合成后的各个主成分,做协方差计算后可以得到如下结论:From the mathematical analysis, for each principal component after synthesis, the following conclusions can be obtained after covariance calculation:

Figure BDA0003523014310000092
Figure BDA0003523014310000092

主成分y′j的方差等于其对应的特征值λi,任意两个不同主成分之间的协方差为0(即不相关)。The variance of the principal component y'j is equal to its corresponding eigenvalue λ i , and the covariance between any two different principal components is 0 (ie, irrelevant).

S104,获取因变量数据,根据所述因变量数据建立因变量矩阵;其中,所述因变量数据包括能源需求历史数据;S104, obtaining dependent variable data, and establishing a dependent variable matrix according to the dependent variable data; wherein the dependent variable data includes historical energy demand data;

因变量数据包括能源需求历史数据。The dependent variable data includes historical energy demand data.

S105,根据所述预测矩阵和所述因变量矩阵构建能源需求预测模型,所述能源需求预测模型用于计算未来能源需求。S105. Build an energy demand prediction model according to the prediction matrix and the dependent variable matrix, where the energy demand prediction model is used to calculate future energy demand.

利用上述得到的预测矩阵和获取的因变量数据构成的因变量矩阵,用以上自变量矩阵Y和因变量矩阵Z,即能源需求的历史值建立多元线性回归分析模型,得到能源-经济预测模型。Using the above obtained prediction matrix and the dependent variable matrix formed by the obtained dependent variable data, the multiple linear regression analysis model is established with the above independent variable matrix Y and dependent variable matrix Z, that is, the historical value of energy demand, and the energy-economic prediction model is obtained.

多元线性回归模型通常用来研究一个因变量依赖多个自变量的变化关系,其模型如下式所示:The multiple linear regression model is usually used to study the relationship between a dependent variable and multiple independent variables. The model is shown in the following formula:

Z=β01Y′12Y′2+…+βkY′k (9)Z=β 01 Y′ 12 Y′ 2 +…+β k Y′ k (9)

其中,假设被解释变量Z与多个解释变量Y′,Y′2,…Y′k之间具有线性关系,是解释变量的多元线性函数,β0,β1,…,βk是回归系数,在此处解释变量Z即能源需求,解释变量Y即经济发展规划、环境政策目标、产业结构等因素经处理所构成的自变量矩阵。Among them, it is assumed that there is a linear relationship between the explained variable Z and multiple explanatory variables Y′, Y′ 2 ,…Y′ k , which are multivariate linear functions of the explanatory variables, β 0 , β 1 , …, β k are regression coefficients , where the explanatory variable Z is the energy demand, and the explanatory variable Y is the independent variable matrix formed by processing factors such as economic development planning, environmental policy goals, and industrial structure.

本申请可以对未来的自变量矩阵X进行设置,计算对应的预测矩阵Y′,并基于建立的多元线性回归模型计算未来能源需求矩阵Z。The present application can set the future independent variable matrix X, calculate the corresponding prediction matrix Y', and calculate the future energy demand matrix Z based on the established multiple linear regression model.

如图3所示,本申请提供一种能源需求预测装置,包括:As shown in Figure 3, the present application provides an energy demand forecasting device, including:

获取模块201,用于获取原始自变量数据,根据所述原始自变量数据建立原始自变量矩阵并进行标准化处理,得到标准化矩阵;其中,所述原始自变量数据包括电力行业与经济发展相关的多个类别的指标,所述指标包括工业增加值、产量和价格指数;The acquisition module 201 is configured to acquire original independent variable data, establish an original independent variable matrix according to the original independent variable data and perform standardization processing to obtain a standardized matrix; wherein, the original independent variable data includes multiple data related to the power industry and economic development. categories of indicators including industrial value added, production and price indices;

构造模块202,用于根据所述标准化矩阵,得到相关系数矩阵并获取所述相关系数矩阵的特征值,根据所述特征值计算相应的特征向量,根据所述特征向量构造自变量矩阵;The construction module 202 is configured to obtain a correlation coefficient matrix and obtain eigenvalues of the correlation coefficient matrix according to the standardized matrix, calculate corresponding eigenvectors according to the eigenvalues, and construct an independent variable matrix according to the eigenvectors;

确定模块203,用于根据所述特征值确定合成主成分的贡献度,根据所述贡献度对所述自变量矩阵进行筛选,确定预设个数的各主成分,根据所述预设个数的各主成分构建预测矩阵;A determination module 203, configured to determine the contribution degree of the synthetic principal component according to the eigenvalue, screen the independent variable matrix according to the contribution degree, and determine a preset number of each principal component, according to the preset number Each principal component of , constructs a prediction matrix;

建立模块204,用于获取因变量数据,根据所述因变量数据建立因变量矩阵;其中,所述因变量数据包括能源需求历史数据;The establishment module 204 is used for acquiring dependent variable data, and establishing a dependent variable matrix according to the dependent variable data; wherein, the dependent variable data includes historical energy demand data;

构建模块205,用于根据所述预测矩阵和所述因变量矩阵构建能源需求预测模型。The building module 205 is configured to build an energy demand prediction model according to the prediction matrix and the dependent variable matrix.

本申请提供的能源需求预测装置的工作原理为,获取模块201获取原始自变量数据,根据所述原始自变量数据建立原始自变量矩阵并进行标准化处理,得到标准化矩阵;其中,所述原始自变量数据包括电力行业与经济发展相关的多个类别的指标,所述指标包括工业增加值、产量和价格指数;构造模块202根据所述标准化矩阵,得到相关系数矩阵并获取所述相关系数矩阵的特征值,根据所述特征值计算相应的特征向量,根据所述特征向量构造自变量矩阵;确定模块203根据所述特征值确定合成主成分的贡献度,根据所述贡献度对所述自变量矩阵进行筛选,确定预设个数的各主成分,根据所述预设个数的各主成分构建预测矩阵;建立模块204获取因变量数据,根据所述因变量数据建立因变量矩阵;其中,所述因变量数据包括能源需求历史数据;构建模块205根据所述预测矩阵和所述因变量矩阵构建能源需求预测模型。The working principle of the energy demand forecasting device provided by the present application is that the acquisition module 201 acquires original independent variable data, establishes an original independent variable matrix according to the original independent variable data, and performs standardization processing to obtain a standardized matrix; wherein, the original independent variable The data includes multiple categories of indicators related to the power industry and economic development, and the indicators include industrial added value, output and price index; the construction module 202 obtains a correlation coefficient matrix according to the standardized matrix and acquires the characteristics of the correlation coefficient matrix value, calculate the corresponding eigenvectors according to the eigenvalues, and construct an independent variable matrix according to the eigenvectors; the determining module 203 determines the contribution degree of the synthetic principal component according to the eigenvalues, and determines the contribution degree of the independent variable matrix according to the contribution degree to the independent variable matrix Perform screening, determine each principal component of a preset number, and construct a prediction matrix according to each principal component of the preset number; the establishment module 204 obtains dependent variable data, and establishes a dependent variable matrix according to the dependent variable data; wherein, the The dependent variable data includes historical energy demand data; the building module 205 constructs an energy demand prediction model according to the prediction matrix and the dependent variable matrix.

本申请提供一种计算机设备,包括:存储器和处理器,还可以包括网络接口,所述存储器存储有计算机程序,存储器可以包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。该计算机设备存储有操作系统,存储器是计算机可读介质的示例。所述计算机程序被所述处理器执行时,使得所述处理器执行能源需求预测方法,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。The present application provides a computer device, including: a memory and a processor, and may also include a network interface, the memory stores a computer program, and the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and/or forms of non-volatile memory such as read only memory (ROM) or flash memory (flash RAM). The computer device stores an operating system, and the memory is an example of a computer-readable medium. When the computer program is executed by the processor, the processor executes the energy demand forecasting method, and the structure shown in FIG. The definition of a computer device to which it applies, a particular computer device may include more or fewer components than those shown in the figures, or combine certain components, or have a different arrangement of components.

在一个实施例中,本申请提供的能源需求预测方法可以实现为一种计算机程序的形式,计算机程序可在如图4所示的计算机设备上运行。In one embodiment, the energy demand forecasting method provided by the present application can be implemented in the form of a computer program, and the computer program can be executed on a computer device as shown in FIG. 4 .

一些实施例中,所述计算机程序被所述处理器执行时,使得所述处理器执行以下步骤:获取原始自变量数据,根据所述原始自变量数据建立原始自变量矩阵并进行标准化处理,得到标准化矩阵;其中,所述原始自变量数据包括电力行业与经济发展相关的多个类别的指标,所述指标包括工业增加值、产量和价格指数;根据所述标准化矩阵,得到相关系数矩阵并获取所述相关系数矩阵的特征值,根据所述特征值计算相应的特征向量,根据所述特征向量构造自变量矩阵;根据所述特征值确定合成主成分的贡献度,根据所述贡献度对所述自变量矩阵进行筛选,确定预设个数的各主成分,根据所述预设个数的各主成分构建预测矩阵;获取因变量数据,根据所述因变量数据建立因变量矩阵;其中,所述因变量数据包括能源需求历史数据;根据所述预测矩阵和所述因变量矩阵构建能源需求预测模型,所述能源需求预测模型用于计算未来能源需求。In some embodiments, when the computer program is executed by the processor, the processor causes the processor to perform the following steps: acquiring original independent variable data, establishing an original independent variable matrix according to the original independent variable data, and performing normalization processing to obtain Standardized matrix; wherein, the original independent variable data includes multiple categories of indicators related to the power industry and economic development, and the indicators include industrial added value, output and price index; according to the standardized matrix, obtain a correlation coefficient matrix and obtain The eigenvalues of the correlation coefficient matrix, the corresponding eigenvectors are calculated according to the eigenvalues, and the independent variable matrix is constructed according to the eigenvectors; the contribution degree of the synthetic principal component is determined according to the eigenvalues, and the The independent variable matrix is screened to determine a preset number of principal components, and a prediction matrix is constructed according to the preset number of principal components; the dependent variable data is obtained, and a dependent variable matrix is established according to the dependent variable data; wherein, The dependent variable data includes historical data of energy demand; an energy demand prediction model is constructed according to the prediction matrix and the dependent variable matrix, and the energy demand prediction model is used to calculate future energy demand.

本申请还提供一种计算机存储介质,计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光光盘(DVD)或其他光学存储、磁盒式磁带存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。The present application also provides a computer storage medium. Examples of the computer storage medium include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Multimedia A functional optical disc (DVD) or other optical storage, magnetic cassette storage or other magnetic storage device or any other non-transmission medium can be used to store information that can be accessed by a computing device.

一些实施例中,本发明还提出了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时,获取原始自变量数据,根据所述原始自变量数据建立原始自变量矩阵并进行标准化处理,得到标准化矩阵;其中,所述原始自变量数据包括电力行业与经济发展相关的多个类别的指标,所述指标包括工业增加值、产量和价格指数;根据所述标准化矩阵,得到相关系数矩阵并获取所述相关系数矩阵的特征值,根据所述特征值计算相应的特征向量,根据所述特征向量构造自变量矩阵;根据所述特征值确定合成主成分的贡献度,根据所述贡献度对所述自变量矩阵进行筛选,确定预设个数的各主成分,根据所述预设个数的各主成分构建预测矩阵;获取因变量数据,根据所述因变量数据建立因变量矩阵;其中,所述因变量数据包括能源需求历史数据;根据所述预测矩阵和所述因变量矩阵构建能源需求预测模型,所述能源需求预测模型用于计算未来能源需求。In some embodiments, the present invention also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, obtains original argument data, and establishes an original argument according to the original argument data. matrix and standardize to obtain a standardized matrix; wherein, the original independent variable data includes multiple categories of indicators related to economic development in the power industry, and the indicators include industrial added value, output and price index; according to the standardized matrix , obtain the correlation coefficient matrix and obtain the eigenvalues of the correlation coefficient matrix, calculate the corresponding eigenvectors according to the eigenvalues, construct the independent variable matrix according to the eigenvectors; determine the contribution of the synthetic principal components according to the eigenvalues, Screen the independent variable matrix according to the contribution degree, determine each principal component of a preset number, and construct a prediction matrix according to each principal component of the preset number; A dependent variable matrix is established; wherein the dependent variable data includes historical energy demand data; an energy demand prediction model is constructed according to the prediction matrix and the dependent variable matrix, and the energy demand prediction model is used to calculate future energy demand.

综上所述,本发明提供一种能源需求预测方法、装置及计算机设备,包括获取原始自变量数据,建立原始自变量矩阵,对原始自变量矩阵进行标准化,求原始自变量矩阵的相关系数矩阵,求相关系数矩阵的特征值和特征值对应的特征向量,根据特征向量构造自变量矩阵,对自变量矩阵进行筛选,得到用于预测因变量的预测矩阵,结合预测矩阵和因变量矩阵得到能源需求预测模型。本发明以主成分分析和多元线性回归分析为基础,提出一种能源需求预测模型,相较于根据历史能源需求变化叙事预测未来能源需求的方法,本申请提供的模型更加符合受实际政策和经济影响的能源需求预测。In summary, the present invention provides an energy demand forecasting method, device and computer equipment, including acquiring original independent variable data, establishing an original independent variable matrix, standardizing the original independent variable matrix, and obtaining the correlation coefficient matrix of the original independent variable matrix. , find the eigenvalues of the correlation coefficient matrix and the eigenvectors corresponding to the eigenvalues, construct the independent variable matrix according to the eigenvectors, screen the independent variable matrix to obtain the prediction matrix for predicting the dependent variable, and combine the prediction matrix and the dependent variable matrix to obtain the energy demand forecasting model. Based on principal component analysis and multiple linear regression analysis, the present invention proposes an energy demand forecasting model. Compared with the method of predicting future energy demand based on historical energy demand change narratives, the model provided by the present application is more in line with actual policies and economic conditions. Impact on energy demand forecasts.

可以理解的是,上述提供的方法实施例与上述的装置实施例对应,相应的具体内容可以相互参考,在此不再赘述。It can be understood that the method embodiments provided above correspond to the above-mentioned apparatus embodiments, and the corresponding specific contents can be referred to each other, which will not be repeated here.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。As will be appreciated by those skilled in the art, the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including but not limited to disk storage, optical storage, and the like.

本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令方法的制造品,该指令方法实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer readable memory result in an article of manufacture comprising the method of the instructions, the instructions A method implements the functions specified in the flow diagram or flow diagrams and/or the block diagram diagram block or blocks.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention. should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (10)

1.一种能源需求预测方法,其特征在于,包括:1. A method for forecasting energy demand, comprising: 获取原始自变量数据,根据所述原始自变量数据建立原始自变量矩阵并进行标准化处理,得到标准化矩阵;其中,所述原始自变量数据包括电力行业与经济发展相关的多个类别的指标,所述指标包括工业增加值、产量和价格指数;Obtain original independent variable data, establish an original independent variable matrix according to the original independent variable data and perform standardization processing to obtain a standardized matrix; wherein, the original independent variable data includes multiple categories of indicators related to the power industry and economic development, so The above indicators include industrial added value, output and price index; 根据所述标准化矩阵,得到相关系数矩阵并获取所述相关系数矩阵的特征值,根据所述特征值计算相应的特征向量,根据所述特征向量构造自变量矩阵;According to the standardized matrix, a correlation coefficient matrix is obtained and the eigenvalues of the correlation coefficient matrix are obtained, corresponding eigenvectors are calculated according to the eigenvalues, and an independent variable matrix is constructed according to the eigenvectors; 根据所述特征值确定合成主成分的贡献度,根据所述贡献度对所述自变量矩阵进行筛选,确定预设个数的各主成分,根据所述预设个数的各主成分构建预测矩阵;Determine the contribution degree of the synthesized principal components according to the eigenvalues, screen the independent variable matrix according to the contribution degree, determine a preset number of principal components, and construct a prediction based on the preset number of principal components matrix; 获取因变量数据,根据所述因变量数据建立因变量矩阵;其中,所述因变量数据包括能源需求历史数据;Obtaining dependent variable data, and establishing a dependent variable matrix according to the dependent variable data; wherein, the dependent variable data includes historical energy demand data; 根据所述预测矩阵和所述因变量矩阵构建能源需求预测模型,所述能源需求预测模型用于计算未来能源需求。An energy demand prediction model is constructed according to the prediction matrix and the dependent variable matrix, and the energy demand prediction model is used to calculate future energy demand. 2.根据权利要求1所述的方法,其特征在于,所述根据所述原始自变量数据建立原始自变量矩阵并进行标准化处理,得到标准化矩阵,包括:2. The method according to claim 1, wherein, establishing an original independent variable matrix according to the original independent variable data and performing standardization processing to obtain a standardized matrix, comprising: 假设某行业第j类指标在历史时段n的实际结果为Xj=[x1j,x2j,…,xnj]T,则历史时段n内该行业的宏观经济的原始自变量矩阵为:Assuming that the actual result of the j-th indicator of a certain industry in the historical period n is X j =[x 1j ,x 2j ,...,x nj ] T , the original independent variable matrix of the macro economy of the industry in the historical period n is:
Figure FDA0003523014300000011
Figure FDA0003523014300000011
对所述原始自变量矩阵进行标准化,得到第i行第j列标准化后的数据xijStandardize the original independent variable matrix to obtain the standardized data x ij in the i-th row and the j-th column;
Figure FDA0003523014300000012
Figure FDA0003523014300000012
其中,
Figure FDA0003523014300000013
表示历史时段内针对该行业的第j项指标的平均值,即
Figure FDA0003523014300000014
var(xij)表示第j类指标的标准差,即
Figure FDA0003523014300000021
in,
Figure FDA0003523014300000013
Represents the average value of the jth indicator for the industry in the historical period, namely
Figure FDA0003523014300000014
var(x ij ) represents the standard deviation of the jth index, namely
Figure FDA0003523014300000021
3.根据权利要求1或2所述的方法,其特征在于,获取所述相关系数矩阵的特征值,根据所述特征值计算相应的特征向量,包括:3. The method according to claim 1 or 2, wherein obtaining the eigenvalues of the correlation coefficient matrix, and calculating the corresponding eigenvectors according to the eigenvalues, comprising: 所述相关系数矩阵为:The correlation coefficient matrix is:
Figure FDA0003523014300000022
Figure FDA0003523014300000022
根据所述相关系数矩阵计算得到所述相关系数矩阵的特征值λ1,λ2,…,λkCalculate the eigenvalues λ 1 , λ 2 , . . . , λ k of the correlation coefficient matrix according to the correlation coefficient matrix; 根据所述特征值采用如下方式计算所述特征值对应的特征向量;According to the eigenvalues, the eigenvectors corresponding to the eigenvalues are calculated in the following manner; ATRA=diag(λ12,…,λk)A T RA=diag(λ 12 ,...,λ k ) 其中,XT为原始自变量矩阵X的倒置矩阵,A=(aij)k×k表示特征值对应的规范正交特征向量,aij表示特征向量A中第i列第j行元素。Among them, X T is the inverted matrix of the original independent variable matrix X, A=(a ij ) k×k represents the canonical orthogonal eigenvector corresponding to the eigenvalue, and a ij represents the element in the ith column and the jth row of the eigenvector A.
4.根据权利要求1所述的方法,其特征在于,所述根据所述特征向量构造自变量矩阵,包括:4. The method according to claim 1, wherein the constructing an independent variable matrix according to the eigenvectors comprises: 根据原始自变量矩阵和特征向量采用如下方式计算自变量矩阵;According to the original independent variable matrix and eigenvectors, the independent variable matrix is calculated as follows; Y=ATXY=A T X
Figure FDA0003523014300000023
Figure FDA0003523014300000023
5.根据权利要求1所述的方法,其特征在于,所述根据所述特征值确定合成主成分的贡献度,根据所述贡献度对所述自变量矩阵进行筛选,确定预设个数的各主成分,根据所述预设个数的各主成分构建预测矩阵,包括:5 . The method according to claim 1 , wherein the contribution degree of the synthetic principal component is determined according to the eigenvalue, the independent variable matrix is screened according to the contribution degree, and a preset number of For each principal component, a prediction matrix is constructed according to each principal component of the preset number, including: 特征值λ1,λ2,…,λk表示合成主成分的贡献率,将各主成分的特征向量进行降序排列,若假定前p个特征值的累积值趋近1,其中p<k,表示上述p个主成分对原始指标集合的信息保留度高,则将其定义为主成分的累计贡献度为
Figure FDA0003523014300000031
并根据预设范围进行取值,以筛选各主成分,得到的k项经济运行指标合成的主成分为:
The eigenvalues λ 1 , λ 2 , ..., λ k represent the contribution rate of the synthetic principal components, and the eigenvectors of each principal component are arranged in descending order. If it is assumed that the cumulative value of the first p eigenvalues is close to 1, where p<k, Indicates that the above p principal components have a high degree of information retention to the original index set, then the cumulative contribution of the principal components is defined as
Figure FDA0003523014300000031
And select the value according to the preset range to filter the principal components, and the obtained principal components of the k-item economic operation indicators are as follows:
y′1=a11X1+a12X2+…+a1kXk y′ 1 =a 11 X 1 +a 12 X 2 +…+a 1k X k y′2=a21X1+a22X2+…+a2kXk y′ 2 =a 21 X 1 +a 22 X 2 +…+a 2k X k y′p=ap1X1+ap2X2+…+apkXk y′ p = a p1 X 1 +a p2 X 2 +...+a pk X k 由k项经济运行指标合成的主成分构成预测矩阵Y′。The principal components synthesized by k items of economic operation indicators constitute the prediction matrix Y'.
6.根据权利要求5所述的方法,其特征在于,针对合成后的各个主成分,做协方差计算后得到:6. method according to claim 5, is characterized in that, for each principal component after synthesis, after doing covariance calculation, obtain:
Figure FDA0003523014300000032
Figure FDA0003523014300000032
主成分yj的方差等于其对应的特征值λi,任意两个不同主成分之间的协方差为0,即各个主成分之间不相关。The variance of the principal component y j is equal to its corresponding eigenvalue λ i , and the covariance between any two different principal components is 0, that is, there is no correlation between the principal components.
7.根据权利要求6所述的方法,其特征在于,7. The method of claim 6, wherein 所述能源需求预测模型为多元线性回归分析模型,包括:The energy demand forecasting model is a multiple linear regression analysis model, including: Z=β01Y1′+β2Y′2+…+βkY′k Z=β 01 Y 1 ′+β 2 Y′ 2 +…+β k Y′ k 其中,假设被解释变量Z与多个解释变量Y′,Y′2,…Y′k之间具有线性关系,是解释变量的多元线性函数,β0,β1,…,βk是回归系数,解释变量Z即能源需求,解释变量Y即经济发展规划、环境政策目标、产业结构等因素经处理所构成的预测矩阵。Among them, it is assumed that there is a linear relationship between the explained variable Z and multiple explanatory variables Y′, Y′ 2 ,…Y′ k , which are multivariate linear functions of the explanatory variables, β 0 , β 1 , …, β k are regression coefficients , the explanatory variable Z is the energy demand, and the explanatory variable Y is the prediction matrix formed by the processing of economic development planning, environmental policy objectives, industrial structure and other factors. 8.根据权利要求5所述的方法,其特征在于,8. The method of claim 5, wherein 所述预设范围为85%至95%。The preset range is 85% to 95%. 9.一种能源需求预测装置,其特征在于,包括:9. An energy demand forecasting device, characterized in that it comprises: 获取模块,用于获取原始自变量数据,根据所述原始自变量数据建立原始自变量矩阵并进行标准化处理,得到标准化矩阵;其中,所述原始自变量数据包括电力行业与经济发展相关的多个类别的指标,所述指标包括工业增加值、产量和价格指数;The acquisition module is used for acquiring original independent variable data, establishing an original independent variable matrix according to the original independent variable data and performing standardization processing to obtain a standardized matrix; wherein, the original independent variable data includes a plurality of power industry and economic development related categories of indicators including industrial value added, production and price indices; 构造模块,用于根据所述标准化矩阵,得到相关系数矩阵并获取所述相关系数矩阵的特征值,根据所述特征值计算相应的特征向量,根据所述特征向量构造自变量矩阵;a construction module, configured to obtain a correlation coefficient matrix and obtain eigenvalues of the correlation coefficient matrix according to the standardized matrix, calculate corresponding eigenvectors according to the eigenvalues, and construct an independent variable matrix according to the eigenvectors; 确定模块,用于根据所述特征值确定合成主成分的贡献度,根据所述贡献度对所述自变量矩阵进行筛选,确定预设个数的各主成分,根据所述预设个数的各主成分构建预测矩阵;The determining module is configured to determine the contribution degree of the synthetic principal component according to the eigenvalue, screen the independent variable matrix according to the contribution degree, and determine a preset number of each principal component, according to the preset number of Each principal component constructs a prediction matrix; 建立模块,用于获取因变量数据,根据所述因变量数据建立因变量矩阵;其中,所述因变量数据包括能源需求历史数据;a building module for acquiring dependent variable data, and establishing a dependent variable matrix according to the dependent variable data; wherein the dependent variable data includes historical energy demand data; 构建模块,用于根据所述预测矩阵和所述因变量矩阵构建能源需求预测模型。a building module for building an energy demand forecasting model according to the forecasting matrix and the dependent variable matrix. 10.一种计算机设备,其特征在于,包括:存储器和处理器,所述存储器存储有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至8中任一项所述的能源需求预测方法。10. A computer device, comprising: a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the execution of claims 1 to 8 The energy demand forecasting method described in any one of.
CN202210186735.2A 2022-02-28 2022-02-28 Energy demand forecasting method, device and computer equipment Pending CN114638405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210186735.2A CN114638405A (en) 2022-02-28 2022-02-28 Energy demand forecasting method, device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210186735.2A CN114638405A (en) 2022-02-28 2022-02-28 Energy demand forecasting method, device and computer equipment

Publications (1)

Publication Number Publication Date
CN114638405A true CN114638405A (en) 2022-06-17

Family

ID=81947302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210186735.2A Pending CN114638405A (en) 2022-02-28 2022-02-28 Energy demand forecasting method, device and computer equipment

Country Status (1)

Country Link
CN (1) CN114638405A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116049341A (en) * 2023-03-08 2023-05-02 北京七兆科技有限公司 Hydrologic data standardization method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116049341A (en) * 2023-03-08 2023-05-02 北京七兆科技有限公司 Hydrologic data standardization method, device, equipment and storage medium
CN116049341B (en) * 2023-03-08 2023-08-15 北京七兆科技有限公司 Hydrologic data standardization method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
Rico-Juan et al. Machine learning with explainability or spatial hedonics tools? An analysis of the asking prices in the housing market in Alicante, Spain
Wang et al. Time series data mining: A case study with big data analytics approach
Deng et al. Inter-company comparison using modified TOPSIS with objective weights
CN108241901B (en) Transformer early warning evaluation method and device based on prediction data
AU2019100968A4 (en) A Credit Reporting Evaluation System Based on Mixed Machine Learning
Baur et al. Explainability and interpretability in electric load forecasting using machine learning techniques–a review
CN112288172A (en) Method and device for predicting line loss rate in station area
Irfan et al. Week Ahead Electricity Power and Price Forecasting Using Improved DenseNet-121 Method.
Ragapriya et al. Machine Learning Based House Price Prediction Using Modified Extreme Boosting
CN114638405A (en) Energy demand forecasting method, device and computer equipment
CN111680712A (en) Transformer oil temperature prediction method, device and system based on similar time of day
CN114066004A (en) GDP (graphics device performance) current prediction method based on electric power big data
CN112801415A (en) Ultra-short-term load prediction method and system based on Markov chain distribution model
Zang et al. The credit risk assessment of P2P lending based on BP neural network
Wen Application of clustering algorithm in corporate strategy and risk
CN116012053A (en) Method, device and medium for determining regional natural gas demand
CN116402528A (en) Power data processing system
CN114493035A (en) Enterprise default probability prediction method and device
Vika et al. Forecasting the Albanian Time Series with Linear and Nonlinear Univariate Models
CN114140158A (en) Power distribution network investment demand determination method, device, equipment and storage medium based on combination prediction
Hazboun Decision Support System Terms of SME’s Credit Lending Based on Machine Learning Approach
CN114139995B (en) Test area monitoring and evaluating method and device, electronic equipment and storage medium
Li Study on Early Warning on the Financial Risk of Project Venture Capital through a Neural Network Model
Beykirch et al. The value of probabilistic forecasts for electricity market bidding and scheduling under uncertainty
CN118539438B (en) Power load data prediction method, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination