CN116467631A - Power fingerprint identification model training method, power fingerprint identification method and device - Google Patents

Power fingerprint identification model training method, power fingerprint identification method and device Download PDF

Info

Publication number
CN116467631A
CN116467631A CN202310500056.2A CN202310500056A CN116467631A CN 116467631 A CN116467631 A CN 116467631A CN 202310500056 A CN202310500056 A CN 202310500056A CN 116467631 A CN116467631 A CN 116467631A
Authority
CN
China
Prior art keywords
training
learning model
task
model
electric
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310500056.2A
Other languages
Chinese (zh)
Inventor
孙立明
余涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shuimu Qinghua Technology Co ltd
Original Assignee
Guangzhou Shuimu Qinghua Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shuimu Qinghua Technology Co ltd filed Critical Guangzhou Shuimu Qinghua Technology Co ltd
Priority to CN202310500056.2A priority Critical patent/CN116467631A/en
Publication of CN116467631A publication Critical patent/CN116467631A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • 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/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The power fingerprint identification model training method, the power fingerprint identification method and the power fingerprint identification device provided by the application comprise the following steps: constructing a plurality of training tasks and a plurality of testing tasks according to the electric fingerprint data of the electrical equipment, wherein each training task and each testing task comprises a support data set and a query data set; training an initial base learning model based on a support data set of each training task to obtain a target base learning model, and inputting a query data set of the training task to the target base learning model to obtain a loss value corresponding to the training task; updating the parameter weight of the initial element learning model according to the loss value of each training task to obtain a target element learning model; and performing iterative training on the target element learning model by adopting each test task until the target element learning model meets the preset training ending condition, so as to obtain the electric fingerprint identification model. Thus, the electric fingerprint identification model with high identification precision can be obtained.

Description

