[go: up one dir, main page]

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 PDF

Info

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
Application number
CN202210536401.3A
Other languages
Chinese (zh)
Other versions
CN114638555A (en
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.)
State Grid Jiangxi Comprehensive Energy Service Co ltd
State Grid Corp of China SGCC
North China Electric Power University
Original Assignee
State Grid Jiangxi Comprehensive Energy Service Co ltd
State Grid Corp of China SGCC
North China Electric Power University
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 State Grid Jiangxi Comprehensive Energy Service Co ltd, State Grid Corp of China SGCC, North China Electric Power University filed Critical State Grid Jiangxi Comprehensive Energy Service Co ltd
Priority to CN202210536401.3A priority Critical patent/CN114638555B/en
Publication of CN114638555A publication Critical patent/CN114638555A/en
Application granted granted Critical
Publication of CN114638555B publication Critical patent/CN114638555B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0635Risk analysis of enterprise or organisation activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • 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

  • 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

The invention discloses a power utilization behavior detection method and a system based on a multilayer regularization extreme learning machine, wherein the method comprises the following steps: acquiring original power consumption data of power users of a power distribution network system, and training a preset multilayer regularization extreme learning machine based on the original power consumption data to obtain a multilayer extreme learning machine detection model; carrying out network parameter optimization on the multilayer extreme learning machine detection model based on a novel self-adaptive state transition algorithm to output an optimal network structure parameter; and inputting the online detection data into a multilayer extreme learning machine detection model established based on the optimal network structure parameters, so as to output users with abnormal electricity utilization. The network structure parameters of the detection model of the multilayer regularization extreme learning machine are adjusted and optimized according to a novel self-adaptive state transition algorithm, and the conversion factors of the state transition algorithm are adjusted to enable the conversion factors to have the nonlinear self-adaptive characteristic, so that the network structure parameter optimizing process of the multilayer regularization extreme learning machine is simple and easy to implement.

Description

基于多层正则化极限学习机的用电行为检测方法及系统Electricity behavior detection method and system based on multi-layer regularized extreme learning machine

技术领域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.

第一方面,本发明提供一种基于多层正则化极限学习机的用电行为检测方法,包 括:获取配电网系统电力用户的原始用电数据,并基于所述原始用电数据对预设的多层正 则化极限学习机进行训练,使得到多层极限学习机检测模型,其中所述多层正则化极限学 习机的目标函数为:

Figure 36617DEST_PATH_IMAGE001
,式中,
Figure 342965DEST_PATH_IMAGE002
为调节经验 风险和结构风险的参数,
Figure 705813DEST_PATH_IMAGE003
为L2正则化和L1正则化的加权系数,
Figure 148427DEST_PATH_IMAGE004
为最小化目标函数,
Figure 305739DEST_PATH_IMAGE005
为输出数据样本集合,
Figure 833803DEST_PATH_IMAGE006
为隐含层输出矩阵,
Figure 469184DEST_PATH_IMAGE007
为隐含层输出权重,
Figure 890938DEST_PATH_IMAGE008
为L2正则化的输 出权重向量范数,
Figure 593052DEST_PATH_IMAGE009
为L1正则化的向量范数;基于新型自适应状态转移算法对所述多层 极限学习机检测模型进行网络参数寻优,使输出最优网络结构参数,其中输出所述最优网 络结构参数的过程包括:基于非线性自适应调整策略对变换因子进行更新,其中所述变换 因子包括旋转因子、平移因子、伸缩因子以及轴向因子,所述非线性自适应调整策略的表达 式:
Figure 467467DEST_PATH_IMAGE010
,式中,
Figure 47484DEST_PATH_IMAGE011
Figure 589324DEST_PATH_IMAGE012
Figure 822859DEST_PATH_IMAGE013
Figure 325516DEST_PATH_IMAGE014
分别为旋转因子的最大取值、平移因子的最大取值、伸缩因子的最大取值以及轴向因子的 最大取值,
Figure 37120DEST_PATH_IMAGE015
为当前迭代次数,
Figure 574412DEST_PATH_IMAGE016
Figure 978848DEST_PATH_IMAGE017
Figure 93435DEST_PATH_IMAGE018
Figure 982631DEST_PATH_IMAGE019
分别为旋转因子满足终止条 件的最大迭代次数、平移因子满足终止条件的最大迭代次数、伸缩因子满足终止条件的最 大迭代次数以及轴向因子满足终止条件的最大迭代次数,
Figure 499063DEST_PATH_IMAGE020
Figure 74401DEST_PATH_IMAGE021
Figure 551650DEST_PATH_IMAGE022
Figure 136215DEST_PATH_IMAGE023
分别为旋转因子、平 移因子、伸缩因子以及轴向因子;从当前种群中选择适应度函数F达到最小值的一组
Figure 116940DEST_PATH_IMAGE024
值,记为
Figure 128759DEST_PATH_IMAGE025
,对应的适应度为
Figure 686779DEST_PATH_IMAGE026
,将
Figure 950401DEST_PATH_IMAGE025
复制为个体数为初始化种群的 个数
Figure 910267DEST_PATH_IMAGE027
的群体,记为
Figure 827407DEST_PATH_IMAGE028
,根据伸缩变换算子、旋转变换算子或轴向变换算子进行伸缩变 换得到新的种群,经过伸缩变换后的种群中的最优个体为
Figure 777784DEST_PATH_IMAGE029
,对应的适应度为
Figure 438572DEST_PATH_IMAGE030
,如果
Figure 393890DEST_PATH_IMAGE031
,则根据平移变换算子对个体
Figure 747511DEST_PATH_IMAGE029
进行平移变换,并更新平移变换 后的
Figure 280123DEST_PATH_IMAGE025
Figure 619969DEST_PATH_IMAGE026
,否则不进行平移变换,其中,
Figure 820006DEST_PATH_IMAGE032
为多层极限学习机检测模型第一层神经元 个数,
Figure 344528DEST_PATH_IMAGE033
为多层极限学习机检测模型第二层神经元个数,
Figure 974224DEST_PATH_IMAGE034
为多层极限学习机检测模型第三 层神经元个数;判断适应度函数是否满足最小要求或是否达到最大迭代次数,若适应度函 数满足最小要求或达到最大迭代次数,输出种群中的最优个体作为最优网络结构参数;将 在线检测数据输入至基于所述最优网络结构参数建立的多层极限学习机检测模型中,使输 出用电异常用户。 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:
Figure 36617DEST_PATH_IMAGE001
, where,
Figure 342965DEST_PATH_IMAGE002
To adjust the parameters of empirical risk and structural risk,
Figure 705813DEST_PATH_IMAGE003
are the weighting coefficients for L2 regularization and L1 regularization,
Figure 148427DEST_PATH_IMAGE004
To minimize the objective function,
Figure 305739DEST_PATH_IMAGE005
is the set of output data samples,
Figure 833803DEST_PATH_IMAGE006
is the output matrix of the hidden layer,
Figure 469184DEST_PATH_IMAGE007
output weights for the hidden layer,
Figure 890938DEST_PATH_IMAGE008
is the norm of the output weight vector for L2 regularization,
Figure 593052DEST_PATH_IMAGE009
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:
Figure 467467DEST_PATH_IMAGE010
, where,
Figure 47484DEST_PATH_IMAGE011
,
Figure 589324DEST_PATH_IMAGE012
,
Figure 822859DEST_PATH_IMAGE013
,
Figure 325516DEST_PATH_IMAGE014
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,
Figure 37120DEST_PATH_IMAGE015
is the current iteration number,
Figure 574412DEST_PATH_IMAGE016
,
Figure 978848DEST_PATH_IMAGE017
,
Figure 93435DEST_PATH_IMAGE018
,
Figure 982631DEST_PATH_IMAGE019
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,
Figure 499063DEST_PATH_IMAGE020
,
Figure 74401DEST_PATH_IMAGE021
,
Figure 551650DEST_PATH_IMAGE022
,
Figure 136215DEST_PATH_IMAGE023
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
Figure 116940DEST_PATH_IMAGE024
value, denoted as
Figure 128759DEST_PATH_IMAGE025
, the corresponding fitness is
Figure 686779DEST_PATH_IMAGE026
,Will
Figure 950401DEST_PATH_IMAGE025
The number of replicated individuals is the number of initialized populations
Figure 910267DEST_PATH_IMAGE027
group, denoted as
Figure 827407DEST_PATH_IMAGE028
, 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
Figure 777784DEST_PATH_IMAGE029
, the corresponding fitness is
Figure 438572DEST_PATH_IMAGE030
,if
Figure 393890DEST_PATH_IMAGE031
, then according to the translation operator, the individual
Figure 747511DEST_PATH_IMAGE029
Perform translation transformation, and update the translation transformation
Figure 280123DEST_PATH_IMAGE025
and
Figure 619969DEST_PATH_IMAGE026
, otherwise no translation transformation is performed, where,
Figure 820006DEST_PATH_IMAGE032
is the number of neurons in the first layer of the multi-layer extreme learning machine detection model,
Figure 344528DEST_PATH_IMAGE033
is the number of neurons in the second layer of the multi-layer extreme learning machine detection model,
Figure 974224DEST_PATH_IMAGE034
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.

