Terminal-cloud collaborative model training method, system and device and storage medium

By working together between the cloud platform and the terminal, multiple model training is carried out using simulation strategies and training sample sets, the problem of low model training efficiency in the existing technology is solved, and efficient model training and resource utilization is achieved.

CN119476520APending Publication Date: 2025-02-18SHENZHEN HEYTAP TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311009900.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-10
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, model training is relatively low efficiency and it is difficult to effectively utilize the computing resources of terminal devices.

Method used

By working together between the cloud platform and the target terminal, the cloud platform sends training requests carrying simulation strategies to the terminal. Based on the strategy and training sample set, the terminal trains the global model multiple times, obtains the local model and sends it back to the cloud platform. Cloud platform updates the global model.

Benefits of technology

The model training process of end-cloud collaboration is realized, the efficiency of model training is improved, and the computing resources of terminal devices are fully utilized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476520A_ABST
    Figure CN119476520A_ABST
Patent Text Reader

Abstract

The invention discloses an end-cloud collaborative model training method, system and device and a storage medium, and belongs to the field of cloud computing and edge computing. According to the technical scheme provided by the embodiment of the invention, the cloud platform sends the training request carrying the simulation strategy to the target terminal, and the simulation strategy is used for indicating the switching mode of the plurality of simulation objects. Under the condition that a training request is received, a target terminal obtains a training sample set and a current global model from a cloud platform. And the target terminal carries out multiple times of training on the global model based on a simulation strategy and the training sample set to obtain a local model corresponding to each simulation object. And the target terminal sends the local model corresponding to each simulation object to the cloud platform, and the cloud platform updates the global model based on the local model corresponding to each simulation object, so that an end-cloud collaborative model training process is realized, and the model training efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of cloud computing and edge computing, and in particular to an end-cloud collaborative model training method, system, device, and storage medium. Background Art

[0002] With the development of computer technology, more and more scenarios will use models trained by machine learning technology. For example, in the payment field, a face recognition model will be trained to implement face payment; in the field of network security, a risk identification model will be trained to improve network security.

[0003] In related technologies, when machine learning technology is used to train a model, a computer device is usually used to complete steps such as sample data acquisition, model training, and model verification.

[0004] However, this model training method is less efficient. Summary of the invention

[0005] The embodiments of the present application provide a method, system, device, and storage medium for end-cloud collaborative model training, which can improve the efficiency of model training. The technical solution is as follows:

[0006] On the one hand, a method for end-cloud collaborative model training is provided, the method comprising:

[0007] The cloud platform sends a training request to a target terminal, wherein the training request carries a simulation strategy, and the simulation strategy is used to indicate a switching mode of multiple simulation objects, and the target terminal is a physical terminal or a virtual terminal;

[0008] Upon receiving the training request, the target terminal acquires a training sample set and a current global model from the cloud platform, wherein the training sample set includes training samples of the multiple simulation objects;

[0009] The target terminal trains the global model multiple times based on the simulation strategy and the training sample set to obtain a local model corresponding to each simulation object;

[0010] The target terminal sends the local model corresponding to each of the simulation objects to the cloud platform;

[0011] The cloud platform updates the global model based on the local models corresponding to each of the simulation objects.

[0012] On the one hand, a terminal-cloud collaborative model training system is provided, the system comprising: a cloud platform and a target terminal;

[0013] The cloud platform is used to send a training request to the target terminal, the training request carries a simulation strategy, the simulation strategy is used to indicate a switching mode of multiple simulation objects, and the target terminal is a physical terminal or a virtual terminal;

[0014] The target terminal is used to obtain a training sample set and a current global model from the cloud platform when receiving the training request, wherein the training sample set includes training samples of the multiple simulation objects;

[0015] The target terminal is used to train the global model multiple times based on the simulation strategy and the training sample set to obtain a local model corresponding to each simulation object;

[0016] The target terminal is used to send the local model corresponding to each of the simulation objects to the cloud platform;

[0017] The cloud platform is used to update the global model based on the local models corresponding to each of the simulation objects.

[0018] On the one hand, a computer device is provided, which includes one or more processors and one or more memories, wherein at least one computer program is stored in the one or more memories, and the computer program is loaded and executed by the one or more processors to implement the end-cloud collaborative model training method.

[0019] On the one hand, a computer-readable storage medium is provided, in which at least one computer program is stored, and the computer program is loaded and executed by a processor to implement the end-cloud collaborative model training method.

[0020] On the one hand, a computer program product or computer program is provided, which includes a program code, which is stored in a computer-readable storage medium. A processor of a computer device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the computer device executes the above-mentioned end-cloud collaborative model training method.

[0021] Through the technical solution provided by the embodiment of the present application, the cloud platform sends a training request carrying a simulation strategy to the target terminal, and the simulation strategy is used to indicate the switching method of multiple simulation objects. When receiving the training request, the target terminal obtains the training sample set and the current global model from the cloud platform. Based on the simulation strategy and the training sample set, the target terminal trains the global model multiple times to obtain the local model corresponding to each simulation object. The target terminal sends the local model corresponding to each simulation object to the cloud platform, and the cloud platform updates the global model based on the local model corresponding to each simulation object, thereby realizing the end-cloud collaborative model training process and improving the efficiency of model training. In addition, based on the simulation strategy, different simulation objects are switched on the target terminal to achieve the purpose of simulating multiple users with a single terminal, making full use of the target terminal and further improving the efficiency of model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 It is a schematic diagram of an implementation environment of a terminal-cloud collaborative model training method provided in an embodiment of the present application;

[0024] Figure 2 It is a flow chart of a model training method for end-cloud collaboration provided in an embodiment of the present application;

[0025] Figure 3 It is a flow chart of another end-cloud collaborative model training method provided in an embodiment of the present application;

[0026] Figure 4 It is a schematic diagram of the architecture of a target application provided in an embodiment of the present application;

[0027] Figure 5 It is a structural diagram of a terminal-cloud collaborative model training system provided in an embodiment of the present application;

[0028] Figure 6 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;

[0029] Figure 7 It is a structural diagram of a cloud platform provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0031] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with basically the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity and execution order.

[0032] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge sub-models to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.

[0033] Cloud computing: refers to the delivery and use mode of IT infrastructure, which means obtaining required resources through the network in an on-demand and easily scalable manner; in a broad sense, cloud computing refers to the delivery and use mode of services, which means obtaining required services through the network in an on-demand and easily scalable manner. This service can be related to IT and software, the Internet, or other services. Cloud computing is the product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing. With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the promotion of search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Different from the previous parallel distributed computing, the emergence of cloud computing will promote revolutionary changes in the entire Internet model and enterprise management model in terms of concept.

[0034] Edge computing: refers to an open platform that integrates network, computing, storage, and application core capabilities to provide the nearest service on the side close to the source of objects or data.

