Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail. All other embodiments, which can be derived by a person skilled in the art from the described embodiments of the invention, are within the scope of the invention. Unless otherwise specified, the technical means used in the examples are conventional means well known to those skilled in the art.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
First embodiment
Fig. 1 is a flowchart of a regional joint learning method for different ubiquitous stations according to an embodiment of the present invention.
The regional joint learning method provided in this embodiment may be executed in a device such as a workstation or a server, as shown in fig. 1, the regional joint learning method includes steps S110 to S130:
s110: user characteristics of the same type/model of energy equipment in different universal stations are acquired.
Specifically, various energy devices, such as a boiler, a heat pump, solar energy and the like, are contained in the same universal station. The energy devices contained in different universal stations may be the same or different, and even if the same device, the type or model may be different in different universal stations.
In the present embodiment, only the same type or model of energy device is employed. Because even for the same device, if the model and type are different, the resulting data is very different, and for this reason the expected effect may not be achieved if the same model is trained with these data.
Specifically, users supplied by different universal energy stations are different, and therefore the energy equipment can be analyzed through the user characteristics, so that the training of the model can be realized by better utilizing the data of the energy equipment.
S120: and determining at least one joint learning area according to the user characteristics, wherein the joint learning area comprises at least one central server and a plurality of energy equipment of the same type/model respectively connected with the central server through a network.
Specifically, if the user characteristics are different, the determined joint learning area is also different.
Fig. 2 is a first flowchart illustrating an implementation of step S120 according to an embodiment of the present invention.
Illustratively, the user characteristic may be a user supply volume, i.e., a volume of energy that the energy source provides energy to the user.
On this basis, as shown in fig. 2, in step S120, at least one joint learning area is determined according to the user characteristics, and specifically includes steps S210 to S220:
and S210, determining a relation curve of the supply time and the supply amount of different users based on the supply amount of the users.
Specifically, the user energy supply amount is projected into a coordinate with time as a horizontal axis and the supply amount as a vertical axis, so that the time law of the energy supply amount of the energy device to the user can be clearly understood.
And S220, selecting energy equipment corresponding to users with the same or similar relation curves to establish a joint learning area.
Specifically, for users with the same or similar relationship curves, the data generated by the corresponding energy devices have similar rules, so that the data of the energy devices can be used for training the same model, and the quality of the model can be improved.
In this embodiment, the joint learning area is used for implementing joint learning of a plurality of energy devices of the same type or model.
Fig. 3 is a flowchart illustrating an implementation of establishing a joint learning area according to an embodiment of the present invention.
As shown in fig. 3, establishing a joint learning area may specifically include the following steps S310 to S320:
s310, a central server is determined.
And S320, respectively connecting the central server to the energy equipment corresponding to the users with the same or similar relation curves through network configuration.
In this example, the central server and the energy devices in the joint learning area form a communication network, and each energy device is connected with the central server in a one-to-one correspondence manner.
Fig. 4 is a flowchart illustrating a second implementation of step S120 according to an embodiment of the present invention.
For example, the user characteristic may be a user type, and the demand of the energy device for energy supply may be different for different users.
On this basis, as shown in fig. 4, in step S120, at least one joint learning area is determined according to the user characteristics, and specifically includes steps S410-S420:
s410: all users of the same type/model of energy device are classified.
Specifically, the users include industrial users and general users, and obviously, the industrial users and the general users have great difference in energy supply requirements, so that the users can be classified.
S420: and selecting the energy equipment corresponding to the users with the same classification according to the classification result to establish a joint learning area.
Specifically, energy devices corresponding to users of the same classification are combined to establish a combined area, data generated by the energy devices corresponding to the users have the same or similar rules due to the fact that the types of the users are similar, and the data are used for performing combined learning training on the same model, so that the model can obtain higher quality.
Fig. 5 is a flowchart illustrating an implementation of establishing a joint learning area according to another embodiment of the present invention.
As shown in fig. 5, establishing a joint learning area may specifically include the following steps S510 to S520:
s510: determining a central server;
s520: and respectively connecting the central servers to the energy equipment corresponding to the users of the same classification through network configuration.
Similar to the example of fig. 3, the present example uses a central server as a center, and the energy devices corresponding to users of the same category are respectively connected to the central server one by one.
S130: and performing joint learning on each joint learning area by adopting the same model structure.
In this embodiment, each joint learning area is correspondingly established with one central server, and on this basis, a joint learning method is adopted to improve the quality of model training of energy devices in the joint learning area under the condition of ensuring data security.
In addition, the same or different situations may exist in consideration of the model structures adopted on different joint learning regions. When a plurality of joint learning areas exist, if the model structures adopted by more than one joint learning area are the same, each joint learning area also insists on using the own central server, and then resources are wasted.
For example, please refer to fig. 6, which is a flowchart illustrating an implementation before step S130 provided in an embodiment of the present invention.
As shown in fig. 6, before performing the joint learning by using the same model structure in each joint learning region, the following steps S610 to S630 are further included:
s610: when a plurality of joint learning areas are established, judging whether model structures adopted by different joint learning areas are the same;
s620: if yes, randomly appointing one of the central servers of different joint learning areas as a global central server;
s630: if not, the process proceeds to step S130.
In this embodiment, by determining the global central server for a plurality of joint learning regions adopting the same model structure, on one hand, energy consumption of the device can be reduced, on the other hand, energy device data can be enriched, and quality of model structure training is further improved.
Fig. 7 is a flowchart of step S130 provided in an embodiment of the present invention.
Illustratively, this embodiment provides a specific flow chart for performing joint learning on a joint learning region by using the same model structure, and as shown in fig. 7, the specific flow chart specifically includes the following steps:
s710: an initial model structure is generated by the central server.
Specifically, the model structure in this embodiment may include various types of models, such as a machine learning model or a deep learning model.
S720: and sending the model structure to each energy device in the joint learning area, and instructing the energy devices to train the model structure by using the data of the energy devices.
S730: and receiving the parameters and gradient data returned after the model structure is trained by each energy device.
S740: aggregating the parameters and gradient data, and updating the model structure using the aggregated parameters and gradient data.
In particular, the polymerization parameters and gradient data may include averaging, or median values.
S750: sending the updated parameters and gradient data of the model structure to each energy device in the joint learning area, and instructing the energy devices to train the local model structure by using the parameters and the gradient data;
s760: and repeating the steps of receiving the parameters and the gradient data and transmitting the updated parameters and the updated gradient data (i.e., S730 to S750) until the set cycle number is repeatedly reached or the precision of the model structure reaches the preset requirement.
According to the embodiment of the invention, the user characteristics of the energy equipment of the same type/model in different universal stations are obtained, at least one joint learning area is determined according to the user characteristics, finally, the same model structure is adopted in each joint learning area for joint learning, and the problem of low model quality of the energy equipment in the universal stations for generating data training is solved by performing model training on the data generated by the energy equipment in the different universal stations and performing transverse joint learning.
Second embodiment
Fig. 8 is a schematic diagram of a regional joint learning device for different universal stations provided by the invention.
As shown in fig. 8, the apparatus includes:
the data acquisition module is configured to acquire user characteristics of energy equipment of the same type/model in different universal energy stations;
a joint region construction module configured to determine at least one joint learning region according to the user characteristics, wherein the joint learning region comprises at least one central server and a plurality of energy devices of the same type/model respectively connected with the central server through a network;
and the joint learning module is configured to perform joint learning by adopting the same model structure on each joint learning area.
In some exemplary embodiments, the user characteristics include a user supply volume.
Correspondingly, the joint area establishing module specifically includes:
a first analysis unit configured to determine a relation curve of supply time and supply amount of different users based on the user supply amount;
and the first joint area establishing unit is configured to select the energy equipment corresponding to the users with the same or similar relation curves to establish the energy equipment as a joint learning area.
In some exemplary embodiments, the first union region establishing unit specifically includes:
a first trust center determination unit configured to determine a central server;
and the first network configuration unit is configured to enable the central server to be respectively connected to the energy equipment corresponding to the users with the same or similar relation curves through network configuration.
In some exemplary embodiments, the user characteristics include a user type.
Correspondingly, the joint area establishing module specifically includes:
a second analysis unit configured to classify users of all energy devices of the same type/model;
and the second joint area establishing unit is configured to select the energy equipment corresponding to the users in the same classification according to the classification result and establish the energy equipment as a joint learning area.
In some exemplary embodiments, the second union area establishing unit specifically includes:
a first trust center determination unit configured to determine a central server;
and the second network configuration unit is configured to enable the central server to be respectively connected to the energy devices corresponding to the users in the same category through network configuration.
In some exemplary embodiments, the apparatus may further include:
the judging module is configured to judge whether model structures adopted by different joint learning areas are the same or not when a plurality of joint learning areas are established;
the second trust center determining unit is configured to randomly designate one of the center servers of different joint learning areas as a global center server if the central server exists;
and the jumping unit is configured to enter joint learning by adopting the same model structure on each joint learning area if not.
In some exemplary embodiments, the joint learning module specifically includes:
a model generation unit configured to generate an initial model structure by the central server.
And the model sending unit is configured to send the model structure to each energy device in the joint learning area, and is used for instructing the energy devices to train the model structure by using own data.
And the parameter receiving unit is configured to receive the parameters and the gradient data returned after the model structure is trained by each energy device.
A parameter aggregation unit configured to aggregate the parameters and gradient data and update the model structure using the aggregated parameters and gradient data.
And the parameter sending unit is configured to send the updated parameters and gradient data of the model structure to each energy device in the joint learning area, and is used for instructing the energy devices to train a local model structure by using the parameters and gradient data.
And the cycle execution unit is configured to repeat the steps of receiving the parameters and the gradient data and sending the updated parameters and the updated gradient data until the set cycle number is repeatedly reached or the precision of the model structure reaches a preset requirement.
Third embodiment
The method and the device can be applied to terminal equipment such as a cloud server.
Fig. 9 is a diagram of a terminal device to which the above method and apparatus may be applied in an embodiment of the present invention, as shown in the figure, the terminal device 9 includes amemory 91, aprocessor 90, and acomputer program 92 stored in thememory 91 and executable on theprocessor 90, and when theprocessor 90 executes thecomputer program 92, the steps of the method for jointly learning the regions of different smart stations are implemented. Such as the functions of the modules 81 to 83 shown in fig. 8.
The terminal device 9 may be a computing device such as a cloud server. The terminal device may include, but is not limited to, theprocessor 90 and thememory 91. Those skilled in the art will appreciate that fig. 9 is only an example of a terminal device 9, and does not constitute a limitation to the terminal device 9, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal device may also include an input-output device, a network access device, a bus, etc.
TheProcessor 90 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Thememory 91 may be an internal storage unit of the terminal device 9, such as a hard disk or a memory of the terminal device 9. Thememory 91 may also be an external storage device of the terminal device 9, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) and the like provided on the terminal device 9. Further, thememory 91 may also include both an internal storage unit and an external storage device of the terminal device 9. Thememory 91 is used for storing the computer program and other programs and data required by the terminal device. Thememory 91 may also be used to temporarily store data that has been output or is to be output.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
Specifically, the present application further provides a computer-readable storage medium, which may be a computer-readable storage medium contained in the memory in the foregoing embodiments; or it may be a separate computer-readable storage medium not incorporated into the terminal device. The computer readable storage medium stores one or more computer programs:
a computer-readable storage medium comprising a computer program stored thereon which, when being executed by a processor, carries out the steps of the method of regional joint learning of different ubiquitous stations.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.