WO2024007264A1 - 模型训练方法及通信装置 - Google Patents

模型训练方法及通信装置 Download PDF

Info

Publication number
WO2024007264A1
WO2024007264A1 PCT/CN2022/104460 CN2022104460W WO2024007264A1 WO 2024007264 A1 WO2024007264 A1 WO 2024007264A1 CN 2022104460 W CN2022104460 W CN 2022104460W WO 2024007264 A1 WO2024007264 A1 WO 2024007264A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
nodes
model
information
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2022/104460
Other languages
English (en)
French (fr)
Inventor
宛烁
卢嘉勋
樊平毅
彭程晖
王飞
刘哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Huawei Technologies Co Ltd
Original Assignee
Tsinghua University
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University, Huawei Technologies Co Ltd filed Critical Tsinghua University
Priority to PCT/CN2022/104460 priority Critical patent/WO2024007264A1/zh
Publication of WO2024007264A1 publication Critical patent/WO2024007264A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications

Definitions

  • the present application relates to the field of communications, and in particular, to a model training method and a communications device.
  • model training can be based on federated learning or model segmentation.
  • the central node communicates with multiple edge nodes, and each edge node is connected with at least one distribution node.
  • the complete algorithm of the model can be executed through the distributed nodes to train the model, and the model trained by the distributed nodes can be preliminarily aggregated through the edge nodes, and the central node can further complete the integration of model weights.
  • a model can be divided into multiple sub-models, and then the multiple sub-models are deployed on multiple nodes and trained.
  • the intermediate layer data processed by the training samples is transmitted between different nodes, or the corresponding gradient.
  • each distribution node needs to execute the complete algorithm of the model.
  • the computing power of the distribution node does not match the computing power required to train the model, the training efficiency of the model is low.
  • the training samples of the neural network model need to be input by certain nodes, such as edge nodes. When the training samples come from different nodes, the training samples need to be interactive between different nodes, making it difficult to ensure data security.
  • Embodiments of the present application provide a model training method and communication device, which can take into account both data security and training efficiency.
  • the first aspect is to provide a model training method.
  • the model training method includes: the management node obtains configuration information for federated learning of the model to be trained based on the resource registration information of each of the M first nodes.
  • the M first nodes are nodes participating in federated learning of the model to be trained.
  • the resource registration information includes the computing power information of the first node.
  • the configuration information includes the identification of the user node and the identification of the service node among the M first nodes, the connection relationship between the user node and the service node, and the sub-model information of the model to be trained on each first node.
  • a service node is connected to at least one user node, and different service nodes are connected to different user nodes.
  • M is a positive integer.
  • the management node sends first indication information to the first node according to the configuration information.
  • the first instruction information indicates that federated learning of the model to be trained is implemented based on the configuration information.
  • the management node can determine the configuration information according to the resource registration information of each node among the M first nodes, and send the first instruction information to the second node among the M first nodes to Instructs federated learning based on configuration information. For example, the management node can determine the configuration information based on the computing power of each node. In this way, the computing power of each first node can be matched with the computing requirements of the sub-model deployed on the node, thereby improving the efficiency of federated learning.
  • the training samples on each user node can be transmitted after processing, thus It can avoid transmitting original data between different nodes and improve data security.
  • the model training method provided in the first aspect can take into account both data security and model training efficiency.
  • the management node obtains the configuration information for federated learning of the model to be trained based on the resource registration information of each of the M first nodes, which may include: the management node sends a request to the M first nodes The third node sends resource registration information of M first nodes. Among them, the resource registration information of M first nodes is used to indicate obtaining configuration information. The management node receives configuration information from the third node. In this way, the management node can assist in obtaining configuration information through the third node, so as to reduce the complexity of the management node.
  • the third node may be a node among the first nodes whose computing power is greater than or equal to the first computing power threshold. In this way, a third node with greater computing power can be selected to obtain configuration information, thereby further improving efficiency.
  • the second node may include a service node
  • the first indication information may include a connection relationship between the service node and the user node, sub-model information of the service node, and sub-model information of the user node connected to the service node. model information.
  • the second node may include a service node and a user node.
  • the first indication information may include sub-model information of the second node, and nodes connected to the second node among the M first nodes.
  • the resource registration information may also include one or more of the following: the type of data on the first candidate node, or the number of data on the first candidate node.
  • the method provided by the first aspect may also include: the management node obtains the configuration information from the P first nodes.
  • M first nodes are determined.
  • the second candidate node is a node that satisfies the first condition among the N first candidate nodes.
  • the first condition may include one or more of the following: data of the same data type as the training sample of the model to be trained exists on the first candidate node.
  • the amount of data used as training samples for the model to be trained on the first candidate node is greater than or equal to the data amount threshold.
  • N and P are both positive integers, and N ⁇ P ⁇ M.
  • the management node determines M first nodes from the P second candidate nodes, which may include: the management node receiving second indication information from each second candidate node.
  • the second indication information is used to indicate whether the second candidate node joins the federated learning process.
  • the management node determines the second candidate node that joins the federated learning process as the first node based on the second indication information sent by each second candidate node. In this way, the management node can determine the first node according to the second indication information of the second candidate node, ensuring that the first node can be used for federated learning, thereby further improving the reliability of federated learning.
  • the first candidate node may include a third candidate node.
  • the third candidate node is the node that sends resource registration information to the management node before the model to be trained starts federated learning.
  • the second candidate node may include a fourth candidate node among the third candidate nodes that satisfies the first condition.
  • the first node may include a node among the fourth candidate nodes that joins federated learning.
  • the method provided in the first aspect may further include: the management node receives a federated learning request from the fourth node.
  • the management node sends the resource registration information of the third candidate node to the fourth node.
  • the management node receives third indication information from the fourth node; wherein the third indication information is used to indicate the fourth candidate node.
  • the first candidate node may also include a fifth candidate node.
  • the fifth candidate node is the node that sends join request information to the management node during the federated learning process of the model to be trained. Among them, the join request information is used to request to join federated learning.
  • the second candidate node also includes a sixth candidate node among the fifth candidate nodes that satisfies the first condition.
  • the first node may also include nodes among the sixth candidate nodes that join federated learning.
  • the second aspect is to provide a model training method.
  • the model training method includes: the fourth node receives the resource registration information of each node in the N1 third candidate nodes from the management node.
  • the fourth node determines the fourth candidate node according to the resource registration information of each node among the N1 third candidate nodes.
  • the fourth candidate node is a node among the N1 third candidate nodes that has data of the same data type as the training sample of the model to be trained.
  • the fourth node sends third indication information to the management node.
  • the third indication information is used to indicate the fourth candidate node.
  • the method provided in the second aspect may also include: the fourth node sends a request to the management node. Send a federated learning request.
  • the federated learning request is used to indicate the data type and data volume threshold of the training samples of the model to be trained.
  • a model training method includes: the third node receives resource registration information from each first node of the management node.
  • the first node is a node participating in federated learning of the model to be trained.
  • the third node determines the configuration information according to the resource registration information of each first node.
  • the third node sends configuration information to the management node.
  • the fourth aspect provides a model training method.
  • the model training method includes: the second node receives first instruction information from the management node. Wherein, the second node is one node among the M first nodes, and the first instruction information indicates that federated learning of the model to be trained is implemented according to the configuration information.
  • the configuration information includes the communication between the user node and the service node among the M first nodes. The connection relationship, and the sub-model information of the model to be trained on each first node.
  • a service node is connected to at least one user node, and different service nodes are connected to different user nodes; M is a positive integer.
  • the second node implements federated learning of the model to be trained based on the first instruction information.
  • the second node includes a service node and a user node.
  • the first indication information includes sub-model information of the second node, and nodes connected to the second node among the M first nodes.
  • the second node includes a service node
  • the first indication information includes the connection relationship between the service node and the user node, sub-model information of the service node, and sub-model information of the user node connected to the service node.
  • the second node implements federated learning of the model to be trained according to the first instruction information, including: the service node sending configuration instruction information to the user node connected to the service node according to the first instruction information.
  • the configuration instruction information indicates that federated learning is performed based on the sub-model information on the user node.
  • the input data of the service node includes first data and second data from the service node.
  • the first data is the data output by the user nodes connected to the service node
  • the second data is the training of all user nodes connected to the service node. Sample related.
  • a communication device includes: a processing module and a transceiver module.
  • a processing module configured to obtain configuration information for federated learning of the model to be trained based on the resource registration information of each of the M first nodes.
  • the M first nodes are nodes participating in federated learning of the model to be trained.
  • the resource registration information includes the computing power information of the first node.
  • the configuration information includes the identification of the user node and the identification of the service node among the M first nodes, the connection relationship between the user node and the service node, and the sub-model information of the model to be trained on each first node.
  • a service node is connected to at least one user node, and different service nodes are connected to different user nodes.
  • M is a positive integer.
  • the transceiver module is configured to send the first indication information to the first node according to the configuration information.
  • the first instruction information indicates that federated learning of the model to be trained is implemented based on the configuration information.
  • the transceiver module is specifically configured to send the resource registration information of the M first nodes to a third node among the M first nodes. and, receiving configuration information from the third node. Among them, the resource registration information of M first nodes.
  • the third node is a node among the first nodes whose computing power is greater than or equal to the first computing power threshold.
  • the second node includes a service node
  • the first indication information includes the connection relationship between the service node and the user node, sub-model information of the service node, and sub-model information of the user node connected to the service node.
  • the second node includes a service node and a user node.
  • the first indication information includes sub-model information of the second node, and nodes connected to the second node among the M first nodes.
  • the resource registration information also includes one or more of the following: the type of data on the first candidate node, or the number of data on the first candidate node.
  • the processing module is also used to determine M first nodes from the P second candidate nodes.
  • the second candidate node is a node that satisfies the first condition among the N first candidate nodes.
  • the first condition includes one or more of the following: data of the same data type as the training sample of the model to be trained exists on the first candidate node.
  • the amount of data used as training samples for the model to be trained on the first candidate node is greater than or equal to the data amount threshold.
  • N and P are both positive integers, and N ⁇ P ⁇ M.
  • the processing module is specifically configured to receive the second indication information from each second candidate node through the transceiver module.
  • the second indication information is used to indicate whether the second candidate node joins the federated learning process. And, according to the second indication information sent by each second candidate node, the second candidate node joining the federated learning process is determined as the first node.
  • the first candidate node may include a third candidate node.
  • the third candidate node is the node that sends resource registration information to the management node before the model to be trained starts federated learning.
  • the second candidate node may include a fourth candidate node among the third candidate nodes that satisfies the first condition.
  • the first node may include a node among the fourth candidate nodes that joins federated learning.
  • the transceiver module is also configured to receive the federated learning request from the fourth node, and send the resource registration information of the third candidate node to the fourth node.
  • the transceiver module is also used to receive the third indication information from the fourth node.
  • the third indication information is used to indicate the fourth candidate node.
  • the first candidate node may also include a fifth candidate node.
  • the fifth candidate node is the node that sends join request information to the management node during the federated learning process of the model to be trained. Among them, the join request information is used to request to join federated learning.
  • the second candidate node also includes a sixth candidate node among the fifth candidate nodes that satisfies the first condition.
  • the first node may also include nodes among the sixth candidate nodes that join federated learning.
  • the transceiver module may include a receiving module and a sending module. Wherein, the transceiver module is used to implement the sending function and receiving function of the communication device described in the fifth aspect.
  • the communication device may further include a storage module that stores programs or instructions.
  • the processing module executes the program or instruction
  • the communication device can execute the model training method described in the first aspect.
  • the communication device described in the fifth aspect may be a network device, a chip (system) or other components or components that can be disposed in the network device, or a device including a network device.
  • This application is for This is not limited.
  • a sixth aspect provides a communication device.
  • the student device includes: processing module and transceiver module.
  • the transceiver module is configured to receive the resource registration information of each node among the N1 third candidate nodes from the management node.
  • a processing module configured to determine the fourth candidate node according to the resource registration information of each node among the N1 third candidate nodes.
  • the fourth candidate node is a node among the N1 third candidate nodes that has data of the same data type as the training sample of the model to be trained.
  • the third indication information is used to indicate the fourth candidate node.
  • the transceiver module is also used by the fourth node to send federated learning requests to the management node.
  • the federated learning request is used to indicate the data type and data volume threshold of the training samples of the model to be trained.
  • the transceiver module may include a receiving module and a sending module. Wherein, the transceiver module is used to implement the sending function and receiving function of the communication device described in the sixth aspect.
  • the communication device may further include a storage module that stores programs or instructions.
  • the processing module executes the program or instruction
  • the communication device can execute the model training method described in the second aspect.
  • the communication device described in the sixth aspect may be a terminal device or a network device, or may be a chip (system) or other component or component that can be disposed in the terminal device or network device, or may include a terminal device. Or network equipment, this application does not limit this.
  • a communication device in a seventh aspect, includes: a processing module and a transceiver module.
  • a transceiver module configured to receive resource registration information from each first node of the management node.
  • the first node is a node participating in federated learning of the model to be trained.
  • a processing module configured to determine configuration information according to the resource registration information of each first node.
  • the transceiver module is also used to send configuration information to the management node.
  • the transceiver module may include a receiving module and a sending module. Wherein, the transceiver module is used to implement the sending function and receiving function of the communication device described in the seventh aspect.
  • the communication device may further include a storage module that stores programs or instructions.
  • the processing module executes the program or instruction
  • the communication device can execute the model training method described in the third aspect.
  • the communication device described in the seventh aspect may be a network device, a chip (system) or other components or components that can be disposed in the network device, or a device including a network device. This application is for This is not limited.
  • a communication device in an eighth aspect, includes: a transceiver module, configured to receive first indication information from a management node.
  • the first instruction information instructs to implement federated learning of the model to be trained based on the configuration information.
  • the configuration information includes the connection relationship between the user node and the service node among the M first nodes, and the child of the model to be trained on each first node. model information.
  • a service node is connected to at least one user node, and different service nodes are connected to different user nodes; M is a positive integer.
  • the processing module implements federated learning of the model to be trained based on the first instruction information.
  • the communication device includes a service node and a user node; the first indication information includes sub-model information of the communication device, and nodes among the M first nodes that are connected to the communication device.
  • the communication device includes a service node
  • the first indication information includes the connection relationship between the service node and the user node, sub-model information of the service node, and sub-model information of the user node connected to the communication device.
  • the processing module is specifically configured to send configuration instruction information to the user node connected to the service node according to the first instruction information.
  • the configuration instruction information indicates that federated learning is performed based on the sub-model information on the user node.
  • the input data of the communication device includes first data and second data from the communication device, the first data is data output by the user node connected to the service node, and the second data is The training samples of all user nodes connected by the communication device are related.
  • the transceiver module may include a receiving module and a sending module. Wherein, the transceiver module is used to implement the sending function and receiving function of the communication device described in the eighth aspect.
  • the communication device may further include a storage module that stores programs or instructions.
  • the processing module executes the program or instruction
  • the communication device can execute the model training method described in the fourth aspect.
  • the communication device described in the eighth aspect may be a terminal device or a network device, or may be a chip (system) or other component or component that can be disposed in the terminal device or network device, or may include a terminal device. Or network equipment, this application does not limit this.
  • a communication device is provided.
  • the communication device is used to execute the model training method described in any implementation manner of the first to fourth aspects.
  • the communication device described in the ninth aspect may be the terminal device described in any one of the second aspect or the third aspect, or the network device described in any one of the first to fourth aspects, Or a chip (system) or other components or components that may be provided in the terminal equipment or network equipment, or a device including the terminal equipment or network equipment.
  • the communication device described in the ninth aspect includes modules, units, or means corresponding to implementing the model training method described in any one of the first to fourth aspects.
  • the modules, units, or means It can be implemented by hardware, software, or corresponding software implementation by hardware.
  • the hardware or software includes one or more modules or units for performing the functions involved in the above model training method.
  • a communication device in a tenth aspect, includes: a processor, the processor is configured to execute the model training method described in any one of the possible implementations of the first to fourth aspects.
  • the communication device described in the tenth aspect may further include a transceiver.
  • the transceiver can be a transceiver circuit or an interface circuit.
  • the transceiver can be used for the communication device described in the tenth aspect to communicate with other communication devices.
  • the communication device described in the tenth aspect may further include a memory.
  • This memory can be integrated with the processor or provided separately.
  • the memory may be used to store computer programs and/or data involved in the model training method described in any one of the first to fourth aspects.
  • the communication device described in the tenth aspect may be the terminal device described in any one of the second aspect or the third aspect, or the network device described in any one of the first to fourth aspects, Or a chip (system) or other components or components that may be provided in the terminal equipment or network equipment, or a device including the terminal equipment or network equipment.
  • a communication device in an eleventh aspect, includes: a processor, the processor is coupled to a memory, and the processor is used to execute a computer program stored in the memory, so that the communication device executes any one of the possible implementation methods of the first to fourth aspects. model training method.
  • the communication device described in the eleventh aspect may further include a transceiver.
  • the transceiver can be a transceiver circuit or an interface circuit.
  • the transceiver can be used for the communication device described in the eleventh aspect to communicate with other communication devices.
  • the communication device described in the eleventh aspect may be the terminal device described in any one of the second aspect or the third aspect, or the network device described in any one of the first to fourth aspects. , or a chip (system) or other component or component that can be provided in the terminal equipment or network equipment, or a device including the terminal equipment or network equipment.
  • a communication device including: a processor and a memory; the memory is used to store a computer program, and when the processor executes the computer program, the communication device executes the first to fourth aspects.
  • the communication device described in the twelfth aspect may further include a transceiver.
  • the transceiver can be a transceiver circuit or an interface circuit.
  • the transceiver can be used for the communication device described in the twelfth aspect to communicate with other communication devices.
  • the communication device described in the twelfth aspect may be the terminal device described in any one of the second aspect or the third aspect, or the network device described in any one of the first to fourth aspects. , or a chip (system) or other component or component that can be provided in the terminal equipment or network equipment, or a device including the terminal equipment or network equipment.
  • a communication device including: a processor; the processor is configured to be coupled to a memory, and after reading the computer program in the memory, execute the steps in the first to fourth aspects according to the computer program.
  • the communication device described in the thirteenth aspect may further include a transceiver.
  • the transceiver can be a transceiver circuit or an interface circuit.
  • the transceiver can be used for the communication device described in the eighth aspect to communicate with other communication devices.
  • a fourteenth aspect provides a processor.
  • the processor is configured to execute the model training method described in any one of the possible implementations of the first to fourth aspects.
  • a communication system in a fifteenth aspect, includes one or more terminal devices and one or more network devices.
  • a computer-readable storage medium including: a computer program or instructions; when the computer program or instructions are run on a computer, the computer is caused to execute any one of the possible methods of the first to fourth aspects. Implement the model training method described in the method.
  • a computer program product including a computer program or instructions.
  • the computer program or instructions When the computer program or instructions are run on a computer, the computer is caused to execute any one of the possible implementation methods of the first to fourth aspects.
  • Figure 1 is a schematic diagram of the architecture of classic federated learning
  • Figure 2 is a schematic diagram of the architecture of federated learning in the device-edge cloud system
  • Figure 3 is a schematic diagram of the network distribution for model segmentation training
  • Figure 4 is a schematic architectural diagram of a communication system provided by an embodiment of the present application.
  • Figure 5 is a schematic flowchart 1 of the model training method provided by the embodiment of the present application.
  • Figure 6 is a schematic flowchart of the configuration information determination process provided by the embodiment of the present application.
  • Figure 7 is a schematic flowchart 1 of the federated learning process in the embodiment of this application.
  • Figure 8 is a schematic flow chart 2 of the federated learning process in the embodiment of this application.
  • Figure 9 is a schematic diagram 1 of the first node determination process in the embodiment of the present application.
  • Figure 10 is a schematic diagram 2 of the determination process of the first node in the embodiment of the present application.
  • Figure 11 is a schematic diagram 3 of the determination process of the first node in the embodiment of the present application.
  • Figure 12 is a schematic flow chart 2 of the model training method provided by the embodiment of the present application.
  • Figure 13 is a schematic diagram of the distribution of the neural network layer on the first node according to an embodiment of the present application.
  • Figure 14 is a schematic diagram of the relationship between the number of training times and prediction accuracy of the model obtained by different model training schemes
  • Figure 15 is a schematic diagram 1 of the architecture of a communication device provided by an embodiment of the present application.
  • Figure 16 is a schematic diagram 2 of the architecture of a communication device provided by an embodiment of the present application.
  • FIG. 1 is a schematic diagram of the system architecture of classic federated learning.
  • the system architecture for classic federated learning may include a central node 101 and multiple distribution nodes (distribution node 102a to distribution node 102c).
  • the distribution nodes 102a to 102c are all communicatively connected with the central node 101, and the distribution nodes 102a to 102c respectively belong to different institutions or companies.
  • Each of the distribution nodes 102a to 102c includes a distribution data set regarding the application environment of the distribution node. Since each distribution node belongs to a different institution or company, if the distributed data set in the distribution node involves the internal data of each institution or company, the model training method of centralized sharing of data is difficult to deploy. Based on this background, classic federated learning came into being. The following explains the principle of classic federated learning in conjunction with the communication system shown in Figure 1.
  • the central node 101 can send the model to be trained under the model architecture to the distribution nodes 102a to 102c respectively.
  • the model to be trained on each of the distribution nodes 102a to 102c is the same.
  • the distribution nodes 102a to 102c execute the complete algorithm of the model to be trained according to their own distribution data sets to implement training of the model to be trained.
  • the trained model weight is obtained.
  • Each distribution node sends the trained model weight to the central node 101 respectively.
  • the central node 101 After receiving the trained model weights of each distribution node, the central node 101 performs federated aggregation on the trained model weights of all distribution nodes, thereby obtaining the federated aggregated model weights. It is understandable that this training process can be repeated multiple times, and each time the training is repeated, the weight of the model to be trained is the model weight after the latest federation aggregation. In other words, each training process uses the latest model as the model to be trained.
  • the central node 101 can be a server, and the distribution node can be a terminal device.
  • Hierarchical federated learning can be performed based on the device-edge-cloud system architecture, which may also be called device-edge-cloud hierarchical federation.
  • the following is an example of the principle of layered federation of device-edge cloud based on the specific device-edge cloud system architecture.
  • FIG. 2 is a schematic diagram of the architecture of the device-edge cloud system.
  • the central node 201 (cloud) communicates with edge nodes 202a to 202b (edge nodes, which can also be called service nodes or edge service nodes), where the edge nodes 202a is communicatively connected to the distribution nodes 203a to 203c, and the edge node 202b is communicatively connected to the distribution nodes 203d to 203f.
  • the central node 201 may send the model to be trained to the edge node 202a and the edge node 202b respectively.
  • the edge node 202a After receiving the model to be trained, the edge node 202a sends the model to be trained to the distribution nodes 203a to 203c respectively. After receiving the model to be trained, the distribution nodes 203a to 203c execute the model to be trained according to their own distribution data sets. Complete algorithm to train the model to be trained, thereby obtaining the trained model weights. After the distribution nodes 203a to 203c obtain their respective model weights, they upload their respective model weights to the edge node 202a. The edge node 202a performs federated aggregation on the model weights of the distribution nodes 203a to 203c to obtain a preliminary aggregation result.
  • the edge node 202b After receiving the model to be trained, the edge node 202b sends the model to be trained to the distribution nodes 203d to 203f respectively. After receiving the model to be trained, the distribution nodes 203d to 203f train the model to be trained according to their own distribution data sets. , thereby obtaining the trained model weights. After the distribution nodes 203d to 203f obtain their respective model weights, they upload their respective model weights to the edge node 202b. The edge node 202b performs federated aggregation on the model weights of the distribution nodes 203d to 203f to obtain a preliminary aggregation result.
  • the edge node 202a and the edge node 202b respectively send their respective preliminary aggregation results to the central node 201.
  • the central node 201 performs federated aggregation again on the aggregation results of the edge node 202a and the preliminary aggregation results of the edge node 202b, thereby obtaining the re-aggregated model weights. .
  • the central node can use the model corresponding to the re-aggregated model weights as the model to be trained for model training.
  • the model training principle is similar to the first model training principle, and will not be described again here. It is understandable that this training process can be repeated multiple times, and each time the training is repeated, the weight of the model to be trained is the model weight after the latest federation aggregation by the central node. In other words, each training process uses the latest model as the model to be trained.
  • the central node 201 may be a server
  • the edge node 202a or the edge node 202b may be a server
  • the distribution nodes 203a to 203f may be terminal devices.
  • each distributed node needs to execute the complete algorithm of the model to be trained.
  • the computing power of the distributed node does not match the computing power required to train the model to be trained, In this case, the training efficiency of the model is low.
  • model training can be performed based on model segmentation.
  • a model can be divided into multiple sub-models, and then the multiple sub-models are deployed on multiple nodes respectively, and model training is performed on multiple nodes.
  • the following is explained in conjunction with the communication system and neural network model shown in Figure 3.
  • the communication system includes a central node 301 and a distribution node 302.
  • the neural network model shown in Figure 3 can be divided from the dotted line L in the figure to obtain the divided neural network layer 1 and neural network layer 1.
  • Network layer two the one located on the left side of the dotted line L is the neural network layer one, and the neural network layer one can be deployed on the distribution node 302.
  • the one on the right side of the dotted line is the neural network layer 2, and the neural network layer 2 can be deployed on the central node 301.
  • the distribution node 302 can input the training sample into the neural network layer one to obtain the intermediate layer output data of the neural network model, and transmit the intermediate layer output data to the central node.
  • the central node 301 receives the intermediate layer output data Processing is performed through the neural network layer 2 to obtain the data processing results.
  • the central node 301 obtains the reverse gradient of the data processing result through the second layer of the neural network, performs gradient backpropagation, and adjusts the corresponding model weight according to the gradient of each layer to obtain the intermediate layer gradient.
  • the central node 301 sends the intermediate layer gradient to the distribution node 302.
  • the distribution node 302 continues gradient backpropagation and adjusts the model weight on layer one of the neural network. Based on the above process, a training process of the model can be completed.
  • the training samples of the model to be trained need to be input by a certain node, such as the distribution node 302 in Figure 3.
  • a certain node such as the distribution node 302 in Figure 3.
  • the training samples come from different distribution nodes, different distribution nodes are required. It is difficult to ensure data security by interacting with training samples.
  • the management node can determine the configuration for federated learning based on the resource registration information of the first node participating in federated learning of the model to be trained. information, and sends the first instruction information to instruct the implementation of federated learning according to the configuration information.
  • the resource registration information is related to the computing power of the node.
  • the data transmitted between the user node and the service node is the output result of the sub-model, that is, the data or gradient of the middle layer of the model to be trained. In this way, it is possible to avoid directly transferring data between different nodes. Training samples are transmitted between nodes, thereby improving security. In other words, the solution provided by the embodiments of this application can take into account both training efficiency and data security.
  • WiFi wireless fidelity
  • V2X vehicle to everything
  • D2D device-to-device
  • Internet of Vehicles communication systems 4th generation (4G) mobile communication systems, such as long term evolution (LTE) systems, global interoperability for microwave access (WiMAX) communication systems
  • 5th generation, 5G mobile communication system
  • NR new radio
  • 6th generation, 6G sixth generation
  • FIG. 4 is a schematic architectural diagram of a communication system to which the model training method provided by the embodiment of the present application is applicable.
  • the communication system includes a management node 401 and a plurality of first candidate nodes, such as first candidate nodes 402a to 402c, and first candidate nodes 403a to 403h.
  • Each first candidate node can communicate with the management node 401.
  • the management node may be used to select M first nodes for model training from the first candidate nodes, and determine the configuration information of all first nodes for federated learning of the model to be trained.
  • the configuration information may include the identification of the service node (such as the first candidate node 402a, the first candidate node 402b) among the M first nodes and the identification of the user node (such as the first candidate node 403a to the first candidate node 403d). identification, the connection relationship between the first nodes and the sub-model information on each first node, and then sends the first instruction information to the first node to instruct to implement federated learning of the model to be trained according to the configuration information.
  • management node may be a network device, such as a server, or other device with data processing and communication functions.
  • the above management nodes can be implemented through the cloud or the main server (leader server).
  • the above-mentioned user node can be a terminal device or a network node, and the service node can be a network device.
  • the service node can also be called an edge node.
  • the above-mentioned network device is a device located on the network side of the above-mentioned communication system and having a wireless transceiver function, or a chip or chip system that can be installed on the device.
  • the network equipment includes but is not limited to: access points (APs) in wireless fidelity (WiFi) systems, such as home gateways, routers, servers, switches, bridges, etc., evolved node B (evolved Node B, eNB), wireless network controller (radio network controller, RNC), node B (Node B, NB), base station controller (base station controller, BSC), base transceiver station (base transceiver station, BTS), home Base station (for example, home evolved NodeB, or home Node B, HNB), baseband unit (BBU), wireless relay node, wireless backhaul node, transmission point (transmission and reception point, TRP or transmission point, TP) etc., it can also be 5G, such as gNB in the new radio (NR) system, or
  • the above-mentioned terminal device is a terminal that is connected to the above-mentioned communication system and has a wireless transceiver function, or a chip or chip system that can be installed on the terminal.
  • the terminal equipment may also be referred to as an access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communications device, user agent or user device.
  • the terminal device in the embodiment of the present application may be a mobile phone (mobile phone), a tablet computer (Pad), a computer with wireless transceiver functions, a virtual reality (VR) terminal device, or an augmented reality (AR) terminal.
  • VR virtual reality
  • AR augmented reality
  • the terminal device of this application can also be a vehicle-mounted module, vehicle-mounted module, vehicle-mounted component, vehicle-mounted chip or vehicle-mounted unit built into the vehicle as one or more components or units.
  • the vehicle uses the built-in vehicle-mounted module, vehicle-mounted module, Vehicle-mounted components, vehicle-mounted chips or vehicle-mounted units can implement the model training method provided by this application.
  • model training method provided by the embodiments of this application can be applied between any management node, service node and user node shown in Figure 4.
  • any management node, service node and user node shown in Figure 4. please refer to the following method embodiments, which will not be described again here. .
  • FIG. 4 is only a simplified schematic diagram for ease of understanding.
  • the communication system may also include other network devices and/or other terminal devices, which are not shown in FIG. 4 .
  • FIG. 5 is a schematic flowchart 1 of the model training method provided by the embodiment of the present application.
  • This model training method can be applied to the communication between the management node and the first candidate node shown in Figure 4.
  • the model training method includes the following steps:
  • the management node obtains configuration information for federated learning of the model to be trained based on the resource registration information of each of the M first nodes.
  • the M first nodes are nodes participating in federated learning of the model to be trained.
  • the resource registration information of the first node includes the computing power information of the first node.
  • the resource registration information comes from each first node.
  • the configuration information includes the identification of the user node and the identification of the service node among the M first nodes, and the connection relationship between different first nodes.
  • the connection relationship between different nodes may include the connection relationship between the user node and the service node, and the configuration information also includes sub-model information of the model to be trained on each first node.
  • a service node is connected to at least one user node, and different service nodes are connected to different user nodes.
  • M is a positive integer.
  • the model to be trained in this application can be a machine learning model, such as a neural network model, a random forest, a decision tree, a logistic regression model, etc.
  • the sub-model described in this application may be part of the algorithm of the above-mentioned machine learning model.
  • the sub-model information may be neural network layer information, where the neural network layer information may include the number of layers of the neural network layer, and The structure of each neural network layer.
  • the management node itself determines the configuration information. For example, the management node can obtain the configuration information for federated learning of the model to be trained based on the resource registration information of each first node among the M first nodes. .
  • the management node may determine the configuration information based on the resource registration information of each of the M first nodes and the model information of the model to be trained.
  • the model information of the model to be trained may include one or more of the following: model structure and model parameters.
  • the management node may determine the configuration information based on the computing power information of each user node and each service node and the model information of the model to be trained. For example, allocate sub-models with more model layers on the first node with stronger computing power, and allocate sub-models with fewer model layers on the first node with weaker computing power.
  • the delay can be based on the complete execution of the algorithm of the balanced model to be processed.
  • the computing power information may include one or more of the following: processor frequency, number of processors, processor occupancy rate, or energy consumption parameters.
  • the strength of computing power can be determined based on one or more of the following: processor frequency, number of processors, processor occupancy, or energy consumption parameters.
  • the following uses the computing power information including the number of processors as an example to illustrate how to determine the configuration information in the embodiment of the present application.
  • the computing power of a node is related to the number of processors on the node.
  • the more processors on the node the stronger the computing power of the node.
  • the smaller the number of processors on the node the weaker the computing power of the node.
  • each model layer requires 1 processor.
  • the M first nodes there are 3 first nodes including 1 processor (first node A to first node C)
  • the first node A and the first node D can be determined as service nodes, the first node B, the first node C,
  • the first node E and the first node F are determined as user nodes.
  • the first node A is connected to the first node E and the first node F respectively.
  • the first node D is connected to the first node B and the first node C respectively.
  • the first layer in the model to be trained can be deployed on both the first node B and the first node C
  • the second layer and the third layer in the model to be trained can be deployed on the first node D.
  • the configuration information may also include the processors used for federated learning on each first node. And/or, the configuration information may also include energy consumption of the first node.
  • the node in the first node determines the configuration information and feeds it back to the management node, that is, the management node obtains the configuration information from the first node.
  • the design scheme is shown in Figure 6.
  • the management node obtains the configuration information for federated learning of the model to be trained based on the resource registration information of each node among the M first nodes, which may include:
  • the management node determines the third node.
  • the third node may be a node among the first nodes whose computing power is greater than or equal to the first computing power threshold.
  • the first computing power threshold may be the processor number threshold.
  • the computing power greater than or equal to the first computing power threshold may be the number of processors greater than or equal to the processor threshold, such as 2 processors.
  • the processor occupancy may be less than or equal to the occupancy threshold.
  • the computing power being greater than or equal to the first computing power threshold may mean that the processor occupancy is less than or equal to the occupancy threshold, such as 40%.
  • the computing power of the first node can be determined in combination with the number of callable processes on the first node and the effective processor frequency.
  • Computing power can be the product of the number of callable processors and the effective processor frequency.
  • the effective processor frequency is the main frequency multiplied by the proportion of processor occupancy that can be allocated to the first task.
  • the first task is to determine the configuration information.
  • the above S501-1 may include the management node determining any node whose computing power is greater than or equal to the first computing power threshold as the third node.
  • a node with greater computing power can be selected from the first node to determine the configuration information to increase the model iteration speed, thereby further improving the efficiency of model training.
  • the third node may be the node with the largest computing power among the first nodes. That is to say, the management node can determine the node with the largest computing power among the first nodes as the third node. In this way, the third node with the largest computing power can be selected to obtain configuration information, thereby further improving efficiency.
  • the third node may be the first node with the largest computing power among the first nodes that can be used to determine the configuration information.
  • the above S501-1 may include steps 1 to 4.
  • Step 1 The management node sends a resource optimization request to the current node.
  • the current node is the node among the first nodes that has not received resource optimization information and has the largest computing power.
  • the resource optimization request indicates execution of a first task, where the first task is to determine configuration information.
  • the resource optimization request may include computing power information for executing the first task.
  • Step 2 The current node sends feedback information to the management node.
  • the feedback information is used to indicate whether the node that receives the resource optimization request performs the first task.
  • the current node may determine whether to execute the first task based on the computing power information of the current node. For example, when the computing power information includes the processor occupancy rate, if the processor occupancy rate of the current node is greater than or equal to 30%, the feedback information indicates that the current node does not perform the first task. If the processor occupancy rate of the current node is less than 30%, the feedback information indicates that the current node does not perform the first task. %, the feedback information instructs the current node to perform the first task.
  • the feedback information can also be determined based on the energy consumption of the current node.
  • the relevant introduction of determining feedback information based on the computing power information of the current node please refer to the relevant introduction of determining feedback information based on the computing power information of the current node, which will not be described again here.
  • Step 3 If the feedback information indicates that the resource optimization node performs the first task, the management node determines the current node that received the resource optimization request as the third node.
  • Step 4 If the feedback information indicates that the node that received the resource optimization request does not perform the first task, repeat steps 1 to 4 until the third node is determined.
  • the management node sends the resource registration information of each first node among the M first nodes to the third node.
  • the third node receives resource registration information for each first node from the management node.
  • the resource registration information of the M first nodes can be carried in the physical downlink control channel (physical downlink control channel, PDCCH) or the physical downlink shared channel (physical downlink shared channel, PDSCH).
  • PDCCH physical downlink control channel
  • PDSCH physical downlink shared channel
  • the third node determines configuration information based on the resource registration information of the M first nodes.
  • S501-4 The third node sends configuration information to the management node.
  • the management node assists in obtaining configuration information through a third node.
  • the configuration information sent by the third node to the management node can be carried on the physical uplink control channel (PUCCH), or the physical uplink shared channel (PUSCH) uplink control information (UCI) )middle.
  • PUCCH physical uplink control channel
  • PUSCH physical uplink shared channel
  • UCI uplink control information
  • the management node can assist in obtaining configuration information through the third node, so as to reduce the complexity of the management node.
  • the management node can also determine the configuration information in combination with the computing power information and bandwidth information of each user node and each service node.
  • the following uses the computing power information including the number of processors as an example to illustrate how to determine the configuration information in the embodiment of the present application.
  • the computing power of a node is related to the number of processors on the node.
  • the more processors on the node the stronger the computing power of the node.
  • the fewer the number of processors on the node the weaker the computing power of the node.
  • the data processing delay of the node is positively related to the number of processors, the time it takes for one processor to process one model layer
  • the delay is 1 microsecond (us).
  • the delay of two processors processing a model layer is 0.5us.
  • the transmission delay determined according to the first node A is 0.5us, according to the bandwidth of the first node D If the determined transmission delay is 0.5us, then the first node A and the first node D can be determined as the service node, and the first node B, the first node C, the first node E, and the first node F can be determined as the user node.
  • the first node A is connected to the first node E and the first node F respectively.
  • the first node D is connected to the first node B and the first node C respectively.
  • the first and second layers of the model to be trained can be deployed on both the first node E and the first node F, and the third layer of the model to be trained can be deployed on the first node A.
  • the first layer of the model to be trained can be deployed on both the first node B and the first node C, and the second layer and the third layer of the model to be trained can be deployed on the first node D.
  • S502 The management node sends the first indication information to the second node according to the configuration information.
  • the first instruction information indicates that federated learning of the model to be trained is implemented based on the configuration information.
  • the first indication information sent by the management node to the second node may be carried in the PDCCH or PDSCH.
  • the second node includes a service node.
  • the first indication information includes the connection relationship between the second node and the user node, sub-model information of the service node, and sub-model information of the user node connected to the service node.
  • the second node may forward the information related to the user node in the configuration information to the user node.
  • S502 may include: the management node sends first indication information to each second node, and one second node corresponds to one first indication information.
  • the indication information is used to indicate the connection relationship between the second node and the user node, the sub-model of the second node, and the sub-model of the user node connected to the second node.
  • the management node may send the first indication information by broadcasting.
  • the management node sends the first indication information to the second node according to the configuration information, including: the management node broadcasts the first indication information to the second node according to the configuration information.
  • the sub-model information may be the distribution status information of the sub-models on the second node after the model to be trained is divided. That is, whether the sub-models divided by the model to be trained are distributed on the second node. .
  • the second node includes a service node and a user node.
  • the first indication information includes sub-model information of each second node, and nodes connected to the second node among the M first nodes.
  • the management node sends first indication information to the second node according to the configuration information, including: the management node sends respective first indication information to each service node according to the configuration information, and the management node sends respective first indication information to each service node respectively.
  • the user nodes send respective first indication information.
  • the management node obtains the connection relationship and/or sub-model from the configuration information and sends it to the corresponding second node according to the configuration information.
  • the management node can also obtain the connection relationship and/or sub-model from the configuration information according to the configuration information.
  • the configuration information is directly carried in the first indication information and sent to the second node without restriction.
  • S503 The second node implements federated learning of the model to be trained according to the first instruction information.
  • the second node includes a service node
  • the second node implements federated learning of the model to be trained according to the first instruction information, which may include:
  • S503-1 The service node sends configuration instruction information to the user node connected to the service node according to the first instruction information.
  • the configuration instruction information is used to instruct federated learning based on sub-model information on the user node, and the configuration instruction information includes sub-model information of the user node connected to the service node.
  • each user node performs federated learning based on its respective sub-model information.
  • the configuration instruction information may also include sub-model information of the service node.
  • the service node includes sub-models, and the service nodes can also perform federated learning based on their respective sub-models.
  • S503-3 to S503-6 can also be included:
  • the service node sends address request information to the management node.
  • the address request information is used to obtain the communication address information of the user node connected to the service node, such as the network protocol (internet protocol, IP) address.
  • IP network protocol
  • S503-4 The management node sends address feedback information to the service node.
  • the address feedback information is used to indicate the communication address of the user node connected to the service node.
  • S503-5 The service node sends a connection establishment request to the user node connected to the service node.
  • connection feedback information is used to indicate that the connection is established successfully.
  • the service node can also save the sub-model.
  • S503 may include that each second node performs federated learning based on its respective sub-model information.
  • the first indication information of the service node may include: sub-model information on the service node, and identification information of the user node connected to the service node.
  • the first indication information of the user node may include sub-model information on the user node.
  • the service node can establish a connection with the user node corresponding to the service node.
  • the principle of establishing a connection between the service node and the user node please refer to the above S503-3 and S503-4, which will not be described again here.
  • the sub-model information of the service node includes the sub-model of the service node, the service node can also save the sub-model.
  • the user node saves the sub-model in the sub-model information corresponding to the user node.
  • the process of federated learning can include the process of collaborative training and the process of federated aggregation of models.
  • the training process of the connected service nodes and user nodes is as follows:
  • the user node processes the training samples on the user node through the first neural network layer to obtain first data, that is, the data obtained after the first neural network layer processes the training samples.
  • the user node sends the first data and label information to the service node.
  • the tag information may include tags that have undergone data desensitization processing.
  • data desensitization is a data processing process that eliminates sensitive information in the original environmental data and retains the data characteristics or content required by the business.
  • data desensitization you can refer to the implementation principles of existing data desensitization technology, which will not be described again here.
  • S803 The service node processes the second data through the second neural network layer to obtain the output data of the model to be trained.
  • the second data includes the first data.
  • the second data may also include global information on the service node, where the global information is data related to training samples on all user nodes connected to the service node.
  • the first data is the processing result of salary information on the user node
  • the second data can be the difference between the average salary in region A and the average salary in region B.
  • the service node obtains the first gradient based on the output data and label information of the model to be trained.
  • S805 The service node back-propagates the first gradient on the second neural network layer to obtain the second gradient, and updates the model weight of the second neural network layer.
  • S806 The service node sends the second gradient to the user node.
  • S807 The user node backpropagates the second gradient on the first neural network layer and updates the model weight of the first neural network layer.
  • model federation aggregation of models can be performed.
  • the process of model federation aggregation is as follows: the user node sends the updated service node to the service node connected to the user node. Model weights for the first sub-model.
  • the service node performs the first federated aggregation of the updated model weights of the first sub-models of each user node to obtain the first aggregated model weights.
  • the service node sends the first aggregated model weight and the model weight of the second sub-model updated by the service node to the central node.
  • the central node performs federated aggregation on the first aggregated model weights of each service node to obtain the re-aggregated model weights.
  • a federated learning process can be realized. It can be understood that in the embodiments of this application, the above-mentioned federated learning process can be performed multiple times, and the model to be trained in each federated learning process can be an updated model based on the model weights that have been aggregated again in the previous federated learning process.
  • the central node can be one of the service nodes, or other service nodes other than the service node.
  • the management node can determine the configuration information according to the resource registration information of each of the M first nodes, and send the first instruction to the second node among the M first nodes.
  • Information to indicate federated learning based on configuration information For example, the management node can determine the configuration information based on the computing power of each node. In this way, the computing power of each first node can be matched with the computing requirements of the sub-model deployed on the node, thereby improving the efficiency of federated learning.
  • the training samples on each user node can be transmitted after processing, thus It can avoid transmitting original data between different nodes and improve data security.
  • the model training method provided in Figure 5 can take into account both data security and model training efficiency.
  • the resource registration information may also include one or more of the following: the type of data on the node, or the number of data on the node.
  • Methods can also include:
  • S500 The management node determines M first nodes from P second candidate nodes.
  • the second candidate node is a node that satisfies the first condition among the N first candidate nodes.
  • the first condition includes one or more of the following: on the first candidate node, there is data of the same data type as the training sample of the model to be trained. Alternatively, on the first candidate node, the amount of data used as training samples for the model to be trained is greater than or equal to the data amount threshold.
  • N and P are both positive integers, and N ⁇ P ⁇ M.
  • the data on the first candidate node is of the same data type as the training sample of the model to be trained, which can also be said to be data that can be used for model training of the model to be trained.
  • the data volume threshold can be 10, 100, or 1,000.
  • the specific number can be determined according to the actual business situation, such as model training accuracy, etc., which will not be described again here. It is understandable that the data volume threshold may be different for service nodes and user nodes.
  • the first node whose data type matches the data type of the sample to be trained and/or the training sample matches the computing power can be selected, thereby further improving the model training efficiency.
  • the management node determines M first nodes from P second candidate nodes, which may include:
  • S500 includes S500-0, where the management node determines the second candidate node.
  • S500-1 The management node receives the second indication information of each second candidate node.
  • the second instruction information is used to instruct the second candidate node to join the federated learning process or not to join the federated learning process.
  • S500-2 The management node determines the second candidate node to join the federated learning process as the first node.
  • the N first candidate nodes include N1 third candidate nodes, and P1 nodes that meet the first condition among the N1 third candidate nodes are fourth candidate nodes.
  • N1 and P1 are both positive integers, N ⁇ N1 ⁇ P1.
  • the third candidate node is a node that sends resource registration information to the management node before starting federated learning of the model to be trained, and sends the resource registration information to the management node. It should be noted that the third candidate node is a node that has not sent the join request information (using Request to join a node that already has a federated learning process).
  • the second candidate node includes a fourth candidate node among the third candidate nodes that satisfies the first condition.
  • the management node determines the second candidate node to join the federated learning process as the first node, including: the management node determines the fourth candidate node to join the federated learning process as the first node.
  • the management node receives the resource registration information of each of the N1 third candidate nodes.
  • the resource registration information of the service node in the third candidate node may be carried in the X2 interface signaling, and the resource registration information of the user node in the third candidate node may be carried in the PDCCH or PDSCH.
  • the fourth node sends a federated learning request to the management node.
  • the federated learning request is used to indicate the data type and data volume threshold of the training samples of the model to be trained.
  • the management node sends the resource registration information of each node in the N1 third candidate nodes to the fourth node.
  • the fourth node receives resource registration information of each of the N1 third candidate nodes from the management node.
  • the fourth node is the node that initiates the federated learning request.
  • the federated learning request is used to indicate the data type and data volume threshold of the training sample of the model to be trained.
  • the fourth node determines the fourth candidate node based on the resource registration information of each node among the N1 third candidate nodes.
  • the fourth candidate node is a node among the N1 third candidate nodes that has data of the same data type as the training sample of the model to be trained.
  • the fourth node sends third indication information to the management node.
  • the third indication information is used to indicate the fourth candidate node.
  • the determination process of the first candidate node can also be implemented by the management node.
  • the management node For specific implementation principles, reference can be made to the above steps S1004 and S1005, which will not be described again here.
  • the management node can assist in determining the fourth candidate node through the fourth node, so as to reduce the complexity of the management node.
  • the above S1004 can also be executed by the management node, that is, the management node determines the fourth candidate node by itself based on the federated learning request and the resource registration information of each node in the third candidate node.
  • the management node can avoid performing S1003 and S1005.
  • the management node can determine the fourth candidate node according to the federated learning request, which can reduce signaling overhead.
  • the management node sends fourth indication information to each fourth candidate node.
  • the fourth instruction information indicates whether to join the federated learning process of the model to be trained.
  • the fourth instruction information may include a federated learning request.
  • the management node receives second indication information from each fourth candidate node.
  • the second instruction information is used to indicate whether to join the federated learning process of the model to be trained. That is to say, the second indication information sent by the fourth candidate node may indicate whether to join the federated learning process of the model to be trained.
  • the management node determines the fourth candidate node indicated by the second indication information to be added to the federated learning process of the model to be trained as the first node.
  • the N first candidate nodes can also include N2 fifth candidate nodes.
  • the fifth candidate node is during the federated learning process of the model to be trained.
  • the joining request information is used to request to join federated learning; in this case, the second candidate node also includes P2 sixth candidate nodes that meet the first condition among the N2 fifth candidate nodes.
  • N2 and P2 are both positive integers, N ⁇ N2 ⁇ P2.
  • the management node determines the second candidate node to join the federated learning process as the first node may also include: the management node determines the sixth candidate node to join the federated learning process as the first node.
  • the fifth candidate node is a user node that has sent join request information to the management node.
  • the sixth candidate node is the node that satisfies the first condition among the N2 fifth candidate nodes. The process of determining the first node from the sixth candidate node will be described below with reference to FIG. 11 as an example.
  • the fifth candidate node sends join request information to the management node.
  • the join request information includes resource registration information of the fifth candidate node.
  • the management node determines the sixth candidate node based on the join request information of the fifth candidate node.
  • the sixth candidate node is a node among the fifth candidate nodes that satisfies the first condition.
  • the management node sends the federated learning process information to the sixth candidate node.
  • Information about the federated learning process includes the type of training samples of at least one neural network model and the data volume threshold of the training samples.
  • At least one to-be-trained model neural network model may include a to-be-trained model.
  • the management node receives the second indication information from the sixth candidate node.
  • the second instruction information includes a federated learning process selected by the sixth node from a plurality of federated learning processes.
  • the second instruction information includes a federated learning process in which the sixth candidate node chooses to join.
  • the management node determines the sixth candidate node selected to join the federated learning process of the model to be trained as the first node.
  • the management node can evaluate and obtain the delay and energy consumption of each first node every interval of an evaluation period, and then determine whether computing power adjustment is needed based on the delay and energy consumption of each first node.
  • the computing power of the first node is greater than the second computing power threshold, or the energy consumption of the first node is greater than the energy consumption threshold, the computing power is adjusted. In this case, S500 can be executed again.
  • the second computing power threshold may be the same or different.
  • model training method of the embodiment of the present application is exemplified below in conjunction with the detailed process.
  • the service nodes 402a to 402c send their respective resource registration information to the management node 401
  • the user nodes 403a to 403f send their respective resource registration information to the management node. That is, the third candidate nodes include service nodes 402a to 402c, and user nodes 403a to 403f.
  • the service node 402a (ie, the fourth node) sends a federated learning request to the management node 401.
  • the federated learning request is used to request federated learning for neural network model 1.
  • the management node 401 sends the resource registration information of all third candidate nodes to the service node 402a (the fourth node).
  • the service node 402a determines the fourth candidate node based on the resource registration information of all third candidate nodes.
  • the fourth candidate node includes service node 402a-service node 402c, and user node 403a to user node 403f.
  • the service node 402a sends the third indication information to the management node 401.
  • the third indication information is used to indicate the fourth candidate node.
  • S1206 The management node 401 sends fourth indication information to each fourth candidate node.
  • the fourth instruction information may include a federated learning request.
  • the management node 401 receives the second indication information of the fourth candidate node.
  • the second instruction information of the service node 402a and the service node 402b both indicate joining the federated learning process of the neural network model 1
  • the second instruction information of the user nodes 403a to 403d all indicate joining the federated learning process of the neural network model 1.
  • the management node 401 determines the service node 402a, the service node 402b, and the user nodes 403a to 403d among the fourth candidate nodes as first nodes.
  • S1209 The management node determines the configuration information according to the first node.
  • the management node sends the first indication information to the first node.
  • Both the user node 403g and the user node 403h send joining request information to the management node 401 for requesting to join the federated learning process. At this time, user node 403g and user node 403h are fifth candidate nodes.
  • the management node 401 determines that the sixth candidate node is the user node 403g based on the resource registration information in the respective join request information of the user node 403g and the user node 403h.
  • the management node 401 sends federated learning process information to the user node 403g.
  • the federated learning process information indicates that the user node 403g can join the federated learning process of neural network model 1 and the federated learning process of neural network model 2.
  • the user node 403g after receiving the information about the federated learning process, the user node 403g sends the second instruction information to the management node 401, and the second instruction information instructs the user node 403g to join the federated learning process of the neural network model 1.
  • the management node 401 determines the user node 403g as the first node.
  • the first node determined in S1206 and S1208 can be used as a node participating in federated learning, and the above steps S1209 to S1211 can be re-executed.
  • the connection relationship between each first node is as shown in Figure 13.
  • the management node is connected to the service node 402a and the service node 402b respectively, and the service node 402a is connected to the user node 403a and the user node 403b respectively.
  • the service node 402b is connected to the user node 403c and the user node d respectively.
  • the model to be trained distributed to the service node 402a the user node 403a and the user node 403b is divided according to the position of L1 in the figure to obtain the first neural network layer and the second neural network layer, the first neural network layer can be deployed at On the user node 403a and the user node 403b, the second neural network layer is deployed on the service node 402a.
  • the fourth neural network layer can be deployed at On the user node 403c and the user node 403d, the second neural network layer is deployed on the service node 402b.
  • vertical federated learning can be implemented on service nodes and user nodes connected to the service nodes
  • horizontal federated learning can be implemented on user nodes connected to the same service node.
  • the solution in the embodiment of this application can coordinate different nodes through the central node to achieve horizontal and vertical federated learning.
  • the prediction accuracy of the model trained using the horizontal and vertical federated learning implemented by the solution of the embodiment of the present application is higher than that of horizontal federated learning, and it is closer to the cloud for model training (cloud training ) the prediction accuracy of the model obtained.
  • the accuracy of cloud training, horizontal federated learning, and horizontal and vertical federated learning and the number of training times please refer to Figure 14.
  • the model training method provided by the embodiment of the present application is described in detail above with reference to Figures 3-14.
  • the communication device used to execute the model training method provided by the embodiment of the present application will be described in detail below with reference to FIGS. 15 and 16 .
  • Figure 15 is a schematic structural diagram of a communication device 1500 provided by an embodiment of the present application.
  • the communication device 1500 includes: a processing module 1501 and a transceiver module 1502.
  • FIG. 15 only shows the main components of the communication device 1500.
  • the communication device 1500 may be adapted to the communication system shown in FIG. 4 to perform the functions of the management node in the model training method shown in FIG. 5 .
  • the processing module 1501 is used to obtain configuration information for federated learning of the model to be trained according to the resource registration information of each node among the M first nodes.
  • the M first nodes are nodes that participate in federated learning of the model to be trained, and the M first nodes include the identification of the user node and the identification of the service node.
  • the resource registration information includes the computing power information of the first node.
  • the configuration information includes the connection relationship between the user node and the service node among the M first nodes, and the sub-model information of the model to be trained on each first node.
  • a service node is connected to at least one user node, and different service nodes are connected to different user nodes.
  • M is a positive integer.
  • the transceiving module 1502 is configured to send first indication information to the first node according to the configuration information.
  • the first instruction information indicates that federated learning of the model to be trained is implemented based on the configuration information.
  • the transceiver module 1502 is specifically configured to send resource registration information of each first node to a third node among the first nodes. and, receiving configuration information from the third node.
  • the third node is a node among the first nodes whose computing power is greater than or equal to the computing power threshold.
  • the second node includes a service node
  • the first indication information includes the connection relationship between the service node and the user node, sub-model information of the service node, and sub-model information of the user node connected to the service node.
  • the second node includes a service node and a user node.
  • the first indication information includes sub-model information of the second node, and nodes connected to the second node among the M first nodes.
  • the resource registration information also includes one or more of the following: the type of data on the first candidate node, or the number of data on the first candidate node.
  • the processing module 1501 is also used to determine M first nodes from the P second candidate nodes.
  • the second candidate node is a node that satisfies the first condition among the N first candidate nodes.
  • the first condition includes one or more of the following: on the first candidate node, there is data of the same data type as the training sample of the model to be trained.
  • the amount of data used as training samples for the model to be trained is greater than or equal to the data amount threshold.
  • N and P are both positive integers, and N ⁇ P ⁇ M.
  • the processing module 1501 is specifically configured to receive the respective second indication information of each second candidate node through the transceiver module 1502.
  • the second instruction information is used to instruct the second candidate node to join the federated learning process or not to join the federated learning process. And, determine the second candidate node to join the federated learning process as the first node.
  • processing module 1501 is specifically configured to determine the fourth candidate node to join the federated learning process as the first node.
  • the transceiving module 1502 is also configured to send the resource registration information of each node in the N1 third candidate nodes to the fourth node.
  • the fourth node is the node that initiates the federated learning request.
  • the federated learning request is used to indicate the data type and data volume threshold of the training sample of the model to be trained. and receiving third indication information from the fourth node.
  • the third indication information is used to indicate the fourth candidate node.
  • the transceiving module 1502 is also used to receive the federated learning request from the fourth node.
  • the federated learning request is used to indicate the data type and data volume threshold of the training samples of the model to be trained.
  • the processing module 1501 is also configured to determine the fourth candidate node based on the federated learning request and the resource registration information of each node in the N1 third candidate nodes.
  • the federated learning request is used to indicate the data type and data volume threshold of the training samples for the model to be trained.
  • the N first candidate nodes include N2 fifth candidate nodes, and P2 nodes that meet the first condition among the N2 fifth candidate nodes are sixth candidate nodes.
  • N2 and P2 are both positive integers, N ⁇ N2 ⁇ P2.
  • the processing module 1501 is also used to determine the sixth candidate node to join the federated learning process as the first node.
  • the transceiver module may include a receiving module and a transmitting module (not shown in Figure 15).
  • the transceiver module 1502 is used to implement the sending function and receiving function of the communication device 1500.
  • the communication device 1500 may also include a storage module (not shown in FIG. 15), which stores programs or instructions.
  • the processing module 1501 executes the program or instruction, the communication device 1500 can perform the function of the management node in the model training method shown in FIG. 5 .
  • the processing module 1501 involved in the communication device 1500 can be implemented by a processor or a processor-related circuit component, and can be a processor or a processing unit;
  • the transceiver module 1502 can be implemented by a transceiver or a transceiver-related circuit component, and can be a transceiver. transmitter or transceiver unit.
  • the communication device 1500 may be a network device, a chip (system) or other components or components that can be disposed in the network device, or a device including a network device, which is not limited in this application.
  • the technical effects of the communication device 1500 can be referred to the technical effects of the model training method shown in FIG. 5 , which will not be described again here.
  • the communication device 1500 may be adapted to the communication system shown in FIG. 4 to perform the function of the fourth node in the model training method shown in FIG. 3 .
  • the transceiving module 1502 is used to receive the resource registration information of each node in the N1 third candidate nodes from the management node.
  • the processing module 1501 is configured to determine the fourth candidate node according to the resource registration information of each node among the N1 third candidate nodes.
  • the fourth candidate node is a node among the N1 third candidate nodes that has data of the same data type as the training sample of the model to be trained.
  • the third indication information is used to indicate the fourth candidate node.
  • the transceiver module 1502 is also used by the fourth node to send a federated learning request to the management node.
  • the federated learning request is used to indicate the data type and data volume threshold of the training samples of the model to be trained.
  • the transceiver module 1502 may include a receiving module and a sending module (not shown in Figure 15). Among them, the transceiver module 1502 is used to implement the sending function and receiving function of the communication device 1500.
  • the communication device 1500 may also include a storage module (not shown in FIG. 15), which stores programs or instructions.
  • the processing module 1501 executes the program or instruction, the communication device 1500 can perform the function of the management node in the model training method shown in FIG. 5 .
  • the processing module 1501 involved in the communication device 1500 can be implemented by a processor or a processor-related circuit component, and can be a processor or a processing unit;
  • the transceiver module 1502 can be implemented by a transceiver or a transceiver-related circuit component, and can be a transceiver. transmitter or transceiver unit.
  • the communication device 1500 may be a network device, a chip (system) or other components or components that can be disposed in the network device, or a device including a network device, which is not limited in this application.
  • the technical effects of the communication device 1500 can be referred to the technical effects of the model training method shown in FIG. 5 , which will not be described again here.
  • the communication device 1500 may be adapted to the communication system shown in FIG. 4 to perform the function of the third node in the model training method shown in FIG. 3 .
  • the transceiving module 1502 is used to receive resource registration information from each first node of the management node.
  • the first node is a node participating in federated learning of the model to be trained.
  • the processing module 1501 is configured to determine configuration information according to the resource registration information of each first node.
  • the transceiver module 1502 is also used to send configuration information to the management node.
  • the transceiver module may include a receiving module and a transmitting module (not shown in Figure 15).
  • the transceiver module 1502 is used to implement the sending function and receiving function of the communication device 1500.
  • the communication device 1500 may also include a storage module (not shown in FIG. 15), which stores programs or instructions.
  • the processing module 1501 executes the program or instruction, the communication device 1500 can perform the function of the management node in the model training method shown in FIG. 5 .
  • the processing module 1501 involved in the communication device 1500 can be implemented by a processor or a processor-related circuit component, and can be a processor or a processing unit;
  • the transceiver module 1502 can be implemented by a transceiver or a transceiver-related circuit component, and can be a transceiver. transmitter or transceiver unit.
  • the communication device 1500 may be a terminal device or a network device, a chip (system) or other components or components that can be disposed in a terminal device or a network device, or a device including a terminal device or a network device. , this application does not limit this.
  • the technical effects of the communication device 1500 can be referred to the technical effects of the model training method shown in FIG. 5 , which will not be described again here.
  • the communication device 1500 may be adapted to the communication system shown in FIG. 1 to perform the function of the second node in the model training method shown in FIG. 3 .
  • the transceiver module 1502 is used to receive the first indication information from the management node.
  • the first instruction information instructs to implement federated learning of the model to be trained based on the configuration information.
  • the configuration information includes the connection relationship between the user node and the service node among the M first nodes, and the child of the model to be trained on each first node. model information.
  • a service node is connected to at least one user node, and different service nodes are connected to different user nodes; M is a positive integer.
  • the processing module 1501 implements federated learning of the model to be trained according to the first instruction information.
  • the communication device 1500 includes a service node and a user node.
  • the first indication information includes sub-model information of the communication device 1500 and nodes connected to the communication device 1500 among the M first nodes.
  • the communication device 1500 includes a service node
  • the first indication information includes the connection relationship between the service node and the user node, the sub-model information of the service node, and the sub-model of the user node connected to the communication device 1500 information.
  • the processing module 1501 is specifically configured to send configuration instruction information to the user node connected to the service node according to the first instruction information.
  • the configuration instruction information indicates that federated learning is performed based on the sub-model information on the user node.
  • the input data of the communication device 1500 includes first data and second data from the communication device 1500.
  • the first data is the data output by the user node connected to the service node, and the second data is the same as the second data.
  • the training samples of all user nodes connected to the communication device 1500 are related.
  • the transceiver module 1502 may include a receiving module and a sending module (not shown in Figure 15). Among them, the transceiver module 1502 is used to implement the sending function and receiving function of the communication device 1500.
  • the communication device 1500 may also include a storage module (not shown in FIG. 15), which stores programs or instructions.
  • the processing module 1501 executes the program or instruction, the communication device 1500 can perform the function of the management node in the model training method shown in FIG. 5 .
  • the processing module 1501 involved in the communication device 1500 can be implemented by a processor or a processor-related circuit component, and can be a processor or a processing unit;
  • the transceiver module 1502 can be implemented by a transceiver or a transceiver-related circuit component, and can be a transceiver. transmitter or transceiver unit.
  • the communication device 1500 may be a terminal device or a network device, a chip (system) or other components or components that can be disposed in a terminal device or a network device, or a device including a terminal device or a network device. , this application does not limit this.
  • FIG. 16 is a second structural schematic diagram of a communication device provided by an embodiment of the present application.
  • the communication device may be a terminal device or a network device, or may be a chip (system) or other component or component that can be disposed on the terminal device or the network device.
  • communication device 1600 may include processor 1601.
  • the communication device 1600 may also include a memory 1602 and/or a transceiver 1603.
  • the processor 1601 is coupled to the memory 1602 and the transceiver 1603, for example, through a communication bus.
  • the processor 1601 is the control center of the communication device 1600, and may be a processor or a collective name for multiple processing elements.
  • the processor 1601 is one or more central processing units (CPUs), may also be an application specific integrated circuit (ASIC), or may be configured to implement one or more embodiments of the present application.
  • An integrated circuit such as one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA).
  • DSP digital signal processors
  • FPGA field programmable gate arrays
  • the processor 1601 can perform various functions of the communication device 1600 by running or executing software programs stored in the memory 1602 and calling data stored in the memory 1602.
  • the processor 1601 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 16 .
  • the communication device 1600 may also include multiple processors, such as the processor 1601 and the processor 1604 shown in FIG. 16 .
  • processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
  • a processor here may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
  • the memory 1602 is used to store the software program for executing the solution of the present application, and is controlled by the processor 1601 for execution.
  • the memory 1602 is used to store the software program for executing the solution of the present application, and is controlled by the processor 1601 for execution.
  • the memory 1602 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory (RAM)) or a random access memory (RAM) that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • RAM random access memory
  • RAM random access memory
  • RAM random access memory
  • Other types of dynamic storage devices for instructions can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical discs Storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and any other media capable of being accessed by a computer, without limitation.
  • the memory 1602 may be integrated with the processor 1601, or may exist independently and be coupled to the processor 1601 through the interface circuit of the communication device 1600 (
  • Transceiver 1603 used for communication with other communication devices.
  • the communication device 1600 is a terminal device, and the transceiver 1603 can be used to communicate with a network device or with another terminal device.
  • the communication device 1600 is a network device, and the transceiver 1603 can be used to communicate with a terminal device or with another network device.
  • the transceiver 1603 may include a receiver and a transmitter (not shown separately in Figure 16). Among them, the receiver is used to implement the receiving function, and the transmitter is used to implement the sending function.
  • the transceiver 1603 can be integrated with the processor 1601, or can exist independently and be coupled to the processor 1601 through the interface circuit (not shown in Figure 16) of the communication device 1600. This is not the case in the embodiment of this application. Specific limitations.
  • the structure of the communication device 1600 shown in Figure 16 does not constitute a limitation on the communication device.
  • the actual communication device may include more or less components than shown in the figure, or some components may be combined, or Different component arrangements.
  • the technical effects of the communication device 1600 can be referred to the technical effects of the model training method described in the above method embodiments, which will not be described again here.
  • the processor in the embodiment of the present application can be a central processing unit (CPU).
  • the processor can also be other general-purpose processors, digital signal processors (DSP), special-purpose integrated processors, etc.
  • Circuit application specific integrated circuit, ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • non-volatile memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
  • non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically removable memory. Erase electrically programmable read-only memory (EPROM, EEPROM) or flash memory.
  • Volatile memory can be random access memory (RAM), which is used as an external cache.
  • RAM random access memory
  • static random access memory static random access memory
  • DRAM dynamic random access memory
  • RAM synchronous dynamic random access memory
  • SDRAM synchronous dynamic random access memory
  • double data rate SDRAM double data rate SDRAM
  • DDR SDRAM double data rate SDRAM
  • enhanced SDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory access memory
  • direct rambus RAM direct rambus RAM, DR RAM
  • the above embodiments may be implemented in whole or in part by software, hardware (such as circuits), firmware, or any other combination.
  • the above-described embodiments may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on the computer, the processes or functions described in the embodiments of the present application are generated in whole or in part.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmit to another website, computer, server or data center through wired (such as infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server or a data center that contains one or more sets of available media.
  • the available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media.
  • the semiconductor medium may be a solid state drive.
  • At least one refers to one or more, and “plurality” refers to two or more.
  • At least one of the following” or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items).
  • at least one of a, b, or c can mean: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple .
  • the size of the sequence numbers of the above-mentioned processes does not mean the order of execution.
  • the execution order of each process should be determined by its functions and internal logic, and should not be used in the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供一种模型训练方法及通信装置,能够兼顾数据安全和训练效率,可应用于通信系统中。该方法包括:管理节点根据M个第一节点中每个第一节点的资源注册信息,获取用于对待训练模型进行联邦学习的配置信息,并向第一节点发送第一指示信息。其中,M个第一节点为参与待训练模型的联邦学习的节点。资源注册信息包括第一节点的算力信息。配置信息包括M个第一节点中的用户节点和服务节点,用户节点与服务节点之间的连接关系,以及待训练模型在每个第一节点上的子模型信息。一个服务节点与至少一个用户节点连接,且不同的服务节点连接的用户节点不同。M为正整数。第一指示信息指示根据配置信息进行联邦学习。

Description

模型训练方法及通信装置 技术领域
本申请涉及通信领域,尤其涉及一种模型训练方法及通信装置。
背景技术
目前,可以基于联邦学习或模型分割进行模型训练。基于联邦学习的方案中,中心节点与多个边缘节点通信连接,每个边缘节点与至少一个分布节点连接。在此情况下,可以通过分布节点执行模型的完整算法以训练模型,并通过边缘节点对分布节点训练后的模型进行初步的模型权重聚合,并由中心节点进一步完成模型权重的整合。基于模型分割的方案中,可以将一个模型分割为多个子模型,然后将多个子模型分别部署在多个节点上,并进行训练,不同节点之间,传输训练样本处理后的中间层数据,或者对应的梯度。
然而,基于上述联邦学习的方案中,每个分布节点均需要执行模型的完整算法,在分布节点的计算能力与训练模型所需要的算力不匹配的情况下,模型的训练效率低下。此外,模型的训练过程中,仅有分布节点的局部数据参与模型训练,训练的精度低下。基于模型分割的方案中,神经网络模型的训练样本需要由确定的节点,如边缘节点输入,当训练样本来自于不同节点时,需要不同节点之间交互训练样本,难以确保数据安全。
综上可知,上述两种方案均难以兼顾训练效率和数据安全。
发明内容
本申请实施例提供一种模型训练方法及通信装置,能够兼顾数据安全和训练效率。
为达到上述目的,本申请采用如下技术方案:
第一方面,提供一种模型训练方法。该模型训练方法包括:管理节点根据M个第一节点中每个第一节点的资源注册信息,获取用于对待训练模型进行联邦学习的配置信息。其中,M个第一节点为参与待训练模型的联邦学习的节点。资源注册信息包括第一节点的算力信息。配置信息包括M个第一节点中的用户节点的标识和服务节点的标识,用户节点与服务节点之间的连接关系,以及待训练模型在每个第一节点上的子模型信息。一个服务节点与至少一个用户节点连接,且不同的服务节点连接的用户节点不同。M为正整数。管理节点根据配置信息,向第一节点发送第一指示信息。其中,第一指示信息指示根据配置信息实现待训练模型的联邦学习。
基于第一方面提供的模型训练方法,管理节点可以根据M个第一节点中每个节点的资源注册信息确定配置信息,并向M个第一节点中的第二节点发送第一指示信息,以指示根据配置信息进行联邦学习,例如,管理节点可以根据每个节点的算力确定配置信息。如此,可以使每个第一节点的算力与节点上部署的子模型的计算需求相匹配,从而能够提高联邦学习的效率,此外,各个用户节点的上的训练样本可以在处理后传输,从而可以避免在不同的节点之间传输原始数据,提高数据安全性。综上可知,第一方面所提供的模型训练方法可以兼顾数据安全和模型训练效率。
一种可能的设计方案中,管理节点根据M个第一节点中每个节点的资源注册信息, 获取用于对待训练模型进行联邦学习的配置信息,可以包括:管理节点向M个第一节点中的第三节点,发送M个第一节点的资源注册信息。其中,M个第一节点的资源注册信息用于指示获取配置信息。管理节点接收来自第三节点的配置信息。如此,管理节点可以通过第三节点辅助获取配置信息,以降低管理节点的复杂度。
可选地,第三节点可以为第一节点中,算力大于或等于第一算力阈值的节点。如此,可以选择算力更大的第三节点获取配置信息,从而进一步提高效率。
一种可能的设计方案中,第二节点可以包括服务节点,第一指示信息可以包括服务节点与用户节点之间的连接关系、服务节点的子模型信息,以及与服务节点连接的用户节点的子模型信息。如此,可以减少信令开销,从而提高通信效率。
一种可能的设计方案中,第二节点可以包括服务节点和用户节点。第一指示信息可以包括第二节点的子模型信息,以及M个第一节点中与第二节点连接的节点。
一种可能的设计方案中,资源注册信息还可以包括如下一项或多项:第一候选节点上数据的类型、或第一候选节点上数据的数量。在管理节点根据M个第一节点中每个第一节点的资源注册信息,获取用于对待训练模型进行联邦学习的配置信息之前,第一方面所提供的方法还可以包括:管理节点从P个第二候选节点中,确定M个第一节点。其中,第二候选节点为N个第一候选节点中,满足第一条件的节点。第一条件可以包括如下一项或多项:第一候选节点上存在与待训练模型的训练样本的数据类型相同的数据。第一候选节点上用于作为待训练模型的训练样本的数据的量大于或等于数据量阈值。其中,N、P均为正整数,且N≥P≥M。如此,可以选择出数据类型与待训练样本的数据类型匹配和/或训练样本的数据的量与算力匹配的第一节点,从而可以进一步提高模型训练效率。
可选地,管理节点从P个第二候选节点中,确定M个第一节点,可以包括:管理节点接收来自每个第二候选节点的第二指示信息。第二指示信息用于指示第二候选节点是否加入联邦学习过程。管理节点根据每个第二候选节点发送的第二指示信息,将加入联邦学习过程的第二候选节点确定为第一节点。如此,管理节点可以根据第二候选节点的第二指示信息确定第一节点,确保第一节点可以用于联邦学习,从而可以进一步提高联邦学习的可靠性。
进一步地,第一候选节点可以包括第三候选节点。其中,第三候选节点为在待训练模型开始联邦学习前,向管理节点发送资源注册信息的节点。第二候选节点可以包括第三候选节点中,满足第一条件的第四候选节点。
在此情况下,第一节点可以包括第四候选节点中加入联邦学习的节点。
示例性地,在管理节点从P个第二候选节点中,确定M个第一节点之前,第一方面提供的方法还可以包括:管理节点接收来自第四节点的联邦学习请求。管理节点向第四节点发送第三候选节点的资源注册信息。管理节点接收来自第四节点的第三指示信息;其中,第三指示信息用于指示第四候选节点。
进一步地,第一候选节点还可以包括第五候选节点。第五候选节点为在待训练模型的联邦学习过程中,向管理节点发送加入请求信息的节点。其中,加入请求信息用于请求加入联邦学习。第二候选节点还包括第五候选节点中,满足第一条件的第六候选节点。
在此情况下,第一节点还可以包括第六候选节点中加入联邦学习的节点。
第二方面,提供一种模型训练方法。该模型训练方法包括:第四节点接收来自管理节点的N1个第三候选节点中每个节点的资源注册信息。第四节点根据N1个第三候选节点中每个节点的资源注册信息确定第四候选节点。其中,第四候选节点为N1个第三候选节点中,存在与待训练模型的训练样本的数据类型相同的数据的节点。第四节点向管理节点发送第三指示信息。第三指示信息用于指示第四候选节点。
一种可能的设计方案中,在第四节点接收来自管理节点的N1个第三候选节点中每个节点的资源注册信息之前,第二方面所提供的方法还可以包括:第四节点向管理节点发送联邦学习请求。其中,联邦学习请求用于指示待训练模型的训练样本的数据类型和数据量阈值。
此外,第二方面所述的模型训练方法的技术效果可以参考第一方面所述的模型训练方法的技术效果,此处不再赘述。
第三方面,提供一种模型训练方法。该模型训练方法包括:第三节点接收来自管理节点的每个第一节点的资源注册信息。其中,第一节点为参与待训练模型的联邦学习的节点。第三节点根据每个第一节点的资源注册信息确定配置信息。第三节点向管理节点发送配置信息。
此外,第三方面所述的模型训练方法的技术效果可以参考第一方面所述的模型训练方法的技术效果,此处不再赘述。
第四方面,提供一种模型训练方法。该模型训练方法包括:第二节点接收来自管理节点的第一指示信息。其中,第二节点为M个第一节点中的一个节点,第一指示信息指示根据配置信息实现待训练模型的联邦学习,配置信息包括M个第一节点中的用户节点与服务节点之间的连接关系,以及待训练模型在每个第一节点上的子模型信息。一个服务节点与至少一个用户节点连接,且不同的服务节点连接的用户节点不同;M为正整数。第二节点根据第一指示信息实现待训练模型的联邦学习。
一种可能的设计方案中,第二节点包括服务节点和用户节点。第一指示信息包括第二节点的子模型信息,以及M个第一节点中与第二节点连接的节点。
一种可能的设计方案中,第二节点包括服务节点,第一指示信息包括服务节点与用户节点之间的连接关系、服务节点的子模型信息、以及与服务节点连接的用户节点的子模型信息。
可选地,第二节点根据第一指示信息实现待训练模型的联邦学习,包括:服务节点根据第一指示信息,向与服务节点连接的用户节点发送配置指示信息。其中,配置指示信息指示根据用户节点上的子模型信息进行联邦学习。
可选地,服务节点的输入数据包括第一数据和来自于服务节点的第二数据,第一数据为服务节点连接的用户节点输出的数据,第二数据与服务节点连接的所有用户节点的训练样本相关。
此外,第四方面所述的模型训练方法的技术效果可以参考第一方面所述的模型训练方法的技术效果,此处不再赘述。
第五方面,提供一种通信装置。该通信装置包括:处理模块和收发模块。处理模块,用于根据M个第一节点中每个第一节点的资源注册信息,获取用于对待训练模型 进行联邦学习的配置信息。其中,M个第一节点为参与待训练模型的联邦学习的节点。资源注册信息包括第一节点的算力信息。配置信息包括M个第一节点中的用户节点的标识和服务节点的标识,用户节点与服务节点之间的连接关系,以及待训练模型在每个第一节点上的子模型信息。一个服务节点与至少一个用户节点连接,且不同的服务节点连接的用户节点不同。M为正整数。收发模块,用于根据配置信息向第一节点发送第一指示信息。其中,第一指示信息指示根据配置信息实现待训练模型的联邦学习。
一种可能的设计方案中,收发模块,具体用于向M个第一节点中的第三节点,发送M个第一节点的资源注册信息。以及,接收来自第三节点的配置信息。其中,M个第一节点的资源注册信息。
可选地,第三节点为第一节点中,算力大于或等于第一算力阈值的节点。
一种可能的设计方案中,第二节点包括服务节点,第一指示信息包括服务节点与用户节点之间的连接关系、服务节点的子模型信息,以及与服务节点连接的用户节点的子模型信息。
一种可能的设计方案中,第二节点包括服务节点和用户节点。第一指示信息包括第二节点的子模型信息,以及M个第一节点中与第二节点连接的节点。
一种可能的设计方案中,资源注册信息还包括如下一项或多项:第一候选节点上数据的类型、或第一候选节点上数据的数量。处理模块,还用于从P个第二候选节点中,确定M个第一节点。其中,第二候选节点为N个第一候选节点中,满足第一条件的节点。第一条件包括如下一项或多项:第一候选节点上存在与待训练模型的训练样本的数据类型相同的数据。第一候选节点上用于作为待训练模型的训练样本的数据的量大于或等于数据量阈值。其中,N、P均为正整数,且N≥P≥M。
可选地,处理模块,具体用于通过收发模块接收来自每个第二候选节点的第二指示信息。第二指示信息用于指示第二候选节点是否加入联邦学习过程。以及,根据每个第二候选节点发送的第二指示信息,将加入联邦学习过程的第二候选节点确定为第一节点。
进一步地,第一候选节点可以包括第三候选节点。其中,第三候选节点为在待训练模型开始联邦学习前,向管理节点发送资源注册信息的节点。第二候选节点可以包括第三候选节点中,满足第一条件的第四候选节点。
在此情况下,第一节点可以包括第四候选节点中加入联邦学习的节点。
示例性地,收发模块,还用于接收来自第四节点的联邦学习请求,并向第四节点发送第三候选节点的资源注册信息。收发模块,还用于接收来自第四节点的第三指示信息。其中,第三指示信息用于指示第四候选节点。
进一步地,第一候选节点还可以包括第五候选节点。第五候选节点为在待训练模型的联邦学习过程中,向管理节点发送加入请求信息的节点。其中,加入请求信息用于请求加入联邦学习。第二候选节点还包括第五候选节点中,满足第一条件的第六候选节点。
在此情况下,第一节点还可以包括第六候选节点中加入联邦学习的节点。
可选地,收发模块可以包括接收模块和发送模块。其中,收发模块用于实现第五方面所述的通信装置的发送功能和接收功能。
可选地,第五方面所述的通信装置还可以包括存储模块,该存储模块存储有程序或指令。当处理模块执行该程序或指令时,使得该通信装置可以执行第一方面所述的模型训练方法。
需要说明的是,第五方面所述的通信装置可以是网络设备,也可以是可设置于网络设备中的芯片(系统)或其他部件或组件,还可以是包含网络设备的装置,本申请对此不做限定。
此外,第五方面所述的通信装置的技术效果可以参考第一方面所述的模型训练方法的技术效果,此处不再赘述。
第六方面,提供一种通信装置。该同学装置包括:处理模块和收发模块。收发模块,用于接收来自管理节点的N1个第三候选节点中每个节点的资源注册信息。处理模块,用于根据N1个第三候选节点中每个节点的资源注册信息确定第四候选节点。其中,第四候选节点为N1个第三候选节点中,存在与待训练模型的训练样本的数据类型相同的数据的节点。向管理节点发送第三指示信息。第三指示信息用于指示第四候选节点。
一种可能的设计方案中,收发模块,还用于第四节点向管理节点发送联邦学习请求。其中,联邦学习请求用于指示待训练模型的训练样本的数据类型和数据量阈值。
可选地,收发模块可以包括接收模块和发送模块。其中,收发模块用于实现第六方面所述的通信装置的发送功能和接收功能。
可选地,第六方面所述的通信装置还可以包括存储模块,该存储模块存储有程序或指令。当处理模块执行该程序或指令时,使得该通信装置可以执行第二方面所述的模型训练方法。
需要说明的是,第六方面所述的通信装置可以是终端设备或网络设备,也可以是可设置于终端设备或网络设备中的芯片(系统)或其他部件或组件,还可以是包含终端设备或网络设备的装置,本申请对此不做限定。
此外,第六方面所述的通信装置的技术效果可以参考第二方面所述的模型训练方法的技术效果,此处不再赘述。
第七方面,提供一种通信装置。该通信装置包括:处理模块和收发模块。收发模块,用于接收来自管理节点的每个第一节点的资源注册信息。其中,第一节点为参与待训练模型的联邦学习的节点。处理模块,用于根据每个第一节点的资源注册信息确定配置信息。收发模块,还用于向管理节点发送配置信息。
可选地,收发模块可以包括接收模块和发送模块。其中,收发模块用于实现第七方面所述的通信装置的发送功能和接收功能。
可选地,第七方面所述的通信装置还可以包括存储模块,该存储模块存储有程序或指令。当处理模块执行该程序或指令时,使得该通信装置可以执行第三方面所述的模型训练方法。
需要说明的是,第七方面所述的通信装置可以是网络设备,也可以是可设置于网络设备中的芯片(系统)或其他部件或组件,还可以是包含网络设备的装置,本申请对此不做限定。
此外,第七方面所述的通信装置的技术效果可以参考第三方面所述的模型训练方 法的技术效果,此处不再赘述。
第八方面,提供一种通信装置。该通信装置包括:收发模块,用于接收来自管理节点的第一指示信息。第一指示信息指示根据配置信息实现待训练模型的联邦学习,配置信息包括M个第一节点中的用户节点与服务节点之间的连接关系,以及待训练模型在每个第一节点上的子模型信息。一个服务节点与至少一个用户节点连接,且不同的服务节点连接的用户节点不同;M为正整数。处理模块,根据第一指示信息实现待训练模型的联邦学习。
一种可能的设计方案中,通信装置包括服务节点和用户节点;第一指示信息包括通信装置的子模型信息,以及M个第一节点中与通信装置连接的节点。
一种可能的设计方案中,通信装置包括服务节点,第一指示信息包括服务节点与用户节点之间的连接关系、服务节点的子模型信息、以及与通信装置连接的用户节点的子模型信息。
可选地,处理模块,具体用于根据第一指示信息,向与服务节点连接的用户节点发送配置指示信息。其中,配置指示信息指示根据用户节点上的子模型信息进行联邦学习。
一种可能的设计方案中,通信装置的输入数据包括与第一数据和来自于通信装置的第二数据,第一数据为所述服务节点连接的所述用户节点输出的数据,第二数据与通信装置连接的所有用户节点的训练样本相关。
可选地,收发模块可以包括接收模块和发送模块。其中,收发模块用于实现第八方面所述的通信装置的发送功能和接收功能。
可选地,第八方面所述的通信装置还可以包括存储模块,该存储模块存储有程序或指令。当处理模块执行该程序或指令时,使得该通信装置可以执行第四方面所述的模型训练方法。
需要说明的是,第八方面所述的通信装置可以是终端设备或网络设备,也可以是可设置于终端设备或网络设备中的芯片(系统)或其他部件或组件,还可以是包含终端设备或网络设备的装置,本申请对此不做限定。
此外,第八方面所述的通信装置的技术效果可以参考第四方面所述的模型训练方法的技术效果,此处不再赘述。
第九方面,提供一种通信装置。该通信装置用于执行第一方面至第四方面中任意一种实现方式所述的模型训练方法。
在本申请中,第九方面所述的通信装置可以为第二方面、或第三方面中任一方面所述的终端设备或第一方面至第四方面中任一方面所述的网络设备,或者可设置于该终端设备或网络设备中的芯片(系统)或其他部件或组件,或者包含该终端设备或网络设备的装置。
应理解,第九方面所述的通信装置包括实现上述第一方面至第四方面中任一方面所述的模型训练方法相应的模块、单元、或手段(means),该模块、单元、或手段可以通过硬件实现,软件实现,或者通过硬件执行相应的软件实现。该硬件或软件包括一个或多个用于执行上述模型训练方法所涉及的功能的模块或单元。
第十方面,提供一种通信装置。该通信装置包括:处理器,该处理器用于执行第 一方面至第四方面中任意一种可能的实现方式所述的模型训练方法。
在一种可能的设计方案中,第十方面所述的通信装置还可以包括收发器。该收发器可以为收发电路或接口电路。该收发器可以用于第十方面所述的通信装置与其他通信装置通信。
在一种可能的设计方案中,第十方面所述的通信装置还可以包括存储器。该存储器可以与处理器集成在一起,也可以分开设置。该存储器可以用于存储第一方面至第四方面中任一方面所述的模型训练方法所涉及的计算机程序和/或数据。
在本申请中,第十方面所述的通信装置可以为第二方面、或第三方面中任一方面所述的终端设备或第一方面至第四方面中任一方面所述的网络设备,或者可设置于该终端设备或网络设备中的芯片(系统)或其他部件或组件,或者包含该终端设备或网络设备的装置。
第十一方面,提供一种通信装置。该通信装置包括:处理器,该处理器与存储器耦合,该处理器用于执行存储器中存储的计算机程序,以使得该通信装置执行第一方面至第四方面中任意一种可能的实现方式所述的模型训练方法。
在一种可能的设计方案中,第十一方面所述的通信装置还可以包括收发器。该收发器可以为收发电路或接口电路。该收发器可以用于第十一方面所述的通信装置与其他通信装置通信。
在本申请中,第十一方面所述的通信装置可以为第二方面、或第三方面中任一方面所述的终端设备或第一方面至第四方面中任一方面所述的网络设备,或者可设置于该终端设备或网络设备中的芯片(系统)或其他部件或组件,或者包含该终端设备或网络设备的装置。
第十二方面,提供了一种通信装置,包括:处理器和存储器;该存储器用于存储计算机程序,当该处理器执行该计算机程序时,以使该通信装置执行第一方面至第四方面中的任意一种实现方式所述的模型训练方法。
在一种可能的设计方案中,第十二方面所述的通信装置还可以包括收发器。该收发器可以为收发电路或接口电路。该收发器可以用于第十二方面所述的通信装置与其他通信装置通信。
在本申请中,第十二方面所述的通信装置可以为第二方面、或第三方面中任一方面所述的终端设备或第一方面至第四方面中任一方面所述的网络设备,或者可设置于该终端设备或网络设备中的芯片(系统)或其他部件或组件,或者包含该终端设备或网络设备的装置。
第十三方面,提供了一种通信装置,包括:处理器;所述处理器用于与存储器耦合,并读取存储器中的计算机程序之后,根据该计算机程序执行如第一方面至第四方面中的任意一种实现方式所述的模型训练方法。
在一种可能的设计方案中,第十三方面所述的通信装置还可以包括收发器。该收发器可以为收发电路或接口电路。该收发器可以用于第八方面所述的通信装置与其他通信装置通信。
在本申请中,第十三方面所述的通信装置可以为第二方面、或第三方面中任一方面所述的终端设备或第一方面至第四方面中任一方面所述的网络设备,或者可设置于 该终端设备或网络设备中的芯片(系统)或其他部件或组件,或者包含该终端设备或网络设备的装置。
此外,上述第九方面至第十三方面所述的通信装置的技术效果,可以参考上述第一方面至第四方面所述的模型训练方法的技术效果,此处不再赘述。
第十四方面,提供一种处理器。其中,处理器用于执行第一方面至第四方面中任意一种可能的实现方式所述的模型训练方法。
第十五方面,提供一种通信系统。该通信系统包括一个或多个终端设备,以及一个或多个网络设备。
第十六方面,提供一种计算机可读存储介质,包括:计算机程序或指令;当该计算机程序或指令在计算机上运行时,使得该计算机执行第一方面至第四方面中任意一种可能的实现方式所述的模型训练方法。
第十七方面,提供一种计算机程序产品,包括计算机程序或指令,当该计算机程序或指令在计算机上运行时,使得该计算机执行第一方面至第四方面中任意一种可能的实现方式所述的模型训练方法。
附图说明
图1为经典联邦学习的架构示意图;
图2为端边云系统中联邦学习的架构示意图;
图3为模型分割训练的网络分布示意图;
图4为本申请实施例提供的通信系统的架构示意图;
图5为本申请实施例提供的模型训练方法的流程示意图一;
图6为本申请实施例提供的配置信息的确定流程示意图;
图7为本申请实施例中联邦学习过程的流程示意图一;
图8为本申请实施例中联邦学习过程的流程示意图二;
图9为本申请实施例中第一节点的确定流程示意图一;
图10为本申请实施例中第一节点的确定流程示意图二;
图11为本申请实施例中第一节点的确定流程示意图三;
图12为本申请实施例提供的模型训练方法的流程示意图二;
图13为本申请实施例提供第一节点上神经网络层的分布示意图;
图14为不同模型训练方案得到的模型的训练次数与预测精度之间的关系示意图;
图15为本申请实施例提供的通信装置的架构示意图一;
图16为本申请实施例提供的通信装置的架构示意图二。
具体实施方式
经典联邦学习,可以通过分布节点,如网络设备或终端设备联合训练机器学习模型,如神经网络模型,这一训练方式中,各个分布节点可以在自身收集的数据的基础上进行模型训练,避免集中收集数据,从而可以突破不同分布节点的数据限制,提升机器学习模型,如神经网络模型的训练精度。图1是经典联邦学习的系统架构示意图。如图1所示,用于经典联邦学习的系统架构可以包括中心节点101和多个分布节点(分布节点102a至分布节点102c)。分布节点102a至分布节点102c均与中心节点101通信连接,分布节点102a至分布节点102c各自属于不同的机构或公司。分布节点102a 至分布节点102c中的每个分布节点均包括关于该分布节点的应用环境的分布数据集。由于各个分布节点隶属于不同的机构或公司,若分布节点中的分布数据集涉及到各个机构或公司的内部数据,则集中共享数据的模型训练方法难以部署。基于此背景,经典联邦学习应运而生。以下结合图1所示的通信系统说明经典联邦学习的原理。
假设联邦学习模型的模型架构已经确定,则中心节点101可以向分布节点102a至分布节点102c分别发送该模型架构下的待训练模型。在此情况下,分布节点102a至分布节点102c中每个分布节点上的待训练模型均相同。分布节点102a至分布节点102c接收到待训练模型后,根据自身的分布数据集执行待训练模型的完整算法,以实现待训练模型的训练。每个分布节点完成待训练模型的训练后,得到训练后的模型权重。各个分布节点分别向中心节点101发送训练后的模型权重。中心节点101接收到各个分布节点的训练后的模型权重后,对所有分布节点训练后的模型权重进行联邦聚合,从而得到联邦聚合的模型权重。可理解,该训练过程可以重复多次,每次重复训练时,待训练模型的权重为最近一次联邦聚合后的模型权重。也就是说,每次训练过程都将最新的模型作为待训练模型。其中,中心节点101可以是服务器,分布节点可以是终端设备。
经典联邦学习中,仅有中心节点进行联邦聚合,若分布节点的规模大,且中心节点的带宽或者硬件资源受限,则会导致联邦学习的时延大。为了降低联邦学习的时延,在一些可能的实施例中,可以基于端边云系统架构进行分层联邦学习,也可以称为端边云分层联邦。
以下结合具体的端边云系统架构举例说明端边云分层联邦的原理。
图2为端边云系统的架构示意图。如图2所示,端边云系统架构中,中心节点201(云端)与边缘节点202a至边缘节点202b(边缘端,也可以称为服务节点,或者边缘服务节点)通信连接,其中,边缘节点202a与分布节点203a至分布节点203c分别通信连接,边缘节点202b与分布节点203d至203f分别通信连接。在此情况下,中心节点201可以分别向边缘节点202a和边缘节点202b发送待训练模型。边缘节点202a接收到待训练模型后,分别向分布节点203a至分布节点203c发送待训练模型,分布节点203a至分布节点203c接收到待训练模型后,均根据自身的分布数据集执行待训练模型的完整算法以训练该待训练模型,从而得到训练后的模型权重。分布节点203a至分布节点203c得到各自的模型权重后,将各自的模型权重上传至边缘节点202a,边缘节点202a对分布节点203a至分布节点203c的模型权重进行联邦聚合,得到一个初步聚合结果。边缘节点202b接收到待训练模型后,分别向分布节点203d至分布节点203f发送待训练模型,分布节点203d至分布节点203f接收到待训练模型后,均根据自身的分布数据集对待训练模型进行训练,从而得到训练后的模型权重。分布节点203d至分布节点203f得到各自的模型权重后,将各自的模型权重上传至边缘节点202b,边缘节点202b对分布节点203d至分布节点203f的模型权重进行联邦聚合,得到一个初步聚合结果。边缘节点202a和边缘节点202b分别将各自的初步聚合结果发送至中心节点201,中心节点201对边缘节点202a的聚合结果和边缘节点202b初步聚合结果再次进行联邦聚合,从而得到再次聚合后的模型权重。
在下一次模型训练过程中,中心节点则可以将再次聚合后的模型权重对应的模型 作为待训练模型进行模型训练,此时,模型训练原理与首次模型训练的原理类似,此处不再赘述。可理解,该训练过程可以重复多次,每次重复训练时,待训练模型的权重为最近一次中心节点进行联邦聚合后的模型权重。也就是说,每次训练过程都将最新的模型作为待训练模型。其中,中心节点201可以是服务器,边缘节点202a或边缘节点202b可以是服务器,分布节点203a至分布节点203f可以是终端设备。
然而,基于端边云系统架构进行分层联邦学习的方案中,每个分布节点均需要执行待训练模型的完整算法,在分布节点的计算能力与训练待训练模型所需要的算力不匹配的情况下,模型的训练效率低下。
一些实施例中,可以基于模型分割进行模型训练。示例性地,可以将一个模型分割为多个子模型,然后将多个子模型分别部署在多个节点上,并在多个节点上进行模型训练。以下结合图3所示通信系统和神经网络模型说明。如图3所示,通信系统中包括中心节点301和分布节点302,对于如图3所示的神经网络模型,可以从图中虚线L处进行分割,从而得到分割后的神经网络层一和神经网络层二。其中,位于虚线L左侧的为神经网络层一,神经网络层一可以部署在分布节点302上。位于虚线右侧的为神经网络层二,神经网络层二可以部署在中心节点301上。在具体训练过程中,分布节点302可以将训练样本输入神经网络层一,得到神经网络模型的中间层输出数据,并将中间层输出数据传输至中心节点,中心节点301接收到中间层输出数据后通过神经网络层二进行处理,得到数据处理结果。接着,中心节点301通过神经网络层二获取数据处理结果的反向梯度,进行梯度反向传播,并根据各层的梯度调整对应的模型权重,得到中间层梯度。接着,中心节点301向分布节点302发送中间层梯度,分布节点302接收到中间层梯度后,继续进行梯度反向传播,并调整神经网络层一上的模型权重。基于上述过程,即可完成模型的一次训练过程。
然而,基于模型分割的方案中,待训练模型,如神经网络模型的训练样本需要由确定的节点,如图3中的分布节点302输入,当训练样本来自于不同分布节点时,需要不同分布节点之间交互训练样本,难以确保数据安全。
综上可知,上述两种方案均难以兼顾数据安全和训练效率。
为了解决该问题,本申请实施例提供了一种模型训练方法,该模型训练方法中,管理节点可以基于参与待训练模型的联邦学习的第一节点的资源注册信息,确定用于联邦学习的配置信息,并发送第一指示信息以指示根据配置信息实现联邦学习。其中,资源注册信息与节点的算力相关,如此,在第一节点中的用户节点的算力较小的情况下,可以通过与该用户节点连接的服务节点分担该用户节点的部分模型训练工作,使各个第一节点的算力与第一节点上部署的子模型的计算量相匹配,从而提高模型训练效率。此外,本申请实施例提供的方案中,用户节点与服务节点之间,传输的数据为子模型的输出结果,即待训练模型的中间层的数据或者梯度,如此,便可以避免直接在不同的节点之间传输训练样本,从而能够提高安全性。也就是说,本申请实施例提供的方案能够兼顾训练效率和数据安全。
下面将结合附图,对本申请中的技术方案进行描述。
本申请实施例的技术方案可以应用于各种通信系统,例如无线保真(wireless fidelity,WiFi)系统,车到任意物体(vehicle to everything,V2X)通信系统、设备 间(device-todevie,D2D)通信系统、车联网通信系统、第4代(4th generation,4G)移动通信系统,如长期演进(long term evolution,LTE)系统、全球互联微波接入(worldwide interoperability for microwave access,WiMAX)通信系统、第五代(5th generation,5G)移动通信系统,如新空口(new radio,NR)系统,以及未来的通信系统,如第六代(6th generation,6G)移动通信系统等。
本申请将围绕可包括多个设备、组件、模块等的系统来呈现各个方面、实施例或特征。应当理解和明白的是,各个系统可以包括另外的设备、组件、模块等,并且/或者可以并不包括结合附图讨论的所有设备、组件、模块等。此外,还可以使用这些方案的组合。
另外,在本申请实施例中,“示例地”、“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用示例的一词旨在以具体方式呈现概念。
本申请实施例中,“信息(information)”,“信号(signal)”,“消息(message)”,“信道(channel)”、“信令(singaling)”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。“的(of)”,“相应的(corresponding,relevant)”和“对应的(corresponding)”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。
本申请实施例中,有时候下标如W1可能会笔误为非下标的形式如W1,在不强调其区别时,其所要表达的含义是一致的。本申请实施例描述的网络架构以及业务场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
为便于理解本申请实施例,首先以图4中示出的通信系统为例详细说明适用于本申请实施例的通信系统。示例性地,图4为本申请实施例提供的模型训练方法所适用的一种通信系统的架构示意图。
如图4所示,该通信系统包括管理节点401和多个第一候选节点,如第一候选节点402a至第一候选节点402c,以及第一候选节点403a至第一候选节点403h。其中,每个第一候选节点均可以与管理节点401之间通信。
管理节点可以用于从第一候选节点中筛选出用于模型训练的M个第一节点,并确定所有第一节点用于进行待训练模型的联邦学习的配置信息。其中,配置信息可以包括M个第一节点中的服务节点(如第一候选节点402a、第一候选节点402b)的标识和用户节点(如,第一候选节点403a至第一候选节点403d)的标识,第一节点之间的连接关系和各个第一节点上的子模型信息,进而向第一节点发送第一指示信息,以指示根据配置信息实现待训练模型的联邦学习。
需要说明,上述管理节点可以是网络设备,如服务器,或者其他具有数据处理功能和通信功能的设备。上述管理节点可以通过云端的方式实现或者主服务器(leader服务器)的方式实现。
上述用户节点可以是终端设备或者网络节点,服务节点可以是网络设备,在一些可能的场景中,如端边云场景中,服务节点也可以称为边缘节点。
其中,上述网络设备为位于上述通信系统的网络侧,且具有无线收发功能的设备或可设置于该设备的芯片或芯片系统。该网络设备包括但不限于:无线保真(wireless fidelity,WiFi)系统中的接入点(access point,AP),如家庭网关、路由器、服务器、交换机、网桥等,演进型节点B(evolved Node B,eNB)、无线网络控制器(radio network controller,RNC)、节点B(Node B,NB)、基站控制器(base station controller,BSC)、基站收发台(base transceiver station,BTS)、家庭基站(例如,home evolved NodeB,或home Node B,HNB)、基带单元(baseband unit,BBU),无线中继节点、无线回传节点、传输点(transmission and reception point,TRP或者transmission point,TP)等,还可以为5G,如,新空口(new radio,NR)系统中的gNB,或,传输点(TRP或TP),5G系统中的基站的一个或一组(包括多个天线面板)天线面板,或者,还可以为构成gNB或传输点的网络节点,如基带单元(BBU),或,分布式单元(distributed unit,DU)、具有基站功能的路边单元(road side unit,RSU)等。
上述终端设备为接入上述通信系统,且具有无线收发功能的终端或可设置于该终端的芯片或芯片系统。该终端设备也可以称为接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。本申请的实施例中的终端设备可以是手机(mobile phone)、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、车载终端、具有终端功能的RSU等。本申请的终端设备还可以是作为一个或多个部件或者单元而内置于车辆的车载模块、车载模组、车载部件、车载芯片或者车载单元,车辆通过内置的所述车载模块、车载模组、车载部件、车载芯片或者车载单元可以实施本申请提供的模型训练方法。
需要说明的是,本申请实施例提供的模型训练方法,可以适用于图4所示的任意管理节点、服务节点和用户节点之间,具体实现可以参考下述方法实施例,此处不再赘述。
应当指出的是,本申请实施例中的方案还可以应用于其他通信系统中,相应的名称也可以用其他通信系统中的对应功能的名称进行替代。
应理解,图4仅为便于理解而示例的简化示意图,该通信系统中还可以包括其他网络设备,和/或,其他终端设备,图4中未予以画出。
下面将结合图5-图13对本申请实施例提供的模型训练方法进行具体阐述。
示例性地,图5为本申请实施例提供的模型训练方法的流程示意图一。该模型训练方法可以适用于图4所示的管理节点与第一候选节点之间的通信。
如图5所示,该模型训练方法包括如下步骤:
S501,管理节点根据M个第一节点中每个第一节点的资源注册信息,获取用于对待训练模型进行联邦学习的配置信息。
其中,M个第一节点为参与待训练模型的联邦学习的节点。第一节点的资源注册 信息包括第一节点的算力信息。
其中,资源注册信息来自于各个第一节点。
其中,配置信息包括M个第一节点中的用户节点的标识和服务节点的标识,不同第一节点之间的连接关系,比如在第一节点包括用户节点的标识和服务节点的标识的情况下,不同节点之间的连接关系可以包括用户节点与服务节点之间的连接关系,以及配置信息还包括待训练模型在每个第一节点上的子模型信息。一个服务节点与至少一个用户节点连接,且不同的服务节点连接的用户节点不同。M为正整数。
需要说明的是,本申请所述的待训练模型可以是机器学习模型,如神经网络模型、随机森林、决策树、逻辑回归模型等。本申请所述的子模型可以是上述机器学习模型的部分算法,以神经网络模型为例,子模型信息可以为神经网络层信息,其中,神经网络层信息可以包括神经网络层的层数,以及各层神经网络层的结构。
一种可能的设计方案中,由管理节点自身确定配置信息,如管理节点可以根据M个第一节点中每个第一节点的资源注册信息,自行获取用于对待训练模型进行联邦学习的配置信息。
示例性地,管理节点可以根据M个第一节点中每个节点的资源注册信息和待训练模型的模型信息,确定配置信息。待训练模型的模型信息可以包括如下一项或多项:模型的结构、模型的参数。示例性地,管理节点可以根据各个用户节点和各个服务节点各自的算力信息和待训练模型的模型信息,确定配置信息。例如,在算力更强的第一节点上分配更多模型层数的子模型,在算力更弱的第一节点上分配更少模型层数的子模型。具体实施时,可以以均衡待处理模型的算法完整执行情况下的时延为准。
其中,算力信息可以包括如下一项或多项:处理器频率、处理器数目、处理器占用率、或能耗参数。算力强弱可以根据如下一项或多项确定:处理器频率、处理器数目、处理器占用率、或能耗参数。
为便于理解,以下以算力信息包括处理器数目为例说明本申请实施例中如何确定配置信息。
假设节点算力的强弱与节点上处理器数目相关,节点上处理器数目越多,节点的算力越强,节点上处理器数目越少,节点的算力越弱,执行相同运算量时,处理器越多则时延越短,处理器越少则时延越长。
若待训练模型共三个模型层,每个模型层需要1个处理器,M个第一节点中,包括1个处理器的第一节点有3个(第一节点A至第一节点C)、包括2个处理器的节点有3个(第一节点D至第一节点F),则可以将第一节点A和第一节点D确定为服务节点,第一节点B、第一节点C、第一节点E和第一节点F确定为用户节点。第一节点A与第一节点E、第一节点F分别连接第一节点D与第一节点B、第一节点C分别连接。第一节点B和第一节点C上均可以部署待训练模型中的第一层,第一节点D可以部署待训练模型中的第二层和第三层。
可理解,在算力信息包括处理器数目的情况下,配置信息还可以包括各个第一节点上用于联邦学习的处理器。和/或,配置信息还可以包括第一节点的能耗。
一种可能的设计方案中,由第一节点中的节点确定配置信息,并反馈给管理节点,即管理节点从第一节点中获取配置信息。具体的,该设计方案如图6所示,上述S501, 管理节点根据M个第一节点中每个节点的资源注册信息,获取用于对待训练模型进行联邦学习的配置信息,可以包括:
S501-1,管理节点确定第三节点。
可选地,第三节点可以为第一节点中,算力大于或等于第一算力阈值的节点。
以算力信息包括处理器数目为例,第一算力阈值可以为处理器数目阈值。在此情况下,算力大于或等于第一算力阈值可以是处理器数目大于或等于处理器阈值,如2个处理器。
以算力信息包括处理器占用率为例,算力大于等于第一算力阈值,可以是处理器占用率小于或等于占用率阈值。在此情况下,算力大于或等于第一算力阈值可以是处理器占用率小于或等于占用率阈值,如40%。
可理解,可以结合第一节点上可调用处理数目和有效处理器频率确定第一节点的算力。算力可以是可调用处理器数目与有效处理器频率之积。有效处理器频率为主频乘以可分配给第一任务的处理器占用率比例。其中,第一任务为确定配置信息。
在此情况下,上述S501-1可以包括,管理节点将算力大于或等于第一算力阈值的任意一个节点确定为第三节点。
如此,可以从第一节点中选择算力更大的节点用于确定配置信息,以提高模型迭代速度,从而进一步提高模型训练的效率。
或者,可选地,第三节点可以为第一节点中,算力最大的节点。也就是说,管理节点可以将第一节点中算力最大的节点确定为第三节点。如此,可以选择算力最大的第三节点获取配置信息,从而进一步提高效率。
或者,可选地,第三节点可以为可以用于确定配置信息的第一节点中,算力最大的第一节点。在此情况下,上述S501-1可以包括步骤1至步骤4。
步骤1,管理节点向当前节点发送资源优化请求。
其中,当前节点为第一节点中未接收过资源优化信息,且算力最大的节点。资源优化请求指示执行第一任务,其中,第一任务为确定配置信息。资源优化请求中可以包括执行第一任务的算力信息。
步骤2,当前节点向管理节点发送反馈信息。
其中,反馈信息用于指示接收到资源优化请求的节点是否执行第一任务。
示例性地,当前节点可以根据当前节点的算力信息确定是否执行第一任务。例如,算力信息包括处理器占用率的情况下,若当前节点的处理器占用率大于或等于30%,则反馈信息指示当前节点不执行第一任务,若当前节点的处理器占用率小于30%,则反馈信息指示当前节点执行第一任务。
可理解,本申请实施例中,反馈信息还可以根据当前节点的能耗等确定,具体原理可以参考根据当前节点的算力信息确定反馈信息的相关介绍,此处不再赘述。
步骤3,若反馈信息指示资源优化节点执行第一任务,则管理节点将接收到资源优化请求的当前节点确定为第三节点。
步骤4,若反馈信息指示接收到资源优化请求的节点不执行第一任务,则重复执行步骤1-步骤4,直至确定出第三节点。
S501-2,管理节点向第三节点,发送M个第一节点中每个第一节点的资源注册信 息。第三节点接收来自管理节点的每个第一节点的资源注册信息。
其中,M个第一节点的资源注册信息可以承载于物理下行控制信道(physical downlink control channel,PDCCH),或者物理下行共享信道(physical downlink shared channel,PDSCH)中。
S501-3,第三节点根据M个第一节点的资源注册信息确定配置信息。
关于S501-3的实现原理,可以参考管理节点自行确定配置信息的原理,此处不再赘述。
S501-4,第三节点向管理节点发送配置信息。
也就是说,管理节点通过第三节点辅助获取配置信息。
其中,第三节点向管理节点发送的配置信息可以承载于物理上行控制信道(physical uplink control channel,PUCCH),或物理上行共享信道(physical uplink shared channel,PUSCH)上行控制信息(uplink control information,UCI)中。
如此,管理节点可以通过第三节点辅助获取配置信息,以降低管理节点的复杂度。
可理解,在资源注册信息包括带宽的情况下,管理节点还可以结合各个用户节点和各个服务节点各自的算力信息和带宽信息一起,确定配置信息。
为便于理解,以下以算力信息包括处理器数目为例说明本申请实施例中如何确定配置信息。
假设节点算力的强弱与节点上处理器数目相关,节点上处理器数目越多,节点的算力越强,节点上处理器数目越少,节点的算力越弱,执行相同运算量时,处理器越多则时延越短,处理器越少则时延越长。传输相同数据量的数据时,带宽越宽传输时延越短,带宽越窄传输时延越长。
若待训练模型共三个模型层,每个模型层的输入数据和输出数据的数据量均相同,若节点处理数据的时延与处理器的数量正相关,一个处理器处理一个模型层的时延为1微秒(microsecond,us),2个处理器处理一个模型层的时延为0.5us,M个第一节点中,包括1个处理器的第一节点有3个(第一节点A至第一节点C)、包括2个处理器的节点有3个(第一节点D至第一节点F),根据第一节点A确定的传输时延为0.5us,根据第一节点D的带宽确定的传输时延为0.5us,则可以将第一节点A和第一节点D确定为服务节点,第一节点B、第一节点C、第一节点E和第一节点F确定为用户节点。第一节点A与第一节点E、第一节点F分别连接第一节点D与第一节点B、第一节点C分别连接。第一节点E和第一节点F上,均可以部署待训练模型中的第一层和第二层,第一节点A上可以部署待训练模型的第三层。第一节点B和第一节点C上均可以部署待训练模型中的第一层,第一节点D上可以部署待训练模型中的第二层和第三层。
S502,管理节点根据配置信息,向第二节点发送第一指示信息。
其中,第一指示信息指示根据配置信息实现待训练模型的联邦学习。
管理节点向第二节点发送的第一指示信息可以承载于PDCCH或者PDSCH中。
一种可能的设计方案中,第二节点包括服务节点。相应地,第一指示信息包括第二节点与用户节点之间的连接关系、服务节点的子模型信息、以及与服务节点连接的用户节点的子模型信息。在此情况下,可以由第二节点向用户节点转发配置信息中与 用户节点相关的信息。需要说明的是,在第二节点包括多个服务节点的情况下,S502可以包括:管理节点向每个第二节点发送第一指示信息,一个第二节点对应一个第一指示信息,该第一指示信息用于指示该第二节点与用户节点之间的连接关系、该第二节点的子模型、以及与该第二节点连接的用户节点的子模型。
可理解,管理节点可以通过广播的方式发送第一指示信息。在此情况下,S502,管理节点根据配置信息,向第二节点发送第一指示信息,包括:管理节点根据配置信息,向第二节点广播第一指示信息。
示例性地,子模型信息可以是待训练模型分割后的子模型在第二节点上的分布状态信息。也就是第二节点上是否分布待训练模型分割后的子模型。。
如此,可以减少信令开销,从而提高通信效率。
一种可能的设计方案中,第二节点包括服务节点和用户节点。可选地,第一指示信息包括各个第二节点的子模型信息,以及M个第一节点中与所述第二节点连接的节点。在此情况下,S502,管理节点根据配置信息,向第二节点发送第一指示信息,包括:管理节点根据配置信息,向各个服务节点分别发送各自的第一指示信息,以及管理节点分别向各个用户节点发送各自的第一指示信息。
上述可能的设计方案中,管理节点根据配置信息,从配置信息中获取连接关系和/或子模型发送给相应的第二节点,可选地,在本申请中,管理节点还可以根据配置信息,直接将配置信息携带在第一指示信息发送给第二节点,不予限制。
S503,第二节点根据第一指示信息实现待训练模型的联邦学习。
以下结合具体的场景说明上述S503。如图7所示,在第二节点包括服务节点的情况下,S503,第二节点根据第一指示信息实现待训练模型的联邦学习,可以包括:
S503-1,服务节点根据第一指示信息,向与服务节点连接的用户节点发送配置指示信息。
其中,配置指示信息用于指示根据用户节点上的子模型信息进行联邦学习,配置指示信息包括与服务节点连接的用户节点的子模型信息。
S503-2,各个用户节点根据各自的子模型信息进行联邦学习。
配置指示信息还可以包括服务节点的子模型信息,在此情况下,服务节点上包括子模型,服务节点也可以根据各自的子模型进行联邦学习。
此外,在S502之后、S503-1之前,还可以包括S503-3至S503-6:
S503-3,服务节点向管理节点发送地址请求信息。其中,地址请求信息用于获取与服务节点连接的用户节点的通信地址信息,如网络协议(internet protocol,IP)地址。
S503-4,管理节点向服务节点发送地址反馈信息。其中,地址反馈信息用于指示与服务节点连接的用户节点的通信地址。
S503-5,服务节点与该服务节点连接的用户节点发送连接建立请求。
S503-6,接收到连接建立请求的用户节点,向发送连接请求的服务节点发送连接反馈信息。其中,连接反馈信息用于指示建立连接成功。
此外,若服务节点的子模型信息指示该服务节点的子模型,则该服务节点还可以保存该子模型。
在第二节点包括服务节点和用户节点的情况下,S503可以包括,各个第二节点根 据各自的子模型信息进行联邦学习。
其中,服务节点的第一指示信息可以包括:服务节点上的子模型信息、与该服务节点连接的用户节点的标识信息。用户节点的第一指示信息可以包括用户节点上的子模型信息。在此情况下,服务节点可以与该服务节点对应的用户节点建立连接,关于服务节点与用户节点建立连接的原理,可以参考上述S503-3和S503-4,此处不再赘述。若服务节点的子模型信息中包括该服务节点的子模型,则该服务节点还可以保存该子模型。用户节点保存该用户节点对应的子模型信息中的子模型。
其中,联邦学习的过程可以包括协同训练的过程和模型的联邦聚合的过程。
以下结合图8说明协同训练的过程。
示例性地,若M个节点中,相连接的服务节点和用户节点中用户节点上的神经网络层为第一神经网络层,服务节点上的神经网络层为第二神经网络层,则M个节点中,相连接的服务节点和用户节点的训练过程如下:
S801,用户节点通过第一神经网络层处理该用户节点上的训练样本,得到第一数据,即第一神经网络层处理训练样本后得到的数据。
S802,用户节点向服务节点发送第一数据和标签信息。
可理解,标签信息可以包括经过数据脱敏处理的标签。其中,数据脱敏是消除原始环境数据中的敏感信息,并保留业务所需的数据特征或内容的数据处理过程。关于数据脱敏的原理,可以参考已有数据脱敏技术的实现原理,此处不再赘述。
S803,服务节点通过第二神经网络层处理第二数据,得到待训练模型的输出数据。
其中,第二数据包括第一数据。
在一些可能的设计方案中,第二数据还可以包括服务节点上的全局信息,该全局信息是与服务节点连接的所有用户节点上的训练样本相关的数据。例如,第一数据为用户节点上的薪资信息的处理结果,第二数据则可以是A地区平均工资相对于B地区平均工资的差值。
S804,服务节点根据待训练模型的输出数据和标签信息得到第一梯度。
S805,服务节点在第二神经网络层上反向传播第一梯度,得到第二梯度,并更新第二神经网络层的模型权重。
S806,服务节点向用户节点发送第二梯度。
S807,用户节点在第一神经网络层上反向传播第二梯度,并更新第一神经网络层的模型权重。
如此,便可以实现用户节点和服务节点之间的协同训练。
协同训练完成后,便可以进行模型的联邦聚合。以用户节点上的子模型为第一子模型,服务节点上的子模型为第二子模型为例,模型的联邦聚合的过程如下:用户节点向与该用户节点连接的服务节点发送更新后的第一子模型的模型权重。服务节点对各个用户节点更新后的第一子模型的模型权重进行首次联邦聚合,得到首次聚合的模型权重。服务节点向中心节点发送首次聚合的模型权重以及服务节点更新后的第二子模型的模型权重。中心节点对各个服务节点的首次聚合的模型权重再次进行联邦聚合,从而得到再次聚合的模型权重。如此,便可以实现一次联邦学习过程。可以理解,本申请实施例中,上述联邦学习过程可以进行多次,其中,每次联邦学习过程中的待训 练模型,可以根据是上一次联邦学习过程中再次聚合的模型权重更新后的模型。
可理解,中心节点可以是服务节点中的一个节点,也可以是服务节点之外的其他服务节点。
基于上述图5所示的模型训练方法,管理节点可以根据M个第一节点中每个第一节点的资源注册信息确定配置信息,并向M个第一节点中的第二节点发送第一指示信息,以指示根据配置信息进行联邦学习,例如,管理节点可以根据每个节点的算力确定配置信息。如此,可以使每个第一节点的算力与节点上部署的子模型的计算需求相匹配,从而能够提高联邦学习的效率,此外,各个用户节点的上的训练样本可以在处理后传输,从而可以避免在不同的节点之间传输原始数据,提高数据安全性。综上可知,图5所提供的模型训练方法可以兼顾数据安全和模型训练效率。
一种可能的设计方案中,资源注册信息还可以包括如下一项或多项:节点上数据的类型、或节点上数据的数量。在此情况下,如图5所示,在S501,管理节点根据M个第一节点中每个节点的资源注册信息,获取用于对待训练模型进行联邦学习的配置信息之前,图5所示的方法还可以包括:
S500,管理节点从P个第二候选节点中,确定M个第一节点。
其中,第二候选节点为N个第一候选节点中,满足第一条件的节点。第一条件包括如下一项或多项:第一候选节点上,存在与待训练模型的训练样本的数据类型相同的数据。或者,第一候选节点上,用于作为待训练模型的训练样本的数据的量大于或等于数据量阈值。其中,N、P均为正整数,且N≥P≥M。
其中,第一候选节点上与待训练模型的训练样本的数据类型相同的数据,也可以说是可以用于待训练模型进行模型训练的数据。
其中,数据量阈值可以是10条、100条、或1000条,具体数量可以根据业务的实际情况,如模型训练精度等确定,此处不再赘述。可理解,对于服务节点和用户节点,数据量阈值可以不同。
如此,可以选择出数据类型与待训练样本的数据类型匹配和/或训练样本与算力匹配的第一节点,从而可以进一步提高模型训练效率。
可选地,如图9所示,S500,管理节点从P个第二候选节点中,确定M个第一节点,可以包括:
S500包括S500-0,管理节点确定第二候选节点。
S500-1,管理节点接收每个第二候选节点各自的第二指示信息。
其中,第二指示信息用于指示第二候选节点加入联邦学习过程,或者不加入联邦学习过程。
S500-2,管理节点将加入联邦学习过程的第二候选节点确定为第一节点。
进一步地,N个第一候选节点中包括N1个第三候选节点,N1个第三候选节点中满足第一条件的P1个节点为第四候选节点。其中,N1、P1均为正整数,N≥N1≥P1。
其中,第三候选节点为在待训练模型开始联邦学习前向管理节点发送资源注册信息,向管理节点发送所述资源注册信息的节点,需要说明,第三候选节点为未发送加入请求信息(用于请求加入已有联邦学习过程)的节点。第二候选节点包括第三候选节点中,满足第一条件的第四候选节点。
上述S500-2,管理节点将加入联邦学习过程的第二候选节点确定为第一节点,包括:管理节点将加入联邦学习过程的第四候选节点确定为第一节点。以下结合图10举例说明。
S1001,管理节点接收N1个第三候选节点各自的资源注册信息。
其中,第三候选节点中服务节点的资源注册信息可以承载于X2接口信令中,第三候选节点中用户节点的资源注册信息可以承载于PDCCH或者PDSCH中。
S1002,第四节点向管理节点发送联邦学习请求。其中,联邦学习请求用于指示待训练模型的训练样本的数据类型和数据量阈值。
S1003,管理节点向第四节点发送N1个第三候选节点中每个节点的资源注册信息。第四节点接收来自管理节点的N1个第三候选节点中每个节点的资源注册信息。
其中,第四节点为发起联邦学习请求的节点,联邦学习请求用于指示待训练模型的训练样本的数据类型和数据量阈值。
S1004,第四节点根据N1个第三候选节点中每个节点的资源注册信息确定第四候选节点。
其中,第四候选节点为N1个第三候选节点中,存在与待训练模型的训练样本的数据类型相同的数据的节点。
S1005,第四节点向管理节点发送第三指示信息。第三指示信息用于指示第四候选节点。
可理解,第一候选节点的确定过程也可以由管理节点来实现,具体实现原理可以参考上述步骤S1004和S1005,此处不再赘述。
如此,管理节点可以通过第四节点辅助确定第四候选节点,以降低管理节点的复杂度。
或者,上述S1004也可以由管理节点执行,即管理节点自行根据联邦学习请求和第三候选节点中每个节点的资源注册信息确定第四候选节点。在此情况下,管理节点可以避免执行S1003和S1005。
如此,管理节点可以根据联邦学习请求确定第四候选节点,可以降低信令开销。
S1006,管理节点向各个第四候选节点发送第四指示信息。其中,第四指示信息指示确认是否加入待训练模型的联邦学习过程。
可理解,第四指示信息可以包括联邦学习请求。
S1007,管理节点接收来自各个第四候选节点的第二指示信息。其中,第二指示信息用于指示是否加入待训练模型的联邦学习过程。也就是说,第四候选节点发送的第二指示信息可以显示指示是否加入待训练模型的联邦学习过程。
S1008,管理节点将第二指示信息指示加入待训练模型的联邦学习过程的第四候选节点,确定为第一节点。
此外,为了用户节点能够参与已有联邦学习过程,在此情况下,N个第一候选节点中还可以包括N2个第五候选节点,第五候选节点为在待训练模型的联邦学习过程中,向管理节点发送加入请求信息的节点。其中,加入请求信息用于请求加入联邦学习;在此情况下,第二候选节点还包括N2个第五候选节点中满足第一条件的P2个第六候选节点。其中,N2、P2均为正整数,N≥N2≥P2。上述S500-2,管理节点将加入联邦学习过 程的第二候选节点确定为第一节点,还可以包括:管理节点将加入联邦学习过程的第六候选节点确定为第一节点。
第五候选节点为已向管理节点发送加入请求信息的用户节点。第六候选节点为N2个第五候选节点中,满足第一条件的节点。以下结合图11举例说明从第六候选节点确定第一节点的过程。
S1101,第五候选节点向管理节点发送加入请求信息。
其中,加入请求信息包括第五候选节点的资源注册信息。
S1102,管理节点根据第五候选节点的加入请求信息,确定第六候选节点。
其中,第六候选节点为第五候选节点中,满足第一条件的节点。
S1103,管理节点向第六候选节点发送联邦学习的过程的信息。联邦学习的过程的信息包括至少一个神经网络模型的训练样本的类型、训练样本的数据量阈值。至少一个待训练模型神经网络模型可以包括待训练模型。
S1104,管理节点接收来自第六候选节点的第二指示信息。其中,第二指示信息中包括第六节点从多个联邦学习过程中选择的联邦学习过程。
其中,第二指示信息包括第六候选节点选择加入的联邦学习过程。也就是说,可以通过隐式的方式指示是否加入待训练模型的联邦学习过程。
S1105,管理节点将选择加入待训练模型的联邦学习过程的第六候选节点确定为第一节点。
如此,可以将新的节点加入联邦学习过程,从而进一步提高联邦学习的效率。
可理解,本申请实施例中,在联邦学习过程中,各个第一节点的状态可能发生变化,为了减小节点上所执行的其他任务对联邦学习过程的影响,进一步提高联邦学习的效率,本申请实施例中,管理节点可以每间隔一个评估周期评估获取各个第一节点各自的时延和能耗,进而根据各个第一节点的时延和能耗确定是否需要进行算力调整。
例如,若存在第一节点的算力大于第二算力阈值,或者第一节点的能耗大于能耗阈值,则进行算力调整,在此情况下,可以重新执行S500。
可理解,对于用户节点和服务节点,第二算力阈值可以相同也可以不同。
为便于理解本申请的方案,以下结合详细的流程举例说明本申请实施例的模型训练方法。
在模型开始训练时,通信系统中的节点如图4中所示。基于该通信系统的模型训练方法的流程示意图如图12所示。以下结合图12详细说明。
S1201,服务节点402a至服务节点402c向管理节点401发送各自的资源注册信息,用户节点403a至用户节点403f向管理节点发送各自的资源注册信息。即第三候选节点包括服务节点402a至服务节点402c,以及用户节点403a至用户节点403f。
关于S1201的具体实现,可以参考S1001的具体实现方式,此处不再赘述。
S1202,服务节点402a(即第四节点)向管理节点401发送联邦学习请求。联邦学习请求用于请求对神经网络模型1进行联邦学习。
关于S1202的具体实现原理,可以参考S1002的实现原理,此处不再赘述。
S1203,管理节点401向服务节点402a(第四节点)发送所有第三候选节点的资源注册信息。
关于S1203的具体实现原理,可以参考S1003的实现原理,此处不再赘述。
S1204,服务节点402a根据所有第三候选节点的资源注册信息,确定第四候选节点。
其中,第四候选节点包括服务节点402a-服务节点402c,以及用户节点403a至用户节点403f。
关于S1204的具体实现原理,可以参考S1004的实现原理,此处不再赘述。
S1205,服务节点402a向管理节点401发送第三指示信息。第三指示信息用于指示第四候选节点。
关于S1205的具体实现原理,可以参考S1005的实现原理,此处不再赘述。
S1206,管理节点401向每个第四候选节点发送第四指示信息。
其中,第四指示信息可以包括联邦学习请求。
关于S1206的具体实现原理,可以参考S1006的实现原理,此处不再赘述。
S1207,管理节点401接收第四候选节点的第二指示信息。
其中,服务节点402a和服务节点402b的第二指示信息均指示加入神经网络模型1的联邦学习过程,用户节点403a至用户节点403d的第二指示信息均指示加入神经网络模型1的联邦学习过程。
关于S1207的具体实现原理,可以参考S1007的实现原理,此处不再赘述。
S1208,管理节点401将第四候选节点中的服务节点402a、服务节点402b,以及用户节点403a至用户节点403d均确定为第一节点。
关于S1208的具体实现原理,可以参考S1008的实现原理,此处不再赘述。
S1209,管理节点根据第一节点确定配置信息。
关于S1209的具体实现原理,可以参考S501的实现原理,此处不再赘述。
S1210,管理节点向第一节点发送第一指示信息。
关于S1210的具体实现原理,可以参考S502的实现原理,此处不再赘述。
S1211,各个第一节点根据配置信息实现进行联邦学习。关于联邦学习的原理,可以参考上述图8所示的相关原理,此处不再赘述。
若在模型训练过程中,存在新加入的节点,如下步骤S1212至S1216:
S1212,用户节点403g和用户节点403h均向管理节点401发送加入请求信息,用于请求加入联邦学习过程。此时,用户节点403g和用户节点403h为第五候选节点。
关于S1212的具体实现原理,可以参考S1101的实现原理,此处不再赘述。
S1213,管理节点401根据用户节点403g和用户节点403h各自的加入请求信息中的资源注册信息,确定第六候选节点为用户节点403g。
关于S1213的具体实现原理,可以参考S1102的实现原理,此处不再赘述。
S1214,管理节点401向用户节点403g发送联邦学习的过程的信息,联邦学习的过程的信息指示用户节点403g可以加入神经网络模型1的联邦学习过程和神经网络模型2的联邦学习过程。
关于S1214的具体实现原理,可以参考S1103的实现原理,此处不再赘述。
S1215,用户节点403g接收到联邦学习的过程的信息后,向管理节点401发送第二指示信息,且该第二指示信息指示用户节点403g加入神经网络模型1的联邦学习过 程。
关于S1215的具体实现原理,可以参考S1105的实现原理,此处不再赘述。
S1216,管理节点401将用户节点403g确定为第一节点。
关于S1216的具体实现原理,可以参考S1106的实现原理,此处不再赘述。
接着,可以将S1206和S1208确定的第一节点一起,作为参与联邦学习的节点,重新执行上述步骤S1209至S1211。
以待训练模型为神经网络模型为例,图4所示通信系统,在执行上述S1201至上述S1216后,各个第一节点之间的连接关系如图13所示。其中,管理节点与服务节点402a、服务节点402b分别连接,服务节点402a与用户节点403a、用户节点403b分别连接。服务节点402b与用户节点403c、用户节点d分别连接。若分布至服务节点402a、用户节点403a和用户节点403b上的待训练模型按照图中L1的位置分割,得到第一神经网络层和第二神经网络层,则可以将第一神经网络层部署在用户节点403a和用户节点403b上,将第二神经网络层部署在服务节点402a上。若分布至服务节点402b、用户节点403c和用户节点403d上的待训练模型按照图中L2的位置分割,得到第三神经网络层和第四神经网络层,则可以将第四神经网络层部署在用户节点403c和用户节点403d上,将第二神经网络层部署在服务节点402b上。需要说明,本申请实施例中,可以在服务节点以及与服务节点连接的用户节点上实现纵向联邦学习,在与同一服务节点连接的用户节点上可以实现横向联邦学习。
本申请实施例中的方案,可以通过中心节点协调不同的节点,以实现横向和纵向联邦学习。随着训练次数的增加,采用本申请实施例的方案实现的横向和纵向联邦学习,相对于横向联邦学习而言训练的得到的模型的预测精度更高,且更接近云端进行模型训练(云训练)得到的模型的预测精度。关于云训练、横向联邦学习、以及横向和纵向联邦学习的精度与训练次数之间的关系可以参考图14所示。
以上结合图3-图14详细说明了本申请实施例提供的模型训练方法。以下结合图15-图16详细说明用于执行本申请实施例提供的模型训练方法的通信装置。
示例性地,图15本申请实施例提供的通信装置1500的结构示意图一。如图15所示,通信装置1500包括:处理模块1501和收发模块1502。为了便于说明,图15仅示出了该通信装置1500的主要部件。
一些实施例中,通信装置1500可适用于图4中所示出的通信系统中,执行图5中所示出的模型训练方法中管理节点的功能。
其中,处理模块1501,用于根据M个第一节点中每个节点的资源注册信息,获取用于对待训练模型进行联邦学习的配置信息。
其中,M个第一节点为参与待训练模型的联邦学习的节点,M个第一节点包括用户节点的标识和服务节点的标识。资源注册信息包括第一节点的算力信息。配置信息包括M个第一节点中的用户节点与服务节点之间的连接关系,以及待训练模型在每个第一节点上的子模型信息。一个服务节点与至少一个用户节点连接,且不同的服务节点连接的用户节点不同。M为正整数。
收发模块1502,用于根据配置信息向第一节点发送第一指示信息。
其中,第一指示信息指示根据配置信息实现待训练模型的联邦学习。
一种可能的设计方案中,收发模块1502,具体用于向第一节点中的第三节点,发送每个第一节点的资源注册信息。以及,接收来自第三节点的配置信息。
可选地,第三节点为第一节点中,算力大于或等于以算力阈值的节点。
一种可能的设计方案中,第二节点包括服务节点,第一指示信息包括服务节点与用户节点之间的连接关系、服务节点的子模型信息,以及与服务节点连接的用户节点的子模型信息。
一种可能的设计方案中,第二节点包括服务节点和用户节点。第一指示信息包括第二节点的子模型信息,以及M个第一节点中与第二节点连接的节点。
一种可能的设计方案中,资源注册信息还包括如下一项或多项:第一候选节点上数据的类型、或第一候选节点上数据的数量。处理模块1501,还用于从P个第二候选节点中,确定M个第一节点。其中,第二候选节点为N个第一候选节点中,满足第一条件的节点。第一条件包括如下一项或多项:第一候选节点上,存在与待训练模型的训练样本的数据类型相同的数据。或者,第一候选节点上,用于作为待训练模型的训练样本的数据的量大于或等于数据量阈值。其中,N、P均为正整数,且N≥P≥M。
可选地,处理模块1501,具体用于通过收发模块1502接收每个第二候选节点各自的第二指示信息。第二指示信息用于指示第二候选节点加入联邦学习过程,或者不加入联邦学习过程。以及,将加入联邦学习过程的第二候选节点确定为第一节点。
进一步地,处理模块1501,具体用于将加入联邦学习过程的第四候选节点确定为第一节点。
更进一步地,收发模块1502,还用于向第四节点发送N1个第三候选节点中每个节点的资源注册信息。第四节点为发起联邦学习请求的节点,联邦学习请求用于指示待训练模型的训练样本的数据类型和数据量阈值。以及,接收来自第四节点的第三指示信息。其中,第三指示信息用于指示第四候选节点。
或者,更进一步地,收发模块1502,还用于接收来自第四节点的联邦学习请求。其中,联邦学习请求用于指示待训练模型的训练样本的数据类型和数据量阈值。处理模块1501,还用于根据联邦学习请求和N1个第三候选节点中每个节点的资源注册信息确定第四候选节点。联邦学习请求用于指示待训练模型的训练样本的数据类型和数据量阈值。
或者,更进一步地,N个第一候选节点中包括N2个第五候选节点,N2个第五候选节点中满足第一条件的P2个节点为第六候选节点。其中,N2、P2均为正整数,N≥N2≥P2。处理模块1501,还用于将加入联邦学习过程的第六候选节点确定为第一节点。
可选地,收发模可以包括接收模块和发送模块(图15中未示出)。其中,收发模块1502用于实现通信装置1500的发送功能和接收功能。
可选地,通信装置1500还可以包括存储模块(图15中未示出),该存储模块存储有程序或指令。当处理模块1501执行该程序或指令时,使得通信装置1500可以执行图5所示出的模型训练方法中管理节点的功能。
应理解,通信装置1500中涉及的处理模块1501可以由处理器或处理器相关电路组件实现,可以为处理器或处理单元;收发模块1502可以由收发器或收发器相关电路 组件实现,可以为收发器或收发单元。
需要说明的是,通信装置1500可以是网络设备,也可以是可设置于网络设备中的芯片(系统)或其他部件或组件,还可以是包含网络设备的装置,本申请对此不做限定。
此外,通信装置1500的技术效果可以参考图5所示出的模型训练方法的技术效果,此处不再赘述。
另一些实施例中,通信装置1500可适用于图4中所示出的通信系统中,执行图3中所示出的模型训练方法中第四节点的功能。
其中,收发模块1502,用于接收来自管理节点的N1个第三候选节点中每个节点的资源注册信息。处理模块1501,用于根据N1个第三候选节点中每个节点的资源注册信息确定第四候选节点。其中,第四候选节点为N1个第三候选节点中,存在与待训练模型的训练样本的数据类型相同的数据的节点。向管理节点发送第三指示信息。第三指示信息用于指示第四候选节点。
一种可能的设计方案中,收发模块1502,还用于第四节点向管理节点发送联邦学习请求。其中,联邦学习请求用于指示待训练模型的训练样本的数据类型和数据量阈值。
可选地,收发模块1502可以包括接收模块和发送模块(图15中未示出)。其中,收发模块1502用于实现通信装置1500的发送功能和接收功能。
可选地,通信装置1500还可以包括存储模块(图15中未示出),该存储模块存储有程序或指令。当处理模块1501执行该程序或指令时,使得通信装置1500可以执行图5所示出的模型训练方法中管理节点的功能。
应理解,通信装置1500中涉及的处理模块1501可以由处理器或处理器相关电路组件实现,可以为处理器或处理单元;收发模块1502可以由收发器或收发器相关电路组件实现,可以为收发器或收发单元。
需要说明的是,通信装置1500可以是网络设备,也可以是可设置于网络设备中的芯片(系统)或其他部件或组件,还可以是包含网络设备的装置,本申请对此不做限定。
此外,通信装置1500的技术效果可以参考图5所示出的模型训练方法的技术效果,此处不再赘述。
再一些实施例中,通信装置1500可适用于图4中所示出的通信系统中,执行图3中所示出的模型训练方法中第三节点的功能。其中,收发模块1502,用于接收来自管理节点的每个第一节点的资源注册信息。其中,第一节点为参与待训练模型的联邦学习的节点。处理模块1501,用于根据每个第一节点的资源注册信息确定配置信息。收发模块1502,还用于向管理节点发送配置信息。
可选地,收发模可以包括接收模块和发送模块(图15中未示出)。其中,收发模块1502用于实现通信装置1500的发送功能和接收功能。
可选地,通信装置1500还可以包括存储模块(图15中未示出),该存储模块存储有程序或指令。当处理模块1501执行该程序或指令时,使得通信装置1500可以执行图5所示出的模型训练方法中管理节点的功能。
应理解,通信装置1500中涉及的处理模块1501可以由处理器或处理器相关电路组件实现,可以为处理器或处理单元;收发模块1502可以由收发器或收发器相关电路组件实现,可以为收发器或收发单元。
需要说明的是,通信装置1500可以是终端设备或网络设备,也可以是可设置于终端设备或网络设备中的芯片(系统)或其他部件或组件,还可以是包含终端设备或网络设备的装置,本申请对此不做限定。
此外,通信装置1500的技术效果可以参考图5所示出的模型训练方法的技术效果,此处不再赘述。
又一些实施例中,通信装置1500可适用于图1中所示出的通信系统中,执行图3中所示出的模型训练方法中第二节点的功能。
其中,收发模块1502,用于接收来自管理节点的第一指示信息。第一指示信息指示根据配置信息实现待训练模型的联邦学习,配置信息包括M个第一节点中的用户节点与服务节点之间的连接关系,以及待训练模型在每个第一节点上的子模型信息。一个服务节点与至少一个用户节点连接,且不同的服务节点连接的用户节点不同;M为正整数。处理模块1501,根据第一指示信息实现待训练模型的联邦学习。
一种可能的设计方案中,通信装置1500包括服务节点和用户节点。第一指示信息包括通信装置1500的子模型信息,以及M个第一节点中与通信装置1500连接的节点。
一种可能的设计方案中,通信装置1500包括服务节点,第一指示信息包括服务节点与用户节点之间的连接关系、服务节点的子模型信息、以及与通信装置1500连接的用户节点的子模型信息。
可选地,处理模块1501,具体用于根据第一指示信息,向与服务节点连接的用户节点发送配置指示信息。其中,配置指示信息指示根据用户节点上的子模型信息进行联邦学习。
一种可能的设计方案中,通信装置1500的输入数据包括与第一数据和来自于通信装置1500的第二数据,第一数据为所述服务节点连接的用户节点输出的数据,第二数据与通信装置1500连接的所有用户节点的训练样本相关。
可选地,收发模块1502可以包括接收模块和发送模块(图15中未示出)。其中,收发模块1502用于实现通信装置1500的发送功能和接收功能。
可选地,通信装置1500还可以包括存储模块(图15中未示出),该存储模块存储有程序或指令。当处理模块1501执行该程序或指令时,使得通信装置1500可以执行图5所示出的模型训练方法中管理节点的功能。
应理解,通信装置1500中涉及的处理模块1501可以由处理器或处理器相关电路组件实现,可以为处理器或处理单元;收发模块1502可以由收发器或收发器相关电路组件实现,可以为收发器或收发单元。
需要说明的是,通信装置1500可以是终端设备或网络设备,也可以是可设置于终端设备或网络设备中的芯片(系统)或其他部件或组件,还可以是包含终端设备或网络设备的装置,本申请对此不做限定。
此外,通信装置1500的技术效果可以参考图5所示出的模型训练方法的技术效 果,此处不再赘述。
示例性地,图16为本申请实施例提供的通信装置的结构示意图二。该通信装置可以是终端设备或网络设备,也可以是可设置于终端设备或网络设备的芯片(系统)或其他部件或组件。如图16所示,通信装置1600可以包括处理器1601。可选地,通信装置1600还可以包括存储器1602和/或收发器1603。其中,处理器1601与存储器1602和收发器1603耦合,如可以通过通信总线连接。
下面结合图16对通信装置1600的各个构成部件进行具体的介绍:
其中,处理器1601是通信装置1600的控制中心,可以是一个处理器,也可以是多个处理元件的统称。例如,处理器1601是一个或多个中央处理器(central processing unit,CPU),也可以是特定集成电路(application specific integrated circuit,ASIC),或者是被配置成实施本申请实施例的一个或多个集成电路,例如:一个或多个数字信号处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)。
可选地,处理器1601可以通过运行或执行存储在存储器1602内的软件程序,以及调用存储在存储器1602内的数据,执行通信装置1600的各种功能。
在具体的实现中,作为一种实施例,处理器1601可以包括一个或多个CPU,例如图16中所示出的CPU0和CPU1。
在具体实现中,作为一种实施例,通信装置1600也可以包括多个处理器,例如图16中所示的处理器1601和处理器1604。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
其中,所述存储器1602用于存储执行本申请方案的软件程序,并由处理器1601来控制执行,具体实现方式可以参考上述方法实施例,此处不再赘述。
可选地,存储器1602可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器1602可以和处理器1601集成在一起,也可以独立存在,并通过通信装置1600的接口电路(图16中未示出)与处理器1601耦合,本申请实施例对此不作具体限定。
收发器1603,用于与其他通信装置之间的通信。例如,通信装置1600为终端设备,收发器1603可以用于与网络设备通信,或者与另一个终端设备通信。又例如,通信装置1600为网络设备,收发器1603可以用于与终端设备通信,或者与另一个网络设备通信。
可选地,收发器1603可以包括接收器和发送器(图16中未单独示出)。其中,接收器用于实现接收功能,发送器用于实现发送功能。
可选地,收发器1603可以和处理器1601集成在一起,也可以独立存在,并通过通信装置1600的接口电路(图16中未示出)与处理器1601耦合,本申请实施例对此不作具体限定。
需要说明的是,图16中示出的通信装置1600的结构并不构成对该通信装置的限定,实际的通信装置可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
此外,通信装置1600的技术效果可以参考上述方法实施例所述的模型训练方法的技术效果,此处不再赘述。
应理解,在本申请实施例中的处理器可以是中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
还应理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的随机存取存储器(random access memory,RAM)可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
上述实施例,可以全部或部分地通过软件、硬件(如电路)、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令或计算机程序。在计算机上加载或执行所述计算机指令或计算机程序时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质。半导体介质可以是固态硬盘。
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存 在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B可以是单数或者复数。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系,但也可能表示的是一种“和/或”的关系,具体可参考前后文进行理解。
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任 何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (29)

  1. 一种模型训练方法,其特征在于,所述方法包括:
    管理节点根据M个第一节点中每个第一节点的资源注册信息,获取用于对待训练模型进行联邦学习的配置信息;其中,所述M个第一节点为参与所述待训练模型的联邦学习的节点;所述资源注册信息包括所述第一节点的算力信息;所述配置信息包括所述M个第一节点中的用户节点的标识和服务节点的标识,所述用户节点与所述服务节点之间的连接关系,以及所述待训练模型在每个所述第一节点上的子模型信息;一个所述服务节点与至少一个所述用户节点连接,且不同的所述服务节点连接的所述用户节点不同;M为正整数;
    所述管理节点根据配置信息,向第二节点发送第一指示信息;其中,所述第二节点为所述M个第一节点中的节点,所述第一指示信息指示根据所述配置信息实现待训练模型的联邦学习。
  2. 根据权利要求1所述的方法,其特征在于,所述管理节点根据M个第一节点中每个节点的资源注册信息,获取用于对待训练模型进行联邦学习的配置信息,包括:
    所述管理节点向所述M个第一节点中的第三节点,发送所述M个所述第一节点的资源注册信息,其中,所述M个第一节点的资源注册信息用于指示获取配置信息;
    所述管理节点接收来自所述第三节点的所述配置信息。
  3. 根据权利要求2所述的方法,其特征在于,所述第三节点为所述第一节点中,算力大于或等于第一算力阈值的节点。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述第二节点包括服务节点,所述第一指示信息包括所述服务节点与所述用户节点之间的连接关系、所述服务节点的子模型信息,以及与所述服务节点连接的所述用户节点的子模型信息。
  5. 根据权利要求1-3中任一项所述的方法,其特征在于,所述第二节点包括所述服务节点和所述用户节点;所述第一指示信息包括所述第二节点的子模型信息,以及所述M个第一节点中与所述第二节点连接的节点。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述资源注册信息还包括如下一项或多项:节点上数据的类型、或节点上数据的数量;在所述管理节点根据M个第一节点中每个第一节点的资源注册信息,获取用于对待训练模型进行联邦学习的配置信息之前,所述方法还包括:
    所述管理节点从P个第二候选节点中,确定所述M个第一节点;其中,所述第二候选节点为N个第一候选节点中,满足第一条件的节点;
    所述第一条件包括如下一项或多项:所述第一候选节点上存在与所述待训练模型的训练样本的数据类型相同的数据,所述第一候选节点上用于作为所述待训练模型的训练样本的数据的量大于或等于数据量阈值;
    其中,N、P均为正整数,且N≥P≥M。
  7. 根据权利要求6所述的方法,其特征在于,所述管理节点从P个第二候选节点中,确定所述M个第一节点,包括:
    所述管理节点接收来自每个所述第二候选节点的第二指示信息;所述第二指示信息用于指示所述第二候选节点是否加入联邦学习过程;
    所述管理节点根据每个所述第二候选节点发送的第二指示信息,将加入所述联邦学习 过程的所述第二候选节点确定为所述第一节点。
  8. 根据权利要求7所述的方法,其特征在于,所述第一候选节点包括第三候选节点;其中,所述第三候选节点为在待训练模型开始联邦学习前,向管理节点发送所述资源注册信息的节点;所述第二候选节点包括所述第三候选节点中,满足所述第一条件的第四候选节点。
  9. 根据权利要求8所述的方法,其特征在于,所述第一节点包括所述第四候选节点中加入联邦学习的节点。
  10. 根据权利要求8或9所述的方法,其特征在于,在所述管理节点从P个第二候选节点中,确定所述M个第一节点之前,所述方法还包括:
    所述管理节点接收来自第四节点的联邦学习请求;
    所述管理节点向所述第四节点发送所述第三候选节点的资源注册信息;
    所述管理节点接收来自所述第四节点的第三指示信息;其中,所述第三指示信息用于指示所述第四候选节点。
  11. 根据权利要求8-10中任一项所述的方法,其特征在于,所述第一候选节点还包括第五候选节点;其中,所述第五候选节点为在待训练模型的联邦学习过程中,向管理节点发送加入请求信息的节点;其中,所述加入请求信息用于请求加入联邦学习;所述第二候选节点还包括所述第五候选节点中,满足所述第一条件的第六候选节点。
  12. 根据权利要求11所述的方法,其特征在于,所述第一节点还包括所述第六候选节点中加入联邦学习的节点。
  13. 一种模型训练方法,其特征在于,所述方法包括:
    第四节点接收来自管理节点的N1个第三候选节点中每个节点的资源注册信息;
    所述第四节点根据所述N1个第三候选节点中每个节点的资源注册信息确定第四候选节点;其中,所述第四候选节点为所述N1个第三候选节点中,存在与待训练模型的训练样本数据类型相同的数据的节点;
    所述第四节点向所述管理节点发送第三指示信息;所述第三指示信息用于指示所述第四候选节点。
  14. 根据权利要求13所述的方法,其特征在于,在所述第四节点接收来自管理节点的N1个第三候选节点中每个节点的资源注册信息之前,所述方法还包括:
    所述第四节点向所述管理节点发送联邦学习请求;其中,所述联邦学习请求用于指示所述待训练模型的训练样本的数据类型和数据量阈值。
  15. 一种模型训练方法,其特征在于,所述方法包括:
    第三节点接收来自管理节点的每个所述第一节点的资源注册信息;其中,所述第一节点为参与待训练模型的联邦学习的节点;
    所述第三节点根据每个所述第一节点的资源注册信息确定配置信息;
    所述第三节点向所述管理节点发送所述配置信息。
  16. 一种模型训练方法,其特征在于,所述方法包括:
    第二节点接收来自管理节点的第一指示信息;其中,第二节点为M个第一节点中的一个节点,所述第一指示信息指示根据配置信息实现待训练模型的联邦学习,所述配置信息包括M个第一节点中的用户节点与服务节点之间的连接关系,以及所述待训练模型在每个 所述第一节点上的子模型信息;一个所述服务节点与至少一个所述用户节点连接,且不同的所述服务节点连接的所述用户节点不同;M为正整数;
    所述第二节点根据所述第一指示信息实现待训练模型的联邦学习。
  17. 根据权利要求16所述的方法,其特征在于,所述第二节点包括所述服务节点和所述用户节点;所述第一指示信息包括所述第二节点的子模型信息,以及所述M个第一节点中与所述第二节点连接的节点。
  18. 根据权利要求16所述的方法,其特征在于,所述第二节点包括服务节点,所述第一指示信息包括所述服务节点与所述用户节点之间的连接关系、所述服务节点的子模型信息、以及与所述服务节点连接的所述用户节点的子模型信息。
  19. 根据权利要求18所述的方法,其特征在于,所述第二节点根据所述第一指示信息实现待训练模型的联邦学习,包括:
    所述服务节点向与所述服务节点连接的用户节点发送配置指示信息;其中,所述配置指示信息指示根据所述用户节点上的子模型信息进行联邦学习。
  20. 根据权利要求18或19所述的方法,其特征在于,所述服务节点的输入数据包括第一数据和来自于所述服务节点的第二数据,所述第一数据为所述服务节点连接的所述用户节点输出的数据,所述第二数据与所述服务节点连接的所有所述用户节点的训练样本相关。
  21. 一种通信装置,其特征在于,所述通信装置用于执行如权利要求1-12中任一项所述的模型训练方法。
  22. 一种通信装置,其特征在于,所述通信装置用于执行如权利要求13或14所述的模型训练方法。
  23. 一种通信装置,其特征在于,所述通信装置用于执行如权利要求15所述的模型训练方法。
  24. 一种通信装置,其特征在于,所述通信装置用于执行如权利要求16-20中任一项所述的模型训练方法。
  25. 一种通信装置,其特征在于,包括:处理器,所述处理器与存储器耦合;
    所述处理器,用于执行所述存储器中存储的计算机程序,以使得所述通信装置执行如权利要求1-20中任一项所述的模型训练方法。
  26. 一种通信装置,其特征在于,包括:处理器和接口电路;其中,
    所述接口电路,用于接收代码指令并传输至所述处理器;
    所述处理器用于运行所述代码指令以执行如权利要求1-20中任一项所述的方法。
  27. 一种通信装置,其特征在于,所述通信装置包括处理器和收发器,所述收发器用于所述通信装置和其他通信装置之间进行信息交互,所述处理器执行程序指令,用以执行如权利要求1-20中任一项所述的模型训练方法。
  28. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机执行如权利要求1-20中任一项所述的模型训练方法。
  29. 一种计算机程序产品,其特征在于,所述计算机程序产品包括:计算机程序或指令,当所述计算机程序或指令在计算机上运行时,使得所述计算机执行如权利要求1-20中任一项所述的模型训练方法。