[0035] Federated learning: Federated learning is a distributed machine learning framework with privacy protection and secure encryption technology. It aims to enable decentralized participants to collaborate on machine learning model training without disclosing private data to other participants.

[0036] End-cloud collaboration: Local terminals and cloud platforms collaborate with each other to complete designated tasks.

[0037] Simulation technology: Simulation technology is a simulation model technology that uses simulation hardware and simulation software to reflect system behavior or process through simulation experiments with the help of certain numerical calculations and problem solving.

[0038] Learning Rate: It is used to control the learning progress of the model. The learning rate can guide the model in how to use the gradient of the loss function to adjust the network weights in the gradient descent method. If the learning rate is too large, the loss function may directly cross the global optimal point, which is manifested as excessive loss; if the learning rate is too small, the loss function changes very slowly, which will greatly increase the convergence complexity of the network and it is easy to be trapped in the local minimum or saddle point.

[0039] It should be noted that the information (including but not limited to user terminal information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the training samples and object information involved in this application are obtained with full authorization.

[0040] Figure 1 This is a schematic diagram of the implementation environment of a terminal-cloud collaborative model training method provided in an embodiment of the present application, see Figure 1 , the implementation environment may include a terminal 110 and a cloud platform 140.

[0041] The terminal 110 is connected to the cloud platform 140 via a wireless network or a wired network. Optionally, the terminal 110 is a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited thereto. In the embodiment of the present application, due to the concept of a virtual terminal, the terminal 110 mentioned here is a physical terminal, that is, a real terminal.

[0042] The cloud platform 140 is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. Development and testing personnel can control the terminal 110 through the cloud platform 140.

[0043] Those skilled in the art will appreciate that the number of the above terminals may be more or less. For example, there may be only one terminal, or there may be dozens or hundreds of terminals, or a greater number, and the above implementation environment may also include other terminals. The embodiment of the present application does not limit the number and device type of the terminals.

[0044] In some embodiments, the terminal 110 is connected to the device agent 120, and the device agent 120 is used to register the terminal 110 with the cloud platform 140 and maintain the heartbeat between the terminal 110 and the cloud platform 140. In some embodiments, the terminal 110 is connected to the device agent 120 via a USB-HUB.

[0045] In some embodiments, the device agent 120 is connected to the cloud platform 140 via a jump server 130. The jump server 130, also known as a bastion host, is a type of network device that can be used as a jump server to batch operate remote devices. It is one of the operating platforms commonly used by system administrators or operation and maintenance personnel.

[0046] The cloud platform 140 maintains a virtual terminal cluster 160, which includes multiple virtual terminals, and the virtual terminals can realize the same functions as the terminal 110. The cloud platform 140 can adjust the number of virtual terminals in the virtual terminal cluster 160 according to actual conditions.

[0047] In some embodiments, the cloud platform 140 maintains a registration center 170 , and the terminal 110 and the virtual terminals in the virtual terminal cluster 160 can be called by the cloud platform 140 after being registered in the registration center 170 .

[0048] After introducing the implementation environment of the embodiment of the present application, the application scenario of the embodiment of the present application is introduced below. The technical solution provided by the embodiment of the present application can be applied in the scenario of training any type of model, for example, it can be applied in the scenario of training a media recommendation model, or in the scenario of training an image recognition model, or in the scenario of training a security recognition model.

[0049] After adopting the technical solution provided by the embodiment of the present application, the cloud platform and the target terminal can perform model training by means of federated learning. The cloud platform sends a training request to the target terminal, and the training request carries a simulation strategy, which is used to indicate the switching mode of multiple simulation objects. The target terminal is a physical terminal or a virtual terminal, wherein the physical terminal is a real terminal, and the virtual terminal is a non-physical terminal created by virtualization technology. The simulation objects are different users, and switching simulation objects can achieve the purpose of simulating the behavior of multiple users on one terminal. When receiving the training request, the target terminal obtains a training sample set and a current global model from the cloud platform, and the training sample set includes training samples of the multiple simulation objects, that is, training samples of multiple users. Based on the simulation strategy and the training sample set, the target terminal trains the global model multiple times to obtain the local models corresponding to each simulation object, that is, for any simulation object, the target terminal will use the training samples of the simulation object to train the global model. The target terminal sends the local models corresponding to each simulation object to the cloud platform, and the cloud platform updates the global model based on the local models corresponding to each simulation object, thereby realizing the training of the model.

[0050] It should be noted that the above is explained using one round of federated learning as an example. The training of the model requires multiple rounds of federated learning. The process of each round of federated learning belongs to the same inventive concept as described above, and the implementation process will not be repeated here.

[0051] After introducing the implementation environment and application scenarios of the embodiments of the present application, the end-cloud collaborative model training method provided by the embodiments of the present application is described below. Figure 2 , the method comprises the following steps.

[0052] 201. The cloud platform sends a training request to a target terminal. The training request carries a simulation strategy. The simulation strategy is used to indicate a switching method of multiple simulation objects. The target terminal is a physical terminal or a virtual terminal.

[0053] Among them, the cloud platform refers to a collection of hardware and software that provides cloud services. During the model training process, the cloud platform can coordinate different terminals to cooperate. The target terminal is the terminal selected by specific rules, that is, the terminal selected by the cloud platform to collaborate in model training. The training request is used to trigger the model training process, and the simulation strategy is used to indicate the switching method of multiple simulation objects, including the switching order. The simulation object refers to the user, and switching different simulation objects can simulate the behavior of different users. The physical terminal is a real terminal, and the virtual terminal is a terminal created using virtualization technology. The virtual terminal is also called a virtual machine.

[0054] 202. When receiving the training request, the target terminal obtains a training sample set and a current global model from the cloud platform, where the training sample set includes training samples of the multiple simulation objects.

[0055] The training sample set is the sample data provided to the target terminal for this round of model training. The training sample set includes training samples of multiple simulation objects, and the training samples of each simulation object can realize one round of model training. The current global model refers to the global model in the current iteration cycle. The global model is obtained by the cloud platform based on the model trained by multiple terminals.

[0056] 203. The target terminal trains the global model multiple times based on the simulation strategy and the training sample set to obtain a local model corresponding to each simulation object.

[0057] Among them, the global model is the initial model when the target terminal performs model training. Based on the simulation strategy and the training sample set, the target terminal can switch between different simulation objects and use training samples of different simulation objects for training, thereby achieving the purpose of simulating multiple users on a single terminal and improving the efficiency of model training.

[0058] 204. The target terminal sends the local model corresponding to each simulation object to the cloud platform.

[0059] Among them, the local model is the training result of a single round of model training. Sending the local model to the cloud platform for aggregation can achieve the purpose of federated learning and improve the efficiency and effectiveness of model training.

[0060] 205. The cloud platform updates the global model based on the local models corresponding to each simulation object.

[0061] Among them, updating the global model refers to updating the global model of this round of federated learning. In the next round of federated learning, the updated global model will be sent to the target terminal for training.

[0062] Through the technical solution provided by the embodiment of the present application, the cloud platform sends a training request carrying a simulation strategy to the target terminal, and the simulation strategy is used to indicate the switching method of multiple simulation objects. When receiving the training request, the target terminal obtains the training sample set and the current global model from the cloud platform. Based on the simulation strategy and the training sample set, the target terminal trains the global model multiple times to obtain the local model corresponding to each simulation object. The target terminal sends the local model corresponding to each simulation object to the cloud platform, and the cloud platform updates the global model based on the local model corresponding to each simulation object, thereby realizing the end-cloud collaborative model training process and improving the efficiency of model training. In addition, based on the simulation strategy, different simulation objects are switched on the target terminal to achieve the purpose of simulating multiple users with a single terminal, making full use of the target terminal and further improving the efficiency of model training.

[0063] It should be noted that the above steps 201-205 are a simple description of the technical solution provided in the embodiment of the present application. The technical solution provided in the embodiment of the present application will be more clearly described below in conjunction with some specific examples. Figure 3 , the method comprises the following steps.

[0064] 301. The cloud platform screens multiple candidate terminals based on target terminal information to obtain a target terminal set, where the multiple candidate terminals include physical terminals and virtual terminals. The target terminal information is terminal information corresponding to a target training task, and the target training task is a task for training a global model.

[0065] Among them, the cloud platform refers to a collection of hardware and software that provides cloud services. During the model training process, the cloud platform can coordinate different terminals to cooperate. The target terminal set is a terminal selected from multiple candidate terminals based on the target terminal information. The physical terminal is a real terminal, and the virtual terminal is a terminal created using virtualization technology. The virtual terminal is also called a virtual machine. Multiple candidate terminals are terminals that can be called by the cloud platform, and multiple candidate terminals include both physical terminals and virtual terminals. The physical terminals in the multiple candidate terminals are all connected to the device agent, and then connected to the cloud platform through the device agent. The instructions sent by the cloud platform to the physical terminal are distributed by the device agent. The virtual terminals in the multiple candidate terminals are created by the cloud platform, or by a server connected to the cloud platform, and the embodiments of the present application do not limit this. In some embodiments, the virtual terminal is a container virtual machine, and the cloud platform can quickly scale the container virtual machine to meet the needs of virtual terminals of different sizes. The target training task is the task of training the global model, and the global model is also a model that realizes the preset function, for example, the preset function is an image recognition function, a security recognition function, or a media recommendation function, etc., and the embodiments of the present application do not limit this. Terminal information is used to describe the properties of the terminal. For example, terminal information includes terminal type, terminal model, terminal chip type, terminal system type, terminal communication address (such as IP address and port number, etc.) and health status.

[0066] In a possible implementation, the cloud platform determines the target terminal information corresponding to the target training task. The cloud platform obtains the terminal information of multiple candidate terminals. The cloud platform uses the target terminal information to compare with the terminal information of multiple candidate terminals to obtain multiple target terminals, where the target terminal is the candidate terminal whose terminal information matches the target terminal information, and the multiple target terminals constitute the target terminal set.

[0067] In this implementation, the cloud platform can quickly determine multiple target terminals from multiple candidate terminals by comparing the target terminal information with the terminal information of multiple candidate terminals, that is, quickly determine the target terminal set, and the determination efficiency of the target terminal set is high.

[0068] For example, the cloud platform performs a query based on the target training task to obtain the target terminal information corresponding to the target training task. Alternatively, in response to a terminal information configuration operation, the cloud platform determines the target device information corresponding to the terminal information configuration operation, and the terminal information configuration operation is performed by the development and testing personnel. The cloud platform calls the device management service to obtain the terminal information of multiple candidate terminals, and the multiple candidate terminals are terminals that have been registered on the cloud platform. The device management service is used to manage terminals connected to the cloud platform. Through the device management service, the cloud platform compares the target terminal information with the terminal information of the multiple candidate terminals to obtain the target terminal set consisting of the multiple target terminals.

[0069] In order to explain the above implementation more clearly, a registration method of the multiple candidate terminals on the cloud platform is introduced below.

[0070] For a physical terminal among the multiple candidate terminals, the physical terminal sends terminal information to the device agent, which sends the terminal information to the registration center of the cloud platform through the jump server. The registration center obtains the terminal information and completes the registration of the physical terminal on the cloud platform.

[0071] For a virtual terminal among the multiple candidate terminals, the virtual terminal sends terminal information to a registration center of the cloud platform, and the registration center obtains the terminal information to complete the registration of the virtual terminal on the cloud platform.

[0072] In some embodiments, the cloud platform can remotely manage and debug registered devices through device management services.

[0073] Optionally, after step 301, the following steps can also be performed.

[0074] In a possible implementation, the cloud platform controls each terminal in the target terminal set to install a target application and a simulation component, wherein the target application is used to control a model training function, and the simulation component is used to control a simulation function.

[0075] The target application is also called the end-cloud collaborative software, and the target application is the main body for executing the target training task. The simulation component provides simulation data support for the target application, and the simulation data includes the training samples used when training the model.

[0076] In this implementation, after determining the target terminal set, the cloud platform can control each terminal in the target terminal set to install the target application and simulation components, and subsequently can implement model training through the target application and simulation components.

[0077] For example, the cloud platform calls the management service and sends a resource installation request to each terminal in the target terminal set through the cloud platform's gateway. The resource installation request carries the target application and the simulation component. Each terminal in the target terminal set receives the resource installation request, obtains the target application and the simulation component from the resource installation request, and installs the target application and the simulation component.

[0078] For example, for the virtual terminal in the target terminal set, the cloud platform calls the management service and sends the resource installation request to the cloud platform's gateway. The cloud platform's gateway forwards the resource installation request to the virtual terminal in the target terminal set, so that the virtual terminal obtains the target application and the simulation component from the resource installation request, and the virtual terminal installs the target application and the simulation component. The cloud platform's gateway also forwards the resource installation request to the jump server, which forwards the resource installation request to the device agent, which forwards the resource installation request to the physical terminal in the target terminal set, so that the physical terminal obtains the target application and the simulation component from the resource installation request, and the physical terminal installs the target application and the simulation component.

[0079] In some embodiments, in addition to carrying the target application and the simulation component, the resource installation request may also carry other resources required for the model training process. For example, other resources include supporting resources required to run the target application and the simulation component.

[0080] In addition to the above implementation, the following steps can also be performed to adjust the target terminal set.

[0081] In a possible implementation, in response to a terminal deletion instruction for any terminal in the target terminal set, the cloud platform deletes the terminal from the target terminal set to update the target terminal set.

[0082] The deleted terminal may be a virtual terminal or a physical terminal, which is not limited in the present embodiment. The terminal deletion instruction is triggered by an operation performed by a development and tester.

[0083] In this implementation manner, terminals in the target terminal set can be deleted according to demand, thereby improving the flexibility of configuring the target terminal set.

[0084] For example, a development and tester uses a development and test terminal to connect to the cloud platform. Multiple terminals in the target terminal set are displayed on the development and test terminal. In response to a deletion operation on any of the multiple terminals, the development and test terminal sends a terminal deletion instruction to the cloud platform. The terminal deletion instruction carries the identifier of the terminal. The cloud platform receives the terminal deletion instruction. In response to the terminal deletion instruction, the cloud platform obtains the identifier of the terminal from the terminal deletion instruction. Based on the identifier of the terminal, the cloud platform deletes the terminal from the target terminal set.

[0085] In a possible implementation, in response to a terminal addition instruction for a target terminal set, the cloud platform adds a terminal indicated by the terminal addition instruction to the target terminal set to update the target terminal set.

[0086] The newly added terminal can be either a virtual terminal or a physical terminal, which is not limited in the present embodiment. When the newly added terminal is a virtual terminal, the cloud platform creates a new virtual terminal. When the newly added terminal is a physical terminal, the cloud platform directly adds the physical terminal to the target terminal set.

[0087] Under this implementation, new terminals can be added to the target terminal set as needed, thereby expanding the scope of model training / model testing and improving the efficiency and effectiveness of model training / model testing.

[0088] For example, a development and tester uses a development and test terminal to connect to a cloud platform. A plurality of terminals in the target terminal set are displayed on the development and test terminal. In response to a terminal addition operation on the target terminal set, the terminal type corresponding to the terminal addition operation is determined. In the case where the terminal type is a virtual terminal, the development and test terminal sends a terminal addition instruction to the cloud platform, and the terminal addition instruction carries the type and specification of the virtual terminal. The cloud platform receives the terminal addition instruction and obtains the type and specification of the virtual terminal from the terminal addition instruction. The cloud platform creates a virtual terminal based on the type and specification of the virtual terminal. In the case where the virtual terminal is successfully created, the cloud platform registers the virtual terminal in the registration center. In the case where the virtual terminal is successfully registered in the registration center, the cloud platform adds the virtual terminal to the target terminal set. In the case where the virtual terminal is added to the terminal set, the cloud platform updates the plurality of terminals in the target terminal set displayed on the development and test terminal, and the updated target terminal set includes the virtual terminal. In the case where the terminal type is a physical terminal, the development and test terminal sends a terminal addition instruction to the cloud platform, and the terminal addition instruction carries the identifier of the physical terminal. The cloud platform receives the terminal addition instruction and obtains the identification of the physical terminal from the terminal addition instruction. The cloud platform queries the registration center based on the identification of the physical terminal to determine whether the physical terminal is successfully registered in the registration center. If the physical terminal is successfully registered in the registration center, the cloud platform adds the physical terminal to the target terminal set. If the physical terminal is added to the terminal set, the cloud platform updates multiple terminals in the target terminal set displayed on the development and test terminal, and the updated target terminal set includes the physical terminal.

[0089] It should be noted that after step 301, the cloud platform will send a training request to each terminal in the target terminal set, so that each terminal in the target terminal set can perform the following steps 302-305. For ease of understanding, in the following description, the cloud platform sends a training request to a target terminal in the target terminal set, and the processing process of the target terminal after receiving the training request is taken as an example.

[0090] 302. The cloud platform sends a training request to a target terminal in the target terminal set. The training request carries a simulation strategy, which is used to indicate a switching method of multiple simulation objects. The target terminal is a physical terminal or a virtual terminal.

[0091] Among them, the target terminal is any terminal in the target terminal set. The training request is used to trigger the model training process, and the simulation strategy is used to indicate the switching mode of multiple simulation objects, and the switching mode includes the switching order. The simulation object refers to the user. Switching different simulation objects can simulate the behavior of different users, achieve the purpose of simulating the behavior of multiple users on one terminal, and make full use of the terminal. For example, the simulation strategy is used to indicate the switching order and switching timing of simulation objects A, simulation object B, and simulation object C. In some embodiments, the simulation strategy includes object information of each simulation object, and the switching of different simulation objects can be achieved based on the object information. In some embodiments, in addition to including the object information of each simulation object, the simulation strategy also includes system information corresponding to each simulation object. The system information is used to indicate the type of operating system and the version of the operating system. In this case, in addition to being able to indicate the switching mode of multiple simulation objects, the simulation strategy can also indicate the switching mode of different operating systems / operating system versions, so as to achieve the simulation of multiple objects and multiple scenes (operating systems) of a single device, thereby improving the simulation effect.

[0092] 303. When receiving the training request, the target terminal obtains a training sample set and a current global model from the cloud platform, where the training sample set includes training samples of the multiple simulation objects.

[0093] Among them, the training sample set is the sample data provided to the target terminal for this round of model training. The training sample set includes training samples of multiple simulation objects, and the training samples of each simulation object can realize one round of model training. For example, the training samples of a simulation object include multiple operations of the simulation object and the annotation results corresponding to each operation. The current global model refers to the global model in the current iteration cycle. The global model is obtained by the cloud platform based on the model trained by multiple terminals. Obtaining the training sample set from the cloud platform can make full use of the existing data on the cloud platform, solve the problem of terminal cold start, and thus improve the training efficiency of the model.

[0094] In a possible implementation, upon receiving the training request, the target terminal determines whether a state condition corresponding to the training request is met, the state condition including a hardware environment state condition and a hardware simulation state condition. If the state condition is met, the target terminal obtains the training sample set and the current global model from the cloud platform through the end-to-cloud link.

[0095] Among them, the hardware environment status condition is used to determine whether the hardware environment of the target terminal can cooperate with the steps of executing model training, and the hardware simulation status condition is used to determine whether the target terminal enters the simulation state. In the simulation state, the target terminal can switch the simulation object based on the simulation strategy.

[0096] In this implementation, when a training request is received, the target terminal first determines whether the state condition corresponding to the training request is met. If the state condition is met, the target terminal then obtains the training sample set and the current global model from the cloud platform to avoid wasting computing resources.

[0097] For example, when receiving the training request, the target terminal obtains the hardware environment state condition and the hardware simulation state condition from the training request. The target terminal obtains the hardware parameters and the simulation state identifier, and the simulation state identifier is used to indicate the simulation state. The target terminal compares the hardware parameters with the hardware environment state condition to determine whether the target terminal meets the hardware environment state condition. The target terminal compares the simulation state identifier with the hardware simulation state condition to determine whether the target terminal meets the hardware simulation state condition. When the target terminal meets the hardware environment state condition and the hardware simulation state condition, the target terminal obtains the training sample set and the model parameters of the current global model from the cloud platform through the end-cloud link, and the global model can be reproduced through the model parameters of the global model.

[0098] For example, when a target application and a simulation component are installed on the target terminal and the training request is received, the target terminal obtains the hardware environment status condition and the hardware simulation status condition from the training request through the target application. The target terminal obtains the hardware parameters through the target application and obtains the simulation state identifier through the simulation component. The target terminal compares the hardware parameters with the hardware environment status condition through the target application to determine whether the target terminal meets the hardware environment status condition. The target terminal compares the simulation state identifier with the hardware simulation status condition through the target application to determine whether the target terminal meets the hardware simulation status condition. When the target terminal meets the hardware environment status condition and the hardware simulation status condition, the target terminal obtains the training sample set and the model parameters of the current global model from the cloud platform through the target application via the end-cloud link.

[0099] In some embodiments, see Figure 4, the target application 400 includes a basic module 401, a data module 402 and a training module 403, wherein the basic module 401 is responsible for the basic framework and functions, such as end-cloud link, configuration management, policy management and policy services, etc.; the data module 402 is responsible for managing the end-side data center, including functions such as data management and material synchronization, and the data center is used to store end-side related data, such as behavior data, portrait labels, global models, etc.; the training module 403 is used to manage the sample center and execute training steps, and the sample center is used to store training samples. As a part of the target application 400, the simulation component 404 includes a simulation state management module, a simulation management module and a simulation data management module. In addition, it also includes a simulation indicator for determining the simulation state of the target terminal; the simulation management module is responsible for the management of the end-side simulation function, including simulation-related configuration management, simulation object switching, data screening, state management, simulation monitoring, service interface, etc.; the simulation data management module is responsible for the access of simulation data. The simulation data includes system information, object information, object behavior, etc.; the simulation data source can be built into the target terminal, or it can be pulled in real time through the cloud interface. It should be noted that in the simulation state, the target terminal enters the global simulation mode. In the global simulation mode, not only the users and samples of the training module support simulation, but also the data in the data module and the information obtained by the system interface (such as system version, IMEI / DUID, etc.) support simulation.

[0100] The following is an explanation of the method for the server to generate a training sample set. Optionally, before step 301, the cloud platform can also perform the following steps.

[0101] In a possible implementation, the cloud platform obtains the initial training data of the multiple simulation objects, and performs data cleaning, data desensitization, and feature extraction on the initial training data of the multiple simulation objects to obtain the training sample set.

[0102] The initial training data is also called raw data, which is the training data corresponding to the target training task, that is, the training data related to the function of the training model. Data cleaning is used to review and verify the data, delete duplicate data, delete invalid data, and correct erroneous data. Feature extraction is used to abstractly express the data, which helps with subsequent data processing. Data desensitization refers to the elimination of identity information of the data. This process is also called data anonymization. Data desensitization can protect user privacy.

[0103] In the embodiment of the present application, any data cleaning, data desensitization and feature extraction method can be used to process the initial training data to obtain the training sample set, and the embodiment of the present application is not limited to this.

[0104] Under this implementation, by performing data cleaning, data desensitization and feature extraction on the initial training data of multiple simulation objects, errors and identity information in the initial training data can be eliminated, the accuracy of the data in the training sample set can be improved, and the effect of model training can be improved.

[0105] For example, the cloud platform obtains the initial training data of the multiple simulation objects. The cloud platform performs data cleaning, data desensitization and feature extraction on the initial training data of the multiple simulation objects to obtain multiple reference training data. The cloud platform performs format conversion on the multiple reference training data to obtain the training sample set. Among them, the format conversion is to convert the multiple reference training data into a data format that can be processed by the terminal so that the terminal can use the training sample set in the subsequent model training process. For example, the cloud platform performs format conversion on the multiple reference training data based on a preset data specification to obtain the training sample set. The preset data specification is used to describe the data format supported by the terminal and the cloud platform.

[0106] In some embodiments, after obtaining the training sample set, the cloud platform can store the training sample set in a sample database so that it can be quickly called in subsequent model training processes. The sample database is also called a simulation data space.

[0107] 304. The target terminal trains the global model multiple times based on the simulation strategy and the training sample set to obtain a local model corresponding to each simulation object.

[0108] The global model is the initial model when the target terminal performs model training. Based on the simulation strategy and the training sample set, the target terminal can switch different simulation objects and use the training samples of different simulation objects for training, so as to achieve the purpose of simulating multiple users on a single terminal and improve the efficiency of model training. In some embodiments, the simulation strategy includes random switching, sequential switching, preset step switching, and preset rule switching.

[0109] In a possible implementation, the multiple simulation objects include a first simulation object and a second simulation object, and the target terminal executes the simulation strategy to switch the current simulation object to the first simulation object. The target terminal obtains the training sample corresponding to the first simulation object from the training sample set. The target terminal uses the training sample corresponding to the first simulation object to train the global model to obtain the local model corresponding to the first simulation object. The target terminal switches the current simulation object to the second simulation object indicated by the simulation strategy, and trains the global model based on the training sample corresponding to the second simulation object in the training sample set to obtain the local model corresponding to the second simulation object.

[0110] Wherein, the training using the training samples corresponding to the first simulation object and the training using the training samples corresponding to the second simulation object are both aimed at the current global model obtained from the cloud platform.

[0111] In this implementation mode, by executing the simulation strategy, the target terminal can be controlled to switch to different simulation objects for model training, thereby improving the efficiency of model training.

[0112] For example, the multiple simulation objects include a first simulation object and a second simulation object, and the target terminal executes the simulation strategy to determine the first simulation object currently switched. The target terminal initializes the first simulation object through a simulation component to switch the current simulation object to the first simulation object. The target terminal obtains the training samples corresponding to the first simulation object from the training sample set through a target application. The target terminal uses the training samples corresponding to the first simulation object to train the global model through the target application to obtain a local model corresponding to the first simulation object. The target terminal initializes the second simulation object through a simulation component to switch the current simulation object to the second simulation object. The target terminal obtains the training samples corresponding to the second simulation object from the training sample set through a target application. The target terminal uses the training samples corresponding to the second simulation object to train the global model through the target application to obtain a local model corresponding to the second simulation object.

[0113] It should be noted that the above implementation is described by taking the multiple simulation objects including the first simulation object and the second simulation object as an example. When the multiple simulation objects also include other simulation objects, the target terminal can switch to other simulation objects according to the simulation strategy, which will not be repeated here.

[0114] In a possible implementation, the training request also carries a training strategy, which is used to indicate the model training method. The target terminal trains the global model multiple times based on the simulation strategy, the training strategy and the training sample set to obtain local models corresponding to each simulation object.

[0115] Among them, the training strategy includes training rounds and training parameters such as learning rate.

[0116] In this implementation mode, combining training strategies with model training can improve the efficiency and effectiveness of model training.

[0117] For example, the multiple simulation objects include a first simulation object and a second simulation object, and the target terminal executes the simulation strategy to switch the current simulation object to the first simulation object. The target terminal obtains the training sample corresponding to the first simulation object from the training sample set. The target terminal obtains the training strategy from the training request, and executes the training strategy to configure the training parameters when training the global model. Based on the training parameters, the target terminal uses the training sample corresponding to the first simulation object to train the global model, and obtains the local model corresponding to the first simulation object. The target terminal switches the current simulation object to the second simulation object indicated by the simulation strategy, and trains the global model based on the training parameters and the training sample corresponding to the second simulation object in the training sample set, and obtains the local model corresponding to the second simulation object.

[0118] For example, the multiple simulation objects include a first simulation object and a second simulation object, and the target terminal executes the simulation strategy to determine the first simulation object currently switched. The target terminal initializes the first simulation object through the simulation component to switch the current simulation object to the first simulation object. The target terminal obtains the training sample corresponding to the first simulation object from the training sample set through the target application. The target terminal obtains the training strategy from the training request through the basic module of the target application, and executes the training strategy to configure the training parameters when training the global model. The target terminal uses the training sample corresponding to the first simulation object to train the global model based on the training parameters through the training module of the target application, and obtains the local model corresponding to the first simulation object. The target terminal initializes the second simulation object through the simulation component to switch the current simulation object to the second simulation object. The target terminal obtains the training sample corresponding to the second simulation object from the training sample set through the target application. The target terminal uses the training sample corresponding to the second simulation object to train the global model based on the training parameters through the training module of the target application, and obtains the local model corresponding to the second simulation object.

[0119] It should be noted that the above implementation is described by taking the multiple simulation objects including the first simulation object and the second simulation object as an example. When the multiple simulation objects also include other simulation objects, the target terminal can switch to other simulation objects according to the simulation strategy, which will not be repeated here.

[0120] 305. The target terminal sends the local model corresponding to each simulation object to the cloud platform.

[0121] Among them, the local model is the training result of a single round of model training. Sending the local model to the cloud platform for aggregation can achieve the purpose of federated learning and improve the efficiency and effectiveness of model training.

[0122] In a possible implementation, the target terminal sends the model parameters of the local model corresponding to each simulation object to the cloud platform.

[0123] 306. The cloud platform updates the global model based on the local models corresponding to each simulation object.

[0124] Among them, updating the global model refers to updating the global model of this round of federated learning. In the next round of federated learning, the updated global model will be sent to the target terminal for training.

[0125] In a possible implementation, the cloud platform aggregates the local models corresponding to the simulation objects to obtain an aggregate model corresponding to the target terminal. The cloud platform performs weighted aggregation on the aggregate models corresponding to the terminals in the target terminal set to obtain an updated global model.

[0126] Among them, the weight corresponding to each terminal in the target terminal set is configured by the development and testing personnel according to the actual situation or determined based on at least one of the terminal type and operating system type of each terminal. The embodiment of the present application does not limit this. The terminal type includes physical terminals and virtual terminals.

[0127] Under this implementation, the training results of multiple simulation objects and multiple terminals can be aggregated to achieve a round of federated learning process and improve the training effect of the model.

[0128] In a possible implementation, when the number of local models received by the cloud platform is greater than or equal to a preset number, the cloud platform updates the global model based on the received local models.

[0129] The number of local models is the number of simulation objects that complete the local training task.

[0130] In this implementation, as long as a certain number of local models are obtained, the cloud platform can update the global model based on the obtained local models, and the efficiency of model updating is relatively high.

[0131] After step 306, the cloud platform sends the updated global model to the target terminal set, so that the terminals in the target terminal set perform the next round of model training based on the updated global model.

[0132] It should be noted that the above steps 302-306 are described using one round of federated learning as an example. The training of the model requires multiple rounds of federated learning. The process of each round of federated learning belongs to the same inventive concept as described above, and the implementation process will not be repeated here.

[0133] Optionally, after step 306, the cloud platform can also perform the following steps.

[0134] In a possible implementation, the cloud platform performs a performance test on the updated global model to obtain a plurality of performance indicators, which are used to evaluate the training strategy. The cloud platform updates the training strategy based on the plurality of performance indicators.

[0135] Among them, multiple performance indicators include training time, convergence speed, and accuracy, etc., which can reflect the efficiency and effect of the end-cloud collaborative model training process. In addition to adjusting the training strategy, multiple performance indicators can also be used to adjust the terminals in the target terminal set and adjust the simulation objects.

[0136] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0137] Through the technical solution provided by the embodiment of the present application, the cloud platform sends a training request carrying a simulation strategy to the target terminal, and the simulation strategy is used to indicate the switching method of multiple simulation objects. When receiving the training request, the target terminal obtains the training sample set and the current global model from the cloud platform. Based on the simulation strategy and the training sample set, the target terminal trains the global model multiple times to obtain the local model corresponding to each simulation object. The target terminal sends the local model corresponding to each simulation object to the cloud platform, and the cloud platform updates the global model based on the local model corresponding to each simulation object, thereby realizing the end-cloud collaborative model training process and improving the efficiency of model training. In addition, based on the simulation strategy, different simulation objects are switched on the target terminal to achieve the purpose of simulating multiple users with a single terminal, making full use of the target terminal and further improving the efficiency of model training.

