CN114638555B - Power consumption behavior detection method and system based on multilayer regularization extreme learning machine - Google Patents
Power consumption behavior detection method and system based on multilayer regularization extreme learning machine Download PDFInfo
- Publication number
- CN114638555B CN114638555B CN202210536401.3A CN202210536401A CN114638555B CN 114638555 B CN114638555 B CN 114638555B CN 202210536401 A CN202210536401 A CN 202210536401A CN 114638555 B CN114638555 B CN 114638555B
- Authority
- CN
- China
- Prior art keywords
- factor
- learning machine
- extreme learning
- layer
- variable
- 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.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 92
- 230000006399 behavior Effects 0.000 title claims abstract description 39
- 238000000034 method Methods 0.000 claims abstract description 43
- 230000005611 electricity Effects 0.000 claims abstract description 38
- 230000002159 abnormal effect Effects 0.000 claims abstract description 30
- 238000012549 training Methods 0.000 claims abstract description 24
- 230000007704 transition Effects 0.000 claims abstract description 22
- 238000009826 distribution Methods 0.000 claims abstract description 17
- 238000005457 optimization Methods 0.000 claims abstract description 16
- 230000008569 process Effects 0.000 claims abstract description 12
- 230000009466 transformation Effects 0.000 claims description 75
- 238000013519 translation Methods 0.000 claims description 60
- 230000006870 function Effects 0.000 claims description 37
- 230000003044 adaptive effect Effects 0.000 claims description 30
- 239000011159 matrix material Substances 0.000 claims description 27
- 210000002569 neuron Anatomy 0.000 claims description 20
- 230000015654 memory Effects 0.000 claims description 13
- 238000003860 storage Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 3
- 230000001131 transforming effect Effects 0.000 claims 2
- 238000006243 chemical reaction Methods 0.000 abstract 2
- 238000012360 testing method Methods 0.000 description 6
- 238000013528 artificial neural network Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000010606 normalization Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000013473 artificial intelligence Methods 0.000 description 3
- 238000011156 evaluation Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000004140 cleaning Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 241000218220 Ulmaceae Species 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000013501 data transformation Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 210000004205 output neuron Anatomy 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0635—Risk analysis of enterprise or organisation activities
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/215—Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0639—Performance analysis of employees; Performance analysis of enterprise or organisation operations
- G06Q10/06393—Score-carding, benchmarking or key performance indicator [KPI] analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Economics (AREA)
- Strategic Management (AREA)
- Data Mining & Analysis (AREA)
- Entrepreneurship & Innovation (AREA)
- Marketing (AREA)
- General Engineering & Computer Science (AREA)
- Educational Administration (AREA)
- Development Economics (AREA)
- Health & Medical Sciences (AREA)
- Quality & Reliability (AREA)
- General Business, Economics & Management (AREA)
- Tourism & Hospitality (AREA)
- General Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Operations Research (AREA)
- Game Theory and Decision Science (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computational Linguistics (AREA)
- Molecular Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Evolutionary Biology (AREA)
- Public Health (AREA)
- Water Supply & Treatment (AREA)
- Primary Health Care (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Testing And Monitoring For Control Systems (AREA)
Abstract
Description
技术领域technical field
本发明属于异常用电分析技术领域,尤其涉及一种基于多层正则化极限学习机的用电行为检测方法及系统。The invention belongs to the technical field of abnormal electricity consumption analysis, and in particular relates to a method and system for detecting electricity consumption behavior based on a multi-layer regularized extreme learning machine.
背景技术Background technique
随着经济的快速发展,用户的用电需求不断增加,若用户用电行为异常将增大电网的非技术性损失,增加电力公司的运营成本。传统的用户异常用电行为检测方法是现场人员定期巡检线路、定期校验电表、用户举报等,这些手段对人的依赖性较大,需要投入大量的人力成本,同时,用电行为的检测耗时较长、效率较低。With the rapid development of the economy, the electricity demand of users continues to increase. If the user's electricity consumption behavior is abnormal, it will increase the non-technical losses of the power grid and increase the operating cost of the power company. The traditional detection methods for abnormal power consumption behavior of users are regular inspection of lines by on-site personnel, regular calibration of electricity meters, user reporting, etc. These methods are highly dependent on people and require a lot of labor costs. Time consuming and low efficiency.
对于异常用电行为检测的研究主要分为基于状态和基于人工智能两类方法。基于状态的分析方法是通过实时比较配电网的功率、电压、电流等大量数据的变化来检测异常;基于人工智能的异常用电行为检测模型则首先通过数据分析提取可以反映异常用电行为的指标,再借助人工智能的方法训练指标与用电行为检测结果之间的映射关系,完成异常用电行为检测模型的构建。但是目前的模型在参数寻优以及训练过程的时间长,并且无法适用于不同场景下的用户用电异常检测。The research on abnormal electrical behavior detection is mainly divided into two types: state-based and artificial intelligence-based methods. The state-based analysis method detects abnormality by comparing the changes of a large amount of data such as power, voltage, and current of the distribution network in real time; the artificial intelligence-based abnormal electricity consumption behavior detection model first extracts the data that can reflect the abnormal electricity consumption behavior through data analysis. Then, with the help of artificial intelligence methods, the mapping relationship between the indicators and the detection results of electricity consumption behavior is trained to complete the construction of the abnormal electricity consumption behavior detection model. However, the current model takes a long time in the parameter optimization and training process, and cannot be applied to the abnormal power consumption detection of users in different scenarios.
发明内容SUMMARY OF THE INVENTION
本发明提供一种基于多层正则化极限学习机的用电行为检测方法及系统,用于至少解决上述技术问题之一。The present invention provides a method and system for detecting electrical consumption behavior based on a multi-layer regularized extreme learning machine, which are used to solve at least one of the above technical problems.
第一方面,本发明提供一种基于多层正则化极限学习机的用电行为检测方法,包 括:获取配电网系统电力用户的原始用电数据,并基于所述原始用电数据对预设的多层正 则化极限学习机进行训练,使得到多层极限学习机检测模型,其中所述多层正则化极限学 习机的目标函数为:,式中,为调节经验 风险和结构风险的参数,为L2正则化和L1正则化的加权系数,为最小化目标函数,为输出数据样本集合,为隐含层输出矩阵,为隐含层输出权重,为L2正则化的输 出权重向量范数,为L1正则化的向量范数;基于新型自适应状态转移算法对所述多层 极限学习机检测模型进行网络参数寻优,使输出最优网络结构参数,其中输出所述最优网 络结构参数的过程包括:基于非线性自适应调整策略对变换因子进行更新,其中所述变换 因子包括旋转因子、平移因子、伸缩因子以及轴向因子,所述非线性自适应调整策略的表达 式:,式中,、、、 分别为旋转因子的最大取值、平移因子的最大取值、伸缩因子的最大取值以及轴向因子的 最大取值,为当前迭代次数,、、、分别为旋转因子满足终止条 件的最大迭代次数、平移因子满足终止条件的最大迭代次数、伸缩因子满足终止条件的最 大迭代次数以及轴向因子满足终止条件的最大迭代次数,、、、分别为旋转因子、平 移因子、伸缩因子以及轴向因子;从当前种群中选择适应度函数F达到最小值的一组值,记为,对应的适应度为,将复制为个体数为初始化种群的 个数的群体,记为,根据伸缩变换算子、旋转变换算子或轴向变换算子进行伸缩变 换得到新的种群,经过伸缩变换后的种群中的最优个体为,对应的适应度为 ,如果,则根据平移变换算子对个体进行平移变换,并更新平移变换 后的和,否则不进行平移变换,其中,为多层极限学习机检测模型第一层神经元 个数,为多层极限学习机检测模型第二层神经元个数,为多层极限学习机检测模型第三 层神经元个数;判断适应度函数是否满足最小要求或是否达到最大迭代次数,若适应度函 数满足最小要求或达到最大迭代次数,输出种群中的最优个体作为最优网络结构参数;将 在线检测数据输入至基于所述最优网络结构参数建立的多层极限学习机检测模型中,使输 出用电异常用户。 In a first aspect, the present invention provides a method for detecting electricity consumption behavior based on a multi-layer regularized extreme learning machine, including: acquiring original electricity consumption data of power users in a distribution network system, and based on the original electricity consumption data The multi-layer regularized extreme learning machine is trained to make the multi-layer extreme learning machine detection model, wherein the objective function of the multi-layer regularized extreme learning machine is: , where, To adjust the parameters of empirical risk and structural risk, are the weighting coefficients for L2 regularization and L1 regularization, To minimize the objective function, is the set of output data samples, is the output matrix of the hidden layer, output weights for the hidden layer, is the norm of the output weight vector for L2 regularization, is the vector norm of L1 regularization; based on the novel adaptive state transition algorithm, the multi-layer extreme learning machine detection model is optimized for network parameters, so that the optimal network structure parameters are output, wherein the output of the optimal network structure parameters is The process includes: updating the transformation factor based on a nonlinear adaptive adjustment strategy, wherein the transformation factor includes a rotation factor, a translation factor, a scaling factor and an axial factor, and the expression of the nonlinear adaptive adjustment strategy: , where, , , , are the maximum value of the rotation factor, the maximum value of the translation factor, the maximum value of the scaling factor and the maximum value of the axial factor, respectively, is the current iteration number, , , , are the maximum number of iterations for the rotation factor to satisfy the termination condition, the maximum number of iterations for the translation factor to satisfy the termination condition, the maximum number of iterations for the scaling factor to satisfy the termination condition, and the maximum number of iterations for the axial factor to satisfy the termination condition, , , , are the rotation factor, translation factor, scaling factor and axial factor respectively; select a group whose fitness function F reaches the minimum value from the current population value, denoted as , the corresponding fitness is ,Will The number of replicated individuals is the number of initialized populations group, denoted as , and perform scaling transformation according to the scaling transformation operator, rotation transformation operator or axial transformation operator to obtain a new population, and the optimal individual in the population after scaling transformation is , the corresponding fitness is ,if , then according to the translation operator, the individual Perform translation transformation, and update the translation transformation and , otherwise no translation transformation is performed, where, is the number of neurons in the first layer of the multi-layer extreme learning machine detection model, is the number of neurons in the second layer of the multi-layer extreme learning machine detection model, Detect the number of neurons in the third layer of the model for the multi-layer extreme learning machine; judge whether the fitness function meets the minimum requirements or whether it reaches the maximum number of iterations. If the fitness function meets the minimum requirements or reaches the maximum number of iterations, output the optimal number of the population The individual is used as the optimal network structure parameter; the online detection data is input into the multi-layer extreme learning machine detection model established based on the optimal network structure parameter, so as to output users with abnormal electricity consumption.
第二方面,本发明提供一种基于多层正则化极限学习机的用电行为检测系统,包 括:训练模块,配置为获取配电网系统电力用户的原始用电数据,并基于所述原始用电数据 对预设的多层正则化极限学习机进行训练,使得到多层极限学习机检测模型,其中所述多 层正则化极限学习机的目标函数为:,式 中,为调节经验风险和结构风险的参数,为L2正则化和L1正则化的加权系数,为 最小化目标函数,为输出数据样本集合,为隐含层输出矩阵,为隐含层输出权重,为L2正则化的输出权重向量范数,为L1正则化的向量范数;寻优模块,配置为基于 新型自适应状态转移算法对所述多层极限学习机检测模型进行网络参数寻优,使输出最优 网络结构参数,其中输出所述最优网络结构参数的过程包括:基于非线性自适应调整策略 对变换因子进行更新,其中所述变换因子包括旋转因子、平移因子、伸缩因子以及轴向因 子,所述非线性自适应调整策略的表达式:, 式中,、、、分别为旋转因子的最大取值、平移因子的最大取 值、伸缩因子的最大取值以及轴向因子的最大取值,为当前迭代次数,、、、分别为旋转因子满足终止条件的最大迭代次数、平移因子满足终止条件的最 大迭代次数、伸缩因子满足终止条件的最大迭代次数以及轴向因子满足终止条件的最大迭 代次数,、、、分别为旋转因子、平移因子、伸缩因子以及轴向因子;从当前种群中选 择适应度函数F达到最小值的一组值,记为,对应的适应度为,将复制为个体数为初始化种群的个数的群体,记为,根据伸缩变换算子、旋转变 换算子或轴向变换算子进行伸缩变换得到新的种群,经过伸缩变换后的种群中的最优个体 为,对应的适应度为,如果,则根据平移变换算子对个体进行平移变换,并更新平移变换后的和,否则不进行平移变换,其中,为 多层极限学习机检测模型第一层神经元个数,为多层极限学习机检测模型第二层神经元 个数,为多层极限学习机检测模型第三层神经元个数;判断适应度函数是否满足最小要 求或是否达到最大迭代次数,若适应度函数满足最小要求或达到最大迭代次数,输出种群 中的最优个体作为最优网络结构参数;输出模块,配置为将在线检测数据输入至基于所述 最优网络结构参数建立的多层极限学习机检测模型中,使输出用电异常用户。 In a second aspect, the present invention provides an electricity consumption behavior detection system based on a multi-layer regularized extreme learning machine, comprising: a training module configured to obtain original electricity consumption data of power users in a distribution network system, and based on the original electricity consumption data The electrical data trains the preset multi-layer regularized extreme learning machine, so that the multi-layer extreme learning machine detection model is obtained, wherein the objective function of the multi-layer regularized extreme learning machine is: , where, To adjust the parameters of empirical risk and structural risk, are the weighting coefficients for L2 regularization and L1 regularization, To minimize the objective function, is the set of output data samples, is the output matrix of the hidden layer, output weights for the hidden layer, is the norm of the output weight vector for L2 regularization, is the vector norm of L1 regularization; the optimization module is configured to optimize the network parameters of the multi-layer extreme learning machine detection model based on the novel adaptive state transition algorithm, so as to output the optimal network structure parameters, wherein the output of the The process of optimizing the network structure parameters includes: updating the transformation factor based on a nonlinear adaptive adjustment strategy, wherein the transformation factor includes a rotation factor, a translation factor, a scaling factor and an axial factor, and the nonlinear adaptive adjustment strategy expression: , where, , , , are the maximum value of the rotation factor, the maximum value of the translation factor, the maximum value of the scaling factor and the maximum value of the axial factor, respectively, is the current iteration number, , , , are the maximum number of iterations for the rotation factor to satisfy the termination condition, the maximum number of iterations for the translation factor to satisfy the termination condition, the maximum number of iterations for the scaling factor to satisfy the termination condition, and the maximum number of iterations for the axial factor to satisfy the termination condition, , , , are the rotation factor, translation factor, scaling factor and axial factor respectively; select a group whose fitness function F reaches the minimum value from the current population value, denoted as , the corresponding fitness is ,Will The number of replicated individuals is the number of initialized populations group, denoted as , and perform scaling transformation according to the scaling transformation operator, rotation transformation operator or axial transformation operator to obtain a new population, and the optimal individual in the population after scaling transformation is , the corresponding fitness is ,if , then according to the translation operator, the individual Perform translation transformation, and update the translation transformation and , otherwise no translation transformation is performed, where, is the number of neurons in the first layer of the multi-layer extreme learning machine detection model, is the number of neurons in the second layer of the multi-layer extreme learning machine detection model, Detect the number of neurons in the third layer of the model for the multi-layer extreme learning machine; judge whether the fitness function meets the minimum requirements or whether it reaches the maximum number of iterations. If the fitness function meets the minimum requirements or reaches the maximum number of iterations, output the optimal number of the population The individual is used as the optimal network structure parameter; the output module is configured to input the online detection data into the multi-layer extreme learning machine detection model established based on the optimal network structure parameter, so as to output abnormal electricity users.
第三方面,提供一种电子设备,其包括:至少一个处理器,以及与所述至少一个处理器通信连接的存储器,其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明任一实施例的基于多层正则化极限学习机的用电行为检测方法的步骤。In a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, The instructions are executed by the at least one processor, so that the at least one processor can execute the steps of the method for detecting electrical behavior based on a multi-layer regularized extreme learning machine according to any embodiment of the present invention.
第四方面,本发明还提供一种计算机可读存储介质,其上存储有计算机程序,所述程序指令被处理器执行时,使所述处理器执行本发明任一实施例的基于多层正则化极限学习机的用电行为检测方法的步骤。In a fourth aspect, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program instructions are executed by a processor, the processor is caused to execute the multi-layer regularization based on any embodiment of the present invention. The steps of the method for detecting the electrical behavior of the extreme learning machine.
本申请的基于多层正则化极限学习机的用电行为检测方法及系统,能够实现用户用电异常的精准检测,而且大大降低了模型在参数寻优以及训练过程中的时间,此外,对于不同场景下的用户用电异常检测也能有很好的适应性和高效性。The method and system for detecting electricity consumption behavior based on the multi-layer regularized extreme learning machine of the present application can realize the accurate detection of abnormal electricity consumption of users, and greatly reduce the time of the model in the process of parameter optimization and training. The abnormal electricity consumption detection of users in the scene can also have good adaptability and efficiency.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.
图1为本发明一实施例提供的一种基于多层正则化极限学习机的用电行为检测方法的流程图;1 is a flowchart of a method for detecting electricity consumption behavior based on a multi-layer regularized extreme learning machine provided by an embodiment of the present invention;
图2为本发明一实施例提供一个具体实施例的基于多层正则化极限学习机的用电行为检测方法的流程图;2 is a flowchart of a method for detecting electricity consumption behavior based on a multi-layer regularized extreme learning machine according to an embodiment of the present invention;
图3为本发明一实施例提供的一种基于多层正则化极限学习机的用电行为检测系统的结构框图;3 is a structural block diagram of a system for detecting electricity consumption behavior based on a multi-layer regularized extreme learning machine provided by an embodiment of the present invention;
图4是本发明一实施例提供的电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments These are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
请参阅图1,其示出了本申请的一种基于多层正则化极限学习机的用电行为检测方法的流程图。Please refer to FIG. 1 , which shows a flowchart of a method for detecting electricity consumption behavior based on a multi-layer regularized extreme learning machine of the present application.
如图1所示,步骤S101,获取配电网系统电力用户的原始用电数据,并基于所述原始用电数据对预设的多层正则化极限学习机进行训练,使得到多层极限学习机检测模型。As shown in FIG. 1 , in step S101 , the original power consumption data of power users in the distribution network system is obtained, and based on the original power consumption data, a preset multi-layer regularized extreme learning machine is trained, so that the multi-layer extreme learning machine is trained. machine detection model.
在本实施例中,多层正则化极限学习机,引入了L1和L2正则化的加权和来降低模型结构化风险,充分利用了L1和L2正则化的优点,L1正则化可以产生稀疏的权值矩阵,给予多层极限学习机隐含层特征提取不同的关注度,起到特征选择的作用,有利于模型学习到更好的特征表示;L2正则化可以有效限制多层极限学习机模型权值参数数量,从而有效降低模型的复杂度,提升模型的稳定性。结合二者的优势,可以实现多层极限学习机模型网络结构的优化,不仅可以达到简化模型,防止过拟合的作用,而且还具有较为出色的学习能力和泛化性能。In this embodiment, the multi-layer regularized extreme learning machine introduces the weighted sum of L1 and L2 regularization to reduce the risk of model structuring, and makes full use of the advantages of L1 and L2 regularization. L1 regularization can generate sparse weights The value matrix gives different attention to the feature extraction of the hidden layer of the multi-layer extreme learning machine, which plays a role in feature selection, which is conducive to the model learning better feature representation; L2 regularization can effectively limit the weight of the multi-layer extreme learning machine model. The number of value parameters can effectively reduce the complexity of the model and improve the stability of the model. Combining the advantages of the two can realize the optimization of the network structure of the multi-layer extreme learning machine model, which can not only simplify the model and prevent over-fitting, but also have excellent learning ability and generalization performance.
综上,本实施例的方法采用多层极限学习机检测模型,可以充分学习隐藏于数据内部的用电行为隐性特征,同时起到特征筛选的功能,既简化了检测模型,又提高了检测精确度,节省了时间成本。To sum up, the method of this embodiment adopts a multi-layer extreme learning machine detection model, which can fully learn the hidden features of electricity consumption behavior hidden in the data, and at the same time play the function of feature screening, which not only simplifies the detection model, but also improves the detection. Accuracy saves time and cost.
步骤S102,基于新型自适应状态转移算法对所述多层极限学习机检测模型进行网络参数寻优,使输出最优网络结构参数。Step S102 , based on a novel adaptive state transition algorithm, network parameters are optimized for the multi-layer extreme learning machine detection model, so that optimal network structure parameters are output.
在本实施例中,通过非线性自适应调整策略对变换因子进行非线性自适应处理,使得在迭代初期变换因子能够以较快的速度下降,到了迭代后期变换因子的变化趋于平稳,从而能够快速、精确、高效地实现多层极限学习机模型超参数的寻优,使得多层极限学习机模型具有出色的用户用电异常检测能力。In this embodiment, nonlinear adaptive processing is performed on the transformation factor through a nonlinear adaptive adjustment strategy, so that the transformation factor can decrease at a faster speed in the early stage of the iteration, and the change of the transformation factor tends to be stable in the later stage of the iteration, so that it can be The optimization of the hyperparameters of the multi-layer extreme learning machine model can be realized quickly, accurately and efficiently, so that the multi-layer extreme learning machine model has an excellent ability to detect abnormal power consumption of users.
步骤S103,将在线检测数据输入至基于所述最优网络结构参数建立的多层极限学习机检测模型中,使输出用电异常用户。Step S103 , input the online detection data into the multi-layer extreme learning machine detection model established based on the optimal network structure parameters, so that users with abnormal electricity consumption are output.
综上,本申请的方法能够实现用户用电异常的精准检测,而且大大降低了模型在参数寻优以及训练过程中的时间,此外,对于不同场景下的用户用电异常检测也能有很好的适应性和高效性。To sum up, the method of the present application can realize the accurate detection of abnormal electricity consumption of users, and greatly reduce the time in the process of parameter optimization and training of the model. adaptability and efficiency.
请参阅图2,其示出了本申请的一个具体实施例的基于多层正则化极限学习机的用电行为检测方法的流程图。Please refer to FIG. 2 , which shows a flowchart of a method for detecting electricity consumption behavior based on a multi-layer regularized extreme learning machine according to a specific embodiment of the present application.
如图2所示,基于多层正则化极限学习机的用电行为检测方法具体包括以下步骤:As shown in Figure 2, the method for detecting electrical behavior based on the multi-layer regularized extreme learning machine specifically includes the following steps:
步骤1:数据采集Step 1: Data Acquisition
从用电采集系统和能量管理系统获取配电网系统电力用户的原始用电数据,其中包括用户的用电基本信息数据,终端的告警信息数据和该地区用户的窃电信息数据。Obtain the original power consumption data of the power users in the distribution network system from the power consumption acquisition system and the energy management system, including the basic information data of the user's power consumption, the alarm information data of the terminal and the electricity stealing information data of the users in the area.
步骤2:数据预处理Step 2: Data Preprocessing
数据清洗:数据清洗是指删除原始数据中的冗余、无关数据,从而平滑数据噪声。公用事业等非居民用户一般不会存在异常用电行为,可将此类非居民用户的用电数据删除。Data cleaning: Data cleaning refers to removing redundant and irrelevant data in the original data, thereby smoothing out data noise. Non-resident users such as public utilities generally do not have abnormal electricity consumption behavior, and the electricity consumption data of such non-resident users can be deleted.
缺失值处理:用电采集系统记录的数据会由于采集设备故障、传输丢包等原因存在部分缺失,若直接忽略缺失样本,会导致日线损率数据误差较大,从而降低异常用电行为检测的精确度。为了避免缺失值的影响,采用插补法对缺失值进行处理。Missing value processing: The data recorded by the power consumption collection system may be partially missing due to the failure of the collection equipment, transmission packet loss, etc. If the missing samples are directly ignored, the data error of the daily line loss rate will be large, thereby reducing the detection of abnormal power consumption behavior. accuracy. In order to avoid the influence of missing values, the imputation method is used to deal with missing values.
数据变换:对数据进行规范化处理,即转换数据格式使之适应于本发明提出的检测技术。根据数据特点,可以从规范化处理和属性构造两个方面进行数据变化。规范化处理将具有不同量纲的数据转换到同一量纲,将数据规定到一个较小的范围。采用最小-最大规范化可达到规范化处理的目的,其公式为:Data transformation: normalize the data, that is, transform the data format to make it suitable for the detection technology proposed by the present invention. According to the characteristics of the data, data changes can be carried out from two aspects: normalization processing and attribute construction. Normalization transforms data with different dimensions into the same dimension, specifying the data to a smaller range. The purpose of normalization can be achieved by using min-max normalization, and its formula is:
, (1) , (1)
式中,为归一化后的样本数据,为样本数据实际值,为样本数据最小值,为样本数据最大值; In the formula, is the normalized sample data, is the actual value of the sample data, is the minimum value of the sample data, is the maximum value of the sample data;
步骤3:构建基于多层正则化极限学习机的多层极限学习机检测模型Step 3: Build a multi-layer extreme learning machine detection model based on a multi-layer regularized extreme learning machine
1)模型输入1) Model input
将经过预处理的样本数据集按8:2的比例划分为训练集和测试集,基于训练集训练多层极限学习机,测试集作为模型性能评价的输入数据。The preprocessed sample data set is divided into training set and test set according to the ratio of 8:2, and the multi-layer extreme learning machine is trained based on the training set, and the test set is used as the input data for model performance evaluation.
2)构建多层正则化极限学习机2) Build a multi-layer regularized extreme learning machine
极限学习机(ELM)是一种单隐含层前馈神经网络,ELM算法随机产生输入与隐含层 的连接权值及隐含层神经网络的阈值,在训练过程中无需调整,只需对隐含层神经元个数 进行设定,就可获得求解问题的全局最优解。该方法与传统前馈神经网络相比,其学习速度 快,泛化性能好,不易陷入局部最优解。对于N个训练样本,基本ELM算法的 表达形式如下: Extreme Learning Machine (ELM) is a single hidden layer feedforward neural network. The ELM algorithm randomly generates the connection weights between the input and the hidden layer and the threshold of the hidden layer neural network. It does not need to be adjusted during the training process. By setting the number of neurons in the hidden layer, the global optimal solution to the problem can be obtained. Compared with the traditional feedforward neural network, this method has fast learning speed and good generalization performance, and it is not easy to fall into the local optimal solution. For N training samples , the expression of the basic ELM algorithm is as follows:
, (2) , (2)
式中,为隐含层神经元的个数,是训练样本的数量,为与输入对应的第个隐层神经元的输出,为第个隐含层神经元与输出神经元之间的连接权向量,表 示隐含层激活函数,为第j个输入样本,为与第j个输入样本与第i个隐含节点相连的 输入权重,为第i个隐含节点的阈值,ELM算法通过最小化输出权重保证神经网络的泛 化能力,通常取最小二乘解。 In the formula, is the number of neurons in the hidden layer, is the number of training samples, for and input the corresponding The output of a hidden layer neuron, for the first The connection weight vector between the hidden layer neurons and the output neurons, represents the hidden layer activation function, is the jth input sample, is the input weight connected to the jth input sample and the ith hidden node, is the threshold of the ith hidden node, the ELM algorithm minimizes the output weight by To ensure the generalization ability of the neural network, the least squares solution is usually taken.
公式(2)的矩阵表示为:The matrix of formula (2) is expressed as:
, (3) , (3)
式中,为隐含层输出矩阵,为隐含层输出权重,为输出数据样本集合; In the formula, is the output matrix of the hidden layer, output weights for the hidden layer, is a collection of output data samples;
训练ELM相当于求解的最小标准二乘数解,其表达式为: Training an ELM is equivalent to solving The least standard squares solution of , its expression is:
, (4) , (4)
是矩阵的Moore-Penrose广义逆矩阵。 Yes Moore-Penrose generalized inverse of a matrix.
在深度学习中,网络参数过多会导致训练模型出现过拟合现象,因此为了得到更好的训练模型,引入L2和L1的加权正则化项的代价函数来求取输出权值,从而得到如下公式:In deep learning, too many network parameters will lead to overfitting of the training model. Therefore, in order to obtain a better training model, the cost function of the weighted regularization term of L2 and L1 is introduced to obtain the output weight, thus obtaining the following formula:
, (5) , (5)
式中,为调节经验风险和结构风险的参数,为L2正则化和L1正则化的加权系 数,为最小化目标函数,为输出数据样本集合,为隐含层输出矩阵,为隐含层输 出权重,为L2正则化的输出权重向量范数,为L1正则化的向量范数; In the formula, To adjust the parameters of empirical risk and structural risk, are the weighting coefficients for L2 regularization and L1 regularization, To minimize the objective function, is the set of output data samples, is the output matrix of the hidden layer, output weights for the hidden layer, is the norm of the output weight vector for L2 regularization, is the vector norm of L1 regularization;
对目标函数(5)进行求导,可以得到输出权重,如下公式所示: Differentiate the objective function (5) to get the output weight , as shown in the following formula:
, (6) , (6)
ELM-AE(extreme learning machine-AutoEncoder,极限学习机-自动编码器)和传统ELM的主要区别在于,ELM是一种监督学习算法,其输出为对应标签。而ELM-AE是一种无监督学习算法,它的输出即为其输入的映射,ELM-AE的隐层输出可用式,其网络输出可用式(7)- 式(8)表示。The main difference between ELM-AE (extreme learning machine-AutoEncoder) and traditional ELM is that ELM is a supervised learning algorithm whose output is the corresponding label. And ELM-AE is an unsupervised learning algorithm, its output is the mapping of its input, the hidden layer output of ELM-AE can be expressed by formula, and its network output can be expressed by formula (7) - formula (8).
, (7) , (7)
式中,分别为输入层与隐含层之间的权重向量和偏置向量,为转置,为单 位对角矩阵,为输入样本; In the formula, are the weight vector and bias vector between the input layer and the hidden layer, respectively, to transpose, is a unit diagonal matrix, is the input sample;
, (8) , (8)
ELM-AE隐层参数在随机生成后需要进行正交化。将输入数据映射到随机子空间。 与ELM随机初始化输入权重和隐层偏置相比,正交化可以更好地捕获输入数据的各种边缘 特征,从而使模型能够有效地学习数据的非线性结构。输出权重可通过式(6)进行计算。 ELM-AE hidden layer parameters need to be orthogonalized after random generation. Map input data to random subspaces. Compared with ELMs that randomly initialize input weights and hidden layer biases, orthogonalization can better capture various edge features of input data, enabling the model to effectively learn the nonlinear structure of the data. output weight It can be calculated by formula (6).
ML-ELM(Multilayer extreme learning machine,多层极限学习机)利用ELM-AE训练时,第i+1个隐层的输入即为第i个隐层上的输出,如式(9)表示。When ML-ELM (Multilayer extreme learning machine, multi-layer extreme learning machine) uses ELM-AE training, the input of the i+1th hidden layer is the output of the ith hidden layer, as shown in Equation (9).
, (9) , (9)
其中,为第个隐层的输出,当取值为1时,即为整个模型的输入,为ELM- AE对第个隐层和第个隐层训练时的权值矩阵。 in, for the first The output of a hidden layer, when When the value is 1, it is the input of the entire model. for ELM-AE on the first hidden layer and The weight matrix of the hidden layers during training.
步骤4:使用新型自适应状态转移算法对多层极限学习机检测模型进行参数优化,确定最佳检测模型Step 4: Use the new adaptive state transition algorithm to optimize the parameters of the multi-layer extreme learning machine detection model to determine the best detection model
首先使用状态变换算子、邻域与采样来产生候选解,然后通过选择和更新来替换当前最优解,最后采取交替轮换策略来实现不同状态变换算子的调用。状态变换算子主要有四种变换方式,分别是旋转变换算子、平移变换算子、伸缩变换算子和轴向变换算子。First, state transformation operators, neighborhoods and sampling are used to generate candidate solutions, and then the current optimal solution is replaced by selection and update. Finally, an alternate rotation strategy is adopted to implement the calling of different state transformation operators. The state transformation operator mainly has four transformation modes, namely rotation transformation operator, translation transformation operator, scaling transformation operator and axial transformation operator.
1)旋转变换算子:1) Rotation transformation operator:
, (10) , (10)
式中,为旋转因子,为超参数变量k时刻的状态,即当前状态,为元素服从 [-1,1]均匀分布的随机矩阵,为超参数变量k+1时刻的状态,为随机矩阵的维数。 旋转变换算子能够产生在以为半径的超球体内的候选解。 In the formula, is the twiddle factor, is the state of the hyperparameter variable k at time, that is, the current state, is a random matrix whose elements are uniformly distributed in [-1,1], is the state at the moment of hyperparameter variable k+1, is a random matrix dimension. The rotation transform operator can be generated at is a candidate solution within a hypersphere of radius.
2)平移变换算子:2) Translation operator:
, (11) , (11)
式中,为超参数变量k+1时刻的状态,为超参数变量k时刻的状态,即当前 状态,为超参数变量k-1时刻的状态,为超参数变量k时刻与k-1时刻之差 的2范数,为元素服从[0,1]均匀分布的随机数,为平移因子。平移变换算子能够实现在到直线范围内以最大长度为进行搜索的功能。 In the formula, is the state at the moment of hyperparameter variable k+1, is the state of the hyperparameter variable k at time, that is, the current state, is the state of the hyperparameter variable k-1 time, is the 2-norm of the difference between the hyperparameter variable k time and k-1 time, is a random number whose elements are uniformly distributed in [0,1], is the translation factor. The translation transform operator can be implemented in arrive Within the range of the straight line, the maximum length is The ability to search.
3)伸缩变换算子3) Scaling transformation operator
, (12) , (12)
式中,为超参数变量k时刻的状态,即当前状态,为超参数变量k+1时刻的 状态,为平移因子,为元素服从高斯分布的随机对角矩阵。伸缩变换算子将的每个 元素进行范围内的放缩。 In the formula, is the state of the hyperparameter variable k at time, that is, the current state, is the state at the moment of hyperparameter variable k+1, is the translation factor, is a random diagonal matrix with elements from a Gaussian distribution. The scaling operator will for each element of zoom in range.
4)轴向变换算子4) Axial transformation operator
, (13) , (13)
式中,为超参数变量k+1时刻的状态,为超参数变量k时刻的状态,即当前 状态,为轴向因子,为非零元素服从高斯分布的稀疏随机对角矩阵。轴向变换算子的 功能是增强单一维度的搜索。 In the formula, is the state at the moment of hyperparameter variable k+1, is the state of the hyperparameter variable k at time, that is, the current state, is the axial factor, is a sparse random diagonal matrix with nonzero elements following a Gaussian distribution. The function of the axial transform operator is to enhance the search in a single dimension.
对变换因子进行调整,使其前期取较大值来获得较大的下降率,后期取较小值来增加算法寻优的成功率。加入自适应变换因子的新型状态转移算法的即加速了寻优过程,也避免了优化算法陷入局部最优解。变换因子的非线性自适应调整策略表达式如下:The transformation factor is adjusted so that it takes a larger value in the early stage to obtain a larger drop rate, and a smaller value in the later stage to increase the success rate of algorithm optimization. The new state transition algorithm with adaptive transformation factor accelerates the optimization process and avoids the optimization algorithm from falling into a local optimal solution. The expression of the nonlinear adaptive adjustment strategy of the transformation factor is as follows:
,(14) , (14)
式中,、、、分别为旋转因子的最大取值、平移因子的 最大取值、伸缩因子的最大取值以及轴向因子的最大取值,为当前迭代次数,、、、分别为旋转因子满足终止条件的最大迭代次数、平移因子满足终止 条件的最大迭代次数、伸缩因子满足终止条件的最大迭代次数以及轴向因子满足终止条件 的最大迭代次数,、、、分别为旋转因子、平移因子、伸缩因子以及轴向因子。 In the formula, , , , are the maximum value of the rotation factor, the maximum value of the translation factor, the maximum value of the scaling factor and the maximum value of the axial factor, respectively, is the current iteration number, , , , are the maximum number of iterations for the rotation factor to satisfy the termination condition, the maximum number of iterations for the translation factor to satisfy the termination condition, the maximum number of iterations for the scaling factor to satisfy the termination condition, and the maximum number of iterations for the axial factor to satisfy the termination condition, , , , They are rotation factor, translation factor, scaling factor and axial factor, respectively.
在多层正则化极限学习机中,将隐含层的层数设定为3,由于每一隐层的神经元个 数,正则化因子以及和正则化的权重系数是影响多层核极限学习机对用户异常用 电行为检测的重要因素,本发明采用新型自适应状态转移算法对多层极限学习机检测模型 进行参数优化,寻找的最优的超参数,使得多层正则化极 限学习机模型对用户异常用电行为检测能力最佳。 In the multi-layer regularized extreme learning machine, the number of hidden layers is set to 3, because the number of neurons in each hidden layer , the regularization factor and and Regularized weight coefficients It is an important factor affecting the detection of abnormal power consumption behavior of users by the multi-layer core extreme learning machine. , so that the multi-layer regularized extreme learning machine model has the best ability to detect abnormal power consumption behavior of users.
采用新型自适应状态转移算法对多层正则化极限学习机网络参数进行优化问题可用如下公式来表示:The optimization problem of multi-layer regularized extreme learning machine network parameters using a new adaptive state transition algorithm can be expressed by the following formula:
, (15) , (15)
式中,为变量空间中的当前状态,为状态转移矩阵,为训练样本总数,为被正确检测样本的个数,为适应度函数,即为用户异常用电行为检测错 误率。 In the formula, is the current state in the variable space, is the state transition matrix, is the total number of training samples, is the number of correctly detected samples, is the fitness function, that is, the detection error rate of abnormal power consumption behavior of users.
采用新型自适应状态转移算法对多层正则化极限学习机的网络结构参数寻优的过程如下:The process of optimizing the network structure parameters of the multi-layer regularized extreme learning machine using the new adaptive state transition algorithm is as follows:
步骤A:初始化种群的个数为,STA算法初始化参数,旋转因子, 平移因子,伸缩因子,轴向因子,最大迭代次数为100,在可行域内 随机均匀初始化5个变量,产生初始种群,产生组初始可行解。 Step A: The number of initialized populations is , STA algorithm initialization parameters, twiddle factor , the translation factor , the scaling factor , the axial factor , the maximum number of iterations is 100, initialized randomly and uniformly in the feasible region 5 variables, generating the initial population, generating group of initial feasible solutions.
步骤B:由式(14)对变换因子进行更新。Step B: The transformation factor is updated according to formula (14).
步骤C:从当前种群中选择适应度函数达到最小值的一组值,记 为,对应的适应度为,将复制为个体数为的群体,记为,按公式(12)进 行伸缩变换得到新的种群,经过伸缩变换后的种群中的最优个体为,对应的适应度 为,如果,则按式(11)对个体进行平移变换,并更新平移变换 后的和,否则不进行平移变换。 Step C: Choose a fitness function from the current population A group that reaches the minimum value, denoted as , the corresponding fitness is ,Will The number of replicates as individuals is group, denoted as , perform scaling transformation according to formula (12) to obtain a new population, and the optimal individual in the population after scaling transformation is , the corresponding fitness is ,if , then according to formula (11) for the individual Perform translation transformation, and update the translation transformation and , otherwise no translation transformation is performed.
步骤D:将复制为个体数为的群体,然后按照公式(10)进行旋转变换得到 新的种群,选择新种群中的最优个体,计算其对应的适应度.如果,按照式(11)进行平移变换,并更新平移变换后的和,否则不进行 平移变换。 Step D: put The number of replicates as individuals is , and then perform rotation transformation according to formula (10) to obtain a new population, and select the optimal individual in the new population , calculate its corresponding fitness .if , perform translation transformation according to formula (11), and update the translation transformed and , otherwise no translation transformation is performed.
步骤E:采取与步骤C类似的种群选择和更新过程,不同的是通过式(13)轴向变换 来产生新的种群,然后采取与步骤C一样的做法来更新平移变换后的和。 Step E: adopt the same population selection and update process as step C, except that a new population is generated by the axial transformation of formula (13), and then the same method as step C is taken to update the translationally transformed and .
步骤F:判断适应度函数是否满足最小要求或是否达到最大迭代次数,否则,重复步骤(B)至(E)。达到终止条件,输出种群中的最优个体作为多层正则化极限学习机的网络结构参数。Step F: Determine whether the fitness function satisfies the minimum requirement or reaches the maximum number of iterations, otherwise, repeat steps (B) to (E). When the termination condition is reached, the optimal individual in the population is output as the network structure parameter of the multi-layer regularized extreme learning machine.
步骤5:模型评估Step 5: Model Evaluation
采用新型自适应状态转移算法对多层正则化极限学习机的网络结构参数进行寻找后,按照最优网络结构参数建立多层极限学习机检测模型,然后通过训练集对检测模型再进行训练,最后利用测试集来验证模型的检测性能。采取划分的测试集上对性能最优的多层极限学习机检测模型进行准确度测试,结果表明本发明提出的采用新型自适应状态转移算法优化后的检测模型在精确度、f1得分(f1 score)和AUC(Area Under Curve)这些综合评价指标上有显著的提升。模型在测试集上的表现和时间效率上,均显示了基于新型自适应状态转移算法寻优后的多层极限学习机检测模型在用户异常用电检测中的有效性。The new adaptive state transfer algorithm is used to find the network structure parameters of the multi-layer regularized extreme learning machine, and the multi-layer extreme learning machine detection model is established according to the optimal network structure parameters, and then the detection model is retrained through the training set. Use the test set to verify the detection performance of the model. The accuracy test of the multi-layer extreme learning machine detection model with the best performance is carried out on the divided test set, and the results show that the detection model optimized by the novel adaptive state transition algorithm proposed by the present invention is in the accuracy, f1 score (f1 score). ) and AUC (Area Under Curve), these comprehensive evaluation indicators have significantly improved. The performance of the model on the test set and the time efficiency show the effectiveness of the multi-layer extreme learning machine detection model optimized by the novel adaptive state transition algorithm in the detection of abnormal power consumption of users.
将在线采集的数据经过数据预处理,输入到训练之后的检测模型,获取模型检测结果,判定是否发生异常用电。The data collected online is preprocessed and input into the trained detection model to obtain the model detection results and determine whether abnormal power consumption occurs.
请参阅图3,其示出了本申请的一种基于多层正则化极限学习机的用电行为检测系统的结构框图。Please refer to FIG. 3 , which shows a structural block diagram of an electrical behavior detection system based on a multi-layer regularized extreme learning machine of the present application.
如图3所示,用电行为检测系统200,包括训练模块210、寻优模块220以及输出模块230。As shown in FIG. 3 , the electrical
其中,训练模块210,配置为获取配电网系统电力用户的原始用电数据,并基于所
述原始用电数据对预设的多层正则化极限学习机进行训练,使得到多层极限学习机检测模
型,其中所述多层正则化极限学习机的目标函数为:,式中,为调节经验风险和结构风险的
参数,为L2正则化和L1正则化的加权系数,为最小化目标函数,为输出数据样本
集合,为隐含层输出矩阵,为隐含层输出权重,为L2正则化的输出权重向量范数,为L1正则化的向量范数;寻优模块220,配置为基于新型自适应状态转移算法对所述多
层极限学习机检测模型进行网络参数寻优,使输出最优网络结构参数,其中输出所述最优
网络结构参数的过程包括:基于非线性自适应调整策略对变换因子进行更新,其中所述变
换因子包括旋转因子、平移因子、伸缩因子以及轴向因子,所述非线性自适应调整策略的表
达式:,式中,、、、分别为旋转因子的最大取值、平移因子的最大取值、伸缩因子的最大取值以及轴向
因子的最大取值,为当前迭代次数,、、、分别为旋转因子满足
终止条件的最大迭代次数、平移因子满足终止条件的最大迭代次数、伸缩因子满足终止条
件的最大迭代次数以及轴向因子满足终止条件的最大迭代次数,、、、分别为旋转因
子、平移因子、伸缩因子以及轴向因子;从当前种群中选择适应度函数F达到最小值的一组值,记为,对应的适应度为,将复制为个体数为初始化种群的
个数的群体,记为,根据伸缩变换算子、旋转变换算子或轴向变换算子进行伸缩变
换得到新的种群,经过伸缩变换后的种群中的最优个体为,对应的适应度为
,如果,则根据平移变换算子对个体进行平移变换,并更新平移变换
后的和,否则不进行平移变换,其中,为多层极限学习机检测模型第一层神经元
个数,为多层极限学习机检测模型第二层神经元个数,为多层极限学习机检测模型第三
层神经元个数;判断适应度函数是否满足最小要求或是否达到最大迭代次数,若适应度函
数满足最小要求或达到最大迭代次数,输出种群中的最优个体作为最优网络结构参数;输
出模块230,配置为将在线检测数据输入至基于所述最优网络结构参数建立的多层极限学
习机检测模型中,使输出用电异常用户。
Among them, the training module 210 is configured to obtain the original power consumption data of the power users of the distribution network system, and to train the preset multi-layer regularized extreme learning machine based on the original power consumption data, so that the multi-layer extreme learning machine detection model, wherein the objective function of the multi-layer regularized extreme learning machine is: , where, To adjust the parameters of empirical risk and structural risk, are the weighting coefficients for L2 regularization and L1 regularization, To minimize the objective function, is the set of output data samples, is the output matrix of the hidden layer, output weights for the hidden layer, is the norm of the output weight vector for L2 regularization, is the L1 regularized vector norm; the optimization module 220 is configured to optimize the network parameters of the multi-layer extreme learning machine detection model based on the novel adaptive state transition algorithm, so as to output the optimal network structure parameters, wherein the output The process of the optimal network structure parameters includes: updating the transformation factor based on a nonlinear adaptive adjustment strategy, wherein the transformation factor includes a rotation factor, a translation factor, a scaling factor and an axial factor, and the nonlinear adaptive adjustment strategy expression: , where, , , , are the maximum value of the rotation factor, the maximum value of the translation factor, the maximum value of the scaling factor and the maximum value of the axial factor, respectively, is the current iteration number, , , , are the maximum number of iterations for the rotation factor to satisfy the termination condition, the maximum number of iterations for the translation factor to satisfy the termination condition, the maximum number of iterations for the scaling factor to satisfy the termination condition, and the maximum number of iterations for the axial factor to satisfy the termination condition, , , , are the rotation factor, translation factor, scaling factor and axial factor respectively; select a group whose fitness function F reaches the minimum value from the current population value, denoted as , the corresponding fitness is ,Will The number of replicated individuals is the number of initialized populations group, denoted as , and perform scaling transformation according to the scaling transformation operator, rotation transformation operator or axial transformation operator to obtain a new population, and the optimal individual in the population after scaling transformation is , the corresponding fitness is ,if , then according to the translation operator, the individual Perform translation transformation, and update the translation transformation and , otherwise no translation transformation is performed, where, is the number of neurons in the first layer of the multi-layer extreme learning machine detection model, is the number of neurons in the second layer of the multi-layer extreme learning machine detection model, Detect the number of neurons in the third layer of the model for the multi-layer extreme learning machine; judge whether the fitness function meets the minimum requirements or whether it reaches the maximum number of iterations. If the fitness function meets the minimum requirements or reaches the maximum number of iterations, output the optimal number of the population The individual is used as the optimal network structure parameter; the
应当理解,图3中记载的诸模块与参考图1中描述的方法中的各个步骤相对应。由此,上文针对方法描述的操作和特征以及相应的技术效果同样适用于图3中的诸模块,在此不再赘述。It should be understood that the modules recited in FIG. 3 correspond to various steps in the method described with reference to FIG. 1 . Therefore, the operations and features described above with respect to the method and the corresponding technical effects are also applicable to the modules in FIG. 3 , which will not be repeated here.
在另一些实施例中,本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述程序指令被处理器执行时,使所述处理器执行上述任意方法实施例中的基于多层正则化极限学习机的用电行为检测方法;In other embodiments, embodiments of the present invention further provide a computer-readable storage medium on which a computer program is stored, and when the program instructions are executed by a processor, the processor is caused to execute any of the above method embodiments The detection method of electricity consumption based on the multi-layer regularized extreme learning machine in ;
作为一种实施方式,本发明的计算机可读存储介质存储有计算机可执行指令,计算机可执行指令设置为:As an embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are set to:
获取配电网系统电力用户的原始用电数据,并基于所述原始用电数据对预设的多层正则化极限学习机进行训练,使得到多层极限学习机检测模型;Obtaining the original power consumption data of the power users of the distribution network system, and training the preset multi-layer regularized extreme learning machine based on the original power consumption data, so that the multi-layer extreme learning machine detects the model;
基于新型自适应状态转移算法对所述多层极限学习机检测模型进行网络参数寻优,使输出最优网络结构参数;Based on the novel adaptive state transition algorithm, the multi-layer extreme learning machine detection model is optimized for network parameters, so as to output the optimal network structure parameters;
将在线检测数据输入至基于所述最优网络结构参数建立的多层极限学习机检测模型中,使输出用电异常用户。The online detection data is input into the multi-layer extreme learning machine detection model established based on the optimal network structure parameters, so as to output users with abnormal electricity consumption.
计算机可读存储介质可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据基于多层正则化极限学习机的用电行为检测系统的使用所创建的数据等。此外,计算机可读存储介质可以包括高速随机存取存储器,还可以包括存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,计算机可读存储介质可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至基于多层正则化极限学习机的用电行为检测系统。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The computer-readable storage medium can include a stored program area and a stored data area, wherein the stored program area can store an operating system and an application program required by at least one function; Data created by the use of electrical behavior detection systems, etc. In addition, the computer-readable storage medium may include high-speed random access memory, and may also include memory such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the computer-readable storage medium may optionally include memories disposed remotely relative to the processor, and these remote memories may be connected to the electrical behavior detection system based on the multi-layer regularized extreme learning machine through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
图4是本发明实施例提供的电子设备的结构示意图,如图4所示,该设备包括:一个处理器310以及存储器320。电子设备还可以包括:输入装置330和输出装置340。处理器310、存储器320、输入装置330和输出装置340可以通过总线或者其他方式连接,图4中以通过总线连接为例。存储器320为上述的计算机可读存储介质。处理器310通过运行存储在存储器320中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例基于多层正则化极限学习机的用电行为检测方法。输入装置330可接收输入的数字或字符信息,以及产生与基于多层正则化极限学习机的用电行为检测系统的用户设置以及功能控制有关的键信号输入。输出装置340可包括显示屏等显示设备。FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. As shown in FIG. 4 , the device includes: a
上述电子设备可执行本发明实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本发明实施例所提供的方法。The above electronic device can execute the method provided by the embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
作为一种实施方式,上述电子设备应用于基于多层正则化极限学习机的用电行为检测系统中,用于客户端,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够:As an implementation manner, the electronic device described above is applied in an electrical behavior detection system based on a multi-layer regularized extreme learning machine, used for a client, including: at least one processor; and a memory communicatively connected to the at least one processor ; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
获取配电网系统电力用户的原始用电数据,并基于所述原始用电数据对预设的多层正则化极限学习机进行训练,使得到多层极限学习机检测模型;Obtaining the original power consumption data of the power users of the distribution network system, and training the preset multi-layer regularized extreme learning machine based on the original power consumption data, so that the multi-layer extreme learning machine detects the model;
基于新型自适应状态转移算法对所述多层极限学习机检测模型进行网络参数寻优,使输出最优网络结构参数;Based on the novel adaptive state transition algorithm, the multi-layer extreme learning machine detection model is optimized for network parameters, so as to output the optimal network structure parameters;
将在线检测数据输入至基于所述最优网络结构参数建立的多层极限学习机检测模型中,使输出用电异常用户。The online detection data is input into the multi-layer extreme learning machine detection model established based on the optimal network structure parameters, so as to output users with abnormal electricity consumption.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分的方法。From the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on this understanding, the above-mentioned technical solutions can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic Discs, optical discs, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods of various embodiments or portions of embodiments.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210536401.3A CN114638555B (en) | 2022-05-18 | 2022-05-18 | Power consumption behavior detection method and system based on multilayer regularization extreme learning machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210536401.3A CN114638555B (en) | 2022-05-18 | 2022-05-18 | Power consumption behavior detection method and system based on multilayer regularization extreme learning machine |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114638555A CN114638555A (en) | 2022-06-17 |
CN114638555B true CN114638555B (en) | 2022-09-16 |
Family
ID=81953066
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210536401.3A Active CN114638555B (en) | 2022-05-18 | 2022-05-18 | Power consumption behavior detection method and system based on multilayer regularization extreme learning machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114638555B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106650920A (en) * | 2017-02-19 | 2017-05-10 | 郑州大学 | Prediction model based on optimized extreme learning machine (ELM) |
Family Cites Families (26)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103942453A (en) * | 2014-05-07 | 2014-07-23 | 华北电力大学 | Intelligent electricity utilization anomaly detection method for non-technical loss |
CN104537033B (en) * | 2014-12-23 | 2017-08-11 | 清华大学 | Interval type indices prediction method based on Bayesian network and extreme learning machine |
CN105203869A (en) * | 2015-09-06 | 2015-12-30 | 国网山东省电力公司烟台供电公司 | Microgrid island detection method based on extreme learning machine |
CN105160437A (en) * | 2015-09-25 | 2015-12-16 | 国网浙江省电力公司 | Load model prediction method based on extreme learning machine |
CN105550744A (en) * | 2015-12-06 | 2016-05-04 | 北京工业大学 | Nerve network clustering method based on iteration |
CN105976051A (en) * | 2016-04-29 | 2016-09-28 | 武汉大学 | Wavelet transformation and improved firefly-optimized extreme learning machine-based short-term load prediction method |
WO2017197626A1 (en) * | 2016-05-19 | 2017-11-23 | 江南大学 | Extreme learning machine method for improving artificial bee colony optimization |
CN106650797B (en) * | 2016-12-07 | 2020-12-04 | 广东电网有限责任公司江门供电局 | Power distribution network electricity stealing suspicion user intelligent identification method based on integrated ELM |
CN106790248B (en) * | 2017-01-23 | 2020-07-03 | 中南大学 | A network intrusion detection method based on dual adaptive regularization online extreme learning machine |
US20200063665A1 (en) * | 2018-01-25 | 2020-02-27 | Dalian University Of Technology | Aero-engine full flight envelope model adaptive modification method based on deep learning algorithm |
CN108664990B (en) * | 2018-03-29 | 2020-09-18 | 清华大学 | Electricity stealing detection method and device based on comprehensive entropy method and density clustering method |
CN109146705B (en) * | 2018-07-02 | 2022-04-12 | 昆明理工大学 | Method for detecting electricity stealing by using electricity characteristic index dimension reduction and extreme learning machine algorithm |
CN109359723A (en) * | 2018-11-20 | 2019-02-19 | 北京科技大学 | Prediction method of manganese content at the end point of converter based on improved regularized extreme learning machine |
CN109657147B (en) * | 2018-12-21 | 2022-11-11 | 岭南师范学院 | Detection method of abnormal users of microblog based on firefly and weighted extreme learning machine |
CN110084324B (en) * | 2019-05-10 | 2021-05-04 | 杭州电子科技大学 | Adaptive update method of Kalman filter parameters based on extreme learning machine |
CN110147890A (en) * | 2019-05-13 | 2019-08-20 | 湖北工业大学 | A kind of method and system based on lion group's algorithm optimization extreme learning machine integrated study |
CN110363384A (en) * | 2019-06-03 | 2019-10-22 | 杭州电子科技大学 | Abnormal power consumption detection method based on deep weighted neural network |
CN111416797B (en) * | 2020-02-25 | 2022-07-05 | 江西理工大学 | Intrusion detection method for optimizing regularization extreme learning machine by improving longicorn herd algorithm |
CN111541237B (en) * | 2020-04-02 | 2021-08-27 | 浙江大学 | Wind power nonparametric interval prediction method based on opportunity constraint extreme learning machine |
CN111539492B (en) * | 2020-07-08 | 2020-11-20 | 武汉格蓝若智能技术有限公司 | Abnormal electricity utilization judgment system and method based on reinforcement learning |
CN111860638B (en) * | 2020-07-17 | 2022-06-28 | 湖南大学 | Parallel intrusion detection method and system based on unbalanced data deep belief network |
CN113408610B (en) * | 2021-06-18 | 2022-10-25 | 北京理工大学 | Image identification method based on adaptive matrix iteration extreme learning machine |
CN113435595B (en) * | 2021-07-08 | 2024-02-06 | 南京理工大学 | Two-stage optimization method for network parameters of extreme learning machine based on natural evolution strategy |
CN113627075B (en) * | 2021-07-19 | 2024-04-09 | 南京理工大学 | Projectile pneumatic coefficient identification method based on adaptive particle swarm optimization extreme learning |
CN113392594B (en) * | 2021-08-13 | 2021-11-30 | 北京科技大学 | Mechanical property interval prediction method and device based on ABC extreme learning machine |
CN113723517B (en) * | 2021-08-31 | 2024-11-22 | 北京理工大学 | An image classification method based on state transfer extreme learning machine |
-
2022
- 2022-05-18 CN CN202210536401.3A patent/CN114638555B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106650920A (en) * | 2017-02-19 | 2017-05-10 | 郑州大学 | Prediction model based on optimized extreme learning machine (ELM) |
Also Published As
Publication number | Publication date |
---|---|
CN114638555A (en) | 2022-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113486078B (en) | Distributed power distribution network operation monitoring method and system | |
CN113702895B (en) | Online quantitative evaluation method for error state of voltage transformer | |
CN108062572A (en) | A method and system for fault diagnosis of hydropower units based on DdAE deep learning model | |
CN115618296A (en) | Anomaly detection method for time-series data of dam monitoring based on graph attention network | |
CN116451117A (en) | Power data anomaly detection method based on federal learning | |
CN114118150A (en) | A method and system for line selection of single-phase grounding fault in distribution network | |
CN118330386B (en) | Novel high-resistance ground fault positioning method for power distribution system with self-adaptive topology change | |
CN111695611B (en) | Bee colony optimization kernel extreme learning and sparse representation mechanical fault identification method | |
CN116484740A (en) | A Line Parameter Identification Method Based on Mining Spatial Topological Features of Power Grid | |
CN115546558A (en) | Electrical equipment insulation fault state classification method and device and storage medium | |
CN114528547B (en) | ICPS unsupervised online attack detection method and device based on community feature selection | |
CN114897204A (en) | Method and device for predicting short-term wind speed of offshore wind farm | |
CN116417992B (en) | Fan power prediction model establishment method and application based on space-time attention mechanism | |
CN114861792A (en) | Complex power grid key node identification method based on deep reinforcement learning | |
CN118898303A (en) | Medium- and long-term wind power forecasting combined model method and system based on deep reinforcement learning | |
CN116933114A (en) | CNN-LSTM-based direct-current micro-grid detection method and device | |
CN119514999A (en) | Multi-dimensional auxiliary decision analysis method and system for distribution network power supply based on machine learning | |
CN114841199A (en) | Power distribution network fault diagnosis method, device, equipment and readable storage medium | |
CN117421636A (en) | Training method, system and storage medium for time sequence power data anomaly detection model | |
CN114221334A (en) | Rapid state estimation method based on graph neural network | |
CN116248472A (en) | Cloud edge end system fault prediction method based on neural Hox process | |
CN113762591B (en) | Short-term electric quantity prediction method and system based on GRU and multi-core SVM countermeasure learning | |
CN114638555B (en) | Power consumption behavior detection method and system based on multilayer regularization extreme learning machine | |
CN114841266A (en) | A voltage sag identification method based on triple prototype network with small samples | |
CN117407675A (en) | Lightning arrester leakage current prediction method based on multi-variable reconstruction combined dynamic weight |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |