CN115270976A - User clustering method and device, electronic equipment and storage medium - Google Patents

User clustering method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115270976A
CN115270976A CN202210925693.XA CN202210925693A CN115270976A CN 115270976 A CN115270976 A CN 115270976A CN 202210925693 A CN202210925693 A CN 202210925693A CN 115270976 A CN115270976 A CN 115270976A
Authority
CN
China
Prior art keywords
dictionary model
dictionary
user
sub
model
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
CN202210925693.XA
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.)
Guangdong Power Grid Co Ltd
Dongguan Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
Dongguan Power Supply Bureau of Guangdong Power Grid 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 Guangdong Power Grid Co Ltd, Dongguan Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202210925693.XA priority Critical patent/CN115270976A/en
Publication of CN115270976A publication Critical patent/CN115270976A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • 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)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • General Engineering & Computer Science (AREA)
  • Medical Informatics (AREA)
  • Economics (AREA)
  • Artificial Intelligence (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Strategic Management (AREA)
  • Public Health (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Primary Health Care (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Human Resources & Organizations (AREA)
  • Mathematical Physics (AREA)
  • Water Supply & Treatment (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure provides a user clustering method, a user clustering device, electronic equipment and a storage medium, and relates to the field of artificial intelligence, in particular to a machine learning technology. The specific implementation scheme comprises the following steps: receiving a global dictionary model sent by a server; the global dictionary model comprises at least one initialized sub dictionary model; selecting a target sub-dictionary model from the initialized sub-dictionary models; updating the target sub-dictionary model according to user electricity consumption data locally stored by the intelligent electric meter; and feeding back the updated target sub-dictionary model to the server, so that the server updates the global dictionary model according to the target sub-dictionary models fed back by different intelligent electric meters, and obtains a user clustering result according to the updated global dictionary model. The Federal learning type user clustering scheme is adopted, the users do not need to upload original electricity utilization data in respective electricity meters to the server, and therefore the problem that the electricity utilization data of the users are leaked is avoided at the source.

Description

User clustering method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of artificial intelligence, and in particular, to a machine learning technique, and more particularly, to a user clustering method, apparatus, electronic device, and storage medium.
Background
User clustering in the power industry is a way to construct user profiles. The method can help the power supplier to know the behavior characteristics of the power consumer, and further better perform power scheduling.
The current common user clustering methods are all central algorithms, namely, users need to upload respective power utilization data to a central server, and the central server performs clustering processing according to the received power utilization data. However, such a method still has certain disadvantages: there is a risk that the electricity data of the user is leaked, for example, the user is attacked by communication in data uploading, or when the electricity data is stored in a central server, the server is attacked, and large-scale data leakage is caused.
Disclosure of Invention
The disclosure provides a user clustering method, a user clustering device, electronic equipment and a storage medium, which can achieve the effect of avoiding leakage of user electricity consumption data at the source.
According to an aspect of the present disclosure, a user clustering method is provided, which is applied to a smart meter, and includes:
receiving a global dictionary model sent by a server; the global dictionary model comprises at least one initialized sub-dictionary model, and the sub-dictionary model comprises preset electrical equipment information;
selecting a target sub-dictionary model from the initialized sub-dictionary models;
updating the target sub-dictionary model according to user electricity consumption data locally stored in the intelligent electric meter;
and feeding back the updated target sub-dictionary model to the server, so that the server updates the global dictionary model according to the target sub-dictionary models fed back by different intelligent electric meters, and obtains a user clustering result according to the updated global dictionary model.
According to one aspect of the present disclosure, a user clustering method is provided, which is applied to a server and includes:
selecting at least one target user from the full power users, and sending a global dictionary model to the smart electric meter associated with the target user, so that the smart electric meter selects an initialized target sub-dictionary model from the global dictionary model and updates the target sub-dictionary model;
receiving an updated target sub-dictionary model fed back by the intelligent electric meter;
and updating the global dictionary model according to the updated target sub-dictionary model, and obtaining a user clustering result according to the updated global dictionary model.
According to another aspect of the present disclosure, there is provided a user clustering device configured in a smart meter, including:
the first receiving module is used for receiving the global dictionary model sent by the server; the global dictionary model comprises at least one initialized sub-dictionary model, and the sub-dictionary model comprises preset electrical equipment information;
the dictionary selection model is used for selecting a target sub-dictionary model from the initialized sub-dictionary models;
the first dictionary updating module is used for updating the target sub-dictionary model according to the user electricity consumption data locally stored in the intelligent ammeter;
and the uploading module is used for feeding the updated target sub-dictionary model back to the server, so that the server updates the global dictionary model according to the target sub-dictionary models fed back by different intelligent electric meters, and a user clustering result is obtained according to the updated global dictionary model.
According to another aspect of the present disclosure, there is provided a user clustering apparatus configured at a server, including:
the system comprises a user selection and dictionary issuing module, a global dictionary model and a target sub-dictionary model, wherein the user selection and dictionary issuing module is used for selecting at least one target user from full power users, and sending the global dictionary model to a smart meter associated with the target user, so that the smart meter selects an initialized target sub-dictionary model from the global dictionary model and updates the target sub-dictionary model;
the second receiving module is used for receiving the updated target sub-dictionary model fed back by the intelligent electric meter;
and the second dictionary updating module is used for updating the global dictionary model according to the updated target sub-dictionary model and obtaining a user clustering result according to the updated global dictionary model.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the user clustering method of any embodiment of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the user clustering method of any embodiment of the present disclosure.
According to the technology disclosed by the invention, the dictionary model is updated according to local data by receiving the dictionary model distributed by the server, and then the updated algorithm model is returned to the server, so that the server updates the global dictionary model according to the updated dictionary model of each user, and further performs user clustering according to the updated global model. Therefore, the user does not need to upload the original electricity consumption data in the respective ammeter to the server, and the problem that the electricity consumption data of the user are leaked is avoided at the source; and the basic operation capability of the intelligent electric meters is utilized, and the originally huge operation processing requirements are decomposed and distributed to the intelligent electric meters for operation. And the server only needs a small amount of aggregation algorithm, thereby greatly alleviating the requirement on computing resources. In addition, the finer-grained data brought by the intelligent electric meter can enable the clustering result of the users to be more accurate.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flow chart of a user clustering method provided in an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of another user clustering method provided in the embodiments of the present disclosure;
fig. 3 is a schematic structural diagram of a user clustering device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of another user clustering device provided in the embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device for implementing a user clustering method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of embodiments of the present disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the embodiment of the disclosure, along with popularization and commercialization of the smart electric meter, many fine-grained user electricity consumption data can be obtained through the smart electric meter. Compared with the previous coarse-grained user electricity utilization data, the now obtained fine-grained user electricity utilization data can reveal more user electricity utilization behaviors. However, the rise of load decomposition technologies such as non-intrusive load monitoring technologies not only facilitates users to know their own appliance usage status, but also makes the privacy (information such as living habits and power consumption behaviors) of users more available to other useful people. The privacy problem caused by the leakage of the electricity data of the user is more and more serious, and is also more and more concerned by people.
In order to understand behavior characteristics of power consumers and to better perform power system scheduling and save power resources, power providers generally cluster the power consumers by using power consumption data of the power consumers to obtain images of the power consumers. Currently, the user clustering algorithms mainly used are all central algorithms, that is, the user needs to upload the electricity consumption data to a central server for subsequent processing. In such a manner, the electricity utilization data of the user can be leaked in many places, such as communication attack in data uploading, or large-scale data leakage caused by server attack when the electricity utilization data is stored in a central server. Therefore, the distributed user clustering algorithm which does not need the user to upload own electricity consumption data is provided, so that the user clustering task is completed while the problems are avoided. Specifically, an interpretable user electricity consumption data clustering algorithm based on federal learning is provided. The user electricity consumption data clustering algorithm based on federal learning utilizes the basic operational capability of the intelligent electric meters, and decomposes and distributes originally huge operational processing requirements to each intelligent electric meter for processing. While only a small number of aggregation algorithms are required at the central node (e.g., central server), which greatly alleviates the need for computing resources. Meanwhile, the provided user electricity consumption data clustering algorithm does not need to upload original electricity consumption data by a user, but only needs to provide current gradient data in the clustering process by a federal dictionary learning method, so that leakage of user privacy data is avoided from the source.
In addition, in the embodiment of the disclosure, in order to improve the physical interpretability of the user clustering algorithm, the characteristics of the user electricity consumption data and the structural knowledge behind the user electricity consumption data are firstly analyzed. Specifically, through analysis, the user electricity consumption data measured by each household electricity meter is the total user electricity consumption data at the current momentThe user electricity consumption data is the sum of electricity consumption data of all current used electrical appliances of the user, and can be expressed as follows mathematically:
Figure BDA0003779336590000051
where x (t) is the current consumer power usage, α i (t) is the operating status of each appliance (i.e., whether it is operating, 0 means not operating, 1 means operating), p i Representing the power consumption of each electric appliance, and representing the current noise level by using e (t) because other inevitable metering errors such as thermal noise exist. Through the user electricity utilization model, the decisive factor behind the user electricity utilization data can be seen to be the electricity utilization behavior of the user, namely alpha i (t) (user electric appliance use state at each time), and electric appliance p owned by user himself/herself i . Thus, user clustering can be performed by exploring to mine these crucial two kinds of information of users.
By analyzing the power utilization behavior of the user, it is found that each user generally has a plurality of electric appliances, but generally only a part of the electric appliances are used at the same time. Therefore, on the whole electrical appliance level, the electricity utilization behavior of the user is sparse. Therefore, the machine learning method of dictionary learning can be used for analyzing and obtaining the electricity utilization behaviors of the users and the electrical appliance information of the users from the electricity utilization data of the users.
It should be noted that dictionary learning (dictionary learning) is a machine learning method that can analyze a set of basis forming data and combination coefficients corresponding to the data from the data. Successful implementation of dictionary learning is highly dependent on the presence of linear sparse models in the data. In the previous analysis process of the electricity data of the user, the linear sparse model exists in the electricity data of the user, so that the electricity data of the user can be analyzed by dictionary learning. Classical dictionary learning can be mathematically represented as a two-step optimization problem as follows:
Figure BDA0003779336590000061
Figure BDA0003779336590000062
wherein x is i Is a user electricity data vector; d is a base to be solved, and the user electricity utilization data can be analyzed to see that the base contains the user electrical appliance information; alpha is alpha i The user behavior vector corresponds to the current user electricity consumption data vector; and C is the feasible field of the dictionary, which exists in order to limit the size of each base in the dictionary to be too large; λ is a sparse control parameter, which is a constant parameter. The two-step optimization problem of dictionary learning can be solved by a coordinate axis descending method.
As described above, the classical dictionary learning is very useful in many situations, but has problems such as information dilution on the electricity consumption data of users with periodic and isochronous features. The existence of these problems can cause a large difference between the learned dictionary and the original electrical appliance information of the user. To address this issue, the disclosed solution introduces shift-invariant dictionary learning (shift-invariant dictionary learning). Unlike classical dictionary learning, translation-invariant dictionary learning allows bases in the dictionary to be smaller in length than the input data vector, and allows bases to be sliding matched, which greatly improves the expressive power of each base. That is, each sub-dictionary model that constitutes the global dictionary model in the present disclosure is a translation invariant dictionary model.
On the basis, in order to realize the distributed clustering method, the scheme of the disclosure also introduces federal learning. Specifically, the federate learning-based user clustering algorithm of the scheme mainly comprises two parts: a smart meter part and a service terminal part. Reference will now be made to the two sections, which are specifically illustrated in the following examples.
Fig. 1 is a schematic flow diagram of a user clustering method according to an embodiment of the present disclosure, which is applicable to a situation of clustering power users while ensuring privacy of user data. The method may be executed by a user clustering device, which is implemented in software and/or hardware and integrated on an electronic device, for example, an intelligent electric meter, that is, the execution subject of the embodiment is the intelligent electric meter. The intelligent electric meter mainly selects a proper dictionary model, updates the selected dictionary model according to local data and uploads the updated dictionary model. Specifically, referring to fig. 1, the flow of the user clustering method is as follows:
s101, receiving a global dictionary model sent by a server; the global dictionary model comprises at least one initialized sub dictionary model, and the sub dictionary model comprises preset electrical equipment information.
In the embodiment of the disclosure, because the power consumption behavior of the user and the electrical information held by the user are analyzed from the power consumption data of the user through the dictionary learning algorithm, a certain number of sub-dictionary models need to be initialized in advance, the sub-dictionary models include preset electrical equipment information, and then the plurality of sub-dictionary models form an initialized global dictionary. It should be noted here that each sub-dictionary model includes different initially-set electrical equipment information, each sub-dictionary model can be used as a clustering center, and when each user selects one from the sub-dictionary models as a target sub-dictionary model in the later period, the clustering center to which the user belongs is also determined, and the process of the target sub-dictionary model selected in this way realizes user classification.
In addition, since the number of power consumers is large, if the initialized global dictionary is distributed to the smart meters of all the power consumers at a time, a huge communication cost is generated. Therefore, the clustering of the total power users is realized through a multi-round clustering mode, the clustering round and the number of the users participating in each round of clustering are determined by the server after the communication cost is comprehensively considered, for each round of clustering, the server can randomly select a preset number of non-repeated users from the total power users, and further send the initialized global dictionary to the smart meters related to the selected users.
S102, selecting a target sub-dictionary model from the initialized sub-dictionary models.
In the embodiment of the disclosure, after the smart meter associated with each selected user receives the initialized global dictionary, a target sub-dictionary model is selected from the sub-dictionary models forming the global dictionary model. For example, one sub-dictionary model may be randomly selected as the target sub-dictionary model, but each sub-dictionary model may be used as a clustering center because the initially set electrical equipment information included in each sub-dictionary model is different, and when each user selects one sub-dictionary model from the global dictionary model as the target sub-dictionary model, the clustering center to which the user belongs is determined. Therefore, in order to accurately determine the category to which the user belongs, the process of selecting a target sub-dictionary model from the initialized sub-dictionary models may include the following operations: and sequentially carrying out sparse coefficient coding on each initialized sub-dictionary model and calculating loss results, and taking the sub-dictionary model with the minimum loss as a target sub-dictionary model, wherein the smaller the loss is, the higher the probability that the user belongs to the clustering center is.
In particular, since the sub-dictionary model is a translation-invariant dictionary model, the translation-invariant dictionary learning can be expressed as the following optimization problem:
Figure BDA0003779336590000081
wherein, T (d) k ,t ik ) Is a translation operator that will translate a substrate d k Translation t ik And (4) units. x is the number of i Is a user electricity consumption data vector, lambda is a constant parameter, and k, p and q are parameters with specified values. On the basis, sparse coefficient coding is carried out on each initialized sub-dictionary model in sequence, and loss results are calculated, and the method comprises the following steps:
and for any initialized sub-dictionary model, fixing each base of the sub-dictionary model unchanged, and calculating the optimal sparse combination coefficient of the user electricity consumption data and the optimal translation unit of each base in the sub-dictionary model by a coordinate axis descending method.
And further calculating the loss result of the sub-dictionary model based on the user electricity data, the fixed sub-dictionary model, the optimal sparse combination coefficient and the optimal translation unit of each base in the sub-dictionary model. For example, user electricity consumption data, a fixed sub-dictionary model, an optimal sparse combination coefficient and an optimal translation unit of each base in the sub-dictionary model are brought into an optimization problem formula model of dictionary learning with translation invariance, and a calculated result is a loss result. It should be noted that a smaller loss indicates a closer distance of the user from the sub-dictionary model (i.e., the cluster center). Therefore, the sub-dictionary model with the minimum loss is used as the target sub-dictionary, the clustering center to which the user belongs can be determined, and user classification is realized.
S103, updating the target sub-dictionary model according to the user electricity consumption data locally stored by the intelligent electric meter.
In the embodiment of the disclosure, after the target sub-dictionary model is determined, the target sub-dictionary is updated by using the user electricity consumption data locally stored by the smart meter associated with the user, so that the updated target sub-dictionary model can learn the electrical equipment information held by the user. In an alternative embodiment, the smart meter may update the target sub-dictionary model according to the locally stored electricity consumption data of the user, including the following operations: fixing the optimal sparse combination coefficient and the optimal translation unit of each substrate in the target sub-dictionary model unchanged; and updating each base of the target sub-dictionary model by adopting a projection gradient descent method based on the power consumption data of the user. Therefore, the updated target sub-dictionary model can learn the electrical equipment information held by the user associated with the intelligent electric meter, and then user clustering can be performed according to the learned electrical equipment information held by the user.
And S104, feeding the updated target sub-dictionary model back to the server, so that the server updates the global dictionary model according to the target sub-dictionary model fed back by different intelligent electric meters, and obtaining a user clustering result according to the updated global dictionary model.
In the embodiment of the present disclosure, after the updated target sub-dictionary is obtained in step S103, the smart meter may feed back the updated target sub-dictionary to the server, where it should be noted that the target sub-dictionary fed back to the server is updated and is not the original power consumption data of the power consumer, so that it may be ensured that the original power consumption data of the user is not leaked, and user privacy is protected.
And after the server side obtains the updated target sub-dictionaries fed back by the intelligent electric meters of different power users, the server side updates the global dictionary model by using the updated target sub-dictionary model, and obtains a user clustering result according to the updated global dictionary model. And finally outputting a clustering result, wherein the clustering result is a user group associated with each sub dictionary model in the updated global dictionary model.
In the embodiment of the disclosure, the dictionary model is updated according to local data by receiving the dictionary model distributed by the server, and then the updated algorithm model is returned to the server, so that the server updates the global dictionary model according to the updated dictionary model of each user, and further performs user clustering according to the updated global model. Therefore, the user does not need to upload the original electricity consumption data in the respective ammeter to the server, and the problem that the electricity consumption data of the user are leaked is avoided at the source; and the basic operation capability of the intelligent electric meters is utilized, and the originally huge operation processing requirements are decomposed and distributed to each intelligent electric meter for operation. And the server only needs a small amount of aggregation algorithm, thereby greatly alleviating the requirement on computing resources. In addition, the finer-grained data brought by the intelligent electric meter can enable the clustering result of the user to be more accurate.
Fig. 2 is a schematic flow diagram of a user clustering method according to an embodiment of the present disclosure, which is applicable to a situation of clustering power users while ensuring privacy of user data. The method can be executed by a user clustering device, which is implemented in a software and/or hardware manner and integrated on an electronic device, for example, on a server device, that is, the execution subject of the embodiment is the server device, and the server device mainly selects users participating in each round and updates the global dictionary according to the updated dictionary model of the user smart meter. Referring to fig. 2, the user clustering method specifically comprises the following steps:
s201, selecting at least one target user from the full power users, and sending the global dictionary model to the intelligent electric meter associated with the target user, so that the intelligent electric meter selects an initialized target sub-dictionary model from the global dictionary model and updates the target sub-dictionary model.
Optionally, for any round of user clustering, at least one target user is selected from the total amount of power users through an equal-probability non-return sampling mode, for example, 20 target users can be selected in each round. It should be noted that the final clustering result is influenced by the number of target users selected in each round. Therefore, in an alternative embodiment, each round of clustering selects a target user from the power users according to a preset certain proportion. And then sending the global dictionary model to the smart meter associated with the target user, wherein the global dictionary model comprises at least one initialized sub-dictionary model, and the sub-dictionary model comprises preset electrical equipment information. And the intelligent electric meter selects an initialized target sub-dictionary model from the global dictionary model and updates the target sub-dictionary model by using locally stored user electricity consumption data. For a specific updating process, reference may be made to the description of the above embodiments, which is not specifically limited herein.
And S202, receiving the updated target sub-dictionary model fed back by the intelligent electric meter.
And S203, updating the global dictionary model according to the updated target sub-dictionary model, and obtaining a user clustering result according to the updated global dictionary model.
And after the intelligent electric meter updates the corresponding dictionary model according to the local data, the updated target sub-dictionary model is uploaded to the server. Therefore, after issuing the global dictionary model, the server receives the updated target sub-dictionary model fed back by the intelligent electric meter. And updating the global dictionary model according to the updated target sub-dictionary model, wherein in an optional implementation mode, the global dictionary model can be updated by adopting a federal mean algorithm. Specifically, assume that the selected target user set is S t Local to the s-th userThe updated dictionary model is
Figure BDA0003779336590000111
The data amount shared by all users is n, and the data amount unique to each user is n s Then, the global dictionary model of the t +1 th round can be calculated by the following equation:
Figure BDA0003779336590000112
wherein D is t Is the global dictionary of the previous round (t-th round). After the updated global dictionary model is obtained, whether the global dictionary model converges or not needs to be judged, and if the global dictionary model does not converge, the steps from S201 to S203 need to be repeatedly executed until convergence is finished. And further carrying out user clustering according to the updated global dictionary model, namely determining a user group associated with each sub-dictionary model forming the global dictionary model.
In the embodiment of the disclosure, the server does not need to update the global dictionary model according to the target sub-dictionary models fed back by different power users, and the target sub-dictionary is updated by the smart electric meters, so that the originally huge calculation processing requirements are decomposed and distributed to each smart electric meter, and the server only needs a small amount of aggregation algorithms, so that the requirements on calculation resources are greatly alleviated. Meanwhile, the server does not store the original power consumption data of the power users, so that the power consumption data of the users can be prevented from being leaked due to attack on the server.
Fig. 3 is a schematic structural diagram of a user clustering device according to an embodiment of the present disclosure, which is applicable to a case of clustering power consumers while ensuring privacy of user data. The apparatus is configured in a smart meter, as shown in fig. 3, and specifically includes:
the first receiving module 301 is configured to receive a global dictionary model sent by a server; the global dictionary model comprises at least one initialized sub dictionary model, and the sub dictionary model comprises preset electrical equipment information;
a dictionary selection model 302 for selecting a target sub-dictionary model from the initialized sub-dictionary models;
the first dictionary updating module 303 is used for updating the target sub-dictionary model according to the user electricity consumption data locally stored in the intelligent electric meter;
and the uploading module 304 is configured to feed back the updated target sub-dictionary model to the server, so that the server updates the global dictionary model according to the target sub-dictionary models fed back by different smart electric meters, and obtains a user clustering result according to the updated global dictionary model.
On the basis of the above embodiments, the optional dictionary selection model includes:
and the sparse processing unit is used for carrying out sparse coefficient coding on each initialized sub-dictionary model in sequence and calculating a loss result, and taking the dictionary model with the minimum loss as a target sub-dictionary model.
On the basis of the above embodiment, optionally, the sub-dictionary model is a translation invariant dictionary model;
correspondingly, the sparse processing unit is further configured to:
aiming at any initialized sub-dictionary model, fixing each base of the sub-dictionary model to be unchanged, and calculating the optimal sparse combination coefficient of the user electricity consumption data and the optimal translation unit of each base in the sub-dictionary model by a coordinate axis descending method;
and calculating a loss result based on the user electricity consumption data, the fixed sub-dictionary model, the optimal sparse combination coefficient and the optimal translation unit of each base in the sub-dictionary model.
On the basis of the foregoing embodiment, optionally, the first dictionary updating module includes:
fixing the optimal sparse combination coefficient and the optimal translation unit of each substrate in the target sub-dictionary model unchanged;
and updating each base of the target sub-dictionary model by adopting a projection gradient descent method based on the user electricity consumption data.
The device provided by the embodiment of the disclosure can execute the user clustering method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of executing the user clustering method. Reference may be made to the description of any method embodiment of the disclosure for a matter not explicitly described in this embodiment.
Fig. 4 is a schematic structural diagram of a user clustering device according to an embodiment of the present disclosure, which is applicable to a case of clustering power consumers while ensuring privacy of user data. The device is configured at the server, and as shown in fig. 4, the device specifically includes:
the user selection and dictionary issuing module 401 selects at least one target user from the full power users, and sends the global dictionary model to the smart meter associated with the target user, so that the smart meter selects an initialized target sub-dictionary model from the global dictionary model and updates the target sub-dictionary model;
a second receiving module 402, configured to receive the updated target sub-dictionary model fed back by the smart meter;
and the second dictionary updating module 403 is configured to update the global dictionary model according to the updated target sub-dictionary model, and obtain a user clustering result according to the updated global dictionary model.
On the basis of the foregoing embodiment, optionally, the user selection and dictionary issuing module is further configured to:
and selecting at least one target user from the total amount of power users in an equal probability non-return sampling mode.
On the basis of the foregoing embodiment, optionally, the second dictionary updating module is further configured to:
and updating the global dictionary model by adopting a federal average algorithm based on the updated target sub-dictionary model.
The device provided by the embodiment of the disclosure can execute the user clustering method provided by any embodiment of the disclosure, and has corresponding functional modules and beneficial effects for executing the user clustering method. Reference may be made to the description of any method embodiment of the disclosure for a matter not explicitly described in this embodiment.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal electronic data information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good custom of the public order.
FIG. 5 illustrates a block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 may also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 11 performs the various methods and processes described above, such as the user clustering method.
In some embodiments, the user clustering method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the user clustering method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the user clustering method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A user clustering method is applied to a smart meter and comprises the following steps:
receiving a global dictionary model sent by a server; the global dictionary model comprises at least one initialized sub-dictionary model, and the sub-dictionary model comprises preset electrical equipment information;
selecting a target sub-dictionary model from the initialized sub-dictionary models;
updating the target sub-dictionary model according to user electricity consumption data locally stored by the intelligent electric meter;
and feeding back the updated target sub-dictionary model to the server, so that the server updates the global dictionary model according to the target sub-dictionary models fed back by different intelligent electric meters, and obtains a user clustering result according to the updated global dictionary model.
2. The method of claim 1, wherein selecting a target sub-dictionary model from the initialized sub-dictionary models comprises:
and carrying out sparse coefficient coding on each initialized sub-dictionary model in sequence, calculating loss results, and taking the dictionary model with the minimum loss as the target sub-dictionary model.
3. The method of claim 2, wherein the sub-dictionary model is a translation-invariant dictionary model;
correspondingly, the sequentially performing sparse coefficient coding on each initialized sub-dictionary model and calculating a loss result includes:
for any initialized sub-dictionary model, fixing each base of the sub-dictionary model unchanged, and calculating the optimal sparse combination coefficient of the user electricity consumption data and the optimal translation unit of each base in the sub-dictionary model by a coordinate axis descending method;
and calculating a loss result based on the user electricity data, the fixed sub-dictionary model, the optimal sparse combination coefficient and the optimal translation unit of each base in the sub-dictionary model.
4. The method of claim 3, wherein updating the target sub-dictionary model according to the user electricity consumption data stored locally by the smart meter comprises:
fixing the optimal sparse combination coefficient and the optimal translation unit of each substrate in the target sub-dictionary model to be unchanged;
and updating each base of the target sub-dictionary model by adopting a projection gradient descent method based on the user electricity consumption data.
5. A user clustering method is applied to a server side, and the method comprises the following steps:
selecting at least one target user from the full power users, and sending a global dictionary model to the smart electric meter associated with the target user, so that the smart electric meter selects an initialized target sub-dictionary model from the global dictionary model and updates the target sub-dictionary model;
receiving an updated target sub-dictionary model fed back by the intelligent electric meter;
and updating the global dictionary model according to the updated target sub-dictionary model, and obtaining a user clustering result according to the updated global dictionary model.
6. The method of claim 5, wherein selecting at least one target user from the full amount of power users comprises:
and selecting at least one target user from the total amount of power users in an equal probability non-return sampling mode.
7. The method of claim 5, wherein updating the global dictionary model based on the updated target sub-dictionary model comprises:
and updating the global dictionary model by adopting a federal average algorithm based on the updated target sub-dictionary model.
8. A user clustering device configured for a smart meter, the device comprising:
the first receiving module is used for receiving the global dictionary model sent by the server; the global dictionary model comprises at least one initialized sub-dictionary model, and the sub-dictionary model comprises preset electrical equipment information;
the dictionary selection model is used for selecting a target sub-dictionary model from the initialized sub-dictionary models;
the first dictionary updating module is used for updating the target sub-dictionary model according to the user electricity consumption data locally stored in the intelligent electric meter;
and the uploading module is used for feeding the updated target sub-dictionary model back to the server, so that the server updates the global dictionary model according to the target sub-dictionary models fed back by different intelligent electric meters, and obtains a user clustering result according to the updated global dictionary model.
9. A user clustering device configured at a server, the device comprising:
the system comprises a user selection and dictionary issuing module, a global dictionary model and a target sub-dictionary model, wherein the user selection and dictionary issuing module is used for selecting at least one target user from full power users and sending the global dictionary model to the intelligent electric meter associated with the target user, so that the intelligent electric meter selects one initialized target sub-dictionary model from the global dictionary model and updates the target sub-dictionary model;
the second receiving module is used for receiving the updated target sub-dictionary model fed back by the intelligent electric meter;
and the second dictionary updating module is used for updating the global dictionary model according to the updated target sub-dictionary model and obtaining a user clustering result according to the updated global dictionary model.
10. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4 or 5-7.
11. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-4 or 5-7.
CN202210925693.XA 2022-08-03 2022-08-03 User clustering method and device, electronic equipment and storage medium Pending CN115270976A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210925693.XA CN115270976A (en) 2022-08-03 2022-08-03 User clustering method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210925693.XA CN115270976A (en) 2022-08-03 2022-08-03 User clustering method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115270976A true CN115270976A (en) 2022-11-01

Family

ID=83746509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210925693.XA Pending CN115270976A (en) 2022-08-03 2022-08-03 User clustering method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115270976A (en)

Similar Documents

Publication Publication Date Title
CN109697522B (en) Data prediction method and device
CN114329201A (en) Deep learning model training method, content recommendation method and device
JP7263463B2 (en) Method, device, electronic device, storage medium and computer program for determining recommended model and determining product price
CN109002925A (en) Traffic prediction method and apparatus
CN114580645A (en) Simulation method, device and equipment for random quantum measurement and storage medium
CN114064925A (en) Knowledge graph construction method, data query method, device, equipment and medium
CN113379153A (en) Method for predicting power load, prediction model training method and device
CN113791882A (en) Multitask deployment method and device, electronic equipment and storage medium
CN115270976A (en) User clustering method and device, electronic equipment and storage medium
CN113656689B (en) Model generation method and network information pushing method
CN113112311B (en) Method for training causal inference model and information prompting method and device
CN114722048A (en) Data processing method and device, electronic equipment and storage medium
CN113961797A (en) Resource recommendation method and device, electronic equipment and readable storage medium
CN114611609A (en) Graph network model node classification method, device, equipment and storage medium
CN113052325A (en) Method, device, equipment, storage medium and program product for optimizing online model
CN114021642A (en) Data processing method and device, electronic equipment and storage medium
CN113762992A (en) Method and device for processing data
CN112560210A (en) Method for adjusting a power grid structure, associated device and computer program product
CN114331379B (en) Method for outputting task to be handled, model training method and device
CN115168727B (en) User habit mining method and device and electronic equipment
CN113362428B (en) Method, apparatus, device, medium, and product for configuring color
CN115292339B (en) Database updating method, device, electronic equipment and storage medium
CN113157360B (en) Method, apparatus, device, medium, and article for processing an API
CN114116919A (en) Knowledge graph construction method, data query method, device, equipment and medium
CN114663154A (en) Model training method, information output method, device, equipment and storage medium

Legal Events

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