Model processing method of cloud service system and cloud service system
By introducing local servers into cloud service systems and collaboratively updating machine learning models, the problem of the update process affecting system efficiency in the existing technology is solved, and more efficient model updates and computing resource utilization is achieved.
Patent Information
- Application Number
- CN202010699825.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-17
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2040-07-17
AI Technical Summary
When the prior art updates machine learning models in cloud service systems, it is easy to affect the operation efficiency of cloud servers and terminal devices, and has high requirements for computing capabilities, making it difficult to improve system efficiency while ensuring update accuracy.
By setting up a local server between the cloud server and the edge device, obtain the data set used by the edge device, calculate and send gradient values to the cloud server, to collaborate on updating the machine learning model. This method reduces the computing demand for cloud servers and edge devices and reduces the amount of data interaction.
On the basis of ensuring the accuracy of updating machine learning models, the amount of data interaction between edge devices and servers is reduced, and the computing capability requirements for cloud servers and edge devices are reduced, and the operation efficiency of the entire cloud service system is improved.
Smart Images

Figure CN113946434B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a model processing method for a cloud service system and a cloud service system. Background Art
[0002] Edge computing is a specific implementation of cloud computing technology. Under the architecture of cloud servers, cloud servers can provide computing tools such as machine learning models to terminal devices. Edge devices use the machine learning models provided by cloud servers to perform edge computing. This computing method can effectively reduce the computing workload of cloud servers, thereby improving the operating efficiency of the entire cloud service system.
[0003] In order to ensure the calculation accuracy, the supplier needs to continuously update the machine learning model provided by the cloud server. In one update technology, the latest calculation data used by all terminal devices during calculation will be sent to the cloud server, and the cloud server will be relied upon to update the machine learning model according to the calculation data. However, the computing power of the cloud server is increased, which will reduce the operating efficiency of the entire cloud service system. In another update technology, the terminal device and the cloud server update the machine model through federated learning, wherein a federated learning client can be set up on the terminal device, and the machine learning model can be updated according to its own calculation data, and the updated gradient value can be sent to the cloud server. A federated learning server can be set up on the cloud server, which can update the machine learning model according to the gradient value received from the terminal device, but it will increase the computing power of the terminal device. In the case that the computing power of most terminal devices cannot be met, it will also affect the overall operation of the cloud service system.
[0004] Therefore, how to update the machine learning model provided by the cloud server in the cloud service system without affecting the overall operation of the cloud service system is a technical problem that needs to be urgently solved in this field. Summary of the invention
[0005] The present application provides a model processing method and a cloud service system for a cloud service system, which are used to solve the technical problem of how to update the machine learning model in the cloud service system of the prior art without affecting the overall operating efficiency of the cloud server.
[0006] In a first aspect, the present application provides a cloud service system, comprising: a cloud server and multiple local servers, wherein a first local server among the multiple local servers is connected to the cloud server via a network, and the first local server is also connected to at least one edge device; wherein the first local server is used to obtain a data set of the at least one edge device, wherein the data set includes data used by the at least one edge device when performing calculations using a first model provided by the cloud server; based on the data set of the at least one edge device, a first gradient value for updating the first model is determined; and the first gradient value is sent to the cloud server; the cloud server is used to update the first model based on the first gradient value, and send the updated first model to the first local server.
[0007] In summary, the cloud service system provided in this embodiment does not completely rely on the cloud server for data calculation, nor does it rely on the edge device itself to update the model during the entire model update process. Instead, the model is updated through the computing power provided by the local server. Therefore, while ensuring the update of the model provided by the cloud server, it can also reduce the amount of data interaction between the edge device and the server, and can also reduce the computing power requirements of the cloud server and the edge device, thereby improving the operating efficiency of the entire cloud service system.
[0008] In an embodiment of the first aspect of the present application, the cloud server is also used to send multiple models to the cloud server; the first local server is also used to receive and store the multiple models sent by the cloud server; determine at least one model corresponding to the first edge device among the at least one edge device; and send the at least one model to the first edge device.
[0009] In summary, in the cloud service system provided by this embodiment, the first local server also has the function of model storage and determining different models corresponding to different edge devices, thereby further reducing the calculations required by the cloud server. The cloud server only needs to send the trained model to the local server, and the local server will send the model to the corresponding edge devices in a more targeted manner. It can also make the model used by the first edge device more accurate, thereby improving the accuracy of the first edge device when using the model for calculation, thereby further improving the operating efficiency of the entire cloud service system.
[0010] In an embodiment of the first aspect of the present application, the cloud server is also used to send a construction tool and a labeling tool to the first local server; wherein the construction tool is used to build the first local server, and the labeling tool is used to label the data in the data set.
[0011] In summary, in the cloud service system provided by the present embodiment, the cloud server can send construction tools and annotation tools to the first local server, so that the first local server can build a local server and implement related functions according to the tools sent by the cloud server, thereby supplementing the completeness of the entire cloud service system during implementation, so that the operator of the cloud service system can complete the construction and deployment of the first local server through the cloud server.
[0012] In an embodiment of the first aspect of the present application, the first local server is also used to, through the labeling tool, label the first data in the data set of the at least one edge device to obtain multiple labeling results; and when the multiple labeling results are the same, add the first data to the local data set, and the local data set is used to determine the first gradient value for updating the first model; when the multiple labeling results are not exactly the same, send the first data to the first device, and after receiving the confirmation information sent by the first device, add the first data to the local data set.
[0013] In summary, in the model processing method of the cloud service system provided in this embodiment, the first local server can use the annotation tool to annotate the data in the data set of the edge device, and only add the data with the same annotation results to the local data set, thereby improving the accuracy of the calculation when the data of the added local data set is used for subsequent model updates. In addition, the data with different annotation results rely on manual annotation, which further ensures that the annotation of the data added to the local data set is correct.
[0014] In an embodiment of the first aspect of the present application, the first local server is also used to determine the performance parameters of the at least one connected edge device when using the multiple models stored in the first local server for calculation, and sort the multiple models according to the performance parameters; send the sorting information of the multiple models to the cloud server; the cloud server is used to sort the multiple models according to the sorting information of the multiple models.
[0015] In summary, in the cloud service system provided in this embodiment, the first server also has a sorting function. By sorting multiple models, the first server can continuously optimize the composition of the models provided by the cloud server, realize the "survival of the fittest" of the models, and improve the performance of subsequent edge devices when using the model for calculation, thereby further improving the operating efficiency of the entire cloud service system.
[0016] In an embodiment of the first aspect of the present application, the cloud server is specifically used to update the first model according to the first gradient value and the gradient value sent by at least one second local server among the multiple local servers.
[0017] In summary, the cloud service system provided in this embodiment can update the model used by the edge device by collaboratively updating the cloud server and the local server, and this collaborative update structure can realize federated learning. A federated learning client can be deployed on the local server, so that the local server updates the model instead of the terminal device and interacts with the cloud server, further reducing the calculations performed by the terminal device and the amount of data interaction between the edge device and the server, thereby improving the operating efficiency of the entire cloud service system.
[0018] The second aspect of the present application provides a model processing method for a cloud service system. By setting up a local server between the cloud server and the edge device, after obtaining the data when the edge device uses the model for calculation, the model can be updated through the local server, and the gradient value of the updated model can be sent to the cloud server. Finally, the cloud server updates the model according to the gradient value of the local server.
[0019] In summary, the model processing method of the cloud service system provided in this embodiment does not completely rely on the cloud server for data calculation, nor does it rely on the edge device itself to update the model during the entire model update process. Instead, the model is updated through the computing power provided by the local server. Therefore, on the basis of ensuring the update of the model provided by the cloud server, the amount of data interaction between the edge device and the server can be reduced, and the requirements for the computing power of the cloud server and the edge device can be reduced, thereby improving the operation efficiency of the entire cloud service system.
[0020] In an embodiment of the second aspect of the present application, before the first local server obtains the data set of at least one edge device, the cloud server can also send the model to the edge device through the first local server. Specifically, for the first local server, after receiving and storing multiple models sent by the cloud server, the model corresponding to each edge device in at least one edge device is determined respectively. For example, after determining at least one model corresponding to the first edge device, the determined model is sent to the first edge device.
[0021] In summary, in the model processing method of the cloud server system provided in this embodiment, the first local server also has the function of model storage and determining different models corresponding to different edge devices, thereby further reducing the calculations required by the cloud server. The cloud server only needs to send the trained model to the local server, and the local server will send the model to the corresponding edge devices in a more targeted manner. It can also make the model used by the first edge device more accurate, thereby improving the accuracy of the first edge device when using the model for calculation, thereby further improving the operating efficiency of the entire cloud service system.
[0022] In an embodiment of the second aspect of the present application, in order to realize a cloud service system, before the first local server starts to obtain a data set of at least one edge device, the first local server can receive a construction tool and annotating tool sent by the cloud server, thereby using the construction tool to build the first local server and using the annotation tool to annotate the data in the data set.
[0023] In summary, in the model processing method of the cloud service system provided in this embodiment, the cloud server can send construction tools and annotation tools to the first local server, so that the first local server can build a local server and implement related functions according to the tools sent by the cloud server, thereby supplementing the completeness of the entire cloud service system during implementation, so that the operator of the cloud service system can complete the construction and deployment of the first local server through the cloud server.
[0024] In an embodiment of the second aspect of the present application, the first local server annotates the data set specifically including: the first local server annotates the first data in the data set of at least one edge device through an annotation tool, and when multiple annotation results of multiple models are the same, the first local server adds the first data to the local data set, and the local data set is used by the first local server to subsequently update the first model; when multiple annotation results of multiple models are not exactly the same, a manual review step is required, and the first server can send the first data to the first device used by the staff, allowing the staff to manually annotate the first data, and only add the first data to the local data set after receiving the confirmation information sent by the first device used by the staff.
[0025] In summary, in the model processing method of the cloud service system provided in this embodiment, the first local server can use the annotation tool to annotate the data in the data set of the edge device, and only add the data with the same annotation results to the local data set, thereby improving the accuracy of the calculation when the data of the added local data set is used for subsequent model updates. In addition, the data with different annotation results rely on manual annotation, which further ensures that the annotation of the data added to the local data set is correct.
[0026] In an embodiment of the second aspect of the present application, the first local server also has the function of sorting models. Specifically, the first local server can sort the multiple models according to the performance parameters of at least one connected edge device when using multiple models for calculation, and then send the sorting information of the multiple models to the cloud server.
[0027] In summary, the model processing method of the cloud service system provided in this embodiment enables the cloud server to continuously optimize the composition of the models provided by the cloud server after sorting multiple models, thereby realizing the "survival of the fittest" of the models, and improving the performance of subsequent edge devices when using the model for calculation, thereby further improving the operating efficiency of the entire cloud service system.
[0028] The third aspect of the present application provides a model processing method for a cloud service system, comprising: after the cloud server receives a first gradient value sent by a first local server, it updates the first model according to the first gradient value and sends the updated first model to the local server.
[0029] In summary, the model processing method of the cloud service system provided in this embodiment, from the perspective of the cloud server, only needs to cooperate with the local server to update the first model of the edge device. In the entire model update process, it neither completely relies on the cloud server for data calculation, nor relies on the edge device itself to update the model. Instead, the model is updated through the computing power provided by the local server. Therefore, on the basis of ensuring the update of the model provided by the cloud server, it can also reduce the amount of data interaction between the edge device and the server, and can also reduce the computing power requirements of the cloud server and the edge device, thereby improving the operation efficiency of the entire cloud service system.
[0030] In an embodiment of the third aspect of the present application, the cloud server updates the first model jointly according to the first gradient value sent by the first local server and the gradient value sent by at least one second local server by means of synchronous update.
[0031] In summary, the model processing method of the cloud service system provided in this embodiment can update the model used by the edge device by collaboratively updating the cloud server and the local server, and this collaborative update structure can realize federated learning. A federated learning client can be deployed on the local server, so that the local server updates the model instead of the terminal device and interacts with the cloud server, further reducing the calculations performed by the terminal device and the amount of data interaction between the edge device and the server, thereby improving the operating efficiency of the entire cloud service system.
[0032] In an embodiment of the third aspect of the present application, in order to realize a cloud service system, the cloud server can also send construction tools and annotation tools to the first local server before the first local server starts to obtain a data set of at least one edge device, so that the first local server can build the first local server according to the construction tool and use the annotation tool to annotate the data in the data set.
[0033] In summary, in the model processing method of the cloud service system provided in this embodiment, the cloud server can send construction tools and annotation tools to the first local server, so that the first local server can build a local server and implement related functions according to the tools sent by the cloud server, thereby supplementing the completeness of the entire cloud service system during implementation, so that the operator of the cloud service system can complete the construction and deployment of the first local server through the cloud server.
[0034] In an embodiment of the third aspect of the present application, the first local server also has the function of sorting the models. Specifically, the cloud server can receive sorting information of multiple models sent by the first local server. After the cloud server sorts the multiple models, it can continuously optimize the composition of the models provided by the cloud server, realize the "survival of the fittest" of the models, and improve the performance of subsequent edge devices when using the model for calculation, thereby further improving the operating efficiency of the entire cloud service system.
[0035] The fourth aspect of the present application provides a cloud service system model processing device, which can be used as the first local server in each embodiment of the first aspect and the second aspect of the present application, and executes the method executed by the first local server. The device includes: an acquisition module, which is used to acquire a data set of at least one edge device, and the data set includes data used by the at least one edge device when calculating using a first model provided by the cloud server; a processing module, which is used to determine a first gradient value for updating the first model based on the data set of the at least one edge device; and a transmission module, which is used to send the first gradient value to the cloud server.
[0036] In an embodiment of the fourth aspect of the present application, the transmission module is also used to receive multiple models sent by the cloud server and store the multiple models in the storage module; the processing module is also used to determine at least one model corresponding to the first edge device among the at least one edge device; the transmission module is also used to send the at least one model to the first edge device.
[0037] In an embodiment of the fourth aspect of the present application, the transmission module is also used to receive construction tools and annotation tools sent by the cloud server; wherein the construction tools are used to build the first local server, and the annotation tools are used to annotate the data in the data set.
[0038] In an embodiment of the fourth aspect of the present application, the processing module is also used to, through the labeling tool, label the first data in the data set of the at least one edge device to obtain multiple labeling results; and when the multiple labeling results are the same, the first local server adds the first data to the local data set, and the local data set is used to determine the first gradient value for updating the first model; the transmission module is also used to, when the multiple labeling results are not exactly the same, send the first data to the first device, and after receiving the confirmation information sent by the first device, add the first data to the local data set.
[0039] In an embodiment of the fourth aspect of the present application, the processing module is also used to determine the performance parameters of the at least one connected edge device when using the multiple models stored in the first local server for calculation, and sort the multiple models according to the performance parameters; the transmission module is also used to send the sorting information of the multiple models to the cloud server.
[0040] The fifth aspect of the present application provides a cloud service system model processing device, which can be used as the cloud server in each embodiment of the first aspect and the third aspect of the present application, and executes the method executed by the cloud server. The device includes: a transmission module, which is used to receive a first gradient value sent by a first local server, wherein the first gradient value is used to update a first model provided by the cloud server; a processing module, which is used to update the first model according to the first gradient value; and the transmission module is also used to send the updated first model to the first local server.
[0041] In an embodiment of the fifth aspect of the present application, the processing module is specifically used to update the first model according to the first gradient value and the gradient value sent by at least one second local server among the multiple local servers.
[0042] In an embodiment of the fifth aspect of the present application, the transmission module is also used to send a construction tool and a labeling tool to the first local server; wherein the construction tool is used to build the first local server, and the labeling tool is used to label the data in the data set.
[0043] In an embodiment of the fifth aspect of the present application, the transmission module is also used to receive sorting information of multiple models sent by the first local server; the processing module is also used to sort the multiple models according to the sorting information of the multiple models.
[0044] In a sixth aspect, an embodiment of the present application provides a computing device, comprising: a processor and a communication interface. The processor sends data through the communication interface; the processor is used to implement the method performed by the first local server in the first aspect or the second aspect.
[0045] As a possible design, the above-mentioned computing device also includes: a memory; the memory is used to store program code, and the processor executes the program code stored in the memory, so that the computing device executes the method performed by the first local server in the above-mentioned first aspect or second aspect.
[0046] In a seventh aspect, an embodiment of the present application provides a computing device, comprising: a processor and a communication interface. The processor sends data through the communication interface; the processor is used to implement the method performed by the cloud server in the first aspect or the third aspect.
[0047] As a possible design, the above-mentioned computing device also includes: a memory; the memory is used to store program code, and the processor executes the program code stored in the memory, so that the computing device executes the method performed by the cloud server in the above-mentioned first aspect or third aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A schematic diagram of the application scenario of this application;
[0049] Figure 2 It is a structural diagram of a cloud service system;
[0050] Figure 3 A schematic diagram of the structure of an embodiment of a cloud service system provided by the present application;
[0051] Figure 4 A flowchart of an embodiment of a model processing method for a cloud service system provided by the present application;
[0052] Figure 5 A schematic diagram of the process of synchronously updating the model provided for this application;
[0053] Figure 6 A schematic diagram of the process of asynchronously updating the model provided for this application;
[0054] Figure 7 A flowchart of an embodiment of a cloud service system model processing method provided by the present application;
[0055] Figure 8 A flowchart of an embodiment of a cloud service system model processing method provided by the present application;
[0056] Fig. 9A schematic diagram of the data annotation process provided in the embodiment of the present application;
[0057] Fig.10 A flowchart of an embodiment of a model processing method for a cloud service system provided by the present application;
[0058] Fig.11 A schematic diagram of the structure of another cloud service system provided for this application;
[0059] Fig.12 A schematic diagram of the structure of an embodiment of a cloud service system model processing device provided by the present application;
[0060] Fig.13 A schematic diagram of the structure of an embodiment of a cloud service system model processing device provided by the present application;
[0061] Fig.14 A schematic diagram of the structure of the computing device provided in this application. DETAILED DESCRIPTION
[0062] Figure 1 This is a schematic diagram of the application scenario of the present application, wherein the present application can be applied in the field of cloud computing technology, and the cloud computing service provider can set up one or more cloud servers 3 in the Internet 2, and the cloud server 3 provides cloud computing services. For example, when the terminal device 1 used by the user needs certain software and hardware computing resources, the user can directly use, apply to, or pay a certain fee to the supplier to obtain the software and hardware resources provided by the cloud server 3, so that the terminal device 1 can use the cloud computing service provided by the supplier. Since the computing resources used by the terminal device 1 are provided by the cloud server 3 set up by the supplier on the network side, this scenario of using network resources for computing can also be called "cloud computing", and the cloud server 3 and the terminal device 1 can be called a "cloud service system" together.
[0063] In such Figure 1 In a specific implementation of the scenario shown, the terminal device 1 may be an edge device for implementing edge computing. Edge computing refers to the ability of a device in a cloud service system that is close to an object or data source to provide computing services. Figure 1 In the example, the terminal device 1 can cooperate with the cloud server 3 to perform edge computing, and the terminal device 1 that performs edge computing can also be called an "edge device". For example, the terminal device 1 can process local data with a low latency and send the processed data to the cloud server 3, so that the terminal device 1 does not need to send the data to the cloud server 3 for computing, which reduces the computing pressure of the cloud server 3 and improves the operating efficiency of the cloud service system.
[0064] More specifically, the training and calculation of the machine learning model (referred to as: model in the present embodiment) is a common edge computing method in the cloud service system. For example, the supplier of the cloud server 3 collects a large amount of training data and uses a high-performance server to train a machine learning model 31 that can be used to identify the animal category in the image, and sends the machine learning model 31 to the terminal device 1 that needs to use the machine learning model. Figure 1 In the example, the cloud server 3 can send the machine learning model 31 to the three terminal devices 1 labeled 11-13. Each terminal device 1 can identify the animal category in the image it has collected through the received machine learning model 31, thereby realizing the edge computing scenario in which the model provided by the cloud server 3 is calculated on the terminal device 1.
[0065] At the same time, since the training data collected by the supplier may differ from the computing data used by the terminal device 1 for edge computing, and the computing data may change at any time as external conditions change, it may cause the machine learning model 31 to perform edge computing. The calculation accuracy is reduced. Therefore, in the above-mentioned edge computing scenario, after sending the machine learning model 31 to the terminal device 1, the cloud server 3 can continue to update the machine learning model 31 and send the updated machine learning model 31 to the terminal device 1 to improve the calculation accuracy of the terminal device 1 using the machine learning model 31 for edge computing.
[0066] In the first method of updating the machine learning model 31, each terminal device 1 sends the data calculated by the machine learning model 31 to the cloud server 3, and the cloud server 3 updates the machine learning model 31 according to the data sent by each terminal device 1, and then sends the updated machine learning model 31 to each terminal device 1. However, this update method is completely dependent on the computing power of the cloud server 3, and adds a large amount of interactive data to the cloud server 3 and the terminal device 1, increases the bandwidth requirements, and thus reduces the operating efficiency of the entire cloud service system. At the same time, some of the more sensitive data processed by the terminal device 1 will also be sent directly to the cloud server 3, and the security of the data cannot be guaranteed in this process. And because each terminal device 1 uploads the data directly to the cloud server, data sharing cannot be achieved between different terminal devices, resulting in the "data island" problem.
[0067] In the second method of updating the machine learning model 31, Figure 2 A schematic diagram of the structure of a cloud service system is shown in FIG. Figure 2 The system shown in Figure 1Based on the scenario shown, the machine learning model 31 is updated through the federated learning service, where the federated learning service (FLS) is deployed in the cloud server 3, and the federated learning client (FLC) is deployed in each terminal device 1. All FLCs can connect to the FLS through the front-end agent server. This structure can also be called the "edge-cloud collaboration" update structure. Figure 2 In the cloud service system shown, the FLC deployed on each terminal device 1 can update the machine learning model 31 by itself according to the data used by the terminal device 1 when using the machine learning model 31 for calculation, and send the gradient value obtained by updating the machine learning model 31 to the FLS through the front-end proxy server 4. Then the FLS can update the machine learning model 31 according to the gradient values sent by multiple FLCs, and send the updated machine learning model 31 to each terminal device 1. However, this update method places high demands on the computing power of the terminal device 1. In addition to using the machine learning model 31 for calculation, the terminal device 1 also needs to calculate the gradient value for updating the machine learning model 31. In actual use, more terminal devices 1 have limited computing power, and it is difficult to directly participate in the update of the machine learning model 31 with limited computing power.
[0068] In summary, there are respective shortcomings when updating the machine learning model 31 based on the above two methods. Either the update relies on the cloud server 3, which reduces the system performance and causes the data island problem, or the update relies on the terminal device 1, which is difficult to implement due to the limitation of computing power. The present application provides a model processing method and a cloud service system for a cloud service system. A local server is set between the cloud server and the terminal device, and the local server updates the machine learning model together with the cloud server according to the data of at least one connected terminal device. Thus, while ensuring the update of the machine learning model, the requirements for the computing power of the cloud server and the terminal device and the data interaction between the two are reduced, thereby improving the operation efficiency of the entire cloud service system.
[0069] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0070] Figure 3 A schematic diagram of the structure of an embodiment of the cloud service system provided by this application is shown in FIG. Figure 3 The cloud service system shown includes: a cloud server 3 and multiple local servers 5, for example, Figure 3The multiple local servers 5 in the example are connected to the cloud server 3 respectively. At the same time, the local server 5 can also be connected to at least one edge device 1, which can be a terminal device capable of edge computing. Figure 3 In the example, a local server 5 can be connected to multiple edge devices 1. The local server 2 can be a server set up at the location of multiple edge devices. In an example scenario, Company B located in City A sets up a cloud server in its company and provides a machine learning model. When Company D located in City C uses multiple edge devices, a local server can be set up in Company D, so that multiple edge devices of Company D are connected to the local server set up in Company D. At the same time, the local server set up in Company D can connect to the cloud server set up in Company B through the Internet.
[0071] Specifically, the cloud server 3 can provide a machine learning model to the edge device 1 that needs the machine learning model, and the number of machine learning models provided by the cloud server 3 to each edge device 1 can be one or more. Figure 3 In the system shown, after training multiple machine learning models, the cloud server 3 can send the multiple machine learning models to the connected local server 5, and the local server 5 sends the machine learning models to the corresponding edge device 1. For example, after the cloud server 3 trains machine learning models for implementing different functions, assuming that at least one edge device connected to the local server 5 needs to use a machine learning model for identifying animal categories, the cloud server 3 sends the multiple machine learning models for identifying animal categories to the local server 5, and the local server 5 then sends the multiple machine learning models to the connected edge devices. The edge devices that receive the machine learning models can perform edge computing for animal category identification based on the machine learning models. In this process, the local server 5 can act as a gateway.
[0072] Furthermore, the present application provides Figure 3 The cloud service system shown can, on the basis of realizing the above-mentioned edge computing, also allow the local server 5 and the cloud server 3 to collaborate to update the machine learning model provided by the cloud server. Taking a local server connected to the cloud server (referred to as the first local server) and an edge device connected to the first local server (referred to as the first edge device) as an example, the following describes the process of updating the machine learning model used by the first edge device in collaboration with the first local server and the cloud server in the model processing method of the cloud service system provided in this embodiment.
[0073] Figure 4 A flow chart of an embodiment of a model processing method for a cloud service system provided in this application is shown in FIG. Figure 4 The execution subject of the method shown can be applied in Figure 3 In the cloud service system shown, it is executed by the cloud server 3 and any local server 5 connected to the cloud server 3, and the local server is also connected to at least one edge device 1.
[0074] S101: A first local server obtains a data set of at least one connected edge device.
[0075] Specifically, the model processing method provided in this embodiment is based on the cloud server having sent the machine learning model to the local server, and the local server sending the machine learning model to the edge device for use. Then in S101, in order to update the machine learning model, all edge devices connected to the first local server send the data used for calculation to the first local server when using the machine learning model for calculation.
[0076] It is understandable that each edge device may use one or more machine learning models, any one of which is used as the first model for illustration. Then in S101, the data when each edge device uses the first model for calculation is recorded as a data set, and the first local server receives the data sent by the connected edge device when using the first model for calculation.
[0077] Exemplarily, the cloud server sends a first model for identifying the animal category in the image as a cat or a dog to a first local server. After the first local server sends the first model to two edge devices connected to the first local server, in S101, a data set sent by an edge device can be received, including two images of cats when calculated using the first model, and a data set sent by another edge device can be received, including two images of dogs and one cat when calculated using the first model.
[0078] S102: The first local server calculates a first gradient value for updating the first model according to a data set of at least one edge device obtained in S101.
[0079] Specifically, the first local server provided in this embodiment not only has the function of providing a gateway, but also has the ability to obtain parameters for model updates, and after obtaining a certain number of data sets, it can calculate the parameters for updating the first model, such as the gradient value for updating the first model. This update method does not involve the participation of a cloud server, and the calculation performed does not directly update the first model, but instead obtains parameters for updating the first model, so it can be called a "local update."
[0080] For example, in the above example, because the images of cats and dogs collected by the cloud server when training the first model are different from the images actually used by the edge device to calculate the first model, the first local server can use the five images received to locally update the first model to obtain a first gradient value. Assuming that the parameter in the first model is 2, and the parameter after the first local server locally updates the first model is 2.1, the first gradient value is the change between the two, which is 0.1.
[0081] S103: After the first local server obtains the first gradient value of the first model in S102, it sends the obtained first gradient value to the cloud server in S103, and correspondingly, the cloud server receives the first gradient value sent by the first local server.
[0082] Specifically, due to the limitations of the calculation data obtained by the first local server, the calculation performed by the first local server only obtains the parameters for updating the first model, but does not update the first model. After the first local server sends the first gradient value to the cloud server, the cloud server updates the first model based on the first gradient value. In this process, although the first local server has not actually completed the update of the first model, the first local server also participates in the calculation of the cloud server to update the first model (calculates the first gradient value used to update the first model), so this process can also be called the "cooperative update" of the first model by the cloud server and the local server.
[0083] S104: The cloud server updates the first model according to the first gradient value sent by the first local server.
[0084] Specifically, in the embodiment of the present application, the cloud server can update the first model in collaboration with the local server in a synchronous update or asynchronous update manner. The following is an explanation with reference to the accompanying drawings:
[0085] 1. Synchronous update:
[0086] Figure 5 A schematic diagram of the process flow of model synchronization update provided in this application, which can be applied to Figure 3In the cloud service system shown, all local servers connected to the cloud server except the first local server in the above example are recorded as second local servers. After the cloud server trains the first model, it first sends the first model to all local servers, and then in actual use, each local server calculates the gradient value for updating the first model through steps S101-S103. For example, the first local server calculates the first gradient value and sends it to the cloud server, the second local server 1 calculates the second gradient value 1 and sends it to the cloud server... All local servers can calculate the first model according to their own data and obtain the gradient value, and then send it to the cloud server at the same time. For the cloud server, after receiving the gradient values sent by multiple local servers for updating the first model at the same time, all gradient values can be gradient aggregated, and finally the first model can be updated. A simple example summary, assuming that the parameter in the first model is 2, and the gradient values received by the cloud server are 0.1, -0.2, and 0.3 respectively, the cloud server can add these gradients to obtain the updated parameter of the first model as 2.2. After updating the first model, the cloud server can send the first model to all local servers again and continue to execute the loop. Figure 5 The process shown.
[0087] 2. Asynchronous update:
[0088] Figure 6 A schematic diagram of the process of asynchronously updating the model provided in this application, wherein Figure 5 The execution subjects are the same. When the cloud server obtains the first model after training, it first sends the first model to all local servers. Then, in actual use, each local server calculates the gradient value used to update the first model through steps S101-S103, and then sends the updated gradient values to the cloud server respectively. For example, the first local server calculates the first gradient value and sends it to the cloud server. At this time, the cloud server can update the first model and return the updated first model to the first local server. Subsequently, when the second local server 1 calculates the second gradient value 1 and sends it to the cloud server, at this time, the cloud server updates the first model according to the second gradient value 1 based on the update of the first model according to the first gradient value, and returns the updated first model to the second local server 1... Then, when the cloud server receives the gradient values sent by all local servers and updates them respectively, the entire asynchronous update process is completed, and the loop execution can continue. Figure 6 The process shown.
[0089] S105: The cloud server sends the updated first model to the first local server. The first local server receives the updated first model sent by the cloud server, and sends the updated first model to the corresponding edge devices, so that these edge devices can use the updated first model for calculation later. The corresponding edge devices may be edge devices that need to use the first model, or edge devices that already include the first model but need to update the first model.
[0090] In summary, the model processing method of the cloud service system provided in this embodiment can update the model through the local server set between the cloud server and the edge device, obtain the data when the edge device uses the model for calculation, and send the gradient value of the model after the update to the cloud server. Finally, the cloud server updates the model according to the gradient value of the local server. In the entire model update process, it does not completely rely on the cloud server for data calculation, nor does it rely on the edge device itself to update the model. Instead, the model is updated through the computing power provided by the local server. Therefore, on the basis of ensuring the update of the model provided by the cloud server, it can also reduce the amount of data interaction between the edge device and the server, and can also reduce the requirements for the computing power of the cloud server and the edge device, thereby improving the operation efficiency of the entire cloud service system.
[0091] Optionally, in a specific implementation of the above embodiment, the FLC may be deployed in the first local server and the FLC may be deployed in the cloud server. In this case, the first local server may replace the edge device to implement the following Figure 2 The update technology of federated learning shown in FIG. 1 is similar to that of FIG. 1 , because the computing power of the first local server provided in this embodiment can be greater than that of the edge device, and the edge device does not need to update the model. Figure 2 Compared with the technology of deploying FLC in edge devices, it can also reduce the requirements on the computing power of edge devices, thereby improving the operating efficiency of the cloud service system.
[0092] Furthermore, the local server provided in this embodiment may also have the function of storing machine learning models, and may send the stored models to corresponding edge devices according to the needs of different edge devices. Figure 7 A flowchart of an embodiment of a cloud service system model processing method provided in this application is shown in FIG. Figure 7 The method shown can be applied to Figure 3 In the cloud service system shown in Figure 4 In the illustrated embodiment, it is performed before S101 .
[0093] S201, the cloud server pre-trains multiple models. The cloud server can obtain multiple machine learning models based on the training data set provided by the supplier. For example, after the supplier collects images of different animals and annotates the images of cats and dogs, the model trained by the cloud server can be used to identify whether the animal in the image is a cat or a dog.
[0094] S202: The cloud server sends the multiple models trained in S201 to the first local server. The first local server receives the multiple models sent by the cloud server.
[0095] S203: After receiving the multiple models, the first local server stores them in the storage space of the first local server.
[0096] S204. The first local server determines at least one model corresponding to the first edge device.
[0097] Specifically, the multiple models pre-trained by the cloud server in this embodiment can be sent to the first local server in full or in part. After receiving the multiple models, the first local server determines at least one model corresponding to each connected edge device. Any edge device connected to the first local server is referred to as a first edge device. The first local server can determine the model corresponding to the first edge device based on the computing power of the first edge device, the requirements for computing, or the supported model types. For example, if there are multiple models for identifying the category of animals in an image as cats or dogs, and the sizes of the models are different, when the computing performance of the first edge device is better, it can be determined that the first edge device corresponds to a larger model, and when the computing performance of the first edge device is poor, it can be determined that the first edge device corresponds to a smaller model.
[0098] S205. The first local server sends at least one model determined in S204 to the first edge device.
[0099] It is understandable that the first local server can determine the model corresponding to each edge device connected to it, and send the corresponding model to each edge device respectively. At the same time, for the first edge device, after receiving the model, the model can be used for calculation. It is understandable that at least one model sent by the first local server to the first edge device includes the first model in the aforementioned embodiment.
[0100] In summary, in the model updating method of the cloud service system provided in this embodiment, the first local server also has the function of storing the model and determining the model corresponding to the edge device, thereby further reducing the calculations required by the cloud server. The cloud server only needs to send the trained model to the local server, and the local server will send the model to the corresponding edge devices in a more targeted manner. It can also make the model used by the first edge device more accurate, thereby improving the accuracy of the first edge device when using the model for calculation, thereby further improving the operating efficiency of the entire cloud service system.
[0101] Optionally, in order to implement the cloud service system provided in the embodiments of the present application, the supplier may also build the entire cloud service system before implementing the aforementioned method. Figure 8 A flowchart of an embodiment of a cloud service system model processing method provided in this application is shown in FIG. Figure 8 The illustrated embodiment shows that Figure 3 The following figure shows the process of building a cloud service system.
[0102] S301. The cloud server first sets up functions on the cloud server side. For example, in a specific implementation, the cloud server can deploy a federated learning server.
[0103] S302: The first local server sends a request message to the cloud server, requesting to set up the first local server.
[0104] S303: The cloud server performs authentication and registration on the first local server according to the request information.
[0105] S304: After successful authentication and registration, the cloud server sends a construction tool and an annotation tool to the first local server, wherein the construction tool is used to build the first local server, and the annotation tool is used to annotate the data in the data set.
[0106] S305. The first local server builds functions on the first local server side according to the received construction tool. For example, the first local server can deploy a federated learning client.
[0107] S306. After receiving the construction tool, the first local server may annotate the data and update the local data set through S307.
[0108] Specifically, the process of S306-S307 can be referred to Fig. 9 The example shown, where Fig. 9A schematic diagram of the data annotation process provided for an embodiment of the present application, wherein, after receiving a data set sent by at least one edge device connected to it, the first local server can start annotating the data in the data set, and the data being annotated by the first local server is recorded as the first data.
[0109] Then the first local server can use the annotation tool to annotate the first data to obtain multiple annotation results. Among them, the annotation tool can be multiple pre-trained models, for example, multiple models for the animal category in the image as cats or dogs obtained by the cloud server training, the first data is an image of a cat or dog, and each pre-trained model can annotate the first data to obtain the result of a cat or dog. Subsequently, the first local server can interpret the results of multiple pre-trained models. When the multiple annotation results of multiple models are the same, the first local server adds the first data to the local data set, and the local data set is used by the first local server when updating the first model; when the multiple annotation results of multiple models are not exactly the same, it is necessary to enter the manual re-inspection step. The first server can send the first data to the first device used by the staff, so that the staff can manually annotate the first data. After the first server receives the confirmation information sent by the staff through the first device, it can add the first data to the local data set. In addition, if the staff believes that the sample is abnormal, the first server can delete the first data without subsequent processing after receiving the abnormal information sent by the staff through the first device.
[0110] Optionally, the local data set is stored in a first local server, which is inaccessible to other local servers, but accessible to at least one edge device connected to the first local server. Therefore, at least one edge device can share data through the first local server, and at the same time, the security of the data uploaded to the local server can be guaranteed. For example, all edge devices of a company can be connected to a local server, then the data processed by all edge devices in the company can be added to the local data set through the above process, and the local server can use the data in the local data set when updating each model, while other companies cannot obtain the data of this company. In addition, after the local server updates the model, it only sends the updated gradient value to the cloud server, and the used data will not be sent to the network, thereby further ensuring the security of the data.
[0111] Furthermore, in the cloud service system provided by the present application, the first local server also has the function of sorting the models. Specifically, Fig.10 The flowchart of the model processing method of the cloud service system provided in this application can be applied to Figure 3 In the cloud service system shown.
[0112] S401: The cloud server sends multiple pre-trained models to the first local server. The cloud server may send all the multiple pre-trained models to the first local server, or the cloud server sends multiple models that the edge device connected to the first local server needs to use to the first local server.
[0113] S402: The first local server determines the performance parameters of at least one connected edge device when using multiple models for calculation. Optionally, the performance parameter may be calculation accuracy or calculation speed. Then in S402, the first local server will count the performance parameters of all edge devices when using different models. For example, the first local server is connected to edge devices 1-5, and the average time for edge devices 1-3 to obtain results using model a is 0.1 seconds, and the average time for edge devices 2-5 to obtain results using model b is 0.2 seconds... and so on.
[0114] S403: The first local server sorts the multiple models according to the performance parameters of the multiple models determined in S401. For example, if the first local server calculates that the edge device connected to it uses model a for a calculation time of 0.1 seconds, uses model b for a calculation time of 0.2 seconds, etc., then the first local server can sort the multiple models in order of calculation speed from fast to slow, for example: a, b, ...
[0115] S404: The first local server sends the sorting information of the multiple models determined in S402 to the cloud server.
[0116] S405: The cloud server sorts the multiple models according to the sorting information. Finally, the cloud server can sort all the models provided by the cloud server according to the sorting information sent by all connected local servers. And after sorting, some models with lower sorting can be deleted and replaced with some other models. After that, the cloud server can repeat the step of S401 to send the updated multiple models to the local server. At this time, since the multiple models are arranged in order, assuming that the edge device needs to identify two models of animal categories in the image, the cloud server can send the two updated top-ranked models for identifying animal categories in the image to the local server, and the local server sends them to the edge device, ensuring that the model used by the edge device is the top-ranked model, that is, the computing performance is better.
[0117] In summary, in the model updating method of the cloud service system provided in this embodiment, the local server can sort the performance parameters of the model used by the connected edge device, and send the sorting information to the cloud server. After the cloud server sorts multiple models, it can continuously optimize the composition of the model provided by the cloud server, realize the "survival of the fittest" of the model, and improve the performance of subsequent edge devices when using the model for calculation, thereby further improving the operating efficiency of the entire cloud service system.
[0118] Alternatively, if Figure 3 The cloud service system shown takes a cloud server connected to multiple local services as an example. In a specific implementation, the cloud server can also be directly connected to the edge device to achieve hybrid deployment. Fig.11 A schematic diagram of another cloud service system provided by the present application, wherein Figure 3 On the basis of the embodiment shown, the cloud server 3 can also be directly connected to the edge device 1. For example, taking the edge device numbered 6 in the figure as an example, the local server 5 can cooperate with the cloud server 3 to perform the processing such as updating the model in the aforementioned embodiment of the present application, while the edge device 6 directly connected to the cloud server 3 may not participate in the update of the model. However, after the cloud server 3 updates the model, in addition to sending the updated model to the local server 5, the local server 5 sends the updated model to the connected edge device 1, and also sends the updated model to the directly connected edge device 6. Therefore, the cloud service system provided by this embodiment has strong deployment flexibility and can reduce the number of local servers in the cloud service system to a certain extent.
[0119] In the above embodiments, the cloud service system provided by the embodiments of the present application and the model processing method of the cloud service system are introduced. In order to realize the functions in the model processing method of the cloud service system provided by the embodiments of the present application, the cloud server and the first local server as the execution subject may include a hardware structure and / or a software module, and realize the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
[0120] For example, Fig.12 A schematic diagram of a structure of an embodiment of a cloud service system model processing device provided by the present application, such as Fig.12 The device shown can be used as the first local server in the above embodiments of the present application, and execute the method executed by the first local server. Fig.12The device 120 shown includes: an acquisition module 1201, a processing module 1202 and a transmission module 1203. The acquisition module 1201 is used to acquire a data set of at least one edge device, and the data set includes data used by at least one edge device when performing calculations using a first model provided by a cloud server; the processing module 1202 is used to determine a first gradient value for updating the first model based on the data set of at least one edge device; and the transmission module 1203 is used to send the first gradient value to the cloud server.
[0121] Optionally, the transmission module 1203 is also used to receive multiple models sent by the cloud server and store the multiple models in the storage module; the processing module 1202 is also used to determine at least one model corresponding to the first edge device in at least one edge device; the transmission module 1203 is also used to send at least one model to the first edge device.
[0122] Optionally, the transmission module 1203 is also used to receive a construction tool and an annotation tool sent by the cloud server; wherein the construction tool is used to build the first local server, and the annotation tool is used to annotate the data in the data set.
[0123] Optionally, the processing module 1202 is also used to, through a labeling tool, label the first data in the data set of at least one edge device to obtain multiple labeling results; and when the multiple labeling results are the same, the first local server adds the first data to the local data set, and the local data set is used to determine a first gradient value for updating the first model; the transmission module 1203 is also used to, when the multiple labeling results are not exactly the same, send the first data to the first device, and after receiving the confirmation information sent by the first device, add the first data to the local data set.
[0124] Optionally, the processing module 1202 is also used to determine the performance parameters of at least one connected edge device when using multiple models stored in the first local server for calculation, and sort the multiple models according to the performance parameters; the transmission module is also used to send sorting information of multiple models to the cloud server.
[0125] like Fig.12 The specific working mode and principle of the cloud service system model processing device shown can be referred to the description of the first local server in the aforementioned method of this application, and will not be repeated here.
[0126] Fig.13 This is a schematic diagram of the structure of an embodiment of a cloud service system model processing device provided by the present application. Fig.13 The device shown can be used as the cloud server in the above embodiments of the present application and execute the method executed by the cloud server. Fig.13The device 130 shown includes: a transmission module 1301 and a processing module 1302. The transmission module 1301 is used to receive a first gradient value sent by a first local server, wherein the first gradient value is used to update a first model provided by a cloud server; the processing module 1302 is used to update the first model according to the first gradient value; and the transmission module is also used to send the updated first model to the first local server.
[0127] Optionally, the processing module 1302 is specifically configured to update the first model according to the first gradient value and a gradient value sent by at least one second local server among the multiple local servers.
[0128] Optionally, the transmission module 1301 is further used to send a construction tool and a labeling tool to the first local server; wherein the construction tool is used to build the first local server, and the labeling tool is used to label the data in the data set.
[0129] Optionally, the transmission module 1301 is further used to receive sorting information of multiple models sent by the first local server; the processing module is further used to sort the multiple models according to the sorting information of the multiple models.
[0130] like Fig.13 The specific working mode and principle of the cloud service system model processing device shown can be referred to the description of the cloud server in the aforementioned method of this application, and will not be repeated here.
[0131] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the processing module can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above-mentioned module is determined. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0132] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0133] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0134] In addition, the embodiment of the present application also provides another computing device structure that can be applied to implement the first local server or cloud server provided by the present application. Fig.14 A schematic diagram of the structure of the computing device provided in this application, such as Fig.14As shown, the computing device 1400 may include a communication interface 1410 and a processor 1420. Optionally, the computing device 1400 may also include a memory 1430. The memory 1430 may be disposed inside the computing device or outside the computing device.
[0135] For example, the above Figure 4-Figure 10 The actions performed by each first local server in the embodiment can be implemented by the processor 1420. The processor 1420 sends data through the communication interface 1410 and is used to implement Figure 4-Figure 10 In the implementation process, each step of the processing flow can be completed by the hardware integrated logic circuit or software instructions in the processor 1420. Figure 4-Figure 10 The method executed by the first local server in the embodiment. For the sake of brevity, it is not described here. The program code executed by the processor 1420 to implement the above method can be stored in the memory 1430. The memory 1430 is connected to the processor 1420, such as a coupling connection.
[0136] As another example, the above Figure 4-Figure 10 The actions performed by each cloud server in the process can be implemented by the processor 1420. The processor 1420 sends control signals and communication data through the communication interface 1410, and is used to implement Figure 4-Figure 10 In the implementation process, each step of the processing flow can be completed by the hardware integrated logic circuit in the processor 1420 or the instructions in the form of software. Figure 4-Figure 10 The method executed by the cloud server described in the foregoing. For the sake of brevity, it is not repeated here. The program code executed by the processor 1420 to implement the above method can be stored in the memory 1430. The memory 1430 is connected to the processor 1420, such as a coupling connection.
[0137] Some features of the embodiments of the present application may be completed / supported by the processor 1420 executing program instructions or software codes in the memory 1430. The software components loaded on the memory 1430 may be summarized in terms of function or logic, for example, Fig.12 The acquisition module 1201, the processing module 1202 and the transmission module 1302 are shown; for example, Fig.13 The transmission module 1301 and the processing module 1302 are shown.
[0138] Any communication interface involved in the embodiments of the present application may be a circuit, a bus, a transceiver, or any other device that can be used for information exchange. For example, the communication interface 1410 in the computing device 1400, illustratively, the other device may be a device connected to the computing device, for example, when the computing device is a first local server, the other device may be a cloud server; when the computing device is a cloud server, the other device may be the first local server.
[0139] The processor involved in the embodiments of the present application may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0140] The coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, modules or modules, which can be electrical, mechanical or other forms, and is used for information exchange between devices, modules or modules.
[0141] The processor may operate in conjunction with a memory. The memory may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), or a volatile memory, such as a random-access memory (RAM). The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0142] In the embodiments of the present application, the specific connection medium between the above-mentioned communication interface, processor and memory is not limited. For example, the memory, processor and communication interface can be connected through a bus. The bus can be divided into an address bus, a data bus, a control bus, etc. Of course, the connection bus between the processor and the memory is not the connection bus between the aforementioned cloud server and the first local server.
[0143] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0144] It is understood that the various numerical numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. It is understood that in the embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A cloud service system, characterized in that: include: A cloud server and multiple local servers, wherein a first local server among the multiple local servers is connected to the cloud server via a network, and the first local server is also connected to at least one edge device; The first local server is used to: obtain a data set of the at least one edge device, the data set including data used by the at least one edge device when performing calculations using the first model provided by the cloud server; determine a first gradient value for updating the first model based on the data set of the at least one edge device; and sending the first gradient value to the cloud server; The cloud server is used to: update the first model according to the first gradient value, and send the updated first model to the first local server.
2. The system according to claim 1, characterized in that The cloud server is further used to send multiple models to the first local server; The first local server is also used to: receive and store multiple models sent by the cloud server; determine at least one model corresponding to the first edge device among the at least one edge device; and send the at least one model to the first edge device.
3. The system according to claim 1 or 2, characterized in that: The cloud server is also used to: send a construction tool and a labeling tool to the first local server; wherein the construction tool is used to build the first local server, and the labeling tool is used to label the data in the data set.
4. The system according to claim 3, characterized in that The first local server is further used to: determine performance parameters of the at least one connected edge device when performing calculations using the multiple models stored in the first local server, and sort the multiple models according to the performance parameters; Sending the sorting information of the multiple models to the cloud server; The cloud server is used to sort the multiple models according to the sorting information of the multiple models.
5. The system according to any one of claims 1 to 2 and 4, characterized in that: The cloud server is specifically used to update the first model according to the first gradient value and the gradient value sent by at least one second local server among the multiple local servers.
6. A model processing method for a cloud service system, characterized in that: The cloud service system includes a cloud server and multiple local servers, a first local server among the multiple local servers is connected to the cloud server via a network, and the first local server is also connected to at least one edge device; The method comprises: The first local server obtains a data set of the at least one edge device, wherein the data set includes data used by the at least one edge device when performing calculations using the first model provided by the cloud server; The first local server determines, based on the data set of the at least one edge device, a first gradient value for updating the first model; The first local server sends the first gradient value to the cloud server.
7. The method according to claim 6, characterized in that Before the first local server obtains the data set of the at least one edge device, the method further includes: The first local server receives and stores the multiple models sent by the cloud server; The first local server determines at least one model corresponding to a first edge device among the at least one edge device; The first local server sends the at least one model to the first edge device.
8. The method according to claim 6 or 7, characterized in that: Before the first local server obtains the data set of the at least one edge device, the method further includes: The first local server receives the construction tool and the annotation tool sent by the cloud server; wherein the construction tool is used to build the first local server, and the annotation tool is used to annotate the data in the data set.
9. The method according to claim 8, characterized in that After the first local server obtains the data set of the at least one edge device, the method further includes: The first local server annotates the first data in the data set of the at least one edge device by using the annotation tool to obtain multiple annotation results; When the multiple annotation results are all the same, the first local server adds the first data to a local data set, where the local data set is used to determine a first gradient value for updating the first model; When the multiple marking results are not completely the same, the first local server sends the first data to the first device, and after receiving confirmation information sent by the first device, adds the first data to the local data set.
10. The method according to claim 9, characterized in that The method further comprises: The first local server determines a performance parameter of the at least one edge device connected thereto when performing calculations using a plurality of models stored in the first local server, and sorts the plurality of models according to the performance parameter; The first local server sends the sorting information of the multiple models to the cloud server.
11. A model processing method for a cloud service system, characterized in that: The cloud service system includes a cloud server and multiple local servers, a first local server among the multiple local servers is connected to the cloud server via a network, and the first local server is also connected to at least one edge device; The method includes: the cloud server receives a first gradient value sent by the first local server, wherein the first gradient value is used to update a first model provided by the cloud server, and the first gradient value is determined by the first local server according to a data set of the at least one edge device, and the data set includes data used by the at least one edge device when calculating using the first model; The cloud server updates the first model according to the first gradient value; The cloud server sends the updated first model to the first local server.
12. The method according to claim 11, characterized in that The cloud server updates the first model according to the first gradient value, including: The cloud server updates the first model according to the first gradient value and the gradient value sent by at least one second local server among the multiple local servers.
13. The method according to claim 11 or 12, characterized in that: Before the cloud server receives the first gradient value sent by the first local server, the method further includes: The cloud server sends a construction tool and an annotation tool to the first local server; wherein the construction tool is used to build the first local server, and the annotation tool is used to annotate the data in the data set.
14. The method according to claim 11 or 12, characterized in that: The method further comprises: The cloud server receives the sorting information of the multiple models sent by the first local server; The cloud server sorts the multiple models according to the sorting information of the multiple models.
15. A model processing device of a cloud service system, applied to a first local server, characterized in that: include: An acquisition module, configured to acquire a data set of at least one edge device, wherein the data set includes data used by the at least one edge device when performing calculations using a first model provided by a cloud server; A processing module, configured to determine a first gradient value for updating the first model according to a data set of the at least one edge device; A transmission module is used to send the first gradient value to the cloud server, so that the cloud server updates the first model according to the first gradient value, and sends the updated first model to the first local server.
16. The device according to claim 15, characterized in that The transmission module is also used to receive the construction tool and the annotation tool sent by the cloud server; wherein the construction tool is used to build the first local server, and the annotation tool is used to annotate the data in the data set.
17. The device according to claim 16, characterized in that The processing module is further used to determine performance parameters of the at least one edge device connected when using the multiple models stored in the first local server for calculation, and sort the multiple models according to the performance parameters; The transmission module is also used to send the sorting information of the multiple models to the cloud server.
18. A model processing device of a cloud service system, applied to a cloud server, characterized in that: include: a transmission module, configured to receive a first gradient value sent by a first local server, wherein the first gradient value is used to update a first model provided by the cloud server, and the first model is used to calculate a data set of at least one edge device connected to the first local server; A processing module, configured to update the first model according to the first gradient value; The transmission module is further used to send the updated first model to the first local server.
19. The device according to claim 18, characterized in that The transmission module is further used to send a construction tool and a labeling tool to the first local server; wherein the construction tool is used to build the first local server, and the labeling tool is used to label the data in the data set.
20. The device according to claim 18 or 19, characterized in that The transmission module is also used to receive sorting information of multiple models sent by the first local server; The processing module is also used to sort the multiple models according to the sorting information of the multiple models.
Citation Information
Patent Citations
Operating system for deep neural network and operating method
CN105005911A
Safety monitoring system based on multiple sensors
CN107707657A
Decision flow component generation method and device, electronic equipment and storage medium
CN110569363A
Distributed machine learning method capable of tolerating untrusted nodes
CN111369009A
Cited By
Model processing method for cloud service system, and cloud service system
WO2022012129A1