[0138] Figure 5 This is a schematic diagram of the structure of a model training system for end-cloud collaboration provided in an embodiment of the present application, see Figure 5 , the system includes: a cloud platform 501 and a target terminal 502;

[0139] The cloud platform 501 is used to send a training request to the target terminal 502, where the training request carries a simulation strategy, where the simulation strategy is used to indicate a switching method for multiple simulation objects, and the target terminal 502 is a physical terminal or a virtual terminal.

[0140] The target terminal 502 is used to obtain a training sample set and a current global model from the cloud platform 501 when receiving the training request, where the training sample set includes training samples of the multiple simulation objects.

[0141] The target terminal 502 is used to train the global model multiple times based on the simulation strategy and the training sample set to obtain local models corresponding to each simulation object.

[0142] The target terminal 502 is used to send the local models corresponding to each of the simulation objects to the cloud platform 501 .

[0143] The cloud platform 501 is used to update the global model based on the local models corresponding to each of the simulation objects.

[0144] In a possible implementation, the multiple simulation objects include a first simulation object and a second simulation object, and the target terminal 502 is used to execute the simulation strategy and switch the current simulation object to the first simulation object.

[0145] The target terminal 502 is used to obtain the training sample corresponding to the first simulation object from the training sample set.

[0146] The target terminal 502 is used to train the global model using the training samples corresponding to the first simulation object to obtain the local model corresponding to the first simulation object.