第二方面,本发明提供一种基于多层正则化极限学习机的用电行为检测系统,包 括:训练模块,配置为获取配电网系统电力用户的原始用电数据,并基于所述原始用电数据 对预设的多层正则化极限学习机进行训练,使得到多层极限学习机检测模型,其中所述多 层正则化极限学习机的目标函数为:

Figure 507973DEST_PATH_IMAGE001
,式 中,
Figure 296938DEST_PATH_IMAGE002
为调节经验风险和结构风险的参数,
Figure 366263DEST_PATH_IMAGE003
为L2正则化和L1正则化的加权系数,
Figure 873468DEST_PATH_IMAGE004
为 最小化目标函数,
Figure 820695DEST_PATH_IMAGE005
为输出数据样本集合,
Figure 464166DEST_PATH_IMAGE006
为隐含层输出矩阵,
Figure 596070DEST_PATH_IMAGE007
为隐含层输出权重,
Figure 200358DEST_PATH_IMAGE008
为L2正则化的输出权重向量范数,
Figure 75910DEST_PATH_IMAGE009
为L1正则化的向量范数;寻优模块,配置为基于 新型自适应状态转移算法对所述多层极限学习机检测模型进行网络参数寻优,使输出最优 网络结构参数,其中输出所述最优网络结构参数的过程包括:基于非线性自适应调整策略 对变换因子进行更新,其中所述变换因子包括旋转因子、平移因子、伸缩因子以及轴向因 子,所述非线性自适应调整策略的表达式:
Figure 839467DEST_PATH_IMAGE010
, 式中,
Figure 752059DEST_PATH_IMAGE011
Figure 233856DEST_PATH_IMAGE012
Figure 21421DEST_PATH_IMAGE013
Figure 639484DEST_PATH_IMAGE014
分别为旋转因子的最大取值、平移因子的最大取 值、伸缩因子的最大取值以及轴向因子的最大取值,
Figure 847612DEST_PATH_IMAGE015
为当前迭代次数,
Figure 426492DEST_PATH_IMAGE016
Figure 643846DEST_PATH_IMAGE017
Figure 116416DEST_PATH_IMAGE018
Figure 636390DEST_PATH_IMAGE019
分别为旋转因子满足终止条件的最大迭代次数、平移因子满足终止条件的最 大迭代次数、伸缩因子满足终止条件的最大迭代次数以及轴向因子满足终止条件的最大迭 代次数,
Figure 827200DEST_PATH_IMAGE020
Figure 458033DEST_PATH_IMAGE021
Figure 316267DEST_PATH_IMAGE022
Figure 866197DEST_PATH_IMAGE023
分别为旋转因子、平移因子、伸缩因子以及轴向因子;从当前种群中选 择适应度函数F达到最小值的一组
Figure 918205DEST_PATH_IMAGE024
值,记为
Figure 211783DEST_PATH_IMAGE025
,对应的适应度为
Figure 658945DEST_PATH_IMAGE026
,将
Figure 520721DEST_PATH_IMAGE025
复制为个体数为初始化种群的个数
Figure 686123DEST_PATH_IMAGE027
的群体,记为
Figure 658759DEST_PATH_IMAGE028
,根据伸缩变换算子、旋转变 换算子或轴向变换算子进行伸缩变换得到新的种群,经过伸缩变换后的种群中的最优个体 为
Figure 960427DEST_PATH_IMAGE029
,对应的适应度为
Figure 852160DEST_PATH_IMAGE030
,如果
Figure 380224DEST_PATH_IMAGE031
,则根据平移变换算子对个体
Figure 15605DEST_PATH_IMAGE029
进行平移变换,并更新平移变换后的
Figure 437359DEST_PATH_IMAGE025
Figure 139473DEST_PATH_IMAGE026
,否则不进行平移变换,其中,
Figure 279468DEST_PATH_IMAGE032
为 多层极限学习机检测模型第一层神经元个数,
Figure 452960DEST_PATH_IMAGE033
为多层极限学习机检测模型第二层神经元 个数,
Figure 870166DEST_PATH_IMAGE035
为多层极限学习机检测模型第三层神经元个数;判断适应度函数是否满足最小要 求或是否达到最大迭代次数,若适应度函数满足最小要求或达到最大迭代次数,输出种群 中的最优个体作为最优网络结构参数;输出模块,配置为将在线检测数据输入至基于所述 最优网络结构参数建立的多层极限学习机检测模型中,使输出用电异常用户。 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:
Figure 507973DEST_PATH_IMAGE001
, where,
Figure 296938DEST_PATH_IMAGE002
To adjust the parameters of empirical risk and structural risk,
Figure 366263DEST_PATH_IMAGE003
are the weighting coefficients for L2 regularization and L1 regularization,
Figure 873468DEST_PATH_IMAGE004
To minimize the objective function,
Figure 820695DEST_PATH_IMAGE005
is the set of output data samples,
Figure 464166DEST_PATH_IMAGE006
is the output matrix of the hidden layer,
Figure 596070DEST_PATH_IMAGE007
output weights for the hidden layer,
Figure 200358DEST_PATH_IMAGE008
is the norm of the output weight vector for L2 regularization,
Figure 75910DEST_PATH_IMAGE009
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:
Figure 839467DEST_PATH_IMAGE010
, where,
Figure 752059DEST_PATH_IMAGE011
,
Figure 233856DEST_PATH_IMAGE012
,
Figure 21421DEST_PATH_IMAGE013
,
Figure 639484DEST_PATH_IMAGE014
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,
Figure 847612DEST_PATH_IMAGE015
is the current iteration number,
Figure 426492DEST_PATH_IMAGE016
,
Figure 643846DEST_PATH_IMAGE017
,
Figure 116416DEST_PATH_IMAGE018
,
Figure 636390DEST_PATH_IMAGE019
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,
Figure 827200DEST_PATH_IMAGE020
,
Figure 458033DEST_PATH_IMAGE021
,
Figure 316267DEST_PATH_IMAGE022
,
Figure 866197DEST_PATH_IMAGE023
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
Figure 918205DEST_PATH_IMAGE024
value, denoted as
Figure 211783DEST_PATH_IMAGE025
, the corresponding fitness is
Figure 658945DEST_PATH_IMAGE026
,Will
Figure 520721DEST_PATH_IMAGE025
The number of replicated individuals is the number of initialized populations
Figure 686123DEST_PATH_IMAGE027
group, denoted as
Figure 658759DEST_PATH_IMAGE028
, 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
Figure 960427DEST_PATH_IMAGE029
, the corresponding fitness is
Figure 852160DEST_PATH_IMAGE030
,if
Figure 380224DEST_PATH_IMAGE031
, then according to the translation operator, the individual
Figure 15605DEST_PATH_IMAGE029
Perform translation transformation, and update the translation transformation
Figure 437359DEST_PATH_IMAGE025
and
Figure 139473DEST_PATH_IMAGE026
, otherwise no translation transformation is performed, where,
Figure 279468DEST_PATH_IMAGE032
is the number of neurons in the first layer of the multi-layer extreme learning machine detection model,
Figure 452960DEST_PATH_IMAGE033
is the number of neurons in the second layer of the multi-layer extreme learning machine detection model,
Figure 870166DEST_PATH_IMAGE035
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:

Figure 103701DEST_PATH_IMAGE036
, (1)
Figure 103701DEST_PATH_IMAGE036
, (1)