PCT/CN2022/104460 2022-07-07 2022-07-07 模型训练方法及通信装置 Ceased WO2024007264A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/104460 WO2024007264A1 (zh) 2022-07-07 2022-07-07 模型训练方法及通信装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/104460 WO2024007264A1 (zh) 2022-07-07 2022-07-07 模型训练方法及通信装置

Publications (1)

Publication Number Publication Date
WO2024007264A1 true WO2024007264A1 (zh) 2024-01-11

Family

ID=89454568

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/104460 Ceased WO2024007264A1 (zh) 2022-07-07 2022-07-07 模型训练方法及通信装置

Country Status (1)

Country Link
WO (1) WO2024007264A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118093167A (zh) * 2024-01-31 2024-05-28 三六零数字安全科技集团有限公司 模型训练方法、装置、电子设备及存储介质
CN118586040A (zh) * 2024-08-01 2024-09-03 山东省计算中心(国家超级计算济南中心) 基于高效聚合联邦学习的车联网数据处理方法及系统
WO2025237119A1 (zh) * 2024-05-11 2025-11-20 华为技术有限公司 一种通信方法以及相关装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010305A (zh) * 2021-02-08 2021-06-22 北京邮电大学 部署在边缘计算网络中的联邦学习系统及其学习方法
CN113469367A (zh) * 2021-05-25 2021-10-01 华为技术有限公司 一种联邦学习方法、装置及系统
CN114444708A (zh) * 2020-10-31 2022-05-06 华为技术有限公司 获取模型的方法、装置、设备、系统及可读存储介质
CN114611716A (zh) * 2022-03-01 2022-06-10 亚信科技(中国)有限公司 联邦学习系统构建方法、装置、电子设备及可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114444708A (zh) * 2020-10-31 2022-05-06 华为技术有限公司 获取模型的方法、装置、设备、系统及可读存储介质
CN113010305A (zh) * 2021-02-08 2021-06-22 北京邮电大学 部署在边缘计算网络中的联邦学习系统及其学习方法
CN113469367A (zh) * 2021-05-25 2021-10-01 华为技术有限公司 一种联邦学习方法、装置及系统
CN114611716A (zh) * 2022-03-01 2022-06-10 亚信科技(中国)有限公司 联邦学习系统构建方法、装置、电子设备及可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WAN, SHUO ET AL.: "Convergence Analysis and System Design for Federated Learning over Wireless Networks", IEEE JOURNAL ON SELECTED AREAS IN COMMUNICATIONS, vol. 39, no. 12, 7 October 2021 (2021-10-07), XP011888708, DOI: 10.1109/JSAC.2021.3118351 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118093167A (zh) * 2024-01-31 2024-05-28 三六零数字安全科技集团有限公司 模型训练方法、装置、电子设备及存储介质
WO2025237119A1 (zh) * 2024-05-11 2025-11-20 华为技术有限公司 一种通信方法以及相关装置
CN118586040A (zh) * 2024-08-01 2024-09-03 山东省计算中心(国家超级计算济南中心) 基于高效聚合联邦学习的车联网数据处理方法及系统