[0147] The target terminal 502 is used to switch the current simulation object to the second simulation object indicated by the simulation strategy, and train the global model based on the training samples corresponding to the second simulation object in the training sample set to obtain the local model corresponding to the second simulation object.

[0148] In a possible implementation, the training request also carries a training strategy, and the target terminal 502 is used to train the global model multiple times based on the simulation strategy, the training strategy and the training sample set to obtain local models corresponding to each simulation object.

[0149] In a possible implementation, the cloud platform 501 is also used to perform performance testing on the updated global model to obtain multiple performance indicators, and the multiple performance indicators are used to evaluate the training strategy.

[0150] The cloud platform 501 is also used to update the training strategy based on the multiple performance indicators.

[0151] In a possible implementation, the target terminal 502 is used to determine whether the state condition corresponding to the training request is met when receiving the training request, and the state condition includes a hardware environment state condition and a hardware simulation state condition. When the state condition is met, the training sample set and the current global model are obtained from the cloud platform 501 through the end-cloud link.

[0152] In one possible implementation, the cloud platform 501 is also used to screen multiple candidate terminals based on the target terminal 502 information to obtain a target terminal 502 set, where the target terminal 502 is any terminal in the target terminal 502 set, and the multiple candidate terminals include physical terminals and virtual terminals. The target terminal 502 information is the terminal information corresponding to the target training task, and the target training task is the task of training the global model.