式中,

Figure 465412DEST_PATH_IMAGE037
为归一化后的样本数据,
Figure 583541DEST_PATH_IMAGE038
为样本数据实际值,
Figure 979887DEST_PATH_IMAGE039
为样本数据最小值,
Figure 525269DEST_PATH_IMAGE040
为样本数据最大值; In the formula,
Figure 465412DEST_PATH_IMAGE037
is the normalized sample data,
Figure 583541DEST_PATH_IMAGE038
is the actual value of the sample data,
Figure 979887DEST_PATH_IMAGE039
is the minimum value of the sample data,
Figure 525269DEST_PATH_IMAGE040
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个训练样本

Figure 108697DEST_PATH_IMAGE041
,基本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
Figure 108697DEST_PATH_IMAGE041
, the expression of the basic ELM algorithm is as follows:

Figure 889572DEST_PATH_IMAGE042
, (2)
Figure 889572DEST_PATH_IMAGE042
, (2)

式中,

Figure 779905DEST_PATH_IMAGE043
为隐含层神经元的个数,
Figure 620822DEST_PATH_IMAGE044
是训练样本的数量,
Figure 691546DEST_PATH_IMAGE045
为与输入
Figure 885898DEST_PATH_IMAGE046
对应的第
Figure 256837DEST_PATH_IMAGE047
个隐层神经元的输出,
Figure 144021DEST_PATH_IMAGE048
为第
Figure 967621DEST_PATH_IMAGE047
个隐含层神经元与输出神经元之间的连接权向量,
Figure 90298DEST_PATH_IMAGE049
表 示隐含层激活函数,
Figure 191109DEST_PATH_IMAGE050
为第j个输入样本,
Figure 108249DEST_PATH_IMAGE051
为与第j个输入样本与第i个隐含节点相连的 输入权重,
Figure 419145DEST_PATH_IMAGE052
为第i个隐含节点的阈值,ELM算法通过最小化输出权重
Figure 453835DEST_PATH_IMAGE053
保证神经网络的泛 化能力,通常取最小二乘解。 In the formula,
Figure 779905DEST_PATH_IMAGE043
is the number of neurons in the hidden layer,
Figure 620822DEST_PATH_IMAGE044
is the number of training samples,
Figure 691546DEST_PATH_IMAGE045
for and input
Figure 885898DEST_PATH_IMAGE046
the corresponding
Figure 256837DEST_PATH_IMAGE047
The output of a hidden layer neuron,
Figure 144021DEST_PATH_IMAGE048
for the first
Figure 967621DEST_PATH_IMAGE047
The connection weight vector between the hidden layer neurons and the output neurons,
Figure 90298DEST_PATH_IMAGE049
represents the hidden layer activation function,
Figure 191109DEST_PATH_IMAGE050
is the jth input sample,
Figure 108249DEST_PATH_IMAGE051
is the input weight connected to the jth input sample and the ith hidden node,
Figure 419145DEST_PATH_IMAGE052
is the threshold of the ith hidden node, the ELM algorithm minimizes the output weight by
Figure 453835DEST_PATH_IMAGE053
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:

Figure 799365DEST_PATH_IMAGE054
, (3)
Figure 799365DEST_PATH_IMAGE054
, (3)

式中,

Figure 887407DEST_PATH_IMAGE055
为隐含层输出矩阵,
Figure 295386DEST_PATH_IMAGE056
为隐含层输出权重,
Figure 25445DEST_PATH_IMAGE057
为输出数据样本集合; In the formula,
Figure 887407DEST_PATH_IMAGE055
is the output matrix of the hidden layer,
Figure 295386DEST_PATH_IMAGE056
output weights for the hidden layer,
Figure 25445DEST_PATH_IMAGE057
is a collection of output data samples;

训练ELM相当于求解

Figure 959902DEST_PATH_IMAGE053
的最小标准二乘数解,其表达式为: Training an ELM is equivalent to solving
Figure 959902DEST_PATH_IMAGE053
The least standard squares solution of , its expression is:

Figure 359791DEST_PATH_IMAGE058
, (4)
Figure 359791DEST_PATH_IMAGE058
, (4)

Figure 379700DEST_PATH_IMAGE059
Figure 647870DEST_PATH_IMAGE060
矩阵的Moore-Penrose广义逆矩阵。
Figure 379700DEST_PATH_IMAGE059
Yes
Figure 647870DEST_PATH_IMAGE060
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:

Figure 577780DEST_PATH_IMAGE001
, (5)
Figure 577780DEST_PATH_IMAGE001
, (5)

式中,

Figure 7624DEST_PATH_IMAGE002
为调节经验风险和结构风险的参数,
Figure 154309DEST_PATH_IMAGE003
为L2正则化和L1正则化的加权系 数,
Figure 960591DEST_PATH_IMAGE004
为最小化目标函数,
Figure 604062DEST_PATH_IMAGE005
为输出数据样本集合,
Figure 470387DEST_PATH_IMAGE006
为隐含层输出矩阵,
Figure 340254DEST_PATH_IMAGE007
为隐含层输 出权重,
Figure 950227DEST_PATH_IMAGE008
为L2正则化的输出权重向量范数,
Figure 589150DEST_PATH_IMAGE009
为L1正则化的向量范数; In the formula,
Figure 7624DEST_PATH_IMAGE002
To adjust the parameters of empirical risk and structural risk,
Figure 154309DEST_PATH_IMAGE003
are the weighting coefficients for L2 regularization and L1 regularization,
Figure 960591DEST_PATH_IMAGE004
To minimize the objective function,
Figure 604062DEST_PATH_IMAGE005
is the set of output data samples,
Figure 470387DEST_PATH_IMAGE006
is the output matrix of the hidden layer,
Figure 340254DEST_PATH_IMAGE007
output weights for the hidden layer,
Figure 950227DEST_PATH_IMAGE008
is the norm of the output weight vector for L2 regularization,
Figure 589150DEST_PATH_IMAGE009
is the vector norm of L1 regularization;

对目标函数(5)进行求导,可以得到输出权重

Figure 626376DEST_PATH_IMAGE007
,如下公式所示: Differentiate the objective function (5) to get the output weight
Figure 626376DEST_PATH_IMAGE007
, as shown in the following formula:

Figure 842594DEST_PATH_IMAGE061
, (6)
Figure 842594DEST_PATH_IMAGE061
, (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).

Figure 131624DEST_PATH_IMAGE062
, (7)
Figure 131624DEST_PATH_IMAGE062
, (7)

式中,

Figure 280845DEST_PATH_IMAGE063
分别为输入层与隐含层之间的权重向量和偏置向量,
Figure 128453DEST_PATH_IMAGE064
为转置,
Figure 831967DEST_PATH_IMAGE065
为单 位对角矩阵,
Figure 783743DEST_PATH_IMAGE066
为输入样本; In the formula,
Figure 280845DEST_PATH_IMAGE063
are the weight vector and bias vector between the input layer and the hidden layer, respectively,
Figure 128453DEST_PATH_IMAGE064
to transpose,
Figure 831967DEST_PATH_IMAGE065
is a unit diagonal matrix,
Figure 783743DEST_PATH_IMAGE066
is the input sample;

Figure 397258DEST_PATH_IMAGE067
, (8)
Figure 397258DEST_PATH_IMAGE067
, (8)

ELM-AE隐层参数在随机生成后需要进行正交化。将输入数据映射到随机子空间。 与ELM随机初始化输入权重和隐层偏置相比,正交化可以更好地捕获输入数据的各种边缘 特征,从而使模型能够有效地学习数据的非线性结构。输出权重

Figure 776286DEST_PATH_IMAGE007
可通过式(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
Figure 776286DEST_PATH_IMAGE007
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).

Figure 967096DEST_PATH_IMAGE068
, (9)
Figure 967096DEST_PATH_IMAGE068
, (9)

其中,

Figure 597929DEST_PATH_IMAGE069
为第
Figure 190584DEST_PATH_IMAGE070
个隐层的输出,当
Figure 615881DEST_PATH_IMAGE070
取值为1时,即为整个模型的输入,
Figure 559566DEST_PATH_IMAGE071
为ELM- AE对第
Figure 23783DEST_PATH_IMAGE070
个隐层和第
Figure 611890DEST_PATH_IMAGE072
个隐层训练时的权值矩阵。 in,
Figure 597929DEST_PATH_IMAGE069
for the first
Figure 190584DEST_PATH_IMAGE070
The output of a hidden layer, when
Figure 615881DEST_PATH_IMAGE070
When the value is 1, it is the input of the entire model.
Figure 559566DEST_PATH_IMAGE071
for ELM-AE on the first
Figure 23783DEST_PATH_IMAGE070
hidden layer and
Figure 611890DEST_PATH_IMAGE072
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:

Figure 598301DEST_PATH_IMAGE073
, (10)
Figure 598301DEST_PATH_IMAGE073
, (10)

式中,

Figure 498124DEST_PATH_IMAGE020
为旋转因子,
Figure 470759DEST_PATH_IMAGE074
为超参数变量k时刻的状态,即当前状态,
Figure 38006DEST_PATH_IMAGE075
为元素服从 [-1,1]均匀分布的随机矩阵,
Figure 70685DEST_PATH_IMAGE076
为超参数变量k+1时刻的状态,
Figure 457804DEST_PATH_IMAGE077
为随机矩阵
Figure 93184DEST_PATH_IMAGE078
的维数。 旋转变换算子能够产生在以
Figure 154419DEST_PATH_IMAGE020
为半径的超球体内的候选解。 In the formula,
Figure 498124DEST_PATH_IMAGE020
is the twiddle factor,
Figure 470759DEST_PATH_IMAGE074
is the state of the hyperparameter variable k at time, that is, the current state,
Figure 38006DEST_PATH_IMAGE075
is a random matrix whose elements are uniformly distributed in [-1,1],
Figure 70685DEST_PATH_IMAGE076
is the state at the moment of hyperparameter variable k+1,
Figure 457804DEST_PATH_IMAGE077
is a random matrix
Figure 93184DEST_PATH_IMAGE078
dimension. The rotation transform operator can be generated at
Figure 154419DEST_PATH_IMAGE020
is a candidate solution within a hypersphere of radius.

2)平移变换算子:2) Translation operator:

Figure 482632DEST_PATH_IMAGE079
, (11)
Figure 482632DEST_PATH_IMAGE079
, (11)

式中,

Figure 357047DEST_PATH_IMAGE080
为超参数变量k+1时刻的状态,
Figure 405906DEST_PATH_IMAGE081
为超参数变量k时刻的状态,即当前 状态,
Figure 947746DEST_PATH_IMAGE082
为超参数变量k-1时刻的状态,
Figure 181281DEST_PATH_IMAGE083
为超参数变量k时刻与k-1时刻之差 的2范数,
Figure 418358DEST_PATH_IMAGE084
为元素服从[0,1]均匀分布的随机数,
Figure 661121DEST_PATH_IMAGE021
为平移因子。平移变换算子能够实现在
Figure 791888DEST_PATH_IMAGE085
Figure 337270DEST_PATH_IMAGE086
直线范围内以最大长度为
Figure 186277DEST_PATH_IMAGE021
进行搜索的功能。 In the formula,
Figure 357047DEST_PATH_IMAGE080
is the state at the moment of hyperparameter variable k+1,
Figure 405906DEST_PATH_IMAGE081
is the state of the hyperparameter variable k at time, that is, the current state,
Figure 947746DEST_PATH_IMAGE082
is the state of the hyperparameter variable k-1 time,
Figure 181281DEST_PATH_IMAGE083
is the 2-norm of the difference between the hyperparameter variable k time and k-1 time,
Figure 418358DEST_PATH_IMAGE084
is a random number whose elements are uniformly distributed in [0,1],
Figure 661121DEST_PATH_IMAGE021
is the translation factor. The translation transform operator can be implemented in
Figure 791888DEST_PATH_IMAGE085
arrive
Figure 337270DEST_PATH_IMAGE086
Within the range of the straight line, the maximum length is
Figure 186277DEST_PATH_IMAGE021
The ability to search.

3)伸缩变换算子3) Scaling transformation operator

Figure 606632DEST_PATH_IMAGE087
, (12)
Figure 606632DEST_PATH_IMAGE087
, (12)

式中,

Figure 591905DEST_PATH_IMAGE088
为超参数变量k时刻的状态,即当前状态,
Figure 167243DEST_PATH_IMAGE089
为超参数变量k+1时刻的 状态,
Figure 503547DEST_PATH_IMAGE022
为平移因子,
Figure 963478DEST_PATH_IMAGE091
为元素服从高斯分布的随机对角矩阵。伸缩变换算子将
Figure 68837DEST_PATH_IMAGE088
的每个 元素进行
Figure 956022DEST_PATH_IMAGE092
范围内的放缩。 In the formula,
Figure 591905DEST_PATH_IMAGE088
is the state of the hyperparameter variable k at time, that is, the current state,
Figure 167243DEST_PATH_IMAGE089
is the state at the moment of hyperparameter variable k+1,
Figure 503547DEST_PATH_IMAGE022
is the translation factor,
Figure 963478DEST_PATH_IMAGE091
is a random diagonal matrix with elements from a Gaussian distribution. The scaling operator will
Figure 68837DEST_PATH_IMAGE088
for each element of
Figure 956022DEST_PATH_IMAGE092
zoom in range.

4)轴向变换算子4) Axial transformation operator

Figure 779621DEST_PATH_IMAGE093
, (13)
Figure 779621DEST_PATH_IMAGE093
, (13)

式中,

Figure 636719DEST_PATH_IMAGE080
为超参数变量k+1时刻的状态,
Figure 737530DEST_PATH_IMAGE081
为超参数变量k时刻的状态,即当前 状态,
Figure 920250DEST_PATH_IMAGE023
为轴向因子,
Figure 965566DEST_PATH_IMAGE094
为非零元素服从高斯分布的稀疏随机对角矩阵。轴向变换算子的 功能是增强单一维度的搜索。 In the formula,
Figure 636719DEST_PATH_IMAGE080
is the state at the moment of hyperparameter variable k+1,
Figure 737530DEST_PATH_IMAGE081
is the state of the hyperparameter variable k at time, that is, the current state,
Figure 920250DEST_PATH_IMAGE023
is the axial factor,
Figure 965566DEST_PATH_IMAGE094
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:

Figure 289273DEST_PATH_IMAGE010
,(14)
Figure 289273DEST_PATH_IMAGE010
, (14)

式中,

Figure 369224DEST_PATH_IMAGE011
Figure 722845DEST_PATH_IMAGE012
Figure 130824DEST_PATH_IMAGE013
Figure 860882DEST_PATH_IMAGE014
分别为旋转因子的最大取值、平移因子的 最大取值、伸缩因子的最大取值以及轴向因子的最大取值,
Figure 795340DEST_PATH_IMAGE015
为当前迭代次数,
Figure 929649DEST_PATH_IMAGE016
Figure 215137DEST_PATH_IMAGE017
Figure 217728DEST_PATH_IMAGE018
Figure 147638DEST_PATH_IMAGE019
分别为旋转因子满足终止条件的最大迭代次数、平移因子满足终止 条件的最大迭代次数、伸缩因子满足终止条件的最大迭代次数以及轴向因子满足终止条件 的最大迭代次数,
Figure 843062DEST_PATH_IMAGE020
Figure 350267DEST_PATH_IMAGE021
Figure 530450DEST_PATH_IMAGE022
Figure 439500DEST_PATH_IMAGE023
分别为旋转因子、平移因子、伸缩因子以及轴向因子。 In the formula,
Figure 369224DEST_PATH_IMAGE011
,
Figure 722845DEST_PATH_IMAGE012
,
Figure 130824DEST_PATH_IMAGE013
,
Figure 860882DEST_PATH_IMAGE014
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,
Figure 795340DEST_PATH_IMAGE015
is the current iteration number,
Figure 929649DEST_PATH_IMAGE016
,
Figure 215137DEST_PATH_IMAGE017
,
Figure 217728DEST_PATH_IMAGE018
,
Figure 147638DEST_PATH_IMAGE019
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,
Figure 843062DEST_PATH_IMAGE020
,
Figure 350267DEST_PATH_IMAGE021
,
Figure 530450DEST_PATH_IMAGE022
,
Figure 439500DEST_PATH_IMAGE023
They are rotation factor, translation factor, scaling factor and axial factor, respectively.

