EP-4300876-B1 - MODEL TRAINING METHOD AND APPARATUS
Inventors
- XIN, YANG
- CHONG, Weiwei
- WU, XIAOBO
- YAN, Yali
Dates
- Publication Date
- 20260506
- Application Date
- 20210305
Claims (6)
- A model training method, comprising: obtaining (S1001) first capability information and second capability information of a client; determining (S1002) a target server based on the first capability information and the second capability information, wherein the target server is a server to which the client reports model information, and the target server comprises a cloud server or an edge server; and sending (S1003) indication information to the client, wherein the indication information indicates the client to report the model information of the client to the target server, characterized in that the second capability information comprises one or more of the following information of the client: a federated learning client capability, and a federated learning algorithm type.
- The method according to claim 1, wherein the first capability information comprises at least one of the following information of the client: memory information, hard disk information, computing capability information, load information, and channel bandwidth information.
- The method according to claim 1 or 2, wherein the method further comprises: obtaining requirement information of the cloud server, wherein the requirement information comprises a quantity of clients and/or a data length; and the determining a target server based on the first capability information and the second capability information comprises: determining the target server based on the first capability information, the second capability information, and the requirement information.
- The method according to any one of claims 1 to 3, wherein the indication information further comprises address information of the cloud server and/or address information of the edge server.
- A model training apparatus, comprising means for carrying out the steps of the method of any one of the claims 1-4.
- A computer readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is run on a computer, the computer is enabled to perform the method according to any one of claims 1 to 4.
Description
TECHNICAL FIELD This application relates to the field of communication technologies, and in particular, to a model training method and apparatus. BACKGROUND In horizontal federated learning, there is a cloud-edge-client mode. A process is as follows: First, each client reports, to a corresponding edge server, model information obtained through local training. Then, all edge servers in a system aggregate model information reported by all clients in respective coverage areas of all the edge servers to obtain an intermediate model, and report the intermediate model to a cloud server. The cloud server aggregates intermediate models again to obtain a final model, and the cloud server delivers an aggregated model to all the clients for local inference. However, such a strict process of performing aggregation by the edge server does not comply with a deployment scenario of an actual network. How to flexibly select reporting the model information directly by the client to the cloud server or reporting the model information to the cloud server after the edge server performs model aggregation is a problem to be urgently resolved in this application. US 2020/265301 A1 describes incremental training of machine learning tools. SUMMARY According to a model training method and apparatus provided in this application, in a horizontal federated training method in a hybrid mode, a manner of reporting model information by a client may be flexibly selected based on capability information of the client, so that horizontal federated training efficiency can be improved. The invention is set out in the appended set of claims. According to a first aspect, a model training method is provided according to claim 1. The method may be performed by a cloud server, an edge server, or a third-party server, or may be performed by a chip or a circuit configured in the foregoing server. This is not limited in this application. The method comprises: obtaining first capability information and second capability information of a client; determining a target server based on the first capability information and the second capability information, where the target server is a server to which the client reports model information, and the target server includes the cloud server or the edge server; and sending indication information to the client. The indication information indicates the client to report the model information of the client to the target server. According to the solution provided in this application, the server may determine, based on obtained capability information of the client, a manner of reporting the model information by the client, so that the manner of reporting the model information by the client in the system is more flexible, and horizontal federated training efficiency can be improved. With reference to the first aspect, in some implementations of the first aspect, the first capability information includes at least one of the following information of the client: memory information, hard disk information, computing capability information, load information, and channel bandwidth information; or the second capability information includes at least region information. With reference to the first aspect, in some implementations of the first aspect, the method further includes: obtaining requirement information of the cloud server, where the requirement information includes a quantity of clients and/or a data length; and determining the target server based on the first capability information, the second capability information, and the requirement information. With reference to the first aspect, in some implementations of the first aspect, the first indication information further includes address information of the cloud server and/or address information of the edge server. Based on the foregoing solution, the requirement information of the cloud server is obtained to further control a quantity of clients that participate in training and/or the data length, so that training efficiency can be further improved. According to a second aspect, an apparatus according to claim 5 is provided. According to a third aspect, a computer-readable medium is provided according to claim 6. The computer-readable medium stores a computer program (which may also be referred to as code or instructions). When the computer program is run on a computer, the computer is enabled to perform the method according to the first aspect the possible implementations of the first aspect to the third aspect. BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a schematic diagram of horizontal federated learning;FIG. 2 is a schematic diagram of vertical federated learning;FIG. 3 is a schematic diagram of a training process of horizontal federated learning;FIG. 4 is a schematic diagram of an architecture of horizontal federated learning;FIG. 5 is a schematic diagram of an architecture of another horizontal federated learning;FIG. 6 is a schematic diagram of an architecture of still a