[0153] The cloud platform 501 is used to send the training request to each terminal in the target terminal 502 set.

[0154] In a possible implementation, the cloud platform 501 is also used to control each terminal in the target terminal 502 set to install a target application and a simulation component, wherein the target application is used to control a model training function, and the simulation component is used to control a simulation function.

[0155] In a possible implementation, the cloud platform 501 is used to aggregate the local models corresponding to the simulation objects to obtain an aggregate model corresponding to the target terminal 502. The aggregate models corresponding to the terminals in the target terminal 502 set are weighted aggregated to obtain an updated global model.

[0156] In a possible implementation, the cloud platform 501 is further configured to, in response to a terminal deletion instruction for any terminal in the target terminal 502 set, delete the terminal from the target terminal 502 set to update the target terminal 502 set. In response to a terminal addition instruction for the target terminal 502 set, add a terminal indicated by the terminal addition instruction to the target terminal 502 set to update the target terminal 502 set.

[0157] In a possible implementation, the cloud platform 501 is further used to obtain initial training data of the multiple simulation objects, perform data cleaning, data desensitization and feature extraction on the initial training data of the multiple simulation objects, and obtain the training sample set.

[0158] It should be noted that: the end-cloud collaborative model training system provided in the above embodiment only uses the division of the above functional units as an example when training the model. In actual applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the computer device is divided into different functional units to complete all or part of the functions described above. In addition, the end-cloud collaborative model training system and the end-cloud collaborative model training method embodiment provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0159] Through the technical solution provided by the embodiment of the present application, the cloud platform sends a training request carrying a simulation strategy to the target terminal, and the simulation strategy is used to indicate the switching method of multiple simulation objects. When receiving the training request, the target terminal obtains the training sample set and the current global model from the cloud platform. Based on the simulation strategy and the training sample set, the target terminal trains the global model multiple times to obtain the local model corresponding to each simulation object. The target terminal sends the local model corresponding to each simulation object to the cloud platform, and the cloud platform updates the global model based on the local model corresponding to each simulation object, thereby realizing the end-cloud collaborative model training process and improving the efficiency of model training. In addition, based on the simulation strategy, different simulation objects are switched on the target terminal to achieve the purpose of simulating multiple users with a single terminal, making full use of the target terminal and further improving the efficiency of model training.