在多层正则化极限学习机中,将隐含层的层数设定为3,由于每一隐层的神经元个 数

Figure 40246DEST_PATH_IMAGE095
,正则化因子以及
Figure 175692DEST_PATH_IMAGE096
Figure 520086DEST_PATH_IMAGE097
正则化的权重系数
Figure 424588DEST_PATH_IMAGE098
是影响多层核极限学习机对用户异常用 电行为检测的重要因素,本发明采用新型自适应状态转移算法对多层极限学习机检测模型 进行参数优化,寻找的最优的超参数
Figure 461814DEST_PATH_IMAGE099
,使得多层正则化极 限学习机模型对用户异常用电行为检测能力最佳。 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
Figure 40246DEST_PATH_IMAGE095
, the regularization factor and
Figure 175692DEST_PATH_IMAGE096
and
Figure 520086DEST_PATH_IMAGE097
Regularized weight coefficients
Figure 424588DEST_PATH_IMAGE098
It is an important factor affecting the detection of abnormal power consumption behavior of users by the multi-layer core extreme learning machine.
Figure 461814DEST_PATH_IMAGE099
, 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:

Figure 678032DEST_PATH_IMAGE100
, (15)
Figure 678032DEST_PATH_IMAGE100
, (15)

式中,

Figure 967062DEST_PATH_IMAGE101
为变量空间中的当前状态,
Figure 585125DEST_PATH_IMAGE102
为状态转移矩阵,
Figure 58831DEST_PATH_IMAGE103
为训练样本总数,
Figure 136247DEST_PATH_IMAGE104
为被正确检测样本的个数,
Figure 88022DEST_PATH_IMAGE105
为适应度函数,即为用户异常用电行为检测错 误率。 In the formula,
Figure 967062DEST_PATH_IMAGE101
is the current state in the variable space,
Figure 585125DEST_PATH_IMAGE102
is the state transition matrix,
Figure 58831DEST_PATH_IMAGE103
is the total number of training samples,
Figure 136247DEST_PATH_IMAGE104
is the number of correctly detected samples,
Figure 88022DEST_PATH_IMAGE105
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:初始化种群的个数为

Figure 826171DEST_PATH_IMAGE106
,STA算法初始化参数,旋转因子
Figure 80566DEST_PATH_IMAGE107
, 平移因子
Figure 536955DEST_PATH_IMAGE108
,伸缩因子
Figure 26842DEST_PATH_IMAGE109
,轴向因子
Figure 494864DEST_PATH_IMAGE110
,最大迭代次数为100,在可行域内 随机均匀初始化
Figure 44794DEST_PATH_IMAGE111
5个变量,产生初始种群,产生
Figure 863845DEST_PATH_IMAGE112
组初始可行解。 Step A: The number of initialized populations is
Figure 826171DEST_PATH_IMAGE106
, STA algorithm initialization parameters, twiddle factor
Figure 80566DEST_PATH_IMAGE107
, the translation factor
Figure 536955DEST_PATH_IMAGE108
, the scaling factor
Figure 26842DEST_PATH_IMAGE109
, the axial factor
Figure 494864DEST_PATH_IMAGE110
, the maximum number of iterations is 100, initialized randomly and uniformly in the feasible region
Figure 44794DEST_PATH_IMAGE111
5 variables, generating the initial population, generating
Figure 863845DEST_PATH_IMAGE112
group of initial feasible solutions.

步骤B:由式(14)对变换因子进行更新。Step B: The transformation factor is updated according to formula (14).

步骤C:从当前种群中选择适应度函数

Figure 157423DEST_PATH_IMAGE113
达到最小值的一组
Figure 604585DEST_PATH_IMAGE024
值,记 为
Figure 699318DEST_PATH_IMAGE114
,对应的适应度为
Figure 864720DEST_PATH_IMAGE026
,将
Figure 696410DEST_PATH_IMAGE114
复制为个体数为
Figure 404603DEST_PATH_IMAGE115
的群体,记为
Figure 296335DEST_PATH_IMAGE116
,按公式(12)进 行伸缩变换得到新的种群,经过伸缩变换后的种群中的最优个体为
Figure 949034DEST_PATH_IMAGE029
,对应的适应度 为
Figure 459780DEST_PATH_IMAGE030
,如果
Figure 881535DEST_PATH_IMAGE031
,则按式(11)对个体
Figure 944168DEST_PATH_IMAGE029
进行平移变换,并更新平移变换 后的
Figure 693950DEST_PATH_IMAGE114
Figure 398601DEST_PATH_IMAGE026
,否则不进行平移变换。 Step C: Choose a fitness function from the current population
Figure 157423DEST_PATH_IMAGE113
A group that reaches the minimum
Figure 604585DEST_PATH_IMAGE024
value, denoted as
Figure 699318DEST_PATH_IMAGE114
, the corresponding fitness is
Figure 864720DEST_PATH_IMAGE026
,Will
Figure 696410DEST_PATH_IMAGE114
The number of replicates as individuals is
Figure 404603DEST_PATH_IMAGE115
group, denoted as
Figure 296335DEST_PATH_IMAGE116
, perform scaling transformation according to formula (12) to obtain a new population, and the optimal individual in the population after scaling transformation is
Figure 949034DEST_PATH_IMAGE029
, the corresponding fitness is
Figure 459780DEST_PATH_IMAGE030
,if
Figure 881535DEST_PATH_IMAGE031
, then according to formula (11) for the individual
Figure 944168DEST_PATH_IMAGE029
Perform translation transformation, and update the translation transformation
Figure 693950DEST_PATH_IMAGE114
and
Figure 398601DEST_PATH_IMAGE026
, otherwise no translation transformation is performed.

步骤D:将

Figure 674861DEST_PATH_IMAGE114
复制为个体数为
Figure 547877DEST_PATH_IMAGE115
的群体,然后按照公式(10)进行旋转变换得到 新的种群,选择新种群中的最优个体
Figure 909588DEST_PATH_IMAGE029
,计算其对应的适应度
Figure 27717DEST_PATH_IMAGE030
.如果
Figure 158484DEST_PATH_IMAGE031
,按照式(11)进行平移变换,并更新平移变换后的
Figure 562920DEST_PATH_IMAGE114
Figure 552873DEST_PATH_IMAGE026
,否则不进行 平移变换。 Step D: put
Figure 674861DEST_PATH_IMAGE114
The number of replicates as individuals is
Figure 547877DEST_PATH_IMAGE115
, and then perform rotation transformation according to formula (10) to obtain a new population, and select the optimal individual in the new population
Figure 909588DEST_PATH_IMAGE029
, calculate its corresponding fitness
Figure 27717DEST_PATH_IMAGE030
.if
Figure 158484DEST_PATH_IMAGE031
, perform translation transformation according to formula (11), and update the translation transformed
Figure 562920DEST_PATH_IMAGE114
and
Figure 552873DEST_PATH_IMAGE026
, otherwise no translation transformation is performed.

步骤E:采取与步骤C类似的种群选择和更新过程,不同的是通过式(13)轴向变换 来产生新的种群,然后采取与步骤C一样的做法来更新平移变换后的

Figure 68168DEST_PATH_IMAGE117
Figure 319021DEST_PATH_IMAGE118
。 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
Figure 68168DEST_PATH_IMAGE117
and
Figure 319021DEST_PATH_IMAGE118
.

步骤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 behavior detection system 200 includes a training module 210 , an optimization module 220 and an output module 230 .

其中,训练模块210,配置为获取配电网系统电力用户的原始用电数据,并基于所 述原始用电数据对预设的多层正则化极限学习机进行训练,使得到多层极限学习机检测模 型,其中所述多层正则化极限学习机的目标函数为:

Figure 35304DEST_PATH_IMAGE001
,式中,
Figure 371608DEST_PATH_IMAGE002
为调节经验风险和结构风险的 参数,
Figure 956173DEST_PATH_IMAGE003
为L2正则化和L1正则化的加权系数,
Figure 435433DEST_PATH_IMAGE004
为最小化目标函数,
Figure 181672DEST_PATH_IMAGE005
为输出数据样本 集合,
Figure 5272DEST_PATH_IMAGE006
为隐含层输出矩阵,
Figure 3315DEST_PATH_IMAGE007
为隐含层输出权重,
Figure 228760DEST_PATH_IMAGE008
为L2正则化的输出权重向量范数,
Figure 145900DEST_PATH_IMAGE009
为L1正则化的向量范数;寻优模块220,配置为基于新型自适应状态转移算法对所述多 层极限学习机检测模型进行网络参数寻优,使输出最优网络结构参数,其中输出所述最优 网络结构参数的过程包括:基于非线性自适应调整策略对变换因子进行更新,其中所述变 换因子包括旋转因子、平移因子、伸缩因子以及轴向因子,所述非线性自适应调整策略的表 达式:
Figure 332162DEST_PATH_IMAGE010
,式中,
Figure 258530DEST_PATH_IMAGE011
Figure 72902DEST_PATH_IMAGE012
Figure 301889DEST_PATH_IMAGE013
Figure 100081DEST_PATH_IMAGE014
分别为旋转因子的最大取值、平移因子的最大取值、伸缩因子的最大取值以及轴向 因子的最大取值,
Figure 564560DEST_PATH_IMAGE015
为当前迭代次数,
Figure 872920DEST_PATH_IMAGE016
Figure 397442DEST_PATH_IMAGE017
Figure 417351DEST_PATH_IMAGE018
Figure 560887DEST_PATH_IMAGE019
分别为旋转因子满足 终止条件的最大迭代次数、平移因子满足终止条件的最大迭代次数、伸缩因子满足终止条 件的最大迭代次数以及轴向因子满足终止条件的最大迭代次数,
Figure 349852DEST_PATH_IMAGE020
Figure 45275DEST_PATH_IMAGE021
Figure 427846DEST_PATH_IMAGE022
Figure 234128DEST_PATH_IMAGE023
分别为旋转因 子、平移因子、伸缩因子以及轴向因子;从当前种群中选择适应度函数F达到最小值的一组
Figure 284124DEST_PATH_IMAGE024
值,记为
Figure 884869DEST_PATH_IMAGE025
,对应的适应度为
Figure 879370DEST_PATH_IMAGE026
,将
Figure 863244DEST_PATH_IMAGE025
复制为个体数为初始化种群的 个数
Figure 626801DEST_PATH_IMAGE027
的群体,记为
Figure 664027DEST_PATH_IMAGE119
,根据伸缩变换算子、旋转变换算子或轴向变换算子进行伸缩变 换得到新的种群,经过伸缩变换后的种群中的最优个体为
Figure 21190DEST_PATH_IMAGE029
,对应的适应度为
Figure 169275DEST_PATH_IMAGE030
,如果
Figure 52917DEST_PATH_IMAGE031
,则根据平移变换算子对个体
Figure 136411DEST_PATH_IMAGE029
进行平移变换,并更新平移变换 后的
Figure 105504DEST_PATH_IMAGE025
Figure 791700DEST_PATH_IMAGE026
,否则不进行平移变换,其中,
Figure 405215DEST_PATH_IMAGE032
为多层极限学习机检测模型第一层神经元 个数,
Figure 518665DEST_PATH_IMAGE033
为多层极限学习机检测模型第二层神经元个数,
Figure 975054DEST_PATH_IMAGE035
为多层极限学习机检测模型第三 层神经元个数;判断适应度函数是否满足最小要求或是否达到最大迭代次数,若适应度函 数满足最小要求或达到最大迭代次数,输出种群中的最优个体作为最优网络结构参数;输 出模块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:
Figure 35304DEST_PATH_IMAGE001
, where,
Figure 371608DEST_PATH_IMAGE002
To adjust the parameters of empirical risk and structural risk,
Figure 956173DEST_PATH_IMAGE003
are the weighting coefficients for L2 regularization and L1 regularization,
Figure 435433DEST_PATH_IMAGE004
To minimize the objective function,
Figure 181672DEST_PATH_IMAGE005
is the set of output data samples,
Figure 5272DEST_PATH_IMAGE006
is the output matrix of the hidden layer,
Figure 3315DEST_PATH_IMAGE007
output weights for the hidden layer,
Figure 228760DEST_PATH_IMAGE008
is the norm of the output weight vector for L2 regularization,
Figure 145900DEST_PATH_IMAGE009
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:
Figure 332162DEST_PATH_IMAGE010
, where,
Figure 258530DEST_PATH_IMAGE011
,
Figure 72902DEST_PATH_IMAGE012
,
Figure 301889DEST_PATH_IMAGE013
,
Figure 100081DEST_PATH_IMAGE014
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,
Figure 564560DEST_PATH_IMAGE015
is the current iteration number,
Figure 872920DEST_PATH_IMAGE016
,
Figure 397442DEST_PATH_IMAGE017
,
Figure 417351DEST_PATH_IMAGE018
,
Figure 560887DEST_PATH_IMAGE019
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,
Figure 349852DEST_PATH_IMAGE020
,
Figure 45275DEST_PATH_IMAGE021
,
Figure 427846DEST_PATH_IMAGE022
,
Figure 234128DEST_PATH_IMAGE023
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
Figure 284124DEST_PATH_IMAGE024
value, denoted as
Figure 884869DEST_PATH_IMAGE025
, the corresponding fitness is
Figure 879370DEST_PATH_IMAGE026
,Will
Figure 863244DEST_PATH_IMAGE025
The number of replicated individuals is the number of initialized populations
Figure 626801DEST_PATH_IMAGE027
group, denoted as
Figure 664027DEST_PATH_IMAGE119
, 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
Figure 21190DEST_PATH_IMAGE029
, the corresponding fitness is
Figure 169275DEST_PATH_IMAGE030
,if
Figure 52917DEST_PATH_IMAGE031
, then according to the translation operator, the individual
Figure 136411DEST_PATH_IMAGE029
Perform translation transformation, and update the translation transformation
Figure 105504DEST_PATH_IMAGE025
and
Figure 791700DEST_PATH_IMAGE026
, otherwise no translation transformation is performed, where,
Figure 405215DEST_PATH_IMAGE032
is the number of neurons in the first layer of the multi-layer extreme learning machine detection model,
Figure 518665DEST_PATH_IMAGE033
is the number of neurons in the second layer of the multi-layer extreme learning machine detection model,
Figure 975054DEST_PATH_IMAGE035
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 230 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.

应当理解,图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 processor 310 and a memory 320 . The electronic device may further include: an input device 330 and an output device 340 . The processor 310, the memory 320, the input device 330, and the output device 340 may be connected through a bus or in other ways, and the connection through a bus is taken as an example in FIG. 4 . The memory 320 is the aforementioned computer-readable storage medium. The processor 310 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 320, that is, to realize the use of the multi-layer regularized extreme learning machine based on the above method embodiments. Electrical behavior detection method. The input device 330 may receive the input numerical or character information, and generate key signal input related to the user setting and function control of the power consumption behavior detection system based on the multi-layer regularized extreme learning machine. The output device 340 may include a display device such as a display screen.

上述电子设备可执行本发明实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本发明实施例所提供的方法。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)