Power fingerprint identification model training method, power fingerprint identification method and device
Technical Field
The application relates to the technical field of electric fingerprint identification, in particular to an electric fingerprint identification model training method, an electric fingerprint identification method and an electric fingerprint identification device.
Background
In recent years, as people continuously and deeply research artificial intelligence, the power grid gradually tends to be intelligent, and the electric fingerprint identification technology of electrical equipment becomes a research hotspot. The electric fingerprint identification of the electrical equipment is to install an electric fingerprint identification terminal device at a user electric inlet to collect electric data of electric equipment, dig out the characteristic of 'electric fingerprint' capable of representing the characteristics of the equipment by utilizing an artificial intelligence technology and a big data technology, and identify the type, the characteristics, the parameters, the user behavior habit, the energy efficiency, the health level, the identity and the like of the equipment by combining an invasive and non-invasive identification method. The electric fingerprint identification technology of the electrical equipment can obtain fine electricity information of a user for a power supply company, so that a personalized power supply scheme is formulated more scientifically and accurately, and real-time, efficient and economic operation of a power grid is ensured; for the user, the user can know the self electricity utilization habit so as to adjust the self electricity utilization behavior, thereby achieving the purposes of energy conservation and emission reduction.
At present, a plurality of models for electric fingerprint identification of electrical equipment exist on the market, wherein most of the models need to be trained by adopting a large amount of training data with labels so as to improve the robustness and accuracy of the models. However, in practical applications, it is often difficult to obtain data of sufficiently high quality to train a model, and therefore the recognition accuracy of the model is susceptible to influence. Meanwhile, the product systems of household electrical equipment are increasingly abundant, the new product updating iteration speed is increased, but the prior art can only collect a small amount of samples for model training, and a model with high recognition precision is difficult to obtain.
Thus, the prior art has the problem of low recognition accuracy.
Disclosure of Invention
The object of the present application is to solve at least one of the above technical drawbacks, and in particular to solve the technical drawbacks of the prior art, such as the low recognition accuracy.
In a first aspect, the present application provides a power fingerprint identification model training method, the method including:
constructing a plurality of training tasks and a plurality of testing tasks according to pre-acquired electric fingerprint data of the electric equipment, wherein each training task and each testing task comprise a support data set and a query data set;
Training a pre-established initial base learning model based on a support data set of each training task to obtain a trained target base learning model, and inputting a query data set of the training task to the target base learning model to obtain a loss value corresponding to the training task;
updating the parameter weight of a pre-established initial meta learning model according to the loss value of each training task to obtain a target meta learning model;
and carrying out iterative training on the target element learning model by adopting each test task until the target element learning model meets the preset training ending condition, so as to obtain the electric fingerprint identification model.
In one embodiment, the step of constructing a plurality of training tasks and a plurality of testing tasks according to the pre-acquired electrical fingerprint data of the electrical equipment includes:
generating a plurality of classification sample groups according to pre-collected electric fingerprint data of the electrical equipment;
in each classification sample group, respectively determining a support data set of a learning task and a query data set of the learning task in a random extraction mode, wherein the learning task is used for training the initial base learning model and the target element learning model;
Dividing each learning task according to a preset proportion to obtain a plurality of training tasks and a plurality of testing tasks.
In one embodiment, the step of generating a plurality of classification sample groups according to the pre-acquired electrical device power fingerprint data includes:
preprocessing operation is carried out on the pre-collected electric fingerprint data of the electric equipment, wherein the preprocessing operation comprises data standardization processing and data missing value processing;
and determining a plurality of classification sample groups according to the preprocessed electric fingerprint data of the electrical equipment.
In one embodiment, the step of training, for each training task, a pre-established initial base learning model based on a support data set of the training task to obtain a trained target base learning model includes:
and training a pre-established initial base learning model based on the support data set of the training task for each training task to obtain a loss value of the support data set of the training task, and updating the parameter weight of the initial base learning model by back propagation through a gradient descent method according to the loss value of the support data set of the training task to obtain the target base learning model.
In one embodiment, the step of updating the parameter weights of the pre-established initial meta-learning model according to the loss values of the training tasks to obtain the target meta-learning model includes:
updating the parameter weight of a pre-established initial meta learning model according to the following expression to obtain the target meta learning model:
in θ For the parameter weight of the target element learning model, theta is the parameter weight of the initial base learning model, alpha is the learning rate of the initial element learning model,the gradient of the loss function for the initial basis learning model,and the accumulated value of the loss value of each training task.
In one embodiment, the step of performing iterative training on the target element learning model by using each test task until the target element learning model meets a preset training ending condition to obtain the electric fingerprint identification model includes:
in the current training period, updating the parameter weight of the target element learning model based on the supporting data set of each test task to obtain an updated target element learning model corresponding to the current training period;
adopting query data sets of the test tasks to evaluate the updated target element learning model corresponding to the current training period, and judging whether the updated target element learning model corresponding to the current training period meets the preset training ending condition according to the evaluation result;
If the power fingerprint identification model is satisfied, the updated target element learning model corresponding to the current training period is used as the power fingerprint identification model, and if the power fingerprint identification model is not satisfied, the next training period is entered.
In a second aspect, the present application provides a power fingerprint identification method, the method comprising:
acquiring a power fingerprint of electrical equipment to be identified;
and inputting the electric fingerprint data of the electric equipment to be identified into an electric fingerprint identification model to obtain an identification result, wherein the electric fingerprint identification model is generated by adopting the electric fingerprint identification model training method in any one embodiment.
In a third aspect, the present application provides a power fingerprint recognition model training device, the device comprising:
the task construction module is used for constructing a plurality of training tasks and a plurality of testing tasks according to the pre-acquired electric fingerprint data of the electric equipment, wherein each training task and each testing task comprise a support data set and a query data set;
the loss value acquisition module is used for training a pre-established initial base learning model based on a support data set of each training task to obtain a trained target base learning model, and inputting a query data set of the training task to the target base learning model to obtain a loss value corresponding to the training task;
The target element learning model acquisition module is used for updating the parameter weight of the initial element learning model established in advance according to the loss value of each training task to obtain a target element learning model;
and the electric fingerprint identification model acquisition module is used for carrying out iterative training on the target element learning model by adopting each test task until the target element learning model meets the preset training ending condition, so as to obtain the electric fingerprint identification model.
In a fourth aspect, the present application provides a power fingerprint identification device, the device comprising:
the electric fingerprint acquisition module of the electric equipment to be identified is used for acquiring the electric fingerprint of the electric equipment to be identified;
and the electric fingerprint identification module is used for inputting the electric fingerprint data of the electric equipment to be identified into an electric fingerprint identification model to obtain an identification result, and the electric fingerprint identification model is generated by adopting the electric fingerprint identification model training method in any one of the embodiments.
In a fifth aspect, the present application provides a storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the power fingerprint identification model training method according to any of the embodiments described above, and/or to perform the steps of the power fingerprint identification method according to the embodiments described above.
From the above technical solutions, the embodiments of the present application have the following advantages:
the power fingerprint identification model training method, the power fingerprint identification method and the power fingerprint identification device provided by the application comprise the following steps: constructing a plurality of training tasks and a plurality of testing tasks according to pre-acquired electric fingerprint data of the electric equipment, wherein each training task and each testing task comprise a support data set and a query data set; training a pre-established initial base learning model based on a support data set of each training task to obtain a trained target base learning model, and inputting a query data set of the training task to the target base learning model to obtain a loss value corresponding to the training task; updating the parameter weight of a pre-established initial meta learning model according to the loss value of each training task to obtain a target meta learning model; and carrying out iterative training on the target element learning model by adopting each test task until the target element learning model meets the preset training ending condition, so as to obtain the electric fingerprint identification model. The electric fingerprint data of the electrical equipment is divided into a plurality of training tasks and a plurality of testing tasks, and the model is trained by the plurality of tasks, so that the generalization capability of the model under the condition of task change can be improved; training in each training task by adopting a basic learning model to learn the characteristics of each training task, and obtaining the loss value of each training task by adopting a trained target basic learning model, so that the accuracy of each loss value can be improved; the parameter weight of the initial meta-learning model is updated based on the loss value of each training task, so that the initial meta-learning model can learn the commonalities among different tasks, and the meta-learning model can quickly and accurately learn new tasks through the commonalities of the different tasks in the new tasks; and the target element learning model is finely adjusted by adopting a test task, so that the recognition effect of the model can be improved, and further, the high-precision electric fingerprint recognition model is obtained. Therefore, by applying the electric fingerprint identification model training method provided by the application, the electric fingerprint identification model with higher identification precision can be obtained under the condition of small sample data.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a flow chart of a power fingerprint identification model training method provided in an embodiment of the present application;
FIG. 2 is a schematic flow chart of a construction task according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of generating a classification sample group according to an embodiment of the present application;
fig. 4 is a schematic flow chart of acquiring a power fingerprint identification model according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a training process of a base learning model and a meta learning model according to an embodiment of the present application;
fig. 6 is a flow chart of a power fingerprint identification method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a power fingerprint identification model training device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a power fingerprint identification device according to an embodiment of the present application;
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an edge embedded device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The application provides a power fingerprint identification model training method and a power fingerprint identification method. The following embodiments are described by taking two methods as examples of application to a computer device, and it will be understood that the computer device may be any device having a data processing function, and may be, but not limited to, a single server, a server cluster, a personal notebook, a desktop, and the like. As shown in fig. 1, the power fingerprint recognition model training method of the present application may include the following steps:
s101: and constructing a plurality of training tasks and a plurality of testing tasks according to the pre-acquired electric fingerprint data of the electric equipment, wherein each training task and each testing task comprise a support data set and a query data set.
In this step, the transformer may be used to collect fingerprint data of electric equipment, and the transformer may include a voltage transformer and a current transformer, for collecting voltage values and current values of operation of the electric equipment. The electric fingerprint data are electric parameter operation characteristic data of the electrical equipment, and can be characteristics displayed when the electrical equipment is in an operation state, including steady-state characteristics and transient-state characteristics. The steady state characteristics may include any one or any combination of voltage values, current values, active power values, reactive power values, power factors, and current harmonics when the electrical device is operating. The transient characteristics may include a current ramp value and a power ramp value of the electrical device when an operational state of the electrical device changes. The electric appliances may be various commonly used household electric appliances such as a washing machine, a hot water kettle, a fan, an air conditioner, and the like.
Further, the training task is for training a base learning model, the testing task is for training a meta learning model, the support data set comprises training data for model training, and the query data set comprises testing data for model training. Repeated data content or no repeated data content can exist between the query data set and the support data set in each training task, between the query data set and the support data set in each test task, between different training tasks, between different test tasks and between the training tasks and the test tasks, and the application is not particularly limited in this respect.
It can be appreciated that the present application may implement S101 in any manner, for example, the power fingerprint data collected by the transformer and the type of the electrical device may be used as the input vector and the tag data, and the method for constructing the training task and the testing task may include random extraction and division according to a specific proportion.
S102: and training a pre-established initial base learning model based on a support data set of each training task to obtain a trained target base learning model, and inputting a query data set of the training task into the target base learning model to obtain a loss value corresponding to the training task.
In the step, for each training task, an initial base learning model is trained based on a supporting data set of the training task to obtain a trained target base learning model, a query data set of the training task is input to the target base learning model to obtain a predicted value corresponding to the query data set of the training task, and a loss value corresponding to the training task can be obtained according to the difference between the actual value and the predicted value of the query data set of the training task.
The method for obtaining the loss value according to the difference between the actual value and the predicted value may be to take the difference between the actual value and the predicted value, or may be to calculate through any loss function, in one embodiment, the loss value may be calculated by using a cross entropy loss function, which is specifically as follows:
Where L refers to the loss value, y refers to the actual value,refers to a predicted value.
Further, the base learning model is used for learning characteristics between different tasks, and the base learning model may be any deep learning model, and in one embodiment, the base learning model may be a gated recurrent neural network, and the specific principle is as follows:
z t =σ(W z ·[h t-1 ,x t ]+b z )
r t =σ(W r ·[h t-1 ,x t ]+b r )
wherein z is t And r t The output values of the updating gate and the forgetting gate at the moment t; h is a t-1 Is the state value of the hidden layer at the moment t; x is x t Is the input value at time t; w is a weight matrix; b is a bias matrix;is an element-wise multiplication operation, and sigma refers to a Logistic function.
S103: and updating the parameter weight of the pre-established initial meta-learning model according to the loss value of each training task to obtain a target meta-learning model.
In the step, the meta learning model learns priori knowledge based on the loss value of each training task obtained by each target base learning model, and updates the parameter weight to obtain the target meta learning model with the optimal parameter weight. The quality of the parameter weight can influence the performance of the final model, and the updating of the parameter weight of the meta-learning model can further improve the precision of the finally obtained electric fingerprint identification model.
Further, the meta learning model is used for learning commonalities among different tasks, and the base learning model and the meta learning model may refer to deep learning models with different learning strategies and identical structures.
S104: and carrying out iterative training on the target element learning model by adopting each test task until the target element learning model meets the preset training ending condition, so as to obtain the electric fingerprint identification model.
In the step, the target element learning model carries out iterative training on a test task according to priori knowledge, so that a new task can be quickly learned and adapted, and when the target element learning model meets the preset training ending condition, the electric fingerprint identification model is obtained. The training ending condition may be determined according to an actual situation, which is not limited in this application, for example, the accuracy of model recognition may reach a preset threshold.
In the electric fingerprint identification model training method provided by the application, electric fingerprint data of the electric equipment are divided into a plurality of training tasks and a plurality of testing tasks, and the model is trained by the plurality of tasks, so that the generalization capability of the model under the condition of task change can be improved; training in each training task by adopting a basic learning model to learn the characteristics of each training task, and obtaining the loss value of each training task by adopting a trained target basic learning model, so that the accuracy of each loss value can be improved; the parameter weight of the initial meta-learning model is updated based on the loss value of each training task, so that the initial meta-learning model can learn the commonalities among different tasks, and the meta-learning model can quickly and accurately learn new tasks through the commonalities of the different tasks in the new tasks; and the target element learning model is finely adjusted by adopting a test task, so that the recognition effect of the model can be improved, and further, the high-precision electric fingerprint recognition model is obtained. Therefore, by applying the electric fingerprint identification model training method provided by the application, the electric fingerprint identification model with higher identification precision can be obtained under the condition of small sample data.
As shown in fig. 2, in one embodiment, the step of constructing a plurality of training tasks and a plurality of testing tasks according to the pre-acquired electrical fingerprint data of the electrical device includes:
s201: generating a plurality of classification sample groups according to pre-collected electric fingerprint data of the electrical equipment;
s202: in each classification sample group, respectively determining a support data set of a learning task and a query data set of the learning task in a random extraction mode, wherein the learning task is used for training the initial base learning model and the target element learning model;
s203: dividing each learning task according to a preset proportion to obtain a plurality of training tasks and a plurality of testing tasks.
Specifically, a plurality of classification sample groups are generated according to pre-collected electrical equipment power fingerprint data, wherein one classification sample group comprises one electrical equipment type and a plurality of electrical equipment power fingerprint data corresponding to the electrical equipment type. In each classification sample group, a certain number of classification sample groups are extracted as a supporting data set at each time in a random extraction mode, a certain number of classification sample groups are extracted as a query data set at the same time, a plurality of support data sets and a plurality of query data sets are obtained through multiple extraction, the number of classification sample groups can be the same or different among different support data sets, different query data sets and between the support data sets and the query data sets, and the application is not particularly limited. Any one of the support data sets and any one of the query data sets form a learning task to obtain a plurality of learning tasks, each learning task is divided according to a preset proportion to obtain a plurality of training tasks and a plurality of testing tasks, wherein the preset proportion can be 8:2 or 7:3, and the preset proportion can be adjusted according to actual needs, so that the application is not particularly limited.
It can be understood that the plurality of training tasks and the plurality of testing tasks are determined in a random extraction mode, so that the plurality of tasks can be obtained from limited data to perform model training, the requirement of the model training on the sample data size is reduced, and the difficulty of the model data in a sample acquisition stage is reduced.
As shown in fig. 3, in one embodiment, the step of generating a plurality of classification sample groups according to the pre-acquired electrical device power fingerprint data includes:
s301: preprocessing operation is carried out on the pre-collected electric fingerprint data of the electric equipment, wherein the preprocessing operation comprises data standardization processing and data missing value processing;
s302: and determining a plurality of classification sample groups according to the preprocessed electric fingerprint data of the electrical equipment.
Specifically, the data standardization processing means that original electric fingerprint data of electrical equipment acquired in advance is converted according to a certain proportion by a certain mathematical transformation mode, so that the electric fingerprint data fall into a small specific interval, and differences of characteristic attributes such as properties, dimensions and magnitude of different variables are eliminated, so that comprehensive analysis and comparison of data of different units or magnitude are facilitated. Any data normalization method can be selected according to practical situations, and the application is not particularly limited, for example, the input vector can be normalized by using z-score (z score, also called standard score), which is specifically as follows:
Wherein x is mean Mean value of data, x std Refers to standard deviation, x of data The data value after the index standardization, x is the actual data value.
The data missing value processing refers to filling in data missing possibly occurring in the processes of sensor acquisition and transmission. Any method for processing the data missing value can be selected according to the actual situation, for example, the method can be filled by utilizing the nearest neighbor interpolation method, and the method specifically comprises the following steps:
wherein x is 1 Is t 1 Sampling value of time, x 2 Is t 2 Sampling value of time, x 3 Is t 3 Sampling values at the time.
Further, in the preprocessed power fingerprint data, for each electrical equipment type, a certain amount of a plurality of power fingerprint data corresponding to the electrical equipment type is extracted each time, and the electrical equipment type and the plurality of power fingerprint data corresponding to the electrical equipment type are used as a classification sample group. The data amount extracted each time may be the same or different, and the same data content may exist between different classification sample groups of the same electrical equipment type, and different data contents may exist, which is not particularly limited in this application.
It can be understood that the validity of the data can be ensured by preprocessing the collected electric fingerprint data, so that the accuracy of the calculation result of model training is improved, and the recognition accuracy of the finally obtained electric fingerprint recognition model is further improved.
In one embodiment, the step of training a pre-established initial base learning model based on a support data set of the training task for each training task to obtain a trained target base learning model includes:
and training a pre-established initial base learning model based on the support data set of the training task for each training task to obtain a loss value of the support data set of the training task, and updating the parameter weight of the initial base learning model by back propagation through a gradient descent method according to the loss value of the support data set of the training task to obtain the target base learning model.
For example, for training task T i By training task T i Training an initial base learning model of random initialization parameter weight theta according to a training task T i The actual value and the predicted value of the supporting data set, the loss function, the parameter weight and the learning rate of the initial basic learning model, and the parameter weight of the initial basic learning model is updated by one-time back propagation through a gradient descent method to obtain a training task T i The corresponding target base learning model has the following specific formula:
wherein,,refers to the parameter weight of the target base learning model, θ refers to the parameter weight of the initial base learning model, β refers to the learning rate of the initial base learning model, +. >Refers to the gradient of the loss function of the initial basis learning model, < ->Refers to a loss function, F θ Refers to an initial basis learning model.
It can be understood that the parameter weight of the initial base learning model can be updated rapidly by back propagation through a gradient descent method to obtain the optimal parameter weight so as to obtain the target base learning model, and the algorithm complexity of model training is reduced.
In one embodiment, the step of updating the parameter weights of the pre-established initial meta-learning model according to the loss values of the training tasks to obtain the target meta-learning model includes:
updating the parameter weight of a pre-established initial meta learning model according to the following expression to obtain the target meta learning model:
in θ For the parameter weight of the target element learning model, theta is the parameter weight of the initial base learning model, alpha is the learning rate of the initial element learning model,the gradient of the loss function for the initial basis learning model,and the accumulated value of the loss value of each training task.
Specifically, ρ (T) refers to the distribution of training tasks, T i Refers to any one of the training tasks, L refers to the loss function,refers to a target base learning model.
It can be understood that the parameter weight of the initial meta-learning model is updated through the expression, so that the initial meta-learning model learns the commonalities among different tasks by collecting the loss values of all training tasks, the priori knowledge is accumulated, the training effect of the subsequent model training is further improved, and the recognition speed and the recognition precision of the finally obtained electric fingerprint model are improved.
As shown in fig. 4: in one embodiment, the step of performing iterative training on the target element learning model by using each test task until the target element learning model meets a preset training ending condition to obtain a power fingerprint identification model includes:
s401: in the current training period, updating the parameter weight of the target element learning model based on the supporting data set of each test task to obtain an updated target element learning model corresponding to the current training period;
s402: adopting query data sets of the test tasks to evaluate the updated target element learning model corresponding to the current training period, and judging whether the updated target element learning model corresponding to the current training period meets the preset training ending condition according to the evaluation result;
S403: if the power fingerprint identification model is satisfied, the updated target element learning model corresponding to the current training period is used as the power fingerprint identification model, and if the power fingerprint identification model is not satisfied, the next training period is entered.
Specifically, the updated target element learning model is evaluated by adopting the query data set of the test task to determine whether the updated target element learning model meets the preset condition, and any evaluation method can be selected according to the actual situation.
It can be understood that the target element learning model is continuously trained and adjusted through the support data set and the query data set of the test task, so that the recognition accuracy and recognition speed of the model to the electric fingerprint data can be improved.
As shown in fig. 5, in one example, the training process of the base learning model and the meta learning model is specifically as follows:
With any training task T i Is used for training the support data set with the initial parameter weight thetaBase learning model F θ Obtaining the weight with the optimal parameterTarget-based learning model->Using training tasks T i Is trained with optimal parameter weights +.>Target-based learning model->Obtain training task T i And so on, obtaining the loss value of each training task by using the training base learning model of each training task, and training the initial element learning model based on each loss value to obtain the target element learning model F with the optimal parameter weight theta' θ′ Finally, the model F is learned by the test task pair element θ′ Fine tuning to obtain optimal parameter weight->Meta learning model->I.e. a power fingerprint identification model.
As shown in fig. 6, the power fingerprint identification method of the present application may include the following steps:
s501: and acquiring the electric fingerprint data of the electrical equipment to be identified.
S502: and inputting the electric fingerprint data of the electric equipment to be identified into an electric fingerprint identification model to obtain an identification result, wherein the electric fingerprint identification model is generated by adopting the electric fingerprint identification model training method in any one embodiment.
It can be understood that the electrical fingerprint data of the electrical equipment to be identified is input into the electrical fingerprint identification model, so that a high-precision identification result can be obtained, and the identification result is the electrical equipment type corresponding to the electrical fingerprint data of the electrical equipment to be identified.
The power fingerprint recognition model training device provided in the embodiment of the present application is described below, and the power fingerprint recognition model training device described below and the power fingerprint recognition model training method described above may be referred to correspondingly. As shown in fig. 7, the power fingerprint recognition model training device of the present application may include the following structure:
the task construction module 601 is configured to construct a plurality of training tasks and a plurality of test tasks according to pre-acquired electrical fingerprint data of the electrical equipment, where each training task and each test task includes a support data set and a query data set;
the loss value obtaining module 602 is configured to train, for each training task, a pre-established initial base learning model based on a support data set of the training task to obtain a trained target base learning model, and input a query data set of the training task to the target base learning model to obtain a loss value corresponding to the training task;
the target element learning model obtaining module 603 is configured to update a parameter weight of a pre-established initial element learning model according to a loss value of each training task, so as to obtain a target element learning model;
And the electric fingerprint identification model acquisition module 604 is configured to perform iterative training on the target element learning model by using each test task until the target element learning model meets a preset training ending condition, thereby obtaining an electric fingerprint identification model.
In one embodiment, the task building module 601 includes:
the classification sample group generation unit is used for generating a plurality of classification sample groups according to the electric fingerprint data of the electrical equipment, which are acquired in advance;
the data set determining unit is used for respectively determining a support data set of a learning task and a query data set of the learning task in each classification sample group in a random extraction mode, wherein the learning task is used for training the initial base learning model and the target element learning model;
the task acquisition unit is used for dividing each learning task according to a preset proportion so as to obtain a plurality of training tasks and a plurality of testing tasks.
In one embodiment, the classified sample group generating unit includes:
the data preprocessing subunit is used for preprocessing the pre-acquired electric fingerprint data of the electrical equipment, and the preprocessing operation comprises data standardization processing and data missing value processing;
And the classification sample group acquisition subunit is used for determining a plurality of classification sample groups according to the preprocessed electric fingerprint data of the electrical equipment.
In one embodiment, the loss value acquisition module 602 includes:
the target base learning model acquisition unit is used for training a pre-established initial base learning model based on the support data set of the training task for each training task to obtain the loss value of the support data set of the training task, and updating the parameter weight of the initial base learning model through back propagation by a gradient descent method according to the loss value of the support data set of the training task to obtain the target base learning model.
In one embodiment, the target element learning model acquisition module 603 includes:
the target element learning model obtaining unit is used for updating the parameter weight of the pre-established initial element learning model according to the following expression to obtain the target element learning model:
in θ For the parameter weight of the target element learning model, theta is the parameter weight of the initial base learning model, alpha is the learning rate of the initial element learning model,the gradient of the loss function for the initial basis learning model, And the accumulated value of the loss value of each training task.
In one embodiment, the power fingerprinting model acquisition module 604 includes:
the target element learning model training unit is used for updating the parameter weight of the target element learning model based on the support data set of each test task in the current training period to obtain an updated target element learning model corresponding to the current training period;
the target element learning model evaluation unit is used for evaluating the updated target element learning model corresponding to the current training period by adopting the query data set of each test task, and judging whether the updated target element learning model corresponding to the current training period meets the preset training ending condition according to the evaluation result; if the power fingerprint identification model is satisfied, the updated target element learning model corresponding to the current training period is used as the power fingerprint identification model, and if the power fingerprint identification model is not satisfied, the next training period is entered.
The following describes the power fingerprint recognition device provided in the embodiments of the present application, and the power fingerprint recognition device described below and the power fingerprint recognition method described above may be referred to correspondingly to each other. As shown in fig. 8, the power fingerprint recognition device of the present application may include the following structure:
The electrical equipment power fingerprint acquisition module 701 is used for acquiring electrical equipment power fingerprints to be identified;
the power fingerprint recognition module 702 is configured to input the power fingerprint data of the electrical equipment to be recognized into a power fingerprint recognition model to obtain a recognition result, where the power fingerprint recognition model is generated by using the power fingerprint recognition model training method according to any one of the above embodiments.
In one embodiment, the present application also provides a storage medium having stored therein computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the power fingerprinting model training method as in any of the above embodiments, and/or to perform the steps of the power fingerprinting method in the above embodiments.
In one embodiment, the present application also provides a computer device having stored therein computer readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the power fingerprinting model training method as in any of the embodiments described above, and/or to perform the steps of the power fingerprinting method in the embodiments described above.
Schematically, as shown in fig. 9, fig. 9 is a schematic internal structure of a computer device provided in an embodiment of the present application, and the computer device 800 may be provided as a server. Referring to fig. 9, a computer device 800 includes a processing component 802 that further includes one or more processors, and memory resources represented by memory 801, for storing instructions, such as application programs, executable by the processing component 802. The application programs stored in the memory 801 may include one or more modules each corresponding to a set of instructions. Further, the processing component 802 is configured to execute instructions to perform the power fingerprinting model training method, and/or the power fingerprinting method of any of the embodiments described above.
The computer device 800 may also include a power component 803 configured to perform power management of the computer device 800, a wired or wireless network interface 804 configured to connect the computer device 300 to a network, and an input output (I/O) interface 805. The computer device 300 may operate based on an operating system stored in memory 301, such as Windows Server TM, mac OS XTM, unix TM, linux TM, free BSDTM, or the like.
In one embodiment, the present application also provides an edge embedded device. As shown in fig. 10, the edge embedded device may include a processor, a voltage transformer and a current transformer, the processor is electrically connected to the voltage transformer and the current transformer, the voltage transformer may be connected to a live wire and a neutral wire, respectively, and the current transformer may be connected to the live wire or the neutral wire in series.
It will be appreciated by those skilled in the art that the internal structure of the computer device shown in the present application is merely a block diagram of some of the structures related to the aspects of the present application and does not constitute a limitation of the computer device to which the aspects of the present application apply, and that a particular computer device may include more or less components than those shown in the figures, or may combine some of the components, or have a different arrangement of the components.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element. Herein, "a," "an," "the," and "the" may also include plural forms, unless the context clearly indicates otherwise. Plural means at least two cases such as 2, 3, 5 or 8, etc. "and/or" includes any and all combinations of the associated listed items.
In the present specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and may be combined according to needs, and the same similar parts may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for training a power fingerprint identification model, the method comprising:
constructing a plurality of training tasks and a plurality of testing tasks according to pre-acquired electric fingerprint data of the electric equipment, wherein each training task and each testing task comprise a support data set and a query data set;
training a pre-established initial base learning model based on a support data set of each training task to obtain a trained target base learning model, and inputting a query data set of the training task to the target base learning model to obtain a loss value corresponding to the training task;
Updating the parameter weight of a pre-established initial meta learning model according to the loss value of each training task to obtain a target meta learning model;
and carrying out iterative training on the target element learning model by adopting each test task until the target element learning model meets the preset training ending condition, so as to obtain the electric fingerprint identification model.
2. The power fingerprint recognition model training method according to claim 1, wherein the step of constructing a plurality of training tasks and a plurality of testing tasks according to the pre-acquired power fingerprint data of the electrical equipment comprises:
generating a plurality of classification sample groups according to pre-collected electric fingerprint data of the electrical equipment;
in each classification sample group, respectively determining a support data set of a learning task and a query data set of the learning task in a random extraction mode, wherein the learning task is used for training the initial base learning model and the target element learning model;
dividing each learning task according to a preset proportion to obtain a plurality of training tasks and a plurality of testing tasks.
3. The method for training a power fingerprint recognition model according to claim 1, wherein the step of generating a plurality of classification sample groups from pre-acquired power fingerprint data of the electrical device comprises:
Preprocessing operation is carried out on the pre-collected electric fingerprint data of the electric equipment, wherein the preprocessing operation comprises data standardization processing and data missing value processing;
and determining a plurality of classification sample groups according to the preprocessed electric fingerprint data of the electrical equipment.
4. The method for training a power fingerprint recognition model according to claim 1, wherein the step of training a pre-established initial base learning model based on a support data set of the training task for each of the training tasks to obtain a trained target base learning model comprises:
and training a pre-established initial base learning model based on the support data set of the training task for each training task to obtain a loss value of the support data set of the training task, and updating the parameter weight of the initial base learning model by back propagation through a gradient descent method according to the loss value of the support data set of the training task to obtain the target base learning model.
5. The method for training a power fingerprint recognition model according to claim 1, wherein the step of updating the parameter weights of the pre-established initial meta-learning model according to the loss values of the training tasks to obtain the target meta-learning model comprises the steps of:
Updating the parameter weight of a pre-established initial meta learning model according to the following expression to obtain the target meta learning model:
in θ For the parameter weight of the target element learning model, theta is the parameter weight of the initial base learning model, alpha is the learning rate of the initial element learning model,gradient of the loss function for the initial basis learning model, +.>And the accumulated value of the loss value of each training task.
6. The method for training a power fingerprint recognition model according to any one of claims 1 to 5, wherein the step of performing iterative training on the target element learning model by using each of the test tasks until the target element learning model meets a preset training end condition, includes:
in the current training period, updating the parameter weight of the target element learning model based on the supporting data set of each test task to obtain an updated target element learning model corresponding to the current training period;
adopting query data sets of the test tasks to evaluate the updated target element learning model corresponding to the current training period, and judging whether the updated target element learning model corresponding to the current training period meets the preset training ending condition according to the evaluation result;
If the power fingerprint identification model is satisfied, the updated target element learning model corresponding to the current training period is used as the power fingerprint identification model, and if the power fingerprint identification model is not satisfied, the next training period is entered.
7. A method of power fingerprinting, the method comprising:
acquiring a power fingerprint of electrical equipment to be identified;
inputting the electric fingerprint data of the electric equipment to be identified into an electric fingerprint identification model to obtain an identification result, wherein the electric fingerprint identification model is generated by adopting the electric fingerprint identification model training method according to any one of claims 1 to 6.
8. An electric fingerprint recognition model training device, characterized in that the device comprises:
the task construction module is used for constructing a plurality of training tasks and a plurality of testing tasks according to the pre-acquired electric fingerprint data of the electric equipment, wherein each training task and each testing task comprise a support data set and a query data set;
the loss value acquisition module is used for training a pre-established initial base learning model based on a support data set of each training task to obtain a trained target base learning model, and inputting a query data set of the training task to the target base learning model to obtain a loss value corresponding to the training task;
The target element learning model acquisition module is used for updating the parameter weight of the initial element learning model established in advance according to the loss value of each training task to obtain a target element learning model;
and the electric fingerprint identification model acquisition module is used for carrying out iterative training on the target element learning model by adopting each test task until the target element learning model meets the preset training ending condition, so as to obtain the electric fingerprint identification model.
9. A power fingerprinting device, the device comprising:
the electric fingerprint acquisition module of the electric equipment to be identified is used for acquiring the electric fingerprint of the electric equipment to be identified;
the electric fingerprint recognition module is used for inputting the electric fingerprint data of the electric equipment to be recognized into an electric fingerprint recognition model to obtain a recognition result, and the electric fingerprint recognition model is generated by adopting the electric fingerprint recognition model training method according to any one of claims 1 to 6.
10. A storage medium, characterized by: the storage medium having stored therein computer readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the power fingerprinting model training method of any of claims 1 to 6, and/or to perform the steps of the power fingerprinting method of claim 7.
CN202310500056.2A 2023-05-05 2023-05-05 Power fingerprint identification model training method, power fingerprint identification method and device Pending CN116467631A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310500056.2A CN116467631A (en) 2023-05-05 2023-05-05 Power fingerprint identification model training method, power fingerprint identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310500056.2A CN116467631A (en) 2023-05-05 2023-05-05 Power fingerprint identification model training method, power fingerprint identification method and device