Similar Documents

Publication Publication Date Title
WO2022037360A1 (zh) 一种计算任务的处理方法、通信装置及无线网络架构
US12507143B2 (en) Allocating candidate cell identifiers for an integrated access and backhaul (IAB) node migrating to a target IAB donor centralized unit
US11991762B2 (en) Direct connection communication method, AMF, access network functional entity and terminal
WO2017152733A1 (zh) 一种大规模复杂无线通信系统的仿真方法和系统
WO2024060139A1 (zh) 通信方法、装置、存储介质及程序产品
WO2019011076A1 (zh) 一种数据处理方法、装置、设备及计算机可读存储介质
US12452891B2 (en) Apparatus and method for assigning a task in an AI/ML job
WO2017076348A1 (zh) 车路协同通信系统的资源调度方法、装置及节点
CN118265076A (zh) 数据处理方法、装置、通信设备及可读存储介质
CN115002829B (zh) 无线信号传输方法、通信设备和存储介质
KR20210067911A (ko) 에지 컴퓨팅에서 멀티 연합 학습 서비스 오케스트레이터 및 이의 실행 방법
WO2022199315A1 (zh) 数据处理方法及装置
WO2023179690A1 (zh) 测距方法及装置
CN114980146B (zh) 一种基于智能通信箱的波束增强方法、装置及智能通信箱
CN118354472B (zh) 基于5g通信网络的agv通信管理方法
WO2025060349A1 (en) Methods, devices, and computer readable medium for artificial intelligence (ai) service
WO2025092059A1 (en) Method, apparatus, and system for artificial intelligence (ai) model splitting
WO2026037039A1 (zh) 一种通信方法及相关装置
WO2026007738A1 (zh) 通信方法及装置、存储介质、程序产品
WO2026061247A1 (zh) 一种数据传输方法及装置
TWI678116B (zh) 邊界連結通訊的回饋控制方法、傳送節點與接收節點
CN118648328A (zh) 通信方法、装置、设备以及存储介质
WO2026025949A1 (zh) 一种无线感知测量方法、装置及电子设备
WO2025130264A1 (zh) 目标检测方法及装置
WO2026031953A1 (zh) 一种通信方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22949848

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22949848

Country of ref document: EP

Kind code of ref document: A1