[0160] The embodiment of the present application provides a computer device for executing the above method. The computer device can be implemented as a terminal or a cloud platform. The structure of the terminal is first introduced below:

[0161] Figure 6 600 is a schematic diagram of a terminal provided in an embodiment of the present application. The terminal 600 may be a smart phone, a tablet computer, a laptop computer or a desktop computer. The terminal 600 may also be called a user equipment, a portable terminal, a laptop terminal, a desktop terminal or other names.

[0162] Typically, the terminal 600 includes: one or more processors 601 and one or more memories 602 .

[0163] The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 601 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 601 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0164] The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 602 is used to store at least one computer program, which is used to be executed by the processor 601 to implement the end-cloud collaborative model training method provided in the method embodiment of the present application.

[0165] In some embodiments, the terminal 600 may further optionally include: a peripheral device interface 603 and at least one peripheral device. The processor 601, the memory 602 and the peripheral device interface 603 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 603 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 604, a display screen 605, a camera assembly 606, an audio circuit 607 and a power supply 608.

[0166] The peripheral device interface 603 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 601 and the memory 602. In some embodiments, the processor 601, the memory 602, and the peripheral device interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 601, the memory 602, and the peripheral device interface 603 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0167] The radio frequency circuit 604 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 604 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 604 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 604 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like.