Publications (1)

Publication Number Publication Date
CN116467631A true CN116467631A (en) 2023-07-21

Family

ID=87184276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310500056.2A Pending CN116467631A (en) 2023-05-05 2023-05-05 Power fingerprint identification model training method, power fingerprint identification method and device

Country Status (1)

Country Link
CN (1) CN116467631A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117520817A (en) * 2023-11-08 2024-02-06 广州水沐青华科技有限公司 Power fingerprint identification model training method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117520817A (en) * 2023-11-08 2024-02-06 广州水沐青华科技有限公司 Power fingerprint identification model training method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
Lai et al. A robust correlation analysis framework for imbalanced and dichotomous data with uncertainty
CN106650780B (en) Data processing method and device, classifier training method and system
CN108280552B (en) Power load prediction method and system based on deep learning and storage medium
CN111144468A (en) Power consumer information labeling method and device, electronic equipment and storage medium
Dou et al. Hybrid model for renewable energy and loads prediction based on data mining and variational mode decomposition
CN109359665B (en) Household appliance load identification method and device based on support vector machine
CN112580471A (en) Non-invasive load identification method based on AdaBoost feature extraction and RNN model
CN111537884B (en) Method and device for acquiring service life data of power battery, computer equipment and medium
CN113408341B (en) Load identification method and device, computer equipment and storage medium
CN115099511A (en) Photovoltaic power probability estimation method and system based on optimized copula
CN111563827A (en) Load decomposition method based on electrical appliance physical characteristics and residential electricity consumption behaviors
CN113361785A (en) Power distribution network short-term load prediction method and device, terminal and storage medium
Damayanti et al. Electrical load profile analysis using clustering techniques
CN116467631A (en) Power fingerprint identification model training method, power fingerprint identification method and device
CN116169670A (en) Short-term non-resident load prediction method and system based on improved neural network
CN117556369A (en) Power theft detection method and system for dynamically generated residual error graph convolution neural network
CN113094448B (en) Analysis method and analysis device for residence empty state and electronic equipment
CN113659564B (en) Low-voltage distribution network topology identification method and system based on voltage fluctuation feature clustering
CN116953554A (en) Multi-fragment data-based method and device for estimating SOH of lithium battery of energy storage power station
CN116415732A (en) User side power load data processing method based on improved ARNN
CN115275975B (en) Method and device for determining matching degree of electric power data of optical storage charging station
CN111239484A (en) Non-invasive load electricity consumption information acquisition method for non-resident users
Qin Software reliability prediction model based on PSO and SVM
Zhang et al. Load prediction based on depthwise separable convolution model
CN117113148B (en) Risk identification method, device and storage medium based on time sequence diagram neural network

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