1.一种基于多层正则化极限学习机的用电行为检测方法,其特征在于,包括:1. a method for detecting electrical behavior based on multi-layer regularization extreme learning machine, is characterized in that, comprises: 获取配电网系统电力用户的原始用电数据,并基于所述原始用电数据对预设的多层正则化极限学习机进行训练,使得到多层极限学习机检测模型,其中所述多层正则化极限学习机的目标函数为:Obtain the original power consumption data of the power users of the distribution network system, and train a preset multi-layer regularized extreme learning machine based on the original power consumption data, so that the multi-layer extreme learning machine detection model is obtained, wherein the multi-layer extreme learning machine The objective function of the regularized extreme learning machine is:
Figure FDA0003745223180000011
Figure FDA0003745223180000011
式中,C为调节经验风险和结构风险的参数,α为L2正则化和L1正则化的加权系数,minL为最小化目标函数,Y为输出数据样本集合,H为隐含层输出矩阵,β为隐含层输出权重,||β||2为L2正则化的输出权重向量范数,||β||1为L1正则化的向量范数;In the formula, C is the parameter for adjusting empirical risk and structural risk, α is the weighting coefficient of L2 regularization and L1 regularization, minL is the minimized objective function, Y is the set of output data samples, H is the output matrix of the hidden layer, β is the output weight of the hidden layer, ||β|| 2 is the L2 regularized output weight vector norm, ||β|| 1 is the L1 regularized vector norm; 基于新型自适应状态转移算法对所述多层极限学习机检测模型进行网络参数寻优,使输出最优网络结构参数,其中,基于新型自适应状态转移算法对所述多层极限学习机检测模型进行网络参数寻优的表达式为:
Figure FDA0003745223180000012
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, wherein the multi-layer extreme learning machine detection model is based on the novel adaptive state transition algorithm. The expression for network parameter optimization is:
Figure FDA0003745223180000012
式中,vk为变量空间中的当前状态,Ak为状态转移矩阵,Ntotal为训练样本总数,Nactual为被正确检测样本的个数,F(vk+1)为适应度函数,即为用户异常用电行为检测错误率;In the formula, v k is the current state in the variable space, A k is the state transition matrix, N total is the total number of training samples, N actual is the number of correctly detected samples, F(v k+1 ) is the fitness function, That is, the user's abnormal power consumption behavior detection error rate; 输出所述最优网络结构参数的过程包括:The process of outputting the optimal network structure parameters includes: 基于非线性自适应调整策略对变换因子进行更新,其中所述变换因子包括旋转因子、平移因子、伸缩因子以及轴向因子,所述非线性自适应调整策略的表达式:The transformation factor is updated 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 is:
Figure FDA0003745223180000021
Figure FDA0003745223180000021
式中,Sa.max、Sb.max、Sc.max、Sd.max分别为旋转因子的最大取值、平移因子的最大取值、伸缩因子的最大取值以及轴向因子的最大取值,t为当前迭代次数,Ta.max、Tb.max、Tc.max、Td.max分别为旋转因子满足终止条件的最大迭代次数、平移因子满足终止条件的最大迭代次数、伸缩因子满足终止条件的最大迭代次数以及轴向因子满足终止条件的最大迭代次数,a、b、c、d分别为旋转因子、平移因子、伸缩因子以及轴向因子;In the formula, S a.max , S b.max , S c.max , S d.max are the maximum value of rotation factor, the maximum value of translation factor, the maximum value of scaling factor and the maximum value of axial factor, respectively. value, t is the current number of iterations, T a . max , T b.max , T c.max , T d.max are the maximum number of iterations for which the rotation factor satisfies the termination condition, the maximum number of iterations for the translation factor that satisfies the termination condition, The maximum number of iterations that the stretch factor satisfies the termination condition and the maximum number of iterations that the axial factor satisfies the termination condition, a, b, c, and d are the rotation factor, translation factor, scaling factor, and axial factor, respectively; 从当前种群中选择适应度函数F达到最小值的一组{l1,l2,l3,C,α}值,记为vbest,对应的适应度为Fbest,将vbest复制为个体数为初始化种群的个数NSE的群体,记为vk,根据伸缩变换算子、旋转变换算子或轴向变换算子进行伸缩变换得到新的种群,经过伸缩变换后的种群中的最优个体为vnewbest,对应的适应度为Fnewbest,如果Fnewbest<Fbest,则根据平移变换算子对个体vnewbest进行平移变换,并更新平移变换后的vbest和Fbest,否则不进行平移变换,其中,l1为多层极限学习机检测模型第一层神经元个数,l2为多层极限学习机检测模型第二层神经元个数,l3为多层极限学习机检测模型第三层神经元个数,计算所述伸缩变换算子的表达式为:Select a set of {l 1 , l 2 , l 3 , C, α} values from the current population where the fitness function F reaches the minimum value, denoted as v best , and the corresponding fitness is F best , copy v best as an individual The population is the number of initialized populations N SE , denoted as v k , and the new population is obtained by scaling and transforming according to the scaling transform operator, the rotation transform operator or the axial transform operator. The best individual is v newbest , and the corresponding fitness is F newbest , if F newbest < F best , then perform translation transformation on the individual v newbest according to the translation transformation operator, and update v best and F best after translation transformation, otherwise do not perform translation transformation Translation transformation, where l 1 is the number of neurons in the first layer of the multi-layer extreme learning machine detection model, l 2 is the number of neurons in the second layer of the multi-layer extreme learning machine detection model, and l 3 is the multi-layer extreme learning machine detection model. The number of neurons in the third layer of the model, and the expression for calculating the scaling transformation operator is: vk+1=vk+cRevkv k+1 =v k +cR e v k , 式中,Vk为超参数变量k时刻的状态,即当前状态,vk+1为超参数变量k+1时刻的状态,c为平移因子,Re为元素服从高斯分布的随机对角矩阵;In the formula, V k is the state of hyperparameter variable k at time k, that is, the current state, v k+1 is the state of hyperparameter variable k+1 time, c is the translation factor, and Re is a random diagonal matrix whose elements obey a Gaussian distribution. ; 计算所述旋转变换算子的表达式为:The expression for calculating the rotation transformation operator is:
Figure FDA0003745223180000031
Figure FDA0003745223180000031
式中,a为旋转因子,vk为超参数变量k时刻的状态,即当前状态,Rr为元素服从[-1,1]均匀分布的随机矩阵,vk+1为超参数变量k+1时刻的状态,n为随机矩阵Rr的维数,||vk||2为超参数变量k时刻的2范数;In the formula, a is the rotation factor, v k is the state of the hyperparameter variable at time k, that is, the current state, R r is a random matrix whose elements are uniformly distributed in [-1, 1], and v k+1 is the hyperparameter variable k+ The state at time 1, n is the dimension of the random matrix R r , ||v k || 2 is the 2 norm of the hyperparameter variable at time k; 计算所述轴向变换算子的表达式为:The expression for calculating the axial transformation operator is: vk+1=vk+dRavkv k+1 =v k +dR a v k , 式中,vk+1为超参数变量k+1时刻的状态,vk为超参数变量k时刻的状态,即当前状态,d为轴向因子,Ra为非零元素服从高斯分布的稀疏随机对角矩阵;计算所述平移变换算子的表达式为:In the formula, v k+1 is the state of the hyperparameter variable k+1, v k is the state of the hyperparameter variable k at the time, that is, the current state, d is the axial factor, and Ra is the sparseness of the non-zero elements obeying the Gaussian distribution. A random diagonal matrix; the expression for calculating the translation transformation operator is:
Figure FDA0003745223180000032
Figure FDA0003745223180000032
式中,vk+1为超参数变量k+1时刻的状态,vk为超参数变量k时刻的状态,即当前状态,vk-1为超参数变量k-1时刻的状态,||vk-vk-1||2为超参数变量k时刻与k-1时刻之差的2范数,Rt为元素服从[0,1]均匀分布的随机数,b为平移因子;In the formula, v k+1 is the state of hyperparameter variable k+1 time, v k is the state of hyperparameter variable k time, that is, the current state, v k-1 is the state of hyperparameter variable k-1 time, || v k -v k-1 || 2 is the 2 norm of the difference between the hyperparameter variable k time and k-1 time, R t is a random number whose elements are uniformly distributed in [0, 1], and b is the translation factor; 判断适应度函数是否满足最小要求或是否达到最大迭代次数,若适应度函数满足最小要求或达到最大迭代次数,输出种群中的最优个体作为最优网络结构参数;Determine 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, the optimal individual in the population is output 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 parameters, so as to output users with abnormal electricity consumption.
2.一种基于多层正则化极限学习机的用电行为检测系统,其特征在于,包括:2. A power consumption behavior detection system based on multi-layer regularization extreme learning machine, is characterized in that, comprises: 训练模块,配置为获取配电网系统电力用户的原始用电数据,并基于所述原始用电数据对预设的多层正则化极限学习机进行训练,使得到多层极限学习机检测模型,其中所述多层正则化极限学习机的目标函数为:The training module is configured to obtain the original power consumption data of the power users of the distribution network system, and 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, The objective function of the multi-layer regularized extreme learning machine is:
Figure FDA0003745223180000033
Figure FDA0003745223180000033
式中,C为调节经验风险和结构风险的参数,α为L2正则化和L1正则化的加权系数,minL为最小化目标函数,Y为输出数据样本集合,H为隐含层输出矩阵,β为隐含层输出权重,||β||2为L2正则化的输出权重向量范数,||β||1为L1正则化的向量范数;In the formula, C is the parameter for adjusting empirical risk and structural risk, α is the weighting coefficient of L2 regularization and L1 regularization, minL is the minimized objective function, Y is the set of output data samples, H is the output matrix of the hidden layer, β is the output weight of the hidden layer, ||β|| 2 is the L2 regularized output weight vector norm, ||β|| 1 is the L1 regularized vector norm; 寻优模块,配置为基于新型自适应状态转移算法对所述多层极限学习机检测模型进行网络参数寻优,使输出最优网络结构参数,其中,基于新型自适应状态转移算法对所述多层极限学习机检测模型进行网络参数寻优的表达式为:
Figure FDA0003745223180000041
The optimization module is configured to optimize the network parameters of the multi-layer extreme learning machine detection model based on the new adaptive state transition algorithm, so that the optimal network structure parameters are output, wherein the multi-layer extreme learning machine detection model is based on the new adaptive state transition algorithm. The expression of the layer extreme learning machine detection model for network parameter optimization is:
Figure FDA0003745223180000041
式中,vk为变量空间中的当前状态,Ak为状态转移矩阵,Ntotal为训练样本总数,Nactual为被正确检测样本的个数,F(vk+1)为适应度函数,即为用户异常用电行为检测错误率;In the formula, v k is the current state in the variable space, A k is the state transition matrix, N total is the total number of training samples, N actual is the number of correctly detected samples, F(v k+1 ) is the fitness function, That is, the user's abnormal power consumption behavior detection error rate; 输出所述最优网络结构参数的过程包括:The process of outputting the optimal network structure parameters includes: 基于非线性自适应调整策略对变换因子进行更新,其中所述变换因子包括旋转因子、平移因子、伸缩因子以及轴向因子,所述非线性自适应调整策略的表达式:The transformation factor is updated 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 is:
Figure FDA0003745223180000042
Figure FDA0003745223180000042
式中,Sa.max、Sb.max、Sc.max、Sd.max分别为旋转因子的最大取值、平移因子的最大取值、伸缩因子的最大取值以及轴向因子的最大取值,t为当前迭代次数,Ta.max、Tb.max、Tc.max、Td.max分别为旋转因子满足终止条件的最大迭代次数、平移因子满足终止条件的最大迭代次数、伸缩因子满足终止条件的最大迭代次数以及轴向因子满足终止条件的最大迭代次数,a、b、c、d分别为旋转因子、平移因子、伸缩因子以及轴向因子;In the formula, S a.max , S b.max , S c.max , S d.max are the maximum value of rotation factor, the maximum value of translation factor, the maximum value of scaling factor and the maximum value of axial factor, respectively. Value, t is the current iteration number, T a.max , T b.max , T c.max , T d.max are the maximum iteration times for the rotation factor to satisfy the termination condition, the maximum iteration number for the translation factor to satisfy the termination condition, The maximum number of iterations that the stretch factor satisfies the termination condition and the maximum number of iterations that the axial factor satisfies the termination condition, a, b, c, and d are the rotation factor, translation factor, scaling factor, and axial factor, respectively; 从当前种群中选择适应度函数F达到最小值的一组{l1,l2,l3,C,α}值,记为vbest,对应的适应度为Fbest,将vbest复制为个体数为初始化种群的个数NSE的群体,记为vk,根据伸缩变换算子、旋转变换算子或轴向变换算子进行伸缩变换得到新的种群,经过伸缩变换后的种群中的最优个体为vnewbest,对应的适应度为Frewbest,如果Fnewbest<Fbest,则根据平移变换算子对个体vnewbest进行平移变换,并更新平移变换后的vbest和Fbest,否则不进行平移变换,其中,l1为多层极限学习机检测模型第一层神经元个数,l2为多层极限学习机检测模型第二层神经元个数,l3为多层极限学习机检测模型第三层神经元个数,计算所述伸缩变换算子的表达式为:Select a set of {l 1 , l 2 , l 3 , C, α} values from the current population where the fitness function F reaches the minimum value, denoted as v best , and the corresponding fitness is F best , copy v best as an individual The population is the number of initialized populations N SE , denoted as v k , and the new population is obtained by scaling and transforming according to the scaling transform operator, the rotation transform operator or the axial transform operator. The best individual is v newbest , and the corresponding fitness is F rewbest . If F newbest < F best , then perform translation transformation on the individual v newbest according to the translation transformation operator, and update v best and F best after translation transformation, otherwise do not perform translation transformation. Translation transformation, where l 1 is the number of neurons in the first layer of the multi-layer extreme learning machine detection model, l 2 is the number of neurons in the second layer of the multi-layer extreme learning machine detection model, and l 3 is the multi-layer extreme learning machine detection model. The number of neurons in the third layer of the model, and the expression for calculating the scaling transformation operator is: vk+1=vk+cRevkv k+1 =v k +cR e v k , 式中,vk为超参数变量k时刻的状态,即当前状态,vk+1为超参数变量k+1时刻的状态,c为平移因子,Re为元素服从高斯分布的随机对角矩阵;In the formula, v k is the state of the hyperparameter variable k at time k, that is, the current state, v k+1 is the state of the hyperparameter variable k+1 time, c is the translation factor, and Re is a random diagonal matrix whose elements obey a Gaussian distribution. ; 计算所述旋转变换算子的表达式为:The expression for calculating the rotation transformation operator is:
Figure FDA0003745223180000051
Figure FDA0003745223180000051
式中,a为旋转因子,vk为超参数变量k时刻的状态,即当前状态,Rr为元素服从[-1,1]均匀分布的随机矩阵,vk+1为超参数变量k+1时刻的状态,n为随机矩阵Rr的维数,||vk||2为超参数变量k时刻的2范数;In the formula, a is the rotation factor, v k is the state of the hyperparameter variable at time k, that is, the current state, R r is a random matrix whose elements are uniformly distributed in [-1, 1], and v k+1 is the hyperparameter variable k+ The state at time 1, n is the dimension of the random matrix R r , ||v k || 2 is the 2 norm of the hyperparameter variable at time k; 计算所述轴向变换算子的表达式为:The expression for calculating the axial transformation operator is: vk+1=vk+dRavkv k+1 =v k +dR a v k , 式中,vk+1为超参数变量k+1时刻的状态,vk为超参数变量k时刻的状态,即当前状态,d为轴向因子,Ra为非零元素服从高斯分布的稀疏随机对角矩阵;计算所述平移变换算子的表达式为:In the formula, v k+1 is the state of the hyperparameter variable k+1, v k is the state of the hyperparameter variable k at the time, that is, the current state, d is the axial factor, and Ra is the sparseness of the non-zero elements obeying the Gaussian distribution. A random diagonal matrix; the expression for calculating the translation transformation operator is:
Figure FDA0003745223180000052
Figure FDA0003745223180000052
式中,vk+1为超参数变量k+1时刻的状态,vk为超参数变量k时刻的状态,即当前状态,vk-1为超参数变量k-1时刻的状态,||vk-vk-1||2为超参数变量k时刻与k-1时刻之差的2范数,Rt为元素服从[0,1]均匀分布的随机数,b为平移因子;In the formula, v k+1 is the state of hyperparameter variable k+1 time, v k is the state of hyperparameter variable k time, that is, the current state, v k-1 is the state of hyperparameter variable k-1 time, || v k -v k-1 || 2 is the 2 norm of the difference between the hyperparameter variable k time and k-1 time, R t is a random number whose elements are uniformly distributed in [0, 1], and b is the translation factor; 判断适应度函数是否满足最小要求或是否达到最大迭代次数,若适应度函数满足最小要求或达到最大迭代次数,输出种群中的最优个体作为最优网络结构参数;Determine whether the fitness function meets the minimum requirements or reaches the maximum number of iterations. If the fitness function meets the minimum requirements or reaches the maximum number of iterations, the optimal individual in the population is output 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 parameters, so as to output users with abnormal electricity consumption.
3.一种电子设备,其特征在于,包括:至少一个处理器,以及与所述至少一个处理器通信连接的存储器,其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1所述的方法。3. An electronic device, 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 to enable the at least one processor to perform the method of claim 1 . 4.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现权利要求1所述的方法。4. A computer-readable storage medium on which a computer program is stored, wherein the method of claim 1 is implemented when the program is executed by a processor.
CN202210536401.3A 2022-05-18 2022-05-18 Power consumption behavior detection method and system based on multilayer regularization extreme learning machine Active CN114638555B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (1)

* Cited by examiner, † Cited by third party
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