[0168] The display screen 605 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 605 is a touch display screen, the display screen 605 also has the ability to collect touch signals on the surface or above the surface of the display screen 605. The touch signal may be input as a control signal to the processor 601 for processing. At this time, the display screen 605 may also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards.

[0169] The camera assembly 606 is used to collect images or videos. Optionally, the camera assembly 606 includes a front camera and a rear camera. Usually, the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal.

[0170] The audio circuit 607 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them to the processor 601 for processing, or input them to the radio frequency circuit 604 to achieve voice communication.

[0171] The power supply 608 is used to supply power to various components in the terminal 600. The power supply 608 may be alternating current, direct current, a disposable battery, or a rechargeable battery.

[0172] In some embodiments, the terminal 600 further includes one or more sensors 609 , including but not limited to: an acceleration sensor 610 , a gyroscope sensor 611 , a pressure sensor 612 , an optical sensor 613 , and a proximity sensor 614 .

[0173] The acceleration sensor 610 can detect the magnitude of acceleration on three coordinate axes of the coordinate system established by the terminal 600 .

[0174] The gyro sensor 611 can detect the body direction and rotation angle of the terminal 600 . The gyro sensor 611 can cooperate with the acceleration sensor 610 to collect the user's 3D actions on the terminal 600 .

[0175] The pressure sensor 612 can be set on the side frame of the terminal 600 and / or the lower layer of the display screen 605. When the pressure sensor 612 is set on the side frame of the terminal 600, it can detect the user's holding signal of the terminal 600, and the processor 601 performs left and right hand recognition or shortcut operations according to the holding signal collected by the pressure sensor 612. When the pressure sensor 612 is set on the lower layer of the display screen 605, the processor 601 controls the operable controls on the UI interface according to the user's pressure operation on the display screen 605.

[0176] The optical sensor 613 is used to collect the ambient light intensity. In one embodiment, the processor 601 can control the display brightness of the display screen 605 according to the ambient light intensity collected by the optical sensor 613.

[0177] The proximity sensor 614 is used to collect the distance between the user and the front of the terminal 600 .

[0178] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the terminal 600, and the terminal 600 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0179] The above-mentioned computer device can also be implemented as a cloud platform. The structure of the cloud platform is introduced below:

[0180] Figure 7It is a structural diagram of a cloud platform provided in an embodiment of the present application. The cloud platform 700 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 701 and one or more memories 702, wherein at least one computer program is stored in the one or more memories 702, and the at least one computer program is loaded and executed by the one or more processors 701 to implement the methods provided in the above-mentioned various method embodiments. Of course, the cloud platform 700 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The cloud platform 700 may also include other components for implementing device functions, which will not be described in detail here.

[0181] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including a computer program, and the computer program can be executed by a processor to complete the end-cloud collaborative model training method in the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device.

[0182] In an exemplary embodiment, a computer program product or a computer program is also provided, which includes a program code, and the program code is stored in a computer-readable storage medium. A processor of a computer device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the computer device executes the above-mentioned end-cloud collaborative model training method.

[0183] In some embodiments, the computer program involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain system.

[0184] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0185] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A model training method for end-cloud collaboration, characterized in that: The method comprises: The cloud platform sends a training request to a target terminal, wherein the training request carries a simulation strategy, and the simulation strategy is used to indicate a switching mode of multiple simulation objects, and the target terminal is a physical terminal or a virtual terminal; Upon receiving the training request, the target terminal acquires a training sample set and a current global model from the cloud platform, wherein the training sample set includes training samples of the multiple simulation objects; The target terminal trains the global model multiple times based on the simulation strategy and the training sample set to obtain a local model corresponding to each simulation object; The target terminal sends the local model corresponding to each of the simulation objects to the cloud platform; The cloud platform updates the global model based on the local models corresponding to each of the simulation objects.

2. The method according to claim 1, characterized in that The multiple simulation objects include a first simulation object and a second simulation object. The target terminal performs multiple training on the global model based on the simulation strategy and the training sample set, and obtains local models corresponding to each of the simulation objects, including: The target terminal executes the simulation strategy to switch the current simulation object to the first simulation object; The target terminal obtains the training sample corresponding to the first simulation object from the training sample set; The target terminal trains the global model using the training sample corresponding to the first simulation object to obtain a local model corresponding to the first simulation object; The target terminal switches the current simulation object to the second simulation object indicated by the simulation strategy, and trains the global model based on the training samples corresponding to the second simulation object in the training sample set to obtain a local model corresponding to the second simulation object.

3. The method according to claim 1, characterized in that The training request also carries a training strategy, which is used to indicate a model training method. The target terminal trains the global model multiple times based on the simulation strategy and the training sample set, and obtains a local model corresponding to each simulation object, including: The target terminal trains the global model multiple times based on the simulation strategy, the training strategy and the training sample set to obtain a local model corresponding to each of the simulation objects.

4. The method according to claim 3, characterized in that After the cloud platform updates the global model based on the local models corresponding to the simulation objects, the method further includes: The cloud platform performs a performance test on the updated global model to obtain a plurality of performance indicators, and the plurality of performance indicators are used to evaluate the training strategy; The cloud platform updates the training strategy based on the multiple performance indicators.

5. The method according to claim 1, characterized in that When receiving the training request, the target terminal obtains the training sample set and the current global model from the cloud platform, including: Upon receiving the training request, the target terminal determines whether a state condition corresponding to the training request is satisfied, the state condition including a hardware environment state condition and a hardware simulation state condition; When the state condition is met, the target terminal obtains the training sample set and the current global model from the cloud platform through the end-cloud link.

6. The method according to claim 1, characterized in that Before the cloud platform sends a training request to the target terminal, the method further includes: The cloud platform screens multiple candidate terminals based on the target terminal information to obtain a target terminal set, where the target terminal is any terminal in the target terminal set, the multiple candidate terminals include physical terminals and virtual terminals, the target terminal information is terminal information corresponding to a target training task, and the target training task is a task for training the global model; The cloud platform sending a training request to the target terminal includes: The cloud platform sends the training request to each terminal in the target terminal set.

7. The method according to claim 6, characterized in that Before the cloud platform sends the training request to each terminal in the target terminal set, the method further includes: The cloud platform controls each terminal in the target terminal set to install a target application and a simulation component, wherein the target application is used to control a model training function, and the simulation component is used to control a simulation function.

8. The method according to claim 6, characterized in that The cloud platform updates the global model based on the local models corresponding to the simulation objects, including: The cloud platform aggregates the local models corresponding to the various simulation objects to obtain an aggregated model corresponding to the target terminal; The cloud platform performs weighted aggregation on the aggregation models corresponding to the respective terminals in the target terminal set to obtain an updated global model.

9. The method according to claim 6, characterized in that After the cloud platform screens multiple candidate terminals based on the target terminal information to obtain a target terminal set, the method further includes: In response to a terminal deletion instruction for any terminal in the target terminal set, the cloud platform deletes the terminal from the target terminal set to update the target terminal set; In response to a terminal adding instruction for the target terminal set, the cloud platform adds a terminal indicated by the terminal adding instruction to the target terminal set to update the target terminal set.

10. The method according to claim 1, characterized in that Before the cloud platform sends a training request to the target terminal, the method further includes: The cloud platform obtains initial training data of the multiple simulation objects; The cloud platform performs data cleaning, data desensitization and feature extraction on the initial training data of the multiple simulation objects to obtain the training sample set.

11. A model training system with end-cloud collaboration, characterized in that: The system comprises: a cloud platform and a target terminal; The cloud platform is used to send a training request to the target terminal, the training request carries a simulation strategy, the simulation strategy is used to indicate a switching mode of multiple simulation objects, and the target terminal is a physical terminal or a virtual terminal; The target terminal is used to obtain a training sample set and a current global model from the cloud platform when receiving the training request, wherein the training sample set includes training samples of the multiple simulation objects; The target terminal is used to train the global model multiple times based on the simulation strategy and the training sample set to obtain a local model corresponding to each simulation object; The target terminal is used to send the local model corresponding to each of the simulation objects to the cloud platform; The cloud platform is used to update the global model based on the local models corresponding to each of the simulation objects.

12. A computer device, characterized in that: The computer device includes one or more processors and one or more memories, and at least one computer program is stored in the one or more memories. The computer program is loaded and executed by the one or more processors to implement the end-cloud collaborative model training method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: At least one computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by the processor to implement the end-cloud collaborative model training method as described in any one of claims 1 to 10.